@quintype/arrow 3.15.1-perf.3 → 3.15.1-perf.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/atoms/Author/index.js +14 -2103
- package/atoms/Author/styles.arrow.css +1 -1
- package/atoms/AuthorWithTime/index.js +32 -2482
- package/atoms/AuthorWithTime/styles.arrow.css +1 -1
- package/atoms/CollectionName/index.js +12 -2101
- package/atoms/CollectionName/styles.arrow.css +1 -1
- package/atoms/ExtendedLoadMore/{index-b22f1843.js → index-0f809dd9.js} +10 -7
- package/atoms/ExtendedLoadMore/index-142f015c.js +476 -0
- package/atoms/ExtendedLoadMore/{index-bc129cb8.js → index-37a9ccff.js} +18 -10
- package/atoms/ExtendedLoadMore/{index-6e083738.js → index-446679c8.js} +20 -12
- package/atoms/ExtendedLoadMore/{index-9e0d32b7.js → index-44f97338.js} +19 -9
- package/atoms/ExtendedLoadMore/{index-b5936059.js → index-57dd4870.js} +15 -7
- package/atoms/ExtendedLoadMore/{index-fee73a14.js → index-66dd4dbd.js} +15 -7
- package/atoms/ExtendedLoadMore/{index-5c8eda4a.js → index-8462c597.js} +21 -16
- package/atoms/ExtendedLoadMore/{index-3c4ac692.js → index-93cb06d1.js} +42 -51
- package/atoms/ExtendedLoadMore/{index-4ddfe28d.js → index-afd44863.js} +6 -4
- package/atoms/ExtendedLoadMore/{index-3976fac4.js → index-b5754c5d.js} +20 -14
- package/atoms/ExtendedLoadMore/{index-a5c95f84.js → index-bbaf526e.js} +16 -8
- package/atoms/ExtendedLoadMore/{index-6ecceae4.js → index-cfb262ef.js} +18 -9
- package/atoms/ExtendedLoadMore/index.js +8 -1
- package/atoms/ExtendedLoadMore/styles.arrow.css +1 -1
- package/atoms/Headline/index.js +14 -2103
- package/atoms/Headline/styles.arrow.css +1 -1
- package/atoms/HeroImage/index.js +22 -2170
- package/atoms/HeroImage/styles.arrow.css +1 -1
- package/atoms/LoadmoreButton/index.js +12 -2114
- package/atoms/LoadmoreButton/styles.arrow.css +1 -1
- package/atoms/ScrollSnap/index.js +17 -2178
- package/atoms/ScrollSnap/styles.arrow.css +1 -1
- package/atoms/SectionTag/index.js +10 -2099
- package/atoms/SectionTag/styles.arrow.css +1 -1
- package/atoms/Subheadline/index.js +8 -2097
- package/atoms/Subheadline/styles.arrow.css +1 -1
- package/atoms/TimeStamp/index.js +13 -2463
- package/atoms/TimeStamp/styles.arrow.css +1 -1
- package/molecules/KeyEvents/index.js +23 -2545
- package/molecules/KeyEvents/styles.arrow.css +1 -1
- package/molecules/PageIntroductionCard/index.js +17 -2454
- package/molecules/PageIntroductionCard/styles.arrow.css +1 -1
- package/molecules/SocialShareTemplate/index.js +144 -2740
- package/molecules/SocialShareTemplate/styles.arrow.css +1 -1
- package/molecules/StoryCard/index.js +64 -2582
- package/molecules/StoryCard/styles.arrow.css +1 -1
- package/molecules/StoryElementCard/index.js +123 -2893
- package/molecules/StoryElementCard/styles.arrow.css +1 -1
- package/molecules/StorycardContent/index.js +45 -2495
- package/molecules/StorycardContent/styles.arrow.css +1 -1
- package/package.json +1 -1
- package/rows/AlternateCollectionFilter/index.js +92 -2659
- package/rows/AlternateCollectionFilter/styles.arrow.css +1 -1
- package/rows/AsideCollection/index.js +92 -2659
- package/rows/AsideCollection/styles.arrow.css +1 -1
- package/rows/AstrologyCollection/index.js +89 -2656
- package/rows/AstrologyCollection/styles.arrow.css +1 -1
- package/rows/AuthorIntroductionCard/index.js +27 -2743
- package/rows/AuthorIntroductionCard/styles.arrow.css +1 -1
- package/rows/AuthorsList/index.js +34 -2763
- package/rows/AuthorsList/styles.arrow.css +1 -1
- package/rows/CollectionFilter/index.js +91 -2658
- package/rows/CollectionFilter/styles.arrow.css +1 -1
- package/rows/ElevenStories/index.js +81 -2612
- package/rows/ElevenStories/styles.arrow.css +1 -1
- package/rows/FourColFiveStories/index.js +75 -2603
- package/rows/FourColFiveStories/styles.arrow.css +1 -1
- package/rows/FourColGrid/index.js +92 -2623
- package/rows/FourColGrid/styles.arrow.css +1 -1
- package/rows/FourColPortraitStories/index.js +91 -2622
- package/rows/FourColPortraitStories/styles.arrow.css +1 -1
- package/rows/FourColSixteenStories/index.js +80 -2617
- package/rows/FourColSixteenStories/styles.arrow.css +1 -1
- package/rows/FourColTwelveStories/index.js +72 -2596
- package/rows/FourColTwelveStories/styles.arrow.css +1 -1
- package/rows/FourStorySlider/index.js +84 -2615
- package/rows/FourStorySlider/styles.arrow.css +1 -1
- package/rows/FourStorySliderPortrait/index.js +84 -2615
- package/rows/FourStorySliderPortrait/styles.arrow.css +1 -1
- package/rows/FourTabbedBigStorySlider/index.js +80 -2611
- package/rows/FourTabbedBigStorySlider/styles.arrow.css +1 -1
- package/rows/FullScreenSlider/index.js +85 -2616
- package/rows/FullScreenSlider/styles.arrow.css +1 -1
- package/rows/HalfScreenSlider/index.js +81 -2612
- package/rows/HalfScreenSlider/styles.arrow.css +1 -1
- package/rows/ListComponent/index.js +75 -2606
- package/rows/ListComponent/styles.arrow.css +1 -1
- package/rows/Listicles/index.js +38 -2235
- package/rows/Listicles/styles.arrow.css +1 -1
- package/rows/MagazineEditions/index.js +24 -2487
- package/rows/MagazineEditions/styles.arrow.css +1 -1
- package/rows/MagazineHeaderCard/index.js +26 -2489
- package/rows/MagazineHeaderCard/styles.arrow.css +1 -1
- package/rows/MagazineWidget/index.js +81 -2612
- package/rows/MagazineWidget/styles.arrow.css +1 -1
- package/rows/OneColStoryList/index.js +92 -2623
- package/rows/OneColStoryList/styles.arrow.css +1 -1
- package/rows/OpinionCollection/index.js +61 -2583
- package/rows/OpinionCollection/styles.arrow.css +1 -1
- package/rows/SixColSixStories/index.js +91 -2622
- package/rows/SixColSixStories/styles.arrow.css +1 -1
- package/rows/StoryCollection/index.js +92 -2659
- package/rows/StoryCollection/styles.arrow.css +1 -1
- package/rows/TagIntroductionCard/index.js +9 -1816
- package/rows/TagIntroductionCard/styles.arrow.css +1 -1
- package/rows/ThreeColFlexStories/index.js +91 -2622
- package/rows/ThreeColFlexStories/styles.arrow.css +1 -1
- package/rows/ThreeColFourteenStories/index.js +72 -2596
- package/rows/ThreeColFourteenStories/styles.arrow.css +1 -1
- package/rows/ThreeColGrid/index.js +94 -2625
- package/rows/ThreeColGrid/styles.arrow.css +1 -1
- package/rows/ThreeColSevenStory/index.js +84 -2615
- package/rows/ThreeColSevenStory/styles.arrow.css +1 -1
- package/rows/ThreeColSixStories/index.js +76 -2607
- package/rows/ThreeColSixStories/styles.arrow.css +1 -1
- package/rows/ThreeColTwelveStories/index.js +80 -2617
- package/rows/ThreeColTwelveStories/styles.arrow.css +1 -1
- package/rows/TwoColFourStories/index.js +78 -2609
- package/rows/TwoColFourStories/styles.arrow.css +1 -1
- package/rows/TwoColFourStoryHighlight/index.js +80 -2617
- package/rows/TwoColFourStoryHighlight/styles.arrow.css +1 -1
- package/rows/TwoColSevenStories/index.js +77 -2608
- package/rows/TwoColSevenStories/styles.arrow.css +1 -1
- package/rows/TwoColSixStories/index.js +82 -2619
- package/rows/TwoColSixStories/styles.arrow.css +1 -1
- package/rows/TwoColTenStoriesSidebar/index.js +79 -2610
- package/rows/TwoColTenStoriesSidebar/styles.arrow.css +1 -1
- package/rows/TwoColThreeStories/index.js +75 -2606
- package/rows/TwoColThreeStories/styles.arrow.css +1 -1
- package/story-elements/AlsoRead/index.js +24 -2170
- package/story-elements/AlsoRead/styles.arrow.css +1 -1
- package/story-elements/Attachment/index.js +15 -1870
- package/story-elements/Attachment/styles.arrow.css +1 -1
- package/story-elements/BigFact/index.js +16 -1871
- package/story-elements/BigFact/styles.arrow.css +1 -1
- package/story-elements/BlockQuote/index.js +20 -2157
- package/story-elements/BlockQuote/styles.arrow.css +1 -1
- package/story-elements/Blurb/index.js +18 -1932
- package/story-elements/Blurb/styles.arrow.css +1 -1
- package/story-elements/Image/index.js +42 -2251
- package/story-elements/Image/styles.arrow.css +1 -1
- package/story-elements/ImageGallery/index.js +45 -2254
- package/story-elements/ImageGallery/styles.arrow.css +1 -1
- package/story-elements/ImageSlideshow/index.js +48 -2257
- package/story-elements/ImageSlideshow/styles.arrow.css +1 -1
- package/story-elements/QuestionAnswer/index.js +26 -2163
- package/story-elements/QuestionAnswer/styles.arrow.css +1 -1
- package/story-elements/Quote/index.js +17 -1872
- package/story-elements/Quote/styles.arrow.css +1 -1
- package/story-elements/Reference/index.js +15 -1870
- package/story-elements/Reference/styles.arrow.css +1 -1
- package/story-elements/StoryElement/index.js +12 -1725
- package/story-elements/Summary/index.js +18 -1873
- package/story-elements/Summary/styles.arrow.css +1 -1
- package/story-elements/Text/index.js +16 -2153
- package/story-elements/Text/styles.arrow.css +1 -1
- package/story-elements/Video/index.js +12 -1725
- package/story-elements/Video/styles.arrow.css +1 -1
- package/story-templates/ListicleStoryTemplate/index.js +282 -3167
- package/story-templates/ListicleStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/LiveBlogStoryTemplate/index.js +504 -3389
- package/story-templates/LiveBlogStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/PhotoStoryTemplate/index.js +287 -3172
- package/story-templates/PhotoStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/TextStoryTemplate/index.js +416 -3301
- package/story-templates/TextStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/VideoStoryTemplate/index.js +382 -3267
- package/story-templates/VideoStoryTemplate/styles.arrow.css +1 -1
- package/atoms/ExtendedLoadMore/index-e7cde739.js +0 -3051
|
@@ -2,12 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _extends = require('@babel/runtime/helpers/extends');
|
|
6
|
+
var _getClassName = require('babel-plugin-react-css-modules/dist/browser/getClassName');
|
|
5
7
|
var components = require('@quintype/components');
|
|
6
8
|
var React = require('react');
|
|
7
9
|
var reactRedux = require('react-redux');
|
|
10
|
+
var lodash = require('lodash');
|
|
8
11
|
var PropTypes = require('prop-types');
|
|
12
|
+
var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator');
|
|
13
|
+
var _typeof = require('@babel/runtime/helpers/typeof');
|
|
14
|
+
var _regeneratorRuntime = require('@babel/runtime/regenerator');
|
|
9
15
|
var Timeago = require('react-timeago');
|
|
10
16
|
var dateFnsTz = require('date-fns-tz');
|
|
17
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
18
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
19
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
11
20
|
|
|
12
21
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
22
|
|
|
@@ -29,2628 +38,87 @@ function _interopNamespace(e) {
|
|
|
29
38
|
return Object.freeze(n);
|
|
30
39
|
}
|
|
31
40
|
|
|
41
|
+
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
|
|
42
|
+
var _getClassName__default = /*#__PURE__*/_interopDefaultLegacy(_getClassName);
|
|
32
43
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
33
44
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
45
|
+
var _asyncToGenerator__default = /*#__PURE__*/_interopDefaultLegacy(_asyncToGenerator);
|
|
46
|
+
var _typeof__default = /*#__PURE__*/_interopDefaultLegacy(_typeof);
|
|
47
|
+
var _regeneratorRuntime__default = /*#__PURE__*/_interopDefaultLegacy(_regeneratorRuntime);
|
|
34
48
|
var Timeago__default = /*#__PURE__*/_interopDefaultLegacy(Timeago);
|
|
49
|
+
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
50
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
51
|
+
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
35
52
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
for (var key in source) {
|
|
42
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
43
|
-
target[key] = source[key];
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return target;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
return _extends.apply(this, arguments);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
55
|
-
|
|
56
|
-
function getDefaultExportFromCjs (x) {
|
|
57
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
function createCommonjsModule(fn) {
|
|
61
|
-
var module = { exports: {} };
|
|
62
|
-
return fn(module, module.exports), module.exports;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
var optionsDefaults_1 = createCommonjsModule(function (module, exports) {
|
|
66
|
-
|
|
67
|
-
Object.defineProperty(exports, "__esModule", {
|
|
68
|
-
value: true
|
|
69
|
-
});
|
|
70
|
-
exports["default"] = void 0;
|
|
71
|
-
var optionsDefaults = {
|
|
72
|
-
attributeNames: {
|
|
73
|
-
styleName: 'className'
|
|
74
|
-
},
|
|
75
|
-
generateScopedName: '[path]___[name]__[local]___[hash:base64:5]',
|
|
76
|
-
handleMissingStyleName: 'throw'
|
|
77
|
-
};
|
|
78
|
-
var _default = optionsDefaults;
|
|
79
|
-
exports["default"] = _default;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
var getClassName = createCommonjsModule(function (module, exports) {
|
|
85
|
-
|
|
86
|
-
Object.defineProperty(exports, "__esModule", {
|
|
87
|
-
value: true
|
|
88
|
-
});
|
|
89
|
-
exports["default"] = void 0;
|
|
90
|
-
|
|
91
|
-
var _optionsDefaults = _interopRequireDefault(optionsDefaults_1);
|
|
92
|
-
|
|
93
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
94
|
-
|
|
95
|
-
var isNamespacedStyleName = function isNamespacedStyleName(styleName) {
|
|
96
|
-
return styleName.indexOf('.') !== -1;
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
var handleError = function handleError(message, handleMissingStyleName) {
|
|
100
|
-
if (handleMissingStyleName === 'throw') {
|
|
101
|
-
throw new Error(message);
|
|
102
|
-
} else if (handleMissingStyleName === 'warn') {
|
|
103
|
-
// eslint-disable-next-line no-console
|
|
104
|
-
console.warn(message);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
return null;
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
var getClassNameForNamespacedStyleName = function getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
|
|
111
|
-
// Note:
|
|
112
|
-
// Do not use the desctructing syntax with Babel.
|
|
113
|
-
// Desctructing adds _slicedToArray helper.
|
|
114
|
-
var styleNameParts = styleName.split('.');
|
|
115
|
-
var importName = styleNameParts[0];
|
|
116
|
-
var moduleName = styleNameParts[1];
|
|
117
|
-
var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
|
|
118
|
-
|
|
119
|
-
if (!moduleName) {
|
|
120
|
-
return handleError('Invalid style name: ' + styleName, handleMissingStyleName);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
if (!styleModuleImportMap[importName]) {
|
|
124
|
-
return handleError('CSS module import does not exist: ' + importName, handleMissingStyleName);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
if (!styleModuleImportMap[importName][moduleName]) {
|
|
128
|
-
return handleError('CSS module does not exist: ' + moduleName, handleMissingStyleName);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
return styleModuleImportMap[importName][moduleName];
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
var getClassNameFromMultipleImports = function getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
|
|
135
|
-
var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
|
|
136
|
-
var importKeysWithMatches = Object.keys(styleModuleImportMap).map(function (importKey) {
|
|
137
|
-
return styleModuleImportMap[importKey][styleName] && importKey;
|
|
138
|
-
}).filter(function (importKey) {
|
|
139
|
-
return importKey;
|
|
140
|
-
});
|
|
141
|
-
|
|
142
|
-
if (importKeysWithMatches.length > 1) {
|
|
143
|
-
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');
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
if (importKeysWithMatches.length === 0) {
|
|
147
|
-
return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
return styleModuleImportMap[importKeysWithMatches[0]][styleName];
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
var _default = function _default(styleNameValue, styleModuleImportMap, options) {
|
|
154
|
-
var styleModuleImportMapKeys = Object.keys(styleModuleImportMap);
|
|
155
|
-
|
|
156
|
-
var _ref = options || {},
|
|
157
|
-
_ref$handleMissingSty = _ref.handleMissingStyleName,
|
|
158
|
-
handleMissingStyleName = _ref$handleMissingSty === void 0 ? _optionsDefaults["default"].handleMissingStyleName : _ref$handleMissingSty,
|
|
159
|
-
_ref$autoResolveMulti = _ref.autoResolveMultipleImports,
|
|
160
|
-
autoResolveMultipleImports = _ref$autoResolveMulti === void 0 ? _optionsDefaults["default"].autoResolveMultipleImports : _ref$autoResolveMulti;
|
|
161
|
-
|
|
162
|
-
if (!styleNameValue) {
|
|
163
|
-
return '';
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
return styleNameValue.split(' ').filter(function (styleName) {
|
|
167
|
-
return styleName;
|
|
168
|
-
}).map(function (styleName) {
|
|
169
|
-
if (isNamespacedStyleName(styleName)) {
|
|
170
|
-
return getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleName);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
if (styleModuleImportMapKeys.length === 0) {
|
|
174
|
-
throw new Error('Cannot use styleName attribute for style name \'' + styleName + '\' without importing at least one stylesheet.');
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
if (styleModuleImportMapKeys.length > 1) {
|
|
178
|
-
if (!autoResolveMultipleImports) {
|
|
179
|
-
throw new Error('Cannot use anonymous style name \'' + styleName + '\' with more than one stylesheet import without setting \'autoResolveMultipleImports\' to true.');
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
return getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleName);
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
var styleModuleMap = styleModuleImportMap[styleModuleImportMapKeys[0]];
|
|
186
|
-
|
|
187
|
-
if (!styleModuleMap[styleName]) {
|
|
188
|
-
return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
return styleModuleMap[styleName];
|
|
192
|
-
}).filter(function (className) {
|
|
193
|
-
// Remove any styles which could not be found (if handleMissingStyleName === 'ignore')
|
|
194
|
-
return className;
|
|
195
|
-
}).join(' ');
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
exports["default"] = _default;
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
});
|
|
202
|
-
|
|
203
|
-
var _getClassName = /*@__PURE__*/getDefaultExportFromCjs(getClassName);
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* Checks if `value` is classified as an `Array` object.
|
|
207
|
-
*
|
|
208
|
-
* @static
|
|
209
|
-
* @memberOf _
|
|
210
|
-
* @since 0.1.0
|
|
211
|
-
* @category Lang
|
|
212
|
-
* @param {*} value The value to check.
|
|
213
|
-
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
214
|
-
* @example
|
|
215
|
-
*
|
|
216
|
-
* _.isArray([1, 2, 3]);
|
|
217
|
-
* // => true
|
|
218
|
-
*
|
|
219
|
-
* _.isArray(document.body.children);
|
|
220
|
-
* // => false
|
|
221
|
-
*
|
|
222
|
-
* _.isArray('abc');
|
|
223
|
-
* // => false
|
|
224
|
-
*
|
|
225
|
-
* _.isArray(_.noop);
|
|
226
|
-
* // => false
|
|
227
|
-
*/
|
|
228
|
-
var isArray = Array.isArray;
|
|
229
|
-
|
|
230
|
-
var isArray_1 = isArray;
|
|
231
|
-
|
|
232
|
-
/** Detect free variable `global` from Node.js. */
|
|
233
|
-
|
|
234
|
-
var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
235
|
-
|
|
236
|
-
var _freeGlobal = freeGlobal;
|
|
237
|
-
|
|
238
|
-
/** Detect free variable `self`. */
|
|
239
|
-
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
240
|
-
|
|
241
|
-
/** Used as a reference to the global object. */
|
|
242
|
-
var root = _freeGlobal || freeSelf || Function('return this')();
|
|
243
|
-
|
|
244
|
-
var _root = root;
|
|
245
|
-
|
|
246
|
-
/** Built-in value references. */
|
|
247
|
-
var Symbol$1 = _root.Symbol;
|
|
248
|
-
|
|
249
|
-
var _Symbol = Symbol$1;
|
|
250
|
-
|
|
251
|
-
/** Used for built-in method references. */
|
|
252
|
-
var objectProto$4 = Object.prototype;
|
|
253
|
-
|
|
254
|
-
/** Used to check objects for own properties. */
|
|
255
|
-
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
256
|
-
|
|
257
|
-
/**
|
|
258
|
-
* Used to resolve the
|
|
259
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
260
|
-
* of values.
|
|
261
|
-
*/
|
|
262
|
-
var nativeObjectToString$1 = objectProto$4.toString;
|
|
263
|
-
|
|
264
|
-
/** Built-in value references. */
|
|
265
|
-
var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
|
|
266
|
-
|
|
267
|
-
/**
|
|
268
|
-
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
269
|
-
*
|
|
270
|
-
* @private
|
|
271
|
-
* @param {*} value The value to query.
|
|
272
|
-
* @returns {string} Returns the raw `toStringTag`.
|
|
273
|
-
*/
|
|
274
|
-
function getRawTag(value) {
|
|
275
|
-
var isOwn = hasOwnProperty$3.call(value, symToStringTag$1),
|
|
276
|
-
tag = value[symToStringTag$1];
|
|
277
|
-
|
|
278
|
-
try {
|
|
279
|
-
value[symToStringTag$1] = undefined;
|
|
280
|
-
var unmasked = true;
|
|
281
|
-
} catch (e) {}
|
|
282
|
-
|
|
283
|
-
var result = nativeObjectToString$1.call(value);
|
|
284
|
-
if (unmasked) {
|
|
285
|
-
if (isOwn) {
|
|
286
|
-
value[symToStringTag$1] = tag;
|
|
287
|
-
} else {
|
|
288
|
-
delete value[symToStringTag$1];
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
return result;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
var _getRawTag = getRawTag;
|
|
295
|
-
|
|
296
|
-
/** Used for built-in method references. */
|
|
297
|
-
var objectProto$3 = Object.prototype;
|
|
298
|
-
|
|
299
|
-
/**
|
|
300
|
-
* Used to resolve the
|
|
301
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
302
|
-
* of values.
|
|
303
|
-
*/
|
|
304
|
-
var nativeObjectToString = objectProto$3.toString;
|
|
305
|
-
|
|
306
|
-
/**
|
|
307
|
-
* Converts `value` to a string using `Object.prototype.toString`.
|
|
308
|
-
*
|
|
309
|
-
* @private
|
|
310
|
-
* @param {*} value The value to convert.
|
|
311
|
-
* @returns {string} Returns the converted string.
|
|
312
|
-
*/
|
|
313
|
-
function objectToString(value) {
|
|
314
|
-
return nativeObjectToString.call(value);
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
var _objectToString = objectToString;
|
|
318
|
-
|
|
319
|
-
/** `Object#toString` result references. */
|
|
320
|
-
var nullTag = '[object Null]',
|
|
321
|
-
undefinedTag = '[object Undefined]';
|
|
322
|
-
|
|
323
|
-
/** Built-in value references. */
|
|
324
|
-
var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
|
|
325
|
-
|
|
326
|
-
/**
|
|
327
|
-
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
328
|
-
*
|
|
329
|
-
* @private
|
|
330
|
-
* @param {*} value The value to query.
|
|
331
|
-
* @returns {string} Returns the `toStringTag`.
|
|
332
|
-
*/
|
|
333
|
-
function baseGetTag(value) {
|
|
334
|
-
if (value == null) {
|
|
335
|
-
return value === undefined ? undefinedTag : nullTag;
|
|
336
|
-
}
|
|
337
|
-
return (symToStringTag && symToStringTag in Object(value))
|
|
338
|
-
? _getRawTag(value)
|
|
339
|
-
: _objectToString(value);
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
var _baseGetTag = baseGetTag;
|
|
343
|
-
|
|
344
|
-
/**
|
|
345
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
346
|
-
* and has a `typeof` result of "object".
|
|
347
|
-
*
|
|
348
|
-
* @static
|
|
349
|
-
* @memberOf _
|
|
350
|
-
* @since 4.0.0
|
|
351
|
-
* @category Lang
|
|
352
|
-
* @param {*} value The value to check.
|
|
353
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
354
|
-
* @example
|
|
355
|
-
*
|
|
356
|
-
* _.isObjectLike({});
|
|
357
|
-
* // => true
|
|
358
|
-
*
|
|
359
|
-
* _.isObjectLike([1, 2, 3]);
|
|
360
|
-
* // => true
|
|
361
|
-
*
|
|
362
|
-
* _.isObjectLike(_.noop);
|
|
363
|
-
* // => false
|
|
364
|
-
*
|
|
365
|
-
* _.isObjectLike(null);
|
|
366
|
-
* // => false
|
|
367
|
-
*/
|
|
368
|
-
function isObjectLike(value) {
|
|
369
|
-
return value != null && typeof value == 'object';
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
var isObjectLike_1 = isObjectLike;
|
|
373
|
-
|
|
374
|
-
/** `Object#toString` result references. */
|
|
375
|
-
var symbolTag = '[object Symbol]';
|
|
376
|
-
|
|
377
|
-
/**
|
|
378
|
-
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
379
|
-
*
|
|
380
|
-
* @static
|
|
381
|
-
* @memberOf _
|
|
382
|
-
* @since 4.0.0
|
|
383
|
-
* @category Lang
|
|
384
|
-
* @param {*} value The value to check.
|
|
385
|
-
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
386
|
-
* @example
|
|
387
|
-
*
|
|
388
|
-
* _.isSymbol(Symbol.iterator);
|
|
389
|
-
* // => true
|
|
390
|
-
*
|
|
391
|
-
* _.isSymbol('abc');
|
|
392
|
-
* // => false
|
|
393
|
-
*/
|
|
394
|
-
function isSymbol(value) {
|
|
395
|
-
return typeof value == 'symbol' ||
|
|
396
|
-
(isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
var isSymbol_1 = isSymbol;
|
|
400
|
-
|
|
401
|
-
/** Used to match property names within property paths. */
|
|
402
|
-
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
|
403
|
-
reIsPlainProp = /^\w*$/;
|
|
404
|
-
|
|
405
|
-
/**
|
|
406
|
-
* Checks if `value` is a property name and not a property path.
|
|
407
|
-
*
|
|
408
|
-
* @private
|
|
409
|
-
* @param {*} value The value to check.
|
|
410
|
-
* @param {Object} [object] The object to query keys on.
|
|
411
|
-
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
412
|
-
*/
|
|
413
|
-
function isKey(value, object) {
|
|
414
|
-
if (isArray_1(value)) {
|
|
415
|
-
return false;
|
|
416
|
-
}
|
|
417
|
-
var type = typeof value;
|
|
418
|
-
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
|
|
419
|
-
value == null || isSymbol_1(value)) {
|
|
420
|
-
return true;
|
|
421
|
-
}
|
|
422
|
-
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
|
423
|
-
(object != null && value in Object(object));
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
var _isKey = isKey;
|
|
427
|
-
|
|
428
|
-
/**
|
|
429
|
-
* Checks if `value` is the
|
|
430
|
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
431
|
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
432
|
-
*
|
|
433
|
-
* @static
|
|
434
|
-
* @memberOf _
|
|
435
|
-
* @since 0.1.0
|
|
436
|
-
* @category Lang
|
|
437
|
-
* @param {*} value The value to check.
|
|
438
|
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
439
|
-
* @example
|
|
440
|
-
*
|
|
441
|
-
* _.isObject({});
|
|
442
|
-
* // => true
|
|
443
|
-
*
|
|
444
|
-
* _.isObject([1, 2, 3]);
|
|
445
|
-
* // => true
|
|
446
|
-
*
|
|
447
|
-
* _.isObject(_.noop);
|
|
448
|
-
* // => true
|
|
449
|
-
*
|
|
450
|
-
* _.isObject(null);
|
|
451
|
-
* // => false
|
|
452
|
-
*/
|
|
453
|
-
function isObject(value) {
|
|
454
|
-
var type = typeof value;
|
|
455
|
-
return value != null && (type == 'object' || type == 'function');
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
var isObject_1 = isObject;
|
|
459
|
-
|
|
460
|
-
/** `Object#toString` result references. */
|
|
461
|
-
var asyncTag = '[object AsyncFunction]',
|
|
462
|
-
funcTag = '[object Function]',
|
|
463
|
-
genTag = '[object GeneratorFunction]',
|
|
464
|
-
proxyTag = '[object Proxy]';
|
|
465
|
-
|
|
466
|
-
/**
|
|
467
|
-
* Checks if `value` is classified as a `Function` object.
|
|
468
|
-
*
|
|
469
|
-
* @static
|
|
470
|
-
* @memberOf _
|
|
471
|
-
* @since 0.1.0
|
|
472
|
-
* @category Lang
|
|
473
|
-
* @param {*} value The value to check.
|
|
474
|
-
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
475
|
-
* @example
|
|
476
|
-
*
|
|
477
|
-
* _.isFunction(_);
|
|
478
|
-
* // => true
|
|
479
|
-
*
|
|
480
|
-
* _.isFunction(/abc/);
|
|
481
|
-
* // => false
|
|
482
|
-
*/
|
|
483
|
-
function isFunction(value) {
|
|
484
|
-
if (!isObject_1(value)) {
|
|
485
|
-
return false;
|
|
486
|
-
}
|
|
487
|
-
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
488
|
-
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
489
|
-
var tag = _baseGetTag(value);
|
|
490
|
-
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
var isFunction_1 = isFunction;
|
|
494
|
-
|
|
495
|
-
/** Used to detect overreaching core-js shims. */
|
|
496
|
-
var coreJsData = _root['__core-js_shared__'];
|
|
497
|
-
|
|
498
|
-
var _coreJsData = coreJsData;
|
|
499
|
-
|
|
500
|
-
/** Used to detect methods masquerading as native. */
|
|
501
|
-
var maskSrcKey = (function() {
|
|
502
|
-
var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
|
|
503
|
-
return uid ? ('Symbol(src)_1.' + uid) : '';
|
|
504
|
-
}());
|
|
505
|
-
|
|
506
|
-
/**
|
|
507
|
-
* Checks if `func` has its source masked.
|
|
508
|
-
*
|
|
509
|
-
* @private
|
|
510
|
-
* @param {Function} func The function to check.
|
|
511
|
-
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
512
|
-
*/
|
|
513
|
-
function isMasked(func) {
|
|
514
|
-
return !!maskSrcKey && (maskSrcKey in func);
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
var _isMasked = isMasked;
|
|
518
|
-
|
|
519
|
-
/** Used for built-in method references. */
|
|
520
|
-
var funcProto$1 = Function.prototype;
|
|
521
|
-
|
|
522
|
-
/** Used to resolve the decompiled source of functions. */
|
|
523
|
-
var funcToString$1 = funcProto$1.toString;
|
|
524
|
-
|
|
525
|
-
/**
|
|
526
|
-
* Converts `func` to its source code.
|
|
527
|
-
*
|
|
528
|
-
* @private
|
|
529
|
-
* @param {Function} func The function to convert.
|
|
530
|
-
* @returns {string} Returns the source code.
|
|
531
|
-
*/
|
|
532
|
-
function toSource(func) {
|
|
533
|
-
if (func != null) {
|
|
534
|
-
try {
|
|
535
|
-
return funcToString$1.call(func);
|
|
536
|
-
} catch (e) {}
|
|
537
|
-
try {
|
|
538
|
-
return (func + '');
|
|
539
|
-
} catch (e) {}
|
|
540
|
-
}
|
|
541
|
-
return '';
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
var _toSource = toSource;
|
|
545
|
-
|
|
546
|
-
/**
|
|
547
|
-
* Used to match `RegExp`
|
|
548
|
-
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
549
|
-
*/
|
|
550
|
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
551
|
-
|
|
552
|
-
/** Used to detect host constructors (Safari). */
|
|
553
|
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
554
|
-
|
|
555
|
-
/** Used for built-in method references. */
|
|
556
|
-
var funcProto = Function.prototype,
|
|
557
|
-
objectProto$2 = Object.prototype;
|
|
558
|
-
|
|
559
|
-
/** Used to resolve the decompiled source of functions. */
|
|
560
|
-
var funcToString = funcProto.toString;
|
|
561
|
-
|
|
562
|
-
/** Used to check objects for own properties. */
|
|
563
|
-
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
564
|
-
|
|
565
|
-
/** Used to detect if a method is native. */
|
|
566
|
-
var reIsNative = RegExp('^' +
|
|
567
|
-
funcToString.call(hasOwnProperty$2).replace(reRegExpChar, '\\$&')
|
|
568
|
-
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
569
|
-
);
|
|
570
|
-
|
|
571
|
-
/**
|
|
572
|
-
* The base implementation of `_.isNative` without bad shim checks.
|
|
573
|
-
*
|
|
574
|
-
* @private
|
|
575
|
-
* @param {*} value The value to check.
|
|
576
|
-
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
577
|
-
* else `false`.
|
|
578
|
-
*/
|
|
579
|
-
function baseIsNative(value) {
|
|
580
|
-
if (!isObject_1(value) || _isMasked(value)) {
|
|
581
|
-
return false;
|
|
582
|
-
}
|
|
583
|
-
var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
|
|
584
|
-
return pattern.test(_toSource(value));
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
var _baseIsNative = baseIsNative;
|
|
588
|
-
|
|
589
|
-
/**
|
|
590
|
-
* Gets the value at `key` of `object`.
|
|
591
|
-
*
|
|
592
|
-
* @private
|
|
593
|
-
* @param {Object} [object] The object to query.
|
|
594
|
-
* @param {string} key The key of the property to get.
|
|
595
|
-
* @returns {*} Returns the property value.
|
|
596
|
-
*/
|
|
597
|
-
function getValue(object, key) {
|
|
598
|
-
return object == null ? undefined : object[key];
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
var _getValue = getValue;
|
|
602
|
-
|
|
603
|
-
/**
|
|
604
|
-
* Gets the native function at `key` of `object`.
|
|
605
|
-
*
|
|
606
|
-
* @private
|
|
607
|
-
* @param {Object} object The object to query.
|
|
608
|
-
* @param {string} key The key of the method to get.
|
|
609
|
-
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
610
|
-
*/
|
|
611
|
-
function getNative(object, key) {
|
|
612
|
-
var value = _getValue(object, key);
|
|
613
|
-
return _baseIsNative(value) ? value : undefined;
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
var _getNative = getNative;
|
|
617
|
-
|
|
618
|
-
/* Built-in method references that are verified to be native. */
|
|
619
|
-
var nativeCreate = _getNative(Object, 'create');
|
|
620
|
-
|
|
621
|
-
var _nativeCreate = nativeCreate;
|
|
622
|
-
|
|
623
|
-
/**
|
|
624
|
-
* Removes all key-value entries from the hash.
|
|
625
|
-
*
|
|
626
|
-
* @private
|
|
627
|
-
* @name clear
|
|
628
|
-
* @memberOf Hash
|
|
629
|
-
*/
|
|
630
|
-
function hashClear() {
|
|
631
|
-
this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
|
|
632
|
-
this.size = 0;
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
var _hashClear = hashClear;
|
|
636
|
-
|
|
637
|
-
/**
|
|
638
|
-
* Removes `key` and its value from the hash.
|
|
639
|
-
*
|
|
640
|
-
* @private
|
|
641
|
-
* @name delete
|
|
642
|
-
* @memberOf Hash
|
|
643
|
-
* @param {Object} hash The hash to modify.
|
|
644
|
-
* @param {string} key The key of the value to remove.
|
|
645
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
646
|
-
*/
|
|
647
|
-
function hashDelete(key) {
|
|
648
|
-
var result = this.has(key) && delete this.__data__[key];
|
|
649
|
-
this.size -= result ? 1 : 0;
|
|
650
|
-
return result;
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
var _hashDelete = hashDelete;
|
|
654
|
-
|
|
655
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
656
|
-
var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
|
|
657
|
-
|
|
658
|
-
/** Used for built-in method references. */
|
|
659
|
-
var objectProto$1 = Object.prototype;
|
|
660
|
-
|
|
661
|
-
/** Used to check objects for own properties. */
|
|
662
|
-
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
663
|
-
|
|
664
|
-
/**
|
|
665
|
-
* Gets the hash value for `key`.
|
|
666
|
-
*
|
|
667
|
-
* @private
|
|
668
|
-
* @name get
|
|
669
|
-
* @memberOf Hash
|
|
670
|
-
* @param {string} key The key of the value to get.
|
|
671
|
-
* @returns {*} Returns the entry value.
|
|
672
|
-
*/
|
|
673
|
-
function hashGet(key) {
|
|
674
|
-
var data = this.__data__;
|
|
675
|
-
if (_nativeCreate) {
|
|
676
|
-
var result = data[key];
|
|
677
|
-
return result === HASH_UNDEFINED$1 ? undefined : result;
|
|
678
|
-
}
|
|
679
|
-
return hasOwnProperty$1.call(data, key) ? data[key] : undefined;
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
var _hashGet = hashGet;
|
|
683
|
-
|
|
684
|
-
/** Used for built-in method references. */
|
|
685
|
-
var objectProto = Object.prototype;
|
|
686
|
-
|
|
687
|
-
/** Used to check objects for own properties. */
|
|
688
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
689
|
-
|
|
690
|
-
/**
|
|
691
|
-
* Checks if a hash value for `key` exists.
|
|
692
|
-
*
|
|
693
|
-
* @private
|
|
694
|
-
* @name has
|
|
695
|
-
* @memberOf Hash
|
|
696
|
-
* @param {string} key The key of the entry to check.
|
|
697
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
698
|
-
*/
|
|
699
|
-
function hashHas(key) {
|
|
700
|
-
var data = this.__data__;
|
|
701
|
-
return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
var _hashHas = hashHas;
|
|
705
|
-
|
|
706
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
707
|
-
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
708
|
-
|
|
709
|
-
/**
|
|
710
|
-
* Sets the hash `key` to `value`.
|
|
711
|
-
*
|
|
712
|
-
* @private
|
|
713
|
-
* @name set
|
|
714
|
-
* @memberOf Hash
|
|
715
|
-
* @param {string} key The key of the value to set.
|
|
716
|
-
* @param {*} value The value to set.
|
|
717
|
-
* @returns {Object} Returns the hash instance.
|
|
718
|
-
*/
|
|
719
|
-
function hashSet(key, value) {
|
|
720
|
-
var data = this.__data__;
|
|
721
|
-
this.size += this.has(key) ? 0 : 1;
|
|
722
|
-
data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
|
723
|
-
return this;
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
var _hashSet = hashSet;
|
|
727
|
-
|
|
728
|
-
/**
|
|
729
|
-
* Creates a hash object.
|
|
730
|
-
*
|
|
731
|
-
* @private
|
|
732
|
-
* @constructor
|
|
733
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
734
|
-
*/
|
|
735
|
-
function Hash(entries) {
|
|
736
|
-
var index = -1,
|
|
737
|
-
length = entries == null ? 0 : entries.length;
|
|
738
|
-
|
|
739
|
-
this.clear();
|
|
740
|
-
while (++index < length) {
|
|
741
|
-
var entry = entries[index];
|
|
742
|
-
this.set(entry[0], entry[1]);
|
|
743
|
-
}
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
// Add methods to `Hash`.
|
|
747
|
-
Hash.prototype.clear = _hashClear;
|
|
748
|
-
Hash.prototype['delete'] = _hashDelete;
|
|
749
|
-
Hash.prototype.get = _hashGet;
|
|
750
|
-
Hash.prototype.has = _hashHas;
|
|
751
|
-
Hash.prototype.set = _hashSet;
|
|
752
|
-
|
|
753
|
-
var _Hash = Hash;
|
|
754
|
-
|
|
755
|
-
/**
|
|
756
|
-
* Removes all key-value entries from the list cache.
|
|
757
|
-
*
|
|
758
|
-
* @private
|
|
759
|
-
* @name clear
|
|
760
|
-
* @memberOf ListCache
|
|
761
|
-
*/
|
|
762
|
-
function listCacheClear() {
|
|
763
|
-
this.__data__ = [];
|
|
764
|
-
this.size = 0;
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
var _listCacheClear = listCacheClear;
|
|
768
|
-
|
|
769
|
-
/**
|
|
770
|
-
* Performs a
|
|
771
|
-
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
772
|
-
* comparison between two values to determine if they are equivalent.
|
|
773
|
-
*
|
|
774
|
-
* @static
|
|
775
|
-
* @memberOf _
|
|
776
|
-
* @since 4.0.0
|
|
777
|
-
* @category Lang
|
|
778
|
-
* @param {*} value The value to compare.
|
|
779
|
-
* @param {*} other The other value to compare.
|
|
780
|
-
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
781
|
-
* @example
|
|
782
|
-
*
|
|
783
|
-
* var object = { 'a': 1 };
|
|
784
|
-
* var other = { 'a': 1 };
|
|
785
|
-
*
|
|
786
|
-
* _.eq(object, object);
|
|
787
|
-
* // => true
|
|
788
|
-
*
|
|
789
|
-
* _.eq(object, other);
|
|
790
|
-
* // => false
|
|
791
|
-
*
|
|
792
|
-
* _.eq('a', 'a');
|
|
793
|
-
* // => true
|
|
794
|
-
*
|
|
795
|
-
* _.eq('a', Object('a'));
|
|
796
|
-
* // => false
|
|
797
|
-
*
|
|
798
|
-
* _.eq(NaN, NaN);
|
|
799
|
-
* // => true
|
|
800
|
-
*/
|
|
801
|
-
function eq(value, other) {
|
|
802
|
-
return value === other || (value !== value && other !== other);
|
|
803
|
-
}
|
|
804
|
-
|
|
805
|
-
var eq_1 = eq;
|
|
806
|
-
|
|
807
|
-
/**
|
|
808
|
-
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
809
|
-
*
|
|
810
|
-
* @private
|
|
811
|
-
* @param {Array} array The array to inspect.
|
|
812
|
-
* @param {*} key The key to search for.
|
|
813
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
814
|
-
*/
|
|
815
|
-
function assocIndexOf(array, key) {
|
|
816
|
-
var length = array.length;
|
|
817
|
-
while (length--) {
|
|
818
|
-
if (eq_1(array[length][0], key)) {
|
|
819
|
-
return length;
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
return -1;
|
|
823
|
-
}
|
|
824
|
-
|
|
825
|
-
var _assocIndexOf = assocIndexOf;
|
|
826
|
-
|
|
827
|
-
/** Used for built-in method references. */
|
|
828
|
-
var arrayProto = Array.prototype;
|
|
829
|
-
|
|
830
|
-
/** Built-in value references. */
|
|
831
|
-
var splice = arrayProto.splice;
|
|
832
|
-
|
|
833
|
-
/**
|
|
834
|
-
* Removes `key` and its value from the list cache.
|
|
835
|
-
*
|
|
836
|
-
* @private
|
|
837
|
-
* @name delete
|
|
838
|
-
* @memberOf ListCache
|
|
839
|
-
* @param {string} key The key of the value to remove.
|
|
840
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
841
|
-
*/
|
|
842
|
-
function listCacheDelete(key) {
|
|
843
|
-
var data = this.__data__,
|
|
844
|
-
index = _assocIndexOf(data, key);
|
|
845
|
-
|
|
846
|
-
if (index < 0) {
|
|
847
|
-
return false;
|
|
848
|
-
}
|
|
849
|
-
var lastIndex = data.length - 1;
|
|
850
|
-
if (index == lastIndex) {
|
|
851
|
-
data.pop();
|
|
852
|
-
} else {
|
|
853
|
-
splice.call(data, index, 1);
|
|
854
|
-
}
|
|
855
|
-
--this.size;
|
|
856
|
-
return true;
|
|
857
|
-
}
|
|
858
|
-
|
|
859
|
-
var _listCacheDelete = listCacheDelete;
|
|
860
|
-
|
|
861
|
-
/**
|
|
862
|
-
* Gets the list cache value for `key`.
|
|
863
|
-
*
|
|
864
|
-
* @private
|
|
865
|
-
* @name get
|
|
866
|
-
* @memberOf ListCache
|
|
867
|
-
* @param {string} key The key of the value to get.
|
|
868
|
-
* @returns {*} Returns the entry value.
|
|
869
|
-
*/
|
|
870
|
-
function listCacheGet(key) {
|
|
871
|
-
var data = this.__data__,
|
|
872
|
-
index = _assocIndexOf(data, key);
|
|
873
|
-
|
|
874
|
-
return index < 0 ? undefined : data[index][1];
|
|
875
|
-
}
|
|
876
|
-
|
|
877
|
-
var _listCacheGet = listCacheGet;
|
|
878
|
-
|
|
879
|
-
/**
|
|
880
|
-
* Checks if a list cache value for `key` exists.
|
|
881
|
-
*
|
|
882
|
-
* @private
|
|
883
|
-
* @name has
|
|
884
|
-
* @memberOf ListCache
|
|
885
|
-
* @param {string} key The key of the entry to check.
|
|
886
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
887
|
-
*/
|
|
888
|
-
function listCacheHas(key) {
|
|
889
|
-
return _assocIndexOf(this.__data__, key) > -1;
|
|
890
|
-
}
|
|
891
|
-
|
|
892
|
-
var _listCacheHas = listCacheHas;
|
|
893
|
-
|
|
894
|
-
/**
|
|
895
|
-
* Sets the list cache `key` to `value`.
|
|
896
|
-
*
|
|
897
|
-
* @private
|
|
898
|
-
* @name set
|
|
899
|
-
* @memberOf ListCache
|
|
900
|
-
* @param {string} key The key of the value to set.
|
|
901
|
-
* @param {*} value The value to set.
|
|
902
|
-
* @returns {Object} Returns the list cache instance.
|
|
903
|
-
*/
|
|
904
|
-
function listCacheSet(key, value) {
|
|
905
|
-
var data = this.__data__,
|
|
906
|
-
index = _assocIndexOf(data, key);
|
|
907
|
-
|
|
908
|
-
if (index < 0) {
|
|
909
|
-
++this.size;
|
|
910
|
-
data.push([key, value]);
|
|
911
|
-
} else {
|
|
912
|
-
data[index][1] = value;
|
|
913
|
-
}
|
|
914
|
-
return this;
|
|
915
|
-
}
|
|
916
|
-
|
|
917
|
-
var _listCacheSet = listCacheSet;
|
|
918
|
-
|
|
919
|
-
/**
|
|
920
|
-
* Creates an list cache object.
|
|
921
|
-
*
|
|
922
|
-
* @private
|
|
923
|
-
* @constructor
|
|
924
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
925
|
-
*/
|
|
926
|
-
function ListCache(entries) {
|
|
927
|
-
var index = -1,
|
|
928
|
-
length = entries == null ? 0 : entries.length;
|
|
929
|
-
|
|
930
|
-
this.clear();
|
|
931
|
-
while (++index < length) {
|
|
932
|
-
var entry = entries[index];
|
|
933
|
-
this.set(entry[0], entry[1]);
|
|
934
|
-
}
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
// Add methods to `ListCache`.
|
|
938
|
-
ListCache.prototype.clear = _listCacheClear;
|
|
939
|
-
ListCache.prototype['delete'] = _listCacheDelete;
|
|
940
|
-
ListCache.prototype.get = _listCacheGet;
|
|
941
|
-
ListCache.prototype.has = _listCacheHas;
|
|
942
|
-
ListCache.prototype.set = _listCacheSet;
|
|
943
|
-
|
|
944
|
-
var _ListCache = ListCache;
|
|
945
|
-
|
|
946
|
-
/* Built-in method references that are verified to be native. */
|
|
947
|
-
var Map = _getNative(_root, 'Map');
|
|
948
|
-
|
|
949
|
-
var _Map = Map;
|
|
950
|
-
|
|
951
|
-
/**
|
|
952
|
-
* Removes all key-value entries from the map.
|
|
953
|
-
*
|
|
954
|
-
* @private
|
|
955
|
-
* @name clear
|
|
956
|
-
* @memberOf MapCache
|
|
957
|
-
*/
|
|
958
|
-
function mapCacheClear() {
|
|
959
|
-
this.size = 0;
|
|
960
|
-
this.__data__ = {
|
|
961
|
-
'hash': new _Hash,
|
|
962
|
-
'map': new (_Map || _ListCache),
|
|
963
|
-
'string': new _Hash
|
|
964
|
-
};
|
|
965
|
-
}
|
|
966
|
-
|
|
967
|
-
var _mapCacheClear = mapCacheClear;
|
|
968
|
-
|
|
969
|
-
/**
|
|
970
|
-
* Checks if `value` is suitable for use as unique object key.
|
|
971
|
-
*
|
|
972
|
-
* @private
|
|
973
|
-
* @param {*} value The value to check.
|
|
974
|
-
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|
975
|
-
*/
|
|
976
|
-
function isKeyable(value) {
|
|
977
|
-
var type = typeof value;
|
|
978
|
-
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
|
979
|
-
? (value !== '__proto__')
|
|
980
|
-
: (value === null);
|
|
981
|
-
}
|
|
982
|
-
|
|
983
|
-
var _isKeyable = isKeyable;
|
|
984
|
-
|
|
985
|
-
/**
|
|
986
|
-
* Gets the data for `map`.
|
|
987
|
-
*
|
|
988
|
-
* @private
|
|
989
|
-
* @param {Object} map The map to query.
|
|
990
|
-
* @param {string} key The reference key.
|
|
991
|
-
* @returns {*} Returns the map data.
|
|
992
|
-
*/
|
|
993
|
-
function getMapData(map, key) {
|
|
994
|
-
var data = map.__data__;
|
|
995
|
-
return _isKeyable(key)
|
|
996
|
-
? data[typeof key == 'string' ? 'string' : 'hash']
|
|
997
|
-
: data.map;
|
|
998
|
-
}
|
|
999
|
-
|
|
1000
|
-
var _getMapData = getMapData;
|
|
1001
|
-
|
|
1002
|
-
/**
|
|
1003
|
-
* Removes `key` and its value from the map.
|
|
1004
|
-
*
|
|
1005
|
-
* @private
|
|
1006
|
-
* @name delete
|
|
1007
|
-
* @memberOf MapCache
|
|
1008
|
-
* @param {string} key The key of the value to remove.
|
|
1009
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1010
|
-
*/
|
|
1011
|
-
function mapCacheDelete(key) {
|
|
1012
|
-
var result = _getMapData(this, key)['delete'](key);
|
|
1013
|
-
this.size -= result ? 1 : 0;
|
|
1014
|
-
return result;
|
|
1015
|
-
}
|
|
1016
|
-
|
|
1017
|
-
var _mapCacheDelete = mapCacheDelete;
|
|
1018
|
-
|
|
1019
|
-
/**
|
|
1020
|
-
* Gets the map value for `key`.
|
|
1021
|
-
*
|
|
1022
|
-
* @private
|
|
1023
|
-
* @name get
|
|
1024
|
-
* @memberOf MapCache
|
|
1025
|
-
* @param {string} key The key of the value to get.
|
|
1026
|
-
* @returns {*} Returns the entry value.
|
|
1027
|
-
*/
|
|
1028
|
-
function mapCacheGet(key) {
|
|
1029
|
-
return _getMapData(this, key).get(key);
|
|
1030
|
-
}
|
|
1031
|
-
|
|
1032
|
-
var _mapCacheGet = mapCacheGet;
|
|
1033
|
-
|
|
1034
|
-
/**
|
|
1035
|
-
* Checks if a map value for `key` exists.
|
|
1036
|
-
*
|
|
1037
|
-
* @private
|
|
1038
|
-
* @name has
|
|
1039
|
-
* @memberOf MapCache
|
|
1040
|
-
* @param {string} key The key of the entry to check.
|
|
1041
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1042
|
-
*/
|
|
1043
|
-
function mapCacheHas(key) {
|
|
1044
|
-
return _getMapData(this, key).has(key);
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
|
-
var _mapCacheHas = mapCacheHas;
|
|
1048
|
-
|
|
1049
|
-
/**
|
|
1050
|
-
* Sets the map `key` to `value`.
|
|
1051
|
-
*
|
|
1052
|
-
* @private
|
|
1053
|
-
* @name set
|
|
1054
|
-
* @memberOf MapCache
|
|
1055
|
-
* @param {string} key The key of the value to set.
|
|
1056
|
-
* @param {*} value The value to set.
|
|
1057
|
-
* @returns {Object} Returns the map cache instance.
|
|
1058
|
-
*/
|
|
1059
|
-
function mapCacheSet(key, value) {
|
|
1060
|
-
var data = _getMapData(this, key),
|
|
1061
|
-
size = data.size;
|
|
1062
|
-
|
|
1063
|
-
data.set(key, value);
|
|
1064
|
-
this.size += data.size == size ? 0 : 1;
|
|
1065
|
-
return this;
|
|
1066
|
-
}
|
|
1067
|
-
|
|
1068
|
-
var _mapCacheSet = mapCacheSet;
|
|
1069
|
-
|
|
1070
|
-
/**
|
|
1071
|
-
* Creates a map cache object to store key-value pairs.
|
|
1072
|
-
*
|
|
1073
|
-
* @private
|
|
1074
|
-
* @constructor
|
|
1075
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
1076
|
-
*/
|
|
1077
|
-
function MapCache(entries) {
|
|
1078
|
-
var index = -1,
|
|
1079
|
-
length = entries == null ? 0 : entries.length;
|
|
1080
|
-
|
|
1081
|
-
this.clear();
|
|
1082
|
-
while (++index < length) {
|
|
1083
|
-
var entry = entries[index];
|
|
1084
|
-
this.set(entry[0], entry[1]);
|
|
1085
|
-
}
|
|
1086
|
-
}
|
|
1087
|
-
|
|
1088
|
-
// Add methods to `MapCache`.
|
|
1089
|
-
MapCache.prototype.clear = _mapCacheClear;
|
|
1090
|
-
MapCache.prototype['delete'] = _mapCacheDelete;
|
|
1091
|
-
MapCache.prototype.get = _mapCacheGet;
|
|
1092
|
-
MapCache.prototype.has = _mapCacheHas;
|
|
1093
|
-
MapCache.prototype.set = _mapCacheSet;
|
|
1094
|
-
|
|
1095
|
-
var _MapCache = MapCache;
|
|
1096
|
-
|
|
1097
|
-
/** Error message constants. */
|
|
1098
|
-
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
1099
|
-
|
|
1100
|
-
/**
|
|
1101
|
-
* Creates a function that memoizes the result of `func`. If `resolver` is
|
|
1102
|
-
* provided, it determines the cache key for storing the result based on the
|
|
1103
|
-
* arguments provided to the memoized function. By default, the first argument
|
|
1104
|
-
* provided to the memoized function is used as the map cache key. The `func`
|
|
1105
|
-
* is invoked with the `this` binding of the memoized function.
|
|
1106
|
-
*
|
|
1107
|
-
* **Note:** The cache is exposed as the `cache` property on the memoized
|
|
1108
|
-
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
|
1109
|
-
* constructor with one whose instances implement the
|
|
1110
|
-
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
|
1111
|
-
* method interface of `clear`, `delete`, `get`, `has`, and `set`.
|
|
1112
|
-
*
|
|
1113
|
-
* @static
|
|
1114
|
-
* @memberOf _
|
|
1115
|
-
* @since 0.1.0
|
|
1116
|
-
* @category Function
|
|
1117
|
-
* @param {Function} func The function to have its output memoized.
|
|
1118
|
-
* @param {Function} [resolver] The function to resolve the cache key.
|
|
1119
|
-
* @returns {Function} Returns the new memoized function.
|
|
1120
|
-
* @example
|
|
1121
|
-
*
|
|
1122
|
-
* var object = { 'a': 1, 'b': 2 };
|
|
1123
|
-
* var other = { 'c': 3, 'd': 4 };
|
|
1124
|
-
*
|
|
1125
|
-
* var values = _.memoize(_.values);
|
|
1126
|
-
* values(object);
|
|
1127
|
-
* // => [1, 2]
|
|
1128
|
-
*
|
|
1129
|
-
* values(other);
|
|
1130
|
-
* // => [3, 4]
|
|
1131
|
-
*
|
|
1132
|
-
* object.a = 2;
|
|
1133
|
-
* values(object);
|
|
1134
|
-
* // => [1, 2]
|
|
1135
|
-
*
|
|
1136
|
-
* // Modify the result cache.
|
|
1137
|
-
* values.cache.set(object, ['a', 'b']);
|
|
1138
|
-
* values(object);
|
|
1139
|
-
* // => ['a', 'b']
|
|
1140
|
-
*
|
|
1141
|
-
* // Replace `_.memoize.Cache`.
|
|
1142
|
-
* _.memoize.Cache = WeakMap;
|
|
1143
|
-
*/
|
|
1144
|
-
function memoize(func, resolver) {
|
|
1145
|
-
if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
|
|
1146
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
1147
|
-
}
|
|
1148
|
-
var memoized = function() {
|
|
1149
|
-
var args = arguments,
|
|
1150
|
-
key = resolver ? resolver.apply(this, args) : args[0],
|
|
1151
|
-
cache = memoized.cache;
|
|
1152
|
-
|
|
1153
|
-
if (cache.has(key)) {
|
|
1154
|
-
return cache.get(key);
|
|
1155
|
-
}
|
|
1156
|
-
var result = func.apply(this, args);
|
|
1157
|
-
memoized.cache = cache.set(key, result) || cache;
|
|
1158
|
-
return result;
|
|
1159
|
-
};
|
|
1160
|
-
memoized.cache = new (memoize.Cache || _MapCache);
|
|
1161
|
-
return memoized;
|
|
1162
|
-
}
|
|
1163
|
-
|
|
1164
|
-
// Expose `MapCache`.
|
|
1165
|
-
memoize.Cache = _MapCache;
|
|
1166
|
-
|
|
1167
|
-
var memoize_1 = memoize;
|
|
1168
|
-
|
|
1169
|
-
/** Used as the maximum memoize cache size. */
|
|
1170
|
-
var MAX_MEMOIZE_SIZE = 500;
|
|
1171
|
-
|
|
1172
|
-
/**
|
|
1173
|
-
* A specialized version of `_.memoize` which clears the memoized function's
|
|
1174
|
-
* cache when it exceeds `MAX_MEMOIZE_SIZE`.
|
|
1175
|
-
*
|
|
1176
|
-
* @private
|
|
1177
|
-
* @param {Function} func The function to have its output memoized.
|
|
1178
|
-
* @returns {Function} Returns the new memoized function.
|
|
1179
|
-
*/
|
|
1180
|
-
function memoizeCapped(func) {
|
|
1181
|
-
var result = memoize_1(func, function(key) {
|
|
1182
|
-
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
1183
|
-
cache.clear();
|
|
1184
|
-
}
|
|
1185
|
-
return key;
|
|
1186
|
-
});
|
|
1187
|
-
|
|
1188
|
-
var cache = result.cache;
|
|
1189
|
-
return result;
|
|
1190
|
-
}
|
|
1191
|
-
|
|
1192
|
-
var _memoizeCapped = memoizeCapped;
|
|
1193
|
-
|
|
1194
|
-
/** Used to match property names within property paths. */
|
|
1195
|
-
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
1196
|
-
|
|
1197
|
-
/** Used to match backslashes in property paths. */
|
|
1198
|
-
var reEscapeChar = /\\(\\)?/g;
|
|
1199
|
-
|
|
1200
|
-
/**
|
|
1201
|
-
* Converts `string` to a property path array.
|
|
1202
|
-
*
|
|
1203
|
-
* @private
|
|
1204
|
-
* @param {string} string The string to convert.
|
|
1205
|
-
* @returns {Array} Returns the property path array.
|
|
1206
|
-
*/
|
|
1207
|
-
var stringToPath = _memoizeCapped(function(string) {
|
|
1208
|
-
var result = [];
|
|
1209
|
-
if (string.charCodeAt(0) === 46 /* . */) {
|
|
1210
|
-
result.push('');
|
|
1211
|
-
}
|
|
1212
|
-
string.replace(rePropName, function(match, number, quote, subString) {
|
|
1213
|
-
result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
|
|
1214
|
-
});
|
|
1215
|
-
return result;
|
|
1216
|
-
});
|
|
1217
|
-
|
|
1218
|
-
var _stringToPath = stringToPath;
|
|
1219
|
-
|
|
1220
|
-
/**
|
|
1221
|
-
* A specialized version of `_.map` for arrays without support for iteratee
|
|
1222
|
-
* shorthands.
|
|
1223
|
-
*
|
|
1224
|
-
* @private
|
|
1225
|
-
* @param {Array} [array] The array to iterate over.
|
|
1226
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
1227
|
-
* @returns {Array} Returns the new mapped array.
|
|
1228
|
-
*/
|
|
1229
|
-
function arrayMap(array, iteratee) {
|
|
1230
|
-
var index = -1,
|
|
1231
|
-
length = array == null ? 0 : array.length,
|
|
1232
|
-
result = Array(length);
|
|
1233
|
-
|
|
1234
|
-
while (++index < length) {
|
|
1235
|
-
result[index] = iteratee(array[index], index, array);
|
|
1236
|
-
}
|
|
1237
|
-
return result;
|
|
1238
|
-
}
|
|
1239
|
-
|
|
1240
|
-
var _arrayMap = arrayMap;
|
|
1241
|
-
|
|
1242
|
-
/** Used as references for various `Number` constants. */
|
|
1243
|
-
var INFINITY$1 = 1 / 0;
|
|
1244
|
-
|
|
1245
|
-
/** Used to convert symbols to primitives and strings. */
|
|
1246
|
-
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
|
|
1247
|
-
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
1248
|
-
|
|
1249
|
-
/**
|
|
1250
|
-
* The base implementation of `_.toString` which doesn't convert nullish
|
|
1251
|
-
* values to empty strings.
|
|
1252
|
-
*
|
|
1253
|
-
* @private
|
|
1254
|
-
* @param {*} value The value to process.
|
|
1255
|
-
* @returns {string} Returns the string.
|
|
1256
|
-
*/
|
|
1257
|
-
function baseToString(value) {
|
|
1258
|
-
// Exit early for strings to avoid a performance hit in some environments.
|
|
1259
|
-
if (typeof value == 'string') {
|
|
1260
|
-
return value;
|
|
1261
|
-
}
|
|
1262
|
-
if (isArray_1(value)) {
|
|
1263
|
-
// Recursively convert values (susceptible to call stack limits).
|
|
1264
|
-
return _arrayMap(value, baseToString) + '';
|
|
1265
|
-
}
|
|
1266
|
-
if (isSymbol_1(value)) {
|
|
1267
|
-
return symbolToString ? symbolToString.call(value) : '';
|
|
1268
|
-
}
|
|
1269
|
-
var result = (value + '');
|
|
1270
|
-
return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
|
|
1271
|
-
}
|
|
1272
|
-
|
|
1273
|
-
var _baseToString = baseToString;
|
|
1274
|
-
|
|
1275
|
-
/**
|
|
1276
|
-
* Converts `value` to a string. An empty string is returned for `null`
|
|
1277
|
-
* and `undefined` values. The sign of `-0` is preserved.
|
|
1278
|
-
*
|
|
1279
|
-
* @static
|
|
1280
|
-
* @memberOf _
|
|
1281
|
-
* @since 4.0.0
|
|
1282
|
-
* @category Lang
|
|
1283
|
-
* @param {*} value The value to convert.
|
|
1284
|
-
* @returns {string} Returns the converted string.
|
|
1285
|
-
* @example
|
|
1286
|
-
*
|
|
1287
|
-
* _.toString(null);
|
|
1288
|
-
* // => ''
|
|
1289
|
-
*
|
|
1290
|
-
* _.toString(-0);
|
|
1291
|
-
* // => '-0'
|
|
1292
|
-
*
|
|
1293
|
-
* _.toString([1, 2, 3]);
|
|
1294
|
-
* // => '1,2,3'
|
|
1295
|
-
*/
|
|
1296
|
-
function toString(value) {
|
|
1297
|
-
return value == null ? '' : _baseToString(value);
|
|
1298
|
-
}
|
|
1299
|
-
|
|
1300
|
-
var toString_1 = toString;
|
|
1301
|
-
|
|
1302
|
-
/**
|
|
1303
|
-
* Casts `value` to a path array if it's not one.
|
|
1304
|
-
*
|
|
1305
|
-
* @private
|
|
1306
|
-
* @param {*} value The value to inspect.
|
|
1307
|
-
* @param {Object} [object] The object to query keys on.
|
|
1308
|
-
* @returns {Array} Returns the cast property path array.
|
|
1309
|
-
*/
|
|
1310
|
-
function castPath(value, object) {
|
|
1311
|
-
if (isArray_1(value)) {
|
|
1312
|
-
return value;
|
|
1313
|
-
}
|
|
1314
|
-
return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
|
|
1315
|
-
}
|
|
1316
|
-
|
|
1317
|
-
var _castPath = castPath;
|
|
1318
|
-
|
|
1319
|
-
/** Used as references for various `Number` constants. */
|
|
1320
|
-
var INFINITY = 1 / 0;
|
|
1321
|
-
|
|
1322
|
-
/**
|
|
1323
|
-
* Converts `value` to a string key if it's not a string or symbol.
|
|
1324
|
-
*
|
|
1325
|
-
* @private
|
|
1326
|
-
* @param {*} value The value to inspect.
|
|
1327
|
-
* @returns {string|symbol} Returns the key.
|
|
1328
|
-
*/
|
|
1329
|
-
function toKey(value) {
|
|
1330
|
-
if (typeof value == 'string' || isSymbol_1(value)) {
|
|
1331
|
-
return value;
|
|
1332
|
-
}
|
|
1333
|
-
var result = (value + '');
|
|
1334
|
-
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
|
1335
|
-
}
|
|
1336
|
-
|
|
1337
|
-
var _toKey = toKey;
|
|
1338
|
-
|
|
1339
|
-
/**
|
|
1340
|
-
* The base implementation of `_.get` without support for default values.
|
|
1341
|
-
*
|
|
1342
|
-
* @private
|
|
1343
|
-
* @param {Object} object The object to query.
|
|
1344
|
-
* @param {Array|string} path The path of the property to get.
|
|
1345
|
-
* @returns {*} Returns the resolved value.
|
|
1346
|
-
*/
|
|
1347
|
-
function baseGet(object, path) {
|
|
1348
|
-
path = _castPath(path, object);
|
|
1349
|
-
|
|
1350
|
-
var index = 0,
|
|
1351
|
-
length = path.length;
|
|
1352
|
-
|
|
1353
|
-
while (object != null && index < length) {
|
|
1354
|
-
object = object[_toKey(path[index++])];
|
|
1355
|
-
}
|
|
1356
|
-
return (index && index == length) ? object : undefined;
|
|
1357
|
-
}
|
|
1358
|
-
|
|
1359
|
-
var _baseGet = baseGet;
|
|
1360
|
-
|
|
1361
|
-
/**
|
|
1362
|
-
* Gets the value at `path` of `object`. If the resolved value is
|
|
1363
|
-
* `undefined`, the `defaultValue` is returned in its place.
|
|
1364
|
-
*
|
|
1365
|
-
* @static
|
|
1366
|
-
* @memberOf _
|
|
1367
|
-
* @since 3.7.0
|
|
1368
|
-
* @category Object
|
|
1369
|
-
* @param {Object} object The object to query.
|
|
1370
|
-
* @param {Array|string} path The path of the property to get.
|
|
1371
|
-
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
|
|
1372
|
-
* @returns {*} Returns the resolved value.
|
|
1373
|
-
* @example
|
|
1374
|
-
*
|
|
1375
|
-
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
|
|
1376
|
-
*
|
|
1377
|
-
* _.get(object, 'a[0].b.c');
|
|
1378
|
-
* // => 3
|
|
1379
|
-
*
|
|
1380
|
-
* _.get(object, ['a', '0', 'b', 'c']);
|
|
1381
|
-
* // => 3
|
|
1382
|
-
*
|
|
1383
|
-
* _.get(object, 'a.b.c', 'default');
|
|
1384
|
-
* // => 'default'
|
|
1385
|
-
*/
|
|
1386
|
-
function get(object, path, defaultValue) {
|
|
1387
|
-
var result = object == null ? undefined : _baseGet(object, path);
|
|
1388
|
-
return result === undefined ? defaultValue : result;
|
|
1389
|
-
}
|
|
1390
|
-
|
|
1391
|
-
var get_1 = get;
|
|
1392
|
-
|
|
1393
|
-
/**
|
|
1394
|
-
* A specialized version of `_.reduce` for arrays without support for
|
|
1395
|
-
* iteratee shorthands.
|
|
1396
|
-
*
|
|
1397
|
-
* @private
|
|
1398
|
-
* @param {Array} [array] The array to iterate over.
|
|
1399
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
1400
|
-
* @param {*} [accumulator] The initial value.
|
|
1401
|
-
* @param {boolean} [initAccum] Specify using the first element of `array` as
|
|
1402
|
-
* the initial value.
|
|
1403
|
-
* @returns {*} Returns the accumulated value.
|
|
1404
|
-
*/
|
|
1405
|
-
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
|
1406
|
-
var index = -1,
|
|
1407
|
-
length = array == null ? 0 : array.length;
|
|
1408
|
-
|
|
1409
|
-
if (initAccum && length) {
|
|
1410
|
-
accumulator = array[++index];
|
|
1411
|
-
}
|
|
1412
|
-
while (++index < length) {
|
|
1413
|
-
accumulator = iteratee(accumulator, array[index], index, array);
|
|
1414
|
-
}
|
|
1415
|
-
return accumulator;
|
|
1416
|
-
}
|
|
1417
|
-
|
|
1418
|
-
var _arrayReduce = arrayReduce;
|
|
1419
|
-
|
|
1420
|
-
/**
|
|
1421
|
-
* The base implementation of `_.propertyOf` without support for deep paths.
|
|
1422
|
-
*
|
|
1423
|
-
* @private
|
|
1424
|
-
* @param {Object} object The object to query.
|
|
1425
|
-
* @returns {Function} Returns the new accessor function.
|
|
1426
|
-
*/
|
|
1427
|
-
function basePropertyOf(object) {
|
|
1428
|
-
return function(key) {
|
|
1429
|
-
return object == null ? undefined : object[key];
|
|
1430
|
-
};
|
|
1431
|
-
}
|
|
1432
|
-
|
|
1433
|
-
var _basePropertyOf = basePropertyOf;
|
|
1434
|
-
|
|
1435
|
-
/** Used to map Latin Unicode letters to basic Latin letters. */
|
|
1436
|
-
var deburredLetters = {
|
|
1437
|
-
// Latin-1 Supplement block.
|
|
1438
|
-
'\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
|
|
1439
|
-
'\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
|
|
1440
|
-
'\xc7': 'C', '\xe7': 'c',
|
|
1441
|
-
'\xd0': 'D', '\xf0': 'd',
|
|
1442
|
-
'\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
|
|
1443
|
-
'\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
|
|
1444
|
-
'\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
|
|
1445
|
-
'\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
|
|
1446
|
-
'\xd1': 'N', '\xf1': 'n',
|
|
1447
|
-
'\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
|
|
1448
|
-
'\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
|
|
1449
|
-
'\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
|
|
1450
|
-
'\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
|
|
1451
|
-
'\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
|
|
1452
|
-
'\xc6': 'Ae', '\xe6': 'ae',
|
|
1453
|
-
'\xde': 'Th', '\xfe': 'th',
|
|
1454
|
-
'\xdf': 'ss',
|
|
1455
|
-
// Latin Extended-A block.
|
|
1456
|
-
'\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
|
|
1457
|
-
'\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
|
|
1458
|
-
'\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
|
|
1459
|
-
'\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
|
|
1460
|
-
'\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
|
|
1461
|
-
'\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
|
|
1462
|
-
'\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
|
|
1463
|
-
'\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
|
|
1464
|
-
'\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
|
|
1465
|
-
'\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
|
|
1466
|
-
'\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
|
|
1467
|
-
'\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
|
|
1468
|
-
'\u0134': 'J', '\u0135': 'j',
|
|
1469
|
-
'\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
|
|
1470
|
-
'\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
|
|
1471
|
-
'\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
|
|
1472
|
-
'\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
|
|
1473
|
-
'\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
|
|
1474
|
-
'\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
|
|
1475
|
-
'\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
|
|
1476
|
-
'\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
|
|
1477
|
-
'\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
|
|
1478
|
-
'\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
|
|
1479
|
-
'\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
|
|
1480
|
-
'\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
|
|
1481
|
-
'\u0163': 't', '\u0165': 't', '\u0167': 't',
|
|
1482
|
-
'\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
|
|
1483
|
-
'\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
|
|
1484
|
-
'\u0174': 'W', '\u0175': 'w',
|
|
1485
|
-
'\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
|
|
1486
|
-
'\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
|
|
1487
|
-
'\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
|
|
1488
|
-
'\u0132': 'IJ', '\u0133': 'ij',
|
|
1489
|
-
'\u0152': 'Oe', '\u0153': 'oe',
|
|
1490
|
-
'\u0149': "'n", '\u017f': 's'
|
|
1491
|
-
};
|
|
1492
|
-
|
|
1493
|
-
/**
|
|
1494
|
-
* Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
|
|
1495
|
-
* letters to basic Latin letters.
|
|
1496
|
-
*
|
|
1497
|
-
* @private
|
|
1498
|
-
* @param {string} letter The matched letter to deburr.
|
|
1499
|
-
* @returns {string} Returns the deburred letter.
|
|
1500
|
-
*/
|
|
1501
|
-
var deburrLetter = _basePropertyOf(deburredLetters);
|
|
1502
|
-
|
|
1503
|
-
var _deburrLetter = deburrLetter;
|
|
1504
|
-
|
|
1505
|
-
/** Used to match Latin Unicode letters (excluding mathematical operators). */
|
|
1506
|
-
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
|
|
1507
|
-
|
|
1508
|
-
/** Used to compose unicode character classes. */
|
|
1509
|
-
var rsComboMarksRange$3 = '\\u0300-\\u036f',
|
|
1510
|
-
reComboHalfMarksRange$3 = '\\ufe20-\\ufe2f',
|
|
1511
|
-
rsComboSymbolsRange$3 = '\\u20d0-\\u20ff',
|
|
1512
|
-
rsComboRange$3 = rsComboMarksRange$3 + reComboHalfMarksRange$3 + rsComboSymbolsRange$3;
|
|
1513
|
-
|
|
1514
|
-
/** Used to compose unicode capture groups. */
|
|
1515
|
-
var rsCombo$2 = '[' + rsComboRange$3 + ']';
|
|
1516
|
-
|
|
1517
|
-
/**
|
|
1518
|
-
* Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
|
|
1519
|
-
* [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
|
|
1520
|
-
*/
|
|
1521
|
-
var reComboMark = RegExp(rsCombo$2, 'g');
|
|
1522
|
-
|
|
1523
|
-
/**
|
|
1524
|
-
* Deburrs `string` by converting
|
|
1525
|
-
* [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
|
|
1526
|
-
* and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
|
|
1527
|
-
* letters to basic Latin letters and removing
|
|
1528
|
-
* [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
|
|
1529
|
-
*
|
|
1530
|
-
* @static
|
|
1531
|
-
* @memberOf _
|
|
1532
|
-
* @since 3.0.0
|
|
1533
|
-
* @category String
|
|
1534
|
-
* @param {string} [string=''] The string to deburr.
|
|
1535
|
-
* @returns {string} Returns the deburred string.
|
|
1536
|
-
* @example
|
|
1537
|
-
*
|
|
1538
|
-
* _.deburr('déjà vu');
|
|
1539
|
-
* // => 'deja vu'
|
|
1540
|
-
*/
|
|
1541
|
-
function deburr(string) {
|
|
1542
|
-
string = toString_1(string);
|
|
1543
|
-
return string && string.replace(reLatin, _deburrLetter).replace(reComboMark, '');
|
|
1544
|
-
}
|
|
1545
|
-
|
|
1546
|
-
var deburr_1 = deburr;
|
|
1547
|
-
|
|
1548
|
-
/** Used to match words composed of alphanumeric characters. */
|
|
1549
|
-
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
|
1550
|
-
|
|
1551
|
-
/**
|
|
1552
|
-
* Splits an ASCII `string` into an array of its words.
|
|
1553
|
-
*
|
|
1554
|
-
* @private
|
|
1555
|
-
* @param {string} The string to inspect.
|
|
1556
|
-
* @returns {Array} Returns the words of `string`.
|
|
1557
|
-
*/
|
|
1558
|
-
function asciiWords(string) {
|
|
1559
|
-
return string.match(reAsciiWord) || [];
|
|
1560
|
-
}
|
|
1561
|
-
|
|
1562
|
-
var _asciiWords = asciiWords;
|
|
1563
|
-
|
|
1564
|
-
/** Used to detect strings that need a more robust regexp to match words. */
|
|
1565
|
-
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 ]/;
|
|
1566
|
-
|
|
1567
|
-
/**
|
|
1568
|
-
* Checks if `string` contains a word composed of Unicode symbols.
|
|
1569
|
-
*
|
|
1570
|
-
* @private
|
|
1571
|
-
* @param {string} string The string to inspect.
|
|
1572
|
-
* @returns {boolean} Returns `true` if a word is found, else `false`.
|
|
1573
|
-
*/
|
|
1574
|
-
function hasUnicodeWord(string) {
|
|
1575
|
-
return reHasUnicodeWord.test(string);
|
|
1576
|
-
}
|
|
1577
|
-
|
|
1578
|
-
var _hasUnicodeWord = hasUnicodeWord;
|
|
1579
|
-
|
|
1580
|
-
/** Used to compose unicode character classes. */
|
|
1581
|
-
var rsAstralRange$2 = '\\ud800-\\udfff',
|
|
1582
|
-
rsComboMarksRange$2 = '\\u0300-\\u036f',
|
|
1583
|
-
reComboHalfMarksRange$2 = '\\ufe20-\\ufe2f',
|
|
1584
|
-
rsComboSymbolsRange$2 = '\\u20d0-\\u20ff',
|
|
1585
|
-
rsComboRange$2 = rsComboMarksRange$2 + reComboHalfMarksRange$2 + rsComboSymbolsRange$2,
|
|
1586
|
-
rsDingbatRange = '\\u2700-\\u27bf',
|
|
1587
|
-
rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
|
|
1588
|
-
rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
|
|
1589
|
-
rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
|
|
1590
|
-
rsPunctuationRange = '\\u2000-\\u206f',
|
|
1591
|
-
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',
|
|
1592
|
-
rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
|
|
1593
|
-
rsVarRange$2 = '\\ufe0e\\ufe0f',
|
|
1594
|
-
rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
|
|
1595
|
-
|
|
1596
|
-
/** Used to compose unicode capture groups. */
|
|
1597
|
-
var rsApos$1 = "['\u2019]",
|
|
1598
|
-
rsBreak = '[' + rsBreakRange + ']',
|
|
1599
|
-
rsCombo$1 = '[' + rsComboRange$2 + ']',
|
|
1600
|
-
rsDigits = '\\d+',
|
|
1601
|
-
rsDingbat = '[' + rsDingbatRange + ']',
|
|
1602
|
-
rsLower = '[' + rsLowerRange + ']',
|
|
1603
|
-
rsMisc = '[^' + rsAstralRange$2 + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
|
|
1604
|
-
rsFitz$1 = '\\ud83c[\\udffb-\\udfff]',
|
|
1605
|
-
rsModifier$1 = '(?:' + rsCombo$1 + '|' + rsFitz$1 + ')',
|
|
1606
|
-
rsNonAstral$1 = '[^' + rsAstralRange$2 + ']',
|
|
1607
|
-
rsRegional$1 = '(?:\\ud83c[\\udde6-\\uddff]){2}',
|
|
1608
|
-
rsSurrPair$1 = '[\\ud800-\\udbff][\\udc00-\\udfff]',
|
|
1609
|
-
rsUpper = '[' + rsUpperRange + ']',
|
|
1610
|
-
rsZWJ$2 = '\\u200d';
|
|
1611
|
-
|
|
1612
|
-
/** Used to compose unicode regexes. */
|
|
1613
|
-
var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
|
|
1614
|
-
rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
|
|
1615
|
-
rsOptContrLower = '(?:' + rsApos$1 + '(?:d|ll|m|re|s|t|ve))?',
|
|
1616
|
-
rsOptContrUpper = '(?:' + rsApos$1 + '(?:D|LL|M|RE|S|T|VE))?',
|
|
1617
|
-
reOptMod$1 = rsModifier$1 + '?',
|
|
1618
|
-
rsOptVar$1 = '[' + rsVarRange$2 + ']?',
|
|
1619
|
-
rsOptJoin$1 = '(?:' + rsZWJ$2 + '(?:' + [rsNonAstral$1, rsRegional$1, rsSurrPair$1].join('|') + ')' + rsOptVar$1 + reOptMod$1 + ')*',
|
|
1620
|
-
rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
|
|
1621
|
-
rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
|
|
1622
|
-
rsSeq$1 = rsOptVar$1 + reOptMod$1 + rsOptJoin$1,
|
|
1623
|
-
rsEmoji = '(?:' + [rsDingbat, rsRegional$1, rsSurrPair$1].join('|') + ')' + rsSeq$1;
|
|
1624
|
-
|
|
1625
|
-
/** Used to match complex or compound words. */
|
|
1626
|
-
var reUnicodeWord = RegExp([
|
|
1627
|
-
rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
|
|
1628
|
-
rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
|
|
1629
|
-
rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
|
|
1630
|
-
rsUpper + '+' + rsOptContrUpper,
|
|
1631
|
-
rsOrdUpper,
|
|
1632
|
-
rsOrdLower,
|
|
1633
|
-
rsDigits,
|
|
1634
|
-
rsEmoji
|
|
1635
|
-
].join('|'), 'g');
|
|
1636
|
-
|
|
1637
|
-
/**
|
|
1638
|
-
* Splits a Unicode `string` into an array of its words.
|
|
1639
|
-
*
|
|
1640
|
-
* @private
|
|
1641
|
-
* @param {string} The string to inspect.
|
|
1642
|
-
* @returns {Array} Returns the words of `string`.
|
|
1643
|
-
*/
|
|
1644
|
-
function unicodeWords(string) {
|
|
1645
|
-
return string.match(reUnicodeWord) || [];
|
|
1646
|
-
}
|
|
1647
|
-
|
|
1648
|
-
var _unicodeWords = unicodeWords;
|
|
1649
|
-
|
|
1650
|
-
/**
|
|
1651
|
-
* Splits `string` into an array of its words.
|
|
1652
|
-
*
|
|
1653
|
-
* @static
|
|
1654
|
-
* @memberOf _
|
|
1655
|
-
* @since 3.0.0
|
|
1656
|
-
* @category String
|
|
1657
|
-
* @param {string} [string=''] The string to inspect.
|
|
1658
|
-
* @param {RegExp|string} [pattern] The pattern to match words.
|
|
1659
|
-
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
1660
|
-
* @returns {Array} Returns the words of `string`.
|
|
1661
|
-
* @example
|
|
1662
|
-
*
|
|
1663
|
-
* _.words('fred, barney, & pebbles');
|
|
1664
|
-
* // => ['fred', 'barney', 'pebbles']
|
|
1665
|
-
*
|
|
1666
|
-
* _.words('fred, barney, & pebbles', /[^, ]+/g);
|
|
1667
|
-
* // => ['fred', 'barney', '&', 'pebbles']
|
|
1668
|
-
*/
|
|
1669
|
-
function words(string, pattern, guard) {
|
|
1670
|
-
string = toString_1(string);
|
|
1671
|
-
pattern = guard ? undefined : pattern;
|
|
1672
|
-
|
|
1673
|
-
if (pattern === undefined) {
|
|
1674
|
-
return _hasUnicodeWord(string) ? _unicodeWords(string) : _asciiWords(string);
|
|
1675
|
-
}
|
|
1676
|
-
return string.match(pattern) || [];
|
|
1677
|
-
}
|
|
1678
|
-
|
|
1679
|
-
var words_1 = words;
|
|
1680
|
-
|
|
1681
|
-
/** Used to compose unicode capture groups. */
|
|
1682
|
-
var rsApos = "['\u2019]";
|
|
1683
|
-
|
|
1684
|
-
/** Used to match apostrophes. */
|
|
1685
|
-
var reApos = RegExp(rsApos, 'g');
|
|
1686
|
-
|
|
1687
|
-
/**
|
|
1688
|
-
* Creates a function like `_.camelCase`.
|
|
1689
|
-
*
|
|
1690
|
-
* @private
|
|
1691
|
-
* @param {Function} callback The function to combine each word.
|
|
1692
|
-
* @returns {Function} Returns the new compounder function.
|
|
1693
|
-
*/
|
|
1694
|
-
function createCompounder(callback) {
|
|
1695
|
-
return function(string) {
|
|
1696
|
-
return _arrayReduce(words_1(deburr_1(string).replace(reApos, '')), callback, '');
|
|
1697
|
-
};
|
|
1698
|
-
}
|
|
1699
|
-
|
|
1700
|
-
var _createCompounder = createCompounder;
|
|
1701
|
-
|
|
1702
|
-
/**
|
|
1703
|
-
* Converts `string` to
|
|
1704
|
-
* [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
|
|
1705
|
-
*
|
|
1706
|
-
* @static
|
|
1707
|
-
* @memberOf _
|
|
1708
|
-
* @since 3.0.0
|
|
1709
|
-
* @category String
|
|
1710
|
-
* @param {string} [string=''] The string to convert.
|
|
1711
|
-
* @returns {string} Returns the kebab cased string.
|
|
1712
|
-
* @example
|
|
1713
|
-
*
|
|
1714
|
-
* _.kebabCase('Foo Bar');
|
|
1715
|
-
* // => 'foo-bar'
|
|
1716
|
-
*
|
|
1717
|
-
* _.kebabCase('fooBar');
|
|
1718
|
-
* // => 'foo-bar'
|
|
1719
|
-
*
|
|
1720
|
-
* _.kebabCase('__FOO_BAR__');
|
|
1721
|
-
* // => 'foo-bar'
|
|
1722
|
-
*/
|
|
1723
|
-
var kebabCase = _createCompounder(function(result, word, index) {
|
|
1724
|
-
return result + (index ? '-' : '') + word.toLowerCase();
|
|
1725
|
-
});
|
|
1726
|
-
|
|
1727
|
-
var kebabCase_1 = kebabCase;
|
|
1728
|
-
|
|
1729
|
-
var _styleModuleImportMap$A = {
|
|
1730
|
-
"./dot.m.css": {
|
|
1731
|
-
"dark": "dot-m_dark__1Njxl",
|
|
1732
|
-
"light": "dot-m_light__27IA3"
|
|
1733
|
-
}
|
|
1734
|
-
};
|
|
1735
|
-
var Dot = function Dot(_ref) {
|
|
1736
|
-
var _ref$width = _ref.width,
|
|
1737
|
-
width = _ref$width === void 0 ? "3px" : _ref$width,
|
|
1738
|
-
_ref$height = _ref.height,
|
|
1739
|
-
height = _ref$height === void 0 ? "3px" : _ref$height,
|
|
1740
|
-
_ref$color = _ref.color,
|
|
1741
|
-
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
1742
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1743
|
-
className: _getClassName(color, _styleModuleImportMap$A)
|
|
1744
|
-
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
1745
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1746
|
-
width: width,
|
|
1747
|
-
height: height,
|
|
1748
|
-
viewBox: "0 0 3 3"
|
|
1749
|
-
}, /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
1750
|
-
cx: "87",
|
|
1751
|
-
cy: "9",
|
|
1752
|
-
r: "1",
|
|
1753
|
-
fill: "inherit",
|
|
1754
|
-
fillRule: "nonzero",
|
|
1755
|
-
transform: "translate(-86 -8)"
|
|
1756
|
-
})));
|
|
1757
|
-
};
|
|
1758
|
-
Dot.propTypes = {
|
|
1759
|
-
/** height , width and color of the dot icon */
|
|
1760
|
-
color: PropTypes__default["default"].string,
|
|
1761
|
-
width: PropTypes__default["default"].string,
|
|
1762
|
-
height: PropTypes__default["default"].string
|
|
1763
|
-
};
|
|
1764
|
-
|
|
1765
|
-
var Twitter = function Twitter(_ref) {
|
|
1766
|
-
var _ref$color = _ref.color,
|
|
1767
|
-
color = _ref$color === void 0 ? "#1CB7EB" : _ref$color;
|
|
1768
|
-
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
1769
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1770
|
-
width: "24",
|
|
1771
|
-
height: "24",
|
|
1772
|
-
viewBox: "0 0 24 24"
|
|
1773
|
-
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
1774
|
-
fill: color,
|
|
1775
|
-
d: "M19.137 8.594c.023.094.035.246.035.457 0 1.687-.41 3.316-1.23 4.887-.844 1.664-2.028 2.988-3.551 3.972-1.664 1.102-3.575 1.652-5.73 1.652-2.063 0-3.95-.55-5.661-1.652.258.024.55.035.879.035 1.71 0 3.246-.527 4.605-1.582-.82 0-1.54-.24-2.162-.72a3.673 3.673 0 01-1.283-1.811c.234.023.457.035.668.035.328 0 .656-.035.984-.105a3.724 3.724 0 01-2.109-1.301 3.542 3.542 0 01-.844-2.32v-.07a3.493 3.493 0 001.653.492 4.097 4.097 0 01-1.196-1.336 3.557 3.557 0 01-.457-1.776c0-.644.176-1.26.528-1.845a10.188 10.188 0 003.357 2.742 10.222 10.222 0 004.236 1.125 5.122 5.122 0 01-.07-.844c0-.656.164-1.272.492-1.846a3.615 3.615 0 011.336-1.353 3.568 3.568 0 011.828-.492c.54 0 1.037.105 1.494.316.457.21.862.492 1.213.844a7.479 7.479 0 002.356-.88c-.281.868-.82 1.548-1.617 2.04A7.926 7.926 0 0021 6.66a8.132 8.132 0 01-1.863 1.934z"
|
|
1776
|
-
}));
|
|
1777
|
-
};
|
|
1778
|
-
Twitter.propTypes = {
|
|
1779
|
-
color: PropTypes__default["default"].string
|
|
1780
|
-
};
|
|
1781
|
-
|
|
1782
|
-
var StateContext = /*#__PURE__*/React.createContext(); // eslint-disable-next-line react/display-name
|
|
1783
|
-
|
|
1784
|
-
var StateProvider = function StateProvider(RowComponent) {
|
|
1785
|
-
return function (props) {
|
|
1786
|
-
return (
|
|
1787
|
-
/*#__PURE__*/
|
|
1788
|
-
// eslint-disable-next-line react/prop-types
|
|
1789
|
-
React__default["default"].createElement(StateContext.Provider, {
|
|
1790
|
-
value: props.config
|
|
1791
|
-
}, /*#__PURE__*/React__default["default"].createElement(RowComponent, props))
|
|
1792
|
-
);
|
|
1793
|
-
};
|
|
1794
|
-
};
|
|
1795
|
-
var useStateValue = function useStateValue() {
|
|
1796
|
-
return React.useContext(StateContext);
|
|
1797
|
-
};
|
|
1798
|
-
|
|
1799
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
1800
|
-
try {
|
|
1801
|
-
var info = gen[key](arg);
|
|
1802
|
-
var value = info.value;
|
|
1803
|
-
} catch (error) {
|
|
1804
|
-
reject(error);
|
|
1805
|
-
return;
|
|
1806
|
-
}
|
|
1807
|
-
|
|
1808
|
-
if (info.done) {
|
|
1809
|
-
resolve(value);
|
|
1810
|
-
} else {
|
|
1811
|
-
Promise.resolve(value).then(_next, _throw);
|
|
1812
|
-
}
|
|
1813
|
-
}
|
|
1814
|
-
|
|
1815
|
-
function _asyncToGenerator(fn) {
|
|
1816
|
-
return function () {
|
|
1817
|
-
var self = this,
|
|
1818
|
-
args = arguments;
|
|
1819
|
-
return new Promise(function (resolve, reject) {
|
|
1820
|
-
var gen = fn.apply(self, args);
|
|
1821
|
-
|
|
1822
|
-
function _next(value) {
|
|
1823
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
1824
|
-
}
|
|
1825
|
-
|
|
1826
|
-
function _throw(err) {
|
|
1827
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
1828
|
-
}
|
|
1829
|
-
|
|
1830
|
-
_next(undefined);
|
|
1831
|
-
});
|
|
1832
|
-
};
|
|
1833
|
-
}
|
|
1834
|
-
|
|
1835
|
-
function _typeof(obj) {
|
|
1836
|
-
"@babel/helpers - typeof";
|
|
1837
|
-
|
|
1838
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
1839
|
-
return typeof obj;
|
|
1840
|
-
} : function (obj) {
|
|
1841
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
1842
|
-
}, _typeof(obj);
|
|
1843
|
-
}
|
|
1844
|
-
|
|
1845
|
-
/**
|
|
1846
|
-
* Copyright (c) 2014-present, Facebook, Inc.
|
|
1847
|
-
*
|
|
1848
|
-
* This source code is licensed under the MIT license found in the
|
|
1849
|
-
* LICENSE file in the root directory of this source tree.
|
|
1850
|
-
*/
|
|
1851
|
-
|
|
1852
|
-
var runtime_1 = createCommonjsModule(function (module) {
|
|
1853
|
-
var runtime = (function (exports) {
|
|
1854
|
-
|
|
1855
|
-
var Op = Object.prototype;
|
|
1856
|
-
var hasOwn = Op.hasOwnProperty;
|
|
1857
|
-
var undefined$1; // More compressible than void 0.
|
|
1858
|
-
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
|
1859
|
-
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
1860
|
-
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
1861
|
-
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
1862
|
-
|
|
1863
|
-
function define(obj, key, value) {
|
|
1864
|
-
Object.defineProperty(obj, key, {
|
|
1865
|
-
value: value,
|
|
1866
|
-
enumerable: true,
|
|
1867
|
-
configurable: true,
|
|
1868
|
-
writable: true
|
|
1869
|
-
});
|
|
1870
|
-
return obj[key];
|
|
1871
|
-
}
|
|
1872
|
-
try {
|
|
1873
|
-
// IE 8 has a broken Object.defineProperty that only works on DOM objects.
|
|
1874
|
-
define({}, "");
|
|
1875
|
-
} catch (err) {
|
|
1876
|
-
define = function(obj, key, value) {
|
|
1877
|
-
return obj[key] = value;
|
|
1878
|
-
};
|
|
1879
|
-
}
|
|
1880
|
-
|
|
1881
|
-
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
1882
|
-
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
|
|
1883
|
-
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
|
|
1884
|
-
var generator = Object.create(protoGenerator.prototype);
|
|
1885
|
-
var context = new Context(tryLocsList || []);
|
|
1886
|
-
|
|
1887
|
-
// The ._invoke method unifies the implementations of the .next,
|
|
1888
|
-
// .throw, and .return methods.
|
|
1889
|
-
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
|
1890
|
-
|
|
1891
|
-
return generator;
|
|
1892
|
-
}
|
|
1893
|
-
exports.wrap = wrap;
|
|
1894
|
-
|
|
1895
|
-
// Try/catch helper to minimize deoptimizations. Returns a completion
|
|
1896
|
-
// record like context.tryEntries[i].completion. This interface could
|
|
1897
|
-
// have been (and was previously) designed to take a closure to be
|
|
1898
|
-
// invoked without arguments, but in all the cases we care about we
|
|
1899
|
-
// already have an existing method we want to call, so there's no need
|
|
1900
|
-
// to create a new function object. We can even get away with assuming
|
|
1901
|
-
// the method takes exactly one argument, since that happens to be true
|
|
1902
|
-
// in every case, so we don't have to touch the arguments object. The
|
|
1903
|
-
// only additional allocation required is the completion record, which
|
|
1904
|
-
// has a stable shape and so hopefully should be cheap to allocate.
|
|
1905
|
-
function tryCatch(fn, obj, arg) {
|
|
1906
|
-
try {
|
|
1907
|
-
return { type: "normal", arg: fn.call(obj, arg) };
|
|
1908
|
-
} catch (err) {
|
|
1909
|
-
return { type: "throw", arg: err };
|
|
1910
|
-
}
|
|
1911
|
-
}
|
|
1912
|
-
|
|
1913
|
-
var GenStateSuspendedStart = "suspendedStart";
|
|
1914
|
-
var GenStateSuspendedYield = "suspendedYield";
|
|
1915
|
-
var GenStateExecuting = "executing";
|
|
1916
|
-
var GenStateCompleted = "completed";
|
|
1917
|
-
|
|
1918
|
-
// Returning this object from the innerFn has the same effect as
|
|
1919
|
-
// breaking out of the dispatch switch statement.
|
|
1920
|
-
var ContinueSentinel = {};
|
|
1921
|
-
|
|
1922
|
-
// Dummy constructor functions that we use as the .constructor and
|
|
1923
|
-
// .constructor.prototype properties for functions that return Generator
|
|
1924
|
-
// objects. For full spec compliance, you may wish to configure your
|
|
1925
|
-
// minifier not to mangle the names of these two functions.
|
|
1926
|
-
function Generator() {}
|
|
1927
|
-
function GeneratorFunction() {}
|
|
1928
|
-
function GeneratorFunctionPrototype() {}
|
|
1929
|
-
|
|
1930
|
-
// This is a polyfill for %IteratorPrototype% for environments that
|
|
1931
|
-
// don't natively support it.
|
|
1932
|
-
var IteratorPrototype = {};
|
|
1933
|
-
define(IteratorPrototype, iteratorSymbol, function () {
|
|
1934
|
-
return this;
|
|
1935
|
-
});
|
|
1936
|
-
|
|
1937
|
-
var getProto = Object.getPrototypeOf;
|
|
1938
|
-
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
1939
|
-
if (NativeIteratorPrototype &&
|
|
1940
|
-
NativeIteratorPrototype !== Op &&
|
|
1941
|
-
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
|
1942
|
-
// This environment has a native %IteratorPrototype%; use it instead
|
|
1943
|
-
// of the polyfill.
|
|
1944
|
-
IteratorPrototype = NativeIteratorPrototype;
|
|
1945
|
-
}
|
|
1946
|
-
|
|
1947
|
-
var Gp = GeneratorFunctionPrototype.prototype =
|
|
1948
|
-
Generator.prototype = Object.create(IteratorPrototype);
|
|
1949
|
-
GeneratorFunction.prototype = GeneratorFunctionPrototype;
|
|
1950
|
-
define(Gp, "constructor", GeneratorFunctionPrototype);
|
|
1951
|
-
define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
|
|
1952
|
-
GeneratorFunction.displayName = define(
|
|
1953
|
-
GeneratorFunctionPrototype,
|
|
1954
|
-
toStringTagSymbol,
|
|
1955
|
-
"GeneratorFunction"
|
|
1956
|
-
);
|
|
1957
|
-
|
|
1958
|
-
// Helper for defining the .next, .throw, and .return methods of the
|
|
1959
|
-
// Iterator interface in terms of a single ._invoke method.
|
|
1960
|
-
function defineIteratorMethods(prototype) {
|
|
1961
|
-
["next", "throw", "return"].forEach(function(method) {
|
|
1962
|
-
define(prototype, method, function(arg) {
|
|
1963
|
-
return this._invoke(method, arg);
|
|
1964
|
-
});
|
|
1965
|
-
});
|
|
1966
|
-
}
|
|
1967
|
-
|
|
1968
|
-
exports.isGeneratorFunction = function(genFun) {
|
|
1969
|
-
var ctor = typeof genFun === "function" && genFun.constructor;
|
|
1970
|
-
return ctor
|
|
1971
|
-
? ctor === GeneratorFunction ||
|
|
1972
|
-
// For the native GeneratorFunction constructor, the best we can
|
|
1973
|
-
// do is to check its .name property.
|
|
1974
|
-
(ctor.displayName || ctor.name) === "GeneratorFunction"
|
|
1975
|
-
: false;
|
|
1976
|
-
};
|
|
1977
|
-
|
|
1978
|
-
exports.mark = function(genFun) {
|
|
1979
|
-
if (Object.setPrototypeOf) {
|
|
1980
|
-
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
|
1981
|
-
} else {
|
|
1982
|
-
genFun.__proto__ = GeneratorFunctionPrototype;
|
|
1983
|
-
define(genFun, toStringTagSymbol, "GeneratorFunction");
|
|
1984
|
-
}
|
|
1985
|
-
genFun.prototype = Object.create(Gp);
|
|
1986
|
-
return genFun;
|
|
1987
|
-
};
|
|
1988
|
-
|
|
1989
|
-
// Within the body of any async function, `await x` is transformed to
|
|
1990
|
-
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
|
1991
|
-
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
|
1992
|
-
// meant to be awaited.
|
|
1993
|
-
exports.awrap = function(arg) {
|
|
1994
|
-
return { __await: arg };
|
|
1995
|
-
};
|
|
1996
|
-
|
|
1997
|
-
function AsyncIterator(generator, PromiseImpl) {
|
|
1998
|
-
function invoke(method, arg, resolve, reject) {
|
|
1999
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
2000
|
-
if (record.type === "throw") {
|
|
2001
|
-
reject(record.arg);
|
|
2002
|
-
} else {
|
|
2003
|
-
var result = record.arg;
|
|
2004
|
-
var value = result.value;
|
|
2005
|
-
if (value &&
|
|
2006
|
-
typeof value === "object" &&
|
|
2007
|
-
hasOwn.call(value, "__await")) {
|
|
2008
|
-
return PromiseImpl.resolve(value.__await).then(function(value) {
|
|
2009
|
-
invoke("next", value, resolve, reject);
|
|
2010
|
-
}, function(err) {
|
|
2011
|
-
invoke("throw", err, resolve, reject);
|
|
2012
|
-
});
|
|
2013
|
-
}
|
|
2014
|
-
|
|
2015
|
-
return PromiseImpl.resolve(value).then(function(unwrapped) {
|
|
2016
|
-
// When a yielded Promise is resolved, its final value becomes
|
|
2017
|
-
// the .value of the Promise<{value,done}> result for the
|
|
2018
|
-
// current iteration.
|
|
2019
|
-
result.value = unwrapped;
|
|
2020
|
-
resolve(result);
|
|
2021
|
-
}, function(error) {
|
|
2022
|
-
// If a rejected Promise was yielded, throw the rejection back
|
|
2023
|
-
// into the async generator function so it can be handled there.
|
|
2024
|
-
return invoke("throw", error, resolve, reject);
|
|
2025
|
-
});
|
|
2026
|
-
}
|
|
2027
|
-
}
|
|
2028
|
-
|
|
2029
|
-
var previousPromise;
|
|
2030
|
-
|
|
2031
|
-
function enqueue(method, arg) {
|
|
2032
|
-
function callInvokeWithMethodAndArg() {
|
|
2033
|
-
return new PromiseImpl(function(resolve, reject) {
|
|
2034
|
-
invoke(method, arg, resolve, reject);
|
|
2035
|
-
});
|
|
2036
|
-
}
|
|
2037
|
-
|
|
2038
|
-
return previousPromise =
|
|
2039
|
-
// If enqueue has been called before, then we want to wait until
|
|
2040
|
-
// all previous Promises have been resolved before calling invoke,
|
|
2041
|
-
// so that results are always delivered in the correct order. If
|
|
2042
|
-
// enqueue has not been called before, then it is important to
|
|
2043
|
-
// call invoke immediately, without waiting on a callback to fire,
|
|
2044
|
-
// so that the async generator function has the opportunity to do
|
|
2045
|
-
// any necessary setup in a predictable way. This predictability
|
|
2046
|
-
// is why the Promise constructor synchronously invokes its
|
|
2047
|
-
// executor callback, and why async functions synchronously
|
|
2048
|
-
// execute code before the first await. Since we implement simple
|
|
2049
|
-
// async functions in terms of async generators, it is especially
|
|
2050
|
-
// important to get this right, even though it requires care.
|
|
2051
|
-
previousPromise ? previousPromise.then(
|
|
2052
|
-
callInvokeWithMethodAndArg,
|
|
2053
|
-
// Avoid propagating failures to Promises returned by later
|
|
2054
|
-
// invocations of the iterator.
|
|
2055
|
-
callInvokeWithMethodAndArg
|
|
2056
|
-
) : callInvokeWithMethodAndArg();
|
|
2057
|
-
}
|
|
2058
|
-
|
|
2059
|
-
// Define the unified helper method that is used to implement .next,
|
|
2060
|
-
// .throw, and .return (see defineIteratorMethods).
|
|
2061
|
-
this._invoke = enqueue;
|
|
2062
|
-
}
|
|
2063
|
-
|
|
2064
|
-
defineIteratorMethods(AsyncIterator.prototype);
|
|
2065
|
-
define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
2066
|
-
return this;
|
|
2067
|
-
});
|
|
2068
|
-
exports.AsyncIterator = AsyncIterator;
|
|
2069
|
-
|
|
2070
|
-
// Note that simple async functions are implemented on top of
|
|
2071
|
-
// AsyncIterator objects; they just return a Promise for the value of
|
|
2072
|
-
// the final result produced by the iterator.
|
|
2073
|
-
exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
2074
|
-
if (PromiseImpl === void 0) PromiseImpl = Promise;
|
|
2075
|
-
|
|
2076
|
-
var iter = new AsyncIterator(
|
|
2077
|
-
wrap(innerFn, outerFn, self, tryLocsList),
|
|
2078
|
-
PromiseImpl
|
|
2079
|
-
);
|
|
2080
|
-
|
|
2081
|
-
return exports.isGeneratorFunction(outerFn)
|
|
2082
|
-
? iter // If outerFn is a generator, return the full iterator.
|
|
2083
|
-
: iter.next().then(function(result) {
|
|
2084
|
-
return result.done ? result.value : iter.next();
|
|
2085
|
-
});
|
|
2086
|
-
};
|
|
2087
|
-
|
|
2088
|
-
function makeInvokeMethod(innerFn, self, context) {
|
|
2089
|
-
var state = GenStateSuspendedStart;
|
|
2090
|
-
|
|
2091
|
-
return function invoke(method, arg) {
|
|
2092
|
-
if (state === GenStateExecuting) {
|
|
2093
|
-
throw new Error("Generator is already running");
|
|
2094
|
-
}
|
|
2095
|
-
|
|
2096
|
-
if (state === GenStateCompleted) {
|
|
2097
|
-
if (method === "throw") {
|
|
2098
|
-
throw arg;
|
|
2099
|
-
}
|
|
2100
|
-
|
|
2101
|
-
// Be forgiving, per 25.3.3.3.3 of the spec:
|
|
2102
|
-
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
|
2103
|
-
return doneResult();
|
|
2104
|
-
}
|
|
2105
|
-
|
|
2106
|
-
context.method = method;
|
|
2107
|
-
context.arg = arg;
|
|
2108
|
-
|
|
2109
|
-
while (true) {
|
|
2110
|
-
var delegate = context.delegate;
|
|
2111
|
-
if (delegate) {
|
|
2112
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
2113
|
-
if (delegateResult) {
|
|
2114
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
2115
|
-
return delegateResult;
|
|
2116
|
-
}
|
|
2117
|
-
}
|
|
2118
|
-
|
|
2119
|
-
if (context.method === "next") {
|
|
2120
|
-
// Setting context._sent for legacy support of Babel's
|
|
2121
|
-
// function.sent implementation.
|
|
2122
|
-
context.sent = context._sent = context.arg;
|
|
2123
|
-
|
|
2124
|
-
} else if (context.method === "throw") {
|
|
2125
|
-
if (state === GenStateSuspendedStart) {
|
|
2126
|
-
state = GenStateCompleted;
|
|
2127
|
-
throw context.arg;
|
|
2128
|
-
}
|
|
2129
|
-
|
|
2130
|
-
context.dispatchException(context.arg);
|
|
2131
|
-
|
|
2132
|
-
} else if (context.method === "return") {
|
|
2133
|
-
context.abrupt("return", context.arg);
|
|
2134
|
-
}
|
|
2135
|
-
|
|
2136
|
-
state = GenStateExecuting;
|
|
2137
|
-
|
|
2138
|
-
var record = tryCatch(innerFn, self, context);
|
|
2139
|
-
if (record.type === "normal") {
|
|
2140
|
-
// If an exception is thrown from innerFn, we leave state ===
|
|
2141
|
-
// GenStateExecuting and loop back for another invocation.
|
|
2142
|
-
state = context.done
|
|
2143
|
-
? GenStateCompleted
|
|
2144
|
-
: GenStateSuspendedYield;
|
|
2145
|
-
|
|
2146
|
-
if (record.arg === ContinueSentinel) {
|
|
2147
|
-
continue;
|
|
2148
|
-
}
|
|
2149
|
-
|
|
2150
|
-
return {
|
|
2151
|
-
value: record.arg,
|
|
2152
|
-
done: context.done
|
|
2153
|
-
};
|
|
2154
|
-
|
|
2155
|
-
} else if (record.type === "throw") {
|
|
2156
|
-
state = GenStateCompleted;
|
|
2157
|
-
// Dispatch the exception by looping back around to the
|
|
2158
|
-
// context.dispatchException(context.arg) call above.
|
|
2159
|
-
context.method = "throw";
|
|
2160
|
-
context.arg = record.arg;
|
|
2161
|
-
}
|
|
2162
|
-
}
|
|
2163
|
-
};
|
|
2164
|
-
}
|
|
2165
|
-
|
|
2166
|
-
// Call delegate.iterator[context.method](context.arg) and handle the
|
|
2167
|
-
// result, either by returning a { value, done } result from the
|
|
2168
|
-
// delegate iterator, or by modifying context.method and context.arg,
|
|
2169
|
-
// setting context.delegate to null, and returning the ContinueSentinel.
|
|
2170
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
2171
|
-
var method = delegate.iterator[context.method];
|
|
2172
|
-
if (method === undefined$1) {
|
|
2173
|
-
// A .throw or .return when the delegate iterator has no .throw
|
|
2174
|
-
// method always terminates the yield* loop.
|
|
2175
|
-
context.delegate = null;
|
|
2176
|
-
|
|
2177
|
-
if (context.method === "throw") {
|
|
2178
|
-
// Note: ["return"] must be used for ES3 parsing compatibility.
|
|
2179
|
-
if (delegate.iterator["return"]) {
|
|
2180
|
-
// If the delegate iterator has a return method, give it a
|
|
2181
|
-
// chance to clean up.
|
|
2182
|
-
context.method = "return";
|
|
2183
|
-
context.arg = undefined$1;
|
|
2184
|
-
maybeInvokeDelegate(delegate, context);
|
|
2185
|
-
|
|
2186
|
-
if (context.method === "throw") {
|
|
2187
|
-
// If maybeInvokeDelegate(context) changed context.method from
|
|
2188
|
-
// "return" to "throw", let that override the TypeError below.
|
|
2189
|
-
return ContinueSentinel;
|
|
2190
|
-
}
|
|
2191
|
-
}
|
|
2192
|
-
|
|
2193
|
-
context.method = "throw";
|
|
2194
|
-
context.arg = new TypeError(
|
|
2195
|
-
"The iterator does not provide a 'throw' method");
|
|
2196
|
-
}
|
|
2197
|
-
|
|
2198
|
-
return ContinueSentinel;
|
|
2199
|
-
}
|
|
2200
|
-
|
|
2201
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
2202
|
-
|
|
2203
|
-
if (record.type === "throw") {
|
|
2204
|
-
context.method = "throw";
|
|
2205
|
-
context.arg = record.arg;
|
|
2206
|
-
context.delegate = null;
|
|
2207
|
-
return ContinueSentinel;
|
|
2208
|
-
}
|
|
2209
|
-
|
|
2210
|
-
var info = record.arg;
|
|
2211
|
-
|
|
2212
|
-
if (! info) {
|
|
2213
|
-
context.method = "throw";
|
|
2214
|
-
context.arg = new TypeError("iterator result is not an object");
|
|
2215
|
-
context.delegate = null;
|
|
2216
|
-
return ContinueSentinel;
|
|
2217
|
-
}
|
|
2218
|
-
|
|
2219
|
-
if (info.done) {
|
|
2220
|
-
// Assign the result of the finished delegate to the temporary
|
|
2221
|
-
// variable specified by delegate.resultName (see delegateYield).
|
|
2222
|
-
context[delegate.resultName] = info.value;
|
|
2223
|
-
|
|
2224
|
-
// Resume execution at the desired location (see delegateYield).
|
|
2225
|
-
context.next = delegate.nextLoc;
|
|
2226
|
-
|
|
2227
|
-
// If context.method was "throw" but the delegate handled the
|
|
2228
|
-
// exception, let the outer generator proceed normally. If
|
|
2229
|
-
// context.method was "next", forget context.arg since it has been
|
|
2230
|
-
// "consumed" by the delegate iterator. If context.method was
|
|
2231
|
-
// "return", allow the original .return call to continue in the
|
|
2232
|
-
// outer generator.
|
|
2233
|
-
if (context.method !== "return") {
|
|
2234
|
-
context.method = "next";
|
|
2235
|
-
context.arg = undefined$1;
|
|
2236
|
-
}
|
|
2237
|
-
|
|
2238
|
-
} else {
|
|
2239
|
-
// Re-yield the result returned by the delegate method.
|
|
2240
|
-
return info;
|
|
2241
|
-
}
|
|
2242
|
-
|
|
2243
|
-
// The delegate iterator is finished, so forget it and continue with
|
|
2244
|
-
// the outer generator.
|
|
2245
|
-
context.delegate = null;
|
|
2246
|
-
return ContinueSentinel;
|
|
2247
|
-
}
|
|
2248
|
-
|
|
2249
|
-
// Define Generator.prototype.{next,throw,return} in terms of the
|
|
2250
|
-
// unified ._invoke helper method.
|
|
2251
|
-
defineIteratorMethods(Gp);
|
|
2252
|
-
|
|
2253
|
-
define(Gp, toStringTagSymbol, "Generator");
|
|
2254
|
-
|
|
2255
|
-
// A Generator should always return itself as the iterator object when the
|
|
2256
|
-
// @@iterator function is called on it. Some browsers' implementations of the
|
|
2257
|
-
// iterator prototype chain incorrectly implement this, causing the Generator
|
|
2258
|
-
// object to not be returned from this call. This ensures that doesn't happen.
|
|
2259
|
-
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
2260
|
-
define(Gp, iteratorSymbol, function() {
|
|
2261
|
-
return this;
|
|
2262
|
-
});
|
|
2263
|
-
|
|
2264
|
-
define(Gp, "toString", function() {
|
|
2265
|
-
return "[object Generator]";
|
|
2266
|
-
});
|
|
2267
|
-
|
|
2268
|
-
function pushTryEntry(locs) {
|
|
2269
|
-
var entry = { tryLoc: locs[0] };
|
|
2270
|
-
|
|
2271
|
-
if (1 in locs) {
|
|
2272
|
-
entry.catchLoc = locs[1];
|
|
2273
|
-
}
|
|
2274
|
-
|
|
2275
|
-
if (2 in locs) {
|
|
2276
|
-
entry.finallyLoc = locs[2];
|
|
2277
|
-
entry.afterLoc = locs[3];
|
|
2278
|
-
}
|
|
2279
|
-
|
|
2280
|
-
this.tryEntries.push(entry);
|
|
2281
|
-
}
|
|
2282
|
-
|
|
2283
|
-
function resetTryEntry(entry) {
|
|
2284
|
-
var record = entry.completion || {};
|
|
2285
|
-
record.type = "normal";
|
|
2286
|
-
delete record.arg;
|
|
2287
|
-
entry.completion = record;
|
|
2288
|
-
}
|
|
2289
|
-
|
|
2290
|
-
function Context(tryLocsList) {
|
|
2291
|
-
// The root entry object (effectively a try statement without a catch
|
|
2292
|
-
// or a finally block) gives us a place to store values thrown from
|
|
2293
|
-
// locations where there is no enclosing try statement.
|
|
2294
|
-
this.tryEntries = [{ tryLoc: "root" }];
|
|
2295
|
-
tryLocsList.forEach(pushTryEntry, this);
|
|
2296
|
-
this.reset(true);
|
|
2297
|
-
}
|
|
2298
|
-
|
|
2299
|
-
exports.keys = function(object) {
|
|
2300
|
-
var keys = [];
|
|
2301
|
-
for (var key in object) {
|
|
2302
|
-
keys.push(key);
|
|
2303
|
-
}
|
|
2304
|
-
keys.reverse();
|
|
2305
|
-
|
|
2306
|
-
// Rather than returning an object with a next method, we keep
|
|
2307
|
-
// things simple and return the next function itself.
|
|
2308
|
-
return function next() {
|
|
2309
|
-
while (keys.length) {
|
|
2310
|
-
var key = keys.pop();
|
|
2311
|
-
if (key in object) {
|
|
2312
|
-
next.value = key;
|
|
2313
|
-
next.done = false;
|
|
2314
|
-
return next;
|
|
2315
|
-
}
|
|
2316
|
-
}
|
|
2317
|
-
|
|
2318
|
-
// To avoid creating an additional object, we just hang the .value
|
|
2319
|
-
// and .done properties off the next function object itself. This
|
|
2320
|
-
// also ensures that the minifier will not anonymize the function.
|
|
2321
|
-
next.done = true;
|
|
2322
|
-
return next;
|
|
2323
|
-
};
|
|
2324
|
-
};
|
|
2325
|
-
|
|
2326
|
-
function values(iterable) {
|
|
2327
|
-
if (iterable) {
|
|
2328
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
2329
|
-
if (iteratorMethod) {
|
|
2330
|
-
return iteratorMethod.call(iterable);
|
|
2331
|
-
}
|
|
2332
|
-
|
|
2333
|
-
if (typeof iterable.next === "function") {
|
|
2334
|
-
return iterable;
|
|
2335
|
-
}
|
|
2336
|
-
|
|
2337
|
-
if (!isNaN(iterable.length)) {
|
|
2338
|
-
var i = -1, next = function next() {
|
|
2339
|
-
while (++i < iterable.length) {
|
|
2340
|
-
if (hasOwn.call(iterable, i)) {
|
|
2341
|
-
next.value = iterable[i];
|
|
2342
|
-
next.done = false;
|
|
2343
|
-
return next;
|
|
2344
|
-
}
|
|
2345
|
-
}
|
|
2346
|
-
|
|
2347
|
-
next.value = undefined$1;
|
|
2348
|
-
next.done = true;
|
|
2349
|
-
|
|
2350
|
-
return next;
|
|
2351
|
-
};
|
|
2352
|
-
|
|
2353
|
-
return next.next = next;
|
|
2354
|
-
}
|
|
2355
|
-
}
|
|
2356
|
-
|
|
2357
|
-
// Return an iterator with no values.
|
|
2358
|
-
return { next: doneResult };
|
|
2359
|
-
}
|
|
2360
|
-
exports.values = values;
|
|
2361
|
-
|
|
2362
|
-
function doneResult() {
|
|
2363
|
-
return { value: undefined$1, done: true };
|
|
53
|
+
var _styleModuleImportMap$A = {
|
|
54
|
+
"./dot.m.css": {
|
|
55
|
+
"dark": "dot-m_dark__1Njxl",
|
|
56
|
+
"light": "dot-m_light__27IA3"
|
|
2364
57
|
}
|
|
58
|
+
};
|
|
59
|
+
var Dot = function Dot(_ref) {
|
|
60
|
+
var _ref$width = _ref.width,
|
|
61
|
+
width = _ref$width === void 0 ? "3px" : _ref$width,
|
|
62
|
+
_ref$height = _ref.height,
|
|
63
|
+
height = _ref$height === void 0 ? "3px" : _ref$height,
|
|
64
|
+
_ref$color = _ref.color,
|
|
65
|
+
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
66
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
67
|
+
className: _getClassName__default["default"](color, _styleModuleImportMap$A)
|
|
68
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
69
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
70
|
+
width: width,
|
|
71
|
+
height: height,
|
|
72
|
+
viewBox: "0 0 3 3"
|
|
73
|
+
}, /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
74
|
+
cx: "87",
|
|
75
|
+
cy: "9",
|
|
76
|
+
r: "1",
|
|
77
|
+
fill: "inherit",
|
|
78
|
+
fillRule: "nonzero",
|
|
79
|
+
transform: "translate(-86 -8)"
|
|
80
|
+
})));
|
|
81
|
+
};
|
|
82
|
+
Dot.propTypes = {
|
|
83
|
+
/** height , width and color of the dot icon */
|
|
84
|
+
color: PropTypes__default["default"].string,
|
|
85
|
+
width: PropTypes__default["default"].string,
|
|
86
|
+
height: PropTypes__default["default"].string
|
|
87
|
+
};
|
|
2365
88
|
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
if (!skipTempReset) {
|
|
2384
|
-
for (var name in this) {
|
|
2385
|
-
// Not sure about the optimal order of these conditions:
|
|
2386
|
-
if (name.charAt(0) === "t" &&
|
|
2387
|
-
hasOwn.call(this, name) &&
|
|
2388
|
-
!isNaN(+name.slice(1))) {
|
|
2389
|
-
this[name] = undefined$1;
|
|
2390
|
-
}
|
|
2391
|
-
}
|
|
2392
|
-
}
|
|
2393
|
-
},
|
|
2394
|
-
|
|
2395
|
-
stop: function() {
|
|
2396
|
-
this.done = true;
|
|
2397
|
-
|
|
2398
|
-
var rootEntry = this.tryEntries[0];
|
|
2399
|
-
var rootRecord = rootEntry.completion;
|
|
2400
|
-
if (rootRecord.type === "throw") {
|
|
2401
|
-
throw rootRecord.arg;
|
|
2402
|
-
}
|
|
2403
|
-
|
|
2404
|
-
return this.rval;
|
|
2405
|
-
},
|
|
2406
|
-
|
|
2407
|
-
dispatchException: function(exception) {
|
|
2408
|
-
if (this.done) {
|
|
2409
|
-
throw exception;
|
|
2410
|
-
}
|
|
2411
|
-
|
|
2412
|
-
var context = this;
|
|
2413
|
-
function handle(loc, caught) {
|
|
2414
|
-
record.type = "throw";
|
|
2415
|
-
record.arg = exception;
|
|
2416
|
-
context.next = loc;
|
|
2417
|
-
|
|
2418
|
-
if (caught) {
|
|
2419
|
-
// If the dispatched exception was caught by a catch block,
|
|
2420
|
-
// then let that catch block handle the exception normally.
|
|
2421
|
-
context.method = "next";
|
|
2422
|
-
context.arg = undefined$1;
|
|
2423
|
-
}
|
|
2424
|
-
|
|
2425
|
-
return !! caught;
|
|
2426
|
-
}
|
|
2427
|
-
|
|
2428
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
2429
|
-
var entry = this.tryEntries[i];
|
|
2430
|
-
var record = entry.completion;
|
|
2431
|
-
|
|
2432
|
-
if (entry.tryLoc === "root") {
|
|
2433
|
-
// Exception thrown outside of any try block that could handle
|
|
2434
|
-
// it, so set the completion value of the entire function to
|
|
2435
|
-
// throw the exception.
|
|
2436
|
-
return handle("end");
|
|
2437
|
-
}
|
|
2438
|
-
|
|
2439
|
-
if (entry.tryLoc <= this.prev) {
|
|
2440
|
-
var hasCatch = hasOwn.call(entry, "catchLoc");
|
|
2441
|
-
var hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
2442
|
-
|
|
2443
|
-
if (hasCatch && hasFinally) {
|
|
2444
|
-
if (this.prev < entry.catchLoc) {
|
|
2445
|
-
return handle(entry.catchLoc, true);
|
|
2446
|
-
} else if (this.prev < entry.finallyLoc) {
|
|
2447
|
-
return handle(entry.finallyLoc);
|
|
2448
|
-
}
|
|
2449
|
-
|
|
2450
|
-
} else if (hasCatch) {
|
|
2451
|
-
if (this.prev < entry.catchLoc) {
|
|
2452
|
-
return handle(entry.catchLoc, true);
|
|
2453
|
-
}
|
|
2454
|
-
|
|
2455
|
-
} else if (hasFinally) {
|
|
2456
|
-
if (this.prev < entry.finallyLoc) {
|
|
2457
|
-
return handle(entry.finallyLoc);
|
|
2458
|
-
}
|
|
2459
|
-
|
|
2460
|
-
} else {
|
|
2461
|
-
throw new Error("try statement without catch or finally");
|
|
2462
|
-
}
|
|
2463
|
-
}
|
|
2464
|
-
}
|
|
2465
|
-
},
|
|
2466
|
-
|
|
2467
|
-
abrupt: function(type, arg) {
|
|
2468
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
2469
|
-
var entry = this.tryEntries[i];
|
|
2470
|
-
if (entry.tryLoc <= this.prev &&
|
|
2471
|
-
hasOwn.call(entry, "finallyLoc") &&
|
|
2472
|
-
this.prev < entry.finallyLoc) {
|
|
2473
|
-
var finallyEntry = entry;
|
|
2474
|
-
break;
|
|
2475
|
-
}
|
|
2476
|
-
}
|
|
2477
|
-
|
|
2478
|
-
if (finallyEntry &&
|
|
2479
|
-
(type === "break" ||
|
|
2480
|
-
type === "continue") &&
|
|
2481
|
-
finallyEntry.tryLoc <= arg &&
|
|
2482
|
-
arg <= finallyEntry.finallyLoc) {
|
|
2483
|
-
// Ignore the finally entry if control is not jumping to a
|
|
2484
|
-
// location outside the try/catch block.
|
|
2485
|
-
finallyEntry = null;
|
|
2486
|
-
}
|
|
2487
|
-
|
|
2488
|
-
var record = finallyEntry ? finallyEntry.completion : {};
|
|
2489
|
-
record.type = type;
|
|
2490
|
-
record.arg = arg;
|
|
2491
|
-
|
|
2492
|
-
if (finallyEntry) {
|
|
2493
|
-
this.method = "next";
|
|
2494
|
-
this.next = finallyEntry.finallyLoc;
|
|
2495
|
-
return ContinueSentinel;
|
|
2496
|
-
}
|
|
2497
|
-
|
|
2498
|
-
return this.complete(record);
|
|
2499
|
-
},
|
|
2500
|
-
|
|
2501
|
-
complete: function(record, afterLoc) {
|
|
2502
|
-
if (record.type === "throw") {
|
|
2503
|
-
throw record.arg;
|
|
2504
|
-
}
|
|
2505
|
-
|
|
2506
|
-
if (record.type === "break" ||
|
|
2507
|
-
record.type === "continue") {
|
|
2508
|
-
this.next = record.arg;
|
|
2509
|
-
} else if (record.type === "return") {
|
|
2510
|
-
this.rval = this.arg = record.arg;
|
|
2511
|
-
this.method = "return";
|
|
2512
|
-
this.next = "end";
|
|
2513
|
-
} else if (record.type === "normal" && afterLoc) {
|
|
2514
|
-
this.next = afterLoc;
|
|
2515
|
-
}
|
|
2516
|
-
|
|
2517
|
-
return ContinueSentinel;
|
|
2518
|
-
},
|
|
2519
|
-
|
|
2520
|
-
finish: function(finallyLoc) {
|
|
2521
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
2522
|
-
var entry = this.tryEntries[i];
|
|
2523
|
-
if (entry.finallyLoc === finallyLoc) {
|
|
2524
|
-
this.complete(entry.completion, entry.afterLoc);
|
|
2525
|
-
resetTryEntry(entry);
|
|
2526
|
-
return ContinueSentinel;
|
|
2527
|
-
}
|
|
2528
|
-
}
|
|
2529
|
-
},
|
|
2530
|
-
|
|
2531
|
-
"catch": function(tryLoc) {
|
|
2532
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
2533
|
-
var entry = this.tryEntries[i];
|
|
2534
|
-
if (entry.tryLoc === tryLoc) {
|
|
2535
|
-
var record = entry.completion;
|
|
2536
|
-
if (record.type === "throw") {
|
|
2537
|
-
var thrown = record.arg;
|
|
2538
|
-
resetTryEntry(entry);
|
|
2539
|
-
}
|
|
2540
|
-
return thrown;
|
|
2541
|
-
}
|
|
2542
|
-
}
|
|
2543
|
-
|
|
2544
|
-
// The context.catch method must only be called with a location
|
|
2545
|
-
// argument that corresponds to a known catch block.
|
|
2546
|
-
throw new Error("illegal catch attempt");
|
|
2547
|
-
},
|
|
2548
|
-
|
|
2549
|
-
delegateYield: function(iterable, resultName, nextLoc) {
|
|
2550
|
-
this.delegate = {
|
|
2551
|
-
iterator: values(iterable),
|
|
2552
|
-
resultName: resultName,
|
|
2553
|
-
nextLoc: nextLoc
|
|
2554
|
-
};
|
|
89
|
+
var Twitter = function Twitter(_ref) {
|
|
90
|
+
var _ref$color = _ref.color,
|
|
91
|
+
color = _ref$color === void 0 ? "#1CB7EB" : _ref$color;
|
|
92
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
93
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
94
|
+
width: "24",
|
|
95
|
+
height: "24",
|
|
96
|
+
viewBox: "0 0 24 24"
|
|
97
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
98
|
+
fill: color,
|
|
99
|
+
d: "M19.137 8.594c.023.094.035.246.035.457 0 1.687-.41 3.316-1.23 4.887-.844 1.664-2.028 2.988-3.551 3.972-1.664 1.102-3.575 1.652-5.73 1.652-2.063 0-3.95-.55-5.661-1.652.258.024.55.035.879.035 1.71 0 3.246-.527 4.605-1.582-.82 0-1.54-.24-2.162-.72a3.673 3.673 0 01-1.283-1.811c.234.023.457.035.668.035.328 0 .656-.035.984-.105a3.724 3.724 0 01-2.109-1.301 3.542 3.542 0 01-.844-2.32v-.07a3.493 3.493 0 001.653.492 4.097 4.097 0 01-1.196-1.336 3.557 3.557 0 01-.457-1.776c0-.644.176-1.26.528-1.845a10.188 10.188 0 003.357 2.742 10.222 10.222 0 004.236 1.125 5.122 5.122 0 01-.07-.844c0-.656.164-1.272.492-1.846a3.615 3.615 0 011.336-1.353 3.568 3.568 0 011.828-.492c.54 0 1.037.105 1.494.316.457.21.862.492 1.213.844a7.479 7.479 0 002.356-.88c-.281.868-.82 1.548-1.617 2.04A7.926 7.926 0 0021 6.66a8.132 8.132 0 01-1.863 1.934z"
|
|
100
|
+
}));
|
|
101
|
+
};
|
|
102
|
+
Twitter.propTypes = {
|
|
103
|
+
color: PropTypes__default["default"].string
|
|
104
|
+
};
|
|
2555
105
|
|
|
2556
|
-
|
|
2557
|
-
// Deliberately forget the last sent value so that we don't
|
|
2558
|
-
// accidentally pass it on to the delegate.
|
|
2559
|
-
this.arg = undefined$1;
|
|
2560
|
-
}
|
|
106
|
+
var StateContext = /*#__PURE__*/React.createContext(); // eslint-disable-next-line react/display-name
|
|
2561
107
|
|
|
2562
|
-
|
|
2563
|
-
|
|
108
|
+
var StateProvider = function StateProvider(RowComponent) {
|
|
109
|
+
return function (props) {
|
|
110
|
+
return (
|
|
111
|
+
/*#__PURE__*/
|
|
112
|
+
// eslint-disable-next-line react/prop-types
|
|
113
|
+
React__default["default"].createElement(StateContext.Provider, {
|
|
114
|
+
value: props.config
|
|
115
|
+
}, /*#__PURE__*/React__default["default"].createElement(RowComponent, props))
|
|
116
|
+
);
|
|
2564
117
|
};
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
// injected easily by `bin/regenerator --include-runtime script.js`.
|
|
2570
|
-
return exports;
|
|
2571
|
-
|
|
2572
|
-
}(
|
|
2573
|
-
// If this script is executing as a CommonJS module, use module.exports
|
|
2574
|
-
// as the regeneratorRuntime namespace. Otherwise create a new empty
|
|
2575
|
-
// object. Either way, the resulting object will be used to initialize
|
|
2576
|
-
// the regeneratorRuntime variable at the top of this file.
|
|
2577
|
-
module.exports
|
|
2578
|
-
));
|
|
2579
|
-
|
|
2580
|
-
try {
|
|
2581
|
-
regeneratorRuntime = runtime;
|
|
2582
|
-
} catch (accidentalStrictMode) {
|
|
2583
|
-
// This module should not be running in strict mode, so the above
|
|
2584
|
-
// assignment should always work unless something is misconfigured. Just
|
|
2585
|
-
// in case runtime.js accidentally runs in strict mode, in modern engines
|
|
2586
|
-
// we can explicitly access globalThis. In older engines we can escape
|
|
2587
|
-
// strict mode using a global Function call. This could conceivably fail
|
|
2588
|
-
// if a Content Security Policy forbids using Function, but in that case
|
|
2589
|
-
// the proper solution is to fix the accidental strict mode problem. If
|
|
2590
|
-
// you've misconfigured your bundler to force strict mode and applied a
|
|
2591
|
-
// CSP to forbid Function, and you're not willing to fix either of those
|
|
2592
|
-
// problems, please detail your unique predicament in a GitHub issue.
|
|
2593
|
-
if (typeof globalThis === "object") {
|
|
2594
|
-
globalThis.regeneratorRuntime = runtime;
|
|
2595
|
-
} else {
|
|
2596
|
-
Function("r", "regeneratorRuntime = r")(runtime);
|
|
2597
|
-
}
|
|
2598
|
-
}
|
|
2599
|
-
});
|
|
2600
|
-
|
|
2601
|
-
var regenerator = runtime_1;
|
|
2602
|
-
|
|
2603
|
-
/**
|
|
2604
|
-
* Converts `string`, as space separated words, to upper case.
|
|
2605
|
-
*
|
|
2606
|
-
* @static
|
|
2607
|
-
* @memberOf _
|
|
2608
|
-
* @since 4.0.0
|
|
2609
|
-
* @category String
|
|
2610
|
-
* @param {string} [string=''] The string to convert.
|
|
2611
|
-
* @returns {string} Returns the upper cased string.
|
|
2612
|
-
* @example
|
|
2613
|
-
*
|
|
2614
|
-
* _.upperCase('--foo-bar');
|
|
2615
|
-
* // => 'FOO BAR'
|
|
2616
|
-
*
|
|
2617
|
-
* _.upperCase('fooBar');
|
|
2618
|
-
* // => 'FOO BAR'
|
|
2619
|
-
*
|
|
2620
|
-
* _.upperCase('__foo_bar__');
|
|
2621
|
-
* // => 'FOO BAR'
|
|
2622
|
-
*/
|
|
2623
|
-
var upperCase = _createCompounder(function(result, word, index) {
|
|
2624
|
-
return result + (index ? ' ' : '') + word.toUpperCase();
|
|
2625
|
-
});
|
|
2626
|
-
|
|
2627
|
-
var upperCase_1 = upperCase;
|
|
2628
|
-
|
|
2629
|
-
/**
|
|
2630
|
-
* Converts `string`, as space separated words, to lower case.
|
|
2631
|
-
*
|
|
2632
|
-
* @static
|
|
2633
|
-
* @memberOf _
|
|
2634
|
-
* @since 4.0.0
|
|
2635
|
-
* @category String
|
|
2636
|
-
* @param {string} [string=''] The string to convert.
|
|
2637
|
-
* @returns {string} Returns the lower cased string.
|
|
2638
|
-
* @example
|
|
2639
|
-
*
|
|
2640
|
-
* _.lowerCase('--Foo-Bar--');
|
|
2641
|
-
* // => 'foo bar'
|
|
2642
|
-
*
|
|
2643
|
-
* _.lowerCase('fooBar');
|
|
2644
|
-
* // => 'foo bar'
|
|
2645
|
-
*
|
|
2646
|
-
* _.lowerCase('__FOO_BAR__');
|
|
2647
|
-
* // => 'foo bar'
|
|
2648
|
-
*/
|
|
2649
|
-
var lowerCase = _createCompounder(function(result, word, index) {
|
|
2650
|
-
return result + (index ? ' ' : '') + word.toLowerCase();
|
|
2651
|
-
});
|
|
2652
|
-
|
|
2653
|
-
var lowerCase_1 = lowerCase;
|
|
118
|
+
};
|
|
119
|
+
var useStateValue = function useStateValue() {
|
|
120
|
+
return React.useContext(StateContext);
|
|
121
|
+
};
|
|
2654
122
|
|
|
2655
123
|
function truncate() {
|
|
2656
124
|
var string = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
|
@@ -2678,7 +146,7 @@ var timestampToFormat = function timestampToFormat(value, unit, suffix, timestam
|
|
|
2678
146
|
var localizedMonth = month;
|
|
2679
147
|
|
|
2680
148
|
if (isUpperCase) {
|
|
2681
|
-
localizedMonth =
|
|
149
|
+
localizedMonth = lodash.upperCase(month);
|
|
2682
150
|
}
|
|
2683
151
|
|
|
2684
152
|
var year = dateTime.getFullYear();
|
|
@@ -2691,7 +159,7 @@ var timestampToFormat = function timestampToFormat(value, unit, suffix, timestam
|
|
|
2691
159
|
var timetoShow;
|
|
2692
160
|
|
|
2693
161
|
if (localizedMonths) {
|
|
2694
|
-
localizedMonth =
|
|
162
|
+
localizedMonth = lodash.get(localizedMonths, [lodash.lowerCase(month)]) || month;
|
|
2695
163
|
}
|
|
2696
164
|
|
|
2697
165
|
if (localizedMeridiem) {
|
|
@@ -2721,17 +189,17 @@ function formatter(value, unit, suffix, date, config) {
|
|
|
2721
189
|
var showDateForUnits = ["day", "week", "month", "year"]; // suffix here refers to ago
|
|
2722
190
|
// unit here refers to seconds, minute, minutes,...
|
|
2723
191
|
|
|
2724
|
-
var localizedSuffix =
|
|
192
|
+
var localizedSuffix = lodash.get(config, ["localizedPublishTime", suffix]) || suffix;
|
|
2725
193
|
var localizedUnitOfTime;
|
|
2726
194
|
|
|
2727
195
|
if (unit === "hour" && value > 23 || showDateForUnits.indexOf(unit) !== -1) {
|
|
2728
196
|
return timestampToFormat(value, unit, suffix, date, config);
|
|
2729
197
|
} else if (value > 1) {
|
|
2730
|
-
localizedUnitOfTime =
|
|
198
|
+
localizedUnitOfTime = lodash.get(config, ["localizedPublishTime", "".concat(unit, "s")]) || "".concat(unit, "s");
|
|
2731
199
|
return "".concat(value, " ").concat(localizedUnitOfTime, " ").concat(localizedSuffix);
|
|
2732
200
|
}
|
|
2733
201
|
|
|
2734
|
-
localizedUnitOfTime =
|
|
202
|
+
localizedUnitOfTime = lodash.get(config, ["localizedPublishTime", unit]) || unit;
|
|
2735
203
|
return "".concat(value, " ").concat(localizedUnitOfTime, " ").concat(localizedSuffix, " ");
|
|
2736
204
|
}
|
|
2737
205
|
|
|
@@ -2784,10 +252,10 @@ var clientWidths = {
|
|
|
2784
252
|
tablet: 1024
|
|
2785
253
|
};
|
|
2786
254
|
var clientWidth = function clientWidth(device) {
|
|
2787
|
-
var foundDeviceWidth =
|
|
255
|
+
var foundDeviceWidth = lodash.get(clientWidths, device);
|
|
2788
256
|
|
|
2789
257
|
if (foundDeviceWidth) {
|
|
2790
|
-
return
|
|
258
|
+
return lodash.get(global, "document.documentElement.clientWidth") <= foundDeviceWidth;
|
|
2791
259
|
}
|
|
2792
260
|
|
|
2793
261
|
return false;
|
|
@@ -2817,7 +285,7 @@ var getSlug = function getSlug(collection) {
|
|
|
2817
285
|
var isSection = collection.template === "section";
|
|
2818
286
|
|
|
2819
287
|
if (isSection) {
|
|
2820
|
-
var sectionId =
|
|
288
|
+
var sectionId = lodash.get(collection, ["metadata", "section", "0", "id"], "");
|
|
2821
289
|
var sections = config.sections;
|
|
2822
290
|
var section = sections && sections.find(function (section) {
|
|
2823
291
|
return section.id === sectionId;
|
|
@@ -2833,7 +301,7 @@ function isExternalStory() {
|
|
|
2833
301
|
storyTemplate = _story$storyTemplate === void 0 ? "" : _story$storyTemplate,
|
|
2834
302
|
_story$metadata = story.metadata,
|
|
2835
303
|
metadata = _story$metadata === void 0 ? {} : _story$metadata;
|
|
2836
|
-
return storyTemplate === "news-elsewhere" ?
|
|
304
|
+
return storyTemplate === "news-elsewhere" ? lodash.get(metadata, ["reference-url"], "") : "";
|
|
2837
305
|
} // Adds target='_blank' attribute to anchor tags if not present
|
|
2838
306
|
|
|
2839
307
|
var updateContentLinks = function updateContentLinks(content) {
|
|
@@ -2850,7 +318,7 @@ var updateContentLinks = function updateContentLinks(content) {
|
|
|
2850
318
|
};
|
|
2851
319
|
var isEmpty = function isEmpty(value) {
|
|
2852
320
|
return value == null || // From standard.js: Always use === - but value == null is allowed to check null || undefined
|
|
2853
|
-
|
|
321
|
+
_typeof__default["default"](value) === "object" && Object.entries(value).length === 0 && value.constructor === Object || typeof value === "string" && value.trim().length === 0;
|
|
2854
322
|
};
|
|
2855
323
|
var shapeConfig = PropTypes__default["default"].shape({
|
|
2856
324
|
"sketches-host": PropTypes__default["default"].string,
|
|
@@ -2864,7 +332,7 @@ var shapeStory = PropTypes__default["default"].shape({
|
|
|
2864
332
|
});
|
|
2865
333
|
var getStoryUrl = function getStoryUrl(story) {
|
|
2866
334
|
var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
2867
|
-
return
|
|
335
|
+
return lodash.get(story, ["story-template"]) === "news-elsewhere" ? lodash.get(story, ["metadata", "reference-url"], "") : story.url || defaultValue;
|
|
2868
336
|
};
|
|
2869
337
|
var facebookMobileVideoResizeFix = function facebookMobileVideoResizeFix() {
|
|
2870
338
|
if (typeof window !== "undefined" && window.matchMedia && window.matchMedia("(max-width: 767px)").matches) {
|
|
@@ -2909,11 +377,11 @@ var generateNavigateSlug = function generateNavigateSlug() {
|
|
|
2909
377
|
return "/";
|
|
2910
378
|
};
|
|
2911
379
|
var getCollectionData = /*#__PURE__*/function () {
|
|
2912
|
-
var _ref =
|
|
380
|
+
var _ref = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(collectionSlug) {
|
|
2913
381
|
var mountAtPrefix,
|
|
2914
382
|
result,
|
|
2915
383
|
_args = arguments;
|
|
2916
|
-
return
|
|
384
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
|
|
2917
385
|
while (1) {
|
|
2918
386
|
switch (_context.prev = _context.next) {
|
|
2919
387
|
case 0:
|
|
@@ -3040,8 +508,8 @@ var AuthorCard = function AuthorCard(_ref) {
|
|
|
3040
508
|
showName = _opts$showName === void 0 ? true : _opts$showName;
|
|
3041
509
|
var textColor = getTextColor(configData.theme);
|
|
3042
510
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3043
|
-
"data-test-id": "author-card-".concat(
|
|
3044
|
-
className: (clazzName ? clazzName + " " : "") +
|
|
511
|
+
"data-test-id": "author-card-".concat(lodash.kebabCase(template)),
|
|
512
|
+
className: (clazzName ? clazzName + " " : "") + _getClassName__default["default"]("author-card-wrapper ".concat(template), _styleModuleImportMap$z)
|
|
3045
513
|
}, authors.map(function (author, index) {
|
|
3046
514
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, {
|
|
3047
515
|
key: author.id
|
|
@@ -3053,7 +521,7 @@ var AuthorCard = function AuthorCard(_ref) {
|
|
|
3053
521
|
key: "author-image-".concat(index),
|
|
3054
522
|
"aria-label": "author-image"
|
|
3055
523
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3056
|
-
className:
|
|
524
|
+
className: _getClassName__default["default"]("author-image ".concat(!index ? "first-author-image" : "", " ").concat(!isSingleAuthor ? "multi-author-image" : ""), _styleModuleImportMap$z)
|
|
3057
525
|
}, authorImage(author)))));
|
|
3058
526
|
}), showName && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3059
527
|
"data-test-id": "author-name",
|
|
@@ -3064,7 +532,7 @@ var AuthorCard = function AuthorCard(_ref) {
|
|
|
3064
532
|
href: "".concat(mountAt, "/author/") + author.slug,
|
|
3065
533
|
"aria-label": "author-name"
|
|
3066
534
|
}, /*#__PURE__*/React__default["default"].createElement("h5", {
|
|
3067
|
-
className:
|
|
535
|
+
className: _getClassName__default["default"]("multiple-author-style ".concat(textColor), _styleModuleImportMap$z)
|
|
3068
536
|
}, author.name)));
|
|
3069
537
|
}), isSingleAuthor && template !== "centerAligned" && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, authors[0]["twitter-handle"] && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3070
538
|
className: "author-card-m_dot-wrapper__2soc1"
|
|
@@ -3078,7 +546,7 @@ var AuthorCard = function AuthorCard(_ref) {
|
|
|
3078
546
|
"data-test-id": "author-info",
|
|
3079
547
|
className: "author-card-m_author-details-wrapper__1c2uc"
|
|
3080
548
|
}, showBio && isSingleAuthor && template !== "default" && /*#__PURE__*/React__default["default"].createElement("p", {
|
|
3081
|
-
className:
|
|
549
|
+
className: _getClassName__default["default"]("author-bio ".concat(textColor), _styleModuleImportMap$z)
|
|
3082
550
|
}, authors[0].bio)));
|
|
3083
551
|
};
|
|
3084
552
|
AuthorCard.propTypes = {
|
|
@@ -3131,7 +599,7 @@ var CaptionAttribution = function CaptionAttribution(_ref) {
|
|
|
3131
599
|
var updateStyle = caption ? "wrapper" : "";
|
|
3132
600
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3133
601
|
"data-test-id": "caption",
|
|
3134
|
-
className: "arr--caption-attribution " +
|
|
602
|
+
className: "arr--caption-attribution " + _getClassName__default["default"]("caption ".concat(textColor), _styleModuleImportMap$y)
|
|
3135
603
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3136
604
|
dangerouslySetInnerHTML: {
|
|
3137
605
|
__html: caption
|
|
@@ -3141,7 +609,7 @@ var CaptionAttribution = function CaptionAttribution(_ref) {
|
|
|
3141
609
|
dangerouslySetInnerHTML: {
|
|
3142
610
|
__html: attribution
|
|
3143
611
|
},
|
|
3144
|
-
className:
|
|
612
|
+
className: _getClassName__default["default"]("attribution ".concat(textColor, " ").concat(updateStyle), _styleModuleImportMap$y)
|
|
3145
613
|
}));
|
|
3146
614
|
};
|
|
3147
615
|
CaptionAttribution.propTypes = {
|
|
@@ -3374,11 +842,11 @@ var StoryHeadline = function StoryHeadline(_ref) {
|
|
|
3374
842
|
iconStyle = _premiumStoryIconConf2 === void 0 ? "star" : _premiumStoryIconConf2,
|
|
3375
843
|
_premiumStoryIconConf3 = premiumStoryIconConfig.enablePremiumStoryIcon,
|
|
3376
844
|
enablePremiumStoryIcon = _premiumStoryIconConf3 === void 0 ? false : _premiumStoryIconConf3;
|
|
3377
|
-
var premiumStory = enablePremiumStoryIcon &&
|
|
845
|
+
var premiumStory = enablePremiumStoryIcon && lodash.get(story, ["access"]) === "subscription";
|
|
3378
846
|
var wrapperClass = premiumStory ? "premium-wrapper" : "wrapper";
|
|
3379
847
|
var iconSize = "40px";
|
|
3380
848
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3381
|
-
className: "arrow-component arr--story-headline " +
|
|
849
|
+
className: "arrow-component arr--story-headline " + _getClassName__default["default"](wrapperClass, _styleModuleImportMap$x)
|
|
3382
850
|
}, premiumStory && /*#__PURE__*/React__default["default"].createElement(PremiumStoryIcon, {
|
|
3383
851
|
width: iconSize,
|
|
3384
852
|
height: iconSize,
|
|
@@ -3387,7 +855,7 @@ var StoryHeadline = function StoryHeadline(_ref) {
|
|
|
3387
855
|
positionTop: "6px"
|
|
3388
856
|
}), /*#__PURE__*/React__default["default"].createElement("h1", {
|
|
3389
857
|
"data-testid": "story-headline",
|
|
3390
|
-
className:
|
|
858
|
+
className: _getClassName__default["default"]("headline ".concat(textColor), _styleModuleImportMap$x)
|
|
3391
859
|
}, /*#__PURE__*/React__default["default"].createElement("bdi", {
|
|
3392
860
|
dangerouslySetInnerHTML: {
|
|
3393
861
|
__html: story.headline
|
|
@@ -3403,67 +871,6 @@ StoryHeadline.propTypes = {
|
|
|
3403
871
|
})
|
|
3404
872
|
};
|
|
3405
873
|
|
|
3406
|
-
function _arrayWithHoles(arr) {
|
|
3407
|
-
if (Array.isArray(arr)) return arr;
|
|
3408
|
-
}
|
|
3409
|
-
|
|
3410
|
-
function _iterableToArrayLimit(arr, i) {
|
|
3411
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
3412
|
-
|
|
3413
|
-
if (_i == null) return;
|
|
3414
|
-
var _arr = [];
|
|
3415
|
-
var _n = true;
|
|
3416
|
-
var _d = false;
|
|
3417
|
-
|
|
3418
|
-
var _s, _e;
|
|
3419
|
-
|
|
3420
|
-
try {
|
|
3421
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
3422
|
-
_arr.push(_s.value);
|
|
3423
|
-
|
|
3424
|
-
if (i && _arr.length === i) break;
|
|
3425
|
-
}
|
|
3426
|
-
} catch (err) {
|
|
3427
|
-
_d = true;
|
|
3428
|
-
_e = err;
|
|
3429
|
-
} finally {
|
|
3430
|
-
try {
|
|
3431
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
3432
|
-
} finally {
|
|
3433
|
-
if (_d) throw _e;
|
|
3434
|
-
}
|
|
3435
|
-
}
|
|
3436
|
-
|
|
3437
|
-
return _arr;
|
|
3438
|
-
}
|
|
3439
|
-
|
|
3440
|
-
function _arrayLikeToArray(arr, len) {
|
|
3441
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
3442
|
-
|
|
3443
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
3444
|
-
arr2[i] = arr[i];
|
|
3445
|
-
}
|
|
3446
|
-
|
|
3447
|
-
return arr2;
|
|
3448
|
-
}
|
|
3449
|
-
|
|
3450
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
3451
|
-
if (!o) return;
|
|
3452
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
3453
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
3454
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
3455
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
3456
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
3457
|
-
}
|
|
3458
|
-
|
|
3459
|
-
function _nonIterableRest() {
|
|
3460
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
3461
|
-
}
|
|
3462
|
-
|
|
3463
|
-
function _slicedToArray(arr, i) {
|
|
3464
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
3465
|
-
}
|
|
3466
|
-
|
|
3467
874
|
var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
3468
875
|
var _ref$width = _ref.width,
|
|
3469
876
|
width = _ref$width === void 0 ? 40 : _ref$width,
|
|
@@ -3604,7 +1011,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3604
1011
|
return null;
|
|
3605
1012
|
} : _config$StoryTemplate;
|
|
3606
1013
|
var showImagePlaceholder = reactRedux.useSelector(function (state) {
|
|
3607
|
-
return
|
|
1014
|
+
return lodash.get(state, ["qt", "config", "showPlaceholder"]);
|
|
3608
1015
|
});
|
|
3609
1016
|
var getPlaceholderStyleName = showImagePlaceholder ? "placeholder" : "";
|
|
3610
1017
|
var fullBleed = FullBleed ? "" : "with-padding";
|
|
@@ -3613,7 +1020,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3613
1020
|
var heroImageMobClasses = isHorizontalMobile ? "right-padding-mob" : "";
|
|
3614
1021
|
|
|
3615
1022
|
var getPadding = function getPadding(aspectRatio) {
|
|
3616
|
-
var _aspectRatio =
|
|
1023
|
+
var _aspectRatio = _slicedToArray__default["default"](aspectRatio, 2),
|
|
3617
1024
|
height = _aspectRatio[0],
|
|
3618
1025
|
width = _aspectRatio[1];
|
|
3619
1026
|
|
|
@@ -3625,7 +1032,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3625
1032
|
return 0;
|
|
3626
1033
|
};
|
|
3627
1034
|
|
|
3628
|
-
var _aspectRatio2 =
|
|
1035
|
+
var _aspectRatio2 = _slicedToArray__default["default"](aspectRatio, 2),
|
|
3629
1036
|
mobileAspectRatio = _aspectRatio2[0],
|
|
3630
1037
|
_aspectRatio2$ = _aspectRatio2[1],
|
|
3631
1038
|
desktopAspectRatio = _aspectRatio2$ === void 0 ? mobileAspectRatio : _aspectRatio2$;
|
|
@@ -3633,8 +1040,8 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3633
1040
|
var isMobile = clientWidth("mobile");
|
|
3634
1041
|
var imageAspectRatio = isMobile ? mobileAspectRatio : desktopAspectRatio;
|
|
3635
1042
|
var imagePadding = isMobile ? getPadding(mobileAspectRatio) : getPadding(desktopAspectRatio);
|
|
3636
|
-
var slug =
|
|
3637
|
-
var hyperLink =
|
|
1043
|
+
var slug = lodash.get(story, ["hero-image-s3-key"]) || lodash.get(story, ["alternative", "home", "default", "hero-image", "hero-image-s3-key"]);
|
|
1044
|
+
var hyperLink = lodash.get(story, ["hero-image-hyperlink"], "");
|
|
3638
1045
|
|
|
3639
1046
|
var fallbackImage = function fallbackImage() {
|
|
3640
1047
|
if (!slug) {
|
|
@@ -3643,7 +1050,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3643
1050
|
style: {
|
|
3644
1051
|
paddingTop: imagePadding + "%"
|
|
3645
1052
|
},
|
|
3646
|
-
className: "arr--responsive-hero-image " +
|
|
1053
|
+
className: "arr--responsive-hero-image " + _getClassName__default["default"]("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$w)
|
|
3647
1054
|
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
3648
1055
|
className: "qt-image",
|
|
3649
1056
|
"data-src": "".concat(fallbackImageUrl),
|
|
@@ -3656,7 +1063,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3656
1063
|
style: {
|
|
3657
1064
|
paddingTop: imagePadding + "%"
|
|
3658
1065
|
},
|
|
3659
|
-
className: "arr--fallback-hero-image " +
|
|
1066
|
+
className: "arr--fallback-hero-image " + _getClassName__default["default"]("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$w)
|
|
3660
1067
|
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
3661
1068
|
storyTemplate: story["story-template"]
|
|
3662
1069
|
}), /*#__PURE__*/React__default["default"].createElement(FallbackImage, null)) : null);
|
|
@@ -3666,7 +1073,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3666
1073
|
style: {
|
|
3667
1074
|
paddingTop: imagePadding + "%"
|
|
3668
1075
|
},
|
|
3669
|
-
className: "arr--responsive-hero-image " +
|
|
1076
|
+
className: "arr--responsive-hero-image " + _getClassName__default["default"]("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$w)
|
|
3670
1077
|
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
3671
1078
|
storyTemplate: story["story-template"]
|
|
3672
1079
|
}), /*#__PURE__*/React__default["default"].createElement(components.ResponsiveHeroImage, {
|
|
@@ -3685,13 +1092,13 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3685
1092
|
|
|
3686
1093
|
return story && (isStoryPageImage ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3687
1094
|
"data-test-id": "arr--hero-image",
|
|
3688
|
-
className: "arr--hero-image " +
|
|
1095
|
+
className: "arr--hero-image " + _getClassName__default["default"]("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap$w)
|
|
3689
1096
|
}, fallbackImage()) : /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3690
1097
|
"data-test-id": "arr--hero-image",
|
|
3691
1098
|
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
3692
1099
|
externalLink: isExternalStory(story),
|
|
3693
1100
|
"aria-label": "fallback-hero-image",
|
|
3694
|
-
className: "arr--hero-image " +
|
|
1101
|
+
className: "arr--hero-image " + _getClassName__default["default"]("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap$w)
|
|
3695
1102
|
}, fallbackImage()));
|
|
3696
1103
|
};
|
|
3697
1104
|
HeroImage.propTypes = {
|
|
@@ -3734,21 +1141,6 @@ HeroImage.defaultProps = {
|
|
|
3734
1141
|
config: {}
|
|
3735
1142
|
};
|
|
3736
1143
|
|
|
3737
|
-
function _defineProperty(obj, key, value) {
|
|
3738
|
-
if (key in obj) {
|
|
3739
|
-
Object.defineProperty(obj, key, {
|
|
3740
|
-
value: value,
|
|
3741
|
-
enumerable: true,
|
|
3742
|
-
configurable: true,
|
|
3743
|
-
writable: true
|
|
3744
|
-
});
|
|
3745
|
-
} else {
|
|
3746
|
-
obj[key] = value;
|
|
3747
|
-
}
|
|
3748
|
-
|
|
3749
|
-
return obj;
|
|
3750
|
-
}
|
|
3751
|
-
|
|
3752
1144
|
var _styleModuleImportMap$v = {
|
|
3753
1145
|
"./read-time.m.css": {
|
|
3754
1146
|
"read-time-wrapper": "read-time-m_read-time-wrapper__3GyC_",
|
|
@@ -3764,14 +1156,14 @@ var ReadTime = function ReadTime(_ref) {
|
|
|
3764
1156
|
_ref$isLightTheme = _ref.isLightTheme,
|
|
3765
1157
|
isLightTheme = _ref$isLightTheme === void 0 ? false : _ref$isLightTheme;
|
|
3766
1158
|
var config = useStateValue() || {};
|
|
3767
|
-
var showReadTime =
|
|
3768
|
-
var readTime =
|
|
1159
|
+
var showReadTime = lodash.get(config, ["showReadTime"]) || lodash.get(opts, ["showReadTime"], true);
|
|
1160
|
+
var readTime = lodash.get(story, ["read-time"], 0);
|
|
3769
1161
|
var textColor = isLightTheme ? "light" : getTextColor(config.theme);
|
|
3770
1162
|
if (!showReadTime || !readTime) return null;
|
|
3771
|
-
var timeToRead =
|
|
1163
|
+
var timeToRead = lodash.get(opts, ["localizedTimeToRead"]) || "min read";
|
|
3772
1164
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3773
1165
|
"data-test-id": "read-time",
|
|
3774
|
-
className: "arrow-component arr--read-time " +
|
|
1166
|
+
className: "arrow-component arr--read-time " + _getClassName__default["default"]("read-time-wrapper ".concat(textColor), _styleModuleImportMap$v)
|
|
3775
1167
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3776
1168
|
className: "read-time-indicator read-time-m_dot-indicator__3Sqh2"
|
|
3777
1169
|
}, /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
@@ -3804,7 +1196,7 @@ var _styleModuleImportMap$u = {
|
|
|
3804
1196
|
|
|
3805
1197
|
function ownKeys$3(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; }
|
|
3806
1198
|
|
|
3807
|
-
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$3(Object(source), !0).forEach(function (key) {
|
|
1199
|
+
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$3(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3808
1200
|
var PublishDetails = function PublishDetails(_ref) {
|
|
3809
1201
|
var story = _ref.story,
|
|
3810
1202
|
_ref$opts = _ref.opts,
|
|
@@ -3815,7 +1207,7 @@ var PublishDetails = function PublishDetails(_ref) {
|
|
|
3815
1207
|
timezone = _ref$timezone === void 0 ? null : _ref$timezone;
|
|
3816
1208
|
|
|
3817
1209
|
var _useState = React.useState("ltr"),
|
|
3818
|
-
_useState2 =
|
|
1210
|
+
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
3819
1211
|
direction = _useState2[0],
|
|
3820
1212
|
setDirection = _useState2[1];
|
|
3821
1213
|
|
|
@@ -3847,10 +1239,10 @@ var PublishDetails = function PublishDetails(_ref) {
|
|
|
3847
1239
|
});
|
|
3848
1240
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3849
1241
|
"data-test-id": "timeStamp",
|
|
3850
|
-
className: "arrow-component arr-publish-details " +
|
|
1242
|
+
className: "arrow-component arr-publish-details " + _getClassName__default["default"]("timeStamp ".concat(textColor), _styleModuleImportMap$u)
|
|
3851
1243
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3852
1244
|
"data-test-id": "publishDetails",
|
|
3853
|
-
className:
|
|
1245
|
+
className: _getClassName__default["default"]("publish-details ".concat(textColor), _styleModuleImportMap$u)
|
|
3854
1246
|
}, enablePublishedTime && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, localizedPublishedOn || "Published on", " :\xA0", /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3855
1247
|
className: "publish-details-m_date__3ZIQN"
|
|
3856
1248
|
}, getTimeStamp(time, timestampToFormat, timeStampProps, template, timezone)), showReadTime && /*#__PURE__*/React__default["default"].createElement(ReadTime, {
|
|
@@ -3858,7 +1250,7 @@ var PublishDetails = function PublishDetails(_ref) {
|
|
|
3858
1250
|
opts: opts
|
|
3859
1251
|
}))), enableUpdatedTime && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3860
1252
|
"data-test-id": "updateDetails",
|
|
3861
|
-
className:
|
|
1253
|
+
className: _getClassName__default["default"]("update-details ".concat(textColor), _styleModuleImportMap$u)
|
|
3862
1254
|
}, localizedUpdatedOn || "Updated on", " :\xA0", /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3863
1255
|
className: "publish-details-m_date__3ZIQN"
|
|
3864
1256
|
}, getTimeStamp(updatedAt, timestampToFormat, timeStampProps, template, timezone)), showReadTime && /*#__PURE__*/React__default["default"].createElement(ReadTime, {
|
|
@@ -3903,9 +1295,9 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
3903
1295
|
borderColor = _ref$borderColor === void 0 ? "" : _ref$borderColor,
|
|
3904
1296
|
isLightTheme = _ref.isLightTheme;
|
|
3905
1297
|
var config = useStateValue() || {};
|
|
3906
|
-
var isSection =
|
|
3907
|
-
var templateFromRowContext =
|
|
3908
|
-
var section =
|
|
1298
|
+
var isSection = lodash.get(config, ["showSection"], true);
|
|
1299
|
+
var templateFromRowContext = lodash.get(config, ["sectionTagTemplate"]);
|
|
1300
|
+
var section = lodash.get(story, ["sections", 0], "");
|
|
3909
1301
|
var supportedTemplates = ["borderBottomSml", "borderLeft", "solid"];
|
|
3910
1302
|
var getUrl = section ? section["section-url"] : "/";
|
|
3911
1303
|
var colorToApplyContrast = template === "solid" || templateFromRowContext === "solid" ? borderColor : config.theme;
|
|
@@ -3927,7 +1319,7 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
3927
1319
|
style: {
|
|
3928
1320
|
backgroundColor: templateStyle.includes("section-solid") ? sectionTagBorderColor : ""
|
|
3929
1321
|
},
|
|
3930
|
-
className: "section-tag arrow-component " +
|
|
1322
|
+
className: "section-tag arrow-component " + _getClassName__default["default"]("".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$t)
|
|
3931
1323
|
}, templateStyle.includes("section-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3932
1324
|
className: "section-m_border-left__2oUyp",
|
|
3933
1325
|
style: {
|
|
@@ -3972,7 +1364,7 @@ var Subheadline = function Subheadline(_ref) {
|
|
|
3972
1364
|
forceShowAtom = _ref.forceShowAtom,
|
|
3973
1365
|
showFullContent = _ref.showFullContent;
|
|
3974
1366
|
var config = useStateValue() || {};
|
|
3975
|
-
var subheadline = forceShowAtom ||
|
|
1367
|
+
var subheadline = forceShowAtom || lodash.get(config, ["showSubheadline"], true);
|
|
3976
1368
|
if (!subheadline) return null;
|
|
3977
1369
|
var textColor = getTextColor(config.theme);
|
|
3978
1370
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -3980,7 +1372,7 @@ var Subheadline = function Subheadline(_ref) {
|
|
|
3980
1372
|
WebkitLineClamp: lineClamp
|
|
3981
1373
|
},
|
|
3982
1374
|
"data-test-id": "subheadline",
|
|
3983
|
-
className: ("p-alt arr--sub-headline arrow-component ".concat(clazzName) ? "p-alt arr--sub-headline arrow-component ".concat(clazzName) + " " : "") +
|
|
1375
|
+
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$s)
|
|
3984
1376
|
}, showFullContent || typeof lineClamp === "number" ? story.subheadline : truncate(story.subheadline, truncateChars, true));
|
|
3985
1377
|
};
|
|
3986
1378
|
Subheadline.propTypes = {
|
|
@@ -4217,7 +1609,7 @@ var SocialSharePopup = function SocialSharePopup(_ref) {
|
|
|
4217
1609
|
};
|
|
4218
1610
|
var popupItemsList = socialShareData(options);
|
|
4219
1611
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4220
|
-
className:
|
|
1612
|
+
className: _getClassName__default["default"]("share-popup-wrapper ".concat(textColor), _styleModuleImportMap$r)
|
|
4221
1613
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4222
1614
|
className: "social-share-popup-m_share-popup__QRt3l social-share-popup-m_share-popup-wrapper__GEJqD"
|
|
4223
1615
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -4270,249 +1662,6 @@ ShareIcon.propTypes = {
|
|
|
4270
1662
|
color: PropTypes__default["default"].string
|
|
4271
1663
|
};
|
|
4272
1664
|
|
|
4273
|
-
/**
|
|
4274
|
-
* The base implementation of `_.slice` without an iteratee call guard.
|
|
4275
|
-
*
|
|
4276
|
-
* @private
|
|
4277
|
-
* @param {Array} array The array to slice.
|
|
4278
|
-
* @param {number} [start=0] The start position.
|
|
4279
|
-
* @param {number} [end=array.length] The end position.
|
|
4280
|
-
* @returns {Array} Returns the slice of `array`.
|
|
4281
|
-
*/
|
|
4282
|
-
function baseSlice(array, start, end) {
|
|
4283
|
-
var index = -1,
|
|
4284
|
-
length = array.length;
|
|
4285
|
-
|
|
4286
|
-
if (start < 0) {
|
|
4287
|
-
start = -start > length ? 0 : (length + start);
|
|
4288
|
-
}
|
|
4289
|
-
end = end > length ? length : end;
|
|
4290
|
-
if (end < 0) {
|
|
4291
|
-
end += length;
|
|
4292
|
-
}
|
|
4293
|
-
length = start > end ? 0 : ((end - start) >>> 0);
|
|
4294
|
-
start >>>= 0;
|
|
4295
|
-
|
|
4296
|
-
var result = Array(length);
|
|
4297
|
-
while (++index < length) {
|
|
4298
|
-
result[index] = array[index + start];
|
|
4299
|
-
}
|
|
4300
|
-
return result;
|
|
4301
|
-
}
|
|
4302
|
-
|
|
4303
|
-
var _baseSlice = baseSlice;
|
|
4304
|
-
|
|
4305
|
-
/**
|
|
4306
|
-
* Casts `array` to a slice if it's needed.
|
|
4307
|
-
*
|
|
4308
|
-
* @private
|
|
4309
|
-
* @param {Array} array The array to inspect.
|
|
4310
|
-
* @param {number} start The start position.
|
|
4311
|
-
* @param {number} [end=array.length] The end position.
|
|
4312
|
-
* @returns {Array} Returns the cast slice.
|
|
4313
|
-
*/
|
|
4314
|
-
function castSlice(array, start, end) {
|
|
4315
|
-
var length = array.length;
|
|
4316
|
-
end = end === undefined ? length : end;
|
|
4317
|
-
return (!start && end >= length) ? array : _baseSlice(array, start, end);
|
|
4318
|
-
}
|
|
4319
|
-
|
|
4320
|
-
var _castSlice = castSlice;
|
|
4321
|
-
|
|
4322
|
-
/** Used to compose unicode character classes. */
|
|
4323
|
-
var rsAstralRange$1 = '\\ud800-\\udfff',
|
|
4324
|
-
rsComboMarksRange$1 = '\\u0300-\\u036f',
|
|
4325
|
-
reComboHalfMarksRange$1 = '\\ufe20-\\ufe2f',
|
|
4326
|
-
rsComboSymbolsRange$1 = '\\u20d0-\\u20ff',
|
|
4327
|
-
rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1,
|
|
4328
|
-
rsVarRange$1 = '\\ufe0e\\ufe0f';
|
|
4329
|
-
|
|
4330
|
-
/** Used to compose unicode capture groups. */
|
|
4331
|
-
var rsZWJ$1 = '\\u200d';
|
|
4332
|
-
|
|
4333
|
-
/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
|
|
4334
|
-
var reHasUnicode = RegExp('[' + rsZWJ$1 + rsAstralRange$1 + rsComboRange$1 + rsVarRange$1 + ']');
|
|
4335
|
-
|
|
4336
|
-
/**
|
|
4337
|
-
* Checks if `string` contains Unicode symbols.
|
|
4338
|
-
*
|
|
4339
|
-
* @private
|
|
4340
|
-
* @param {string} string The string to inspect.
|
|
4341
|
-
* @returns {boolean} Returns `true` if a symbol is found, else `false`.
|
|
4342
|
-
*/
|
|
4343
|
-
function hasUnicode(string) {
|
|
4344
|
-
return reHasUnicode.test(string);
|
|
4345
|
-
}
|
|
4346
|
-
|
|
4347
|
-
var _hasUnicode = hasUnicode;
|
|
4348
|
-
|
|
4349
|
-
/**
|
|
4350
|
-
* Converts an ASCII `string` to an array.
|
|
4351
|
-
*
|
|
4352
|
-
* @private
|
|
4353
|
-
* @param {string} string The string to convert.
|
|
4354
|
-
* @returns {Array} Returns the converted array.
|
|
4355
|
-
*/
|
|
4356
|
-
function asciiToArray(string) {
|
|
4357
|
-
return string.split('');
|
|
4358
|
-
}
|
|
4359
|
-
|
|
4360
|
-
var _asciiToArray = asciiToArray;
|
|
4361
|
-
|
|
4362
|
-
/** Used to compose unicode character classes. */
|
|
4363
|
-
var rsAstralRange = '\\ud800-\\udfff',
|
|
4364
|
-
rsComboMarksRange = '\\u0300-\\u036f',
|
|
4365
|
-
reComboHalfMarksRange = '\\ufe20-\\ufe2f',
|
|
4366
|
-
rsComboSymbolsRange = '\\u20d0-\\u20ff',
|
|
4367
|
-
rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
|
|
4368
|
-
rsVarRange = '\\ufe0e\\ufe0f';
|
|
4369
|
-
|
|
4370
|
-
/** Used to compose unicode capture groups. */
|
|
4371
|
-
var rsAstral = '[' + rsAstralRange + ']',
|
|
4372
|
-
rsCombo = '[' + rsComboRange + ']',
|
|
4373
|
-
rsFitz = '\\ud83c[\\udffb-\\udfff]',
|
|
4374
|
-
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
|
|
4375
|
-
rsNonAstral = '[^' + rsAstralRange + ']',
|
|
4376
|
-
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
|
|
4377
|
-
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
|
|
4378
|
-
rsZWJ = '\\u200d';
|
|
4379
|
-
|
|
4380
|
-
/** Used to compose unicode regexes. */
|
|
4381
|
-
var reOptMod = rsModifier + '?',
|
|
4382
|
-
rsOptVar = '[' + rsVarRange + ']?',
|
|
4383
|
-
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
|
4384
|
-
rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
|
4385
|
-
rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
|
|
4386
|
-
|
|
4387
|
-
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
|
|
4388
|
-
var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
|
|
4389
|
-
|
|
4390
|
-
/**
|
|
4391
|
-
* Converts a Unicode `string` to an array.
|
|
4392
|
-
*
|
|
4393
|
-
* @private
|
|
4394
|
-
* @param {string} string The string to convert.
|
|
4395
|
-
* @returns {Array} Returns the converted array.
|
|
4396
|
-
*/
|
|
4397
|
-
function unicodeToArray(string) {
|
|
4398
|
-
return string.match(reUnicode) || [];
|
|
4399
|
-
}
|
|
4400
|
-
|
|
4401
|
-
var _unicodeToArray = unicodeToArray;
|
|
4402
|
-
|
|
4403
|
-
/**
|
|
4404
|
-
* Converts `string` to an array.
|
|
4405
|
-
*
|
|
4406
|
-
* @private
|
|
4407
|
-
* @param {string} string The string to convert.
|
|
4408
|
-
* @returns {Array} Returns the converted array.
|
|
4409
|
-
*/
|
|
4410
|
-
function stringToArray(string) {
|
|
4411
|
-
return _hasUnicode(string)
|
|
4412
|
-
? _unicodeToArray(string)
|
|
4413
|
-
: _asciiToArray(string);
|
|
4414
|
-
}
|
|
4415
|
-
|
|
4416
|
-
var _stringToArray = stringToArray;
|
|
4417
|
-
|
|
4418
|
-
/**
|
|
4419
|
-
* Creates a function like `_.lowerFirst`.
|
|
4420
|
-
*
|
|
4421
|
-
* @private
|
|
4422
|
-
* @param {string} methodName The name of the `String` case method to use.
|
|
4423
|
-
* @returns {Function} Returns the new case function.
|
|
4424
|
-
*/
|
|
4425
|
-
function createCaseFirst(methodName) {
|
|
4426
|
-
return function(string) {
|
|
4427
|
-
string = toString_1(string);
|
|
4428
|
-
|
|
4429
|
-
var strSymbols = _hasUnicode(string)
|
|
4430
|
-
? _stringToArray(string)
|
|
4431
|
-
: undefined;
|
|
4432
|
-
|
|
4433
|
-
var chr = strSymbols
|
|
4434
|
-
? strSymbols[0]
|
|
4435
|
-
: string.charAt(0);
|
|
4436
|
-
|
|
4437
|
-
var trailing = strSymbols
|
|
4438
|
-
? _castSlice(strSymbols, 1).join('')
|
|
4439
|
-
: string.slice(1);
|
|
4440
|
-
|
|
4441
|
-
return chr[methodName]() + trailing;
|
|
4442
|
-
};
|
|
4443
|
-
}
|
|
4444
|
-
|
|
4445
|
-
var _createCaseFirst = createCaseFirst;
|
|
4446
|
-
|
|
4447
|
-
/**
|
|
4448
|
-
* Converts the first character of `string` to upper case.
|
|
4449
|
-
*
|
|
4450
|
-
* @static
|
|
4451
|
-
* @memberOf _
|
|
4452
|
-
* @since 4.0.0
|
|
4453
|
-
* @category String
|
|
4454
|
-
* @param {string} [string=''] The string to convert.
|
|
4455
|
-
* @returns {string} Returns the converted string.
|
|
4456
|
-
* @example
|
|
4457
|
-
*
|
|
4458
|
-
* _.upperFirst('fred');
|
|
4459
|
-
* // => 'Fred'
|
|
4460
|
-
*
|
|
4461
|
-
* _.upperFirst('FRED');
|
|
4462
|
-
* // => 'FRED'
|
|
4463
|
-
*/
|
|
4464
|
-
var upperFirst = _createCaseFirst('toUpperCase');
|
|
4465
|
-
|
|
4466
|
-
var upperFirst_1 = upperFirst;
|
|
4467
|
-
|
|
4468
|
-
/**
|
|
4469
|
-
* Converts the first character of `string` to upper case and the remaining
|
|
4470
|
-
* to lower case.
|
|
4471
|
-
*
|
|
4472
|
-
* @static
|
|
4473
|
-
* @memberOf _
|
|
4474
|
-
* @since 3.0.0
|
|
4475
|
-
* @category String
|
|
4476
|
-
* @param {string} [string=''] The string to capitalize.
|
|
4477
|
-
* @returns {string} Returns the capitalized string.
|
|
4478
|
-
* @example
|
|
4479
|
-
*
|
|
4480
|
-
* _.capitalize('FRED');
|
|
4481
|
-
* // => 'Fred'
|
|
4482
|
-
*/
|
|
4483
|
-
function capitalize(string) {
|
|
4484
|
-
return upperFirst_1(toString_1(string).toLowerCase());
|
|
4485
|
-
}
|
|
4486
|
-
|
|
4487
|
-
var capitalize_1 = capitalize;
|
|
4488
|
-
|
|
4489
|
-
/**
|
|
4490
|
-
* Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
|
|
4491
|
-
*
|
|
4492
|
-
* @static
|
|
4493
|
-
* @memberOf _
|
|
4494
|
-
* @since 3.0.0
|
|
4495
|
-
* @category String
|
|
4496
|
-
* @param {string} [string=''] The string to convert.
|
|
4497
|
-
* @returns {string} Returns the camel cased string.
|
|
4498
|
-
* @example
|
|
4499
|
-
*
|
|
4500
|
-
* _.camelCase('Foo Bar');
|
|
4501
|
-
* // => 'fooBar'
|
|
4502
|
-
*
|
|
4503
|
-
* _.camelCase('--foo-bar--');
|
|
4504
|
-
* // => 'fooBar'
|
|
4505
|
-
*
|
|
4506
|
-
* _.camelCase('__FOO_BAR__');
|
|
4507
|
-
* // => 'fooBar'
|
|
4508
|
-
*/
|
|
4509
|
-
var camelCase = _createCompounder(function(result, word, index) {
|
|
4510
|
-
word = word.toLowerCase();
|
|
4511
|
-
return result + (index ? capitalize_1(word) : word);
|
|
4512
|
-
});
|
|
4513
|
-
|
|
4514
|
-
var camelCase_1 = camelCase;
|
|
4515
|
-
|
|
4516
1665
|
var _styleModuleImportMap$q = {
|
|
4517
1666
|
"./social-share-template.m.css": {
|
|
4518
1667
|
"desktop-view": "social-share-template-m_desktop-view__3TmkO",
|
|
@@ -4594,7 +1743,7 @@ var SocialShareTemplate = function SocialShareTemplate(props) {
|
|
|
4594
1743
|
var iconsList = socialShareData(options);
|
|
4595
1744
|
|
|
4596
1745
|
var _useState = React.useState(open),
|
|
4597
|
-
_useState2 =
|
|
1746
|
+
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
4598
1747
|
isOpen = _useState2[0],
|
|
4599
1748
|
setIsOpen = _useState2[1];
|
|
4600
1749
|
|
|
@@ -4620,12 +1769,12 @@ var SocialShareTemplate = function SocialShareTemplate(props) {
|
|
|
4620
1769
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4621
1770
|
className: "social-share-template-m_tablet-view__kATzi"
|
|
4622
1771
|
}, !isOpen && /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
4623
|
-
className:
|
|
1772
|
+
className: _getClassName__default["default"]("wrapper ".concat(isOpen ? "open" : ""), _styleModuleImportMap$q)
|
|
4624
1773
|
}, shareIcon()), isOpen && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4625
1774
|
className: "social-share-template-m_overlay__1nBp-",
|
|
4626
1775
|
onClick: clickHandler
|
|
4627
1776
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4628
|
-
className: "arr--popup " +
|
|
1777
|
+
className: "arr--popup " + _getClassName__default["default"]("popup-wrapper ".concat(isOpen ? "popup-open" : ""), _styleModuleImportMap$q)
|
|
4629
1778
|
}, /*#__PURE__*/React__default["default"].createElement(SocialSharePopup, {
|
|
4630
1779
|
fbUrl: fbUrl,
|
|
4631
1780
|
twitterUrl: twitterUrl,
|
|
@@ -4642,14 +1791,14 @@ var SocialShareTemplate = function SocialShareTemplate(props) {
|
|
|
4642
1791
|
var popupStyle = !isOpen && vertical ? "tablet-view-popup" : "";
|
|
4643
1792
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4644
1793
|
"data-test-id": verticalShare,
|
|
4645
|
-
className: "arr--share " +
|
|
1794
|
+
className: "arr--share " + _getClassName__default["default"]("".concat(iconShade, " ").concat(verticalShare, " ").concat(popupStyle), _styleModuleImportMap$q)
|
|
4646
1795
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4647
1796
|
className: "social-share-template-m_desktop-view__3TmkO"
|
|
4648
1797
|
}, /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
4649
|
-
"data-test-id":
|
|
4650
|
-
className: "desktop-share-wrapper " +
|
|
1798
|
+
"data-test-id": lodash.camelCase(iconType),
|
|
1799
|
+
className: "desktop-share-wrapper " + _getClassName__default["default"]("wrapper ".concat(isOpen ? "open" : ""), _styleModuleImportMap$q)
|
|
4651
1800
|
}, shareIcon(), iconsList.map(function (iconData, index) {
|
|
4652
|
-
return /*#__PURE__*/React__default["default"].createElement(ShareItem,
|
|
1801
|
+
return /*#__PURE__*/React__default["default"].createElement(ShareItem, _extends__default["default"]({}, iconData, {
|
|
4653
1802
|
key: iconData.name,
|
|
4654
1803
|
dataTestId: "card-share-".concat(index)
|
|
4655
1804
|
}));
|
|
@@ -4666,50 +1815,16 @@ SocialShareTemplate.propTypes = {
|
|
|
4666
1815
|
open: PropTypes__default["default"]["boolean"]
|
|
4667
1816
|
};
|
|
4668
1817
|
|
|
4669
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
4670
|
-
if (source == null) return {};
|
|
4671
|
-
var target = {};
|
|
4672
|
-
var sourceKeys = Object.keys(source);
|
|
4673
|
-
var key, i;
|
|
4674
|
-
|
|
4675
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
4676
|
-
key = sourceKeys[i];
|
|
4677
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
4678
|
-
target[key] = source[key];
|
|
4679
|
-
}
|
|
4680
|
-
|
|
4681
|
-
return target;
|
|
4682
|
-
}
|
|
4683
|
-
|
|
4684
|
-
function _objectWithoutProperties(source, excluded) {
|
|
4685
|
-
if (source == null) return {};
|
|
4686
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
4687
|
-
var key, i;
|
|
4688
|
-
|
|
4689
|
-
if (Object.getOwnPropertySymbols) {
|
|
4690
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
4691
|
-
|
|
4692
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
4693
|
-
key = sourceSymbolKeys[i];
|
|
4694
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
4695
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
4696
|
-
target[key] = source[key];
|
|
4697
|
-
}
|
|
4698
|
-
}
|
|
4699
|
-
|
|
4700
|
-
return target;
|
|
4701
|
-
}
|
|
4702
|
-
|
|
4703
1818
|
var _excluded$e = ["element", "render"];
|
|
4704
1819
|
var withElementWrapper = function withElementWrapper(StoryElement) {
|
|
4705
1820
|
return function (props) {
|
|
4706
1821
|
var element = props.element,
|
|
4707
1822
|
render = props.render,
|
|
4708
|
-
restProps =
|
|
1823
|
+
restProps = _objectWithoutProperties__default["default"](props, _excluded$e);
|
|
4709
1824
|
|
|
4710
1825
|
if (!element) return null;
|
|
4711
1826
|
if (render && typeof render === "function") return render(props);
|
|
4712
|
-
return /*#__PURE__*/React__default["default"].createElement(StoryElement,
|
|
1827
|
+
return /*#__PURE__*/React__default["default"].createElement(StoryElement, _extends__default["default"]({}, restProps, {
|
|
4713
1828
|
element: element
|
|
4714
1829
|
}));
|
|
4715
1830
|
};
|
|
@@ -4739,7 +1854,7 @@ var TextBase = function TextBase(_ref) {
|
|
|
4739
1854
|
css = _ref$css === void 0 ? {} : _ref$css;
|
|
4740
1855
|
_ref.story;
|
|
4741
1856
|
_ref.config;
|
|
4742
|
-
var restProps =
|
|
1857
|
+
var restProps = _objectWithoutProperties__default["default"](_ref, _excluded$d);
|
|
4743
1858
|
|
|
4744
1859
|
var content = element.text;
|
|
4745
1860
|
if (!content) return null;
|
|
@@ -4749,9 +1864,9 @@ var TextBase = function TextBase(_ref) {
|
|
|
4749
1864
|
var _opts$isExternalLink = opts.isExternalLink,
|
|
4750
1865
|
isExternalLink = _opts$isExternalLink === void 0 ? true : _opts$isExternalLink;
|
|
4751
1866
|
var text = isExternalLink && updateContentLinks(content) || content;
|
|
4752
|
-
var isPromotionalMessage =
|
|
1867
|
+
var isPromotionalMessage = lodash.get(element, ["metadata", "promotional-message"], false);
|
|
4753
1868
|
var updatedStyle = isPromotionalMessage ? "promotionalMessage" : "textElement";
|
|
4754
|
-
return /*#__PURE__*/React__default["default"].createElement("div",
|
|
1869
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({
|
|
4755
1870
|
style: !isPromotionalMessage ? {
|
|
4756
1871
|
color: textColor
|
|
4757
1872
|
} : {},
|
|
@@ -4761,7 +1876,7 @@ var TextBase = function TextBase(_ref) {
|
|
|
4761
1876
|
},
|
|
4762
1877
|
id: "text-element"
|
|
4763
1878
|
}, restProps, {
|
|
4764
|
-
className: "arrow-component arr--text-element " +
|
|
1879
|
+
className: "arrow-component arr--text-element " + _getClassName__default["default"]("".concat(updatedStyle, " ").concat(textInvertColor), _styleModuleImportMap$p) + (" " + (restProps ? restProps.className || "" : ""))
|
|
4765
1880
|
}));
|
|
4766
1881
|
};
|
|
4767
1882
|
|
|
@@ -4805,7 +1920,7 @@ var BlurbBase = function BlurbBase(_ref) {
|
|
|
4805
1920
|
_ref.story;
|
|
4806
1921
|
_ref.config;
|
|
4807
1922
|
_ref.render;
|
|
4808
|
-
var restProps =
|
|
1923
|
+
var restProps = _objectWithoutProperties__default["default"](_ref, _excluded$c);
|
|
4809
1924
|
|
|
4810
1925
|
var content = element.text;
|
|
4811
1926
|
var borderColor = css.borderColor;
|
|
@@ -4816,7 +1931,7 @@ var BlurbBase = function BlurbBase(_ref) {
|
|
|
4816
1931
|
};
|
|
4817
1932
|
|
|
4818
1933
|
var _useState = React.useState(initBorderDirection),
|
|
4819
|
-
_useState2 =
|
|
1934
|
+
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
4820
1935
|
borderDirection = _useState2[0],
|
|
4821
1936
|
setBorderDirection = _useState2[1];
|
|
4822
1937
|
|
|
@@ -4838,14 +1953,14 @@ var BlurbBase = function BlurbBase(_ref) {
|
|
|
4838
1953
|
var templateStyle = template ? "blurb-".concat(template) : "blurb";
|
|
4839
1954
|
var configData = useStateValue() || {};
|
|
4840
1955
|
var textInvertColor = getTextColor(configData.theme);
|
|
4841
|
-
return /*#__PURE__*/React__default["default"].createElement("div",
|
|
1956
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({
|
|
4842
1957
|
"data-test-id": "blurb",
|
|
4843
1958
|
style: borderColor && borderDirection,
|
|
4844
1959
|
dangerouslySetInnerHTML: {
|
|
4845
1960
|
__html: text
|
|
4846
1961
|
}
|
|
4847
1962
|
}, restProps, {
|
|
4848
|
-
className: "arrow-component arr-custom-style arr--blurb-element " +
|
|
1963
|
+
className: "arrow-component arr-custom-style arr--blurb-element " + _getClassName__default["default"]("".concat(templateStyle, " ").concat(textInvertColor), _styleModuleImportMap$o) + (" " + (restProps ? restProps.className || "" : ""))
|
|
4849
1964
|
}));
|
|
4850
1965
|
};
|
|
4851
1966
|
|
|
@@ -4894,7 +2009,7 @@ var SummaryBase = function SummaryBase(_ref) {
|
|
|
4894
2009
|
_ref.story;
|
|
4895
2010
|
_ref.config;
|
|
4896
2011
|
_ref.render;
|
|
4897
|
-
var restProps =
|
|
2012
|
+
var restProps = _objectWithoutProperties__default["default"](_ref, _excluded$b);
|
|
4898
2013
|
|
|
4899
2014
|
var configData = useStateValue() || {};
|
|
4900
2015
|
var textInvertColor = getTextColor(configData.theme);
|
|
@@ -4915,23 +2030,23 @@ var SummaryBase = function SummaryBase(_ref) {
|
|
|
4915
2030
|
var updateHeaderColor = renderTemplate ? "".concat(headerBgColor) : "";
|
|
4916
2031
|
var textColor = renderTemplate ? getTextColor(headerBgColor) : "";
|
|
4917
2032
|
var updateContentColor = template === "header" ? "" : textInvertColor;
|
|
4918
|
-
return /*#__PURE__*/React__default["default"].createElement("div",
|
|
2033
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({
|
|
4919
2034
|
"data-test-id": "summary"
|
|
4920
2035
|
}, restProps, {
|
|
4921
|
-
className: "arrow-component arr--summary-element arr-custom-style " +
|
|
2036
|
+
className: "arrow-component arr--summary-element arr-custom-style " + _getClassName__default["default"](templateStyle, _styleModuleImportMap$n) + (" " + (restProps ? restProps.className || "" : ""))
|
|
4922
2037
|
}), !hideHeadline && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4923
2038
|
"data-test-id": "summary-headline",
|
|
4924
|
-
className:
|
|
2039
|
+
className: _getClassName__default["default"]("heading-wrapper ".concat(textInvertColor), _styleModuleImportMap$n)
|
|
4925
2040
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4926
2041
|
style: {
|
|
4927
2042
|
backgroundColor: updateHeaderColor
|
|
4928
2043
|
},
|
|
4929
|
-
className:
|
|
2044
|
+
className: _getClassName__default["default"]("headline ".concat(textColor, " ").concat(textInvertColor), _styleModuleImportMap$n)
|
|
4930
2045
|
}, headline)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4931
2046
|
dangerouslySetInnerHTML: {
|
|
4932
2047
|
__html: text
|
|
4933
2048
|
},
|
|
4934
|
-
className:
|
|
2049
|
+
className: _getClassName__default["default"]("content ".concat(contentBorder, " ").concat(updateContentColor, " ").concat(textInvertColor), _styleModuleImportMap$n)
|
|
4935
2050
|
}));
|
|
4936
2051
|
};
|
|
4937
2052
|
|
|
@@ -5082,9 +2197,9 @@ var BlockQuoteBase = function BlockQuoteBase(_ref) {
|
|
|
5082
2197
|
_ref.story;
|
|
5083
2198
|
_ref.config;
|
|
5084
2199
|
_ref.render;
|
|
5085
|
-
var restProps =
|
|
2200
|
+
var restProps = _objectWithoutProperties__default["default"](_ref, _excluded$a);
|
|
5086
2201
|
|
|
5087
|
-
var _get =
|
|
2202
|
+
var _get = lodash.get(element, ["metadata"]),
|
|
5088
2203
|
content = _get.content,
|
|
5089
2204
|
attribution = _get.attribution;
|
|
5090
2205
|
|
|
@@ -5116,11 +2231,11 @@ var BlockQuoteBase = function BlockQuoteBase(_ref) {
|
|
|
5116
2231
|
}, SelectionOfIcon(iconType, template, blockQuoteColor, textColor));
|
|
5117
2232
|
};
|
|
5118
2233
|
|
|
5119
|
-
return /*#__PURE__*/React__default["default"].createElement("div",
|
|
2234
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({
|
|
5120
2235
|
"data-test-id": "blockquote",
|
|
5121
2236
|
style: theme
|
|
5122
2237
|
}, restProps, {
|
|
5123
|
-
className: "arrow-component arr--block-quote " +
|
|
2238
|
+
className: "arrow-component arr--block-quote " + _getClassName__default["default"]("".concat(templateStyle, " ").concat(textColor), _styleModuleImportMap$m) + (" " + (restProps ? restProps.className || "" : ""))
|
|
5124
2239
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5125
2240
|
className: "block-quote-m_quote-wrapper__83bEy"
|
|
5126
2241
|
}, updateStructure(), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -5132,12 +2247,12 @@ var BlockQuoteBase = function BlockQuoteBase(_ref) {
|
|
|
5132
2247
|
dangerouslySetInnerHTML: {
|
|
5133
2248
|
__html: content
|
|
5134
2249
|
},
|
|
5135
|
-
className:
|
|
2250
|
+
className: _getClassName__default["default"]("content ".concat(textInvertColor), _styleModuleImportMap$m)
|
|
5136
2251
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5137
2252
|
dangerouslySetInnerHTML: {
|
|
5138
2253
|
__html: attribution
|
|
5139
2254
|
},
|
|
5140
|
-
className:
|
|
2255
|
+
className: _getClassName__default["default"]("attribution ".concat(textInvertColor), _styleModuleImportMap$m)
|
|
5141
2256
|
}))));
|
|
5142
2257
|
};
|
|
5143
2258
|
BlockQuoteBase.propTypes = {
|
|
@@ -5172,22 +2287,22 @@ var BigFactBase = function BigFactBase(_ref) {
|
|
|
5172
2287
|
var element = _ref.element;
|
|
5173
2288
|
_ref.story;
|
|
5174
2289
|
_ref.config;
|
|
5175
|
-
var restProps =
|
|
2290
|
+
var restProps = _objectWithoutProperties__default["default"](_ref, _excluded$9);
|
|
5176
2291
|
|
|
5177
2292
|
var configData = useStateValue() || {};
|
|
5178
2293
|
var textInvertColor = getTextColor(configData.theme);
|
|
5179
2294
|
var _element$metadata = element.metadata,
|
|
5180
2295
|
content = _element$metadata.content,
|
|
5181
2296
|
attribution = _element$metadata.attribution;
|
|
5182
|
-
return /*#__PURE__*/React__default["default"].createElement("div",
|
|
2297
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({
|
|
5183
2298
|
"data-test-id": "bigfact"
|
|
5184
2299
|
}, restProps, {
|
|
5185
|
-
className: "arrow-component arr--bigfact-element " +
|
|
2300
|
+
className: "arrow-component arr--bigfact-element " + _getClassName__default["default"]("bigfact-element ".concat(textInvertColor), _styleModuleImportMap$l) + (" " + (restProps ? restProps.className || "" : ""))
|
|
5186
2301
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5187
2302
|
className: "big-fact-m_content__1u2Ul"
|
|
5188
2303
|
}, content), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5189
2304
|
"data-test-id": "attribution",
|
|
5190
|
-
className:
|
|
2305
|
+
className: _getClassName__default["default"]("attribution ".concat(textInvertColor), _styleModuleImportMap$l)
|
|
5191
2306
|
}, attribution));
|
|
5192
2307
|
};
|
|
5193
2308
|
|
|
@@ -5273,14 +2388,14 @@ var AlsoReadBase = function AlsoReadBase(_ref2) {
|
|
|
5273
2388
|
css = _ref2$css === void 0 ? {} : _ref2$css;
|
|
5274
2389
|
_ref2.config;
|
|
5275
2390
|
_ref2.render;
|
|
5276
|
-
var restProps =
|
|
2391
|
+
var restProps = _objectWithoutProperties__default["default"](_ref2, _excluded$8);
|
|
5277
2392
|
|
|
5278
2393
|
var content = element.text;
|
|
5279
2394
|
if (!content) return null;
|
|
5280
|
-
var linkedStories =
|
|
5281
|
-
var linkedStoryId =
|
|
5282
|
-
var linkedStorySlug =
|
|
5283
|
-
var linkedImage =
|
|
2395
|
+
var linkedStories = lodash.get(story, ["linked-stories"], {});
|
|
2396
|
+
var linkedStoryId = lodash.get(element, ["metadata", "linked-story-id"]);
|
|
2397
|
+
var linkedStorySlug = lodash.get(linkedStories, [linkedStoryId, "url"]);
|
|
2398
|
+
var linkedImage = lodash.get(linkedStories, [linkedStoryId, "hero-image-s3-key"], "");
|
|
5284
2399
|
var storyUrl = linkedStorySlug && linkedStorySlug;
|
|
5285
2400
|
var configData = useStateValue() || {};
|
|
5286
2401
|
var textInvertColor = getTextColor(configData.theme);
|
|
@@ -5291,14 +2406,14 @@ var AlsoReadBase = function AlsoReadBase(_ref2) {
|
|
|
5291
2406
|
var isDefault = template === "" || template === "default";
|
|
5292
2407
|
var isRightAlign = template === "imageRightAlign";
|
|
5293
2408
|
var templateStyle = template ? "alsoread-".concat(template) : "alsoread-default";
|
|
5294
|
-
return /*#__PURE__*/React__default["default"].createElement(components.Link,
|
|
2409
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, _extends__default["default"]({
|
|
5295
2410
|
"data-test-id": "also-read",
|
|
5296
2411
|
href: storyUrl,
|
|
5297
2412
|
"aria-label": "also-read"
|
|
5298
2413
|
}, restProps, {
|
|
5299
|
-
className: "arrow-component arr--also-read-element " +
|
|
2414
|
+
className: "arrow-component arr--also-read-element " + _getClassName__default["default"](templateStyle, _styleModuleImportMap$k) + (" " + (restProps ? restProps.className || "" : ""))
|
|
5300
2415
|
}), !isDefault && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5301
|
-
className:
|
|
2416
|
+
className: _getClassName__default["default"]("default-text ".concat(textInvertColor), _styleModuleImportMap$k)
|
|
5302
2417
|
}, displayTitle), isDefault && /*#__PURE__*/React__default["default"].createElement(DisplayImage, {
|
|
5303
2418
|
story: story,
|
|
5304
2419
|
linkedImage: linkedImage,
|
|
@@ -5484,7 +2599,7 @@ Loading.propTypes = {
|
|
|
5484
2599
|
|
|
5485
2600
|
function ownKeys$2(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; }
|
|
5486
2601
|
|
|
5487
|
-
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) {
|
|
2602
|
+
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5488
2603
|
var Lightbox = /*#__PURE__*/React.lazy(function () {
|
|
5489
2604
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-image-lightbox')); });
|
|
5490
2605
|
});
|
|
@@ -5496,27 +2611,27 @@ var FullScreenImages = function FullScreenImages(_ref) {
|
|
|
5496
2611
|
element = _ref$element === void 0 ? {} : _ref$element,
|
|
5497
2612
|
props = _ref.props;
|
|
5498
2613
|
var cdnImage = reactRedux.useSelector(function (state) {
|
|
5499
|
-
return
|
|
2614
|
+
return lodash.get(state, ["qt", "config", "cdn-image"]);
|
|
5500
2615
|
});
|
|
5501
2616
|
|
|
5502
2617
|
var _useState = React.useState(0),
|
|
5503
|
-
_useState2 =
|
|
2618
|
+
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
5504
2619
|
photoIndex = _useState2[0],
|
|
5505
2620
|
handleImage = _useState2[1];
|
|
5506
2621
|
|
|
5507
2622
|
var _useState3 = React.useState(false),
|
|
5508
|
-
_useState4 =
|
|
2623
|
+
_useState4 = _slicedToArray__default["default"](_useState3, 2),
|
|
5509
2624
|
isOpen = _useState4[0],
|
|
5510
2625
|
handleOpen = _useState4[1];
|
|
5511
2626
|
|
|
5512
|
-
var deviceWidth =
|
|
5513
|
-
var hyperlinks =
|
|
2627
|
+
var deviceWidth = lodash.get(global, ["innerWidth"], 0);
|
|
2628
|
+
var hyperlinks = lodash.get(element, ["story-elements"], []).map(function (image) {
|
|
5514
2629
|
return image.hyperlink;
|
|
5515
2630
|
});
|
|
5516
2631
|
var imageUrlList = [];
|
|
5517
2632
|
|
|
5518
2633
|
if (!imageSlug) {
|
|
5519
|
-
imageUrlList =
|
|
2634
|
+
imageUrlList = lodash.get(element, ["story-elements"], []).map(function (image) {
|
|
5520
2635
|
return "//".concat(cdnImage, "/").concat(image["image-s3-key"], "?w=").concat(deviceWidth);
|
|
5521
2636
|
});
|
|
5522
2637
|
}
|
|
@@ -5574,9 +2689,9 @@ var FullScreenImages = function FullScreenImages(_ref) {
|
|
|
5574
2689
|
return /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(Loading, null));
|
|
5575
2690
|
};
|
|
5576
2691
|
|
|
5577
|
-
return /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(template, _objectSpread$2(
|
|
2692
|
+
return /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(template, _objectSpread$2(_defineProperty__default["default"]({}, onClickKey, onClickHandler), props)), isOpen ? /*#__PURE__*/React__default["default"].createElement(React.Suspense, {
|
|
5578
2693
|
fallback: /*#__PURE__*/React__default["default"].createElement(LoadingScreen, null)
|
|
5579
|
-
}, /*#__PURE__*/React__default["default"].createElement(Lightbox,
|
|
2694
|
+
}, /*#__PURE__*/React__default["default"].createElement(Lightbox, _extends__default["default"]({
|
|
5580
2695
|
wrapperClassName: "arr--image-lightbox",
|
|
5581
2696
|
onCloseRequest: onClose
|
|
5582
2697
|
}, lightboxProps))) : null);
|
|
@@ -5601,7 +2716,7 @@ var ImageBase = function ImageBase(_ref) {
|
|
|
5601
2716
|
_ref.config;
|
|
5602
2717
|
var _ref$caption = _ref.caption,
|
|
5603
2718
|
caption = _ref$caption === void 0 ? true : _ref$caption,
|
|
5604
|
-
restProps =
|
|
2719
|
+
restProps = _objectWithoutProperties__default["default"](_ref, _excluded$7);
|
|
5605
2720
|
|
|
5606
2721
|
if (!element) return null;
|
|
5607
2722
|
var configData = useStateValue() || {};
|
|
@@ -5633,7 +2748,7 @@ var ImageBase = function ImageBase(_ref) {
|
|
|
5633
2748
|
ImageTemplate.propTypes = {
|
|
5634
2749
|
onClick: PropTypes__default["default"].func
|
|
5635
2750
|
};
|
|
5636
|
-
return /*#__PURE__*/React__default["default"].createElement("div",
|
|
2751
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({
|
|
5637
2752
|
className: "arrow-component arr--image-element"
|
|
5638
2753
|
}, restProps, {
|
|
5639
2754
|
"data-test-id": "image-element"
|
|
@@ -5687,12 +2802,12 @@ var _styleModuleImportMap$j = {
|
|
|
5687
2802
|
var supportedTemplates = function supportedTemplates(type, element) {
|
|
5688
2803
|
switch (type) {
|
|
5689
2804
|
case "q-and-a":
|
|
5690
|
-
var _get =
|
|
2805
|
+
var _get = lodash.get(element, ["metadata"]),
|
|
5691
2806
|
qaQuestion = _get.question,
|
|
5692
2807
|
qaAnswer = _get.answer;
|
|
5693
2808
|
|
|
5694
|
-
var qaQuestionAttribution =
|
|
5695
|
-
var qaAnswerAttribution =
|
|
2809
|
+
var qaQuestionAttribution = lodash.get(element, ["metadata", "interviewer", "avatar-url"]);
|
|
2810
|
+
var qaAnswerAttribution = lodash.get(element, ["metadata", "interviewee", "avatar-url"]);
|
|
5696
2811
|
return {
|
|
5697
2812
|
question: qaQuestion,
|
|
5698
2813
|
answer: qaAnswer,
|
|
@@ -5701,16 +2816,16 @@ var supportedTemplates = function supportedTemplates(type, element) {
|
|
|
5701
2816
|
};
|
|
5702
2817
|
|
|
5703
2818
|
case "question":
|
|
5704
|
-
var qQuestion =
|
|
5705
|
-
var qAttribution =
|
|
2819
|
+
var qQuestion = lodash.get(element, ["text"]);
|
|
2820
|
+
var qAttribution = lodash.get(element, ["metadata", "interviewer", "avatar-url"]);
|
|
5706
2821
|
return {
|
|
5707
2822
|
question: qQuestion,
|
|
5708
2823
|
questionAttribution: qAttribution
|
|
5709
2824
|
};
|
|
5710
2825
|
|
|
5711
2826
|
case "answer":
|
|
5712
|
-
var aAnswer =
|
|
5713
|
-
var aAttribution =
|
|
2827
|
+
var aAnswer = lodash.get(element, ["text"]);
|
|
2828
|
+
var aAttribution = lodash.get(element, ["metadata", "interviewee", "avatar-url"]);
|
|
5714
2829
|
return {
|
|
5715
2830
|
answer: aAnswer,
|
|
5716
2831
|
answerAttribution: aAttribution
|
|
@@ -5728,7 +2843,7 @@ var QuestionAnswerBase = function QuestionAnswerBase(_ref) {
|
|
|
5728
2843
|
var _ref$opts = _ref.opts,
|
|
5729
2844
|
opts = _ref$opts === void 0 ? {} : _ref$opts;
|
|
5730
2845
|
_ref.render;
|
|
5731
|
-
var restProps =
|
|
2846
|
+
var restProps = _objectWithoutProperties__default["default"](_ref, _excluded$6);
|
|
5732
2847
|
|
|
5733
2848
|
var configData = useStateValue() || {};
|
|
5734
2849
|
var textInvertColor = getTextColor(configData.theme);
|
|
@@ -5763,7 +2878,7 @@ var QuestionAnswerBase = function QuestionAnswerBase(_ref) {
|
|
|
5763
2878
|
style: {
|
|
5764
2879
|
backgroundColor: iconColor
|
|
5765
2880
|
},
|
|
5766
|
-
className:
|
|
2881
|
+
className: _getClassName__default["default"]("".concat(iconType, " ").concat(theme), _styleModuleImportMap$j)
|
|
5767
2882
|
}, "Q"); // EMPTY SPAN FOR EXTRA SPACE
|
|
5768
2883
|
|
|
5769
2884
|
var supportAnswerElement = isAuthorImageTemplate ? answerAttribution && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -5778,12 +2893,12 @@ var QuestionAnswerBase = function QuestionAnswerBase(_ref) {
|
|
|
5778
2893
|
style: {
|
|
5779
2894
|
backgroundColor: iconColor
|
|
5780
2895
|
},
|
|
5781
|
-
className:
|
|
2896
|
+
className: _getClassName__default["default"]("".concat(iconType, " ").concat(theme), _styleModuleImportMap$j)
|
|
5782
2897
|
}, "A");
|
|
5783
|
-
return /*#__PURE__*/React__default["default"].createElement("div",
|
|
2898
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({
|
|
5784
2899
|
"data-test-id": "question-answer"
|
|
5785
2900
|
}, restProps, {
|
|
5786
|
-
className: "arrow-component arr-custom-style arr--qa-element " +
|
|
2901
|
+
className: "arrow-component arr-custom-style arr--qa-element " + _getClassName__default["default"](templateStyle, _styleModuleImportMap$j) + (" " + (restProps ? restProps.className || "" : ""))
|
|
5787
2902
|
}), type !== "answer" && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5788
2903
|
className: "question-answer-m_q-element__1ZA5d",
|
|
5789
2904
|
"data-test-id": "question"
|
|
@@ -5791,7 +2906,7 @@ var QuestionAnswerBase = function QuestionAnswerBase(_ref) {
|
|
|
5791
2906
|
dangerouslySetInnerHTML: {
|
|
5792
2907
|
__html: questionData
|
|
5793
2908
|
},
|
|
5794
|
-
className:
|
|
2909
|
+
className: _getClassName__default["default"]("content ".concat(textInvertColor), _styleModuleImportMap$j)
|
|
5795
2910
|
})), type !== "question" && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5796
2911
|
className: "question-answer-m_a-element__BTxfl",
|
|
5797
2912
|
"data-test-id": "answer"
|
|
@@ -5799,7 +2914,7 @@ var QuestionAnswerBase = function QuestionAnswerBase(_ref) {
|
|
|
5799
2914
|
dangerouslySetInnerHTML: {
|
|
5800
2915
|
__html: answerData
|
|
5801
2916
|
},
|
|
5802
|
-
className:
|
|
2917
|
+
className: _getClassName__default["default"]("content ".concat(textInvertColor), _styleModuleImportMap$j)
|
|
5803
2918
|
})));
|
|
5804
2919
|
};
|
|
5805
2920
|
|
|
@@ -5850,7 +2965,7 @@ var ImageGalleryBase = function ImageGalleryBase(_ref) {
|
|
|
5850
2965
|
_ref.opts;
|
|
5851
2966
|
_ref.story;
|
|
5852
2967
|
_ref.config;
|
|
5853
|
-
var restProps =
|
|
2968
|
+
var restProps = _objectWithoutProperties__default["default"](_ref, _excluded$5);
|
|
5854
2969
|
|
|
5855
2970
|
if (!element) return null;
|
|
5856
2971
|
var isMobile = clientWidth("mobile");
|
|
@@ -5870,14 +2985,14 @@ var ImageGalleryBase = function ImageGalleryBase(_ref) {
|
|
|
5870
2985
|
var images = renderImage.map(function (image, index) {
|
|
5871
2986
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5872
2987
|
key: index,
|
|
5873
|
-
className:
|
|
2988
|
+
className: _getClassName__default["default"](hyperlinkClass(image["hyperlink"]), _styleModuleImportMap$i)
|
|
5874
2989
|
}, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
5875
2990
|
key: index,
|
|
5876
2991
|
"data-text-id": "image-".concat(index),
|
|
5877
2992
|
onClick: function onClick() {
|
|
5878
2993
|
return onClickHandler && onClickHandler(index);
|
|
5879
2994
|
},
|
|
5880
|
-
className:
|
|
2995
|
+
className: _getClassName__default["default"]("image ".concat(classes), _styleModuleImportMap$i)
|
|
5881
2996
|
}, /*#__PURE__*/React__default["default"].createElement(components.ResponsiveImage, {
|
|
5882
2997
|
slug: image["image-s3-key"],
|
|
5883
2998
|
metadata: image["image-metadata"],
|
|
@@ -5891,7 +3006,7 @@ var ImageGalleryBase = function ImageGalleryBase(_ref) {
|
|
|
5891
3006
|
hyperLink: image["hyperlink"]
|
|
5892
3007
|
}));
|
|
5893
3008
|
});
|
|
5894
|
-
return /*#__PURE__*/React__default["default"].createElement("div",
|
|
3009
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({
|
|
5895
3010
|
className: " arrow-component arr--image-element image-gallery-m_image-gallery__1Q7if" + (" " + (restProps ? restProps.className || "" : ""))
|
|
5896
3011
|
}, restProps, {
|
|
5897
3012
|
"data-test-id": "image-gallery"
|
|
@@ -5926,9 +3041,9 @@ var StoryElementBase = function StoryElementBase(_ref) {
|
|
|
5926
3041
|
var element = _ref.element;
|
|
5927
3042
|
_ref.story;
|
|
5928
3043
|
_ref.config;
|
|
5929
|
-
var restProps =
|
|
3044
|
+
var restProps = _objectWithoutProperties__default["default"](_ref, _excluded$4);
|
|
5930
3045
|
|
|
5931
|
-
return /*#__PURE__*/React__default["default"].createElement("div",
|
|
3046
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({}, restProps, {
|
|
5932
3047
|
"data-test-id": "story-elements"
|
|
5933
3048
|
}), /*#__PURE__*/React__default["default"].createElement(components.StoryElement, {
|
|
5934
3049
|
element: element
|
|
@@ -5950,9 +3065,9 @@ var Videobase = function Videobase(_ref) {
|
|
|
5950
3065
|
_ref.config;
|
|
5951
3066
|
var _ref$loadIframeOnClic = _ref.loadIframeOnClick,
|
|
5952
3067
|
loadIframeOnClick = _ref$loadIframeOnClic === void 0 ? false : _ref$loadIframeOnClic,
|
|
5953
|
-
restProps =
|
|
3068
|
+
restProps = _objectWithoutProperties__default["default"](_ref, _excluded$3);
|
|
5954
3069
|
|
|
5955
|
-
return /*#__PURE__*/React__default["default"].createElement("div",
|
|
3070
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({
|
|
5956
3071
|
className: "video-m_container__MYuWI" + (" " + (restProps ? restProps.className || "" : ""))
|
|
5957
3072
|
}, restProps, {
|
|
5958
3073
|
"data-test-id": "video"
|
|
@@ -5996,7 +3111,7 @@ var QuoteBase = function QuoteBase(_ref) {
|
|
|
5996
3111
|
_ref.story;
|
|
5997
3112
|
_ref.config;
|
|
5998
3113
|
_ref.render;
|
|
5999
|
-
var restProps =
|
|
3114
|
+
var restProps = _objectWithoutProperties__default["default"](_ref, _excluded$2);
|
|
6000
3115
|
|
|
6001
3116
|
var configData = useStateValue() || {};
|
|
6002
3117
|
var textInvertColor = getTextColor(configData.theme);
|
|
@@ -6007,10 +3122,10 @@ var QuoteBase = function QuoteBase(_ref) {
|
|
|
6007
3122
|
var borderColor = css.borderColor;
|
|
6008
3123
|
var updateBorderColor = template === "borderLeft" && "4px solid ".concat(borderColor);
|
|
6009
3124
|
var templateStyle = template ? "quote-".concat(template) : "quote";
|
|
6010
|
-
return /*#__PURE__*/React__default["default"].createElement("div",
|
|
3125
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({
|
|
6011
3126
|
"data-test-id": "quote"
|
|
6012
3127
|
}, restProps, {
|
|
6013
|
-
className: "arrow-component arr--quote-element " +
|
|
3128
|
+
className: "arrow-component arr--quote-element " + _getClassName__default["default"](templateStyle, _styleModuleImportMap$h) + (" " + (restProps ? restProps.className || "" : ""))
|
|
6014
3129
|
}), template === "borderTopSmall" && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6015
3130
|
className: "quote-m_line__3gtoE",
|
|
6016
3131
|
style: borderColor && {
|
|
@@ -6023,10 +3138,10 @@ var QuoteBase = function QuoteBase(_ref) {
|
|
|
6023
3138
|
dangerouslySetInnerHTML: {
|
|
6024
3139
|
__html: content
|
|
6025
3140
|
},
|
|
6026
|
-
className:
|
|
3141
|
+
className: _getClassName__default["default"]("text ".concat(textInvertColor), _styleModuleImportMap$h)
|
|
6027
3142
|
}), /*#__PURE__*/React__default["default"].createElement("p", {
|
|
6028
3143
|
"data-test-id": "quote-attribution",
|
|
6029
|
-
className:
|
|
3144
|
+
className: _getClassName__default["default"]("attribution ".concat(textInvertColor), _styleModuleImportMap$h)
|
|
6030
3145
|
}, attribution));
|
|
6031
3146
|
};
|
|
6032
3147
|
|
|
@@ -6066,7 +3181,7 @@ var ReferenceBase = function ReferenceBase(_ref) {
|
|
|
6066
3181
|
_ref.config;
|
|
6067
3182
|
var _ref$opts = _ref.opts,
|
|
6068
3183
|
opts = _ref$opts === void 0 ? {} : _ref$opts,
|
|
6069
|
-
restProps =
|
|
3184
|
+
restProps = _objectWithoutProperties__default["default"](_ref, _excluded$1);
|
|
6070
3185
|
|
|
6071
3186
|
if (!element) return null;
|
|
6072
3187
|
var configData = useStateValue() || {};
|
|
@@ -6077,7 +3192,7 @@ var ReferenceBase = function ReferenceBase(_ref) {
|
|
|
6077
3192
|
var _opts$showHeadline = opts.showHeadline,
|
|
6078
3193
|
showHeadline = _opts$showHeadline === void 0 ? true : _opts$showHeadline,
|
|
6079
3194
|
headlineText = opts.headlineText;
|
|
6080
|
-
return /*#__PURE__*/React__default["default"].createElement("div",
|
|
3195
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({
|
|
6081
3196
|
className: "arrow-component arr--reference-element"
|
|
6082
3197
|
}, restProps), eleArr && eleArr.map(function (metadata, index) {
|
|
6083
3198
|
var _metadata$name = metadata.name,
|
|
@@ -6087,7 +3202,7 @@ var ReferenceBase = function ReferenceBase(_ref) {
|
|
|
6087
3202
|
url = metadata.url;
|
|
6088
3203
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6089
3204
|
key: index,
|
|
6090
|
-
className:
|
|
3205
|
+
className: _getClassName__default["default"]("wrapper ".concat(textInvertColor), _styleModuleImportMap$g)
|
|
6091
3206
|
}, /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
6092
3207
|
href: url,
|
|
6093
3208
|
"aria-label": "reference-headline"
|
|
@@ -6139,7 +3254,7 @@ var AttachmentBase = function AttachmentBase(_ref) {
|
|
|
6139
3254
|
var _ref$element = _ref.element,
|
|
6140
3255
|
element = _ref$element === void 0 ? {} : _ref$element;
|
|
6141
3256
|
_ref.render;
|
|
6142
|
-
var restProps =
|
|
3257
|
+
var restProps = _objectWithoutProperties__default["default"](_ref, _excluded);
|
|
6143
3258
|
|
|
6144
3259
|
var fileName = element["file-name"],
|
|
6145
3260
|
url = element.url,
|
|
@@ -6153,10 +3268,10 @@ var AttachmentBase = function AttachmentBase(_ref) {
|
|
|
6153
3268
|
var textColor = getTextColor(configData.theme);
|
|
6154
3269
|
var defaultName = isPdf ? "Attached PDF" : "Attached DOC";
|
|
6155
3270
|
var defaultFileName = fileName || defaultName;
|
|
6156
|
-
return /*#__PURE__*/React__default["default"].createElement("div",
|
|
3271
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({
|
|
6157
3272
|
"data-test-id": "attachment"
|
|
6158
3273
|
}, restProps, {
|
|
6159
|
-
className: "arrow-component arr--attachment-element " +
|
|
3274
|
+
className: "arrow-component arr--attachment-element " + _getClassName__default["default"](textColor, _styleModuleImportMap$f) + (" " + (restProps ? restProps.className || "" : ""))
|
|
6160
3275
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6161
3276
|
className: "attachment-m_headline__kP7Hs"
|
|
6162
3277
|
}, "Attachment"), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -6277,12 +3392,12 @@ var SliderArrow = function SliderArrow(_ref) {
|
|
|
6277
3392
|
var getRightArrowClassName = languageDirection === "rtl" ? "right-arrow-rtl" : "right-arrow-ltr";
|
|
6278
3393
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, selectedIndex !== 0 ? /*#__PURE__*/React__default["default"].createElement("button", {
|
|
6279
3394
|
onClick: previousClick,
|
|
6280
|
-
className: ("left-arrow ".concat(getLeftArrowClassName) ? "left-arrow ".concat(getLeftArrowClassName) + " " : "") +
|
|
3395
|
+
className: ("left-arrow ".concat(getLeftArrowClassName) ? "left-arrow ".concat(getLeftArrowClassName) + " " : "") + _getClassName__default["default"]("arrow left-arrow-".concat(textColor, " ").concat(getLeftArrowClassName), _styleModuleImportMap$e)
|
|
6281
3396
|
}, /*#__PURE__*/React__default["default"].createElement(LeftArrow, {
|
|
6282
3397
|
color: textColor === "dark" ? "#fff" : "#333"
|
|
6283
3398
|
})) : null, selectedIndex < noOfItems - 1 && rightArrowView() ? /*#__PURE__*/React__default["default"].createElement("button", {
|
|
6284
3399
|
onClick: nextClick,
|
|
6285
|
-
className: ("right-arrow ".concat(getRightArrowClassName) ? "right-arrow ".concat(getRightArrowClassName) + " " : "") +
|
|
3400
|
+
className: ("right-arrow ".concat(getRightArrowClassName) ? "right-arrow ".concat(getRightArrowClassName) + " " : "") + _getClassName__default["default"]("arrow right-arrow-".concat(textColor, " ").concat(getRightArrowClassName), _styleModuleImportMap$e)
|
|
6286
3401
|
}, /*#__PURE__*/React__default["default"].createElement(RightArrow, {
|
|
6287
3402
|
color: textColor === "dark" ? "#fff" : "#333"
|
|
6288
3403
|
})) : null);
|
|
@@ -6333,7 +3448,7 @@ var SliderIndicator = function SliderIndicator(_ref) {
|
|
|
6333
3448
|
}
|
|
6334
3449
|
}, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
6335
3450
|
"aria-pressed": selectedIndex === index ? "true" : "false",
|
|
6336
|
-
className: ("indicator-button indicator-".concat(indicatorType) ? "indicator-button indicator-".concat(indicatorType) + " " : "") +
|
|
3451
|
+
className: ("indicator-button indicator-".concat(indicatorType) ? "indicator-button indicator-".concat(indicatorType) + " " : "") + _getClassName__default["default"]("indicator-button indicator-".concat(indicatorType, " indicator-").concat(indicatorType, "-").concat(textColor), _styleModuleImportMap$d)
|
|
6337
3452
|
}));
|
|
6338
3453
|
}));
|
|
6339
3454
|
};
|
|
@@ -6348,7 +3463,7 @@ SliderIndicator.propTypes = {
|
|
|
6348
3463
|
var smoothScroll = function smoothScroll(node, topOrLeft, horizontal) {
|
|
6349
3464
|
var _node$scrollTo;
|
|
6350
3465
|
|
|
6351
|
-
node.scrollTo((_node$scrollTo = {},
|
|
3466
|
+
node.scrollTo((_node$scrollTo = {}, _defineProperty__default["default"](_node$scrollTo, horizontal ? "left" : "top", topOrLeft), _defineProperty__default["default"](_node$scrollTo, "behavior", "smooth"), _node$scrollTo));
|
|
6352
3467
|
};
|
|
6353
3468
|
|
|
6354
3469
|
var updateItemSelection = function updateItemSelection(index, languageDirection, scroller, noOfItems) {
|
|
@@ -6378,17 +3493,17 @@ var ScrollSnap = function ScrollSnap(_ref) {
|
|
|
6378
3493
|
slideIndicator = _ref.slideIndicator;
|
|
6379
3494
|
|
|
6380
3495
|
var _useState = React.useState(0),
|
|
6381
|
-
_useState2 =
|
|
3496
|
+
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
6382
3497
|
selectedIndex = _useState2[0],
|
|
6383
3498
|
setSelectedIndex = _useState2[1];
|
|
6384
3499
|
|
|
6385
3500
|
var _useState3 = React.useState(false),
|
|
6386
|
-
_useState4 =
|
|
3501
|
+
_useState4 = _slicedToArray__default["default"](_useState3, 2),
|
|
6387
3502
|
autoScroll = _useState4[0],
|
|
6388
3503
|
setAutoScroll = _useState4[1];
|
|
6389
3504
|
|
|
6390
3505
|
var languageDirection = reactRedux.useSelector(function (state) {
|
|
6391
|
-
return
|
|
3506
|
+
return lodash.get(state, ["qt", "config", "language", "direction"], "ltr");
|
|
6392
3507
|
});
|
|
6393
3508
|
var noOfItems = children ? children.length : 0;
|
|
6394
3509
|
var scroller = React.useRef(null);
|
|
@@ -6545,7 +3660,7 @@ var ImageSlideshowBase = function ImageSlideshowBase(props) {
|
|
|
6545
3660
|
|
|
6546
3661
|
var ImageSlideshowTemplate = function ImageSlideshowTemplate(_ref) {
|
|
6547
3662
|
var onClickHandler = _ref.onClickHandler;
|
|
6548
|
-
var storyElements =
|
|
3663
|
+
var storyElements = lodash.get(props, ["element", "story-elements"], []);
|
|
6549
3664
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6550
3665
|
className: "arr--image-slideshow-element image-slideshow-m_slideshow__3jRFX",
|
|
6551
3666
|
"data-test-id": "image-slideshow"
|
|
@@ -6621,11 +3736,11 @@ var getElement = function getElement(story, element) {
|
|
|
6621
3736
|
elementType = element.metadata["type"];
|
|
6622
3737
|
}
|
|
6623
3738
|
|
|
6624
|
-
var storyElementId =
|
|
3739
|
+
var storyElementId = lodash.get(element, ["id"]);
|
|
6625
3740
|
|
|
6626
3741
|
switch (elementType) {
|
|
6627
3742
|
case "ad":
|
|
6628
|
-
return /*#__PURE__*/React__default["default"].createElement(AdComponent,
|
|
3743
|
+
return /*#__PURE__*/React__default["default"].createElement(AdComponent, _extends__default["default"]({}, element, {
|
|
6629
3744
|
id: "ad-".concat(index, "_").concat(cardId)
|
|
6630
3745
|
}));
|
|
6631
3746
|
|
|
@@ -6920,7 +4035,7 @@ var StoryElementCard = function StoryElementCard(_ref2) {
|
|
|
6920
4035
|
var shouldRunFBMobileVideoFix = true;
|
|
6921
4036
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6922
4037
|
className: "arr--story-page-card-wrapper"
|
|
6923
|
-
},
|
|
4038
|
+
}, lodash.get(card, ["story-elements"], []).map(function (element, index) {
|
|
6924
4039
|
if (element.id === heroVideoElementId) return false;
|
|
6925
4040
|
|
|
6926
4041
|
if (element.subtype && element.subtype === "facebook-post" && shouldRunFBMobileVideoFix) {
|
|
@@ -6929,10 +4044,10 @@ var StoryElementCard = function StoryElementCard(_ref2) {
|
|
|
6929
4044
|
}
|
|
6930
4045
|
|
|
6931
4046
|
var tableStyle = element && element.subtype === "table" ? "table" : "";
|
|
6932
|
-
var cardId =
|
|
4047
|
+
var cardId = lodash.get(card, ["id"], "");
|
|
6933
4048
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6934
4049
|
key: element.id,
|
|
6935
|
-
className: "arr--element-container " +
|
|
4050
|
+
className: "arr--element-container " + _getClassName__default["default"]("element-container ".concat(isLiveBlog, " ").concat(tableStyle, " ").concat(textColor), _styleModuleImportMap$c)
|
|
6936
4051
|
}, getElement(story, element, config, adComponent, widgetComp, index, cardId));
|
|
6937
4052
|
}));
|
|
6938
4053
|
};
|
|
@@ -6963,7 +4078,7 @@ var SlotAfterStory = function SlotAfterStory(_ref4) {
|
|
|
6963
4078
|
|
|
6964
4079
|
switch (element.type) {
|
|
6965
4080
|
case "ad":
|
|
6966
|
-
return /*#__PURE__*/React__default["default"].createElement(AdComponent,
|
|
4081
|
+
return /*#__PURE__*/React__default["default"].createElement(AdComponent, _extends__default["default"]({}, element, {
|
|
6967
4082
|
id: "ad-after-story-".concat(id)
|
|
6968
4083
|
}));
|
|
6969
4084
|
|
|
@@ -7001,7 +4116,7 @@ var StoryTags = function StoryTags(_ref) {
|
|
|
7001
4116
|
_ref.borderColor;
|
|
7002
4117
|
var configData = useStateValue() || {};
|
|
7003
4118
|
var textColor = getTextColor(configData.theme);
|
|
7004
|
-
var mountAt =
|
|
4119
|
+
var mountAt = lodash.get(config, ["mountAt"], "");
|
|
7005
4120
|
var templateStyle = template === "roundCorners" ? "roundCorners" : "";
|
|
7006
4121
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7007
4122
|
className: "arrow-component arr--story-tags"
|
|
@@ -7009,7 +4124,7 @@ var StoryTags = function StoryTags(_ref) {
|
|
|
7009
4124
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7010
4125
|
key: index,
|
|
7011
4126
|
"data-test-id": "story-tag",
|
|
7012
|
-
className:
|
|
4127
|
+
className: _getClassName__default["default"]("tags ".concat(templateStyle, " ").concat(textColor), _styleModuleImportMap$b)
|
|
7013
4128
|
}, /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
7014
4129
|
href: "".concat(mountAt, "/topic/") + tag.slug,
|
|
7015
4130
|
"aria-label": "story-tag-name"
|
|
@@ -7038,13 +4153,13 @@ var TimeStamp = function TimeStamp(_ref) {
|
|
|
7038
4153
|
_ref$config = _ref.config,
|
|
7039
4154
|
config = _ref$config === void 0 ? {} : _ref$config;
|
|
7040
4155
|
var configState = useStateValue() || {};
|
|
7041
|
-
var isTime =
|
|
4156
|
+
var isTime = lodash.get(config, ["showTime"], lodash.get(configState, ["showTime"], true));
|
|
7042
4157
|
var time = story["last-published-at"] || story["first-published-at"];
|
|
7043
4158
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
7044
4159
|
var textColor = getTextColor(configState.theme);
|
|
7045
4160
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isTime && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7046
4161
|
"data-test-id": "publish-time",
|
|
7047
|
-
className: "time arr--publish-time " +
|
|
4162
|
+
className: "time arr--publish-time " + _getClassName__default["default"]("time ".concat(textColor, " ").concat(isBottomClasses), _styleModuleImportMap$a)
|
|
7048
4163
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7049
4164
|
className: "timestamp-m_time-wrapper__3O2lM"
|
|
7050
4165
|
}, getTimeStamp(time, formatter, config))));
|
|
@@ -7079,9 +4194,9 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
7079
4194
|
_ref$config = _ref.config,
|
|
7080
4195
|
config = _ref$config === void 0 ? {} : _ref$config;
|
|
7081
4196
|
var configData = useStateValue() || {};
|
|
7082
|
-
var isAuthor =
|
|
4197
|
+
var isAuthor = lodash.get(configData, ["showAuthor"], true);
|
|
7083
4198
|
|
|
7084
|
-
var _get =
|
|
4199
|
+
var _get = lodash.get(story, ["authors", "0"], ""),
|
|
7085
4200
|
avatarUrl = _get["avatar-url"],
|
|
7086
4201
|
avatarS3Key = _get["avatar-s3-key"],
|
|
7087
4202
|
authorName = _get.name,
|
|
@@ -7089,7 +4204,7 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
7089
4204
|
|
|
7090
4205
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
7091
4206
|
var textColor = getTextColor(configData.theme);
|
|
7092
|
-
var mountAt =
|
|
4207
|
+
var mountAt = lodash.get(config, ["mountAt"], "");
|
|
7093
4208
|
|
|
7094
4209
|
var authorImage = function authorImage(dir) {
|
|
7095
4210
|
if (!avatarUrl && !avatarS3Key) {
|
|
@@ -7098,7 +4213,7 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
7098
4213
|
|
|
7099
4214
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7100
4215
|
"data-test-id": "author-image",
|
|
7101
|
-
className:
|
|
4216
|
+
className: _getClassName__default["default"]("author-image ".concat(dir, "-image"), _styleModuleImportMap$9)
|
|
7102
4217
|
}, /*#__PURE__*/React__default["default"].createElement("figure", null, avatarS3Key ? /*#__PURE__*/React__default["default"].createElement(components.ResponsiveImage, {
|
|
7103
4218
|
slug: avatarS3Key,
|
|
7104
4219
|
"aspect-ratio": [1, 1],
|
|
@@ -7115,7 +4230,7 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
7115
4230
|
var isPrefix = function isPrefix(dir) {
|
|
7116
4231
|
if (prefix) {
|
|
7117
4232
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7118
|
-
className: "arr-author-prefix " +
|
|
4233
|
+
className: "arr-author-prefix " + _getClassName__default["default"]("prefix ".concat(textColor), _styleModuleImportMap$9)
|
|
7119
4234
|
}, prefix);
|
|
7120
4235
|
}
|
|
7121
4236
|
|
|
@@ -7125,16 +4240,16 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
7125
4240
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
7126
4241
|
href: "".concat(mountAt, "/author/") + slug,
|
|
7127
4242
|
"aria-label": "author-name",
|
|
7128
|
-
className: "author-name arr-author-name arrow-component " +
|
|
4243
|
+
className: "author-name arr-author-name arrow-component " + _getClassName__default["default"]("author ".concat(isBottomClasses), _styleModuleImportMap$9)
|
|
7129
4244
|
}, isPrefix("ltr"), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7130
4245
|
"data-test-id": "author-name",
|
|
7131
|
-
className: "author-name " +
|
|
4246
|
+
className: "author-name " + _getClassName__default["default"]("author-name ".concat(textColor), _styleModuleImportMap$9)
|
|
7132
4247
|
}, authorName || story["author-name"]), !prefix && isPrefix("rtl")));
|
|
7133
4248
|
};
|
|
7134
4249
|
|
|
7135
4250
|
function mapStateToProps$1(state) {
|
|
7136
4251
|
return {
|
|
7137
|
-
config:
|
|
4252
|
+
config: lodash.get(state, ["qt", "config"], {})
|
|
7138
4253
|
};
|
|
7139
4254
|
}
|
|
7140
4255
|
|
|
@@ -7171,7 +4286,7 @@ var Divider = function Divider(_ref) {
|
|
|
7171
4286
|
_ref$color = _ref.color,
|
|
7172
4287
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
7173
4288
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7174
|
-
className:
|
|
4289
|
+
className: _getClassName__default["default"](color, _styleModuleImportMap$8)
|
|
7175
4290
|
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
7176
4291
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7177
4292
|
width: width,
|
|
@@ -7207,9 +4322,9 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
7207
4322
|
config = _ref$config === void 0 ? {} : _ref$config,
|
|
7208
4323
|
isLightTheme = _ref.isLightTheme;
|
|
7209
4324
|
var configState = useStateValue() || {};
|
|
7210
|
-
var isAuthor =
|
|
7211
|
-
var isTime =
|
|
7212
|
-
var isReadTime =
|
|
4325
|
+
var isAuthor = lodash.get(config, ["showAuthor"], lodash.get(configState, ["showAuthor"], true));
|
|
4326
|
+
var isTime = lodash.get(config, ["showTime"], lodash.get(configState, ["showTime"], true));
|
|
4327
|
+
var isReadTime = lodash.get(configState, ["showReadTime"], true);
|
|
7213
4328
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
7214
4329
|
var seperatorStyle = separator === "dot" ? "dot" : "dash";
|
|
7215
4330
|
var textColor = isLightTheme ? "light" : getTextColor(configState.theme);
|
|
@@ -7229,7 +4344,7 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
7229
4344
|
var getTimeStamp = function getTimeStamp() {
|
|
7230
4345
|
if (!isTime) return null;
|
|
7231
4346
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
7232
|
-
className: "arr-separator " +
|
|
4347
|
+
className: "arr-separator " + _getClassName__default["default"]("".concat(seperatorStyle), _styleModuleImportMap$7)
|
|
7233
4348
|
}, getSeparator()), /*#__PURE__*/React__default["default"].createElement(TimeStamp, {
|
|
7234
4349
|
story: story,
|
|
7235
4350
|
config: config
|
|
@@ -7241,7 +4356,7 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
7241
4356
|
};
|
|
7242
4357
|
|
|
7243
4358
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7244
|
-
className: "arr--author-time " +
|
|
4359
|
+
className: "arr--author-time " + _getClassName__default["default"]("author-time-wrapper ".concat(isBottomClasses), _styleModuleImportMap$7)
|
|
7245
4360
|
}, isAuthor ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Author, {
|
|
7246
4361
|
story: story,
|
|
7247
4362
|
isBottom: true,
|
|
@@ -7297,7 +4412,7 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
7297
4412
|
_ref$navigate = _ref.navigate,
|
|
7298
4413
|
navigate = _ref$navigate === void 0 ? true : _ref$navigate;
|
|
7299
4414
|
var collectionTitle = useStateValue() || {};
|
|
7300
|
-
var showRowTitle =
|
|
4415
|
+
var showRowTitle = lodash.get(collectionTitle, ["showRowTitle"], true);
|
|
7301
4416
|
var supportedTemplates = ["borderLeft", "borderBottom", "crossLine", "borderBottomFull"];
|
|
7302
4417
|
var templateStyle = supportedTemplates.includes(collectionNameTemplate) ? " collection-".concat(collectionNameTemplate) : "";
|
|
7303
4418
|
var slug = navigate && collection && getSlug(collection, config) || "";
|
|
@@ -7373,7 +4488,7 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
7373
4488
|
borderBottom: borderBottomFullStyle
|
|
7374
4489
|
},
|
|
7375
4490
|
"data-test-id": "collection-name",
|
|
7376
|
-
className: ("arr--collection-name arrow-component ".concat(templateStyle) ? "arr--collection-name arrow-component ".concat(templateStyle) + " " : "") +
|
|
4491
|
+
className: ("arr--collection-name arrow-component ".concat(templateStyle) ? "arr--collection-name arrow-component ".concat(templateStyle) + " " : "") + _getClassName__default["default"]("collection ".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$6)
|
|
7377
4492
|
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
7378
4493
|
className: "arr-collection-name-border-left collection-name-m_border-left__3_pYw",
|
|
7379
4494
|
style: {
|
|
@@ -7410,7 +4525,7 @@ CollectionNameBase.defaultProps = {
|
|
|
7410
4525
|
|
|
7411
4526
|
function mapStateToProps(state) {
|
|
7412
4527
|
return {
|
|
7413
|
-
config:
|
|
4528
|
+
config: lodash.get(state, ["qt", "config"], {})
|
|
7414
4529
|
};
|
|
7415
4530
|
}
|
|
7416
4531
|
|
|
@@ -7452,8 +4567,8 @@ var Headline = function Headline(_ref) {
|
|
|
7452
4567
|
enablePremiumStoryIcon = _premiumStoryIconConf3 === void 0 ? false : _premiumStoryIconConf3,
|
|
7453
4568
|
_premiumStoryIconConf4 = premiumStoryIconConfig.showLiveIcon,
|
|
7454
4569
|
showLiveIcon = _premiumStoryIconConf4 === void 0 ? false : _premiumStoryIconConf4;
|
|
7455
|
-
var alternateHeadline =
|
|
7456
|
-
var premiumStory = enablePremiumStoryIcon &&
|
|
4570
|
+
var alternateHeadline = lodash.get(story, ["alternative", "home", "default", "headline"]);
|
|
4571
|
+
var premiumStory = enablePremiumStoryIcon && lodash.get(story, ["access"]) === "subscription";
|
|
7457
4572
|
var headline = alternateHeadline || story.headline;
|
|
7458
4573
|
var HeaderTag = "h" + headerLevel;
|
|
7459
4574
|
|
|
@@ -7479,10 +4594,10 @@ var Headline = function Headline(_ref) {
|
|
|
7479
4594
|
var textColor = getTextColor(configData.theme);
|
|
7480
4595
|
var wrapperClass = premiumStory ? "wrapper" : "";
|
|
7481
4596
|
var iconSize = "24px";
|
|
7482
|
-
var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !
|
|
4597
|
+
var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !lodash.get(story, ["metadata", "is-closed"], false);
|
|
7483
4598
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7484
4599
|
"data-test-id": "headline",
|
|
7485
|
-
className: "arrow-component arr--headline " +
|
|
4600
|
+
className: "arrow-component arr--headline " + _getClassName__default["default"](wrapperClass, _styleModuleImportMap$5)
|
|
7486
4601
|
}, premiumStory && /*#__PURE__*/React__default["default"].createElement(PremiumStoryIcon, {
|
|
7487
4602
|
width: iconSize,
|
|
7488
4603
|
height: iconSize,
|
|
@@ -7494,9 +4609,9 @@ var Headline = function Headline(_ref) {
|
|
|
7494
4609
|
externalLink: isExternalStory(story),
|
|
7495
4610
|
"aria-label": "headline"
|
|
7496
4611
|
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
7497
|
-
className:
|
|
4612
|
+
className: _getClassName__default["default"]("headline ".concat(textColor), _styleModuleImportMap$5)
|
|
7498
4613
|
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
7499
|
-
className:
|
|
4614
|
+
className: _getClassName__default["default"]("headline ".concat(textColor), _styleModuleImportMap$5)
|
|
7500
4615
|
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline));
|
|
7501
4616
|
};
|
|
7502
4617
|
Headline.propTypes = {
|
|
@@ -7589,7 +4704,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
7589
4704
|
backgroundColor: theme,
|
|
7590
4705
|
color: textColor
|
|
7591
4706
|
},
|
|
7592
|
-
className: "arr--story-card " +
|
|
4707
|
+
className: "arr--story-card " + _getClassName__default["default"]("card ".concat(horizontalCardStyle, " ").concat(borderTemplate, " ").concat(textColor, " ").concat(bgImageClasses, " ").concat(bgImgContentOverlapClass, " ").concat(horizontalMobileClasses), _styleModuleImportMap$4)
|
|
7593
4708
|
}, children || defaultStorycard);
|
|
7594
4709
|
};
|
|
7595
4710
|
|
|
@@ -7630,7 +4745,7 @@ var DefaultStoryCard = function DefaultStoryCard(_ref2) {
|
|
|
7630
4745
|
isHorizontalMobile: isHorizontalMobile,
|
|
7631
4746
|
aspectRatio: aspectRatio
|
|
7632
4747
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7633
|
-
className: "arr--story-content " +
|
|
4748
|
+
className: "arr--story-content " + _getClassName__default["default"]("content ".concat(alignment), _styleModuleImportMap$4)
|
|
7634
4749
|
}, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
|
|
7635
4750
|
story: story,
|
|
7636
4751
|
borderColor: SectionTagborderColor
|
|
@@ -7737,7 +4852,7 @@ var _styleModuleImportMap$3 = {
|
|
|
7737
4852
|
|
|
7738
4853
|
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7739
4854
|
|
|
7740
|
-
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) {
|
|
4855
|
+
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7741
4856
|
var LoadmoreButton = function LoadmoreButton(_ref) {
|
|
7742
4857
|
var _ref$config = _ref.config,
|
|
7743
4858
|
config = _ref$config === void 0 ? {} : _ref$config,
|
|
@@ -7761,14 +4876,14 @@ var LoadmoreButton = function LoadmoreButton(_ref) {
|
|
|
7761
4876
|
return template === "SubsequentLoadCount" ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7762
4877
|
onClick: onClick,
|
|
7763
4878
|
"data-test-id": "load-more",
|
|
7764
|
-
className: "arr--button " +
|
|
4879
|
+
className: "arr--button " + _getClassName__default["default"]("button ".concat(textColor, " default"), _styleModuleImportMap$3)
|
|
7765
4880
|
}, buttonText) : /*#__PURE__*/React__default["default"].createElement(components.LinkBase, {
|
|
7766
4881
|
href: slug,
|
|
7767
4882
|
navigateTo: navigate,
|
|
7768
4883
|
"data-test-id": "load-more",
|
|
7769
4884
|
"aria-label": "load-more"
|
|
7770
4885
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7771
|
-
className: "arr--button " +
|
|
4886
|
+
className: "arr--button " + _getClassName__default["default"]("button ".concat(textColor, " default"), _styleModuleImportMap$3)
|
|
7772
4887
|
}, buttonText));
|
|
7773
4888
|
};
|
|
7774
4889
|
LoadmoreButton.propTypes = {
|
|
@@ -7816,7 +4931,7 @@ var KeyEventCards = function KeyEventCards(props) {
|
|
|
7816
4931
|
var lastElement = index === cardLength - 1;
|
|
7817
4932
|
var borderLeft = lastElement ? "borderNone" : "";
|
|
7818
4933
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7819
|
-
className:
|
|
4934
|
+
className: _getClassName__default["default"]("time-wrapper ".concat(textColor), _styleModuleImportMap$2)
|
|
7820
4935
|
}, /*#__PURE__*/React__default["default"].createElement(ClockIcon, {
|
|
7821
4936
|
color: updateColor
|
|
7822
4937
|
}), getTimeStamp(cardAddedAt, timestampToFormat, {
|
|
@@ -7826,7 +4941,7 @@ var KeyEventCards = function KeyEventCards(props) {
|
|
|
7826
4941
|
href: "".concat(mountAt, "/").concat(slug, "#").concat(id),
|
|
7827
4942
|
"aria-label": "event-title"
|
|
7828
4943
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7829
|
-
className:
|
|
4944
|
+
className: _getClassName__default["default"]("event-title ".concat(textColor, " ").concat(borderLeft), _styleModuleImportMap$2)
|
|
7830
4945
|
}, storyElements.map(function (element, index) {
|
|
7831
4946
|
return element.type === "title" && /*#__PURE__*/React__default["default"].createElement("h3", {
|
|
7832
4947
|
key: index
|
|
@@ -7861,23 +4976,23 @@ var KeyEventsBase = function KeyEventsBase(_ref) {
|
|
|
7861
4976
|
config = _ref$config === void 0 ? {} : _ref$config,
|
|
7862
4977
|
_ref$showLoadMore = _ref.showLoadMore,
|
|
7863
4978
|
showLoadMore = _ref$showLoadMore === void 0 ? true : _ref$showLoadMore;
|
|
7864
|
-
var cards =
|
|
4979
|
+
var cards = lodash.get(story, ["cards"], []);
|
|
7865
4980
|
var theme = config.theme,
|
|
7866
4981
|
_config$initialLoadCo = config.initialLoadCount,
|
|
7867
4982
|
initialLoadCount = _config$initialLoadCo === void 0 ? 4 : _config$initialLoadCo;
|
|
7868
4983
|
var textColor = getTextColor(theme);
|
|
7869
4984
|
|
|
7870
4985
|
var _useState = React.useState(initialLoadCount),
|
|
7871
|
-
_useState2 =
|
|
4986
|
+
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
7872
4987
|
initialCount = _useState2[0],
|
|
7873
4988
|
updatedCount = _useState2[1];
|
|
7874
4989
|
|
|
7875
4990
|
var cardsWithKeyEvents = cards.filter(function (card) {
|
|
7876
|
-
return
|
|
4991
|
+
return lodash.get(card.metadata, ["attributes", "key-event"]);
|
|
7877
4992
|
});
|
|
7878
4993
|
var lastElement = cardsWithKeyEvents.length > initialCount;
|
|
7879
4994
|
var qtConfig = reactRedux.useSelector(function (state) {
|
|
7880
|
-
return
|
|
4995
|
+
return lodash.get(state, ["qt", "config"], {});
|
|
7881
4996
|
});
|
|
7882
4997
|
|
|
7883
4998
|
var onClick = function onClick() {
|
|
@@ -7905,7 +5020,7 @@ var KeyEventsBase = function KeyEventsBase(_ref) {
|
|
|
7905
5020
|
style: {
|
|
7906
5021
|
background: theme
|
|
7907
5022
|
},
|
|
7908
|
-
className: "arrow-component " +
|
|
5023
|
+
className: "arrow-component " + _getClassName__default["default"]("container ".concat(textColor), _styleModuleImportMap$2)
|
|
7909
5024
|
}, /*#__PURE__*/React__default["default"].createElement("h3", null, "Key Events"), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7910
5025
|
className: "key-events-m_cards-wrapper__3f8aB"
|
|
7911
5026
|
}, keyEvents), showLoadMore && lastElement && /*#__PURE__*/React__default["default"].createElement(LoadmoreButton, {
|
|
@@ -7924,7 +5039,7 @@ var KeyEvents = StateProvider(KeyEventsBase);
|
|
|
7924
5039
|
|
|
7925
5040
|
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; }
|
|
7926
5041
|
|
|
7927
|
-
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) {
|
|
5042
|
+
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; }
|
|
7928
5043
|
var _styleModuleImportMap$1 = {
|
|
7929
5044
|
"./aside-collection.m.css": {
|
|
7930
5045
|
"stories": "aside-collection-m_stories__9wfUs",
|
|
@@ -7957,22 +5072,22 @@ var StoryCollection = function StoryCollection(_ref) {
|
|
|
7957
5072
|
|
|
7958
5073
|
var heading = title || "Related Stories";
|
|
7959
5074
|
var isHorizontal = horizontal ? "horizontal-wrapper" : "";
|
|
7960
|
-
var mountAt =
|
|
5075
|
+
var mountAt = lodash.get(config, ["mountAtPrefix"], "");
|
|
7961
5076
|
|
|
7962
5077
|
var _useState = React.useState([]),
|
|
7963
|
-
_useState2 =
|
|
5078
|
+
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
7964
5079
|
storyList = _useState2[0],
|
|
7965
5080
|
updateStoryList = _useState2[1];
|
|
7966
5081
|
|
|
7967
5082
|
var _useState3 = React.useState([]),
|
|
7968
|
-
_useState4 =
|
|
5083
|
+
_useState4 = _slicedToArray__default["default"](_useState3, 2),
|
|
7969
5084
|
collectionData = _useState4[0],
|
|
7970
5085
|
updateCollectionData = _useState4[1];
|
|
7971
5086
|
|
|
7972
5087
|
var updateStoryListItems = /*#__PURE__*/function () {
|
|
7973
|
-
var _ref3 =
|
|
5088
|
+
var _ref3 = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(slug) {
|
|
7974
5089
|
var collectionDataResponse, storyItems;
|
|
7975
|
-
return
|
|
5090
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
|
|
7976
5091
|
while (1) {
|
|
7977
5092
|
switch (_context.prev = _context.next) {
|
|
7978
5093
|
case 0:
|
|
@@ -8083,7 +5198,7 @@ var AsideCollectionBase = function AsideCollectionBase(_ref4) {
|
|
|
8083
5198
|
},
|
|
8084
5199
|
"data-test-id": "aside-collection",
|
|
8085
5200
|
id: "aside-collection-".concat(storyId),
|
|
8086
|
-
className: "arrow-component arr--aside-collection " +
|
|
5201
|
+
className: "arrow-component arr--aside-collection " + _getClassName__default["default"]("wrapper ".concat(isHorizontal), _styleModuleImportMap$1)
|
|
8087
5202
|
}, /*#__PURE__*/React__default["default"].createElement(StoryCollection, {
|
|
8088
5203
|
data: data,
|
|
8089
5204
|
horizontal: horizontal,
|
|
@@ -8128,7 +5243,7 @@ var AsideCollectionBase = function AsideCollectionBase(_ref4) {
|
|
|
8128
5243
|
backgroundColor: theme
|
|
8129
5244
|
},
|
|
8130
5245
|
"data-test-id": "aside-collection",
|
|
8131
|
-
className: "arrow-component arr--aside-collection " +
|
|
5246
|
+
className: "arrow-component arr--aside-collection " + _getClassName__default["default"](["wrapper", isHorizontal, isSticky].join(" "), _styleModuleImportMap$1)
|
|
8132
5247
|
}, enableKeyEvents && /*#__PURE__*/React__default["default"].createElement(KeyEvents, {
|
|
8133
5248
|
story: keyEventsData.story,
|
|
8134
5249
|
showLoadMore: keyEventsData.showLoadMore,
|
|
@@ -8218,10 +5333,10 @@ var ListicleStoryTemplateBase = function ListicleStoryTemplateBase(_ref) {
|
|
|
8218
5333
|
var visibledCards = noOfVisibleCards < 0 ? story.cards : story.cards.slice(0, noOfVisibleCards);
|
|
8219
5334
|
var _story$bulletType = story["bullet-type"],
|
|
8220
5335
|
storyBulletType = _story$bulletType === void 0 ? "" : _story$bulletType;
|
|
8221
|
-
var storyId =
|
|
5336
|
+
var storyId = lodash.get(story, ["id"], "");
|
|
8222
5337
|
var isNumberedBullet = storyBulletType !== "bullets";
|
|
8223
5338
|
var timezone = reactRedux.useSelector(function (state) {
|
|
8224
|
-
return
|
|
5339
|
+
return lodash.get(state, ["qt", "data", "timezone"], null);
|
|
8225
5340
|
}); // Content Blocks
|
|
8226
5341
|
|
|
8227
5342
|
var HeroImageBlock = function HeroImageBlock(settings) {
|
|
@@ -8252,7 +5367,7 @@ var ListicleStoryTemplateBase = function ListicleStoryTemplateBase(_ref) {
|
|
|
8252
5367
|
className: "listicle-story-m_headline-block__2zouc"
|
|
8253
5368
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
8254
5369
|
className: "listicle-story-m_section-tag__3U7ij"
|
|
8255
|
-
}, showSection && /*#__PURE__*/React__default["default"].createElement(SectionTag,
|
|
5370
|
+
}, showSection && /*#__PURE__*/React__default["default"].createElement(SectionTag, _extends__default["default"]({
|
|
8256
5371
|
story: story
|
|
8257
5372
|
}, sectionTagSettings))), /*#__PURE__*/React__default["default"].createElement(StoryHeadline, {
|
|
8258
5373
|
story: story,
|
|
@@ -8264,7 +5379,7 @@ var ListicleStoryTemplateBase = function ListicleStoryTemplateBase(_ref) {
|
|
|
8264
5379
|
};
|
|
8265
5380
|
|
|
8266
5381
|
var AuthourBlock = function AuthourBlock() {
|
|
8267
|
-
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(AuthorCard,
|
|
5382
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(AuthorCard, _extends__default["default"]({
|
|
8268
5383
|
story: story
|
|
8269
5384
|
}, authorDetails)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
8270
5385
|
className: "listicle-story-m_timestamp-social-share__1QaP8"
|
|
@@ -8287,7 +5402,7 @@ var ListicleStoryTemplateBase = function ListicleStoryTemplateBase(_ref) {
|
|
|
8287
5402
|
|
|
8288
5403
|
var BodyBlock = function BodyBlock() {
|
|
8289
5404
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
8290
|
-
className:
|
|
5405
|
+
className: _getClassName__default["default"]("body-block ".concat(isNumberedBullet ? "numbered-bullet-style" : ""), _styleModuleImportMap)
|
|
8291
5406
|
}, visibledCards.map(function (card, index) {
|
|
8292
5407
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, {
|
|
8293
5408
|
key: card.id
|
|
@@ -8316,7 +5431,7 @@ var ListicleStoryTemplateBase = function ListicleStoryTemplateBase(_ref) {
|
|
|
8316
5431
|
};
|
|
8317
5432
|
|
|
8318
5433
|
var SideColumnBlock = function SideColumnBlock() {
|
|
8319
|
-
return asideCollection && /*#__PURE__*/React__default["default"].createElement(AsideCollection,
|
|
5434
|
+
return asideCollection && /*#__PURE__*/React__default["default"].createElement(AsideCollection, _extends__default["default"]({}, asideCollection, {
|
|
8320
5435
|
adComponent: adComponent,
|
|
8321
5436
|
widgetComp: widgetComp,
|
|
8322
5437
|
sticky: true,
|