@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,8 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
|
+
var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator');
|
|
7
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
8
|
+
var _getClassName = require('babel-plugin-react-css-modules/dist/browser/getClassName');
|
|
9
|
+
var _regeneratorRuntime = require('@babel/runtime/regenerator');
|
|
10
|
+
var lodash = require('lodash');
|
|
5
11
|
var PropTypes = require('prop-types');
|
|
6
12
|
var React = require('react');
|
|
13
|
+
var _typeof = require('@babel/runtime/helpers/typeof');
|
|
7
14
|
var Timeago = require('react-timeago');
|
|
8
15
|
var dateFnsTz = require('date-fns-tz');
|
|
9
16
|
var components = require('@quintype/components');
|
|
@@ -11,2590 +18,16 @@ var reactRedux = require('react-redux');
|
|
|
11
18
|
|
|
12
19
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
20
|
|
|
21
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
22
|
+
var _asyncToGenerator__default = /*#__PURE__*/_interopDefaultLegacy(_asyncToGenerator);
|
|
23
|
+
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
24
|
+
var _getClassName__default = /*#__PURE__*/_interopDefaultLegacy(_getClassName);
|
|
25
|
+
var _regeneratorRuntime__default = /*#__PURE__*/_interopDefaultLegacy(_regeneratorRuntime);
|
|
14
26
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
15
27
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
28
|
+
var _typeof__default = /*#__PURE__*/_interopDefaultLegacy(_typeof);
|
|
16
29
|
var Timeago__default = /*#__PURE__*/_interopDefaultLegacy(Timeago);
|
|
17
30
|
|
|
18
|
-
function _defineProperty(obj, key, value) {
|
|
19
|
-
if (key in obj) {
|
|
20
|
-
Object.defineProperty(obj, key, {
|
|
21
|
-
value: value,
|
|
22
|
-
enumerable: true,
|
|
23
|
-
configurable: true,
|
|
24
|
-
writable: true
|
|
25
|
-
});
|
|
26
|
-
} else {
|
|
27
|
-
obj[key] = value;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return obj;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
34
|
-
try {
|
|
35
|
-
var info = gen[key](arg);
|
|
36
|
-
var value = info.value;
|
|
37
|
-
} catch (error) {
|
|
38
|
-
reject(error);
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
if (info.done) {
|
|
43
|
-
resolve(value);
|
|
44
|
-
} else {
|
|
45
|
-
Promise.resolve(value).then(_next, _throw);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function _asyncToGenerator(fn) {
|
|
50
|
-
return function () {
|
|
51
|
-
var self = this,
|
|
52
|
-
args = arguments;
|
|
53
|
-
return new Promise(function (resolve, reject) {
|
|
54
|
-
var gen = fn.apply(self, args);
|
|
55
|
-
|
|
56
|
-
function _next(value) {
|
|
57
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
function _throw(err) {
|
|
61
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
_next(undefined);
|
|
65
|
-
});
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
function _arrayWithHoles(arr) {
|
|
70
|
-
if (Array.isArray(arr)) return arr;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
function _iterableToArrayLimit(arr, i) {
|
|
74
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
75
|
-
|
|
76
|
-
if (_i == null) return;
|
|
77
|
-
var _arr = [];
|
|
78
|
-
var _n = true;
|
|
79
|
-
var _d = false;
|
|
80
|
-
|
|
81
|
-
var _s, _e;
|
|
82
|
-
|
|
83
|
-
try {
|
|
84
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
85
|
-
_arr.push(_s.value);
|
|
86
|
-
|
|
87
|
-
if (i && _arr.length === i) break;
|
|
88
|
-
}
|
|
89
|
-
} catch (err) {
|
|
90
|
-
_d = true;
|
|
91
|
-
_e = err;
|
|
92
|
-
} finally {
|
|
93
|
-
try {
|
|
94
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
95
|
-
} finally {
|
|
96
|
-
if (_d) throw _e;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
return _arr;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function _arrayLikeToArray(arr, len) {
|
|
104
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
105
|
-
|
|
106
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
107
|
-
arr2[i] = arr[i];
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
return arr2;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
114
|
-
if (!o) return;
|
|
115
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
116
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
117
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
118
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
119
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
function _nonIterableRest() {
|
|
123
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
function _slicedToArray(arr, i) {
|
|
127
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
131
|
-
|
|
132
|
-
function getDefaultExportFromCjs (x) {
|
|
133
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
function createCommonjsModule(fn) {
|
|
137
|
-
var module = { exports: {} };
|
|
138
|
-
return fn(module, module.exports), module.exports;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
var optionsDefaults_1 = createCommonjsModule(function (module, exports) {
|
|
142
|
-
|
|
143
|
-
Object.defineProperty(exports, "__esModule", {
|
|
144
|
-
value: true
|
|
145
|
-
});
|
|
146
|
-
exports["default"] = void 0;
|
|
147
|
-
var optionsDefaults = {
|
|
148
|
-
attributeNames: {
|
|
149
|
-
styleName: 'className'
|
|
150
|
-
},
|
|
151
|
-
generateScopedName: '[path]___[name]__[local]___[hash:base64:5]',
|
|
152
|
-
handleMissingStyleName: 'throw'
|
|
153
|
-
};
|
|
154
|
-
var _default = optionsDefaults;
|
|
155
|
-
exports["default"] = _default;
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
});
|
|
159
|
-
|
|
160
|
-
var getClassName = createCommonjsModule(function (module, exports) {
|
|
161
|
-
|
|
162
|
-
Object.defineProperty(exports, "__esModule", {
|
|
163
|
-
value: true
|
|
164
|
-
});
|
|
165
|
-
exports["default"] = void 0;
|
|
166
|
-
|
|
167
|
-
var _optionsDefaults = _interopRequireDefault(optionsDefaults_1);
|
|
168
|
-
|
|
169
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
170
|
-
|
|
171
|
-
var isNamespacedStyleName = function isNamespacedStyleName(styleName) {
|
|
172
|
-
return styleName.indexOf('.') !== -1;
|
|
173
|
-
};
|
|
174
|
-
|
|
175
|
-
var handleError = function handleError(message, handleMissingStyleName) {
|
|
176
|
-
if (handleMissingStyleName === 'throw') {
|
|
177
|
-
throw new Error(message);
|
|
178
|
-
} else if (handleMissingStyleName === 'warn') {
|
|
179
|
-
// eslint-disable-next-line no-console
|
|
180
|
-
console.warn(message);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
return null;
|
|
184
|
-
};
|
|
185
|
-
|
|
186
|
-
var getClassNameForNamespacedStyleName = function getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
|
|
187
|
-
// Note:
|
|
188
|
-
// Do not use the desctructing syntax with Babel.
|
|
189
|
-
// Desctructing adds _slicedToArray helper.
|
|
190
|
-
var styleNameParts = styleName.split('.');
|
|
191
|
-
var importName = styleNameParts[0];
|
|
192
|
-
var moduleName = styleNameParts[1];
|
|
193
|
-
var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
|
|
194
|
-
|
|
195
|
-
if (!moduleName) {
|
|
196
|
-
return handleError('Invalid style name: ' + styleName, handleMissingStyleName);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
if (!styleModuleImportMap[importName]) {
|
|
200
|
-
return handleError('CSS module import does not exist: ' + importName, handleMissingStyleName);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
if (!styleModuleImportMap[importName][moduleName]) {
|
|
204
|
-
return handleError('CSS module does not exist: ' + moduleName, handleMissingStyleName);
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
return styleModuleImportMap[importName][moduleName];
|
|
208
|
-
};
|
|
209
|
-
|
|
210
|
-
var getClassNameFromMultipleImports = function getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleNameOption) {
|
|
211
|
-
var handleMissingStyleName = handleMissingStyleNameOption || _optionsDefaults["default"].handleMissingStyleName;
|
|
212
|
-
var importKeysWithMatches = Object.keys(styleModuleImportMap).map(function (importKey) {
|
|
213
|
-
return styleModuleImportMap[importKey][styleName] && importKey;
|
|
214
|
-
}).filter(function (importKey) {
|
|
215
|
-
return importKey;
|
|
216
|
-
});
|
|
217
|
-
|
|
218
|
-
if (importKeysWithMatches.length > 1) {
|
|
219
|
-
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');
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
if (importKeysWithMatches.length === 0) {
|
|
223
|
-
return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
return styleModuleImportMap[importKeysWithMatches[0]][styleName];
|
|
227
|
-
};
|
|
228
|
-
|
|
229
|
-
var _default = function _default(styleNameValue, styleModuleImportMap, options) {
|
|
230
|
-
var styleModuleImportMapKeys = Object.keys(styleModuleImportMap);
|
|
231
|
-
|
|
232
|
-
var _ref = options || {},
|
|
233
|
-
_ref$handleMissingSty = _ref.handleMissingStyleName,
|
|
234
|
-
handleMissingStyleName = _ref$handleMissingSty === void 0 ? _optionsDefaults["default"].handleMissingStyleName : _ref$handleMissingSty,
|
|
235
|
-
_ref$autoResolveMulti = _ref.autoResolveMultipleImports,
|
|
236
|
-
autoResolveMultipleImports = _ref$autoResolveMulti === void 0 ? _optionsDefaults["default"].autoResolveMultipleImports : _ref$autoResolveMulti;
|
|
237
|
-
|
|
238
|
-
if (!styleNameValue) {
|
|
239
|
-
return '';
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
return styleNameValue.split(' ').filter(function (styleName) {
|
|
243
|
-
return styleName;
|
|
244
|
-
}).map(function (styleName) {
|
|
245
|
-
if (isNamespacedStyleName(styleName)) {
|
|
246
|
-
return getClassNameForNamespacedStyleName(styleName, styleModuleImportMap, handleMissingStyleName);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
if (styleModuleImportMapKeys.length === 0) {
|
|
250
|
-
throw new Error('Cannot use styleName attribute for style name \'' + styleName + '\' without importing at least one stylesheet.');
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
if (styleModuleImportMapKeys.length > 1) {
|
|
254
|
-
if (!autoResolveMultipleImports) {
|
|
255
|
-
throw new Error('Cannot use anonymous style name \'' + styleName + '\' with more than one stylesheet import without setting \'autoResolveMultipleImports\' to true.');
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
return getClassNameFromMultipleImports(styleName, styleModuleImportMap, handleMissingStyleName);
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
var styleModuleMap = styleModuleImportMap[styleModuleImportMapKeys[0]];
|
|
262
|
-
|
|
263
|
-
if (!styleModuleMap[styleName]) {
|
|
264
|
-
return handleError('Could not resolve the styleName \'' + styleName + '\'.', handleMissingStyleName);
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
return styleModuleMap[styleName];
|
|
268
|
-
}).filter(function (className) {
|
|
269
|
-
// Remove any styles which could not be found (if handleMissingStyleName === 'ignore')
|
|
270
|
-
return className;
|
|
271
|
-
}).join(' ');
|
|
272
|
-
};
|
|
273
|
-
|
|
274
|
-
exports["default"] = _default;
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
});
|
|
278
|
-
|
|
279
|
-
var _getClassName = /*@__PURE__*/getDefaultExportFromCjs(getClassName);
|
|
280
|
-
|
|
281
|
-
/**
|
|
282
|
-
* Copyright (c) 2014-present, Facebook, Inc.
|
|
283
|
-
*
|
|
284
|
-
* This source code is licensed under the MIT license found in the
|
|
285
|
-
* LICENSE file in the root directory of this source tree.
|
|
286
|
-
*/
|
|
287
|
-
|
|
288
|
-
var runtime_1 = createCommonjsModule(function (module) {
|
|
289
|
-
var runtime = (function (exports) {
|
|
290
|
-
|
|
291
|
-
var Op = Object.prototype;
|
|
292
|
-
var hasOwn = Op.hasOwnProperty;
|
|
293
|
-
var undefined$1; // More compressible than void 0.
|
|
294
|
-
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
|
295
|
-
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
296
|
-
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
297
|
-
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
298
|
-
|
|
299
|
-
function define(obj, key, value) {
|
|
300
|
-
Object.defineProperty(obj, key, {
|
|
301
|
-
value: value,
|
|
302
|
-
enumerable: true,
|
|
303
|
-
configurable: true,
|
|
304
|
-
writable: true
|
|
305
|
-
});
|
|
306
|
-
return obj[key];
|
|
307
|
-
}
|
|
308
|
-
try {
|
|
309
|
-
// IE 8 has a broken Object.defineProperty that only works on DOM objects.
|
|
310
|
-
define({}, "");
|
|
311
|
-
} catch (err) {
|
|
312
|
-
define = function(obj, key, value) {
|
|
313
|
-
return obj[key] = value;
|
|
314
|
-
};
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
318
|
-
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
|
|
319
|
-
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
|
|
320
|
-
var generator = Object.create(protoGenerator.prototype);
|
|
321
|
-
var context = new Context(tryLocsList || []);
|
|
322
|
-
|
|
323
|
-
// The ._invoke method unifies the implementations of the .next,
|
|
324
|
-
// .throw, and .return methods.
|
|
325
|
-
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
|
326
|
-
|
|
327
|
-
return generator;
|
|
328
|
-
}
|
|
329
|
-
exports.wrap = wrap;
|
|
330
|
-
|
|
331
|
-
// Try/catch helper to minimize deoptimizations. Returns a completion
|
|
332
|
-
// record like context.tryEntries[i].completion. This interface could
|
|
333
|
-
// have been (and was previously) designed to take a closure to be
|
|
334
|
-
// invoked without arguments, but in all the cases we care about we
|
|
335
|
-
// already have an existing method we want to call, so there's no need
|
|
336
|
-
// to create a new function object. We can even get away with assuming
|
|
337
|
-
// the method takes exactly one argument, since that happens to be true
|
|
338
|
-
// in every case, so we don't have to touch the arguments object. The
|
|
339
|
-
// only additional allocation required is the completion record, which
|
|
340
|
-
// has a stable shape and so hopefully should be cheap to allocate.
|
|
341
|
-
function tryCatch(fn, obj, arg) {
|
|
342
|
-
try {
|
|
343
|
-
return { type: "normal", arg: fn.call(obj, arg) };
|
|
344
|
-
} catch (err) {
|
|
345
|
-
return { type: "throw", arg: err };
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
var GenStateSuspendedStart = "suspendedStart";
|
|
350
|
-
var GenStateSuspendedYield = "suspendedYield";
|
|
351
|
-
var GenStateExecuting = "executing";
|
|
352
|
-
var GenStateCompleted = "completed";
|
|
353
|
-
|
|
354
|
-
// Returning this object from the innerFn has the same effect as
|
|
355
|
-
// breaking out of the dispatch switch statement.
|
|
356
|
-
var ContinueSentinel = {};
|
|
357
|
-
|
|
358
|
-
// Dummy constructor functions that we use as the .constructor and
|
|
359
|
-
// .constructor.prototype properties for functions that return Generator
|
|
360
|
-
// objects. For full spec compliance, you may wish to configure your
|
|
361
|
-
// minifier not to mangle the names of these two functions.
|
|
362
|
-
function Generator() {}
|
|
363
|
-
function GeneratorFunction() {}
|
|
364
|
-
function GeneratorFunctionPrototype() {}
|
|
365
|
-
|
|
366
|
-
// This is a polyfill for %IteratorPrototype% for environments that
|
|
367
|
-
// don't natively support it.
|
|
368
|
-
var IteratorPrototype = {};
|
|
369
|
-
define(IteratorPrototype, iteratorSymbol, function () {
|
|
370
|
-
return this;
|
|
371
|
-
});
|
|
372
|
-
|
|
373
|
-
var getProto = Object.getPrototypeOf;
|
|
374
|
-
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
375
|
-
if (NativeIteratorPrototype &&
|
|
376
|
-
NativeIteratorPrototype !== Op &&
|
|
377
|
-
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
|
378
|
-
// This environment has a native %IteratorPrototype%; use it instead
|
|
379
|
-
// of the polyfill.
|
|
380
|
-
IteratorPrototype = NativeIteratorPrototype;
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
var Gp = GeneratorFunctionPrototype.prototype =
|
|
384
|
-
Generator.prototype = Object.create(IteratorPrototype);
|
|
385
|
-
GeneratorFunction.prototype = GeneratorFunctionPrototype;
|
|
386
|
-
define(Gp, "constructor", GeneratorFunctionPrototype);
|
|
387
|
-
define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
|
|
388
|
-
GeneratorFunction.displayName = define(
|
|
389
|
-
GeneratorFunctionPrototype,
|
|
390
|
-
toStringTagSymbol,
|
|
391
|
-
"GeneratorFunction"
|
|
392
|
-
);
|
|
393
|
-
|
|
394
|
-
// Helper for defining the .next, .throw, and .return methods of the
|
|
395
|
-
// Iterator interface in terms of a single ._invoke method.
|
|
396
|
-
function defineIteratorMethods(prototype) {
|
|
397
|
-
["next", "throw", "return"].forEach(function(method) {
|
|
398
|
-
define(prototype, method, function(arg) {
|
|
399
|
-
return this._invoke(method, arg);
|
|
400
|
-
});
|
|
401
|
-
});
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
exports.isGeneratorFunction = function(genFun) {
|
|
405
|
-
var ctor = typeof genFun === "function" && genFun.constructor;
|
|
406
|
-
return ctor
|
|
407
|
-
? ctor === GeneratorFunction ||
|
|
408
|
-
// For the native GeneratorFunction constructor, the best we can
|
|
409
|
-
// do is to check its .name property.
|
|
410
|
-
(ctor.displayName || ctor.name) === "GeneratorFunction"
|
|
411
|
-
: false;
|
|
412
|
-
};
|
|
413
|
-
|
|
414
|
-
exports.mark = function(genFun) {
|
|
415
|
-
if (Object.setPrototypeOf) {
|
|
416
|
-
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
|
417
|
-
} else {
|
|
418
|
-
genFun.__proto__ = GeneratorFunctionPrototype;
|
|
419
|
-
define(genFun, toStringTagSymbol, "GeneratorFunction");
|
|
420
|
-
}
|
|
421
|
-
genFun.prototype = Object.create(Gp);
|
|
422
|
-
return genFun;
|
|
423
|
-
};
|
|
424
|
-
|
|
425
|
-
// Within the body of any async function, `await x` is transformed to
|
|
426
|
-
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
|
427
|
-
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
|
428
|
-
// meant to be awaited.
|
|
429
|
-
exports.awrap = function(arg) {
|
|
430
|
-
return { __await: arg };
|
|
431
|
-
};
|
|
432
|
-
|
|
433
|
-
function AsyncIterator(generator, PromiseImpl) {
|
|
434
|
-
function invoke(method, arg, resolve, reject) {
|
|
435
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
436
|
-
if (record.type === "throw") {
|
|
437
|
-
reject(record.arg);
|
|
438
|
-
} else {
|
|
439
|
-
var result = record.arg;
|
|
440
|
-
var value = result.value;
|
|
441
|
-
if (value &&
|
|
442
|
-
typeof value === "object" &&
|
|
443
|
-
hasOwn.call(value, "__await")) {
|
|
444
|
-
return PromiseImpl.resolve(value.__await).then(function(value) {
|
|
445
|
-
invoke("next", value, resolve, reject);
|
|
446
|
-
}, function(err) {
|
|
447
|
-
invoke("throw", err, resolve, reject);
|
|
448
|
-
});
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
return PromiseImpl.resolve(value).then(function(unwrapped) {
|
|
452
|
-
// When a yielded Promise is resolved, its final value becomes
|
|
453
|
-
// the .value of the Promise<{value,done}> result for the
|
|
454
|
-
// current iteration.
|
|
455
|
-
result.value = unwrapped;
|
|
456
|
-
resolve(result);
|
|
457
|
-
}, function(error) {
|
|
458
|
-
// If a rejected Promise was yielded, throw the rejection back
|
|
459
|
-
// into the async generator function so it can be handled there.
|
|
460
|
-
return invoke("throw", error, resolve, reject);
|
|
461
|
-
});
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
var previousPromise;
|
|
466
|
-
|
|
467
|
-
function enqueue(method, arg) {
|
|
468
|
-
function callInvokeWithMethodAndArg() {
|
|
469
|
-
return new PromiseImpl(function(resolve, reject) {
|
|
470
|
-
invoke(method, arg, resolve, reject);
|
|
471
|
-
});
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
return previousPromise =
|
|
475
|
-
// If enqueue has been called before, then we want to wait until
|
|
476
|
-
// all previous Promises have been resolved before calling invoke,
|
|
477
|
-
// so that results are always delivered in the correct order. If
|
|
478
|
-
// enqueue has not been called before, then it is important to
|
|
479
|
-
// call invoke immediately, without waiting on a callback to fire,
|
|
480
|
-
// so that the async generator function has the opportunity to do
|
|
481
|
-
// any necessary setup in a predictable way. This predictability
|
|
482
|
-
// is why the Promise constructor synchronously invokes its
|
|
483
|
-
// executor callback, and why async functions synchronously
|
|
484
|
-
// execute code before the first await. Since we implement simple
|
|
485
|
-
// async functions in terms of async generators, it is especially
|
|
486
|
-
// important to get this right, even though it requires care.
|
|
487
|
-
previousPromise ? previousPromise.then(
|
|
488
|
-
callInvokeWithMethodAndArg,
|
|
489
|
-
// Avoid propagating failures to Promises returned by later
|
|
490
|
-
// invocations of the iterator.
|
|
491
|
-
callInvokeWithMethodAndArg
|
|
492
|
-
) : callInvokeWithMethodAndArg();
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
// Define the unified helper method that is used to implement .next,
|
|
496
|
-
// .throw, and .return (see defineIteratorMethods).
|
|
497
|
-
this._invoke = enqueue;
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
defineIteratorMethods(AsyncIterator.prototype);
|
|
501
|
-
define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
502
|
-
return this;
|
|
503
|
-
});
|
|
504
|
-
exports.AsyncIterator = AsyncIterator;
|
|
505
|
-
|
|
506
|
-
// Note that simple async functions are implemented on top of
|
|
507
|
-
// AsyncIterator objects; they just return a Promise for the value of
|
|
508
|
-
// the final result produced by the iterator.
|
|
509
|
-
exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
510
|
-
if (PromiseImpl === void 0) PromiseImpl = Promise;
|
|
511
|
-
|
|
512
|
-
var iter = new AsyncIterator(
|
|
513
|
-
wrap(innerFn, outerFn, self, tryLocsList),
|
|
514
|
-
PromiseImpl
|
|
515
|
-
);
|
|
516
|
-
|
|
517
|
-
return exports.isGeneratorFunction(outerFn)
|
|
518
|
-
? iter // If outerFn is a generator, return the full iterator.
|
|
519
|
-
: iter.next().then(function(result) {
|
|
520
|
-
return result.done ? result.value : iter.next();
|
|
521
|
-
});
|
|
522
|
-
};
|
|
523
|
-
|
|
524
|
-
function makeInvokeMethod(innerFn, self, context) {
|
|
525
|
-
var state = GenStateSuspendedStart;
|
|
526
|
-
|
|
527
|
-
return function invoke(method, arg) {
|
|
528
|
-
if (state === GenStateExecuting) {
|
|
529
|
-
throw new Error("Generator is already running");
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
if (state === GenStateCompleted) {
|
|
533
|
-
if (method === "throw") {
|
|
534
|
-
throw arg;
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
// Be forgiving, per 25.3.3.3.3 of the spec:
|
|
538
|
-
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
|
539
|
-
return doneResult();
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
context.method = method;
|
|
543
|
-
context.arg = arg;
|
|
544
|
-
|
|
545
|
-
while (true) {
|
|
546
|
-
var delegate = context.delegate;
|
|
547
|
-
if (delegate) {
|
|
548
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
549
|
-
if (delegateResult) {
|
|
550
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
551
|
-
return delegateResult;
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
if (context.method === "next") {
|
|
556
|
-
// Setting context._sent for legacy support of Babel's
|
|
557
|
-
// function.sent implementation.
|
|
558
|
-
context.sent = context._sent = context.arg;
|
|
559
|
-
|
|
560
|
-
} else if (context.method === "throw") {
|
|
561
|
-
if (state === GenStateSuspendedStart) {
|
|
562
|
-
state = GenStateCompleted;
|
|
563
|
-
throw context.arg;
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
context.dispatchException(context.arg);
|
|
567
|
-
|
|
568
|
-
} else if (context.method === "return") {
|
|
569
|
-
context.abrupt("return", context.arg);
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
state = GenStateExecuting;
|
|
573
|
-
|
|
574
|
-
var record = tryCatch(innerFn, self, context);
|
|
575
|
-
if (record.type === "normal") {
|
|
576
|
-
// If an exception is thrown from innerFn, we leave state ===
|
|
577
|
-
// GenStateExecuting and loop back for another invocation.
|
|
578
|
-
state = context.done
|
|
579
|
-
? GenStateCompleted
|
|
580
|
-
: GenStateSuspendedYield;
|
|
581
|
-
|
|
582
|
-
if (record.arg === ContinueSentinel) {
|
|
583
|
-
continue;
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
return {
|
|
587
|
-
value: record.arg,
|
|
588
|
-
done: context.done
|
|
589
|
-
};
|
|
590
|
-
|
|
591
|
-
} else if (record.type === "throw") {
|
|
592
|
-
state = GenStateCompleted;
|
|
593
|
-
// Dispatch the exception by looping back around to the
|
|
594
|
-
// context.dispatchException(context.arg) call above.
|
|
595
|
-
context.method = "throw";
|
|
596
|
-
context.arg = record.arg;
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
};
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
// Call delegate.iterator[context.method](context.arg) and handle the
|
|
603
|
-
// result, either by returning a { value, done } result from the
|
|
604
|
-
// delegate iterator, or by modifying context.method and context.arg,
|
|
605
|
-
// setting context.delegate to null, and returning the ContinueSentinel.
|
|
606
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
607
|
-
var method = delegate.iterator[context.method];
|
|
608
|
-
if (method === undefined$1) {
|
|
609
|
-
// A .throw or .return when the delegate iterator has no .throw
|
|
610
|
-
// method always terminates the yield* loop.
|
|
611
|
-
context.delegate = null;
|
|
612
|
-
|
|
613
|
-
if (context.method === "throw") {
|
|
614
|
-
// Note: ["return"] must be used for ES3 parsing compatibility.
|
|
615
|
-
if (delegate.iterator["return"]) {
|
|
616
|
-
// If the delegate iterator has a return method, give it a
|
|
617
|
-
// chance to clean up.
|
|
618
|
-
context.method = "return";
|
|
619
|
-
context.arg = undefined$1;
|
|
620
|
-
maybeInvokeDelegate(delegate, context);
|
|
621
|
-
|
|
622
|
-
if (context.method === "throw") {
|
|
623
|
-
// If maybeInvokeDelegate(context) changed context.method from
|
|
624
|
-
// "return" to "throw", let that override the TypeError below.
|
|
625
|
-
return ContinueSentinel;
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
|
|
629
|
-
context.method = "throw";
|
|
630
|
-
context.arg = new TypeError(
|
|
631
|
-
"The iterator does not provide a 'throw' method");
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
return ContinueSentinel;
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
638
|
-
|
|
639
|
-
if (record.type === "throw") {
|
|
640
|
-
context.method = "throw";
|
|
641
|
-
context.arg = record.arg;
|
|
642
|
-
context.delegate = null;
|
|
643
|
-
return ContinueSentinel;
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
var info = record.arg;
|
|
647
|
-
|
|
648
|
-
if (! info) {
|
|
649
|
-
context.method = "throw";
|
|
650
|
-
context.arg = new TypeError("iterator result is not an object");
|
|
651
|
-
context.delegate = null;
|
|
652
|
-
return ContinueSentinel;
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
if (info.done) {
|
|
656
|
-
// Assign the result of the finished delegate to the temporary
|
|
657
|
-
// variable specified by delegate.resultName (see delegateYield).
|
|
658
|
-
context[delegate.resultName] = info.value;
|
|
659
|
-
|
|
660
|
-
// Resume execution at the desired location (see delegateYield).
|
|
661
|
-
context.next = delegate.nextLoc;
|
|
662
|
-
|
|
663
|
-
// If context.method was "throw" but the delegate handled the
|
|
664
|
-
// exception, let the outer generator proceed normally. If
|
|
665
|
-
// context.method was "next", forget context.arg since it has been
|
|
666
|
-
// "consumed" by the delegate iterator. If context.method was
|
|
667
|
-
// "return", allow the original .return call to continue in the
|
|
668
|
-
// outer generator.
|
|
669
|
-
if (context.method !== "return") {
|
|
670
|
-
context.method = "next";
|
|
671
|
-
context.arg = undefined$1;
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
} else {
|
|
675
|
-
// Re-yield the result returned by the delegate method.
|
|
676
|
-
return info;
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
// The delegate iterator is finished, so forget it and continue with
|
|
680
|
-
// the outer generator.
|
|
681
|
-
context.delegate = null;
|
|
682
|
-
return ContinueSentinel;
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
// Define Generator.prototype.{next,throw,return} in terms of the
|
|
686
|
-
// unified ._invoke helper method.
|
|
687
|
-
defineIteratorMethods(Gp);
|
|
688
|
-
|
|
689
|
-
define(Gp, toStringTagSymbol, "Generator");
|
|
690
|
-
|
|
691
|
-
// A Generator should always return itself as the iterator object when the
|
|
692
|
-
// @@iterator function is called on it. Some browsers' implementations of the
|
|
693
|
-
// iterator prototype chain incorrectly implement this, causing the Generator
|
|
694
|
-
// object to not be returned from this call. This ensures that doesn't happen.
|
|
695
|
-
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
696
|
-
define(Gp, iteratorSymbol, function() {
|
|
697
|
-
return this;
|
|
698
|
-
});
|
|
699
|
-
|
|
700
|
-
define(Gp, "toString", function() {
|
|
701
|
-
return "[object Generator]";
|
|
702
|
-
});
|
|
703
|
-
|
|
704
|
-
function pushTryEntry(locs) {
|
|
705
|
-
var entry = { tryLoc: locs[0] };
|
|
706
|
-
|
|
707
|
-
if (1 in locs) {
|
|
708
|
-
entry.catchLoc = locs[1];
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
if (2 in locs) {
|
|
712
|
-
entry.finallyLoc = locs[2];
|
|
713
|
-
entry.afterLoc = locs[3];
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
this.tryEntries.push(entry);
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
function resetTryEntry(entry) {
|
|
720
|
-
var record = entry.completion || {};
|
|
721
|
-
record.type = "normal";
|
|
722
|
-
delete record.arg;
|
|
723
|
-
entry.completion = record;
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
function Context(tryLocsList) {
|
|
727
|
-
// The root entry object (effectively a try statement without a catch
|
|
728
|
-
// or a finally block) gives us a place to store values thrown from
|
|
729
|
-
// locations where there is no enclosing try statement.
|
|
730
|
-
this.tryEntries = [{ tryLoc: "root" }];
|
|
731
|
-
tryLocsList.forEach(pushTryEntry, this);
|
|
732
|
-
this.reset(true);
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
exports.keys = function(object) {
|
|
736
|
-
var keys = [];
|
|
737
|
-
for (var key in object) {
|
|
738
|
-
keys.push(key);
|
|
739
|
-
}
|
|
740
|
-
keys.reverse();
|
|
741
|
-
|
|
742
|
-
// Rather than returning an object with a next method, we keep
|
|
743
|
-
// things simple and return the next function itself.
|
|
744
|
-
return function next() {
|
|
745
|
-
while (keys.length) {
|
|
746
|
-
var key = keys.pop();
|
|
747
|
-
if (key in object) {
|
|
748
|
-
next.value = key;
|
|
749
|
-
next.done = false;
|
|
750
|
-
return next;
|
|
751
|
-
}
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
// To avoid creating an additional object, we just hang the .value
|
|
755
|
-
// and .done properties off the next function object itself. This
|
|
756
|
-
// also ensures that the minifier will not anonymize the function.
|
|
757
|
-
next.done = true;
|
|
758
|
-
return next;
|
|
759
|
-
};
|
|
760
|
-
};
|
|
761
|
-
|
|
762
|
-
function values(iterable) {
|
|
763
|
-
if (iterable) {
|
|
764
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
765
|
-
if (iteratorMethod) {
|
|
766
|
-
return iteratorMethod.call(iterable);
|
|
767
|
-
}
|
|
768
|
-
|
|
769
|
-
if (typeof iterable.next === "function") {
|
|
770
|
-
return iterable;
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
if (!isNaN(iterable.length)) {
|
|
774
|
-
var i = -1, next = function next() {
|
|
775
|
-
while (++i < iterable.length) {
|
|
776
|
-
if (hasOwn.call(iterable, i)) {
|
|
777
|
-
next.value = iterable[i];
|
|
778
|
-
next.done = false;
|
|
779
|
-
return next;
|
|
780
|
-
}
|
|
781
|
-
}
|
|
782
|
-
|
|
783
|
-
next.value = undefined$1;
|
|
784
|
-
next.done = true;
|
|
785
|
-
|
|
786
|
-
return next;
|
|
787
|
-
};
|
|
788
|
-
|
|
789
|
-
return next.next = next;
|
|
790
|
-
}
|
|
791
|
-
}
|
|
792
|
-
|
|
793
|
-
// Return an iterator with no values.
|
|
794
|
-
return { next: doneResult };
|
|
795
|
-
}
|
|
796
|
-
exports.values = values;
|
|
797
|
-
|
|
798
|
-
function doneResult() {
|
|
799
|
-
return { value: undefined$1, done: true };
|
|
800
|
-
}
|
|
801
|
-
|
|
802
|
-
Context.prototype = {
|
|
803
|
-
constructor: Context,
|
|
804
|
-
|
|
805
|
-
reset: function(skipTempReset) {
|
|
806
|
-
this.prev = 0;
|
|
807
|
-
this.next = 0;
|
|
808
|
-
// Resetting context._sent for legacy support of Babel's
|
|
809
|
-
// function.sent implementation.
|
|
810
|
-
this.sent = this._sent = undefined$1;
|
|
811
|
-
this.done = false;
|
|
812
|
-
this.delegate = null;
|
|
813
|
-
|
|
814
|
-
this.method = "next";
|
|
815
|
-
this.arg = undefined$1;
|
|
816
|
-
|
|
817
|
-
this.tryEntries.forEach(resetTryEntry);
|
|
818
|
-
|
|
819
|
-
if (!skipTempReset) {
|
|
820
|
-
for (var name in this) {
|
|
821
|
-
// Not sure about the optimal order of these conditions:
|
|
822
|
-
if (name.charAt(0) === "t" &&
|
|
823
|
-
hasOwn.call(this, name) &&
|
|
824
|
-
!isNaN(+name.slice(1))) {
|
|
825
|
-
this[name] = undefined$1;
|
|
826
|
-
}
|
|
827
|
-
}
|
|
828
|
-
}
|
|
829
|
-
},
|
|
830
|
-
|
|
831
|
-
stop: function() {
|
|
832
|
-
this.done = true;
|
|
833
|
-
|
|
834
|
-
var rootEntry = this.tryEntries[0];
|
|
835
|
-
var rootRecord = rootEntry.completion;
|
|
836
|
-
if (rootRecord.type === "throw") {
|
|
837
|
-
throw rootRecord.arg;
|
|
838
|
-
}
|
|
839
|
-
|
|
840
|
-
return this.rval;
|
|
841
|
-
},
|
|
842
|
-
|
|
843
|
-
dispatchException: function(exception) {
|
|
844
|
-
if (this.done) {
|
|
845
|
-
throw exception;
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
var context = this;
|
|
849
|
-
function handle(loc, caught) {
|
|
850
|
-
record.type = "throw";
|
|
851
|
-
record.arg = exception;
|
|
852
|
-
context.next = loc;
|
|
853
|
-
|
|
854
|
-
if (caught) {
|
|
855
|
-
// If the dispatched exception was caught by a catch block,
|
|
856
|
-
// then let that catch block handle the exception normally.
|
|
857
|
-
context.method = "next";
|
|
858
|
-
context.arg = undefined$1;
|
|
859
|
-
}
|
|
860
|
-
|
|
861
|
-
return !! caught;
|
|
862
|
-
}
|
|
863
|
-
|
|
864
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
865
|
-
var entry = this.tryEntries[i];
|
|
866
|
-
var record = entry.completion;
|
|
867
|
-
|
|
868
|
-
if (entry.tryLoc === "root") {
|
|
869
|
-
// Exception thrown outside of any try block that could handle
|
|
870
|
-
// it, so set the completion value of the entire function to
|
|
871
|
-
// throw the exception.
|
|
872
|
-
return handle("end");
|
|
873
|
-
}
|
|
874
|
-
|
|
875
|
-
if (entry.tryLoc <= this.prev) {
|
|
876
|
-
var hasCatch = hasOwn.call(entry, "catchLoc");
|
|
877
|
-
var hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
878
|
-
|
|
879
|
-
if (hasCatch && hasFinally) {
|
|
880
|
-
if (this.prev < entry.catchLoc) {
|
|
881
|
-
return handle(entry.catchLoc, true);
|
|
882
|
-
} else if (this.prev < entry.finallyLoc) {
|
|
883
|
-
return handle(entry.finallyLoc);
|
|
884
|
-
}
|
|
885
|
-
|
|
886
|
-
} else if (hasCatch) {
|
|
887
|
-
if (this.prev < entry.catchLoc) {
|
|
888
|
-
return handle(entry.catchLoc, true);
|
|
889
|
-
}
|
|
890
|
-
|
|
891
|
-
} else if (hasFinally) {
|
|
892
|
-
if (this.prev < entry.finallyLoc) {
|
|
893
|
-
return handle(entry.finallyLoc);
|
|
894
|
-
}
|
|
895
|
-
|
|
896
|
-
} else {
|
|
897
|
-
throw new Error("try statement without catch or finally");
|
|
898
|
-
}
|
|
899
|
-
}
|
|
900
|
-
}
|
|
901
|
-
},
|
|
902
|
-
|
|
903
|
-
abrupt: function(type, arg) {
|
|
904
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
905
|
-
var entry = this.tryEntries[i];
|
|
906
|
-
if (entry.tryLoc <= this.prev &&
|
|
907
|
-
hasOwn.call(entry, "finallyLoc") &&
|
|
908
|
-
this.prev < entry.finallyLoc) {
|
|
909
|
-
var finallyEntry = entry;
|
|
910
|
-
break;
|
|
911
|
-
}
|
|
912
|
-
}
|
|
913
|
-
|
|
914
|
-
if (finallyEntry &&
|
|
915
|
-
(type === "break" ||
|
|
916
|
-
type === "continue") &&
|
|
917
|
-
finallyEntry.tryLoc <= arg &&
|
|
918
|
-
arg <= finallyEntry.finallyLoc) {
|
|
919
|
-
// Ignore the finally entry if control is not jumping to a
|
|
920
|
-
// location outside the try/catch block.
|
|
921
|
-
finallyEntry = null;
|
|
922
|
-
}
|
|
923
|
-
|
|
924
|
-
var record = finallyEntry ? finallyEntry.completion : {};
|
|
925
|
-
record.type = type;
|
|
926
|
-
record.arg = arg;
|
|
927
|
-
|
|
928
|
-
if (finallyEntry) {
|
|
929
|
-
this.method = "next";
|
|
930
|
-
this.next = finallyEntry.finallyLoc;
|
|
931
|
-
return ContinueSentinel;
|
|
932
|
-
}
|
|
933
|
-
|
|
934
|
-
return this.complete(record);
|
|
935
|
-
},
|
|
936
|
-
|
|
937
|
-
complete: function(record, afterLoc) {
|
|
938
|
-
if (record.type === "throw") {
|
|
939
|
-
throw record.arg;
|
|
940
|
-
}
|
|
941
|
-
|
|
942
|
-
if (record.type === "break" ||
|
|
943
|
-
record.type === "continue") {
|
|
944
|
-
this.next = record.arg;
|
|
945
|
-
} else if (record.type === "return") {
|
|
946
|
-
this.rval = this.arg = record.arg;
|
|
947
|
-
this.method = "return";
|
|
948
|
-
this.next = "end";
|
|
949
|
-
} else if (record.type === "normal" && afterLoc) {
|
|
950
|
-
this.next = afterLoc;
|
|
951
|
-
}
|
|
952
|
-
|
|
953
|
-
return ContinueSentinel;
|
|
954
|
-
},
|
|
955
|
-
|
|
956
|
-
finish: function(finallyLoc) {
|
|
957
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
958
|
-
var entry = this.tryEntries[i];
|
|
959
|
-
if (entry.finallyLoc === finallyLoc) {
|
|
960
|
-
this.complete(entry.completion, entry.afterLoc);
|
|
961
|
-
resetTryEntry(entry);
|
|
962
|
-
return ContinueSentinel;
|
|
963
|
-
}
|
|
964
|
-
}
|
|
965
|
-
},
|
|
966
|
-
|
|
967
|
-
"catch": function(tryLoc) {
|
|
968
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
969
|
-
var entry = this.tryEntries[i];
|
|
970
|
-
if (entry.tryLoc === tryLoc) {
|
|
971
|
-
var record = entry.completion;
|
|
972
|
-
if (record.type === "throw") {
|
|
973
|
-
var thrown = record.arg;
|
|
974
|
-
resetTryEntry(entry);
|
|
975
|
-
}
|
|
976
|
-
return thrown;
|
|
977
|
-
}
|
|
978
|
-
}
|
|
979
|
-
|
|
980
|
-
// The context.catch method must only be called with a location
|
|
981
|
-
// argument that corresponds to a known catch block.
|
|
982
|
-
throw new Error("illegal catch attempt");
|
|
983
|
-
},
|
|
984
|
-
|
|
985
|
-
delegateYield: function(iterable, resultName, nextLoc) {
|
|
986
|
-
this.delegate = {
|
|
987
|
-
iterator: values(iterable),
|
|
988
|
-
resultName: resultName,
|
|
989
|
-
nextLoc: nextLoc
|
|
990
|
-
};
|
|
991
|
-
|
|
992
|
-
if (this.method === "next") {
|
|
993
|
-
// Deliberately forget the last sent value so that we don't
|
|
994
|
-
// accidentally pass it on to the delegate.
|
|
995
|
-
this.arg = undefined$1;
|
|
996
|
-
}
|
|
997
|
-
|
|
998
|
-
return ContinueSentinel;
|
|
999
|
-
}
|
|
1000
|
-
};
|
|
1001
|
-
|
|
1002
|
-
// Regardless of whether this script is executing as a CommonJS module
|
|
1003
|
-
// or not, return the runtime object so that we can declare the variable
|
|
1004
|
-
// regeneratorRuntime in the outer scope, which allows this module to be
|
|
1005
|
-
// injected easily by `bin/regenerator --include-runtime script.js`.
|
|
1006
|
-
return exports;
|
|
1007
|
-
|
|
1008
|
-
}(
|
|
1009
|
-
// If this script is executing as a CommonJS module, use module.exports
|
|
1010
|
-
// as the regeneratorRuntime namespace. Otherwise create a new empty
|
|
1011
|
-
// object. Either way, the resulting object will be used to initialize
|
|
1012
|
-
// the regeneratorRuntime variable at the top of this file.
|
|
1013
|
-
module.exports
|
|
1014
|
-
));
|
|
1015
|
-
|
|
1016
|
-
try {
|
|
1017
|
-
regeneratorRuntime = runtime;
|
|
1018
|
-
} catch (accidentalStrictMode) {
|
|
1019
|
-
// This module should not be running in strict mode, so the above
|
|
1020
|
-
// assignment should always work unless something is misconfigured. Just
|
|
1021
|
-
// in case runtime.js accidentally runs in strict mode, in modern engines
|
|
1022
|
-
// we can explicitly access globalThis. In older engines we can escape
|
|
1023
|
-
// strict mode using a global Function call. This could conceivably fail
|
|
1024
|
-
// if a Content Security Policy forbids using Function, but in that case
|
|
1025
|
-
// the proper solution is to fix the accidental strict mode problem. If
|
|
1026
|
-
// you've misconfigured your bundler to force strict mode and applied a
|
|
1027
|
-
// CSP to forbid Function, and you're not willing to fix either of those
|
|
1028
|
-
// problems, please detail your unique predicament in a GitHub issue.
|
|
1029
|
-
if (typeof globalThis === "object") {
|
|
1030
|
-
globalThis.regeneratorRuntime = runtime;
|
|
1031
|
-
} else {
|
|
1032
|
-
Function("r", "regeneratorRuntime = r")(runtime);
|
|
1033
|
-
}
|
|
1034
|
-
}
|
|
1035
|
-
});
|
|
1036
|
-
|
|
1037
|
-
var regenerator = runtime_1;
|
|
1038
|
-
|
|
1039
|
-
/**
|
|
1040
|
-
* Checks if `value` is classified as an `Array` object.
|
|
1041
|
-
*
|
|
1042
|
-
* @static
|
|
1043
|
-
* @memberOf _
|
|
1044
|
-
* @since 0.1.0
|
|
1045
|
-
* @category Lang
|
|
1046
|
-
* @param {*} value The value to check.
|
|
1047
|
-
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
1048
|
-
* @example
|
|
1049
|
-
*
|
|
1050
|
-
* _.isArray([1, 2, 3]);
|
|
1051
|
-
* // => true
|
|
1052
|
-
*
|
|
1053
|
-
* _.isArray(document.body.children);
|
|
1054
|
-
* // => false
|
|
1055
|
-
*
|
|
1056
|
-
* _.isArray('abc');
|
|
1057
|
-
* // => false
|
|
1058
|
-
*
|
|
1059
|
-
* _.isArray(_.noop);
|
|
1060
|
-
* // => false
|
|
1061
|
-
*/
|
|
1062
|
-
var isArray = Array.isArray;
|
|
1063
|
-
|
|
1064
|
-
var isArray_1 = isArray;
|
|
1065
|
-
|
|
1066
|
-
/** Detect free variable `global` from Node.js. */
|
|
1067
|
-
|
|
1068
|
-
var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
1069
|
-
|
|
1070
|
-
var _freeGlobal = freeGlobal;
|
|
1071
|
-
|
|
1072
|
-
/** Detect free variable `self`. */
|
|
1073
|
-
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
1074
|
-
|
|
1075
|
-
/** Used as a reference to the global object. */
|
|
1076
|
-
var root = _freeGlobal || freeSelf || Function('return this')();
|
|
1077
|
-
|
|
1078
|
-
var _root = root;
|
|
1079
|
-
|
|
1080
|
-
/** Built-in value references. */
|
|
1081
|
-
var Symbol$1 = _root.Symbol;
|
|
1082
|
-
|
|
1083
|
-
var _Symbol = Symbol$1;
|
|
1084
|
-
|
|
1085
|
-
/** Used for built-in method references. */
|
|
1086
|
-
var objectProto$4 = Object.prototype;
|
|
1087
|
-
|
|
1088
|
-
/** Used to check objects for own properties. */
|
|
1089
|
-
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
1090
|
-
|
|
1091
|
-
/**
|
|
1092
|
-
* Used to resolve the
|
|
1093
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
1094
|
-
* of values.
|
|
1095
|
-
*/
|
|
1096
|
-
var nativeObjectToString$1 = objectProto$4.toString;
|
|
1097
|
-
|
|
1098
|
-
/** Built-in value references. */
|
|
1099
|
-
var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
|
|
1100
|
-
|
|
1101
|
-
/**
|
|
1102
|
-
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
1103
|
-
*
|
|
1104
|
-
* @private
|
|
1105
|
-
* @param {*} value The value to query.
|
|
1106
|
-
* @returns {string} Returns the raw `toStringTag`.
|
|
1107
|
-
*/
|
|
1108
|
-
function getRawTag(value) {
|
|
1109
|
-
var isOwn = hasOwnProperty$3.call(value, symToStringTag$1),
|
|
1110
|
-
tag = value[symToStringTag$1];
|
|
1111
|
-
|
|
1112
|
-
try {
|
|
1113
|
-
value[symToStringTag$1] = undefined;
|
|
1114
|
-
var unmasked = true;
|
|
1115
|
-
} catch (e) {}
|
|
1116
|
-
|
|
1117
|
-
var result = nativeObjectToString$1.call(value);
|
|
1118
|
-
if (unmasked) {
|
|
1119
|
-
if (isOwn) {
|
|
1120
|
-
value[symToStringTag$1] = tag;
|
|
1121
|
-
} else {
|
|
1122
|
-
delete value[symToStringTag$1];
|
|
1123
|
-
}
|
|
1124
|
-
}
|
|
1125
|
-
return result;
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
|
-
var _getRawTag = getRawTag;
|
|
1129
|
-
|
|
1130
|
-
/** Used for built-in method references. */
|
|
1131
|
-
var objectProto$3 = Object.prototype;
|
|
1132
|
-
|
|
1133
|
-
/**
|
|
1134
|
-
* Used to resolve the
|
|
1135
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
1136
|
-
* of values.
|
|
1137
|
-
*/
|
|
1138
|
-
var nativeObjectToString = objectProto$3.toString;
|
|
1139
|
-
|
|
1140
|
-
/**
|
|
1141
|
-
* Converts `value` to a string using `Object.prototype.toString`.
|
|
1142
|
-
*
|
|
1143
|
-
* @private
|
|
1144
|
-
* @param {*} value The value to convert.
|
|
1145
|
-
* @returns {string} Returns the converted string.
|
|
1146
|
-
*/
|
|
1147
|
-
function objectToString(value) {
|
|
1148
|
-
return nativeObjectToString.call(value);
|
|
1149
|
-
}
|
|
1150
|
-
|
|
1151
|
-
var _objectToString = objectToString;
|
|
1152
|
-
|
|
1153
|
-
/** `Object#toString` result references. */
|
|
1154
|
-
var nullTag = '[object Null]',
|
|
1155
|
-
undefinedTag = '[object Undefined]';
|
|
1156
|
-
|
|
1157
|
-
/** Built-in value references. */
|
|
1158
|
-
var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
|
|
1159
|
-
|
|
1160
|
-
/**
|
|
1161
|
-
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
1162
|
-
*
|
|
1163
|
-
* @private
|
|
1164
|
-
* @param {*} value The value to query.
|
|
1165
|
-
* @returns {string} Returns the `toStringTag`.
|
|
1166
|
-
*/
|
|
1167
|
-
function baseGetTag(value) {
|
|
1168
|
-
if (value == null) {
|
|
1169
|
-
return value === undefined ? undefinedTag : nullTag;
|
|
1170
|
-
}
|
|
1171
|
-
return (symToStringTag && symToStringTag in Object(value))
|
|
1172
|
-
? _getRawTag(value)
|
|
1173
|
-
: _objectToString(value);
|
|
1174
|
-
}
|
|
1175
|
-
|
|
1176
|
-
var _baseGetTag = baseGetTag;
|
|
1177
|
-
|
|
1178
|
-
/**
|
|
1179
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
1180
|
-
* and has a `typeof` result of "object".
|
|
1181
|
-
*
|
|
1182
|
-
* @static
|
|
1183
|
-
* @memberOf _
|
|
1184
|
-
* @since 4.0.0
|
|
1185
|
-
* @category Lang
|
|
1186
|
-
* @param {*} value The value to check.
|
|
1187
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
1188
|
-
* @example
|
|
1189
|
-
*
|
|
1190
|
-
* _.isObjectLike({});
|
|
1191
|
-
* // => true
|
|
1192
|
-
*
|
|
1193
|
-
* _.isObjectLike([1, 2, 3]);
|
|
1194
|
-
* // => true
|
|
1195
|
-
*
|
|
1196
|
-
* _.isObjectLike(_.noop);
|
|
1197
|
-
* // => false
|
|
1198
|
-
*
|
|
1199
|
-
* _.isObjectLike(null);
|
|
1200
|
-
* // => false
|
|
1201
|
-
*/
|
|
1202
|
-
function isObjectLike(value) {
|
|
1203
|
-
return value != null && typeof value == 'object';
|
|
1204
|
-
}
|
|
1205
|
-
|
|
1206
|
-
var isObjectLike_1 = isObjectLike;
|
|
1207
|
-
|
|
1208
|
-
/** `Object#toString` result references. */
|
|
1209
|
-
var symbolTag = '[object Symbol]';
|
|
1210
|
-
|
|
1211
|
-
/**
|
|
1212
|
-
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
1213
|
-
*
|
|
1214
|
-
* @static
|
|
1215
|
-
* @memberOf _
|
|
1216
|
-
* @since 4.0.0
|
|
1217
|
-
* @category Lang
|
|
1218
|
-
* @param {*} value The value to check.
|
|
1219
|
-
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
1220
|
-
* @example
|
|
1221
|
-
*
|
|
1222
|
-
* _.isSymbol(Symbol.iterator);
|
|
1223
|
-
* // => true
|
|
1224
|
-
*
|
|
1225
|
-
* _.isSymbol('abc');
|
|
1226
|
-
* // => false
|
|
1227
|
-
*/
|
|
1228
|
-
function isSymbol(value) {
|
|
1229
|
-
return typeof value == 'symbol' ||
|
|
1230
|
-
(isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
|
|
1231
|
-
}
|
|
1232
|
-
|
|
1233
|
-
var isSymbol_1 = isSymbol;
|
|
1234
|
-
|
|
1235
|
-
/** Used to match property names within property paths. */
|
|
1236
|
-
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
|
1237
|
-
reIsPlainProp = /^\w*$/;
|
|
1238
|
-
|
|
1239
|
-
/**
|
|
1240
|
-
* Checks if `value` is a property name and not a property path.
|
|
1241
|
-
*
|
|
1242
|
-
* @private
|
|
1243
|
-
* @param {*} value The value to check.
|
|
1244
|
-
* @param {Object} [object] The object to query keys on.
|
|
1245
|
-
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
1246
|
-
*/
|
|
1247
|
-
function isKey(value, object) {
|
|
1248
|
-
if (isArray_1(value)) {
|
|
1249
|
-
return false;
|
|
1250
|
-
}
|
|
1251
|
-
var type = typeof value;
|
|
1252
|
-
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
|
|
1253
|
-
value == null || isSymbol_1(value)) {
|
|
1254
|
-
return true;
|
|
1255
|
-
}
|
|
1256
|
-
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
|
1257
|
-
(object != null && value in Object(object));
|
|
1258
|
-
}
|
|
1259
|
-
|
|
1260
|
-
var _isKey = isKey;
|
|
1261
|
-
|
|
1262
|
-
/**
|
|
1263
|
-
* Checks if `value` is the
|
|
1264
|
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
1265
|
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
1266
|
-
*
|
|
1267
|
-
* @static
|
|
1268
|
-
* @memberOf _
|
|
1269
|
-
* @since 0.1.0
|
|
1270
|
-
* @category Lang
|
|
1271
|
-
* @param {*} value The value to check.
|
|
1272
|
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
1273
|
-
* @example
|
|
1274
|
-
*
|
|
1275
|
-
* _.isObject({});
|
|
1276
|
-
* // => true
|
|
1277
|
-
*
|
|
1278
|
-
* _.isObject([1, 2, 3]);
|
|
1279
|
-
* // => true
|
|
1280
|
-
*
|
|
1281
|
-
* _.isObject(_.noop);
|
|
1282
|
-
* // => true
|
|
1283
|
-
*
|
|
1284
|
-
* _.isObject(null);
|
|
1285
|
-
* // => false
|
|
1286
|
-
*/
|
|
1287
|
-
function isObject(value) {
|
|
1288
|
-
var type = typeof value;
|
|
1289
|
-
return value != null && (type == 'object' || type == 'function');
|
|
1290
|
-
}
|
|
1291
|
-
|
|
1292
|
-
var isObject_1 = isObject;
|
|
1293
|
-
|
|
1294
|
-
/** `Object#toString` result references. */
|
|
1295
|
-
var asyncTag = '[object AsyncFunction]',
|
|
1296
|
-
funcTag = '[object Function]',
|
|
1297
|
-
genTag = '[object GeneratorFunction]',
|
|
1298
|
-
proxyTag = '[object Proxy]';
|
|
1299
|
-
|
|
1300
|
-
/**
|
|
1301
|
-
* Checks if `value` is classified as a `Function` object.
|
|
1302
|
-
*
|
|
1303
|
-
* @static
|
|
1304
|
-
* @memberOf _
|
|
1305
|
-
* @since 0.1.0
|
|
1306
|
-
* @category Lang
|
|
1307
|
-
* @param {*} value The value to check.
|
|
1308
|
-
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
1309
|
-
* @example
|
|
1310
|
-
*
|
|
1311
|
-
* _.isFunction(_);
|
|
1312
|
-
* // => true
|
|
1313
|
-
*
|
|
1314
|
-
* _.isFunction(/abc/);
|
|
1315
|
-
* // => false
|
|
1316
|
-
*/
|
|
1317
|
-
function isFunction(value) {
|
|
1318
|
-
if (!isObject_1(value)) {
|
|
1319
|
-
return false;
|
|
1320
|
-
}
|
|
1321
|
-
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
1322
|
-
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
1323
|
-
var tag = _baseGetTag(value);
|
|
1324
|
-
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
1325
|
-
}
|
|
1326
|
-
|
|
1327
|
-
var isFunction_1 = isFunction;
|
|
1328
|
-
|
|
1329
|
-
/** Used to detect overreaching core-js shims. */
|
|
1330
|
-
var coreJsData = _root['__core-js_shared__'];
|
|
1331
|
-
|
|
1332
|
-
var _coreJsData = coreJsData;
|
|
1333
|
-
|
|
1334
|
-
/** Used to detect methods masquerading as native. */
|
|
1335
|
-
var maskSrcKey = (function() {
|
|
1336
|
-
var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
|
|
1337
|
-
return uid ? ('Symbol(src)_1.' + uid) : '';
|
|
1338
|
-
}());
|
|
1339
|
-
|
|
1340
|
-
/**
|
|
1341
|
-
* Checks if `func` has its source masked.
|
|
1342
|
-
*
|
|
1343
|
-
* @private
|
|
1344
|
-
* @param {Function} func The function to check.
|
|
1345
|
-
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
1346
|
-
*/
|
|
1347
|
-
function isMasked(func) {
|
|
1348
|
-
return !!maskSrcKey && (maskSrcKey in func);
|
|
1349
|
-
}
|
|
1350
|
-
|
|
1351
|
-
var _isMasked = isMasked;
|
|
1352
|
-
|
|
1353
|
-
/** Used for built-in method references. */
|
|
1354
|
-
var funcProto$1 = Function.prototype;
|
|
1355
|
-
|
|
1356
|
-
/** Used to resolve the decompiled source of functions. */
|
|
1357
|
-
var funcToString$1 = funcProto$1.toString;
|
|
1358
|
-
|
|
1359
|
-
/**
|
|
1360
|
-
* Converts `func` to its source code.
|
|
1361
|
-
*
|
|
1362
|
-
* @private
|
|
1363
|
-
* @param {Function} func The function to convert.
|
|
1364
|
-
* @returns {string} Returns the source code.
|
|
1365
|
-
*/
|
|
1366
|
-
function toSource(func) {
|
|
1367
|
-
if (func != null) {
|
|
1368
|
-
try {
|
|
1369
|
-
return funcToString$1.call(func);
|
|
1370
|
-
} catch (e) {}
|
|
1371
|
-
try {
|
|
1372
|
-
return (func + '');
|
|
1373
|
-
} catch (e) {}
|
|
1374
|
-
}
|
|
1375
|
-
return '';
|
|
1376
|
-
}
|
|
1377
|
-
|
|
1378
|
-
var _toSource = toSource;
|
|
1379
|
-
|
|
1380
|
-
/**
|
|
1381
|
-
* Used to match `RegExp`
|
|
1382
|
-
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
1383
|
-
*/
|
|
1384
|
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
1385
|
-
|
|
1386
|
-
/** Used to detect host constructors (Safari). */
|
|
1387
|
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
1388
|
-
|
|
1389
|
-
/** Used for built-in method references. */
|
|
1390
|
-
var funcProto = Function.prototype,
|
|
1391
|
-
objectProto$2 = Object.prototype;
|
|
1392
|
-
|
|
1393
|
-
/** Used to resolve the decompiled source of functions. */
|
|
1394
|
-
var funcToString = funcProto.toString;
|
|
1395
|
-
|
|
1396
|
-
/** Used to check objects for own properties. */
|
|
1397
|
-
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
1398
|
-
|
|
1399
|
-
/** Used to detect if a method is native. */
|
|
1400
|
-
var reIsNative = RegExp('^' +
|
|
1401
|
-
funcToString.call(hasOwnProperty$2).replace(reRegExpChar, '\\$&')
|
|
1402
|
-
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
1403
|
-
);
|
|
1404
|
-
|
|
1405
|
-
/**
|
|
1406
|
-
* The base implementation of `_.isNative` without bad shim checks.
|
|
1407
|
-
*
|
|
1408
|
-
* @private
|
|
1409
|
-
* @param {*} value The value to check.
|
|
1410
|
-
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
1411
|
-
* else `false`.
|
|
1412
|
-
*/
|
|
1413
|
-
function baseIsNative(value) {
|
|
1414
|
-
if (!isObject_1(value) || _isMasked(value)) {
|
|
1415
|
-
return false;
|
|
1416
|
-
}
|
|
1417
|
-
var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
|
|
1418
|
-
return pattern.test(_toSource(value));
|
|
1419
|
-
}
|
|
1420
|
-
|
|
1421
|
-
var _baseIsNative = baseIsNative;
|
|
1422
|
-
|
|
1423
|
-
/**
|
|
1424
|
-
* Gets the value at `key` of `object`.
|
|
1425
|
-
*
|
|
1426
|
-
* @private
|
|
1427
|
-
* @param {Object} [object] The object to query.
|
|
1428
|
-
* @param {string} key The key of the property to get.
|
|
1429
|
-
* @returns {*} Returns the property value.
|
|
1430
|
-
*/
|
|
1431
|
-
function getValue(object, key) {
|
|
1432
|
-
return object == null ? undefined : object[key];
|
|
1433
|
-
}
|
|
1434
|
-
|
|
1435
|
-
var _getValue = getValue;
|
|
1436
|
-
|
|
1437
|
-
/**
|
|
1438
|
-
* Gets the native function at `key` of `object`.
|
|
1439
|
-
*
|
|
1440
|
-
* @private
|
|
1441
|
-
* @param {Object} object The object to query.
|
|
1442
|
-
* @param {string} key The key of the method to get.
|
|
1443
|
-
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
1444
|
-
*/
|
|
1445
|
-
function getNative(object, key) {
|
|
1446
|
-
var value = _getValue(object, key);
|
|
1447
|
-
return _baseIsNative(value) ? value : undefined;
|
|
1448
|
-
}
|
|
1449
|
-
|
|
1450
|
-
var _getNative = getNative;
|
|
1451
|
-
|
|
1452
|
-
/* Built-in method references that are verified to be native. */
|
|
1453
|
-
var nativeCreate = _getNative(Object, 'create');
|
|
1454
|
-
|
|
1455
|
-
var _nativeCreate = nativeCreate;
|
|
1456
|
-
|
|
1457
|
-
/**
|
|
1458
|
-
* Removes all key-value entries from the hash.
|
|
1459
|
-
*
|
|
1460
|
-
* @private
|
|
1461
|
-
* @name clear
|
|
1462
|
-
* @memberOf Hash
|
|
1463
|
-
*/
|
|
1464
|
-
function hashClear() {
|
|
1465
|
-
this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
|
|
1466
|
-
this.size = 0;
|
|
1467
|
-
}
|
|
1468
|
-
|
|
1469
|
-
var _hashClear = hashClear;
|
|
1470
|
-
|
|
1471
|
-
/**
|
|
1472
|
-
* Removes `key` and its value from the hash.
|
|
1473
|
-
*
|
|
1474
|
-
* @private
|
|
1475
|
-
* @name delete
|
|
1476
|
-
* @memberOf Hash
|
|
1477
|
-
* @param {Object} hash The hash to modify.
|
|
1478
|
-
* @param {string} key The key of the value to remove.
|
|
1479
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1480
|
-
*/
|
|
1481
|
-
function hashDelete(key) {
|
|
1482
|
-
var result = this.has(key) && delete this.__data__[key];
|
|
1483
|
-
this.size -= result ? 1 : 0;
|
|
1484
|
-
return result;
|
|
1485
|
-
}
|
|
1486
|
-
|
|
1487
|
-
var _hashDelete = hashDelete;
|
|
1488
|
-
|
|
1489
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
1490
|
-
var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
|
|
1491
|
-
|
|
1492
|
-
/** Used for built-in method references. */
|
|
1493
|
-
var objectProto$1 = Object.prototype;
|
|
1494
|
-
|
|
1495
|
-
/** Used to check objects for own properties. */
|
|
1496
|
-
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
1497
|
-
|
|
1498
|
-
/**
|
|
1499
|
-
* Gets the hash value for `key`.
|
|
1500
|
-
*
|
|
1501
|
-
* @private
|
|
1502
|
-
* @name get
|
|
1503
|
-
* @memberOf Hash
|
|
1504
|
-
* @param {string} key The key of the value to get.
|
|
1505
|
-
* @returns {*} Returns the entry value.
|
|
1506
|
-
*/
|
|
1507
|
-
function hashGet(key) {
|
|
1508
|
-
var data = this.__data__;
|
|
1509
|
-
if (_nativeCreate) {
|
|
1510
|
-
var result = data[key];
|
|
1511
|
-
return result === HASH_UNDEFINED$1 ? undefined : result;
|
|
1512
|
-
}
|
|
1513
|
-
return hasOwnProperty$1.call(data, key) ? data[key] : undefined;
|
|
1514
|
-
}
|
|
1515
|
-
|
|
1516
|
-
var _hashGet = hashGet;
|
|
1517
|
-
|
|
1518
|
-
/** Used for built-in method references. */
|
|
1519
|
-
var objectProto = Object.prototype;
|
|
1520
|
-
|
|
1521
|
-
/** Used to check objects for own properties. */
|
|
1522
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1523
|
-
|
|
1524
|
-
/**
|
|
1525
|
-
* Checks if a hash value for `key` exists.
|
|
1526
|
-
*
|
|
1527
|
-
* @private
|
|
1528
|
-
* @name has
|
|
1529
|
-
* @memberOf Hash
|
|
1530
|
-
* @param {string} key The key of the entry to check.
|
|
1531
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1532
|
-
*/
|
|
1533
|
-
function hashHas(key) {
|
|
1534
|
-
var data = this.__data__;
|
|
1535
|
-
return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
|
|
1536
|
-
}
|
|
1537
|
-
|
|
1538
|
-
var _hashHas = hashHas;
|
|
1539
|
-
|
|
1540
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
1541
|
-
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
1542
|
-
|
|
1543
|
-
/**
|
|
1544
|
-
* Sets the hash `key` to `value`.
|
|
1545
|
-
*
|
|
1546
|
-
* @private
|
|
1547
|
-
* @name set
|
|
1548
|
-
* @memberOf Hash
|
|
1549
|
-
* @param {string} key The key of the value to set.
|
|
1550
|
-
* @param {*} value The value to set.
|
|
1551
|
-
* @returns {Object} Returns the hash instance.
|
|
1552
|
-
*/
|
|
1553
|
-
function hashSet(key, value) {
|
|
1554
|
-
var data = this.__data__;
|
|
1555
|
-
this.size += this.has(key) ? 0 : 1;
|
|
1556
|
-
data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
|
1557
|
-
return this;
|
|
1558
|
-
}
|
|
1559
|
-
|
|
1560
|
-
var _hashSet = hashSet;
|
|
1561
|
-
|
|
1562
|
-
/**
|
|
1563
|
-
* Creates a hash object.
|
|
1564
|
-
*
|
|
1565
|
-
* @private
|
|
1566
|
-
* @constructor
|
|
1567
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
1568
|
-
*/
|
|
1569
|
-
function Hash(entries) {
|
|
1570
|
-
var index = -1,
|
|
1571
|
-
length = entries == null ? 0 : entries.length;
|
|
1572
|
-
|
|
1573
|
-
this.clear();
|
|
1574
|
-
while (++index < length) {
|
|
1575
|
-
var entry = entries[index];
|
|
1576
|
-
this.set(entry[0], entry[1]);
|
|
1577
|
-
}
|
|
1578
|
-
}
|
|
1579
|
-
|
|
1580
|
-
// Add methods to `Hash`.
|
|
1581
|
-
Hash.prototype.clear = _hashClear;
|
|
1582
|
-
Hash.prototype['delete'] = _hashDelete;
|
|
1583
|
-
Hash.prototype.get = _hashGet;
|
|
1584
|
-
Hash.prototype.has = _hashHas;
|
|
1585
|
-
Hash.prototype.set = _hashSet;
|
|
1586
|
-
|
|
1587
|
-
var _Hash = Hash;
|
|
1588
|
-
|
|
1589
|
-
/**
|
|
1590
|
-
* Removes all key-value entries from the list cache.
|
|
1591
|
-
*
|
|
1592
|
-
* @private
|
|
1593
|
-
* @name clear
|
|
1594
|
-
* @memberOf ListCache
|
|
1595
|
-
*/
|
|
1596
|
-
function listCacheClear() {
|
|
1597
|
-
this.__data__ = [];
|
|
1598
|
-
this.size = 0;
|
|
1599
|
-
}
|
|
1600
|
-
|
|
1601
|
-
var _listCacheClear = listCacheClear;
|
|
1602
|
-
|
|
1603
|
-
/**
|
|
1604
|
-
* Performs a
|
|
1605
|
-
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
1606
|
-
* comparison between two values to determine if they are equivalent.
|
|
1607
|
-
*
|
|
1608
|
-
* @static
|
|
1609
|
-
* @memberOf _
|
|
1610
|
-
* @since 4.0.0
|
|
1611
|
-
* @category Lang
|
|
1612
|
-
* @param {*} value The value to compare.
|
|
1613
|
-
* @param {*} other The other value to compare.
|
|
1614
|
-
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
1615
|
-
* @example
|
|
1616
|
-
*
|
|
1617
|
-
* var object = { 'a': 1 };
|
|
1618
|
-
* var other = { 'a': 1 };
|
|
1619
|
-
*
|
|
1620
|
-
* _.eq(object, object);
|
|
1621
|
-
* // => true
|
|
1622
|
-
*
|
|
1623
|
-
* _.eq(object, other);
|
|
1624
|
-
* // => false
|
|
1625
|
-
*
|
|
1626
|
-
* _.eq('a', 'a');
|
|
1627
|
-
* // => true
|
|
1628
|
-
*
|
|
1629
|
-
* _.eq('a', Object('a'));
|
|
1630
|
-
* // => false
|
|
1631
|
-
*
|
|
1632
|
-
* _.eq(NaN, NaN);
|
|
1633
|
-
* // => true
|
|
1634
|
-
*/
|
|
1635
|
-
function eq(value, other) {
|
|
1636
|
-
return value === other || (value !== value && other !== other);
|
|
1637
|
-
}
|
|
1638
|
-
|
|
1639
|
-
var eq_1 = eq;
|
|
1640
|
-
|
|
1641
|
-
/**
|
|
1642
|
-
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
1643
|
-
*
|
|
1644
|
-
* @private
|
|
1645
|
-
* @param {Array} array The array to inspect.
|
|
1646
|
-
* @param {*} key The key to search for.
|
|
1647
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
1648
|
-
*/
|
|
1649
|
-
function assocIndexOf(array, key) {
|
|
1650
|
-
var length = array.length;
|
|
1651
|
-
while (length--) {
|
|
1652
|
-
if (eq_1(array[length][0], key)) {
|
|
1653
|
-
return length;
|
|
1654
|
-
}
|
|
1655
|
-
}
|
|
1656
|
-
return -1;
|
|
1657
|
-
}
|
|
1658
|
-
|
|
1659
|
-
var _assocIndexOf = assocIndexOf;
|
|
1660
|
-
|
|
1661
|
-
/** Used for built-in method references. */
|
|
1662
|
-
var arrayProto = Array.prototype;
|
|
1663
|
-
|
|
1664
|
-
/** Built-in value references. */
|
|
1665
|
-
var splice = arrayProto.splice;
|
|
1666
|
-
|
|
1667
|
-
/**
|
|
1668
|
-
* Removes `key` and its value from the list cache.
|
|
1669
|
-
*
|
|
1670
|
-
* @private
|
|
1671
|
-
* @name delete
|
|
1672
|
-
* @memberOf ListCache
|
|
1673
|
-
* @param {string} key The key of the value to remove.
|
|
1674
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1675
|
-
*/
|
|
1676
|
-
function listCacheDelete(key) {
|
|
1677
|
-
var data = this.__data__,
|
|
1678
|
-
index = _assocIndexOf(data, key);
|
|
1679
|
-
|
|
1680
|
-
if (index < 0) {
|
|
1681
|
-
return false;
|
|
1682
|
-
}
|
|
1683
|
-
var lastIndex = data.length - 1;
|
|
1684
|
-
if (index == lastIndex) {
|
|
1685
|
-
data.pop();
|
|
1686
|
-
} else {
|
|
1687
|
-
splice.call(data, index, 1);
|
|
1688
|
-
}
|
|
1689
|
-
--this.size;
|
|
1690
|
-
return true;
|
|
1691
|
-
}
|
|
1692
|
-
|
|
1693
|
-
var _listCacheDelete = listCacheDelete;
|
|
1694
|
-
|
|
1695
|
-
/**
|
|
1696
|
-
* Gets the list cache value for `key`.
|
|
1697
|
-
*
|
|
1698
|
-
* @private
|
|
1699
|
-
* @name get
|
|
1700
|
-
* @memberOf ListCache
|
|
1701
|
-
* @param {string} key The key of the value to get.
|
|
1702
|
-
* @returns {*} Returns the entry value.
|
|
1703
|
-
*/
|
|
1704
|
-
function listCacheGet(key) {
|
|
1705
|
-
var data = this.__data__,
|
|
1706
|
-
index = _assocIndexOf(data, key);
|
|
1707
|
-
|
|
1708
|
-
return index < 0 ? undefined : data[index][1];
|
|
1709
|
-
}
|
|
1710
|
-
|
|
1711
|
-
var _listCacheGet = listCacheGet;
|
|
1712
|
-
|
|
1713
|
-
/**
|
|
1714
|
-
* Checks if a list cache value for `key` exists.
|
|
1715
|
-
*
|
|
1716
|
-
* @private
|
|
1717
|
-
* @name has
|
|
1718
|
-
* @memberOf ListCache
|
|
1719
|
-
* @param {string} key The key of the entry to check.
|
|
1720
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1721
|
-
*/
|
|
1722
|
-
function listCacheHas(key) {
|
|
1723
|
-
return _assocIndexOf(this.__data__, key) > -1;
|
|
1724
|
-
}
|
|
1725
|
-
|
|
1726
|
-
var _listCacheHas = listCacheHas;
|
|
1727
|
-
|
|
1728
|
-
/**
|
|
1729
|
-
* Sets the list cache `key` to `value`.
|
|
1730
|
-
*
|
|
1731
|
-
* @private
|
|
1732
|
-
* @name set
|
|
1733
|
-
* @memberOf ListCache
|
|
1734
|
-
* @param {string} key The key of the value to set.
|
|
1735
|
-
* @param {*} value The value to set.
|
|
1736
|
-
* @returns {Object} Returns the list cache instance.
|
|
1737
|
-
*/
|
|
1738
|
-
function listCacheSet(key, value) {
|
|
1739
|
-
var data = this.__data__,
|
|
1740
|
-
index = _assocIndexOf(data, key);
|
|
1741
|
-
|
|
1742
|
-
if (index < 0) {
|
|
1743
|
-
++this.size;
|
|
1744
|
-
data.push([key, value]);
|
|
1745
|
-
} else {
|
|
1746
|
-
data[index][1] = value;
|
|
1747
|
-
}
|
|
1748
|
-
return this;
|
|
1749
|
-
}
|
|
1750
|
-
|
|
1751
|
-
var _listCacheSet = listCacheSet;
|
|
1752
|
-
|
|
1753
|
-
/**
|
|
1754
|
-
* Creates an list cache object.
|
|
1755
|
-
*
|
|
1756
|
-
* @private
|
|
1757
|
-
* @constructor
|
|
1758
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
1759
|
-
*/
|
|
1760
|
-
function ListCache(entries) {
|
|
1761
|
-
var index = -1,
|
|
1762
|
-
length = entries == null ? 0 : entries.length;
|
|
1763
|
-
|
|
1764
|
-
this.clear();
|
|
1765
|
-
while (++index < length) {
|
|
1766
|
-
var entry = entries[index];
|
|
1767
|
-
this.set(entry[0], entry[1]);
|
|
1768
|
-
}
|
|
1769
|
-
}
|
|
1770
|
-
|
|
1771
|
-
// Add methods to `ListCache`.
|
|
1772
|
-
ListCache.prototype.clear = _listCacheClear;
|
|
1773
|
-
ListCache.prototype['delete'] = _listCacheDelete;
|
|
1774
|
-
ListCache.prototype.get = _listCacheGet;
|
|
1775
|
-
ListCache.prototype.has = _listCacheHas;
|
|
1776
|
-
ListCache.prototype.set = _listCacheSet;
|
|
1777
|
-
|
|
1778
|
-
var _ListCache = ListCache;
|
|
1779
|
-
|
|
1780
|
-
/* Built-in method references that are verified to be native. */
|
|
1781
|
-
var Map = _getNative(_root, 'Map');
|
|
1782
|
-
|
|
1783
|
-
var _Map = Map;
|
|
1784
|
-
|
|
1785
|
-
/**
|
|
1786
|
-
* Removes all key-value entries from the map.
|
|
1787
|
-
*
|
|
1788
|
-
* @private
|
|
1789
|
-
* @name clear
|
|
1790
|
-
* @memberOf MapCache
|
|
1791
|
-
*/
|
|
1792
|
-
function mapCacheClear() {
|
|
1793
|
-
this.size = 0;
|
|
1794
|
-
this.__data__ = {
|
|
1795
|
-
'hash': new _Hash,
|
|
1796
|
-
'map': new (_Map || _ListCache),
|
|
1797
|
-
'string': new _Hash
|
|
1798
|
-
};
|
|
1799
|
-
}
|
|
1800
|
-
|
|
1801
|
-
var _mapCacheClear = mapCacheClear;
|
|
1802
|
-
|
|
1803
|
-
/**
|
|
1804
|
-
* Checks if `value` is suitable for use as unique object key.
|
|
1805
|
-
*
|
|
1806
|
-
* @private
|
|
1807
|
-
* @param {*} value The value to check.
|
|
1808
|
-
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|
1809
|
-
*/
|
|
1810
|
-
function isKeyable(value) {
|
|
1811
|
-
var type = typeof value;
|
|
1812
|
-
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
|
1813
|
-
? (value !== '__proto__')
|
|
1814
|
-
: (value === null);
|
|
1815
|
-
}
|
|
1816
|
-
|
|
1817
|
-
var _isKeyable = isKeyable;
|
|
1818
|
-
|
|
1819
|
-
/**
|
|
1820
|
-
* Gets the data for `map`.
|
|
1821
|
-
*
|
|
1822
|
-
* @private
|
|
1823
|
-
* @param {Object} map The map to query.
|
|
1824
|
-
* @param {string} key The reference key.
|
|
1825
|
-
* @returns {*} Returns the map data.
|
|
1826
|
-
*/
|
|
1827
|
-
function getMapData(map, key) {
|
|
1828
|
-
var data = map.__data__;
|
|
1829
|
-
return _isKeyable(key)
|
|
1830
|
-
? data[typeof key == 'string' ? 'string' : 'hash']
|
|
1831
|
-
: data.map;
|
|
1832
|
-
}
|
|
1833
|
-
|
|
1834
|
-
var _getMapData = getMapData;
|
|
1835
|
-
|
|
1836
|
-
/**
|
|
1837
|
-
* Removes `key` and its value from the map.
|
|
1838
|
-
*
|
|
1839
|
-
* @private
|
|
1840
|
-
* @name delete
|
|
1841
|
-
* @memberOf MapCache
|
|
1842
|
-
* @param {string} key The key of the value to remove.
|
|
1843
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1844
|
-
*/
|
|
1845
|
-
function mapCacheDelete(key) {
|
|
1846
|
-
var result = _getMapData(this, key)['delete'](key);
|
|
1847
|
-
this.size -= result ? 1 : 0;
|
|
1848
|
-
return result;
|
|
1849
|
-
}
|
|
1850
|
-
|
|
1851
|
-
var _mapCacheDelete = mapCacheDelete;
|
|
1852
|
-
|
|
1853
|
-
/**
|
|
1854
|
-
* Gets the map value for `key`.
|
|
1855
|
-
*
|
|
1856
|
-
* @private
|
|
1857
|
-
* @name get
|
|
1858
|
-
* @memberOf MapCache
|
|
1859
|
-
* @param {string} key The key of the value to get.
|
|
1860
|
-
* @returns {*} Returns the entry value.
|
|
1861
|
-
*/
|
|
1862
|
-
function mapCacheGet(key) {
|
|
1863
|
-
return _getMapData(this, key).get(key);
|
|
1864
|
-
}
|
|
1865
|
-
|
|
1866
|
-
var _mapCacheGet = mapCacheGet;
|
|
1867
|
-
|
|
1868
|
-
/**
|
|
1869
|
-
* Checks if a map value for `key` exists.
|
|
1870
|
-
*
|
|
1871
|
-
* @private
|
|
1872
|
-
* @name has
|
|
1873
|
-
* @memberOf MapCache
|
|
1874
|
-
* @param {string} key The key of the entry to check.
|
|
1875
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1876
|
-
*/
|
|
1877
|
-
function mapCacheHas(key) {
|
|
1878
|
-
return _getMapData(this, key).has(key);
|
|
1879
|
-
}
|
|
1880
|
-
|
|
1881
|
-
var _mapCacheHas = mapCacheHas;
|
|
1882
|
-
|
|
1883
|
-
/**
|
|
1884
|
-
* Sets the map `key` to `value`.
|
|
1885
|
-
*
|
|
1886
|
-
* @private
|
|
1887
|
-
* @name set
|
|
1888
|
-
* @memberOf MapCache
|
|
1889
|
-
* @param {string} key The key of the value to set.
|
|
1890
|
-
* @param {*} value The value to set.
|
|
1891
|
-
* @returns {Object} Returns the map cache instance.
|
|
1892
|
-
*/
|
|
1893
|
-
function mapCacheSet(key, value) {
|
|
1894
|
-
var data = _getMapData(this, key),
|
|
1895
|
-
size = data.size;
|
|
1896
|
-
|
|
1897
|
-
data.set(key, value);
|
|
1898
|
-
this.size += data.size == size ? 0 : 1;
|
|
1899
|
-
return this;
|
|
1900
|
-
}
|
|
1901
|
-
|
|
1902
|
-
var _mapCacheSet = mapCacheSet;
|
|
1903
|
-
|
|
1904
|
-
/**
|
|
1905
|
-
* Creates a map cache object to store key-value pairs.
|
|
1906
|
-
*
|
|
1907
|
-
* @private
|
|
1908
|
-
* @constructor
|
|
1909
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
1910
|
-
*/
|
|
1911
|
-
function MapCache(entries) {
|
|
1912
|
-
var index = -1,
|
|
1913
|
-
length = entries == null ? 0 : entries.length;
|
|
1914
|
-
|
|
1915
|
-
this.clear();
|
|
1916
|
-
while (++index < length) {
|
|
1917
|
-
var entry = entries[index];
|
|
1918
|
-
this.set(entry[0], entry[1]);
|
|
1919
|
-
}
|
|
1920
|
-
}
|
|
1921
|
-
|
|
1922
|
-
// Add methods to `MapCache`.
|
|
1923
|
-
MapCache.prototype.clear = _mapCacheClear;
|
|
1924
|
-
MapCache.prototype['delete'] = _mapCacheDelete;
|
|
1925
|
-
MapCache.prototype.get = _mapCacheGet;
|
|
1926
|
-
MapCache.prototype.has = _mapCacheHas;
|
|
1927
|
-
MapCache.prototype.set = _mapCacheSet;
|
|
1928
|
-
|
|
1929
|
-
var _MapCache = MapCache;
|
|
1930
|
-
|
|
1931
|
-
/** Error message constants. */
|
|
1932
|
-
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
1933
|
-
|
|
1934
|
-
/**
|
|
1935
|
-
* Creates a function that memoizes the result of `func`. If `resolver` is
|
|
1936
|
-
* provided, it determines the cache key for storing the result based on the
|
|
1937
|
-
* arguments provided to the memoized function. By default, the first argument
|
|
1938
|
-
* provided to the memoized function is used as the map cache key. The `func`
|
|
1939
|
-
* is invoked with the `this` binding of the memoized function.
|
|
1940
|
-
*
|
|
1941
|
-
* **Note:** The cache is exposed as the `cache` property on the memoized
|
|
1942
|
-
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
|
1943
|
-
* constructor with one whose instances implement the
|
|
1944
|
-
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
|
1945
|
-
* method interface of `clear`, `delete`, `get`, `has`, and `set`.
|
|
1946
|
-
*
|
|
1947
|
-
* @static
|
|
1948
|
-
* @memberOf _
|
|
1949
|
-
* @since 0.1.0
|
|
1950
|
-
* @category Function
|
|
1951
|
-
* @param {Function} func The function to have its output memoized.
|
|
1952
|
-
* @param {Function} [resolver] The function to resolve the cache key.
|
|
1953
|
-
* @returns {Function} Returns the new memoized function.
|
|
1954
|
-
* @example
|
|
1955
|
-
*
|
|
1956
|
-
* var object = { 'a': 1, 'b': 2 };
|
|
1957
|
-
* var other = { 'c': 3, 'd': 4 };
|
|
1958
|
-
*
|
|
1959
|
-
* var values = _.memoize(_.values);
|
|
1960
|
-
* values(object);
|
|
1961
|
-
* // => [1, 2]
|
|
1962
|
-
*
|
|
1963
|
-
* values(other);
|
|
1964
|
-
* // => [3, 4]
|
|
1965
|
-
*
|
|
1966
|
-
* object.a = 2;
|
|
1967
|
-
* values(object);
|
|
1968
|
-
* // => [1, 2]
|
|
1969
|
-
*
|
|
1970
|
-
* // Modify the result cache.
|
|
1971
|
-
* values.cache.set(object, ['a', 'b']);
|
|
1972
|
-
* values(object);
|
|
1973
|
-
* // => ['a', 'b']
|
|
1974
|
-
*
|
|
1975
|
-
* // Replace `_.memoize.Cache`.
|
|
1976
|
-
* _.memoize.Cache = WeakMap;
|
|
1977
|
-
*/
|
|
1978
|
-
function memoize(func, resolver) {
|
|
1979
|
-
if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
|
|
1980
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
1981
|
-
}
|
|
1982
|
-
var memoized = function() {
|
|
1983
|
-
var args = arguments,
|
|
1984
|
-
key = resolver ? resolver.apply(this, args) : args[0],
|
|
1985
|
-
cache = memoized.cache;
|
|
1986
|
-
|
|
1987
|
-
if (cache.has(key)) {
|
|
1988
|
-
return cache.get(key);
|
|
1989
|
-
}
|
|
1990
|
-
var result = func.apply(this, args);
|
|
1991
|
-
memoized.cache = cache.set(key, result) || cache;
|
|
1992
|
-
return result;
|
|
1993
|
-
};
|
|
1994
|
-
memoized.cache = new (memoize.Cache || _MapCache);
|
|
1995
|
-
return memoized;
|
|
1996
|
-
}
|
|
1997
|
-
|
|
1998
|
-
// Expose `MapCache`.
|
|
1999
|
-
memoize.Cache = _MapCache;
|
|
2000
|
-
|
|
2001
|
-
var memoize_1 = memoize;
|
|
2002
|
-
|
|
2003
|
-
/** Used as the maximum memoize cache size. */
|
|
2004
|
-
var MAX_MEMOIZE_SIZE = 500;
|
|
2005
|
-
|
|
2006
|
-
/**
|
|
2007
|
-
* A specialized version of `_.memoize` which clears the memoized function's
|
|
2008
|
-
* cache when it exceeds `MAX_MEMOIZE_SIZE`.
|
|
2009
|
-
*
|
|
2010
|
-
* @private
|
|
2011
|
-
* @param {Function} func The function to have its output memoized.
|
|
2012
|
-
* @returns {Function} Returns the new memoized function.
|
|
2013
|
-
*/
|
|
2014
|
-
function memoizeCapped(func) {
|
|
2015
|
-
var result = memoize_1(func, function(key) {
|
|
2016
|
-
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
2017
|
-
cache.clear();
|
|
2018
|
-
}
|
|
2019
|
-
return key;
|
|
2020
|
-
});
|
|
2021
|
-
|
|
2022
|
-
var cache = result.cache;
|
|
2023
|
-
return result;
|
|
2024
|
-
}
|
|
2025
|
-
|
|
2026
|
-
var _memoizeCapped = memoizeCapped;
|
|
2027
|
-
|
|
2028
|
-
/** Used to match property names within property paths. */
|
|
2029
|
-
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
2030
|
-
|
|
2031
|
-
/** Used to match backslashes in property paths. */
|
|
2032
|
-
var reEscapeChar = /\\(\\)?/g;
|
|
2033
|
-
|
|
2034
|
-
/**
|
|
2035
|
-
* Converts `string` to a property path array.
|
|
2036
|
-
*
|
|
2037
|
-
* @private
|
|
2038
|
-
* @param {string} string The string to convert.
|
|
2039
|
-
* @returns {Array} Returns the property path array.
|
|
2040
|
-
*/
|
|
2041
|
-
var stringToPath = _memoizeCapped(function(string) {
|
|
2042
|
-
var result = [];
|
|
2043
|
-
if (string.charCodeAt(0) === 46 /* . */) {
|
|
2044
|
-
result.push('');
|
|
2045
|
-
}
|
|
2046
|
-
string.replace(rePropName, function(match, number, quote, subString) {
|
|
2047
|
-
result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
|
|
2048
|
-
});
|
|
2049
|
-
return result;
|
|
2050
|
-
});
|
|
2051
|
-
|
|
2052
|
-
var _stringToPath = stringToPath;
|
|
2053
|
-
|
|
2054
|
-
/**
|
|
2055
|
-
* A specialized version of `_.map` for arrays without support for iteratee
|
|
2056
|
-
* shorthands.
|
|
2057
|
-
*
|
|
2058
|
-
* @private
|
|
2059
|
-
* @param {Array} [array] The array to iterate over.
|
|
2060
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
2061
|
-
* @returns {Array} Returns the new mapped array.
|
|
2062
|
-
*/
|
|
2063
|
-
function arrayMap(array, iteratee) {
|
|
2064
|
-
var index = -1,
|
|
2065
|
-
length = array == null ? 0 : array.length,
|
|
2066
|
-
result = Array(length);
|
|
2067
|
-
|
|
2068
|
-
while (++index < length) {
|
|
2069
|
-
result[index] = iteratee(array[index], index, array);
|
|
2070
|
-
}
|
|
2071
|
-
return result;
|
|
2072
|
-
}
|
|
2073
|
-
|
|
2074
|
-
var _arrayMap = arrayMap;
|
|
2075
|
-
|
|
2076
|
-
/** Used as references for various `Number` constants. */
|
|
2077
|
-
var INFINITY$1 = 1 / 0;
|
|
2078
|
-
|
|
2079
|
-
/** Used to convert symbols to primitives and strings. */
|
|
2080
|
-
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
|
|
2081
|
-
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
2082
|
-
|
|
2083
|
-
/**
|
|
2084
|
-
* The base implementation of `_.toString` which doesn't convert nullish
|
|
2085
|
-
* values to empty strings.
|
|
2086
|
-
*
|
|
2087
|
-
* @private
|
|
2088
|
-
* @param {*} value The value to process.
|
|
2089
|
-
* @returns {string} Returns the string.
|
|
2090
|
-
*/
|
|
2091
|
-
function baseToString(value) {
|
|
2092
|
-
// Exit early for strings to avoid a performance hit in some environments.
|
|
2093
|
-
if (typeof value == 'string') {
|
|
2094
|
-
return value;
|
|
2095
|
-
}
|
|
2096
|
-
if (isArray_1(value)) {
|
|
2097
|
-
// Recursively convert values (susceptible to call stack limits).
|
|
2098
|
-
return _arrayMap(value, baseToString) + '';
|
|
2099
|
-
}
|
|
2100
|
-
if (isSymbol_1(value)) {
|
|
2101
|
-
return symbolToString ? symbolToString.call(value) : '';
|
|
2102
|
-
}
|
|
2103
|
-
var result = (value + '');
|
|
2104
|
-
return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
|
|
2105
|
-
}
|
|
2106
|
-
|
|
2107
|
-
var _baseToString = baseToString;
|
|
2108
|
-
|
|
2109
|
-
/**
|
|
2110
|
-
* Converts `value` to a string. An empty string is returned for `null`
|
|
2111
|
-
* and `undefined` values. The sign of `-0` is preserved.
|
|
2112
|
-
*
|
|
2113
|
-
* @static
|
|
2114
|
-
* @memberOf _
|
|
2115
|
-
* @since 4.0.0
|
|
2116
|
-
* @category Lang
|
|
2117
|
-
* @param {*} value The value to convert.
|
|
2118
|
-
* @returns {string} Returns the converted string.
|
|
2119
|
-
* @example
|
|
2120
|
-
*
|
|
2121
|
-
* _.toString(null);
|
|
2122
|
-
* // => ''
|
|
2123
|
-
*
|
|
2124
|
-
* _.toString(-0);
|
|
2125
|
-
* // => '-0'
|
|
2126
|
-
*
|
|
2127
|
-
* _.toString([1, 2, 3]);
|
|
2128
|
-
* // => '1,2,3'
|
|
2129
|
-
*/
|
|
2130
|
-
function toString(value) {
|
|
2131
|
-
return value == null ? '' : _baseToString(value);
|
|
2132
|
-
}
|
|
2133
|
-
|
|
2134
|
-
var toString_1 = toString;
|
|
2135
|
-
|
|
2136
|
-
/**
|
|
2137
|
-
* Casts `value` to a path array if it's not one.
|
|
2138
|
-
*
|
|
2139
|
-
* @private
|
|
2140
|
-
* @param {*} value The value to inspect.
|
|
2141
|
-
* @param {Object} [object] The object to query keys on.
|
|
2142
|
-
* @returns {Array} Returns the cast property path array.
|
|
2143
|
-
*/
|
|
2144
|
-
function castPath(value, object) {
|
|
2145
|
-
if (isArray_1(value)) {
|
|
2146
|
-
return value;
|
|
2147
|
-
}
|
|
2148
|
-
return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
|
|
2149
|
-
}
|
|
2150
|
-
|
|
2151
|
-
var _castPath = castPath;
|
|
2152
|
-
|
|
2153
|
-
/** Used as references for various `Number` constants. */
|
|
2154
|
-
var INFINITY = 1 / 0;
|
|
2155
|
-
|
|
2156
|
-
/**
|
|
2157
|
-
* Converts `value` to a string key if it's not a string or symbol.
|
|
2158
|
-
*
|
|
2159
|
-
* @private
|
|
2160
|
-
* @param {*} value The value to inspect.
|
|
2161
|
-
* @returns {string|symbol} Returns the key.
|
|
2162
|
-
*/
|
|
2163
|
-
function toKey(value) {
|
|
2164
|
-
if (typeof value == 'string' || isSymbol_1(value)) {
|
|
2165
|
-
return value;
|
|
2166
|
-
}
|
|
2167
|
-
var result = (value + '');
|
|
2168
|
-
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
|
2169
|
-
}
|
|
2170
|
-
|
|
2171
|
-
var _toKey = toKey;
|
|
2172
|
-
|
|
2173
|
-
/**
|
|
2174
|
-
* The base implementation of `_.get` without support for default values.
|
|
2175
|
-
*
|
|
2176
|
-
* @private
|
|
2177
|
-
* @param {Object} object The object to query.
|
|
2178
|
-
* @param {Array|string} path The path of the property to get.
|
|
2179
|
-
* @returns {*} Returns the resolved value.
|
|
2180
|
-
*/
|
|
2181
|
-
function baseGet(object, path) {
|
|
2182
|
-
path = _castPath(path, object);
|
|
2183
|
-
|
|
2184
|
-
var index = 0,
|
|
2185
|
-
length = path.length;
|
|
2186
|
-
|
|
2187
|
-
while (object != null && index < length) {
|
|
2188
|
-
object = object[_toKey(path[index++])];
|
|
2189
|
-
}
|
|
2190
|
-
return (index && index == length) ? object : undefined;
|
|
2191
|
-
}
|
|
2192
|
-
|
|
2193
|
-
var _baseGet = baseGet;
|
|
2194
|
-
|
|
2195
|
-
/**
|
|
2196
|
-
* Gets the value at `path` of `object`. If the resolved value is
|
|
2197
|
-
* `undefined`, the `defaultValue` is returned in its place.
|
|
2198
|
-
*
|
|
2199
|
-
* @static
|
|
2200
|
-
* @memberOf _
|
|
2201
|
-
* @since 3.7.0
|
|
2202
|
-
* @category Object
|
|
2203
|
-
* @param {Object} object The object to query.
|
|
2204
|
-
* @param {Array|string} path The path of the property to get.
|
|
2205
|
-
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
|
|
2206
|
-
* @returns {*} Returns the resolved value.
|
|
2207
|
-
* @example
|
|
2208
|
-
*
|
|
2209
|
-
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
|
|
2210
|
-
*
|
|
2211
|
-
* _.get(object, 'a[0].b.c');
|
|
2212
|
-
* // => 3
|
|
2213
|
-
*
|
|
2214
|
-
* _.get(object, ['a', '0', 'b', 'c']);
|
|
2215
|
-
* // => 3
|
|
2216
|
-
*
|
|
2217
|
-
* _.get(object, 'a.b.c', 'default');
|
|
2218
|
-
* // => 'default'
|
|
2219
|
-
*/
|
|
2220
|
-
function get(object, path, defaultValue) {
|
|
2221
|
-
var result = object == null ? undefined : _baseGet(object, path);
|
|
2222
|
-
return result === undefined ? defaultValue : result;
|
|
2223
|
-
}
|
|
2224
|
-
|
|
2225
|
-
var get_1 = get;
|
|
2226
|
-
|
|
2227
|
-
function _typeof(obj) {
|
|
2228
|
-
"@babel/helpers - typeof";
|
|
2229
|
-
|
|
2230
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
2231
|
-
return typeof obj;
|
|
2232
|
-
} : function (obj) {
|
|
2233
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
2234
|
-
}, _typeof(obj);
|
|
2235
|
-
}
|
|
2236
|
-
|
|
2237
|
-
/**
|
|
2238
|
-
* A specialized version of `_.reduce` for arrays without support for
|
|
2239
|
-
* iteratee shorthands.
|
|
2240
|
-
*
|
|
2241
|
-
* @private
|
|
2242
|
-
* @param {Array} [array] The array to iterate over.
|
|
2243
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
2244
|
-
* @param {*} [accumulator] The initial value.
|
|
2245
|
-
* @param {boolean} [initAccum] Specify using the first element of `array` as
|
|
2246
|
-
* the initial value.
|
|
2247
|
-
* @returns {*} Returns the accumulated value.
|
|
2248
|
-
*/
|
|
2249
|
-
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
|
2250
|
-
var index = -1,
|
|
2251
|
-
length = array == null ? 0 : array.length;
|
|
2252
|
-
|
|
2253
|
-
if (initAccum && length) {
|
|
2254
|
-
accumulator = array[++index];
|
|
2255
|
-
}
|
|
2256
|
-
while (++index < length) {
|
|
2257
|
-
accumulator = iteratee(accumulator, array[index], index, array);
|
|
2258
|
-
}
|
|
2259
|
-
return accumulator;
|
|
2260
|
-
}
|
|
2261
|
-
|
|
2262
|
-
var _arrayReduce = arrayReduce;
|
|
2263
|
-
|
|
2264
|
-
/**
|
|
2265
|
-
* The base implementation of `_.propertyOf` without support for deep paths.
|
|
2266
|
-
*
|
|
2267
|
-
* @private
|
|
2268
|
-
* @param {Object} object The object to query.
|
|
2269
|
-
* @returns {Function} Returns the new accessor function.
|
|
2270
|
-
*/
|
|
2271
|
-
function basePropertyOf(object) {
|
|
2272
|
-
return function(key) {
|
|
2273
|
-
return object == null ? undefined : object[key];
|
|
2274
|
-
};
|
|
2275
|
-
}
|
|
2276
|
-
|
|
2277
|
-
var _basePropertyOf = basePropertyOf;
|
|
2278
|
-
|
|
2279
|
-
/** Used to map Latin Unicode letters to basic Latin letters. */
|
|
2280
|
-
var deburredLetters = {
|
|
2281
|
-
// Latin-1 Supplement block.
|
|
2282
|
-
'\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
|
|
2283
|
-
'\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
|
|
2284
|
-
'\xc7': 'C', '\xe7': 'c',
|
|
2285
|
-
'\xd0': 'D', '\xf0': 'd',
|
|
2286
|
-
'\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
|
|
2287
|
-
'\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
|
|
2288
|
-
'\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
|
|
2289
|
-
'\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
|
|
2290
|
-
'\xd1': 'N', '\xf1': 'n',
|
|
2291
|
-
'\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
|
|
2292
|
-
'\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
|
|
2293
|
-
'\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
|
|
2294
|
-
'\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
|
|
2295
|
-
'\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
|
|
2296
|
-
'\xc6': 'Ae', '\xe6': 'ae',
|
|
2297
|
-
'\xde': 'Th', '\xfe': 'th',
|
|
2298
|
-
'\xdf': 'ss',
|
|
2299
|
-
// Latin Extended-A block.
|
|
2300
|
-
'\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
|
|
2301
|
-
'\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
|
|
2302
|
-
'\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
|
|
2303
|
-
'\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
|
|
2304
|
-
'\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
|
|
2305
|
-
'\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
|
|
2306
|
-
'\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
|
|
2307
|
-
'\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
|
|
2308
|
-
'\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
|
|
2309
|
-
'\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
|
|
2310
|
-
'\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
|
|
2311
|
-
'\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
|
|
2312
|
-
'\u0134': 'J', '\u0135': 'j',
|
|
2313
|
-
'\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
|
|
2314
|
-
'\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
|
|
2315
|
-
'\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
|
|
2316
|
-
'\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
|
|
2317
|
-
'\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
|
|
2318
|
-
'\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
|
|
2319
|
-
'\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
|
|
2320
|
-
'\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
|
|
2321
|
-
'\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
|
|
2322
|
-
'\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
|
|
2323
|
-
'\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
|
|
2324
|
-
'\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
|
|
2325
|
-
'\u0163': 't', '\u0165': 't', '\u0167': 't',
|
|
2326
|
-
'\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
|
|
2327
|
-
'\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
|
|
2328
|
-
'\u0174': 'W', '\u0175': 'w',
|
|
2329
|
-
'\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
|
|
2330
|
-
'\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
|
|
2331
|
-
'\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
|
|
2332
|
-
'\u0132': 'IJ', '\u0133': 'ij',
|
|
2333
|
-
'\u0152': 'Oe', '\u0153': 'oe',
|
|
2334
|
-
'\u0149': "'n", '\u017f': 's'
|
|
2335
|
-
};
|
|
2336
|
-
|
|
2337
|
-
/**
|
|
2338
|
-
* Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
|
|
2339
|
-
* letters to basic Latin letters.
|
|
2340
|
-
*
|
|
2341
|
-
* @private
|
|
2342
|
-
* @param {string} letter The matched letter to deburr.
|
|
2343
|
-
* @returns {string} Returns the deburred letter.
|
|
2344
|
-
*/
|
|
2345
|
-
var deburrLetter = _basePropertyOf(deburredLetters);
|
|
2346
|
-
|
|
2347
|
-
var _deburrLetter = deburrLetter;
|
|
2348
|
-
|
|
2349
|
-
/** Used to match Latin Unicode letters (excluding mathematical operators). */
|
|
2350
|
-
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
|
|
2351
|
-
|
|
2352
|
-
/** Used to compose unicode character classes. */
|
|
2353
|
-
var rsComboMarksRange$1 = '\\u0300-\\u036f',
|
|
2354
|
-
reComboHalfMarksRange$1 = '\\ufe20-\\ufe2f',
|
|
2355
|
-
rsComboSymbolsRange$1 = '\\u20d0-\\u20ff',
|
|
2356
|
-
rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1;
|
|
2357
|
-
|
|
2358
|
-
/** Used to compose unicode capture groups. */
|
|
2359
|
-
var rsCombo$1 = '[' + rsComboRange$1 + ']';
|
|
2360
|
-
|
|
2361
|
-
/**
|
|
2362
|
-
* Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
|
|
2363
|
-
* [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
|
|
2364
|
-
*/
|
|
2365
|
-
var reComboMark = RegExp(rsCombo$1, 'g');
|
|
2366
|
-
|
|
2367
|
-
/**
|
|
2368
|
-
* Deburrs `string` by converting
|
|
2369
|
-
* [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
|
|
2370
|
-
* and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
|
|
2371
|
-
* letters to basic Latin letters and removing
|
|
2372
|
-
* [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
|
|
2373
|
-
*
|
|
2374
|
-
* @static
|
|
2375
|
-
* @memberOf _
|
|
2376
|
-
* @since 3.0.0
|
|
2377
|
-
* @category String
|
|
2378
|
-
* @param {string} [string=''] The string to deburr.
|
|
2379
|
-
* @returns {string} Returns the deburred string.
|
|
2380
|
-
* @example
|
|
2381
|
-
*
|
|
2382
|
-
* _.deburr('déjà vu');
|
|
2383
|
-
* // => 'deja vu'
|
|
2384
|
-
*/
|
|
2385
|
-
function deburr(string) {
|
|
2386
|
-
string = toString_1(string);
|
|
2387
|
-
return string && string.replace(reLatin, _deburrLetter).replace(reComboMark, '');
|
|
2388
|
-
}
|
|
2389
|
-
|
|
2390
|
-
var deburr_1 = deburr;
|
|
2391
|
-
|
|
2392
|
-
/** Used to match words composed of alphanumeric characters. */
|
|
2393
|
-
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
|
2394
|
-
|
|
2395
|
-
/**
|
|
2396
|
-
* Splits an ASCII `string` into an array of its words.
|
|
2397
|
-
*
|
|
2398
|
-
* @private
|
|
2399
|
-
* @param {string} The string to inspect.
|
|
2400
|
-
* @returns {Array} Returns the words of `string`.
|
|
2401
|
-
*/
|
|
2402
|
-
function asciiWords(string) {
|
|
2403
|
-
return string.match(reAsciiWord) || [];
|
|
2404
|
-
}
|
|
2405
|
-
|
|
2406
|
-
var _asciiWords = asciiWords;
|
|
2407
|
-
|
|
2408
|
-
/** Used to detect strings that need a more robust regexp to match words. */
|
|
2409
|
-
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 ]/;
|
|
2410
|
-
|
|
2411
|
-
/**
|
|
2412
|
-
* Checks if `string` contains a word composed of Unicode symbols.
|
|
2413
|
-
*
|
|
2414
|
-
* @private
|
|
2415
|
-
* @param {string} string The string to inspect.
|
|
2416
|
-
* @returns {boolean} Returns `true` if a word is found, else `false`.
|
|
2417
|
-
*/
|
|
2418
|
-
function hasUnicodeWord(string) {
|
|
2419
|
-
return reHasUnicodeWord.test(string);
|
|
2420
|
-
}
|
|
2421
|
-
|
|
2422
|
-
var _hasUnicodeWord = hasUnicodeWord;
|
|
2423
|
-
|
|
2424
|
-
/** Used to compose unicode character classes. */
|
|
2425
|
-
var rsAstralRange = '\\ud800-\\udfff',
|
|
2426
|
-
rsComboMarksRange = '\\u0300-\\u036f',
|
|
2427
|
-
reComboHalfMarksRange = '\\ufe20-\\ufe2f',
|
|
2428
|
-
rsComboSymbolsRange = '\\u20d0-\\u20ff',
|
|
2429
|
-
rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
|
|
2430
|
-
rsDingbatRange = '\\u2700-\\u27bf',
|
|
2431
|
-
rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
|
|
2432
|
-
rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
|
|
2433
|
-
rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
|
|
2434
|
-
rsPunctuationRange = '\\u2000-\\u206f',
|
|
2435
|
-
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',
|
|
2436
|
-
rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
|
|
2437
|
-
rsVarRange = '\\ufe0e\\ufe0f',
|
|
2438
|
-
rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
|
|
2439
|
-
|
|
2440
|
-
/** Used to compose unicode capture groups. */
|
|
2441
|
-
var rsApos$1 = "['\u2019]",
|
|
2442
|
-
rsBreak = '[' + rsBreakRange + ']',
|
|
2443
|
-
rsCombo = '[' + rsComboRange + ']',
|
|
2444
|
-
rsDigits = '\\d+',
|
|
2445
|
-
rsDingbat = '[' + rsDingbatRange + ']',
|
|
2446
|
-
rsLower = '[' + rsLowerRange + ']',
|
|
2447
|
-
rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
|
|
2448
|
-
rsFitz = '\\ud83c[\\udffb-\\udfff]',
|
|
2449
|
-
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
|
|
2450
|
-
rsNonAstral = '[^' + rsAstralRange + ']',
|
|
2451
|
-
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
|
|
2452
|
-
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
|
|
2453
|
-
rsUpper = '[' + rsUpperRange + ']',
|
|
2454
|
-
rsZWJ = '\\u200d';
|
|
2455
|
-
|
|
2456
|
-
/** Used to compose unicode regexes. */
|
|
2457
|
-
var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
|
|
2458
|
-
rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
|
|
2459
|
-
rsOptContrLower = '(?:' + rsApos$1 + '(?:d|ll|m|re|s|t|ve))?',
|
|
2460
|
-
rsOptContrUpper = '(?:' + rsApos$1 + '(?:D|LL|M|RE|S|T|VE))?',
|
|
2461
|
-
reOptMod = rsModifier + '?',
|
|
2462
|
-
rsOptVar = '[' + rsVarRange + ']?',
|
|
2463
|
-
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
|
2464
|
-
rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
|
|
2465
|
-
rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
|
|
2466
|
-
rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
|
2467
|
-
rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;
|
|
2468
|
-
|
|
2469
|
-
/** Used to match complex or compound words. */
|
|
2470
|
-
var reUnicodeWord = RegExp([
|
|
2471
|
-
rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
|
|
2472
|
-
rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
|
|
2473
|
-
rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
|
|
2474
|
-
rsUpper + '+' + rsOptContrUpper,
|
|
2475
|
-
rsOrdUpper,
|
|
2476
|
-
rsOrdLower,
|
|
2477
|
-
rsDigits,
|
|
2478
|
-
rsEmoji
|
|
2479
|
-
].join('|'), 'g');
|
|
2480
|
-
|
|
2481
|
-
/**
|
|
2482
|
-
* Splits a Unicode `string` into an array of its words.
|
|
2483
|
-
*
|
|
2484
|
-
* @private
|
|
2485
|
-
* @param {string} The string to inspect.
|
|
2486
|
-
* @returns {Array} Returns the words of `string`.
|
|
2487
|
-
*/
|
|
2488
|
-
function unicodeWords(string) {
|
|
2489
|
-
return string.match(reUnicodeWord) || [];
|
|
2490
|
-
}
|
|
2491
|
-
|
|
2492
|
-
var _unicodeWords = unicodeWords;
|
|
2493
|
-
|
|
2494
|
-
/**
|
|
2495
|
-
* Splits `string` into an array of its words.
|
|
2496
|
-
*
|
|
2497
|
-
* @static
|
|
2498
|
-
* @memberOf _
|
|
2499
|
-
* @since 3.0.0
|
|
2500
|
-
* @category String
|
|
2501
|
-
* @param {string} [string=''] The string to inspect.
|
|
2502
|
-
* @param {RegExp|string} [pattern] The pattern to match words.
|
|
2503
|
-
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
2504
|
-
* @returns {Array} Returns the words of `string`.
|
|
2505
|
-
* @example
|
|
2506
|
-
*
|
|
2507
|
-
* _.words('fred, barney, & pebbles');
|
|
2508
|
-
* // => ['fred', 'barney', 'pebbles']
|
|
2509
|
-
*
|
|
2510
|
-
* _.words('fred, barney, & pebbles', /[^, ]+/g);
|
|
2511
|
-
* // => ['fred', 'barney', '&', 'pebbles']
|
|
2512
|
-
*/
|
|
2513
|
-
function words(string, pattern, guard) {
|
|
2514
|
-
string = toString_1(string);
|
|
2515
|
-
pattern = guard ? undefined : pattern;
|
|
2516
|
-
|
|
2517
|
-
if (pattern === undefined) {
|
|
2518
|
-
return _hasUnicodeWord(string) ? _unicodeWords(string) : _asciiWords(string);
|
|
2519
|
-
}
|
|
2520
|
-
return string.match(pattern) || [];
|
|
2521
|
-
}
|
|
2522
|
-
|
|
2523
|
-
var words_1 = words;
|
|
2524
|
-
|
|
2525
|
-
/** Used to compose unicode capture groups. */
|
|
2526
|
-
var rsApos = "['\u2019]";
|
|
2527
|
-
|
|
2528
|
-
/** Used to match apostrophes. */
|
|
2529
|
-
var reApos = RegExp(rsApos, 'g');
|
|
2530
|
-
|
|
2531
|
-
/**
|
|
2532
|
-
* Creates a function like `_.camelCase`.
|
|
2533
|
-
*
|
|
2534
|
-
* @private
|
|
2535
|
-
* @param {Function} callback The function to combine each word.
|
|
2536
|
-
* @returns {Function} Returns the new compounder function.
|
|
2537
|
-
*/
|
|
2538
|
-
function createCompounder(callback) {
|
|
2539
|
-
return function(string) {
|
|
2540
|
-
return _arrayReduce(words_1(deburr_1(string).replace(reApos, '')), callback, '');
|
|
2541
|
-
};
|
|
2542
|
-
}
|
|
2543
|
-
|
|
2544
|
-
var _createCompounder = createCompounder;
|
|
2545
|
-
|
|
2546
|
-
/**
|
|
2547
|
-
* Converts `string`, as space separated words, to upper case.
|
|
2548
|
-
*
|
|
2549
|
-
* @static
|
|
2550
|
-
* @memberOf _
|
|
2551
|
-
* @since 4.0.0
|
|
2552
|
-
* @category String
|
|
2553
|
-
* @param {string} [string=''] The string to convert.
|
|
2554
|
-
* @returns {string} Returns the upper cased string.
|
|
2555
|
-
* @example
|
|
2556
|
-
*
|
|
2557
|
-
* _.upperCase('--foo-bar');
|
|
2558
|
-
* // => 'FOO BAR'
|
|
2559
|
-
*
|
|
2560
|
-
* _.upperCase('fooBar');
|
|
2561
|
-
* // => 'FOO BAR'
|
|
2562
|
-
*
|
|
2563
|
-
* _.upperCase('__foo_bar__');
|
|
2564
|
-
* // => 'FOO BAR'
|
|
2565
|
-
*/
|
|
2566
|
-
var upperCase = _createCompounder(function(result, word, index) {
|
|
2567
|
-
return result + (index ? ' ' : '') + word.toUpperCase();
|
|
2568
|
-
});
|
|
2569
|
-
|
|
2570
|
-
var upperCase_1 = upperCase;
|
|
2571
|
-
|
|
2572
|
-
/**
|
|
2573
|
-
* Converts `string`, as space separated words, to lower case.
|
|
2574
|
-
*
|
|
2575
|
-
* @static
|
|
2576
|
-
* @memberOf _
|
|
2577
|
-
* @since 4.0.0
|
|
2578
|
-
* @category String
|
|
2579
|
-
* @param {string} [string=''] The string to convert.
|
|
2580
|
-
* @returns {string} Returns the lower cased string.
|
|
2581
|
-
* @example
|
|
2582
|
-
*
|
|
2583
|
-
* _.lowerCase('--Foo-Bar--');
|
|
2584
|
-
* // => 'foo bar'
|
|
2585
|
-
*
|
|
2586
|
-
* _.lowerCase('fooBar');
|
|
2587
|
-
* // => 'foo bar'
|
|
2588
|
-
*
|
|
2589
|
-
* _.lowerCase('__FOO_BAR__');
|
|
2590
|
-
* // => 'foo bar'
|
|
2591
|
-
*/
|
|
2592
|
-
var lowerCase = _createCompounder(function(result, word, index) {
|
|
2593
|
-
return result + (index ? ' ' : '') + word.toLowerCase();
|
|
2594
|
-
});
|
|
2595
|
-
|
|
2596
|
-
var lowerCase_1 = lowerCase;
|
|
2597
|
-
|
|
2598
31
|
function truncate() {
|
|
2599
32
|
var string = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
|
2600
33
|
var limit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 60;
|
|
@@ -2621,7 +54,7 @@ var timestampToFormat = function timestampToFormat(value, unit, suffix, timestam
|
|
|
2621
54
|
var localizedMonth = month;
|
|
2622
55
|
|
|
2623
56
|
if (isUpperCase) {
|
|
2624
|
-
localizedMonth =
|
|
57
|
+
localizedMonth = lodash.upperCase(month);
|
|
2625
58
|
}
|
|
2626
59
|
|
|
2627
60
|
var year = dateTime.getFullYear();
|
|
@@ -2634,7 +67,7 @@ var timestampToFormat = function timestampToFormat(value, unit, suffix, timestam
|
|
|
2634
67
|
var timetoShow;
|
|
2635
68
|
|
|
2636
69
|
if (localizedMonths) {
|
|
2637
|
-
localizedMonth =
|
|
70
|
+
localizedMonth = lodash.get(localizedMonths, [lodash.lowerCase(month)]) || month;
|
|
2638
71
|
}
|
|
2639
72
|
|
|
2640
73
|
if (localizedMeridiem) {
|
|
@@ -2664,17 +97,17 @@ function formatter(value, unit, suffix, date, config) {
|
|
|
2664
97
|
var showDateForUnits = ["day", "week", "month", "year"]; // suffix here refers to ago
|
|
2665
98
|
// unit here refers to seconds, minute, minutes,...
|
|
2666
99
|
|
|
2667
|
-
var localizedSuffix =
|
|
100
|
+
var localizedSuffix = lodash.get(config, ["localizedPublishTime", suffix]) || suffix;
|
|
2668
101
|
var localizedUnitOfTime;
|
|
2669
102
|
|
|
2670
103
|
if (unit === "hour" && value > 23 || showDateForUnits.indexOf(unit) !== -1) {
|
|
2671
104
|
return timestampToFormat(value, unit, suffix, date, config);
|
|
2672
105
|
} else if (value > 1) {
|
|
2673
|
-
localizedUnitOfTime =
|
|
106
|
+
localizedUnitOfTime = lodash.get(config, ["localizedPublishTime", "".concat(unit, "s")]) || "".concat(unit, "s");
|
|
2674
107
|
return "".concat(value, " ").concat(localizedUnitOfTime, " ").concat(localizedSuffix);
|
|
2675
108
|
}
|
|
2676
109
|
|
|
2677
|
-
localizedUnitOfTime =
|
|
110
|
+
localizedUnitOfTime = lodash.get(config, ["localizedPublishTime", unit]) || unit;
|
|
2678
111
|
return "".concat(value, " ").concat(localizedUnitOfTime, " ").concat(localizedSuffix, " ");
|
|
2679
112
|
}
|
|
2680
113
|
|
|
@@ -2727,10 +160,10 @@ var clientWidths = {
|
|
|
2727
160
|
tablet: 1024
|
|
2728
161
|
};
|
|
2729
162
|
var clientWidth = function clientWidth(device) {
|
|
2730
|
-
var foundDeviceWidth =
|
|
163
|
+
var foundDeviceWidth = lodash.get(clientWidths, device);
|
|
2731
164
|
|
|
2732
165
|
if (foundDeviceWidth) {
|
|
2733
|
-
return
|
|
166
|
+
return lodash.get(global, "document.documentElement.clientWidth") <= foundDeviceWidth;
|
|
2734
167
|
}
|
|
2735
168
|
|
|
2736
169
|
return false;
|
|
@@ -2760,7 +193,7 @@ var getSlug = function getSlug(collection) {
|
|
|
2760
193
|
var isSection = collection.template === "section";
|
|
2761
194
|
|
|
2762
195
|
if (isSection) {
|
|
2763
|
-
var sectionId =
|
|
196
|
+
var sectionId = lodash.get(collection, ["metadata", "section", "0", "id"], "");
|
|
2764
197
|
var sections = config.sections;
|
|
2765
198
|
var section = sections && sections.find(function (section) {
|
|
2766
199
|
return section.id === sectionId;
|
|
@@ -2776,11 +209,11 @@ function isExternalStory() {
|
|
|
2776
209
|
storyTemplate = _story$storyTemplate === void 0 ? "" : _story$storyTemplate,
|
|
2777
210
|
_story$metadata = story.metadata,
|
|
2778
211
|
metadata = _story$metadata === void 0 ? {} : _story$metadata;
|
|
2779
|
-
return storyTemplate === "news-elsewhere" ?
|
|
212
|
+
return storyTemplate === "news-elsewhere" ? lodash.get(metadata, ["reference-url"], "") : "";
|
|
2780
213
|
} // Adds target='_blank' attribute to anchor tags if not present
|
|
2781
214
|
var isEmpty = function isEmpty(value) {
|
|
2782
215
|
return value == null || // From standard.js: Always use === - but value == null is allowed to check null || undefined
|
|
2783
|
-
|
|
216
|
+
_typeof__default["default"](value) === "object" && Object.entries(value).length === 0 && value.constructor === Object || typeof value === "string" && value.trim().length === 0;
|
|
2784
217
|
};
|
|
2785
218
|
PropTypes__default["default"].shape({
|
|
2786
219
|
"sketches-host": PropTypes__default["default"].string,
|
|
@@ -2794,7 +227,7 @@ PropTypes__default["default"].shape({
|
|
|
2794
227
|
});
|
|
2795
228
|
var getStoryUrl = function getStoryUrl(story) {
|
|
2796
229
|
var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
2797
|
-
return
|
|
230
|
+
return lodash.get(story, ["story-template"]) === "news-elsewhere" ? lodash.get(story, ["metadata", "reference-url"], "") : story.url || defaultValue;
|
|
2798
231
|
};
|
|
2799
232
|
var generateNavigateSlug = function generateNavigateSlug() {
|
|
2800
233
|
var collection = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -2825,11 +258,11 @@ var generateNavigateSlug = function generateNavigateSlug() {
|
|
|
2825
258
|
return "/";
|
|
2826
259
|
};
|
|
2827
260
|
var getCollectionData = /*#__PURE__*/function () {
|
|
2828
|
-
var _ref =
|
|
261
|
+
var _ref = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(collectionSlug) {
|
|
2829
262
|
var mountAtPrefix,
|
|
2830
263
|
result,
|
|
2831
264
|
_args = arguments;
|
|
2832
|
-
return
|
|
265
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
|
|
2833
266
|
while (1) {
|
|
2834
267
|
switch (_context.prev = _context.next) {
|
|
2835
268
|
case 0:
|
|
@@ -2919,13 +352,13 @@ var TimeStamp = function TimeStamp(_ref) {
|
|
|
2919
352
|
_ref$config = _ref.config,
|
|
2920
353
|
config = _ref$config === void 0 ? {} : _ref$config;
|
|
2921
354
|
var configState = useStateValue() || {};
|
|
2922
|
-
var isTime =
|
|
355
|
+
var isTime = lodash.get(config, ["showTime"], lodash.get(configState, ["showTime"], true));
|
|
2923
356
|
var time = story["last-published-at"] || story["first-published-at"];
|
|
2924
357
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
2925
358
|
var textColor = getTextColor(configState.theme);
|
|
2926
359
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isTime && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2927
360
|
"data-test-id": "publish-time",
|
|
2928
|
-
className: "time arr--publish-time " +
|
|
361
|
+
className: "time arr--publish-time " + _getClassName__default["default"]("time ".concat(textColor, " ").concat(isBottomClasses), _styleModuleImportMap$e)
|
|
2929
362
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2930
363
|
className: "timestamp-m_time-wrapper__3O2lM"
|
|
2931
364
|
}, getTimeStamp(time, formatter, config))));
|
|
@@ -2960,9 +393,9 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
2960
393
|
_ref$config = _ref.config,
|
|
2961
394
|
config = _ref$config === void 0 ? {} : _ref$config;
|
|
2962
395
|
var configData = useStateValue() || {};
|
|
2963
|
-
var isAuthor =
|
|
396
|
+
var isAuthor = lodash.get(configData, ["showAuthor"], true);
|
|
2964
397
|
|
|
2965
|
-
var _get =
|
|
398
|
+
var _get = lodash.get(story, ["authors", "0"], ""),
|
|
2966
399
|
avatarUrl = _get["avatar-url"],
|
|
2967
400
|
avatarS3Key = _get["avatar-s3-key"],
|
|
2968
401
|
authorName = _get.name,
|
|
@@ -2970,7 +403,7 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
2970
403
|
|
|
2971
404
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
2972
405
|
var textColor = getTextColor(configData.theme);
|
|
2973
|
-
var mountAt =
|
|
406
|
+
var mountAt = lodash.get(config, ["mountAt"], "");
|
|
2974
407
|
|
|
2975
408
|
var authorImage = function authorImage(dir) {
|
|
2976
409
|
if (!avatarUrl && !avatarS3Key) {
|
|
@@ -2979,7 +412,7 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
2979
412
|
|
|
2980
413
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2981
414
|
"data-test-id": "author-image",
|
|
2982
|
-
className:
|
|
415
|
+
className: _getClassName__default["default"]("author-image ".concat(dir, "-image"), _styleModuleImportMap$d)
|
|
2983
416
|
}, /*#__PURE__*/React__default["default"].createElement("figure", null, avatarS3Key ? /*#__PURE__*/React__default["default"].createElement(components.ResponsiveImage, {
|
|
2984
417
|
slug: avatarS3Key,
|
|
2985
418
|
"aspect-ratio": [1, 1],
|
|
@@ -2996,7 +429,7 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
2996
429
|
var isPrefix = function isPrefix(dir) {
|
|
2997
430
|
if (prefix) {
|
|
2998
431
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2999
|
-
className: "arr-author-prefix " +
|
|
432
|
+
className: "arr-author-prefix " + _getClassName__default["default"]("prefix ".concat(textColor), _styleModuleImportMap$d)
|
|
3000
433
|
}, prefix);
|
|
3001
434
|
}
|
|
3002
435
|
|
|
@@ -3006,16 +439,16 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3006
439
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3007
440
|
href: "".concat(mountAt, "/author/") + slug,
|
|
3008
441
|
"aria-label": "author-name",
|
|
3009
|
-
className: "author-name arr-author-name arrow-component " +
|
|
442
|
+
className: "author-name arr-author-name arrow-component " + _getClassName__default["default"]("author ".concat(isBottomClasses), _styleModuleImportMap$d)
|
|
3010
443
|
}, isPrefix("ltr"), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3011
444
|
"data-test-id": "author-name",
|
|
3012
|
-
className: "author-name " +
|
|
445
|
+
className: "author-name " + _getClassName__default["default"]("author-name ".concat(textColor), _styleModuleImportMap$d)
|
|
3013
446
|
}, authorName || story["author-name"]), !prefix && isPrefix("rtl")));
|
|
3014
447
|
};
|
|
3015
448
|
|
|
3016
449
|
function mapStateToProps$1(state) {
|
|
3017
450
|
return {
|
|
3018
|
-
config:
|
|
451
|
+
config: lodash.get(state, ["qt", "config"], {})
|
|
3019
452
|
};
|
|
3020
453
|
}
|
|
3021
454
|
|
|
@@ -3052,7 +485,7 @@ var Dot = function Dot(_ref) {
|
|
|
3052
485
|
_ref$color = _ref.color,
|
|
3053
486
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3054
487
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3055
|
-
className:
|
|
488
|
+
className: _getClassName__default["default"](color, _styleModuleImportMap$c)
|
|
3056
489
|
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3057
490
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3058
491
|
width: width,
|
|
@@ -3088,7 +521,7 @@ var Divider = function Divider(_ref) {
|
|
|
3088
521
|
_ref$color = _ref.color,
|
|
3089
522
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3090
523
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3091
|
-
className:
|
|
524
|
+
className: _getClassName__default["default"](color, _styleModuleImportMap$b)
|
|
3092
525
|
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3093
526
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3094
527
|
width: width,
|
|
@@ -3120,14 +553,14 @@ var ReadTime = function ReadTime(_ref) {
|
|
|
3120
553
|
_ref$isLightTheme = _ref.isLightTheme,
|
|
3121
554
|
isLightTheme = _ref$isLightTheme === void 0 ? false : _ref$isLightTheme;
|
|
3122
555
|
var config = useStateValue() || {};
|
|
3123
|
-
var showReadTime =
|
|
3124
|
-
var readTime =
|
|
556
|
+
var showReadTime = lodash.get(config, ["showReadTime"]) || lodash.get(opts, ["showReadTime"], true);
|
|
557
|
+
var readTime = lodash.get(story, ["read-time"], 0);
|
|
3125
558
|
var textColor = isLightTheme ? "light" : getTextColor(config.theme);
|
|
3126
559
|
if (!showReadTime || !readTime) return null;
|
|
3127
|
-
var timeToRead =
|
|
560
|
+
var timeToRead = lodash.get(opts, ["localizedTimeToRead"]) || "min read";
|
|
3128
561
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3129
562
|
"data-test-id": "read-time",
|
|
3130
|
-
className: "arrow-component arr--read-time " +
|
|
563
|
+
className: "arrow-component arr--read-time " + _getClassName__default["default"]("read-time-wrapper ".concat(textColor), _styleModuleImportMap$a)
|
|
3131
564
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3132
565
|
className: "read-time-indicator read-time-m_dot-indicator__3Sqh2"
|
|
3133
566
|
}, /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
@@ -3163,9 +596,9 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3163
596
|
config = _ref$config === void 0 ? {} : _ref$config,
|
|
3164
597
|
isLightTheme = _ref.isLightTheme;
|
|
3165
598
|
var configState = useStateValue() || {};
|
|
3166
|
-
var isAuthor =
|
|
3167
|
-
var isTime =
|
|
3168
|
-
var isReadTime =
|
|
599
|
+
var isAuthor = lodash.get(config, ["showAuthor"], lodash.get(configState, ["showAuthor"], true));
|
|
600
|
+
var isTime = lodash.get(config, ["showTime"], lodash.get(configState, ["showTime"], true));
|
|
601
|
+
var isReadTime = lodash.get(configState, ["showReadTime"], true);
|
|
3169
602
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
3170
603
|
var seperatorStyle = separator === "dot" ? "dot" : "dash";
|
|
3171
604
|
var textColor = isLightTheme ? "light" : getTextColor(configState.theme);
|
|
@@ -3185,7 +618,7 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3185
618
|
var getTimeStamp = function getTimeStamp() {
|
|
3186
619
|
if (!isTime) return null;
|
|
3187
620
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3188
|
-
className: "arr-separator " +
|
|
621
|
+
className: "arr-separator " + _getClassName__default["default"]("".concat(seperatorStyle), _styleModuleImportMap$9)
|
|
3189
622
|
}, getSeparator()), /*#__PURE__*/React__default["default"].createElement(TimeStamp, {
|
|
3190
623
|
story: story,
|
|
3191
624
|
config: config
|
|
@@ -3197,7 +630,7 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3197
630
|
};
|
|
3198
631
|
|
|
3199
632
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3200
|
-
className: "arr--author-time " +
|
|
633
|
+
className: "arr--author-time " + _getClassName__default["default"]("author-time-wrapper ".concat(isBottomClasses), _styleModuleImportMap$9)
|
|
3201
634
|
}, isAuthor ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Author, {
|
|
3202
635
|
story: story,
|
|
3203
636
|
isBottom: true,
|
|
@@ -3253,7 +686,7 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
3253
686
|
_ref$navigate = _ref.navigate,
|
|
3254
687
|
navigate = _ref$navigate === void 0 ? true : _ref$navigate;
|
|
3255
688
|
var collectionTitle = useStateValue() || {};
|
|
3256
|
-
var showRowTitle =
|
|
689
|
+
var showRowTitle = lodash.get(collectionTitle, ["showRowTitle"], true);
|
|
3257
690
|
var supportedTemplates = ["borderLeft", "borderBottom", "crossLine", "borderBottomFull"];
|
|
3258
691
|
var templateStyle = supportedTemplates.includes(collectionNameTemplate) ? " collection-".concat(collectionNameTemplate) : "";
|
|
3259
692
|
var slug = navigate && collection && getSlug(collection, config) || "";
|
|
@@ -3329,7 +762,7 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
3329
762
|
borderBottom: borderBottomFullStyle
|
|
3330
763
|
},
|
|
3331
764
|
"data-test-id": "collection-name",
|
|
3332
|
-
className: ("arr--collection-name arrow-component ".concat(templateStyle) ? "arr--collection-name arrow-component ".concat(templateStyle) + " " : "") +
|
|
765
|
+
className: ("arr--collection-name arrow-component ".concat(templateStyle) ? "arr--collection-name arrow-component ".concat(templateStyle) + " " : "") + _getClassName__default["default"]("collection ".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$8)
|
|
3333
766
|
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3334
767
|
className: "arr-collection-name-border-left collection-name-m_border-left__3_pYw",
|
|
3335
768
|
style: {
|
|
@@ -3366,7 +799,7 @@ CollectionNameBase.defaultProps = {
|
|
|
3366
799
|
|
|
3367
800
|
function mapStateToProps(state) {
|
|
3368
801
|
return {
|
|
3369
|
-
config:
|
|
802
|
+
config: lodash.get(state, ["qt", "config"], {})
|
|
3370
803
|
};
|
|
3371
804
|
}
|
|
3372
805
|
|
|
@@ -3606,8 +1039,8 @@ var Headline = function Headline(_ref) {
|
|
|
3606
1039
|
enablePremiumStoryIcon = _premiumStoryIconConf3 === void 0 ? false : _premiumStoryIconConf3,
|
|
3607
1040
|
_premiumStoryIconConf4 = premiumStoryIconConfig.showLiveIcon,
|
|
3608
1041
|
showLiveIcon = _premiumStoryIconConf4 === void 0 ? false : _premiumStoryIconConf4;
|
|
3609
|
-
var alternateHeadline =
|
|
3610
|
-
var premiumStory = enablePremiumStoryIcon &&
|
|
1042
|
+
var alternateHeadline = lodash.get(story, ["alternative", "home", "default", "headline"]);
|
|
1043
|
+
var premiumStory = enablePremiumStoryIcon && lodash.get(story, ["access"]) === "subscription";
|
|
3611
1044
|
var headline = alternateHeadline || story.headline;
|
|
3612
1045
|
var HeaderTag = "h" + headerLevel;
|
|
3613
1046
|
|
|
@@ -3633,10 +1066,10 @@ var Headline = function Headline(_ref) {
|
|
|
3633
1066
|
var textColor = getTextColor(configData.theme);
|
|
3634
1067
|
var wrapperClass = premiumStory ? "wrapper" : "";
|
|
3635
1068
|
var iconSize = "24px";
|
|
3636
|
-
var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !
|
|
1069
|
+
var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !lodash.get(story, ["metadata", "is-closed"], false);
|
|
3637
1070
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3638
1071
|
"data-test-id": "headline",
|
|
3639
|
-
className: "arrow-component arr--headline " +
|
|
1072
|
+
className: "arrow-component arr--headline " + _getClassName__default["default"](wrapperClass, _styleModuleImportMap$7)
|
|
3640
1073
|
}, premiumStory && /*#__PURE__*/React__default["default"].createElement(PremiumStoryIcon, {
|
|
3641
1074
|
width: iconSize,
|
|
3642
1075
|
height: iconSize,
|
|
@@ -3648,9 +1081,9 @@ var Headline = function Headline(_ref) {
|
|
|
3648
1081
|
externalLink: isExternalStory(story),
|
|
3649
1082
|
"aria-label": "headline"
|
|
3650
1083
|
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
3651
|
-
className:
|
|
1084
|
+
className: _getClassName__default["default"]("headline ".concat(textColor), _styleModuleImportMap$7)
|
|
3652
1085
|
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
3653
|
-
className:
|
|
1086
|
+
className: _getClassName__default["default"]("headline ".concat(textColor), _styleModuleImportMap$7)
|
|
3654
1087
|
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline));
|
|
3655
1088
|
};
|
|
3656
1089
|
Headline.propTypes = {
|
|
@@ -3811,7 +1244,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3811
1244
|
return null;
|
|
3812
1245
|
} : _config$StoryTemplate;
|
|
3813
1246
|
var showImagePlaceholder = reactRedux.useSelector(function (state) {
|
|
3814
|
-
return
|
|
1247
|
+
return lodash.get(state, ["qt", "config", "showPlaceholder"]);
|
|
3815
1248
|
});
|
|
3816
1249
|
var getPlaceholderStyleName = showImagePlaceholder ? "placeholder" : "";
|
|
3817
1250
|
var fullBleed = FullBleed ? "" : "with-padding";
|
|
@@ -3820,7 +1253,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3820
1253
|
var heroImageMobClasses = isHorizontalMobile ? "right-padding-mob" : "";
|
|
3821
1254
|
|
|
3822
1255
|
var getPadding = function getPadding(aspectRatio) {
|
|
3823
|
-
var _aspectRatio =
|
|
1256
|
+
var _aspectRatio = _slicedToArray__default["default"](aspectRatio, 2),
|
|
3824
1257
|
height = _aspectRatio[0],
|
|
3825
1258
|
width = _aspectRatio[1];
|
|
3826
1259
|
|
|
@@ -3832,7 +1265,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3832
1265
|
return 0;
|
|
3833
1266
|
};
|
|
3834
1267
|
|
|
3835
|
-
var _aspectRatio2 =
|
|
1268
|
+
var _aspectRatio2 = _slicedToArray__default["default"](aspectRatio, 2),
|
|
3836
1269
|
mobileAspectRatio = _aspectRatio2[0],
|
|
3837
1270
|
_aspectRatio2$ = _aspectRatio2[1],
|
|
3838
1271
|
desktopAspectRatio = _aspectRatio2$ === void 0 ? mobileAspectRatio : _aspectRatio2$;
|
|
@@ -3840,8 +1273,8 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3840
1273
|
var isMobile = clientWidth("mobile");
|
|
3841
1274
|
var imageAspectRatio = isMobile ? mobileAspectRatio : desktopAspectRatio;
|
|
3842
1275
|
var imagePadding = isMobile ? getPadding(mobileAspectRatio) : getPadding(desktopAspectRatio);
|
|
3843
|
-
var slug =
|
|
3844
|
-
var hyperLink =
|
|
1276
|
+
var slug = lodash.get(story, ["hero-image-s3-key"]) || lodash.get(story, ["alternative", "home", "default", "hero-image", "hero-image-s3-key"]);
|
|
1277
|
+
var hyperLink = lodash.get(story, ["hero-image-hyperlink"], "");
|
|
3845
1278
|
|
|
3846
1279
|
var fallbackImage = function fallbackImage() {
|
|
3847
1280
|
if (!slug) {
|
|
@@ -3850,7 +1283,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3850
1283
|
style: {
|
|
3851
1284
|
paddingTop: imagePadding + "%"
|
|
3852
1285
|
},
|
|
3853
|
-
className: "arr--responsive-hero-image " +
|
|
1286
|
+
className: "arr--responsive-hero-image " + _getClassName__default["default"]("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$6)
|
|
3854
1287
|
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
3855
1288
|
className: "qt-image",
|
|
3856
1289
|
"data-src": "".concat(fallbackImageUrl),
|
|
@@ -3863,7 +1296,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3863
1296
|
style: {
|
|
3864
1297
|
paddingTop: imagePadding + "%"
|
|
3865
1298
|
},
|
|
3866
|
-
className: "arr--fallback-hero-image " +
|
|
1299
|
+
className: "arr--fallback-hero-image " + _getClassName__default["default"]("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$6)
|
|
3867
1300
|
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
3868
1301
|
storyTemplate: story["story-template"]
|
|
3869
1302
|
}), /*#__PURE__*/React__default["default"].createElement(FallbackImage, null)) : null);
|
|
@@ -3873,7 +1306,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3873
1306
|
style: {
|
|
3874
1307
|
paddingTop: imagePadding + "%"
|
|
3875
1308
|
},
|
|
3876
|
-
className: "arr--responsive-hero-image " +
|
|
1309
|
+
className: "arr--responsive-hero-image " + _getClassName__default["default"]("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$6)
|
|
3877
1310
|
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
3878
1311
|
storyTemplate: story["story-template"]
|
|
3879
1312
|
}), /*#__PURE__*/React__default["default"].createElement(components.ResponsiveHeroImage, {
|
|
@@ -3892,13 +1325,13 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3892
1325
|
|
|
3893
1326
|
return story && (isStoryPageImage ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3894
1327
|
"data-test-id": "arr--hero-image",
|
|
3895
|
-
className: "arr--hero-image " +
|
|
1328
|
+
className: "arr--hero-image " + _getClassName__default["default"]("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap$6)
|
|
3896
1329
|
}, fallbackImage()) : /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3897
1330
|
"data-test-id": "arr--hero-image",
|
|
3898
1331
|
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
3899
1332
|
externalLink: isExternalStory(story),
|
|
3900
1333
|
"aria-label": "fallback-hero-image",
|
|
3901
|
-
className: "arr--hero-image " +
|
|
1334
|
+
className: "arr--hero-image " + _getClassName__default["default"]("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap$6)
|
|
3902
1335
|
}, fallbackImage()));
|
|
3903
1336
|
};
|
|
3904
1337
|
HeroImage.propTypes = {
|
|
@@ -3961,9 +1394,9 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
3961
1394
|
borderColor = _ref$borderColor === void 0 ? "" : _ref$borderColor,
|
|
3962
1395
|
isLightTheme = _ref.isLightTheme;
|
|
3963
1396
|
var config = useStateValue() || {};
|
|
3964
|
-
var isSection =
|
|
3965
|
-
var templateFromRowContext =
|
|
3966
|
-
var section =
|
|
1397
|
+
var isSection = lodash.get(config, ["showSection"], true);
|
|
1398
|
+
var templateFromRowContext = lodash.get(config, ["sectionTagTemplate"]);
|
|
1399
|
+
var section = lodash.get(story, ["sections", 0], "");
|
|
3967
1400
|
var supportedTemplates = ["borderBottomSml", "borderLeft", "solid"];
|
|
3968
1401
|
var getUrl = section ? section["section-url"] : "/";
|
|
3969
1402
|
var colorToApplyContrast = template === "solid" || templateFromRowContext === "solid" ? borderColor : config.theme;
|
|
@@ -3985,7 +1418,7 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
3985
1418
|
style: {
|
|
3986
1419
|
backgroundColor: templateStyle.includes("section-solid") ? sectionTagBorderColor : ""
|
|
3987
1420
|
},
|
|
3988
|
-
className: "section-tag arrow-component " +
|
|
1421
|
+
className: "section-tag arrow-component " + _getClassName__default["default"]("".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$5)
|
|
3989
1422
|
}, templateStyle.includes("section-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3990
1423
|
className: "section-m_border-left__2oUyp",
|
|
3991
1424
|
style: {
|
|
@@ -4030,7 +1463,7 @@ var Subheadline = function Subheadline(_ref) {
|
|
|
4030
1463
|
forceShowAtom = _ref.forceShowAtom,
|
|
4031
1464
|
showFullContent = _ref.showFullContent;
|
|
4032
1465
|
var config = useStateValue() || {};
|
|
4033
|
-
var subheadline = forceShowAtom ||
|
|
1466
|
+
var subheadline = forceShowAtom || lodash.get(config, ["showSubheadline"], true);
|
|
4034
1467
|
if (!subheadline) return null;
|
|
4035
1468
|
var textColor = getTextColor(config.theme);
|
|
4036
1469
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -4038,7 +1471,7 @@ var Subheadline = function Subheadline(_ref) {
|
|
|
4038
1471
|
WebkitLineClamp: lineClamp
|
|
4039
1472
|
},
|
|
4040
1473
|
"data-test-id": "subheadline",
|
|
4041
|
-
className: ("p-alt arr--sub-headline arrow-component ".concat(clazzName) ? "p-alt arr--sub-headline arrow-component ".concat(clazzName) + " " : "") +
|
|
1474
|
+
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$4)
|
|
4042
1475
|
}, showFullContent || typeof lineClamp === "number" ? story.subheadline : truncate(story.subheadline, truncateChars, true));
|
|
4043
1476
|
};
|
|
4044
1477
|
Subheadline.propTypes = {
|
|
@@ -4130,7 +1563,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
4130
1563
|
backgroundColor: theme,
|
|
4131
1564
|
color: textColor
|
|
4132
1565
|
},
|
|
4133
|
-
className: "arr--story-card " +
|
|
1566
|
+
className: "arr--story-card " + _getClassName__default["default"]("card ".concat(horizontalCardStyle, " ").concat(borderTemplate, " ").concat(textColor, " ").concat(bgImageClasses, " ").concat(bgImgContentOverlapClass, " ").concat(horizontalMobileClasses), _styleModuleImportMap$3)
|
|
4134
1567
|
}, children || defaultStorycard);
|
|
4135
1568
|
};
|
|
4136
1569
|
|
|
@@ -4171,7 +1604,7 @@ var DefaultStoryCard = function DefaultStoryCard(_ref2) {
|
|
|
4171
1604
|
isHorizontalMobile: isHorizontalMobile,
|
|
4172
1605
|
aspectRatio: aspectRatio
|
|
4173
1606
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4174
|
-
className: "arr--story-content " +
|
|
1607
|
+
className: "arr--story-content " + _getClassName__default["default"]("content ".concat(alignment), _styleModuleImportMap$3)
|
|
4175
1608
|
}, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
|
|
4176
1609
|
story: story,
|
|
4177
1610
|
borderColor: SectionTagborderColor
|
|
@@ -4278,7 +1711,7 @@ var _styleModuleImportMap$2 = {
|
|
|
4278
1711
|
|
|
4279
1712
|
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; }
|
|
4280
1713
|
|
|
4281
|
-
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) {
|
|
1714
|
+
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; }
|
|
4282
1715
|
var LoadmoreButton = function LoadmoreButton(_ref) {
|
|
4283
1716
|
var _ref$config = _ref.config,
|
|
4284
1717
|
config = _ref$config === void 0 ? {} : _ref$config,
|
|
@@ -4302,14 +1735,14 @@ var LoadmoreButton = function LoadmoreButton(_ref) {
|
|
|
4302
1735
|
return template === "SubsequentLoadCount" ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4303
1736
|
onClick: onClick,
|
|
4304
1737
|
"data-test-id": "load-more",
|
|
4305
|
-
className: "arr--button " +
|
|
1738
|
+
className: "arr--button " + _getClassName__default["default"]("button ".concat(textColor, " default"), _styleModuleImportMap$2)
|
|
4306
1739
|
}, buttonText) : /*#__PURE__*/React__default["default"].createElement(components.LinkBase, {
|
|
4307
1740
|
href: slug,
|
|
4308
1741
|
navigateTo: navigate,
|
|
4309
1742
|
"data-test-id": "load-more",
|
|
4310
1743
|
"aria-label": "load-more"
|
|
4311
1744
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4312
|
-
className: "arr--button " +
|
|
1745
|
+
className: "arr--button " + _getClassName__default["default"]("button ".concat(textColor, " default"), _styleModuleImportMap$2)
|
|
4313
1746
|
}, buttonText));
|
|
4314
1747
|
};
|
|
4315
1748
|
LoadmoreButton.propTypes = {
|
|
@@ -4357,7 +1790,7 @@ var KeyEventCards = function KeyEventCards(props) {
|
|
|
4357
1790
|
var lastElement = index === cardLength - 1;
|
|
4358
1791
|
var borderLeft = lastElement ? "borderNone" : "";
|
|
4359
1792
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4360
|
-
className:
|
|
1793
|
+
className: _getClassName__default["default"]("time-wrapper ".concat(textColor), _styleModuleImportMap$1)
|
|
4361
1794
|
}, /*#__PURE__*/React__default["default"].createElement(ClockIcon, {
|
|
4362
1795
|
color: updateColor
|
|
4363
1796
|
}), getTimeStamp(cardAddedAt, timestampToFormat, {
|
|
@@ -4367,7 +1800,7 @@ var KeyEventCards = function KeyEventCards(props) {
|
|
|
4367
1800
|
href: "".concat(mountAt, "/").concat(slug, "#").concat(id),
|
|
4368
1801
|
"aria-label": "event-title"
|
|
4369
1802
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4370
|
-
className:
|
|
1803
|
+
className: _getClassName__default["default"]("event-title ".concat(textColor, " ").concat(borderLeft), _styleModuleImportMap$1)
|
|
4371
1804
|
}, storyElements.map(function (element, index) {
|
|
4372
1805
|
return element.type === "title" && /*#__PURE__*/React__default["default"].createElement("h3", {
|
|
4373
1806
|
key: index
|
|
@@ -4402,23 +1835,23 @@ var KeyEventsBase = function KeyEventsBase(_ref) {
|
|
|
4402
1835
|
config = _ref$config === void 0 ? {} : _ref$config,
|
|
4403
1836
|
_ref$showLoadMore = _ref.showLoadMore,
|
|
4404
1837
|
showLoadMore = _ref$showLoadMore === void 0 ? true : _ref$showLoadMore;
|
|
4405
|
-
var cards =
|
|
1838
|
+
var cards = lodash.get(story, ["cards"], []);
|
|
4406
1839
|
var theme = config.theme,
|
|
4407
1840
|
_config$initialLoadCo = config.initialLoadCount,
|
|
4408
1841
|
initialLoadCount = _config$initialLoadCo === void 0 ? 4 : _config$initialLoadCo;
|
|
4409
1842
|
var textColor = getTextColor(theme);
|
|
4410
1843
|
|
|
4411
1844
|
var _useState = React.useState(initialLoadCount),
|
|
4412
|
-
_useState2 =
|
|
1845
|
+
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
4413
1846
|
initialCount = _useState2[0],
|
|
4414
1847
|
updatedCount = _useState2[1];
|
|
4415
1848
|
|
|
4416
1849
|
var cardsWithKeyEvents = cards.filter(function (card) {
|
|
4417
|
-
return
|
|
1850
|
+
return lodash.get(card.metadata, ["attributes", "key-event"]);
|
|
4418
1851
|
});
|
|
4419
1852
|
var lastElement = cardsWithKeyEvents.length > initialCount;
|
|
4420
1853
|
var qtConfig = reactRedux.useSelector(function (state) {
|
|
4421
|
-
return
|
|
1854
|
+
return lodash.get(state, ["qt", "config"], {});
|
|
4422
1855
|
});
|
|
4423
1856
|
|
|
4424
1857
|
var onClick = function onClick() {
|
|
@@ -4446,7 +1879,7 @@ var KeyEventsBase = function KeyEventsBase(_ref) {
|
|
|
4446
1879
|
style: {
|
|
4447
1880
|
background: theme
|
|
4448
1881
|
},
|
|
4449
|
-
className: "arrow-component " +
|
|
1882
|
+
className: "arrow-component " + _getClassName__default["default"]("container ".concat(textColor), _styleModuleImportMap$1)
|
|
4450
1883
|
}, /*#__PURE__*/React__default["default"].createElement("h3", null, "Key Events"), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4451
1884
|
className: "key-events-m_cards-wrapper__3f8aB"
|
|
4452
1885
|
}, keyEvents), showLoadMore && lastElement && /*#__PURE__*/React__default["default"].createElement(LoadmoreButton, {
|
|
@@ -4465,7 +1898,7 @@ var KeyEvents = StateProvider(KeyEventsBase);
|
|
|
4465
1898
|
|
|
4466
1899
|
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; }
|
|
4467
1900
|
|
|
4468
|
-
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) {
|
|
1901
|
+
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; }
|
|
4469
1902
|
var _styleModuleImportMap = {
|
|
4470
1903
|
"./aside-collection.m.css": {
|
|
4471
1904
|
"stories": "aside-collection-m_stories__9wfUs",
|
|
@@ -4498,22 +1931,22 @@ var StoryCollection = function StoryCollection(_ref) {
|
|
|
4498
1931
|
|
|
4499
1932
|
var heading = title || "Related Stories";
|
|
4500
1933
|
var isHorizontal = horizontal ? "horizontal-wrapper" : "";
|
|
4501
|
-
var mountAt =
|
|
1934
|
+
var mountAt = lodash.get(config, ["mountAtPrefix"], "");
|
|
4502
1935
|
|
|
4503
1936
|
var _useState = React.useState([]),
|
|
4504
|
-
_useState2 =
|
|
1937
|
+
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
4505
1938
|
storyList = _useState2[0],
|
|
4506
1939
|
updateStoryList = _useState2[1];
|
|
4507
1940
|
|
|
4508
1941
|
var _useState3 = React.useState([]),
|
|
4509
|
-
_useState4 =
|
|
1942
|
+
_useState4 = _slicedToArray__default["default"](_useState3, 2),
|
|
4510
1943
|
collectionData = _useState4[0],
|
|
4511
1944
|
updateCollectionData = _useState4[1];
|
|
4512
1945
|
|
|
4513
1946
|
var updateStoryListItems = /*#__PURE__*/function () {
|
|
4514
|
-
var _ref3 =
|
|
1947
|
+
var _ref3 = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(slug) {
|
|
4515
1948
|
var collectionDataResponse, storyItems;
|
|
4516
|
-
return
|
|
1949
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
|
|
4517
1950
|
while (1) {
|
|
4518
1951
|
switch (_context.prev = _context.next) {
|
|
4519
1952
|
case 0:
|
|
@@ -4624,7 +2057,7 @@ var AsideCollectionBase = function AsideCollectionBase(_ref4) {
|
|
|
4624
2057
|
},
|
|
4625
2058
|
"data-test-id": "aside-collection",
|
|
4626
2059
|
id: "aside-collection-".concat(storyId),
|
|
4627
|
-
className: "arrow-component arr--aside-collection " +
|
|
2060
|
+
className: "arrow-component arr--aside-collection " + _getClassName__default["default"]("wrapper ".concat(isHorizontal), _styleModuleImportMap)
|
|
4628
2061
|
}, /*#__PURE__*/React__default["default"].createElement(StoryCollection, {
|
|
4629
2062
|
data: data,
|
|
4630
2063
|
horizontal: horizontal,
|
|
@@ -4669,7 +2102,7 @@ var AsideCollectionBase = function AsideCollectionBase(_ref4) {
|
|
|
4669
2102
|
backgroundColor: theme
|
|
4670
2103
|
},
|
|
4671
2104
|
"data-test-id": "aside-collection",
|
|
4672
|
-
className: "arrow-component arr--aside-collection " +
|
|
2105
|
+
className: "arrow-component arr--aside-collection " + _getClassName__default["default"](["wrapper", isHorizontal, isSticky].join(" "), _styleModuleImportMap)
|
|
4673
2106
|
}, enableKeyEvents && /*#__PURE__*/React__default["default"].createElement(KeyEvents, {
|
|
4674
2107
|
story: keyEventsData.story,
|
|
4675
2108
|
showLoadMore: keyEventsData.showLoadMore,
|