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