@mjhls/mjh-framework 1.0.1080 → 1.0.1082-404-v4
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/README.md +1 -1
- package/dist/cjs/AD.js +6 -6
- package/dist/cjs/AD300x250.js +5 -6
- package/dist/cjs/AD300x250x600.js +5 -6
- package/dist/cjs/AD728x90.js +6 -7
- package/dist/cjs/ADFloatingFooter.js +8 -9
- package/dist/cjs/ADFooter.js +5 -5
- package/dist/cjs/ADGutter.js +8 -9
- package/dist/cjs/{ADInfeed-3a68b356.js → ADInfeed-98ee4120.js} +6 -6
- package/dist/cjs/ADSkyscraper.js +8 -9
- package/dist/cjs/ADSponsoredResources.js +8 -9
- package/dist/cjs/ADWebcast.js +8 -9
- package/dist/cjs/ADWelcome.js +12 -13
- package/dist/cjs/{ADlgInfeed-d88a0250.js → ADlgInfeed-55df7d69.js} +4 -4
- package/dist/cjs/AccordionPanel.js +17 -17
- package/dist/cjs/AdSlot.js +9 -10
- package/dist/cjs/AdSlotsProvider.js +5 -6
- package/dist/cjs/AlgoliaSearch.js +1784 -1027
- package/dist/cjs/AlphabeticList.js +12 -12
- package/dist/cjs/ArticleCarousel.js +5 -5
- package/dist/cjs/ArticleProgramLandingPage.js +15 -16
- package/dist/cjs/ArticleSeriesLandingPage.js +12 -13
- package/dist/cjs/ArticleSeriesListing.js +30 -31
- package/dist/cjs/AuthWrapper.js +257 -633
- package/dist/cjs/{AuthorComponent-39b37d84.js → AuthorComponent-7d00f6d5.js} +9 -9
- package/dist/cjs/{BlockContent-9ebd251f.js → BlockContent-96b44364.js} +18 -18
- package/dist/cjs/Breadcrumbs.js +17 -17
- package/dist/cjs/CEDeckSupabase.js +67 -72
- package/dist/cjs/CMEDeck.js +61 -66
- package/dist/cjs/Column1.js +6 -6
- package/dist/cjs/Column2.js +14 -14
- package/dist/cjs/Column3.js +26 -27
- package/dist/cjs/ConferenceArticleCard.js +13 -13
- package/dist/cjs/{ConferenceBanner-6c9e718a.js → ConferenceBanner-213003ce.js} +3 -3
- package/dist/cjs/ContentCardPaginated.js +50 -51
- package/dist/cjs/DeckContent.js +59 -60
- package/dist/cjs/DeckQueue.js +58 -59
- package/dist/cjs/DeckQueuePaginated.js +47 -48
- package/dist/cjs/{Dfp-9be904d5.js → Dfp-67646058.js} +17 -18
- package/dist/cjs/EventsDeck.js +91 -91
- package/dist/cjs/ExternalResources.js +35 -36
- package/dist/cjs/Feature.js +17 -17
- package/dist/cjs/ForbesHero.js +26 -26
- package/dist/cjs/GridContent.js +135 -136
- package/dist/cjs/GridContentPaginated.js +122 -123
- package/dist/cjs/GridHero.js +27 -27
- package/dist/cjs/GroupDeck.js +33 -33
- package/dist/cjs/HamMagazine.js +111 -111
- package/dist/cjs/Header.js +25 -25
- package/dist/cjs/HealthCareProfessionalModal.js +17 -17
- package/dist/cjs/Hero.js +5 -5
- package/dist/cjs/HighlightenVideo.js +13 -13
- package/dist/cjs/HorizontalArticleListing.js +29 -30
- package/dist/cjs/HorizontalHero.js +18 -18
- package/dist/cjs/{ImageSlider-294d3fc0.js → ImageSlider-7c995858.js} +78 -83
- package/dist/cjs/IssueContentDeck.js +50 -50
- package/dist/cjs/IssueDeck.js +48 -48
- package/dist/cjs/IssueLanding.js +21 -22
- package/dist/cjs/LeftNav.js +17 -18
- package/dist/cjs/MasterDeck.js +40 -41
- package/dist/cjs/MasterDeckPaginated.js +29 -30
- package/dist/cjs/MediaSeriesCard.js +20 -21
- package/dist/cjs/MediaSeriesLanding.js +38 -39
- package/dist/cjs/MediaSeriesLandingPaginated.js +37 -38
- package/dist/cjs/NavDvm.js +57 -57
- package/dist/cjs/{NavFooter-fa5fae05.js → NavFooter-b7b16d48.js} +11 -11
- package/dist/cjs/NavMagazine.js +106 -106
- package/dist/cjs/NavNative.js +97 -97
- package/dist/cjs/OncliveHero.js +12 -12
- package/dist/cjs/OncliveLargeHero.js +50 -50
- package/dist/cjs/PageFilter.js +5 -5
- package/dist/cjs/{Pagination-2a3d0103.js → Pagination-6359861a.js} +13 -13
- package/dist/cjs/PartnerDetailListing.js +55 -56
- package/dist/cjs/PartnerDetailListingPaginated.js +54 -55
- package/dist/cjs/PdfDownload.js +4 -4
- package/dist/cjs/PixelTracking.js +9 -9
- package/dist/cjs/PodcastsLanding.js +23 -24
- package/dist/cjs/PopUpModal.js +9 -9
- package/dist/cjs/PtceDeck.js +14 -14
- package/dist/cjs/PubSection.js +14 -15
- package/dist/cjs/PubToc.js +4 -4
- package/dist/cjs/PublicationDeck.js +44 -44
- package/dist/cjs/{PublicationFeature-03de3225.js → PublicationFeature-4b68e0db.js} +30 -30
- package/dist/cjs/PublicationLanding.js +75 -75
- package/dist/cjs/QueueDeckExpanded.js +246 -247
- package/dist/cjs/QueueDeckExpandedPaginated.js +223 -224
- package/dist/cjs/RecentNews.js +15 -15
- package/dist/cjs/RelatedContent.js +15 -15
- package/dist/cjs/RelatedTopicsDropdown.js +14 -14
- package/dist/cjs/RolesDeck.js +20 -20
- package/dist/cjs/Schema.js +1 -1
- package/dist/cjs/Search.js +6 -6
- package/dist/cjs/SeriesListingDeck.js +18 -19
- package/dist/cjs/{SeriesSlider-621d0cbb.js → SeriesSlider-086a8319.js} +22 -22
- package/dist/cjs/SideFooter.js +18 -18
- package/dist/cjs/SocialIcons.js +6 -6
- package/dist/cjs/{SocialSearchComponent-f874175b.js → SocialSearchComponent-d7e5d3a6.js} +28 -28
- package/dist/cjs/SocialShare.js +25 -25
- package/dist/cjs/TaxonomyCard.js +44 -44
- package/dist/cjs/TaxonomyDescription.js +12 -13
- package/dist/cjs/TemplateNormal.js +27 -28
- package/dist/cjs/ThumbnailCard.js +10 -10
- package/dist/cjs/{Tooltip-f075b7ef.js → Tooltip-b8516cbf.js} +632 -545
- package/dist/cjs/Ustream.js +9 -9
- package/dist/cjs/VerticalHero.js +11 -11
- package/dist/cjs/VideoProgramLandingPage.js +29 -30
- package/dist/cjs/VideoSeriesCard.js +14 -14
- package/dist/cjs/VideoSeriesFilter.js +5 -5
- package/dist/cjs/VideoSeriesLandingPage.js +12 -13
- package/dist/cjs/VideoSeriesListing.js +47 -48
- package/dist/cjs/View.js +245 -242
- package/dist/cjs/YahooHero.js +23 -23
- package/dist/cjs/YoutubeGroup.js +33 -33
- package/dist/cjs/{brightcove-react-player-loader.es-a195642e.js → brightcove-react-player-loader.es-35faab67.js} +5 -5
- package/dist/cjs/{defineProperty-e0fb52c5.js → defineProperty-19580e93.js} +2 -4
- package/dist/cjs/getQuery.js +1 -2
- package/dist/cjs/getRelatedArticle.js +33 -15
- package/dist/cjs/getSerializers.js +7 -8
- package/dist/cjs/iconBase-be4097c0.js +2 -4
- package/dist/cjs/{index-c3f0b162.js → index-171e9e82.js} +717 -498
- package/dist/cjs/index-3177f564.js +1573 -0
- package/dist/cjs/{index-eadd5035.js → index-65621b6c.js} +5 -5
- package/dist/cjs/{index-fc2f1ca2.js → index-7435b964.js} +471 -6
- package/dist/cjs/{index-50be6759.js → index-ff83a88b.js} +13 -14
- package/dist/cjs/{index.es-f3e47207.js → index.es-1ab8dda7.js} +4 -4
- package/dist/cjs/{index.esm-f51609ab.js → index.esm-2ea9e9ff.js} +14 -14
- package/dist/cjs/index.js +103 -105
- package/dist/cjs/{main-1ec1de84.js → main-ae8472f3.js} +17 -22
- package/dist/cjs/{moment-aca40de1.js → moment-f730814d.js} +95 -80
- package/dist/cjs/{react-social-icons-af932527.js → react-social-icons-2c5c389a.js} +7 -7
- package/dist/cjs/timeDifferenceCalc.js +1 -1
- package/dist/cjs/ustream-api-3819e4aa.js +1 -1
- package/dist/cjs/{visibility-sensor-eb2c5b69.js → visibility-sensor-56020df6.js} +1 -1
- package/dist/esm/AD.js +1 -1
- package/dist/esm/AD300x250.js +2 -3
- package/dist/esm/AD300x250x600.js +2 -3
- package/dist/esm/AD728x90.js +2 -3
- package/dist/esm/ADFloatingFooter.js +2 -3
- package/dist/esm/ADGutter.js +2 -3
- package/dist/esm/{ADInfeed-e8fc8fbb.js → ADInfeed-41bba2c6.js} +1 -1
- package/dist/esm/ADSkyscraper.js +2 -3
- package/dist/esm/ADSponsoredResources.js +2 -3
- package/dist/esm/ADWebcast.js +2 -3
- package/dist/esm/ADWelcome.js +2 -3
- package/dist/esm/{ADlgInfeed-8a3c14d7.js → ADlgInfeed-3c717ece.js} +1 -1
- package/dist/esm/AdSlot.js +2 -3
- package/dist/esm/AdSlotsProvider.js +2 -3
- package/dist/esm/AlgoliaSearch.js +1402 -645
- package/dist/esm/ArticleCarousel.js +1 -1
- package/dist/esm/ArticleProgramLandingPage.js +5 -6
- package/dist/esm/ArticleSeriesLandingPage.js +5 -6
- package/dist/esm/ArticleSeriesListing.js +3 -4
- package/dist/esm/AuthWrapper.js +232 -608
- package/dist/esm/CEDeckSupabase.js +3 -8
- package/dist/esm/CMEDeck.js +3 -8
- package/dist/esm/Column3.js +2 -3
- package/dist/esm/ConferenceArticleCard.js +1 -1
- package/dist/esm/ContentCardPaginated.js +5 -6
- package/dist/esm/DeckContent.js +4 -5
- package/dist/esm/DeckQueue.js +3 -4
- package/dist/esm/DeckQueuePaginated.js +4 -5
- package/dist/esm/{Dfp-78070ecb.js → Dfp-3b6eb620.js} +1 -2
- package/dist/esm/EventsDeck.js +3 -3
- package/dist/esm/ExternalResources.js +6 -7
- package/dist/esm/Feature.js +1 -1
- package/dist/esm/ForbesHero.js +1 -1
- package/dist/esm/GridContent.js +6 -7
- package/dist/esm/GridContentPaginated.js +7 -8
- package/dist/esm/GridHero.js +1 -1
- package/dist/esm/HamMagazine.js +2 -2
- package/dist/esm/HighlightenVideo.js +1 -1
- package/dist/esm/HorizontalArticleListing.js +5 -6
- package/dist/esm/HorizontalHero.js +1 -1
- package/dist/esm/{ImageSlider-9250ddc9.js → ImageSlider-75f7b81a.js} +6 -11
- package/dist/esm/IssueContentDeck.js +1 -1
- package/dist/esm/IssueLanding.js +7 -8
- package/dist/esm/LeftNav.js +2 -3
- package/dist/esm/MasterDeck.js +5 -6
- package/dist/esm/MasterDeckPaginated.js +5 -6
- package/dist/esm/MediaSeriesCard.js +5 -6
- package/dist/esm/MediaSeriesLanding.js +10 -11
- package/dist/esm/MediaSeriesLandingPaginated.js +11 -12
- package/dist/esm/NavMagazine.js +2 -2
- package/dist/esm/NavNative.js +1 -1
- package/dist/esm/OncliveHero.js +1 -1
- package/dist/esm/OncliveLargeHero.js +1 -1
- package/dist/esm/{Pagination-dc30727b.js → Pagination-9fe9f61d.js} +2 -2
- package/dist/esm/PartnerDetailListing.js +9 -10
- package/dist/esm/PartnerDetailListingPaginated.js +10 -11
- package/dist/esm/PodcastsLanding.js +8 -9
- package/dist/esm/PtceDeck.js +1 -1
- package/dist/esm/PubSection.js +5 -6
- package/dist/esm/{PublicationFeature-89b7afdb.js → PublicationFeature-6c334891.js} +1 -1
- package/dist/esm/QueueDeckExpanded.js +5 -6
- package/dist/esm/QueueDeckExpandedPaginated.js +6 -7
- package/dist/esm/RelatedContent.js +1 -1
- package/dist/esm/SeriesListingDeck.js +3 -4
- package/dist/esm/{SeriesSlider-7913a789.js → SeriesSlider-acbdf4c9.js} +1 -1
- package/dist/esm/{SocialSearchComponent-ae8da67e.js → SocialSearchComponent-9e65c8d6.js} +1 -1
- package/dist/esm/TaxonomyDescription.js +5 -6
- package/dist/esm/TemplateNormal.js +3 -4
- package/dist/esm/{Tooltip-95655b44.js → Tooltip-fe0ed92d.js} +193 -106
- package/dist/esm/Ustream.js +1 -1
- package/dist/esm/VerticalHero.js +1 -1
- package/dist/esm/VideoProgramLandingPage.js +5 -6
- package/dist/esm/VideoSeriesCard.js +1 -1
- package/dist/esm/VideoSeriesLandingPage.js +5 -6
- package/dist/esm/VideoSeriesListing.js +3 -4
- package/dist/esm/View.js +14 -11
- package/dist/esm/YahooHero.js +1 -1
- package/dist/esm/YoutubeGroup.js +1 -1
- package/dist/esm/{brightcove-react-player-loader.es-57a70a56.js → brightcove-react-player-loader.es-a2422c4b.js} +3 -3
- package/dist/esm/{defineProperty-23a8f8cd.js → defineProperty-e8022d1e.js} +2 -4
- package/dist/esm/getQuery.js +1 -2
- package/dist/esm/getRelatedArticle.js +34 -16
- package/dist/esm/getSerializers.js +5 -6
- package/dist/esm/{index-2fe6b5b1.js → index-1d1bbc8c.js} +235 -16
- package/dist/esm/index-4550ef23.js +1571 -0
- package/dist/esm/{index-f0fc23eb.js → index-5cc7b406.js} +466 -1
- package/dist/esm/{index-98ca9cec.js → index-c8d5e72b.js} +13 -14
- package/dist/esm/index.js +14 -16
- package/dist/esm/{main-f97773b2.js → main-754d4992.js} +4 -9
- package/dist/esm/{moment-bc12cb97.js → moment-48faeb9c.js} +95 -80
- package/dist/esm/timeDifferenceCalc.js +1 -1
- package/dist/esm/visibility-sensor-72fd8f8b.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/events-1b438fe7.js +0 -469
- package/dist/cjs/index-f86bb269.js +0 -1571
- package/dist/cjs/typeof-1358762e.js +0 -33
- package/dist/esm/events-6c3a7a63.js +0 -467
- package/dist/esm/index-79cfd25c.js +0 -1569
- package/dist/esm/typeof-2f07d0e8.js +0 -30
package/dist/cjs/AuthWrapper.js
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var slicedToArray$1 = require('./slicedToArray-067dd3bc.js');
|
|
4
4
|
var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
|
|
5
|
-
var
|
|
6
|
-
var defineProperty = require('./defineProperty-e0fb52c5.js');
|
|
5
|
+
var defineProperty = require('./defineProperty-19580e93.js');
|
|
7
6
|
var React = require('react');
|
|
8
7
|
var reactBootstrap = require('react-bootstrap');
|
|
9
8
|
var styleInject_es = require('./style-inject.es-dcee06b6.js');
|
|
@@ -21,777 +20,407 @@ function _interopRequireDefault(obj) {
|
|
|
21
20
|
};
|
|
22
21
|
}
|
|
23
22
|
|
|
24
|
-
module.exports = _interopRequireDefault;
|
|
25
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
23
|
+
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
26
24
|
});
|
|
27
25
|
|
|
28
26
|
_commonjsHelpers.unwrapExports(interopRequireDefault);
|
|
29
27
|
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
*
|
|
34
|
-
* This source code is licensed under the MIT license found in the
|
|
35
|
-
* LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/
|
|
28
|
+
var _typeof_1 = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
29
|
+
function _typeof(obj) {
|
|
30
|
+
"@babel/helpers - typeof";
|
|
37
31
|
|
|
38
|
-
|
|
32
|
+
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
33
|
+
return typeof obj;
|
|
34
|
+
} : function (obj) {
|
|
35
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
36
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
_commonjsHelpers.unwrapExports(_typeof_1);
|
|
43
|
+
|
|
44
|
+
var regeneratorRuntime$1 = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
45
|
+
var _typeof = _typeof_1["default"];
|
|
46
|
+
|
|
47
|
+
function _regeneratorRuntime() {
|
|
48
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
39
49
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
50
|
+
module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
|
|
51
|
+
return exports;
|
|
52
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
53
|
+
var exports = {},
|
|
54
|
+
Op = Object.prototype,
|
|
55
|
+
hasOwn = Op.hasOwnProperty,
|
|
56
|
+
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
|
57
|
+
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
58
|
+
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
59
|
+
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
47
60
|
|
|
48
61
|
function define(obj, key, value) {
|
|
49
|
-
Object.defineProperty(obj, key, {
|
|
62
|
+
return Object.defineProperty(obj, key, {
|
|
50
63
|
value: value,
|
|
51
|
-
enumerable:
|
|
52
|
-
configurable:
|
|
53
|
-
writable:
|
|
54
|
-
});
|
|
55
|
-
return obj[key];
|
|
64
|
+
enumerable: !0,
|
|
65
|
+
configurable: !0,
|
|
66
|
+
writable: !0
|
|
67
|
+
}), obj[key];
|
|
56
68
|
}
|
|
69
|
+
|
|
57
70
|
try {
|
|
58
|
-
// IE 8 has a broken Object.defineProperty that only works on DOM objects.
|
|
59
71
|
define({}, "");
|
|
60
72
|
} catch (err) {
|
|
61
|
-
define = function(obj, key, value) {
|
|
73
|
+
define = function define(obj, key, value) {
|
|
62
74
|
return obj[key] = value;
|
|
63
75
|
};
|
|
64
76
|
}
|
|
65
77
|
|
|
66
78
|
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
79
|
+
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
80
|
+
generator = Object.create(protoGenerator.prototype),
|
|
81
|
+
context = new Context(tryLocsList || []);
|
|
82
|
+
return generator._invoke = function (innerFn, self, context) {
|
|
83
|
+
var state = "suspendedStart";
|
|
84
|
+
return function (method, arg) {
|
|
85
|
+
if ("executing" === state) throw new Error("Generator is already running");
|
|
86
|
+
|
|
87
|
+
if ("completed" === state) {
|
|
88
|
+
if ("throw" === method) throw arg;
|
|
89
|
+
return doneResult();
|
|
90
|
+
}
|
|
71
91
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
|
92
|
+
for (context.method = method, context.arg = arg;;) {
|
|
93
|
+
var delegate = context.delegate;
|
|
75
94
|
|
|
76
|
-
|
|
95
|
+
if (delegate) {
|
|
96
|
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
97
|
+
|
|
98
|
+
if (delegateResult) {
|
|
99
|
+
if (delegateResult === ContinueSentinel) continue;
|
|
100
|
+
return delegateResult;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
105
|
+
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
106
|
+
context.dispatchException(context.arg);
|
|
107
|
+
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
108
|
+
state = "executing";
|
|
109
|
+
var record = tryCatch(innerFn, self, context);
|
|
110
|
+
|
|
111
|
+
if ("normal" === record.type) {
|
|
112
|
+
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
113
|
+
return {
|
|
114
|
+
value: record.arg,
|
|
115
|
+
done: context.done
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
}(innerFn, self, context), generator;
|
|
77
123
|
}
|
|
78
|
-
exports.wrap = wrap;
|
|
79
124
|
|
|
80
|
-
// Try/catch helper to minimize deoptimizations. Returns a completion
|
|
81
|
-
// record like context.tryEntries[i].completion. This interface could
|
|
82
|
-
// have been (and was previously) designed to take a closure to be
|
|
83
|
-
// invoked without arguments, but in all the cases we care about we
|
|
84
|
-
// already have an existing method we want to call, so there's no need
|
|
85
|
-
// to create a new function object. We can even get away with assuming
|
|
86
|
-
// the method takes exactly one argument, since that happens to be true
|
|
87
|
-
// in every case, so we don't have to touch the arguments object. The
|
|
88
|
-
// only additional allocation required is the completion record, which
|
|
89
|
-
// has a stable shape and so hopefully should be cheap to allocate.
|
|
90
125
|
function tryCatch(fn, obj, arg) {
|
|
91
126
|
try {
|
|
92
|
-
return {
|
|
127
|
+
return {
|
|
128
|
+
type: "normal",
|
|
129
|
+
arg: fn.call(obj, arg)
|
|
130
|
+
};
|
|
93
131
|
} catch (err) {
|
|
94
|
-
return {
|
|
132
|
+
return {
|
|
133
|
+
type: "throw",
|
|
134
|
+
arg: err
|
|
135
|
+
};
|
|
95
136
|
}
|
|
96
137
|
}
|
|
97
138
|
|
|
98
|
-
|
|
99
|
-
var GenStateSuspendedYield = "suspendedYield";
|
|
100
|
-
var GenStateExecuting = "executing";
|
|
101
|
-
var GenStateCompleted = "completed";
|
|
102
|
-
|
|
103
|
-
// Returning this object from the innerFn has the same effect as
|
|
104
|
-
// breaking out of the dispatch switch statement.
|
|
139
|
+
exports.wrap = wrap;
|
|
105
140
|
var ContinueSentinel = {};
|
|
106
141
|
|
|
107
|
-
// Dummy constructor functions that we use as the .constructor and
|
|
108
|
-
// .constructor.prototype properties for functions that return Generator
|
|
109
|
-
// objects. For full spec compliance, you may wish to configure your
|
|
110
|
-
// minifier not to mangle the names of these two functions.
|
|
111
142
|
function Generator() {}
|
|
143
|
+
|
|
112
144
|
function GeneratorFunction() {}
|
|
145
|
+
|
|
113
146
|
function GeneratorFunctionPrototype() {}
|
|
114
147
|
|
|
115
|
-
// This is a polyfill for %IteratorPrototype% for environments that
|
|
116
|
-
// don't natively support it.
|
|
117
148
|
var IteratorPrototype = {};
|
|
118
149
|
define(IteratorPrototype, iteratorSymbol, function () {
|
|
119
150
|
return this;
|
|
120
151
|
});
|
|
152
|
+
var getProto = Object.getPrototypeOf,
|
|
153
|
+
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
154
|
+
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
155
|
+
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
121
156
|
|
|
122
|
-
var getProto = Object.getPrototypeOf;
|
|
123
|
-
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
124
|
-
if (NativeIteratorPrototype &&
|
|
125
|
-
NativeIteratorPrototype !== Op &&
|
|
126
|
-
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
|
127
|
-
// This environment has a native %IteratorPrototype%; use it instead
|
|
128
|
-
// of the polyfill.
|
|
129
|
-
IteratorPrototype = NativeIteratorPrototype;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
var Gp = GeneratorFunctionPrototype.prototype =
|
|
133
|
-
Generator.prototype = Object.create(IteratorPrototype);
|
|
134
|
-
GeneratorFunction.prototype = GeneratorFunctionPrototype;
|
|
135
|
-
define(Gp, "constructor", GeneratorFunctionPrototype);
|
|
136
|
-
define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
|
|
137
|
-
GeneratorFunction.displayName = define(
|
|
138
|
-
GeneratorFunctionPrototype,
|
|
139
|
-
toStringTagSymbol,
|
|
140
|
-
"GeneratorFunction"
|
|
141
|
-
);
|
|
142
|
-
|
|
143
|
-
// Helper for defining the .next, .throw, and .return methods of the
|
|
144
|
-
// Iterator interface in terms of a single ._invoke method.
|
|
145
157
|
function defineIteratorMethods(prototype) {
|
|
146
|
-
["next", "throw", "return"].forEach(function(method) {
|
|
147
|
-
define(prototype, method, function(arg) {
|
|
158
|
+
["next", "throw", "return"].forEach(function (method) {
|
|
159
|
+
define(prototype, method, function (arg) {
|
|
148
160
|
return this._invoke(method, arg);
|
|
149
161
|
});
|
|
150
162
|
});
|
|
151
163
|
}
|
|
152
164
|
|
|
153
|
-
exports.isGeneratorFunction = function(genFun) {
|
|
154
|
-
var ctor = typeof genFun === "function" && genFun.constructor;
|
|
155
|
-
return ctor
|
|
156
|
-
? ctor === GeneratorFunction ||
|
|
157
|
-
// For the native GeneratorFunction constructor, the best we can
|
|
158
|
-
// do is to check its .name property.
|
|
159
|
-
(ctor.displayName || ctor.name) === "GeneratorFunction"
|
|
160
|
-
: false;
|
|
161
|
-
};
|
|
162
|
-
|
|
163
|
-
exports.mark = function(genFun) {
|
|
164
|
-
if (Object.setPrototypeOf) {
|
|
165
|
-
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
|
166
|
-
} else {
|
|
167
|
-
genFun.__proto__ = GeneratorFunctionPrototype;
|
|
168
|
-
define(genFun, toStringTagSymbol, "GeneratorFunction");
|
|
169
|
-
}
|
|
170
|
-
genFun.prototype = Object.create(Gp);
|
|
171
|
-
return genFun;
|
|
172
|
-
};
|
|
173
|
-
|
|
174
|
-
// Within the body of any async function, `await x` is transformed to
|
|
175
|
-
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
|
176
|
-
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
|
177
|
-
// meant to be awaited.
|
|
178
|
-
exports.awrap = function(arg) {
|
|
179
|
-
return { __await: arg };
|
|
180
|
-
};
|
|
181
|
-
|
|
182
165
|
function AsyncIterator(generator, PromiseImpl) {
|
|
183
166
|
function invoke(method, arg, resolve, reject) {
|
|
184
167
|
var record = tryCatch(generator[method], generator, arg);
|
|
185
|
-
if (record.type === "throw") {
|
|
186
|
-
reject(record.arg);
|
|
187
|
-
} else {
|
|
188
|
-
var result = record.arg;
|
|
189
|
-
var value = result.value;
|
|
190
|
-
if (value &&
|
|
191
|
-
typeof value === "object" &&
|
|
192
|
-
hasOwn.call(value, "__await")) {
|
|
193
|
-
return PromiseImpl.resolve(value.__await).then(function(value) {
|
|
194
|
-
invoke("next", value, resolve, reject);
|
|
195
|
-
}, function(err) {
|
|
196
|
-
invoke("throw", err, resolve, reject);
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
168
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
169
|
+
if ("throw" !== record.type) {
|
|
170
|
+
var result = record.arg,
|
|
171
|
+
value = result.value;
|
|
172
|
+
return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
173
|
+
invoke("next", value, resolve, reject);
|
|
174
|
+
}, function (err) {
|
|
175
|
+
invoke("throw", err, resolve, reject);
|
|
176
|
+
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
177
|
+
result.value = unwrapped, resolve(result);
|
|
178
|
+
}, function (error) {
|
|
209
179
|
return invoke("throw", error, resolve, reject);
|
|
210
180
|
});
|
|
211
181
|
}
|
|
182
|
+
|
|
183
|
+
reject(record.arg);
|
|
212
184
|
}
|
|
213
185
|
|
|
214
186
|
var previousPromise;
|
|
215
187
|
|
|
216
|
-
function
|
|
188
|
+
this._invoke = function (method, arg) {
|
|
217
189
|
function callInvokeWithMethodAndArg() {
|
|
218
|
-
return new PromiseImpl(function(resolve, reject) {
|
|
190
|
+
return new PromiseImpl(function (resolve, reject) {
|
|
219
191
|
invoke(method, arg, resolve, reject);
|
|
220
192
|
});
|
|
221
193
|
}
|
|
222
194
|
|
|
223
|
-
return previousPromise =
|
|
224
|
-
// If enqueue has been called before, then we want to wait until
|
|
225
|
-
// all previous Promises have been resolved before calling invoke,
|
|
226
|
-
// so that results are always delivered in the correct order. If
|
|
227
|
-
// enqueue has not been called before, then it is important to
|
|
228
|
-
// call invoke immediately, without waiting on a callback to fire,
|
|
229
|
-
// so that the async generator function has the opportunity to do
|
|
230
|
-
// any necessary setup in a predictable way. This predictability
|
|
231
|
-
// is why the Promise constructor synchronously invokes its
|
|
232
|
-
// executor callback, and why async functions synchronously
|
|
233
|
-
// execute code before the first await. Since we implement simple
|
|
234
|
-
// async functions in terms of async generators, it is especially
|
|
235
|
-
// important to get this right, even though it requires care.
|
|
236
|
-
previousPromise ? previousPromise.then(
|
|
237
|
-
callInvokeWithMethodAndArg,
|
|
238
|
-
// Avoid propagating failures to Promises returned by later
|
|
239
|
-
// invocations of the iterator.
|
|
240
|
-
callInvokeWithMethodAndArg
|
|
241
|
-
) : callInvokeWithMethodAndArg();
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
// Define the unified helper method that is used to implement .next,
|
|
245
|
-
// .throw, and .return (see defineIteratorMethods).
|
|
246
|
-
this._invoke = enqueue;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
defineIteratorMethods(AsyncIterator.prototype);
|
|
250
|
-
define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
251
|
-
return this;
|
|
252
|
-
});
|
|
253
|
-
exports.AsyncIterator = AsyncIterator;
|
|
254
|
-
|
|
255
|
-
// Note that simple async functions are implemented on top of
|
|
256
|
-
// AsyncIterator objects; they just return a Promise for the value of
|
|
257
|
-
// the final result produced by the iterator.
|
|
258
|
-
exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
259
|
-
if (PromiseImpl === void 0) PromiseImpl = Promise;
|
|
260
|
-
|
|
261
|
-
var iter = new AsyncIterator(
|
|
262
|
-
wrap(innerFn, outerFn, self, tryLocsList),
|
|
263
|
-
PromiseImpl
|
|
264
|
-
);
|
|
265
|
-
|
|
266
|
-
return exports.isGeneratorFunction(outerFn)
|
|
267
|
-
? iter // If outerFn is a generator, return the full iterator.
|
|
268
|
-
: iter.next().then(function(result) {
|
|
269
|
-
return result.done ? result.value : iter.next();
|
|
270
|
-
});
|
|
271
|
-
};
|
|
272
|
-
|
|
273
|
-
function makeInvokeMethod(innerFn, self, context) {
|
|
274
|
-
var state = GenStateSuspendedStart;
|
|
275
|
-
|
|
276
|
-
return function invoke(method, arg) {
|
|
277
|
-
if (state === GenStateExecuting) {
|
|
278
|
-
throw new Error("Generator is already running");
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
if (state === GenStateCompleted) {
|
|
282
|
-
if (method === "throw") {
|
|
283
|
-
throw arg;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
// Be forgiving, per 25.3.3.3.3 of the spec:
|
|
287
|
-
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
|
288
|
-
return doneResult();
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
context.method = method;
|
|
292
|
-
context.arg = arg;
|
|
293
|
-
|
|
294
|
-
while (true) {
|
|
295
|
-
var delegate = context.delegate;
|
|
296
|
-
if (delegate) {
|
|
297
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
298
|
-
if (delegateResult) {
|
|
299
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
300
|
-
return delegateResult;
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
if (context.method === "next") {
|
|
305
|
-
// Setting context._sent for legacy support of Babel's
|
|
306
|
-
// function.sent implementation.
|
|
307
|
-
context.sent = context._sent = context.arg;
|
|
308
|
-
|
|
309
|
-
} else if (context.method === "throw") {
|
|
310
|
-
if (state === GenStateSuspendedStart) {
|
|
311
|
-
state = GenStateCompleted;
|
|
312
|
-
throw context.arg;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
context.dispatchException(context.arg);
|
|
316
|
-
|
|
317
|
-
} else if (context.method === "return") {
|
|
318
|
-
context.abrupt("return", context.arg);
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
state = GenStateExecuting;
|
|
322
|
-
|
|
323
|
-
var record = tryCatch(innerFn, self, context);
|
|
324
|
-
if (record.type === "normal") {
|
|
325
|
-
// If an exception is thrown from innerFn, we leave state ===
|
|
326
|
-
// GenStateExecuting and loop back for another invocation.
|
|
327
|
-
state = context.done
|
|
328
|
-
? GenStateCompleted
|
|
329
|
-
: GenStateSuspendedYield;
|
|
330
|
-
|
|
331
|
-
if (record.arg === ContinueSentinel) {
|
|
332
|
-
continue;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
return {
|
|
336
|
-
value: record.arg,
|
|
337
|
-
done: context.done
|
|
338
|
-
};
|
|
339
|
-
|
|
340
|
-
} else if (record.type === "throw") {
|
|
341
|
-
state = GenStateCompleted;
|
|
342
|
-
// Dispatch the exception by looping back around to the
|
|
343
|
-
// context.dispatchException(context.arg) call above.
|
|
344
|
-
context.method = "throw";
|
|
345
|
-
context.arg = record.arg;
|
|
346
|
-
}
|
|
347
|
-
}
|
|
195
|
+
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
348
196
|
};
|
|
349
197
|
}
|
|
350
198
|
|
|
351
|
-
// Call delegate.iterator[context.method](context.arg) and handle the
|
|
352
|
-
// result, either by returning a { value, done } result from the
|
|
353
|
-
// delegate iterator, or by modifying context.method and context.arg,
|
|
354
|
-
// setting context.delegate to null, and returning the ContinueSentinel.
|
|
355
199
|
function maybeInvokeDelegate(delegate, context) {
|
|
356
200
|
var method = delegate.iterator[context.method];
|
|
357
|
-
if (method === undefined$1) {
|
|
358
|
-
// A .throw or .return when the delegate iterator has no .throw
|
|
359
|
-
// method always terminates the yield* loop.
|
|
360
|
-
context.delegate = null;
|
|
361
|
-
|
|
362
|
-
if (context.method === "throw") {
|
|
363
|
-
// Note: ["return"] must be used for ES3 parsing compatibility.
|
|
364
|
-
if (delegate.iterator["return"]) {
|
|
365
|
-
// If the delegate iterator has a return method, give it a
|
|
366
|
-
// chance to clean up.
|
|
367
|
-
context.method = "return";
|
|
368
|
-
context.arg = undefined$1;
|
|
369
|
-
maybeInvokeDelegate(delegate, context);
|
|
370
|
-
|
|
371
|
-
if (context.method === "throw") {
|
|
372
|
-
// If maybeInvokeDelegate(context) changed context.method from
|
|
373
|
-
// "return" to "throw", let that override the TypeError below.
|
|
374
|
-
return ContinueSentinel;
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
201
|
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
202
|
+
if (undefined === method) {
|
|
203
|
+
if (context.delegate = null, "throw" === context.method) {
|
|
204
|
+
if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
|
|
205
|
+
context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
|
|
381
206
|
}
|
|
382
207
|
|
|
383
208
|
return ContinueSentinel;
|
|
384
209
|
}
|
|
385
210
|
|
|
386
211
|
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
387
|
-
|
|
388
|
-
if (record.type === "throw") {
|
|
389
|
-
context.method = "throw";
|
|
390
|
-
context.arg = record.arg;
|
|
391
|
-
context.delegate = null;
|
|
392
|
-
return ContinueSentinel;
|
|
393
|
-
}
|
|
394
|
-
|
|
212
|
+
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
395
213
|
var info = record.arg;
|
|
396
|
-
|
|
397
|
-
if (! info) {
|
|
398
|
-
context.method = "throw";
|
|
399
|
-
context.arg = new TypeError("iterator result is not an object");
|
|
400
|
-
context.delegate = null;
|
|
401
|
-
return ContinueSentinel;
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
if (info.done) {
|
|
405
|
-
// Assign the result of the finished delegate to the temporary
|
|
406
|
-
// variable specified by delegate.resultName (see delegateYield).
|
|
407
|
-
context[delegate.resultName] = info.value;
|
|
408
|
-
|
|
409
|
-
// Resume execution at the desired location (see delegateYield).
|
|
410
|
-
context.next = delegate.nextLoc;
|
|
411
|
-
|
|
412
|
-
// If context.method was "throw" but the delegate handled the
|
|
413
|
-
// exception, let the outer generator proceed normally. If
|
|
414
|
-
// context.method was "next", forget context.arg since it has been
|
|
415
|
-
// "consumed" by the delegate iterator. If context.method was
|
|
416
|
-
// "return", allow the original .return call to continue in the
|
|
417
|
-
// outer generator.
|
|
418
|
-
if (context.method !== "return") {
|
|
419
|
-
context.method = "next";
|
|
420
|
-
context.arg = undefined$1;
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
} else {
|
|
424
|
-
// Re-yield the result returned by the delegate method.
|
|
425
|
-
return info;
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
// The delegate iterator is finished, so forget it and continue with
|
|
429
|
-
// the outer generator.
|
|
430
|
-
context.delegate = null;
|
|
431
|
-
return ContinueSentinel;
|
|
214
|
+
return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
|
|
432
215
|
}
|
|
433
216
|
|
|
434
|
-
// Define Generator.prototype.{next,throw,return} in terms of the
|
|
435
|
-
// unified ._invoke helper method.
|
|
436
|
-
defineIteratorMethods(Gp);
|
|
437
|
-
|
|
438
|
-
define(Gp, toStringTagSymbol, "Generator");
|
|
439
|
-
|
|
440
|
-
// A Generator should always return itself as the iterator object when the
|
|
441
|
-
// @@iterator function is called on it. Some browsers' implementations of the
|
|
442
|
-
// iterator prototype chain incorrectly implement this, causing the Generator
|
|
443
|
-
// object to not be returned from this call. This ensures that doesn't happen.
|
|
444
|
-
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
445
|
-
define(Gp, iteratorSymbol, function() {
|
|
446
|
-
return this;
|
|
447
|
-
});
|
|
448
|
-
|
|
449
|
-
define(Gp, "toString", function() {
|
|
450
|
-
return "[object Generator]";
|
|
451
|
-
});
|
|
452
|
-
|
|
453
217
|
function pushTryEntry(locs) {
|
|
454
|
-
var entry = {
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
if (2 in locs) {
|
|
461
|
-
entry.finallyLoc = locs[2];
|
|
462
|
-
entry.afterLoc = locs[3];
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
this.tryEntries.push(entry);
|
|
218
|
+
var entry = {
|
|
219
|
+
tryLoc: locs[0]
|
|
220
|
+
};
|
|
221
|
+
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
466
222
|
}
|
|
467
223
|
|
|
468
224
|
function resetTryEntry(entry) {
|
|
469
225
|
var record = entry.completion || {};
|
|
470
|
-
record.type = "normal";
|
|
471
|
-
delete record.arg;
|
|
472
|
-
entry.completion = record;
|
|
226
|
+
record.type = "normal", delete record.arg, entry.completion = record;
|
|
473
227
|
}
|
|
474
228
|
|
|
475
229
|
function Context(tryLocsList) {
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
this.tryEntries = [{ tryLoc: "root" }];
|
|
480
|
-
tryLocsList.forEach(pushTryEntry, this);
|
|
481
|
-
this.reset(true);
|
|
230
|
+
this.tryEntries = [{
|
|
231
|
+
tryLoc: "root"
|
|
232
|
+
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
|
482
233
|
}
|
|
483
234
|
|
|
484
|
-
exports.keys = function(object) {
|
|
485
|
-
var keys = [];
|
|
486
|
-
for (var key in object) {
|
|
487
|
-
keys.push(key);
|
|
488
|
-
}
|
|
489
|
-
keys.reverse();
|
|
490
|
-
|
|
491
|
-
// Rather than returning an object with a next method, we keep
|
|
492
|
-
// things simple and return the next function itself.
|
|
493
|
-
return function next() {
|
|
494
|
-
while (keys.length) {
|
|
495
|
-
var key = keys.pop();
|
|
496
|
-
if (key in object) {
|
|
497
|
-
next.value = key;
|
|
498
|
-
next.done = false;
|
|
499
|
-
return next;
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
// To avoid creating an additional object, we just hang the .value
|
|
504
|
-
// and .done properties off the next function object itself. This
|
|
505
|
-
// also ensures that the minifier will not anonymize the function.
|
|
506
|
-
next.done = true;
|
|
507
|
-
return next;
|
|
508
|
-
};
|
|
509
|
-
};
|
|
510
|
-
|
|
511
235
|
function values(iterable) {
|
|
512
236
|
if (iterable) {
|
|
513
237
|
var iteratorMethod = iterable[iteratorSymbol];
|
|
514
|
-
if (iteratorMethod)
|
|
515
|
-
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
if (typeof iterable.next === "function") {
|
|
519
|
-
return iterable;
|
|
520
|
-
}
|
|
238
|
+
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
239
|
+
if ("function" == typeof iterable.next) return iterable;
|
|
521
240
|
|
|
522
241
|
if (!isNaN(iterable.length)) {
|
|
523
|
-
var i = -1,
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
next.done = false;
|
|
528
|
-
return next;
|
|
529
|
-
}
|
|
242
|
+
var i = -1,
|
|
243
|
+
next = function next() {
|
|
244
|
+
for (; ++i < iterable.length;) {
|
|
245
|
+
if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
|
530
246
|
}
|
|
531
247
|
|
|
532
|
-
next.value = undefined
|
|
533
|
-
next.done = true;
|
|
534
|
-
|
|
535
|
-
return next;
|
|
248
|
+
return next.value = undefined, next.done = !0, next;
|
|
536
249
|
};
|
|
537
250
|
|
|
538
251
|
return next.next = next;
|
|
539
252
|
}
|
|
540
253
|
}
|
|
541
254
|
|
|
542
|
-
|
|
543
|
-
|
|
255
|
+
return {
|
|
256
|
+
next: doneResult
|
|
257
|
+
};
|
|
544
258
|
}
|
|
545
|
-
exports.values = values;
|
|
546
259
|
|
|
547
260
|
function doneResult() {
|
|
548
|
-
return {
|
|
261
|
+
return {
|
|
262
|
+
value: undefined,
|
|
263
|
+
done: !0
|
|
264
|
+
};
|
|
549
265
|
}
|
|
550
266
|
|
|
551
|
-
|
|
552
|
-
constructor
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
this[name] = undefined$1;
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
},
|
|
267
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
268
|
+
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
269
|
+
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
270
|
+
}, exports.mark = function (genFun) {
|
|
271
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
|
272
|
+
}, exports.awrap = function (arg) {
|
|
273
|
+
return {
|
|
274
|
+
__await: arg
|
|
275
|
+
};
|
|
276
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
277
|
+
return this;
|
|
278
|
+
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
279
|
+
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
|
280
|
+
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
281
|
+
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
|
282
|
+
return result.done ? result.value : iter.next();
|
|
283
|
+
});
|
|
284
|
+
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
285
|
+
return this;
|
|
286
|
+
}), define(Gp, "toString", function () {
|
|
287
|
+
return "[object Generator]";
|
|
288
|
+
}), exports.keys = function (object) {
|
|
289
|
+
var keys = [];
|
|
579
290
|
|
|
580
|
-
|
|
581
|
-
|
|
291
|
+
for (var key in object) {
|
|
292
|
+
keys.push(key);
|
|
293
|
+
}
|
|
582
294
|
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
295
|
+
return keys.reverse(), function next() {
|
|
296
|
+
for (; keys.length;) {
|
|
297
|
+
var key = keys.pop();
|
|
298
|
+
if (key in object) return next.value = key, next.done = !1, next;
|
|
587
299
|
}
|
|
588
300
|
|
|
301
|
+
return next.done = !0, next;
|
|
302
|
+
};
|
|
303
|
+
}, exports.values = values, Context.prototype = {
|
|
304
|
+
constructor: Context,
|
|
305
|
+
reset: function reset(skipTempReset) {
|
|
306
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {
|
|
307
|
+
"t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
stop: function stop() {
|
|
311
|
+
this.done = !0;
|
|
312
|
+
var rootRecord = this.tryEntries[0].completion;
|
|
313
|
+
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
589
314
|
return this.rval;
|
|
590
315
|
},
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
if (this.done) {
|
|
594
|
-
throw exception;
|
|
595
|
-
}
|
|
596
|
-
|
|
316
|
+
dispatchException: function dispatchException(exception) {
|
|
317
|
+
if (this.done) throw exception;
|
|
597
318
|
var context = this;
|
|
598
|
-
function handle(loc, caught) {
|
|
599
|
-
record.type = "throw";
|
|
600
|
-
record.arg = exception;
|
|
601
|
-
context.next = loc;
|
|
602
|
-
|
|
603
|
-
if (caught) {
|
|
604
|
-
// If the dispatched exception was caught by a catch block,
|
|
605
|
-
// then let that catch block handle the exception normally.
|
|
606
|
-
context.method = "next";
|
|
607
|
-
context.arg = undefined$1;
|
|
608
|
-
}
|
|
609
319
|
|
|
610
|
-
|
|
320
|
+
function handle(loc, caught) {
|
|
321
|
+
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
611
322
|
}
|
|
612
323
|
|
|
613
324
|
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
614
|
-
var entry = this.tryEntries[i]
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
if (entry.tryLoc === "root") {
|
|
618
|
-
// Exception thrown outside of any try block that could handle
|
|
619
|
-
// it, so set the completion value of the entire function to
|
|
620
|
-
// throw the exception.
|
|
621
|
-
return handle("end");
|
|
622
|
-
}
|
|
325
|
+
var entry = this.tryEntries[i],
|
|
326
|
+
record = entry.completion;
|
|
327
|
+
if ("root" === entry.tryLoc) return handle("end");
|
|
623
328
|
|
|
624
329
|
if (entry.tryLoc <= this.prev) {
|
|
625
|
-
var hasCatch = hasOwn.call(entry, "catchLoc")
|
|
626
|
-
|
|
330
|
+
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
|
331
|
+
hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
627
332
|
|
|
628
333
|
if (hasCatch && hasFinally) {
|
|
629
|
-
if (this.prev < entry.catchLoc)
|
|
630
|
-
|
|
631
|
-
} else if (this.prev < entry.finallyLoc) {
|
|
632
|
-
return handle(entry.finallyLoc);
|
|
633
|
-
}
|
|
634
|
-
|
|
334
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
335
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
635
336
|
} else if (hasCatch) {
|
|
636
|
-
if (this.prev < entry.catchLoc)
|
|
637
|
-
return handle(entry.catchLoc, true);
|
|
638
|
-
}
|
|
639
|
-
|
|
640
|
-
} else if (hasFinally) {
|
|
641
|
-
if (this.prev < entry.finallyLoc) {
|
|
642
|
-
return handle(entry.finallyLoc);
|
|
643
|
-
}
|
|
644
|
-
|
|
337
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
645
338
|
} else {
|
|
646
|
-
throw new Error("try statement without catch or finally");
|
|
339
|
+
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
340
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
647
341
|
}
|
|
648
342
|
}
|
|
649
343
|
}
|
|
650
344
|
},
|
|
651
|
-
|
|
652
|
-
abrupt: function(type, arg) {
|
|
345
|
+
abrupt: function abrupt(type, arg) {
|
|
653
346
|
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
654
347
|
var entry = this.tryEntries[i];
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
this.prev < entry.finallyLoc) {
|
|
348
|
+
|
|
349
|
+
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
658
350
|
var finallyEntry = entry;
|
|
659
351
|
break;
|
|
660
352
|
}
|
|
661
353
|
}
|
|
662
354
|
|
|
663
|
-
|
|
664
|
-
(type === "break" ||
|
|
665
|
-
type === "continue") &&
|
|
666
|
-
finallyEntry.tryLoc <= arg &&
|
|
667
|
-
arg <= finallyEntry.finallyLoc) {
|
|
668
|
-
// Ignore the finally entry if control is not jumping to a
|
|
669
|
-
// location outside the try/catch block.
|
|
670
|
-
finallyEntry = null;
|
|
671
|
-
}
|
|
672
|
-
|
|
355
|
+
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
|
673
356
|
var record = finallyEntry ? finallyEntry.completion : {};
|
|
674
|
-
record.type = type;
|
|
675
|
-
record.arg = arg;
|
|
676
|
-
|
|
677
|
-
if (finallyEntry) {
|
|
678
|
-
this.method = "next";
|
|
679
|
-
this.next = finallyEntry.finallyLoc;
|
|
680
|
-
return ContinueSentinel;
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
return this.complete(record);
|
|
357
|
+
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
684
358
|
},
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
throw record.arg;
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
if (record.type === "break" ||
|
|
692
|
-
record.type === "continue") {
|
|
693
|
-
this.next = record.arg;
|
|
694
|
-
} else if (record.type === "return") {
|
|
695
|
-
this.rval = this.arg = record.arg;
|
|
696
|
-
this.method = "return";
|
|
697
|
-
this.next = "end";
|
|
698
|
-
} else if (record.type === "normal" && afterLoc) {
|
|
699
|
-
this.next = afterLoc;
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
return ContinueSentinel;
|
|
359
|
+
complete: function complete(record, afterLoc) {
|
|
360
|
+
if ("throw" === record.type) throw record.arg;
|
|
361
|
+
return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
|
|
703
362
|
},
|
|
704
|
-
|
|
705
|
-
finish: function(finallyLoc) {
|
|
363
|
+
finish: function finish(finallyLoc) {
|
|
706
364
|
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
707
365
|
var entry = this.tryEntries[i];
|
|
708
|
-
if (entry.finallyLoc === finallyLoc)
|
|
709
|
-
this.complete(entry.completion, entry.afterLoc);
|
|
710
|
-
resetTryEntry(entry);
|
|
711
|
-
return ContinueSentinel;
|
|
712
|
-
}
|
|
366
|
+
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
713
367
|
}
|
|
714
368
|
},
|
|
715
|
-
|
|
716
|
-
"catch": function(tryLoc) {
|
|
369
|
+
"catch": function _catch(tryLoc) {
|
|
717
370
|
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
718
371
|
var entry = this.tryEntries[i];
|
|
372
|
+
|
|
719
373
|
if (entry.tryLoc === tryLoc) {
|
|
720
374
|
var record = entry.completion;
|
|
721
|
-
|
|
375
|
+
|
|
376
|
+
if ("throw" === record.type) {
|
|
722
377
|
var thrown = record.arg;
|
|
723
378
|
resetTryEntry(entry);
|
|
724
379
|
}
|
|
380
|
+
|
|
725
381
|
return thrown;
|
|
726
382
|
}
|
|
727
383
|
}
|
|
728
384
|
|
|
729
|
-
// The context.catch method must only be called with a location
|
|
730
|
-
// argument that corresponds to a known catch block.
|
|
731
385
|
throw new Error("illegal catch attempt");
|
|
732
386
|
},
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
this.delegate = {
|
|
387
|
+
delegateYield: function delegateYield(iterable, resultName, nextLoc) {
|
|
388
|
+
return this.delegate = {
|
|
736
389
|
iterator: values(iterable),
|
|
737
390
|
resultName: resultName,
|
|
738
391
|
nextLoc: nextLoc
|
|
739
|
-
};
|
|
392
|
+
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
|
393
|
+
}
|
|
394
|
+
}, exports;
|
|
395
|
+
}
|
|
740
396
|
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
// accidentally pass it on to the delegate.
|
|
744
|
-
this.arg = undefined$1;
|
|
745
|
-
}
|
|
397
|
+
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
398
|
+
});
|
|
746
399
|
|
|
747
|
-
|
|
748
|
-
}
|
|
749
|
-
};
|
|
400
|
+
_commonjsHelpers.unwrapExports(regeneratorRuntime$1);
|
|
750
401
|
|
|
751
|
-
|
|
752
|
-
// or not, return the runtime object so that we can declare the variable
|
|
753
|
-
// regeneratorRuntime in the outer scope, which allows this module to be
|
|
754
|
-
// injected easily by `bin/regenerator --include-runtime script.js`.
|
|
755
|
-
return exports;
|
|
402
|
+
// TODO(Babel 8): Remove this file.
|
|
756
403
|
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
// as the regeneratorRuntime namespace. Otherwise create a new empty
|
|
760
|
-
// object. Either way, the resulting object will be used to initialize
|
|
761
|
-
// the regeneratorRuntime variable at the top of this file.
|
|
762
|
-
module.exports
|
|
763
|
-
));
|
|
404
|
+
var runtime = regeneratorRuntime$1();
|
|
405
|
+
var regenerator = runtime;
|
|
764
406
|
|
|
407
|
+
// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
|
|
765
408
|
try {
|
|
766
409
|
regeneratorRuntime = runtime;
|
|
767
410
|
} catch (accidentalStrictMode) {
|
|
768
|
-
// This module should not be running in strict mode, so the above
|
|
769
|
-
// assignment should always work unless something is misconfigured. Just
|
|
770
|
-
// in case runtime.js accidentally runs in strict mode, in modern engines
|
|
771
|
-
// we can explicitly access globalThis. In older engines we can escape
|
|
772
|
-
// strict mode using a global Function call. This could conceivably fail
|
|
773
|
-
// if a Content Security Policy forbids using Function, but in that case
|
|
774
|
-
// the proper solution is to fix the accidental strict mode problem. If
|
|
775
|
-
// you've misconfigured your bundler to force strict mode and applied a
|
|
776
|
-
// CSP to forbid Function, and you're not willing to fix either of those
|
|
777
|
-
// problems, please detail your unique predicament in a GitHub issue.
|
|
778
411
|
if (typeof globalThis === "object") {
|
|
779
412
|
globalThis.regeneratorRuntime = runtime;
|
|
780
413
|
} else {
|
|
781
414
|
Function("r", "regeneratorRuntime = r")(runtime);
|
|
782
415
|
}
|
|
783
416
|
}
|
|
784
|
-
});
|
|
785
|
-
|
|
786
|
-
var regenerator = runtime_1;
|
|
787
417
|
|
|
788
418
|
var arrayWithHoles = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
789
419
|
function _arrayWithHoles(arr) {
|
|
790
420
|
if (Array.isArray(arr)) return arr;
|
|
791
421
|
}
|
|
792
422
|
|
|
793
|
-
module.exports = _arrayWithHoles;
|
|
794
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
423
|
+
module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
795
424
|
});
|
|
796
425
|
|
|
797
426
|
_commonjsHelpers.unwrapExports(arrayWithHoles);
|
|
@@ -827,8 +456,7 @@ function _iterableToArrayLimit(arr, i) {
|
|
|
827
456
|
return _arr;
|
|
828
457
|
}
|
|
829
458
|
|
|
830
|
-
module.exports = _iterableToArrayLimit;
|
|
831
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
459
|
+
module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
832
460
|
});
|
|
833
461
|
|
|
834
462
|
_commonjsHelpers.unwrapExports(iterableToArrayLimit);
|
|
@@ -844,8 +472,7 @@ function _arrayLikeToArray(arr, len) {
|
|
|
844
472
|
return arr2;
|
|
845
473
|
}
|
|
846
474
|
|
|
847
|
-
module.exports = _arrayLikeToArray;
|
|
848
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
475
|
+
module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
849
476
|
});
|
|
850
477
|
|
|
851
478
|
_commonjsHelpers.unwrapExports(arrayLikeToArray);
|
|
@@ -860,8 +487,7 @@ function _unsupportedIterableToArray(o, minLen) {
|
|
|
860
487
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
|
|
861
488
|
}
|
|
862
489
|
|
|
863
|
-
module.exports = _unsupportedIterableToArray;
|
|
864
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
490
|
+
module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
865
491
|
});
|
|
866
492
|
|
|
867
493
|
_commonjsHelpers.unwrapExports(unsupportedIterableToArray);
|
|
@@ -871,8 +497,7 @@ function _nonIterableRest() {
|
|
|
871
497
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
872
498
|
}
|
|
873
499
|
|
|
874
|
-
module.exports = _nonIterableRest;
|
|
875
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
500
|
+
module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
876
501
|
});
|
|
877
502
|
|
|
878
503
|
_commonjsHelpers.unwrapExports(nonIterableRest);
|
|
@@ -882,8 +507,7 @@ function _slicedToArray(arr, i) {
|
|
|
882
507
|
return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
|
|
883
508
|
}
|
|
884
509
|
|
|
885
|
-
module.exports = _slicedToArray;
|
|
886
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
510
|
+
module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
887
511
|
});
|
|
888
512
|
|
|
889
513
|
_commonjsHelpers.unwrapExports(slicedToArray);
|
|
@@ -1041,7 +665,7 @@ var _parseUrl = interopRequireDefault(parseUrl_1);
|
|
|
1041
665
|
|
|
1042
666
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
1043
667
|
|
|
1044
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null ||
|
|
668
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof_1(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
1045
669
|
|
|
1046
670
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
1047
671
|
|
|
@@ -1077,26 +701,26 @@ if (typeof window !== "undefined" && !__NEXTAUTH._eventListenersAdded) {
|
|
|
1077
701
|
}, false);
|
|
1078
702
|
}
|
|
1079
703
|
|
|
1080
|
-
var SessionContext = (0, React__default[
|
|
704
|
+
var SessionContext = (0, React__default["default"].createContext)();
|
|
1081
705
|
|
|
1082
706
|
function useSession(session) {
|
|
1083
|
-
var context = (0, React__default[
|
|
707
|
+
var context = (0, React__default["default"].useContext)(SessionContext);
|
|
1084
708
|
if (context) return context;
|
|
1085
709
|
return _useSessionHook(session);
|
|
1086
710
|
}
|
|
1087
711
|
|
|
1088
712
|
function _useSessionHook(session) {
|
|
1089
|
-
var _useState = (0, React__default[
|
|
713
|
+
var _useState = (0, React__default["default"].useState)(session),
|
|
1090
714
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
1091
715
|
data = _useState2[0],
|
|
1092
716
|
setData = _useState2[1];
|
|
1093
717
|
|
|
1094
|
-
var _useState3 = (0, React__default[
|
|
718
|
+
var _useState3 = (0, React__default["default"].useState)(!data),
|
|
1095
719
|
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
1096
720
|
loading = _useState4[0],
|
|
1097
721
|
setLoading = _useState4[1];
|
|
1098
722
|
|
|
1099
|
-
(0, React__default[
|
|
723
|
+
(0, React__default["default"].useEffect)(function () {
|
|
1100
724
|
__NEXTAUTH._getSession = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee() {
|
|
1101
725
|
var _ref2,
|
|
1102
726
|
_ref2$event,
|
|
@@ -1592,7 +1216,7 @@ function Provider(_ref5) {
|
|
|
1592
1216
|
session = _ref5.session,
|
|
1593
1217
|
options = _ref5.options;
|
|
1594
1218
|
setOptions(options);
|
|
1595
|
-
return (0, React__default[
|
|
1219
|
+
return (0, React__default["default"].createElement)(SessionContext.Provider, {
|
|
1596
1220
|
value: useSession(session)
|
|
1597
1221
|
}, children);
|
|
1598
1222
|
}
|
|
@@ -1813,7 +1437,7 @@ var AuthWrapper = function AuthWrapper(_ref) {
|
|
|
1813
1437
|
}, []);
|
|
1814
1438
|
|
|
1815
1439
|
if (session || !needAuth) {
|
|
1816
|
-
return React__default[
|
|
1440
|
+
return React__default["default"].createElement(
|
|
1817
1441
|
'div',
|
|
1818
1442
|
null,
|
|
1819
1443
|
children
|
|
@@ -1821,44 +1445,44 @@ var AuthWrapper = function AuthWrapper(_ref) {
|
|
|
1821
1445
|
}
|
|
1822
1446
|
|
|
1823
1447
|
if (!loading) {
|
|
1824
|
-
return React__default[
|
|
1448
|
+
return React__default["default"].createElement(
|
|
1825
1449
|
'div',
|
|
1826
1450
|
{ style: { position: 'relative', minHeight: '300px', paddingTop: '2rem' } },
|
|
1827
|
-
callbackUrl && React__default[
|
|
1451
|
+
callbackUrl && React__default["default"].createElement(
|
|
1828
1452
|
'div',
|
|
1829
1453
|
null,
|
|
1830
|
-
!showForm && React__default[
|
|
1454
|
+
!showForm && React__default["default"].createElement(
|
|
1831
1455
|
'div',
|
|
1832
1456
|
{ className: styles.loginBox },
|
|
1833
|
-
React__default[
|
|
1457
|
+
React__default["default"].createElement(
|
|
1834
1458
|
'div',
|
|
1835
1459
|
{ className: styles.loginBox_title },
|
|
1836
|
-
React__default[
|
|
1460
|
+
React__default["default"].createElement(
|
|
1837
1461
|
'b',
|
|
1838
1462
|
null,
|
|
1839
1463
|
'Please log in to view this content.'
|
|
1840
1464
|
)
|
|
1841
1465
|
),
|
|
1842
|
-
React__default[
|
|
1466
|
+
React__default["default"].createElement(
|
|
1843
1467
|
reactBootstrap.Form,
|
|
1844
1468
|
{ onSubmit: function onSubmit(e) {
|
|
1845
1469
|
return e.preventDefault();
|
|
1846
1470
|
} },
|
|
1847
|
-
React__default[
|
|
1471
|
+
React__default["default"].createElement(
|
|
1848
1472
|
reactBootstrap.Form.Group,
|
|
1849
1473
|
{ controlId: 'email' },
|
|
1850
|
-
React__default[
|
|
1474
|
+
React__default["default"].createElement(reactBootstrap.Form.Control, { type: 'email', onChange: function onChange(e) {
|
|
1851
1475
|
return setEmail(e.target.value);
|
|
1852
1476
|
}, placeholder: 'Email' })
|
|
1853
1477
|
),
|
|
1854
|
-
React__default[
|
|
1478
|
+
React__default["default"].createElement(
|
|
1855
1479
|
reactBootstrap.Form.Group,
|
|
1856
1480
|
{ controlId: 'password' },
|
|
1857
|
-
React__default[
|
|
1481
|
+
React__default["default"].createElement(reactBootstrap.Form.Control, { type: 'password', onChange: function onChange(e) {
|
|
1858
1482
|
return setPassword(e.target.value);
|
|
1859
1483
|
}, placeholder: 'Password' })
|
|
1860
1484
|
),
|
|
1861
|
-
React__default[
|
|
1485
|
+
React__default["default"].createElement(
|
|
1862
1486
|
'button',
|
|
1863
1487
|
{ className: 'btn btn-primary btn-block', onClick: function onClick() {
|
|
1864
1488
|
return client.signIn('credentials', { email: email, password: password, callbackUrl: callbackUrl });
|
|
@@ -1866,10 +1490,10 @@ var AuthWrapper = function AuthWrapper(_ref) {
|
|
|
1866
1490
|
'Sign in'
|
|
1867
1491
|
)
|
|
1868
1492
|
),
|
|
1869
|
-
React__default[
|
|
1493
|
+
React__default["default"].createElement(
|
|
1870
1494
|
'button',
|
|
1871
1495
|
{ className: 'btn btn-primary btn-block mt-3' },
|
|
1872
|
-
React__default[
|
|
1496
|
+
React__default["default"].createElement(
|
|
1873
1497
|
'a',
|
|
1874
1498
|
{ style: { textDecoration: 'underline' }, onClick: function onClick() {
|
|
1875
1499
|
return setShowForm(!showForm);
|
|
@@ -1877,13 +1501,13 @@ var AuthWrapper = function AuthWrapper(_ref) {
|
|
|
1877
1501
|
'Register Now'
|
|
1878
1502
|
)
|
|
1879
1503
|
),
|
|
1880
|
-
React__default[
|
|
1504
|
+
React__default["default"].createElement(
|
|
1881
1505
|
'p',
|
|
1882
1506
|
{ className: 'mt-1', style: { fontSize: '.8em', textAlign: 'center' } },
|
|
1883
|
-
React__default[
|
|
1507
|
+
React__default["default"].createElement(
|
|
1884
1508
|
'em',
|
|
1885
1509
|
null,
|
|
1886
|
-
React__default[
|
|
1510
|
+
React__default["default"].createElement(
|
|
1887
1511
|
'a',
|
|
1888
1512
|
{ href: '/forgotpassword', style: { color: 'blue', textDecoration: 'underline' } },
|
|
1889
1513
|
'Forgot your password? '
|
|
@@ -1891,7 +1515,7 @@ var AuthWrapper = function AuthWrapper(_ref) {
|
|
|
1891
1515
|
)
|
|
1892
1516
|
)
|
|
1893
1517
|
),
|
|
1894
|
-
showForm && React__default[
|
|
1518
|
+
showForm && React__default["default"].createElement('iframe', { className: styles.iframe, src: formUrl })
|
|
1895
1519
|
)
|
|
1896
1520
|
);
|
|
1897
1521
|
} else {
|