@mjhls/mjh-framework 1.0.840-seomanager-v1 → 1.0.840
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/AD300x250.js +1 -1
- package/dist/cjs/AD300x250x600.js +1 -1
- package/dist/cjs/AD728x90.js +1 -1
- package/dist/cjs/ADFloatingFooter.js +1 -1
- package/dist/cjs/ADGutter.js +1 -1
- package/dist/cjs/ADSkyscraper.js +1 -1
- package/dist/cjs/ADSponsoredResources.js +1 -1
- package/dist/cjs/ADWebcast.js +1 -1
- package/dist/cjs/ADWelcome.js +1 -1
- package/dist/cjs/AccordionPanel.js +2 -2
- package/dist/cjs/AdSlot.js +1 -1
- package/dist/cjs/AdSlotsProvider.js +6 -2
- package/dist/cjs/AlgoliaSearch.js +37 -14
- package/dist/cjs/ArticleCarousel.js +1 -1
- package/dist/cjs/ArticleProgramLandingPage.js +4 -4
- package/dist/cjs/ArticleSeriesLandingPage.js +3 -3
- package/dist/cjs/ArticleSeriesListing.js +3 -3
- package/dist/cjs/Auth.js +2 -2
- package/dist/cjs/AuthWrapper.js +290 -1564
- package/dist/cjs/CMEDeck.js +1 -1
- package/dist/cjs/Column3.js +1 -1
- package/dist/cjs/DeckContent.js +2 -2
- package/dist/cjs/DeckQueue.js +3 -3
- package/dist/cjs/EventsDeck.js +1 -1
- package/dist/cjs/ExternalResources.js +4 -4
- package/dist/cjs/Feature.js +1 -1
- package/dist/cjs/GridContent.js +164 -45
- package/dist/cjs/HamMagazine.js +6 -6
- package/dist/cjs/HorizontalArticleListing.js +4 -4
- package/dist/cjs/HorizontalHero.js +2 -2
- package/dist/cjs/IssueLanding.js +6 -6
- package/dist/cjs/LeftNav.js +1 -1
- package/dist/cjs/MasterDeck.js +3 -3
- package/dist/cjs/MediaSeriesLanding.js +20 -120
- package/dist/cjs/NavMagazine.js +6 -6
- package/dist/cjs/NavNative.js +3 -3
- package/dist/cjs/OncliveHero.js +1 -1
- package/dist/cjs/PartnerDetailListing.js +6 -6
- package/dist/cjs/PdfDownload.js +2 -2
- package/dist/cjs/PubSection.js +3 -3
- package/dist/cjs/QueueDeckExpanded.js +3 -3
- package/dist/cjs/RecentNews.js +2 -2
- package/dist/cjs/SeriesListingDeck.js +2 -2
- package/dist/cjs/{SeriesSlider-34c6cc2b.js → SeriesSlider-cbab9f0f.js} +1 -1
- package/dist/cjs/{SocialSearchComponent-948138c7.js → SocialSearchComponent-ecb4f972.js} +3 -3
- package/dist/cjs/TaxonomyDescription.js +4 -4
- package/dist/cjs/TemplateNormal.js +6 -6
- package/dist/cjs/Ustream.js +4 -4
- package/dist/cjs/VideoProgramLandingPage.js +4 -4
- package/dist/cjs/VideoSeriesLandingPage.js +3 -3
- package/dist/cjs/VideoSeriesListing.js +7 -5
- package/dist/cjs/View.js +13 -55
- package/dist/cjs/YoutubeGroup.js +1 -1
- package/dist/cjs/getSerializers.js +4 -4
- package/dist/{esm/iconBase-ccc56b97.js → cjs/iconBase-68959171.js} +5 -2
- package/dist/cjs/{index-060c5d65.js → index-0a582ba9.js} +75 -24
- package/dist/cjs/{index-50be6759.js → index-8041a4eb.js} +9 -15
- package/dist/cjs/{index.esm-f27f80d9.js → index.esm-05850a2f.js} +1 -1
- package/dist/cjs/{index.esm-c1e16606.js → index.esm-44f3e2d0.js} +1 -1
- package/dist/cjs/{index.esm-2bb721c8.js → index.esm-8123cf40.js} +1 -1
- package/dist/cjs/{index.esm-00a6aade.js → index.esm-974f47d9.js} +1 -1
- package/dist/cjs/index.js +13 -14
- package/dist/cjs/{main-f1c77adb.js → main-025fdc78.js} +3 -3
- package/dist/esm/AD.js +7 -7
- package/dist/esm/AD300x250.js +6 -6
- package/dist/esm/AD300x250x600.js +6 -6
- package/dist/esm/AD728x90.js +7 -7
- package/dist/esm/ADFloatingFooter.js +9 -9
- package/dist/esm/ADFooter.js +6 -6
- package/dist/esm/ADGutter.js +9 -9
- package/dist/esm/{ADInfeed-4bf3b2f9.js → ADInfeed-28b1e946.js} +5 -5
- package/dist/esm/ADSkyscraper.js +9 -9
- package/dist/esm/ADSponsoredResources.js +9 -9
- package/dist/esm/ADWebcast.js +9 -9
- package/dist/esm/ADWelcome.js +13 -13
- package/dist/esm/{ADlgInfeed-a3377c4a.js → ADlgInfeed-0b474b02.js} +4 -4
- package/dist/esm/AccordionPanel.js +18 -18
- package/dist/esm/AdSlot.js +5 -5
- package/dist/esm/AdSlotsProvider.js +9 -5
- package/dist/esm/AlgoliaSearch.js +247 -224
- package/dist/esm/AlphabeticList.js +13 -13
- package/dist/esm/ArticleCarousel.js +6 -6
- package/dist/esm/ArticleProgramLandingPage.js +17 -17
- package/dist/esm/ArticleSeriesLandingPage.js +12 -12
- package/dist/esm/ArticleSeriesListing.js +31 -31
- package/dist/esm/Auth.js +72 -72
- package/dist/esm/AuthWrapper.js +306 -1580
- package/dist/esm/{AuthorComponent-30aeba69.js → AuthorComponent-5ae7409f.js} +10 -10
- package/dist/esm/{BlockContent-c99c9a8d.js → BlockContent-52cf21c5.js} +3 -3
- package/dist/esm/Breadcrumbs.js +11 -11
- package/dist/esm/CMEDeck.js +61 -61
- package/dist/esm/Column1.js +5 -5
- package/dist/esm/Column2.js +12 -12
- package/dist/esm/Column3.js +23 -23
- package/dist/esm/ConferenceArticleCard.js +13 -13
- package/dist/esm/{ConferenceBanner-8792ebd2.js → ConferenceBanner-9162d0ca.js} +4 -4
- package/dist/esm/DeckContent.js +49 -49
- package/dist/esm/DeckQueue.js +44 -44
- package/dist/esm/{Dfp-2c43d2a0.js → Dfp-43f121ff.js} +10 -10
- package/dist/esm/EventsDeck.js +64 -64
- package/dist/esm/ExternalResources.js +35 -35
- package/dist/esm/Feature.js +15 -15
- package/dist/esm/ForbesHero.js +26 -26
- package/dist/esm/GridContent.js +222 -104
- package/dist/esm/GridHero.js +27 -27
- package/dist/esm/GroupDeck.js +34 -34
- package/dist/esm/HamMagazine.js +86 -86
- package/dist/esm/Header.js +8 -8
- package/dist/esm/Hero.js +6 -6
- package/dist/esm/HighlightenVideo.js +14 -14
- package/dist/esm/HorizontalArticleListing.js +31 -31
- package/dist/esm/HorizontalHero.js +20 -20
- package/dist/esm/IssueContentDeck.js +39 -39
- package/dist/esm/IssueDeck.js +33 -33
- package/dist/esm/IssueLanding.js +22 -22
- package/dist/esm/LeftNav.js +16 -16
- package/dist/esm/MasterDeck.js +38 -38
- package/dist/esm/MediaSeriesLanding.js +336 -436
- package/dist/esm/NavDvm.js +43 -43
- package/dist/esm/{NavFooter-e27bd93b.js → NavFooter-c29526b7.js} +12 -12
- package/dist/esm/NavMagazine.js +89 -89
- package/dist/esm/NavNative.js +77 -77
- package/dist/esm/OncliveHero.js +13 -13
- package/dist/esm/OncliveLargeHero.js +50 -50
- package/dist/esm/PageFilter.js +6 -6
- package/dist/esm/PartnerDetailListing.js +62 -62
- package/dist/esm/PdfDownload.js +7 -7
- package/dist/esm/PopUpModal.js +8 -8
- package/dist/esm/PubSection.js +14 -14
- package/dist/esm/PubToc.js +5 -5
- package/dist/esm/PublicationDeck.js +33 -33
- package/dist/esm/PublicationLanding.js +49 -49
- package/dist/esm/QueueDeckExpanded.js +246 -246
- package/dist/esm/RecentNews.js +18 -18
- package/dist/esm/RelatedContent.js +15 -15
- package/dist/esm/RelatedTopicsDropdown.js +11 -11
- package/dist/esm/RolesDeck.js +13 -13
- package/dist/esm/Search.js +5 -5
- package/dist/esm/SeriesListingDeck.js +19 -19
- package/dist/esm/{SeriesSlider-5d5c08f4.js → SeriesSlider-5c62a578.js} +19 -19
- package/dist/esm/SideFooter.js +19 -19
- package/dist/esm/SocialIcons.js +7 -7
- package/dist/esm/{SocialSearchComponent-db963c3e.js → SocialSearchComponent-cd38ae60.js} +22 -22
- package/dist/esm/SocialShare.js +25 -25
- package/dist/esm/TaxonomyCard.js +35 -35
- package/dist/esm/TaxonomyDescription.js +13 -13
- package/dist/esm/TemplateNormal.js +29 -29
- package/dist/esm/ThumbnailCard.js +9 -9
- package/dist/esm/Ustream.js +18 -18
- package/dist/esm/VerticalHero.js +11 -11
- package/dist/esm/VideoProgramLandingPage.js +24 -24
- package/dist/esm/VideoSeriesCard.js +14 -14
- package/dist/esm/VideoSeriesFilter.js +6 -6
- package/dist/esm/VideoSeriesLandingPage.js +12 -12
- package/dist/esm/VideoSeriesListing.js +51 -49
- package/dist/esm/View.js +172 -214
- package/dist/esm/YahooHero.js +23 -23
- package/dist/esm/YoutubeGroup.js +28 -28
- package/dist/esm/{brightcove-react-player-loader.es-57a70a56.js → brightcove-react-player-loader.es-b43c695a.js} +3 -3
- package/dist/esm/getSerializers.js +8 -8
- package/dist/{cjs/iconBase-be4097c0.js → esm/iconBase-602d52fe.js} +8 -33
- package/dist/esm/{index-f0fc23eb.js → index-2446af28.js} +3 -3
- package/dist/esm/{index-755f2cc2.js → index-35bdcc81.js} +4 -4
- package/dist/esm/{index-01d53c17.js → index-66ffc224.js} +407 -356
- package/dist/esm/{index-98ca9cec.js → index-67e1773f.js} +9 -15
- package/dist/esm/{index.es-a6137319.js → index.es-c6222053.js} +5 -5
- package/dist/esm/{index.esm-f6156a57.js → index.esm-3fdda599.js} +1 -1
- package/dist/esm/{index.esm-37268dca.js → index.esm-8016b507.js} +16 -16
- package/dist/esm/{index.esm-d4932dea.js → index.esm-a8ff922c.js} +1 -1
- package/dist/esm/{index.esm-9b042655.js → index.esm-c6715e80.js} +1 -1
- package/dist/esm/index.js +39 -40
- package/dist/esm/{main-d4165069.js → main-b5c5aac1.js} +19 -19
- package/dist/esm/{react-social-icons-9be47857.js → react-social-icons-91f9716f.js} +5 -5
- package/dist/esm/{visibility-sensor-72fd8f8b.js → visibility-sensor-f40c2564.js} +2 -2
- package/package.json +1 -1
- package/dist/cjs/typeof-1358762e.js +0 -33
- package/dist/esm/typeof-2f07d0e8.js +0 -30
- /package/dist/cjs/{ADInfeed-859820d9.js → ADInfeed-8b336c67.js} +0 -0
- /package/dist/cjs/{ADlgInfeed-da3a36a6.js → ADlgInfeed-aedd5e18.js} +0 -0
package/dist/esm/AuthWrapper.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { _ as _slicedToArray } from './slicedToArray-be2f7a22.js';
|
|
2
2
|
import { c as createCommonjsModule, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
|
|
3
|
-
import {
|
|
4
|
-
import React__default, { useState, useEffect } from 'react';
|
|
3
|
+
import React, { useState, useEffect } from 'react';
|
|
5
4
|
import { Form } from 'react-bootstrap';
|
|
6
5
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
7
6
|
import './web.dom.iterable-4109ff68.js';
|
|
@@ -9,998 +8,6 @@ import './es6.string.iterator-bc33758b.js';
|
|
|
9
8
|
import './_to-object-b50e61c3.js';
|
|
10
9
|
import './core.get-iterator-method-133dfacd.js';
|
|
11
10
|
|
|
12
|
-
var interopRequireWildcard = createCommonjsModule(function (module) {
|
|
13
|
-
var _typeof = _typeof_1["default"];
|
|
14
|
-
|
|
15
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
16
|
-
if (typeof WeakMap !== "function") return null;
|
|
17
|
-
var cacheBabelInterop = new WeakMap();
|
|
18
|
-
var cacheNodeInterop = new WeakMap();
|
|
19
|
-
return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {
|
|
20
|
-
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
21
|
-
})(nodeInterop);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function _interopRequireWildcard(obj, nodeInterop) {
|
|
25
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
26
|
-
return obj;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") {
|
|
30
|
-
return {
|
|
31
|
-
"default": obj
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
36
|
-
|
|
37
|
-
if (cache && cache.has(obj)) {
|
|
38
|
-
return cache.get(obj);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
var newObj = {};
|
|
42
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
43
|
-
|
|
44
|
-
for (var key in obj) {
|
|
45
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
46
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
47
|
-
|
|
48
|
-
if (desc && (desc.get || desc.set)) {
|
|
49
|
-
Object.defineProperty(newObj, key, desc);
|
|
50
|
-
} else {
|
|
51
|
-
newObj[key] = obj[key];
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
newObj["default"] = obj;
|
|
57
|
-
|
|
58
|
-
if (cache) {
|
|
59
|
-
cache.set(obj, newObj);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
return newObj;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
module.exports = _interopRequireWildcard;
|
|
66
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
unwrapExports(interopRequireWildcard);
|
|
70
|
-
|
|
71
|
-
var interopRequireDefault = createCommonjsModule(function (module) {
|
|
72
|
-
function _interopRequireDefault(obj) {
|
|
73
|
-
return obj && obj.__esModule ? obj : {
|
|
74
|
-
"default": obj
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
module.exports = _interopRequireDefault;
|
|
79
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
unwrapExports(interopRequireDefault);
|
|
83
|
-
|
|
84
|
-
var runtime_1 = createCommonjsModule(function (module) {
|
|
85
|
-
/**
|
|
86
|
-
* Copyright (c) 2014-present, Facebook, Inc.
|
|
87
|
-
*
|
|
88
|
-
* This source code is licensed under the MIT license found in the
|
|
89
|
-
* LICENSE file in the root directory of this source tree.
|
|
90
|
-
*/
|
|
91
|
-
|
|
92
|
-
var runtime = (function (exports) {
|
|
93
|
-
|
|
94
|
-
var Op = Object.prototype;
|
|
95
|
-
var hasOwn = Op.hasOwnProperty;
|
|
96
|
-
var undefined$1; // More compressible than void 0.
|
|
97
|
-
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
|
98
|
-
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
99
|
-
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
100
|
-
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
101
|
-
|
|
102
|
-
function define(obj, key, value) {
|
|
103
|
-
Object.defineProperty(obj, key, {
|
|
104
|
-
value: value,
|
|
105
|
-
enumerable: true,
|
|
106
|
-
configurable: true,
|
|
107
|
-
writable: true
|
|
108
|
-
});
|
|
109
|
-
return obj[key];
|
|
110
|
-
}
|
|
111
|
-
try {
|
|
112
|
-
// IE 8 has a broken Object.defineProperty that only works on DOM objects.
|
|
113
|
-
define({}, "");
|
|
114
|
-
} catch (err) {
|
|
115
|
-
define = function(obj, key, value) {
|
|
116
|
-
return obj[key] = value;
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
121
|
-
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
|
|
122
|
-
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
|
|
123
|
-
var generator = Object.create(protoGenerator.prototype);
|
|
124
|
-
var context = new Context(tryLocsList || []);
|
|
125
|
-
|
|
126
|
-
// The ._invoke method unifies the implementations of the .next,
|
|
127
|
-
// .throw, and .return methods.
|
|
128
|
-
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
|
129
|
-
|
|
130
|
-
return generator;
|
|
131
|
-
}
|
|
132
|
-
exports.wrap = wrap;
|
|
133
|
-
|
|
134
|
-
// Try/catch helper to minimize deoptimizations. Returns a completion
|
|
135
|
-
// record like context.tryEntries[i].completion. This interface could
|
|
136
|
-
// have been (and was previously) designed to take a closure to be
|
|
137
|
-
// invoked without arguments, but in all the cases we care about we
|
|
138
|
-
// already have an existing method we want to call, so there's no need
|
|
139
|
-
// to create a new function object. We can even get away with assuming
|
|
140
|
-
// the method takes exactly one argument, since that happens to be true
|
|
141
|
-
// in every case, so we don't have to touch the arguments object. The
|
|
142
|
-
// only additional allocation required is the completion record, which
|
|
143
|
-
// has a stable shape and so hopefully should be cheap to allocate.
|
|
144
|
-
function tryCatch(fn, obj, arg) {
|
|
145
|
-
try {
|
|
146
|
-
return { type: "normal", arg: fn.call(obj, arg) };
|
|
147
|
-
} catch (err) {
|
|
148
|
-
return { type: "throw", arg: err };
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
var GenStateSuspendedStart = "suspendedStart";
|
|
153
|
-
var GenStateSuspendedYield = "suspendedYield";
|
|
154
|
-
var GenStateExecuting = "executing";
|
|
155
|
-
var GenStateCompleted = "completed";
|
|
156
|
-
|
|
157
|
-
// Returning this object from the innerFn has the same effect as
|
|
158
|
-
// breaking out of the dispatch switch statement.
|
|
159
|
-
var ContinueSentinel = {};
|
|
160
|
-
|
|
161
|
-
// Dummy constructor functions that we use as the .constructor and
|
|
162
|
-
// .constructor.prototype properties for functions that return Generator
|
|
163
|
-
// objects. For full spec compliance, you may wish to configure your
|
|
164
|
-
// minifier not to mangle the names of these two functions.
|
|
165
|
-
function Generator() {}
|
|
166
|
-
function GeneratorFunction() {}
|
|
167
|
-
function GeneratorFunctionPrototype() {}
|
|
168
|
-
|
|
169
|
-
// This is a polyfill for %IteratorPrototype% for environments that
|
|
170
|
-
// don't natively support it.
|
|
171
|
-
var IteratorPrototype = {};
|
|
172
|
-
IteratorPrototype[iteratorSymbol] = function () {
|
|
173
|
-
return this;
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
var getProto = Object.getPrototypeOf;
|
|
177
|
-
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
178
|
-
if (NativeIteratorPrototype &&
|
|
179
|
-
NativeIteratorPrototype !== Op &&
|
|
180
|
-
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
|
181
|
-
// This environment has a native %IteratorPrototype%; use it instead
|
|
182
|
-
// of the polyfill.
|
|
183
|
-
IteratorPrototype = NativeIteratorPrototype;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
var Gp = GeneratorFunctionPrototype.prototype =
|
|
187
|
-
Generator.prototype = Object.create(IteratorPrototype);
|
|
188
|
-
GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
|
|
189
|
-
GeneratorFunctionPrototype.constructor = GeneratorFunction;
|
|
190
|
-
GeneratorFunction.displayName = define(
|
|
191
|
-
GeneratorFunctionPrototype,
|
|
192
|
-
toStringTagSymbol,
|
|
193
|
-
"GeneratorFunction"
|
|
194
|
-
);
|
|
195
|
-
|
|
196
|
-
// Helper for defining the .next, .throw, and .return methods of the
|
|
197
|
-
// Iterator interface in terms of a single ._invoke method.
|
|
198
|
-
function defineIteratorMethods(prototype) {
|
|
199
|
-
["next", "throw", "return"].forEach(function(method) {
|
|
200
|
-
define(prototype, method, function(arg) {
|
|
201
|
-
return this._invoke(method, arg);
|
|
202
|
-
});
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
exports.isGeneratorFunction = function(genFun) {
|
|
207
|
-
var ctor = typeof genFun === "function" && genFun.constructor;
|
|
208
|
-
return ctor
|
|
209
|
-
? ctor === GeneratorFunction ||
|
|
210
|
-
// For the native GeneratorFunction constructor, the best we can
|
|
211
|
-
// do is to check its .name property.
|
|
212
|
-
(ctor.displayName || ctor.name) === "GeneratorFunction"
|
|
213
|
-
: false;
|
|
214
|
-
};
|
|
215
|
-
|
|
216
|
-
exports.mark = function(genFun) {
|
|
217
|
-
if (Object.setPrototypeOf) {
|
|
218
|
-
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
|
219
|
-
} else {
|
|
220
|
-
genFun.__proto__ = GeneratorFunctionPrototype;
|
|
221
|
-
define(genFun, toStringTagSymbol, "GeneratorFunction");
|
|
222
|
-
}
|
|
223
|
-
genFun.prototype = Object.create(Gp);
|
|
224
|
-
return genFun;
|
|
225
|
-
};
|
|
226
|
-
|
|
227
|
-
// Within the body of any async function, `await x` is transformed to
|
|
228
|
-
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
|
229
|
-
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
|
230
|
-
// meant to be awaited.
|
|
231
|
-
exports.awrap = function(arg) {
|
|
232
|
-
return { __await: arg };
|
|
233
|
-
};
|
|
234
|
-
|
|
235
|
-
function AsyncIterator(generator, PromiseImpl) {
|
|
236
|
-
function invoke(method, arg, resolve, reject) {
|
|
237
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
238
|
-
if (record.type === "throw") {
|
|
239
|
-
reject(record.arg);
|
|
240
|
-
} else {
|
|
241
|
-
var result = record.arg;
|
|
242
|
-
var value = result.value;
|
|
243
|
-
if (value &&
|
|
244
|
-
typeof value === "object" &&
|
|
245
|
-
hasOwn.call(value, "__await")) {
|
|
246
|
-
return PromiseImpl.resolve(value.__await).then(function(value) {
|
|
247
|
-
invoke("next", value, resolve, reject);
|
|
248
|
-
}, function(err) {
|
|
249
|
-
invoke("throw", err, resolve, reject);
|
|
250
|
-
});
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
return PromiseImpl.resolve(value).then(function(unwrapped) {
|
|
254
|
-
// When a yielded Promise is resolved, its final value becomes
|
|
255
|
-
// the .value of the Promise<{value,done}> result for the
|
|
256
|
-
// current iteration.
|
|
257
|
-
result.value = unwrapped;
|
|
258
|
-
resolve(result);
|
|
259
|
-
}, function(error) {
|
|
260
|
-
// If a rejected Promise was yielded, throw the rejection back
|
|
261
|
-
// into the async generator function so it can be handled there.
|
|
262
|
-
return invoke("throw", error, resolve, reject);
|
|
263
|
-
});
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
var previousPromise;
|
|
268
|
-
|
|
269
|
-
function enqueue(method, arg) {
|
|
270
|
-
function callInvokeWithMethodAndArg() {
|
|
271
|
-
return new PromiseImpl(function(resolve, reject) {
|
|
272
|
-
invoke(method, arg, resolve, reject);
|
|
273
|
-
});
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
return previousPromise =
|
|
277
|
-
// If enqueue has been called before, then we want to wait until
|
|
278
|
-
// all previous Promises have been resolved before calling invoke,
|
|
279
|
-
// so that results are always delivered in the correct order. If
|
|
280
|
-
// enqueue has not been called before, then it is important to
|
|
281
|
-
// call invoke immediately, without waiting on a callback to fire,
|
|
282
|
-
// so that the async generator function has the opportunity to do
|
|
283
|
-
// any necessary setup in a predictable way. This predictability
|
|
284
|
-
// is why the Promise constructor synchronously invokes its
|
|
285
|
-
// executor callback, and why async functions synchronously
|
|
286
|
-
// execute code before the first await. Since we implement simple
|
|
287
|
-
// async functions in terms of async generators, it is especially
|
|
288
|
-
// important to get this right, even though it requires care.
|
|
289
|
-
previousPromise ? previousPromise.then(
|
|
290
|
-
callInvokeWithMethodAndArg,
|
|
291
|
-
// Avoid propagating failures to Promises returned by later
|
|
292
|
-
// invocations of the iterator.
|
|
293
|
-
callInvokeWithMethodAndArg
|
|
294
|
-
) : callInvokeWithMethodAndArg();
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
// Define the unified helper method that is used to implement .next,
|
|
298
|
-
// .throw, and .return (see defineIteratorMethods).
|
|
299
|
-
this._invoke = enqueue;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
defineIteratorMethods(AsyncIterator.prototype);
|
|
303
|
-
AsyncIterator.prototype[asyncIteratorSymbol] = function () {
|
|
304
|
-
return this;
|
|
305
|
-
};
|
|
306
|
-
exports.AsyncIterator = AsyncIterator;
|
|
307
|
-
|
|
308
|
-
// Note that simple async functions are implemented on top of
|
|
309
|
-
// AsyncIterator objects; they just return a Promise for the value of
|
|
310
|
-
// the final result produced by the iterator.
|
|
311
|
-
exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
312
|
-
if (PromiseImpl === void 0) PromiseImpl = Promise;
|
|
313
|
-
|
|
314
|
-
var iter = new AsyncIterator(
|
|
315
|
-
wrap(innerFn, outerFn, self, tryLocsList),
|
|
316
|
-
PromiseImpl
|
|
317
|
-
);
|
|
318
|
-
|
|
319
|
-
return exports.isGeneratorFunction(outerFn)
|
|
320
|
-
? iter // If outerFn is a generator, return the full iterator.
|
|
321
|
-
: iter.next().then(function(result) {
|
|
322
|
-
return result.done ? result.value : iter.next();
|
|
323
|
-
});
|
|
324
|
-
};
|
|
325
|
-
|
|
326
|
-
function makeInvokeMethod(innerFn, self, context) {
|
|
327
|
-
var state = GenStateSuspendedStart;
|
|
328
|
-
|
|
329
|
-
return function invoke(method, arg) {
|
|
330
|
-
if (state === GenStateExecuting) {
|
|
331
|
-
throw new Error("Generator is already running");
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
if (state === GenStateCompleted) {
|
|
335
|
-
if (method === "throw") {
|
|
336
|
-
throw arg;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
// Be forgiving, per 25.3.3.3.3 of the spec:
|
|
340
|
-
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
|
341
|
-
return doneResult();
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
context.method = method;
|
|
345
|
-
context.arg = arg;
|
|
346
|
-
|
|
347
|
-
while (true) {
|
|
348
|
-
var delegate = context.delegate;
|
|
349
|
-
if (delegate) {
|
|
350
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
351
|
-
if (delegateResult) {
|
|
352
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
353
|
-
return delegateResult;
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
if (context.method === "next") {
|
|
358
|
-
// Setting context._sent for legacy support of Babel's
|
|
359
|
-
// function.sent implementation.
|
|
360
|
-
context.sent = context._sent = context.arg;
|
|
361
|
-
|
|
362
|
-
} else if (context.method === "throw") {
|
|
363
|
-
if (state === GenStateSuspendedStart) {
|
|
364
|
-
state = GenStateCompleted;
|
|
365
|
-
throw context.arg;
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
context.dispatchException(context.arg);
|
|
369
|
-
|
|
370
|
-
} else if (context.method === "return") {
|
|
371
|
-
context.abrupt("return", context.arg);
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
state = GenStateExecuting;
|
|
375
|
-
|
|
376
|
-
var record = tryCatch(innerFn, self, context);
|
|
377
|
-
if (record.type === "normal") {
|
|
378
|
-
// If an exception is thrown from innerFn, we leave state ===
|
|
379
|
-
// GenStateExecuting and loop back for another invocation.
|
|
380
|
-
state = context.done
|
|
381
|
-
? GenStateCompleted
|
|
382
|
-
: GenStateSuspendedYield;
|
|
383
|
-
|
|
384
|
-
if (record.arg === ContinueSentinel) {
|
|
385
|
-
continue;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
return {
|
|
389
|
-
value: record.arg,
|
|
390
|
-
done: context.done
|
|
391
|
-
};
|
|
392
|
-
|
|
393
|
-
} else if (record.type === "throw") {
|
|
394
|
-
state = GenStateCompleted;
|
|
395
|
-
// Dispatch the exception by looping back around to the
|
|
396
|
-
// context.dispatchException(context.arg) call above.
|
|
397
|
-
context.method = "throw";
|
|
398
|
-
context.arg = record.arg;
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
};
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
// Call delegate.iterator[context.method](context.arg) and handle the
|
|
405
|
-
// result, either by returning a { value, done } result from the
|
|
406
|
-
// delegate iterator, or by modifying context.method and context.arg,
|
|
407
|
-
// setting context.delegate to null, and returning the ContinueSentinel.
|
|
408
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
409
|
-
var method = delegate.iterator[context.method];
|
|
410
|
-
if (method === undefined$1) {
|
|
411
|
-
// A .throw or .return when the delegate iterator has no .throw
|
|
412
|
-
// method always terminates the yield* loop.
|
|
413
|
-
context.delegate = null;
|
|
414
|
-
|
|
415
|
-
if (context.method === "throw") {
|
|
416
|
-
// Note: ["return"] must be used for ES3 parsing compatibility.
|
|
417
|
-
if (delegate.iterator["return"]) {
|
|
418
|
-
// If the delegate iterator has a return method, give it a
|
|
419
|
-
// chance to clean up.
|
|
420
|
-
context.method = "return";
|
|
421
|
-
context.arg = undefined$1;
|
|
422
|
-
maybeInvokeDelegate(delegate, context);
|
|
423
|
-
|
|
424
|
-
if (context.method === "throw") {
|
|
425
|
-
// If maybeInvokeDelegate(context) changed context.method from
|
|
426
|
-
// "return" to "throw", let that override the TypeError below.
|
|
427
|
-
return ContinueSentinel;
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
context.method = "throw";
|
|
432
|
-
context.arg = new TypeError(
|
|
433
|
-
"The iterator does not provide a 'throw' method");
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
return ContinueSentinel;
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
440
|
-
|
|
441
|
-
if (record.type === "throw") {
|
|
442
|
-
context.method = "throw";
|
|
443
|
-
context.arg = record.arg;
|
|
444
|
-
context.delegate = null;
|
|
445
|
-
return ContinueSentinel;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
var info = record.arg;
|
|
449
|
-
|
|
450
|
-
if (! info) {
|
|
451
|
-
context.method = "throw";
|
|
452
|
-
context.arg = new TypeError("iterator result is not an object");
|
|
453
|
-
context.delegate = null;
|
|
454
|
-
return ContinueSentinel;
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
if (info.done) {
|
|
458
|
-
// Assign the result of the finished delegate to the temporary
|
|
459
|
-
// variable specified by delegate.resultName (see delegateYield).
|
|
460
|
-
context[delegate.resultName] = info.value;
|
|
461
|
-
|
|
462
|
-
// Resume execution at the desired location (see delegateYield).
|
|
463
|
-
context.next = delegate.nextLoc;
|
|
464
|
-
|
|
465
|
-
// If context.method was "throw" but the delegate handled the
|
|
466
|
-
// exception, let the outer generator proceed normally. If
|
|
467
|
-
// context.method was "next", forget context.arg since it has been
|
|
468
|
-
// "consumed" by the delegate iterator. If context.method was
|
|
469
|
-
// "return", allow the original .return call to continue in the
|
|
470
|
-
// outer generator.
|
|
471
|
-
if (context.method !== "return") {
|
|
472
|
-
context.method = "next";
|
|
473
|
-
context.arg = undefined$1;
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
} else {
|
|
477
|
-
// Re-yield the result returned by the delegate method.
|
|
478
|
-
return info;
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
// The delegate iterator is finished, so forget it and continue with
|
|
482
|
-
// the outer generator.
|
|
483
|
-
context.delegate = null;
|
|
484
|
-
return ContinueSentinel;
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
// Define Generator.prototype.{next,throw,return} in terms of the
|
|
488
|
-
// unified ._invoke helper method.
|
|
489
|
-
defineIteratorMethods(Gp);
|
|
490
|
-
|
|
491
|
-
define(Gp, toStringTagSymbol, "Generator");
|
|
492
|
-
|
|
493
|
-
// A Generator should always return itself as the iterator object when the
|
|
494
|
-
// @@iterator function is called on it. Some browsers' implementations of the
|
|
495
|
-
// iterator prototype chain incorrectly implement this, causing the Generator
|
|
496
|
-
// object to not be returned from this call. This ensures that doesn't happen.
|
|
497
|
-
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
498
|
-
Gp[iteratorSymbol] = function() {
|
|
499
|
-
return this;
|
|
500
|
-
};
|
|
501
|
-
|
|
502
|
-
Gp.toString = function() {
|
|
503
|
-
return "[object Generator]";
|
|
504
|
-
};
|
|
505
|
-
|
|
506
|
-
function pushTryEntry(locs) {
|
|
507
|
-
var entry = { tryLoc: locs[0] };
|
|
508
|
-
|
|
509
|
-
if (1 in locs) {
|
|
510
|
-
entry.catchLoc = locs[1];
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
if (2 in locs) {
|
|
514
|
-
entry.finallyLoc = locs[2];
|
|
515
|
-
entry.afterLoc = locs[3];
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
this.tryEntries.push(entry);
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
function resetTryEntry(entry) {
|
|
522
|
-
var record = entry.completion || {};
|
|
523
|
-
record.type = "normal";
|
|
524
|
-
delete record.arg;
|
|
525
|
-
entry.completion = record;
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
function Context(tryLocsList) {
|
|
529
|
-
// The root entry object (effectively a try statement without a catch
|
|
530
|
-
// or a finally block) gives us a place to store values thrown from
|
|
531
|
-
// locations where there is no enclosing try statement.
|
|
532
|
-
this.tryEntries = [{ tryLoc: "root" }];
|
|
533
|
-
tryLocsList.forEach(pushTryEntry, this);
|
|
534
|
-
this.reset(true);
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
exports.keys = function(object) {
|
|
538
|
-
var keys = [];
|
|
539
|
-
for (var key in object) {
|
|
540
|
-
keys.push(key);
|
|
541
|
-
}
|
|
542
|
-
keys.reverse();
|
|
543
|
-
|
|
544
|
-
// Rather than returning an object with a next method, we keep
|
|
545
|
-
// things simple and return the next function itself.
|
|
546
|
-
return function next() {
|
|
547
|
-
while (keys.length) {
|
|
548
|
-
var key = keys.pop();
|
|
549
|
-
if (key in object) {
|
|
550
|
-
next.value = key;
|
|
551
|
-
next.done = false;
|
|
552
|
-
return next;
|
|
553
|
-
}
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
// To avoid creating an additional object, we just hang the .value
|
|
557
|
-
// and .done properties off the next function object itself. This
|
|
558
|
-
// also ensures that the minifier will not anonymize the function.
|
|
559
|
-
next.done = true;
|
|
560
|
-
return next;
|
|
561
|
-
};
|
|
562
|
-
};
|
|
563
|
-
|
|
564
|
-
function values(iterable) {
|
|
565
|
-
if (iterable) {
|
|
566
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
567
|
-
if (iteratorMethod) {
|
|
568
|
-
return iteratorMethod.call(iterable);
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
if (typeof iterable.next === "function") {
|
|
572
|
-
return iterable;
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
if (!isNaN(iterable.length)) {
|
|
576
|
-
var i = -1, next = function next() {
|
|
577
|
-
while (++i < iterable.length) {
|
|
578
|
-
if (hasOwn.call(iterable, i)) {
|
|
579
|
-
next.value = iterable[i];
|
|
580
|
-
next.done = false;
|
|
581
|
-
return next;
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
next.value = undefined$1;
|
|
586
|
-
next.done = true;
|
|
587
|
-
|
|
588
|
-
return next;
|
|
589
|
-
};
|
|
590
|
-
|
|
591
|
-
return next.next = next;
|
|
592
|
-
}
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
// Return an iterator with no values.
|
|
596
|
-
return { next: doneResult };
|
|
597
|
-
}
|
|
598
|
-
exports.values = values;
|
|
599
|
-
|
|
600
|
-
function doneResult() {
|
|
601
|
-
return { value: undefined$1, done: true };
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
Context.prototype = {
|
|
605
|
-
constructor: Context,
|
|
606
|
-
|
|
607
|
-
reset: function(skipTempReset) {
|
|
608
|
-
this.prev = 0;
|
|
609
|
-
this.next = 0;
|
|
610
|
-
// Resetting context._sent for legacy support of Babel's
|
|
611
|
-
// function.sent implementation.
|
|
612
|
-
this.sent = this._sent = undefined$1;
|
|
613
|
-
this.done = false;
|
|
614
|
-
this.delegate = null;
|
|
615
|
-
|
|
616
|
-
this.method = "next";
|
|
617
|
-
this.arg = undefined$1;
|
|
618
|
-
|
|
619
|
-
this.tryEntries.forEach(resetTryEntry);
|
|
620
|
-
|
|
621
|
-
if (!skipTempReset) {
|
|
622
|
-
for (var name in this) {
|
|
623
|
-
// Not sure about the optimal order of these conditions:
|
|
624
|
-
if (name.charAt(0) === "t" &&
|
|
625
|
-
hasOwn.call(this, name) &&
|
|
626
|
-
!isNaN(+name.slice(1))) {
|
|
627
|
-
this[name] = undefined$1;
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
},
|
|
632
|
-
|
|
633
|
-
stop: function() {
|
|
634
|
-
this.done = true;
|
|
635
|
-
|
|
636
|
-
var rootEntry = this.tryEntries[0];
|
|
637
|
-
var rootRecord = rootEntry.completion;
|
|
638
|
-
if (rootRecord.type === "throw") {
|
|
639
|
-
throw rootRecord.arg;
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
return this.rval;
|
|
643
|
-
},
|
|
644
|
-
|
|
645
|
-
dispatchException: function(exception) {
|
|
646
|
-
if (this.done) {
|
|
647
|
-
throw exception;
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
var context = this;
|
|
651
|
-
function handle(loc, caught) {
|
|
652
|
-
record.type = "throw";
|
|
653
|
-
record.arg = exception;
|
|
654
|
-
context.next = loc;
|
|
655
|
-
|
|
656
|
-
if (caught) {
|
|
657
|
-
// If the dispatched exception was caught by a catch block,
|
|
658
|
-
// then let that catch block handle the exception normally.
|
|
659
|
-
context.method = "next";
|
|
660
|
-
context.arg = undefined$1;
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
return !! caught;
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
667
|
-
var entry = this.tryEntries[i];
|
|
668
|
-
var record = entry.completion;
|
|
669
|
-
|
|
670
|
-
if (entry.tryLoc === "root") {
|
|
671
|
-
// Exception thrown outside of any try block that could handle
|
|
672
|
-
// it, so set the completion value of the entire function to
|
|
673
|
-
// throw the exception.
|
|
674
|
-
return handle("end");
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
if (entry.tryLoc <= this.prev) {
|
|
678
|
-
var hasCatch = hasOwn.call(entry, "catchLoc");
|
|
679
|
-
var hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
680
|
-
|
|
681
|
-
if (hasCatch && hasFinally) {
|
|
682
|
-
if (this.prev < entry.catchLoc) {
|
|
683
|
-
return handle(entry.catchLoc, true);
|
|
684
|
-
} else if (this.prev < entry.finallyLoc) {
|
|
685
|
-
return handle(entry.finallyLoc);
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
} else if (hasCatch) {
|
|
689
|
-
if (this.prev < entry.catchLoc) {
|
|
690
|
-
return handle(entry.catchLoc, true);
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
} else if (hasFinally) {
|
|
694
|
-
if (this.prev < entry.finallyLoc) {
|
|
695
|
-
return handle(entry.finallyLoc);
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
} else {
|
|
699
|
-
throw new Error("try statement without catch or finally");
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
}
|
|
703
|
-
},
|
|
704
|
-
|
|
705
|
-
abrupt: function(type, arg) {
|
|
706
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
707
|
-
var entry = this.tryEntries[i];
|
|
708
|
-
if (entry.tryLoc <= this.prev &&
|
|
709
|
-
hasOwn.call(entry, "finallyLoc") &&
|
|
710
|
-
this.prev < entry.finallyLoc) {
|
|
711
|
-
var finallyEntry = entry;
|
|
712
|
-
break;
|
|
713
|
-
}
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
if (finallyEntry &&
|
|
717
|
-
(type === "break" ||
|
|
718
|
-
type === "continue") &&
|
|
719
|
-
finallyEntry.tryLoc <= arg &&
|
|
720
|
-
arg <= finallyEntry.finallyLoc) {
|
|
721
|
-
// Ignore the finally entry if control is not jumping to a
|
|
722
|
-
// location outside the try/catch block.
|
|
723
|
-
finallyEntry = null;
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
var record = finallyEntry ? finallyEntry.completion : {};
|
|
727
|
-
record.type = type;
|
|
728
|
-
record.arg = arg;
|
|
729
|
-
|
|
730
|
-
if (finallyEntry) {
|
|
731
|
-
this.method = "next";
|
|
732
|
-
this.next = finallyEntry.finallyLoc;
|
|
733
|
-
return ContinueSentinel;
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
return this.complete(record);
|
|
737
|
-
},
|
|
738
|
-
|
|
739
|
-
complete: function(record, afterLoc) {
|
|
740
|
-
if (record.type === "throw") {
|
|
741
|
-
throw record.arg;
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
if (record.type === "break" ||
|
|
745
|
-
record.type === "continue") {
|
|
746
|
-
this.next = record.arg;
|
|
747
|
-
} else if (record.type === "return") {
|
|
748
|
-
this.rval = this.arg = record.arg;
|
|
749
|
-
this.method = "return";
|
|
750
|
-
this.next = "end";
|
|
751
|
-
} else if (record.type === "normal" && afterLoc) {
|
|
752
|
-
this.next = afterLoc;
|
|
753
|
-
}
|
|
754
|
-
|
|
755
|
-
return ContinueSentinel;
|
|
756
|
-
},
|
|
757
|
-
|
|
758
|
-
finish: function(finallyLoc) {
|
|
759
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
760
|
-
var entry = this.tryEntries[i];
|
|
761
|
-
if (entry.finallyLoc === finallyLoc) {
|
|
762
|
-
this.complete(entry.completion, entry.afterLoc);
|
|
763
|
-
resetTryEntry(entry);
|
|
764
|
-
return ContinueSentinel;
|
|
765
|
-
}
|
|
766
|
-
}
|
|
767
|
-
},
|
|
768
|
-
|
|
769
|
-
"catch": function(tryLoc) {
|
|
770
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
771
|
-
var entry = this.tryEntries[i];
|
|
772
|
-
if (entry.tryLoc === tryLoc) {
|
|
773
|
-
var record = entry.completion;
|
|
774
|
-
if (record.type === "throw") {
|
|
775
|
-
var thrown = record.arg;
|
|
776
|
-
resetTryEntry(entry);
|
|
777
|
-
}
|
|
778
|
-
return thrown;
|
|
779
|
-
}
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
// The context.catch method must only be called with a location
|
|
783
|
-
// argument that corresponds to a known catch block.
|
|
784
|
-
throw new Error("illegal catch attempt");
|
|
785
|
-
},
|
|
786
|
-
|
|
787
|
-
delegateYield: function(iterable, resultName, nextLoc) {
|
|
788
|
-
this.delegate = {
|
|
789
|
-
iterator: values(iterable),
|
|
790
|
-
resultName: resultName,
|
|
791
|
-
nextLoc: nextLoc
|
|
792
|
-
};
|
|
793
|
-
|
|
794
|
-
if (this.method === "next") {
|
|
795
|
-
// Deliberately forget the last sent value so that we don't
|
|
796
|
-
// accidentally pass it on to the delegate.
|
|
797
|
-
this.arg = undefined$1;
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
return ContinueSentinel;
|
|
801
|
-
}
|
|
802
|
-
};
|
|
803
|
-
|
|
804
|
-
// Regardless of whether this script is executing as a CommonJS module
|
|
805
|
-
// or not, return the runtime object so that we can declare the variable
|
|
806
|
-
// regeneratorRuntime in the outer scope, which allows this module to be
|
|
807
|
-
// injected easily by `bin/regenerator --include-runtime script.js`.
|
|
808
|
-
return exports;
|
|
809
|
-
|
|
810
|
-
}(
|
|
811
|
-
// If this script is executing as a CommonJS module, use module.exports
|
|
812
|
-
// as the regeneratorRuntime namespace. Otherwise create a new empty
|
|
813
|
-
// object. Either way, the resulting object will be used to initialize
|
|
814
|
-
// the regeneratorRuntime variable at the top of this file.
|
|
815
|
-
module.exports
|
|
816
|
-
));
|
|
817
|
-
|
|
818
|
-
try {
|
|
819
|
-
regeneratorRuntime = runtime;
|
|
820
|
-
} catch (accidentalStrictMode) {
|
|
821
|
-
// This module should not be running in strict mode, so the above
|
|
822
|
-
// assignment should always work unless something is misconfigured. Just
|
|
823
|
-
// in case runtime.js accidentally runs in strict mode, we can escape
|
|
824
|
-
// strict mode using a global Function call. This could conceivably fail
|
|
825
|
-
// if a Content Security Policy forbids using Function, but in that case
|
|
826
|
-
// the proper solution is to fix the accidental strict mode problem. If
|
|
827
|
-
// you've misconfigured your bundler to force strict mode and applied a
|
|
828
|
-
// CSP to forbid Function, and you're not willing to fix either of those
|
|
829
|
-
// problems, please detail your unique predicament in a GitHub issue.
|
|
830
|
-
Function("r", "regeneratorRuntime = r")(runtime);
|
|
831
|
-
}
|
|
832
|
-
});
|
|
833
|
-
|
|
834
|
-
var regenerator = runtime_1;
|
|
835
|
-
|
|
836
|
-
var defineProperty = createCommonjsModule(function (module) {
|
|
837
|
-
function _defineProperty(obj, key, value) {
|
|
838
|
-
if (key in obj) {
|
|
839
|
-
Object.defineProperty(obj, key, {
|
|
840
|
-
value: value,
|
|
841
|
-
enumerable: true,
|
|
842
|
-
configurable: true,
|
|
843
|
-
writable: true
|
|
844
|
-
});
|
|
845
|
-
} else {
|
|
846
|
-
obj[key] = value;
|
|
847
|
-
}
|
|
848
|
-
|
|
849
|
-
return obj;
|
|
850
|
-
}
|
|
851
|
-
|
|
852
|
-
module.exports = _defineProperty;
|
|
853
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
854
|
-
});
|
|
855
|
-
|
|
856
|
-
unwrapExports(defineProperty);
|
|
857
|
-
|
|
858
|
-
var asyncToGenerator = createCommonjsModule(function (module) {
|
|
859
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
860
|
-
try {
|
|
861
|
-
var info = gen[key](arg);
|
|
862
|
-
var value = info.value;
|
|
863
|
-
} catch (error) {
|
|
864
|
-
reject(error);
|
|
865
|
-
return;
|
|
866
|
-
}
|
|
867
|
-
|
|
868
|
-
if (info.done) {
|
|
869
|
-
resolve(value);
|
|
870
|
-
} else {
|
|
871
|
-
Promise.resolve(value).then(_next, _throw);
|
|
872
|
-
}
|
|
873
|
-
}
|
|
874
|
-
|
|
875
|
-
function _asyncToGenerator(fn) {
|
|
876
|
-
return function () {
|
|
877
|
-
var self = this,
|
|
878
|
-
args = arguments;
|
|
879
|
-
return new Promise(function (resolve, reject) {
|
|
880
|
-
var gen = fn.apply(self, args);
|
|
881
|
-
|
|
882
|
-
function _next(value) {
|
|
883
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
884
|
-
}
|
|
885
|
-
|
|
886
|
-
function _throw(err) {
|
|
887
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
_next(undefined);
|
|
891
|
-
});
|
|
892
|
-
};
|
|
893
|
-
}
|
|
894
|
-
|
|
895
|
-
module.exports = _asyncToGenerator;
|
|
896
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
897
|
-
});
|
|
898
|
-
|
|
899
|
-
unwrapExports(asyncToGenerator);
|
|
900
|
-
|
|
901
|
-
var arrayWithHoles = createCommonjsModule(function (module) {
|
|
902
|
-
function _arrayWithHoles(arr) {
|
|
903
|
-
if (Array.isArray(arr)) return arr;
|
|
904
|
-
}
|
|
905
|
-
|
|
906
|
-
module.exports = _arrayWithHoles;
|
|
907
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
908
|
-
});
|
|
909
|
-
|
|
910
|
-
unwrapExports(arrayWithHoles);
|
|
911
|
-
|
|
912
|
-
var iterableToArrayLimit = createCommonjsModule(function (module) {
|
|
913
|
-
function _iterableToArrayLimit(arr, i) {
|
|
914
|
-
var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]);
|
|
915
|
-
|
|
916
|
-
if (_i == null) return;
|
|
917
|
-
var _arr = [];
|
|
918
|
-
var _n = true;
|
|
919
|
-
var _d = false;
|
|
920
|
-
|
|
921
|
-
var _s, _e;
|
|
922
|
-
|
|
923
|
-
try {
|
|
924
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
925
|
-
_arr.push(_s.value);
|
|
926
|
-
|
|
927
|
-
if (i && _arr.length === i) break;
|
|
928
|
-
}
|
|
929
|
-
} catch (err) {
|
|
930
|
-
_d = true;
|
|
931
|
-
_e = err;
|
|
932
|
-
} finally {
|
|
933
|
-
try {
|
|
934
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
935
|
-
} finally {
|
|
936
|
-
if (_d) throw _e;
|
|
937
|
-
}
|
|
938
|
-
}
|
|
939
|
-
|
|
940
|
-
return _arr;
|
|
941
|
-
}
|
|
942
|
-
|
|
943
|
-
module.exports = _iterableToArrayLimit;
|
|
944
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
945
|
-
});
|
|
946
|
-
|
|
947
|
-
unwrapExports(iterableToArrayLimit);
|
|
948
|
-
|
|
949
|
-
var arrayLikeToArray = createCommonjsModule(function (module) {
|
|
950
|
-
function _arrayLikeToArray(arr, len) {
|
|
951
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
952
|
-
|
|
953
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
954
|
-
arr2[i] = arr[i];
|
|
955
|
-
}
|
|
956
|
-
|
|
957
|
-
return arr2;
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
module.exports = _arrayLikeToArray;
|
|
961
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
962
|
-
});
|
|
963
|
-
|
|
964
|
-
unwrapExports(arrayLikeToArray);
|
|
965
|
-
|
|
966
|
-
var unsupportedIterableToArray = createCommonjsModule(function (module) {
|
|
967
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
968
|
-
if (!o) return;
|
|
969
|
-
if (typeof o === "string") return arrayLikeToArray(o, minLen);
|
|
970
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
971
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
972
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
973
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
|
|
974
|
-
}
|
|
975
|
-
|
|
976
|
-
module.exports = _unsupportedIterableToArray;
|
|
977
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
978
|
-
});
|
|
979
|
-
|
|
980
|
-
unwrapExports(unsupportedIterableToArray);
|
|
981
|
-
|
|
982
|
-
var nonIterableRest = createCommonjsModule(function (module) {
|
|
983
|
-
function _nonIterableRest() {
|
|
984
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
985
|
-
}
|
|
986
|
-
|
|
987
|
-
module.exports = _nonIterableRest;
|
|
988
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
989
|
-
});
|
|
990
|
-
|
|
991
|
-
unwrapExports(nonIterableRest);
|
|
992
|
-
|
|
993
|
-
var slicedToArray = createCommonjsModule(function (module) {
|
|
994
|
-
function _slicedToArray(arr, i) {
|
|
995
|
-
return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
|
|
996
|
-
}
|
|
997
|
-
|
|
998
|
-
module.exports = _slicedToArray;
|
|
999
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
1000
|
-
});
|
|
1001
|
-
|
|
1002
|
-
unwrapExports(slicedToArray);
|
|
1003
|
-
|
|
1004
11
|
var logger = createCommonjsModule(function (module, exports) {
|
|
1005
12
|
|
|
1006
13
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -1009,25 +16,39 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1009
16
|
exports.setLogger = setLogger;
|
|
1010
17
|
exports.proxyLogger = proxyLogger;
|
|
1011
18
|
exports.default = void 0;
|
|
1012
|
-
|
|
1013
|
-
error(code
|
|
1014
|
-
|
|
19
|
+
var _logger = {
|
|
20
|
+
error(code) {
|
|
21
|
+
for (var _len = arguments.length, message = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
22
|
+
message[_key - 1] = arguments[_key];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
console.error("[next-auth][error][".concat(code.toLowerCase(), "]"), "\nhttps://next-auth.js.org/errors#".concat(code.toLowerCase()), ...message);
|
|
1015
26
|
},
|
|
1016
27
|
|
|
1017
|
-
warn(code
|
|
1018
|
-
|
|
28
|
+
warn(code) {
|
|
29
|
+
for (var _len2 = arguments.length, message = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
30
|
+
message[_key2 - 1] = arguments[_key2];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
console.warn("[next-auth][warn][".concat(code.toLowerCase(), "]"), "\nhttps://next-auth.js.org/warnings#".concat(code.toLowerCase()), ...message);
|
|
1019
34
|
},
|
|
1020
35
|
|
|
1021
|
-
debug(code
|
|
36
|
+
debug(code) {
|
|
1022
37
|
var _process, _process$env;
|
|
1023
38
|
|
|
1024
39
|
if (!((_process = process) !== null && _process !== void 0 && (_process$env = _process.env) !== null && _process$env !== void 0 && _process$env._NEXTAUTH_DEBUG)) return;
|
|
1025
|
-
|
|
40
|
+
|
|
41
|
+
for (var _len3 = arguments.length, message = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
|
|
42
|
+
message[_key3 - 1] = arguments[_key3];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
console.log("[next-auth][debug][".concat(code.toLowerCase(), "]"), ...message);
|
|
1026
46
|
}
|
|
1027
47
|
|
|
1028
48
|
};
|
|
1029
49
|
|
|
1030
|
-
function setLogger(
|
|
50
|
+
function setLogger() {
|
|
51
|
+
var newLogger = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1031
52
|
if (newLogger.error) _logger.error = newLogger.error;
|
|
1032
53
|
if (newLogger.warn) _logger.warn = newLogger.warn;
|
|
1033
54
|
if (newLogger.debug) _logger.debug = newLogger.debug;
|
|
@@ -1036,20 +57,27 @@ function setLogger(newLogger = {}) {
|
|
|
1036
57
|
var _default = _logger;
|
|
1037
58
|
exports.default = _default;
|
|
1038
59
|
|
|
1039
|
-
function proxyLogger(
|
|
60
|
+
function proxyLogger() {
|
|
61
|
+
var logger = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _logger;
|
|
62
|
+
var basePath = arguments.length > 1 ? arguments[1] : undefined;
|
|
63
|
+
|
|
1040
64
|
try {
|
|
1041
|
-
if (typeof window ===
|
|
65
|
+
if (typeof window === 'undefined') {
|
|
1042
66
|
return logger;
|
|
1043
67
|
}
|
|
1044
68
|
|
|
1045
|
-
|
|
69
|
+
var clientLogger = {};
|
|
70
|
+
|
|
71
|
+
var _loop = function _loop(level) {
|
|
72
|
+
clientLogger[level] = function (code) {
|
|
73
|
+
for (var _len4 = arguments.length, message = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
|
|
74
|
+
message[_key4 - 1] = arguments[_key4];
|
|
75
|
+
}
|
|
1046
76
|
|
|
1047
|
-
for (const level in logger) {
|
|
1048
|
-
clientLogger[level] = (code, ...message) => {
|
|
1049
77
|
_logger[level](code, ...message);
|
|
1050
78
|
|
|
1051
|
-
|
|
1052
|
-
|
|
79
|
+
var url = "".concat(basePath, "/_log");
|
|
80
|
+
var body = new URLSearchParams({
|
|
1053
81
|
level,
|
|
1054
82
|
code,
|
|
1055
83
|
message: JSON.stringify(message.map(m => {
|
|
@@ -1070,17 +98,21 @@ function proxyLogger(logger = _logger, basePath) {
|
|
|
1070
98
|
}
|
|
1071
99
|
|
|
1072
100
|
return fetch(url, {
|
|
1073
|
-
method:
|
|
101
|
+
method: 'POST',
|
|
1074
102
|
headers: {
|
|
1075
|
-
|
|
103
|
+
'Content-Type': 'application/json'
|
|
1076
104
|
},
|
|
1077
105
|
body
|
|
1078
106
|
});
|
|
1079
107
|
};
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
for (var level in logger) {
|
|
111
|
+
_loop(level);
|
|
1080
112
|
}
|
|
1081
113
|
|
|
1082
114
|
return clientLogger;
|
|
1083
|
-
} catch {
|
|
115
|
+
} catch (_unused) {
|
|
1084
116
|
return _logger;
|
|
1085
117
|
}
|
|
1086
118
|
}
|
|
@@ -1098,18 +130,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1098
130
|
exports.default = parseUrl;
|
|
1099
131
|
|
|
1100
132
|
function parseUrl(url) {
|
|
1101
|
-
|
|
1102
|
-
|
|
133
|
+
var defaultHost = 'http://localhost:3000';
|
|
134
|
+
var defaultPath = '/api/auth';
|
|
1103
135
|
|
|
1104
136
|
if (!url) {
|
|
1105
|
-
url =
|
|
137
|
+
url = "".concat(defaultHost).concat(defaultPath);
|
|
1106
138
|
}
|
|
1107
139
|
|
|
1108
|
-
|
|
140
|
+
var protocol = url.startsWith('http:') ? 'http' : 'https';
|
|
1109
141
|
url = url.replace(/^https?:\/\//, '').replace(/\/$/, '');
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
142
|
+
var [_host, ..._path] = url.split('/');
|
|
143
|
+
var baseUrl = _host ? "".concat(protocol, "://").concat(_host) : defaultHost;
|
|
144
|
+
var basePath = _path.length > 0 ? "/".concat(_path.join('/')) : defaultPath;
|
|
1113
145
|
return {
|
|
1114
146
|
baseUrl,
|
|
1115
147
|
basePath
|
|
@@ -1121,40 +153,39 @@ unwrapExports(parseUrl_1);
|
|
|
1121
153
|
|
|
1122
154
|
var client$1 = createCommonjsModule(function (module, exports) {
|
|
1123
155
|
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
156
|
Object.defineProperty(exports, "__esModule", {
|
|
1129
157
|
value: true
|
|
1130
158
|
});
|
|
1131
159
|
exports.useSession = useSession;
|
|
1132
|
-
exports.
|
|
1133
|
-
exports.
|
|
1134
|
-
exports.
|
|
1135
|
-
exports.
|
|
1136
|
-
exports.
|
|
1137
|
-
exports.options = exports.setOptions = setOptions;
|
|
160
|
+
exports.getSession = getSession;
|
|
161
|
+
exports.getProviders = getProviders;
|
|
162
|
+
exports.signIn = signIn;
|
|
163
|
+
exports.signOut = signOut;
|
|
164
|
+
exports.setOptions = setOptions;
|
|
1138
165
|
exports.Provider = Provider;
|
|
1139
166
|
exports.default = void 0;
|
|
1140
167
|
|
|
1141
|
-
var _regenerator = interopRequireDefault(regenerator);
|
|
1142
168
|
|
|
1143
|
-
var _defineProperty2 = interopRequireDefault(defineProperty);
|
|
1144
169
|
|
|
1145
|
-
var
|
|
170
|
+
var _logger2 = _interopRequireWildcard(logger);
|
|
1146
171
|
|
|
1147
|
-
var
|
|
172
|
+
var _parseUrl = _interopRequireDefault(parseUrl_1);
|
|
1148
173
|
|
|
174
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1149
175
|
|
|
176
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
1150
177
|
|
|
1151
|
-
var
|
|
1152
|
-
|
|
1153
|
-
var _parseUrl = interopRequireDefault(parseUrl_1);
|
|
178
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; }
|
|
1154
179
|
|
|
1155
180
|
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; }
|
|
1156
181
|
|
|
1157
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (
|
|
182
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
183
|
+
|
|
184
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
185
|
+
|
|
186
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
187
|
+
|
|
188
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
1158
189
|
|
|
1159
190
|
var __NEXTAUTH = {
|
|
1160
191
|
baseUrl: (0, _parseUrl.default)(process.env.NEXTAUTH_URL || process.env.VERCEL_URL).baseUrl,
|
|
@@ -1167,131 +198,76 @@ var __NEXTAUTH = {
|
|
|
1167
198
|
_clientSyncTimer: null,
|
|
1168
199
|
_eventListenersAdded: false,
|
|
1169
200
|
_clientSession: undefined,
|
|
1170
|
-
_getSession:
|
|
201
|
+
_getSession: () => {}
|
|
1171
202
|
};
|
|
1172
203
|
var logger$1 = (0, _logger2.proxyLogger)(_logger2.default, __NEXTAUTH.basePath);
|
|
1173
204
|
var broadcast = BroadcastChannel();
|
|
1174
205
|
|
|
1175
206
|
if (typeof window !== 'undefined' && !__NEXTAUTH._eventListenersAdded) {
|
|
1176
207
|
__NEXTAUTH._eventListenersAdded = true;
|
|
1177
|
-
broadcast.receive(
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
});
|
|
1182
|
-
document.addEventListener('visibilitychange', function () {
|
|
208
|
+
broadcast.receive(() => __NEXTAUTH._getSession({
|
|
209
|
+
event: 'storage'
|
|
210
|
+
}));
|
|
211
|
+
document.addEventListener('visibilitychange', () => {
|
|
1183
212
|
!document.hidden && __NEXTAUTH._getSession({
|
|
1184
213
|
event: 'visibilitychange'
|
|
1185
214
|
});
|
|
1186
215
|
}, false);
|
|
1187
216
|
}
|
|
1188
217
|
|
|
1189
|
-
var SessionContext = (0,
|
|
218
|
+
var SessionContext = (0, React.createContext)();
|
|
1190
219
|
|
|
1191
220
|
function useSession(session) {
|
|
1192
|
-
var context = (0,
|
|
221
|
+
var context = (0, React.useContext)(SessionContext);
|
|
1193
222
|
if (context) return context;
|
|
1194
223
|
return _useSessionHook(session);
|
|
1195
224
|
}
|
|
1196
225
|
|
|
1197
226
|
function _useSessionHook(session) {
|
|
1198
|
-
var
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
while (1) {
|
|
1224
|
-
switch (_context.prev = _context.next) {
|
|
1225
|
-
case 0:
|
|
1226
|
-
_ref2 = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}, _ref2$event = _ref2.event, event = _ref2$event === void 0 ? null : _ref2$event;
|
|
1227
|
-
_context.prev = 1;
|
|
1228
|
-
triggredByEvent = event !== null;
|
|
1229
|
-
triggeredByStorageEvent = event === 'storage';
|
|
1230
|
-
clientMaxAge = __NEXTAUTH.clientMaxAge;
|
|
1231
|
-
clientLastSync = parseInt(__NEXTAUTH._clientLastSync);
|
|
1232
|
-
currentTime = _now();
|
|
1233
|
-
clientSession = __NEXTAUTH._clientSession;
|
|
1234
|
-
|
|
1235
|
-
if (!(!triggeredByStorageEvent && clientSession !== undefined)) {
|
|
1236
|
-
_context.next = 19;
|
|
1237
|
-
break;
|
|
1238
|
-
}
|
|
1239
|
-
|
|
1240
|
-
if (!(clientMaxAge === 0 && triggredByEvent !== true)) {
|
|
1241
|
-
_context.next = 13;
|
|
1242
|
-
break;
|
|
1243
|
-
}
|
|
1244
|
-
|
|
1245
|
-
return _context.abrupt("return");
|
|
1246
|
-
|
|
1247
|
-
case 13:
|
|
1248
|
-
if (!(clientMaxAge > 0 && clientSession === null)) {
|
|
1249
|
-
_context.next = 17;
|
|
1250
|
-
break;
|
|
1251
|
-
}
|
|
1252
|
-
|
|
1253
|
-
return _context.abrupt("return");
|
|
1254
|
-
|
|
1255
|
-
case 17:
|
|
1256
|
-
if (!(clientMaxAge > 0 && currentTime < clientLastSync + clientMaxAge)) {
|
|
1257
|
-
_context.next = 19;
|
|
1258
|
-
break;
|
|
1259
|
-
}
|
|
1260
|
-
|
|
1261
|
-
return _context.abrupt("return");
|
|
1262
|
-
|
|
1263
|
-
case 19:
|
|
1264
|
-
if (clientSession === undefined) {
|
|
1265
|
-
__NEXTAUTH._clientSession = null;
|
|
1266
|
-
}
|
|
1267
|
-
|
|
1268
|
-
__NEXTAUTH._clientLastSync = _now();
|
|
1269
|
-
_context.next = 23;
|
|
1270
|
-
return getSession({
|
|
1271
|
-
triggerEvent: !triggeredByStorageEvent
|
|
1272
|
-
});
|
|
1273
|
-
|
|
1274
|
-
case 23:
|
|
1275
|
-
newClientSessionData = _context.sent;
|
|
1276
|
-
__NEXTAUTH._clientSession = newClientSessionData;
|
|
1277
|
-
setData(newClientSessionData);
|
|
1278
|
-
setLoading(false);
|
|
1279
|
-
_context.next = 33;
|
|
1280
|
-
break;
|
|
1281
|
-
|
|
1282
|
-
case 29:
|
|
1283
|
-
_context.prev = 29;
|
|
1284
|
-
_context.t0 = _context["catch"](1);
|
|
1285
|
-
logger$1.error('CLIENT_USE_SESSION_ERROR', _context.t0);
|
|
1286
|
-
setLoading(false);
|
|
1287
|
-
|
|
1288
|
-
case 33:
|
|
1289
|
-
case "end":
|
|
1290
|
-
return _context.stop();
|
|
227
|
+
var [data, setData] = (0, React.useState)(session);
|
|
228
|
+
var [loading, setLoading] = (0, React.useState)(!data);
|
|
229
|
+
(0, React.useEffect)(() => {
|
|
230
|
+
__NEXTAUTH._getSession = _asyncToGenerator(function* () {
|
|
231
|
+
var {
|
|
232
|
+
event = null
|
|
233
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
234
|
+
|
|
235
|
+
try {
|
|
236
|
+
var triggredByEvent = event !== null;
|
|
237
|
+
var triggeredByStorageEvent = event === 'storage';
|
|
238
|
+
var clientMaxAge = __NEXTAUTH.clientMaxAge;
|
|
239
|
+
var clientLastSync = parseInt(__NEXTAUTH._clientLastSync);
|
|
240
|
+
|
|
241
|
+
var currentTime = _now();
|
|
242
|
+
|
|
243
|
+
var clientSession = __NEXTAUTH._clientSession;
|
|
244
|
+
|
|
245
|
+
if (!triggeredByStorageEvent && clientSession !== undefined) {
|
|
246
|
+
if (clientMaxAge === 0 && triggredByEvent !== true) {
|
|
247
|
+
return;
|
|
248
|
+
} else if (clientMaxAge > 0 && clientSession === null) {
|
|
249
|
+
return;
|
|
250
|
+
} else if (clientMaxAge > 0 && currentTime < clientLastSync + clientMaxAge) {
|
|
251
|
+
return;
|
|
1291
252
|
}
|
|
1292
253
|
}
|
|
1293
|
-
|
|
1294
|
-
|
|
254
|
+
|
|
255
|
+
if (clientSession === undefined) {
|
|
256
|
+
__NEXTAUTH._clientSession = null;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
__NEXTAUTH._clientLastSync = _now();
|
|
260
|
+
var newClientSessionData = yield getSession({
|
|
261
|
+
triggerEvent: !triggeredByStorageEvent
|
|
262
|
+
});
|
|
263
|
+
__NEXTAUTH._clientSession = newClientSessionData;
|
|
264
|
+
setData(newClientSessionData);
|
|
265
|
+
setLoading(false);
|
|
266
|
+
} catch (error) {
|
|
267
|
+
logger$1.error('CLIENT_USE_SESSION_ERROR', error);
|
|
268
|
+
setLoading(false);
|
|
269
|
+
}
|
|
270
|
+
});
|
|
1295
271
|
|
|
1296
272
|
__NEXTAUTH._getSession();
|
|
1297
273
|
});
|
|
@@ -1303,38 +279,22 @@ function getSession(_x) {
|
|
|
1303
279
|
}
|
|
1304
280
|
|
|
1305
281
|
function _getSession2() {
|
|
1306
|
-
_getSession2 = (
|
|
282
|
+
_getSession2 = _asyncToGenerator(function* (ctx) {
|
|
1307
283
|
var _ctx$triggerEvent;
|
|
1308
284
|
|
|
1309
|
-
var session;
|
|
1310
|
-
return _regenerator.default.wrap(function _callee4$(_context4) {
|
|
1311
|
-
while (1) {
|
|
1312
|
-
switch (_context4.prev = _context4.next) {
|
|
1313
|
-
case 0:
|
|
1314
|
-
_context4.next = 2;
|
|
1315
|
-
return _fetchData('session', ctx);
|
|
1316
|
-
|
|
1317
|
-
case 2:
|
|
1318
|
-
session = _context4.sent;
|
|
1319
|
-
|
|
1320
|
-
if ((_ctx$triggerEvent = ctx === null || ctx === void 0 ? void 0 : ctx.triggerEvent) !== null && _ctx$triggerEvent !== void 0 ? _ctx$triggerEvent : true) {
|
|
1321
|
-
broadcast.post({
|
|
1322
|
-
event: 'session',
|
|
1323
|
-
data: {
|
|
1324
|
-
trigger: 'getSession'
|
|
1325
|
-
}
|
|
1326
|
-
});
|
|
1327
|
-
}
|
|
285
|
+
var session = yield _fetchData('session', ctx);
|
|
1328
286
|
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
287
|
+
if ((_ctx$triggerEvent = ctx === null || ctx === void 0 ? void 0 : ctx.triggerEvent) !== null && _ctx$triggerEvent !== void 0 ? _ctx$triggerEvent : true) {
|
|
288
|
+
broadcast.post({
|
|
289
|
+
event: 'session',
|
|
290
|
+
data: {
|
|
291
|
+
trigger: 'getSession'
|
|
1334
292
|
}
|
|
1335
|
-
}
|
|
1336
|
-
}
|
|
1337
|
-
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
return session;
|
|
297
|
+
});
|
|
1338
298
|
return _getSession2.apply(this, arguments);
|
|
1339
299
|
}
|
|
1340
300
|
|
|
@@ -1343,50 +303,11 @@ function getCsrfToken(_x2) {
|
|
|
1343
303
|
}
|
|
1344
304
|
|
|
1345
305
|
function _getCsrfToken() {
|
|
1346
|
-
_getCsrfToken = (
|
|
306
|
+
_getCsrfToken = _asyncToGenerator(function* (ctx) {
|
|
1347
307
|
var _yield$_fetchData;
|
|
1348
308
|
|
|
1349
|
-
return
|
|
1350
|
-
|
|
1351
|
-
switch (_context5.prev = _context5.next) {
|
|
1352
|
-
case 0:
|
|
1353
|
-
_context5.next = 2;
|
|
1354
|
-
return _fetchData('csrf', ctx);
|
|
1355
|
-
|
|
1356
|
-
case 2:
|
|
1357
|
-
_context5.t1 = _yield$_fetchData = _context5.sent;
|
|
1358
|
-
_context5.t0 = _context5.t1 === null;
|
|
1359
|
-
|
|
1360
|
-
if (_context5.t0) {
|
|
1361
|
-
_context5.next = 6;
|
|
1362
|
-
break;
|
|
1363
|
-
}
|
|
1364
|
-
|
|
1365
|
-
_context5.t0 = _yield$_fetchData === void 0;
|
|
1366
|
-
|
|
1367
|
-
case 6:
|
|
1368
|
-
if (!_context5.t0) {
|
|
1369
|
-
_context5.next = 10;
|
|
1370
|
-
break;
|
|
1371
|
-
}
|
|
1372
|
-
|
|
1373
|
-
_context5.t2 = void 0;
|
|
1374
|
-
_context5.next = 11;
|
|
1375
|
-
break;
|
|
1376
|
-
|
|
1377
|
-
case 10:
|
|
1378
|
-
_context5.t2 = _yield$_fetchData.csrfToken;
|
|
1379
|
-
|
|
1380
|
-
case 11:
|
|
1381
|
-
return _context5.abrupt("return", _context5.t2);
|
|
1382
|
-
|
|
1383
|
-
case 12:
|
|
1384
|
-
case "end":
|
|
1385
|
-
return _context5.stop();
|
|
1386
|
-
}
|
|
1387
|
-
}
|
|
1388
|
-
}, _callee5);
|
|
1389
|
-
}));
|
|
309
|
+
return (_yield$_fetchData = yield _fetchData('csrf', ctx)) === null || _yield$_fetchData === void 0 ? void 0 : _yield$_fetchData.csrfToken;
|
|
310
|
+
});
|
|
1390
311
|
return _getCsrfToken.apply(this, arguments);
|
|
1391
312
|
}
|
|
1392
313
|
|
|
@@ -1395,20 +316,9 @@ function getProviders() {
|
|
|
1395
316
|
}
|
|
1396
317
|
|
|
1397
318
|
function _getProviders() {
|
|
1398
|
-
_getProviders = (
|
|
1399
|
-
return
|
|
1400
|
-
|
|
1401
|
-
switch (_context6.prev = _context6.next) {
|
|
1402
|
-
case 0:
|
|
1403
|
-
return _context6.abrupt("return", _fetchData('providers'));
|
|
1404
|
-
|
|
1405
|
-
case 1:
|
|
1406
|
-
case "end":
|
|
1407
|
-
return _context6.stop();
|
|
1408
|
-
}
|
|
1409
|
-
}
|
|
1410
|
-
}, _callee6);
|
|
1411
|
-
}));
|
|
319
|
+
_getProviders = _asyncToGenerator(function* () {
|
|
320
|
+
return _fetchData('providers');
|
|
321
|
+
});
|
|
1412
322
|
return _getProviders.apply(this, arguments);
|
|
1413
323
|
}
|
|
1414
324
|
|
|
@@ -1417,130 +327,68 @@ function signIn(_x3) {
|
|
|
1417
327
|
}
|
|
1418
328
|
|
|
1419
329
|
function _signIn() {
|
|
1420
|
-
_signIn = (
|
|
1421
|
-
var options
|
|
1422
|
-
|
|
1423
|
-
|
|
330
|
+
_signIn = _asyncToGenerator(function* (provider) {
|
|
331
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
332
|
+
var authorizationParams = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
333
|
+
var {
|
|
334
|
+
callbackUrl = window.location,
|
|
335
|
+
redirect = true
|
|
336
|
+
} = options;
|
|
337
|
+
|
|
338
|
+
var baseUrl = _apiBaseUrl();
|
|
339
|
+
|
|
340
|
+
var providers = yield getProviders();
|
|
341
|
+
|
|
342
|
+
if (!(provider in providers)) {
|
|
343
|
+
window.location = "".concat(baseUrl, "/signin?callbackUrl=").concat(encodeURIComponent(callbackUrl));
|
|
344
|
+
return;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
var isCredentials = providers[provider].type === 'credentials';
|
|
348
|
+
var isEmail = providers[provider].type === 'email';
|
|
349
|
+
var canRedirectBeDisabled = isCredentials || isEmail;
|
|
350
|
+
var signInUrl = isCredentials ? "".concat(baseUrl, "/callback/").concat(provider) : "".concat(baseUrl, "/signin/").concat(provider);
|
|
351
|
+
var fetchOptions = {
|
|
352
|
+
method: 'post',
|
|
353
|
+
headers: {
|
|
354
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
355
|
+
},
|
|
356
|
+
body: new URLSearchParams(_objectSpread(_objectSpread({}, options), {}, {
|
|
357
|
+
csrfToken: yield getCsrfToken(),
|
|
1424
358
|
callbackUrl,
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
providers,
|
|
1429
|
-
isCredentials,
|
|
1430
|
-
isEmail,
|
|
1431
|
-
canRedirectBeDisabled,
|
|
1432
|
-
signInUrl,
|
|
1433
|
-
fetchOptions,
|
|
1434
|
-
_signInUrl,
|
|
1435
|
-
res,
|
|
1436
|
-
data,
|
|
1437
|
-
_data$url,
|
|
1438
|
-
url,
|
|
1439
|
-
error,
|
|
1440
|
-
_args7 = arguments;
|
|
1441
|
-
|
|
1442
|
-
return _regenerator.default.wrap(function _callee7$(_context7) {
|
|
1443
|
-
while (1) {
|
|
1444
|
-
switch (_context7.prev = _context7.next) {
|
|
1445
|
-
case 0:
|
|
1446
|
-
options = _args7.length > 1 && _args7[1] !== undefined ? _args7[1] : {};
|
|
1447
|
-
authorizationParams = _args7.length > 2 && _args7[2] !== undefined ? _args7[2] : {};
|
|
1448
|
-
_options$callbackUrl = options.callbackUrl, callbackUrl = _options$callbackUrl === void 0 ? window.location : _options$callbackUrl, _options$redirect = options.redirect, redirect = _options$redirect === void 0 ? true : _options$redirect;
|
|
1449
|
-
baseUrl = _apiBaseUrl();
|
|
1450
|
-
_context7.next = 6;
|
|
1451
|
-
return getProviders();
|
|
1452
|
-
|
|
1453
|
-
case 6:
|
|
1454
|
-
providers = _context7.sent;
|
|
1455
|
-
|
|
1456
|
-
if (provider in providers) {
|
|
1457
|
-
_context7.next = 10;
|
|
1458
|
-
break;
|
|
1459
|
-
}
|
|
359
|
+
json: true
|
|
360
|
+
}))
|
|
361
|
+
};
|
|
1460
362
|
|
|
1461
|
-
|
|
1462
|
-
return _context7.abrupt("return");
|
|
1463
|
-
|
|
1464
|
-
case 10:
|
|
1465
|
-
isCredentials = providers[provider].type === 'credentials';
|
|
1466
|
-
isEmail = providers[provider].type === 'email';
|
|
1467
|
-
canRedirectBeDisabled = isCredentials || isEmail;
|
|
1468
|
-
signInUrl = isCredentials ? "".concat(baseUrl, "/callback/").concat(provider) : "".concat(baseUrl, "/signin/").concat(provider);
|
|
1469
|
-
_context7.t0 = {
|
|
1470
|
-
'Content-Type': 'application/x-www-form-urlencoded'
|
|
1471
|
-
};
|
|
1472
|
-
_context7.t1 = URLSearchParams;
|
|
1473
|
-
_context7.t2 = _objectSpread;
|
|
1474
|
-
_context7.t3 = _objectSpread({}, options);
|
|
1475
|
-
_context7.t4 = {};
|
|
1476
|
-
_context7.next = 21;
|
|
1477
|
-
return getCsrfToken();
|
|
1478
|
-
|
|
1479
|
-
case 21:
|
|
1480
|
-
_context7.t5 = _context7.sent;
|
|
1481
|
-
_context7.t6 = callbackUrl;
|
|
1482
|
-
_context7.t7 = {
|
|
1483
|
-
csrfToken: _context7.t5,
|
|
1484
|
-
callbackUrl: _context7.t6,
|
|
1485
|
-
json: true
|
|
1486
|
-
};
|
|
1487
|
-
_context7.t8 = (0, _context7.t2)(_context7.t3, _context7.t4, _context7.t7);
|
|
1488
|
-
_context7.t9 = new _context7.t1(_context7.t8);
|
|
1489
|
-
fetchOptions = {
|
|
1490
|
-
method: 'post',
|
|
1491
|
-
headers: _context7.t0,
|
|
1492
|
-
body: _context7.t9
|
|
1493
|
-
};
|
|
1494
|
-
_signInUrl = "".concat(signInUrl, "?").concat(new URLSearchParams(authorizationParams));
|
|
1495
|
-
_context7.next = 30;
|
|
1496
|
-
return fetch(_signInUrl, fetchOptions);
|
|
1497
|
-
|
|
1498
|
-
case 30:
|
|
1499
|
-
res = _context7.sent;
|
|
1500
|
-
_context7.next = 33;
|
|
1501
|
-
return res.json();
|
|
1502
|
-
|
|
1503
|
-
case 33:
|
|
1504
|
-
data = _context7.sent;
|
|
1505
|
-
|
|
1506
|
-
if (!(redirect || !canRedirectBeDisabled)) {
|
|
1507
|
-
_context7.next = 39;
|
|
1508
|
-
break;
|
|
1509
|
-
}
|
|
363
|
+
var _signInUrl = "".concat(signInUrl, "?").concat(new URLSearchParams(authorizationParams));
|
|
1510
364
|
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
if (url.includes('#')) window.location.reload();
|
|
1514
|
-
return _context7.abrupt("return");
|
|
365
|
+
var res = yield fetch(_signInUrl, fetchOptions);
|
|
366
|
+
var data = yield res.json();
|
|
1515
367
|
|
|
1516
|
-
|
|
1517
|
-
|
|
368
|
+
if (redirect || !canRedirectBeDisabled) {
|
|
369
|
+
var _data$url;
|
|
1518
370
|
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
371
|
+
var url = (_data$url = data.url) !== null && _data$url !== void 0 ? _data$url : callbackUrl;
|
|
372
|
+
window.location = url;
|
|
373
|
+
if (url.includes('#')) window.location.reload();
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
1523
376
|
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
return _context7.stop();
|
|
1540
|
-
}
|
|
1541
|
-
}
|
|
1542
|
-
}, _callee7);
|
|
1543
|
-
}));
|
|
377
|
+
var error = new URL(data.url).searchParams.get('error');
|
|
378
|
+
|
|
379
|
+
if (res.ok) {
|
|
380
|
+
yield __NEXTAUTH._getSession({
|
|
381
|
+
event: 'storage'
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
return {
|
|
386
|
+
error,
|
|
387
|
+
status: res.status,
|
|
388
|
+
ok: res.ok,
|
|
389
|
+
url: error ? null : data.url
|
|
390
|
+
};
|
|
391
|
+
});
|
|
1544
392
|
return _signIn.apply(this, arguments);
|
|
1545
393
|
}
|
|
1546
394
|
|
|
@@ -1549,101 +397,59 @@ function signOut() {
|
|
|
1549
397
|
}
|
|
1550
398
|
|
|
1551
399
|
function _signOut() {
|
|
1552
|
-
_signOut = (
|
|
1553
|
-
var options
|
|
1554
|
-
|
|
400
|
+
_signOut = _asyncToGenerator(function* () {
|
|
401
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
402
|
+
var {
|
|
403
|
+
callbackUrl = window.location,
|
|
404
|
+
redirect = true
|
|
405
|
+
} = options;
|
|
406
|
+
|
|
407
|
+
var baseUrl = _apiBaseUrl();
|
|
408
|
+
|
|
409
|
+
var fetchOptions = {
|
|
410
|
+
method: 'post',
|
|
411
|
+
headers: {
|
|
412
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
413
|
+
},
|
|
414
|
+
body: new URLSearchParams({
|
|
415
|
+
csrfToken: yield getCsrfToken(),
|
|
1555
416
|
callbackUrl,
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
while (1) {
|
|
1568
|
-
switch (_context8.prev = _context8.next) {
|
|
1569
|
-
case 0:
|
|
1570
|
-
options = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
|
|
1571
|
-
_options$callbackUrl2 = options.callbackUrl, callbackUrl = _options$callbackUrl2 === void 0 ? window.location : _options$callbackUrl2, _options$redirect2 = options.redirect, redirect = _options$redirect2 === void 0 ? true : _options$redirect2;
|
|
1572
|
-
baseUrl = _apiBaseUrl();
|
|
1573
|
-
_context8.t0 = {
|
|
1574
|
-
'Content-Type': 'application/x-www-form-urlencoded'
|
|
1575
|
-
};
|
|
1576
|
-
_context8.t1 = URLSearchParams;
|
|
1577
|
-
_context8.next = 7;
|
|
1578
|
-
return getCsrfToken();
|
|
1579
|
-
|
|
1580
|
-
case 7:
|
|
1581
|
-
_context8.t2 = _context8.sent;
|
|
1582
|
-
_context8.t3 = callbackUrl;
|
|
1583
|
-
_context8.t4 = {
|
|
1584
|
-
csrfToken: _context8.t2,
|
|
1585
|
-
callbackUrl: _context8.t3,
|
|
1586
|
-
json: true
|
|
1587
|
-
};
|
|
1588
|
-
_context8.t5 = new _context8.t1(_context8.t4);
|
|
1589
|
-
fetchOptions = {
|
|
1590
|
-
method: 'post',
|
|
1591
|
-
headers: _context8.t0,
|
|
1592
|
-
body: _context8.t5
|
|
1593
|
-
};
|
|
1594
|
-
_context8.next = 14;
|
|
1595
|
-
return fetch("".concat(baseUrl, "/signout"), fetchOptions);
|
|
1596
|
-
|
|
1597
|
-
case 14:
|
|
1598
|
-
res = _context8.sent;
|
|
1599
|
-
_context8.next = 17;
|
|
1600
|
-
return res.json();
|
|
1601
|
-
|
|
1602
|
-
case 17:
|
|
1603
|
-
data = _context8.sent;
|
|
1604
|
-
broadcast.post({
|
|
1605
|
-
event: 'session',
|
|
1606
|
-
data: {
|
|
1607
|
-
trigger: 'signout'
|
|
1608
|
-
}
|
|
1609
|
-
});
|
|
1610
|
-
|
|
1611
|
-
if (!redirect) {
|
|
1612
|
-
_context8.next = 24;
|
|
1613
|
-
break;
|
|
1614
|
-
}
|
|
1615
|
-
|
|
1616
|
-
url = (_data$url2 = data.url) !== null && _data$url2 !== void 0 ? _data$url2 : callbackUrl;
|
|
1617
|
-
window.location = url;
|
|
1618
|
-
if (url.includes('#')) window.location.reload();
|
|
1619
|
-
return _context8.abrupt("return");
|
|
417
|
+
json: true
|
|
418
|
+
})
|
|
419
|
+
};
|
|
420
|
+
var res = yield fetch("".concat(baseUrl, "/signout"), fetchOptions);
|
|
421
|
+
var data = yield res.json();
|
|
422
|
+
broadcast.post({
|
|
423
|
+
event: 'session',
|
|
424
|
+
data: {
|
|
425
|
+
trigger: 'signout'
|
|
426
|
+
}
|
|
427
|
+
});
|
|
1620
428
|
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
return __NEXTAUTH._getSession({
|
|
1624
|
-
event: 'storage'
|
|
1625
|
-
});
|
|
429
|
+
if (redirect) {
|
|
430
|
+
var _data$url2;
|
|
1626
431
|
|
|
1627
|
-
|
|
1628
|
-
|
|
432
|
+
var url = (_data$url2 = data.url) !== null && _data$url2 !== void 0 ? _data$url2 : callbackUrl;
|
|
433
|
+
window.location = url;
|
|
434
|
+
if (url.includes('#')) window.location.reload();
|
|
435
|
+
return;
|
|
436
|
+
}
|
|
1629
437
|
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
}, _callee8);
|
|
1636
|
-
}));
|
|
438
|
+
yield __NEXTAUTH._getSession({
|
|
439
|
+
event: 'storage'
|
|
440
|
+
});
|
|
441
|
+
return data;
|
|
442
|
+
});
|
|
1637
443
|
return _signOut.apply(this, arguments);
|
|
1638
444
|
}
|
|
1639
445
|
|
|
1640
446
|
function setOptions() {
|
|
1641
|
-
var
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
447
|
+
var {
|
|
448
|
+
baseUrl,
|
|
449
|
+
basePath,
|
|
450
|
+
clientMaxAge,
|
|
451
|
+
keepAlive
|
|
452
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1647
453
|
if (baseUrl) __NEXTAUTH.baseUrl = baseUrl;
|
|
1648
454
|
if (basePath) __NEXTAUTH.basePath = basePath;
|
|
1649
455
|
if (clientMaxAge) __NEXTAUTH.clientMaxAge = clientMaxAge;
|
|
@@ -1656,40 +462,23 @@ function setOptions() {
|
|
|
1656
462
|
clearTimeout(__NEXTAUTH._clientSyncTimer);
|
|
1657
463
|
}
|
|
1658
464
|
|
|
1659
|
-
__NEXTAUTH._clientSyncTimer = setTimeout((
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
_context2.next = 2;
|
|
1666
|
-
break;
|
|
1667
|
-
}
|
|
1668
|
-
|
|
1669
|
-
return _context2.abrupt("return");
|
|
1670
|
-
|
|
1671
|
-
case 2:
|
|
1672
|
-
_context2.next = 4;
|
|
1673
|
-
return __NEXTAUTH._getSession({
|
|
1674
|
-
event: 'timer'
|
|
1675
|
-
});
|
|
1676
|
-
|
|
1677
|
-
case 4:
|
|
1678
|
-
case "end":
|
|
1679
|
-
return _context2.stop();
|
|
1680
|
-
}
|
|
1681
|
-
}
|
|
1682
|
-
}, _callee2);
|
|
1683
|
-
})), keepAlive * 1000);
|
|
465
|
+
__NEXTAUTH._clientSyncTimer = setTimeout(_asyncToGenerator(function* () {
|
|
466
|
+
if (!__NEXTAUTH._clientSession) return;
|
|
467
|
+
yield __NEXTAUTH._getSession({
|
|
468
|
+
event: 'timer'
|
|
469
|
+
});
|
|
470
|
+
}), keepAlive * 1000);
|
|
1684
471
|
}
|
|
1685
472
|
}
|
|
1686
473
|
|
|
1687
|
-
function Provider(
|
|
1688
|
-
var
|
|
1689
|
-
|
|
1690
|
-
|
|
474
|
+
function Provider(_ref3) {
|
|
475
|
+
var {
|
|
476
|
+
children,
|
|
477
|
+
session,
|
|
478
|
+
options
|
|
479
|
+
} = _ref3;
|
|
1691
480
|
setOptions(options);
|
|
1692
|
-
return (0,
|
|
481
|
+
return (0, React.createElement)(SessionContext.Provider, {
|
|
1693
482
|
value: useSession(session)
|
|
1694
483
|
}, children);
|
|
1695
484
|
}
|
|
@@ -1699,58 +488,27 @@ function _fetchData(_x4) {
|
|
|
1699
488
|
}
|
|
1700
489
|
|
|
1701
490
|
function _fetchData2() {
|
|
1702
|
-
_fetchData2 = (
|
|
1703
|
-
var
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
return _regenerator.default.wrap(function _callee9$(_context9) {
|
|
1714
|
-
while (1) {
|
|
1715
|
-
switch (_context9.prev = _context9.next) {
|
|
1716
|
-
case 0:
|
|
1717
|
-
_ref7 = _args9.length > 1 && _args9[1] !== undefined ? _args9[1] : {}, ctx = _ref7.ctx, _ref7$req = _ref7.req, req = _ref7$req === void 0 ? ctx === null || ctx === void 0 ? void 0 : ctx.req : _ref7$req;
|
|
1718
|
-
_context9.prev = 1;
|
|
1719
|
-
_context9.next = 4;
|
|
1720
|
-
return _apiBaseUrl();
|
|
1721
|
-
|
|
1722
|
-
case 4:
|
|
1723
|
-
baseUrl = _context9.sent;
|
|
1724
|
-
options = req ? {
|
|
1725
|
-
headers: {
|
|
1726
|
-
cookie: req.headers.cookie
|
|
1727
|
-
}
|
|
1728
|
-
} : {};
|
|
1729
|
-
_context9.next = 8;
|
|
1730
|
-
return fetch("".concat(baseUrl, "/").concat(path), options);
|
|
1731
|
-
|
|
1732
|
-
case 8:
|
|
1733
|
-
res = _context9.sent;
|
|
1734
|
-
_context9.next = 11;
|
|
1735
|
-
return res.json();
|
|
1736
|
-
|
|
1737
|
-
case 11:
|
|
1738
|
-
data = _context9.sent;
|
|
1739
|
-
return _context9.abrupt("return", Object.keys(data).length > 0 ? data : null);
|
|
1740
|
-
|
|
1741
|
-
case 15:
|
|
1742
|
-
_context9.prev = 15;
|
|
1743
|
-
_context9.t0 = _context9["catch"](1);
|
|
1744
|
-
logger$1.error('CLIENT_FETCH_ERROR', path, _context9.t0);
|
|
1745
|
-
return _context9.abrupt("return", null);
|
|
1746
|
-
|
|
1747
|
-
case 19:
|
|
1748
|
-
case "end":
|
|
1749
|
-
return _context9.stop();
|
|
491
|
+
_fetchData2 = _asyncToGenerator(function* (path) {
|
|
492
|
+
var {
|
|
493
|
+
ctx,
|
|
494
|
+
req = ctx === null || ctx === void 0 ? void 0 : ctx.req
|
|
495
|
+
} = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
496
|
+
|
|
497
|
+
try {
|
|
498
|
+
var baseUrl = yield _apiBaseUrl();
|
|
499
|
+
var options = req ? {
|
|
500
|
+
headers: {
|
|
501
|
+
cookie: req.headers.cookie
|
|
1750
502
|
}
|
|
1751
|
-
}
|
|
1752
|
-
|
|
1753
|
-
|
|
503
|
+
} : {};
|
|
504
|
+
var res = yield fetch("".concat(baseUrl, "/").concat(path), options);
|
|
505
|
+
var data = yield res.json();
|
|
506
|
+
return Object.keys(data).length > 0 ? data : null;
|
|
507
|
+
} catch (error) {
|
|
508
|
+
logger$1.error('CLIENT_FETCH_ERROR', path, error);
|
|
509
|
+
return null;
|
|
510
|
+
}
|
|
511
|
+
});
|
|
1754
512
|
return _fetchData2.apply(this, arguments);
|
|
1755
513
|
}
|
|
1756
514
|
|
|
@@ -1773,66 +531,41 @@ function _now() {
|
|
|
1773
531
|
function BroadcastChannel() {
|
|
1774
532
|
var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'nextauth.message';
|
|
1775
533
|
return {
|
|
1776
|
-
receive
|
|
534
|
+
receive(onReceive) {
|
|
1777
535
|
if (typeof window === 'undefined') return;
|
|
1778
536
|
window.addEventListener('storage', function () {
|
|
1779
|
-
var
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
if (!(event.key !== name)) {
|
|
1786
|
-
_context3.next = 2;
|
|
1787
|
-
break;
|
|
1788
|
-
}
|
|
1789
|
-
|
|
1790
|
-
return _context3.abrupt("return");
|
|
1791
|
-
|
|
1792
|
-
case 2:
|
|
1793
|
-
message = JSON.parse(event.newValue);
|
|
1794
|
-
|
|
1795
|
-
if (!((message === null || message === void 0 ? void 0 : message.event) !== 'session' || !(message !== null && message !== void 0 && message.data))) {
|
|
1796
|
-
_context3.next = 5;
|
|
1797
|
-
break;
|
|
1798
|
-
}
|
|
1799
|
-
|
|
1800
|
-
return _context3.abrupt("return");
|
|
1801
|
-
|
|
1802
|
-
case 5:
|
|
1803
|
-
onReceive(message);
|
|
1804
|
-
|
|
1805
|
-
case 6:
|
|
1806
|
-
case "end":
|
|
1807
|
-
return _context3.stop();
|
|
1808
|
-
}
|
|
1809
|
-
}
|
|
1810
|
-
}, _callee3);
|
|
1811
|
-
}));
|
|
537
|
+
var _ref4 = _asyncToGenerator(function* (event) {
|
|
538
|
+
if (event.key !== name) return;
|
|
539
|
+
var message = JSON.parse(event.newValue);
|
|
540
|
+
if ((message === null || message === void 0 ? void 0 : message.event) !== 'session' || !(message !== null && message !== void 0 && message.data)) return;
|
|
541
|
+
onReceive(message);
|
|
542
|
+
});
|
|
1812
543
|
|
|
1813
544
|
return function (_x5) {
|
|
1814
|
-
return
|
|
545
|
+
return _ref4.apply(this, arguments);
|
|
1815
546
|
};
|
|
1816
547
|
}());
|
|
1817
548
|
},
|
|
1818
|
-
|
|
549
|
+
|
|
550
|
+
post(message) {
|
|
1819
551
|
if (typeof localStorage === 'undefined') return;
|
|
1820
552
|
localStorage.setItem(name, JSON.stringify(_objectSpread(_objectSpread({}, message), {}, {
|
|
1821
553
|
timestamp: _now()
|
|
1822
554
|
})));
|
|
1823
555
|
}
|
|
556
|
+
|
|
1824
557
|
};
|
|
1825
558
|
}
|
|
1826
559
|
|
|
1827
560
|
var _default = {
|
|
1828
|
-
getSession
|
|
1829
|
-
getCsrfToken
|
|
1830
|
-
getProviders
|
|
1831
|
-
useSession
|
|
1832
|
-
signIn
|
|
1833
|
-
signOut
|
|
1834
|
-
Provider
|
|
1835
|
-
setOptions
|
|
561
|
+
getSession,
|
|
562
|
+
getCsrfToken,
|
|
563
|
+
getProviders,
|
|
564
|
+
useSession,
|
|
565
|
+
signIn,
|
|
566
|
+
signOut,
|
|
567
|
+
Provider,
|
|
568
|
+
setOptions,
|
|
1836
569
|
options: setOptions,
|
|
1837
570
|
session: getSession,
|
|
1838
571
|
providers: getProviders,
|
|
@@ -1845,17 +578,10 @@ exports.default = _default;
|
|
|
1845
578
|
|
|
1846
579
|
unwrapExports(client$1);
|
|
1847
580
|
client$1.useSession;
|
|
1848
|
-
client$1.session;
|
|
1849
581
|
client$1.getSession;
|
|
1850
|
-
client$1.csrfToken;
|
|
1851
|
-
client$1.getCsrfToken;
|
|
1852
|
-
client$1.providers;
|
|
1853
582
|
client$1.getProviders;
|
|
1854
|
-
client$1.signin;
|
|
1855
583
|
client$1.signIn;
|
|
1856
|
-
client$1.signout;
|
|
1857
584
|
client$1.signOut;
|
|
1858
|
-
client$1.options;
|
|
1859
585
|
client$1.setOptions;
|
|
1860
586
|
client$1.Provider;
|
|
1861
587
|
|
|
@@ -1901,7 +627,7 @@ var AuthWrapper = function AuthWrapper(_ref) {
|
|
|
1901
627
|
}, []);
|
|
1902
628
|
|
|
1903
629
|
if (session || !needAuth) {
|
|
1904
|
-
return
|
|
630
|
+
return React.createElement(
|
|
1905
631
|
'div',
|
|
1906
632
|
null,
|
|
1907
633
|
children
|
|
@@ -1909,44 +635,44 @@ var AuthWrapper = function AuthWrapper(_ref) {
|
|
|
1909
635
|
}
|
|
1910
636
|
|
|
1911
637
|
if (!loading) {
|
|
1912
|
-
return
|
|
638
|
+
return React.createElement(
|
|
1913
639
|
'div',
|
|
1914
640
|
{ style: { position: 'relative', minHeight: '300px', paddingTop: '2rem' } },
|
|
1915
|
-
callbackUrl &&
|
|
641
|
+
callbackUrl && React.createElement(
|
|
1916
642
|
'div',
|
|
1917
643
|
null,
|
|
1918
|
-
!showForm &&
|
|
644
|
+
!showForm && React.createElement(
|
|
1919
645
|
'div',
|
|
1920
646
|
{ className: styles.loginBox },
|
|
1921
|
-
|
|
647
|
+
React.createElement(
|
|
1922
648
|
'div',
|
|
1923
649
|
{ className: styles.loginBox_title },
|
|
1924
|
-
|
|
650
|
+
React.createElement(
|
|
1925
651
|
'b',
|
|
1926
652
|
null,
|
|
1927
653
|
'Please log in to view this content.'
|
|
1928
654
|
)
|
|
1929
655
|
),
|
|
1930
|
-
|
|
656
|
+
React.createElement(
|
|
1931
657
|
Form,
|
|
1932
658
|
{ onSubmit: function onSubmit(e) {
|
|
1933
659
|
return e.preventDefault();
|
|
1934
660
|
} },
|
|
1935
|
-
|
|
661
|
+
React.createElement(
|
|
1936
662
|
Form.Group,
|
|
1937
663
|
{ controlId: 'email' },
|
|
1938
|
-
|
|
664
|
+
React.createElement(Form.Control, { type: 'email', onChange: function onChange(e) {
|
|
1939
665
|
return setEmail(e.target.value);
|
|
1940
666
|
}, placeholder: 'Email' })
|
|
1941
667
|
),
|
|
1942
|
-
|
|
668
|
+
React.createElement(
|
|
1943
669
|
Form.Group,
|
|
1944
670
|
{ controlId: 'password' },
|
|
1945
|
-
|
|
671
|
+
React.createElement(Form.Control, { type: 'password', onChange: function onChange(e) {
|
|
1946
672
|
return setPassword(e.target.value);
|
|
1947
673
|
}, placeholder: 'Password' })
|
|
1948
674
|
),
|
|
1949
|
-
|
|
675
|
+
React.createElement(
|
|
1950
676
|
'button',
|
|
1951
677
|
{ className: 'btn btn-primary btn-block', onClick: function onClick() {
|
|
1952
678
|
return client.signIn('credentials', { email: email, password: password, callbackUrl: callbackUrl });
|
|
@@ -1954,12 +680,12 @@ var AuthWrapper = function AuthWrapper(_ref) {
|
|
|
1954
680
|
'Sign in'
|
|
1955
681
|
)
|
|
1956
682
|
),
|
|
1957
|
-
|
|
683
|
+
React.createElement(
|
|
1958
684
|
'p',
|
|
1959
685
|
{ style: { textAlign: 'center' }, className: 'mt-2 mb-0' },
|
|
1960
686
|
'Don\'t have an account?',
|
|
1961
687
|
' ',
|
|
1962
|
-
|
|
688
|
+
React.createElement(
|
|
1963
689
|
'a',
|
|
1964
690
|
{ style: { color: 'blue', textDecoration: 'underline' }, onClick: function onClick() {
|
|
1965
691
|
return setShowForm(!showForm);
|
|
@@ -1968,13 +694,13 @@ var AuthWrapper = function AuthWrapper(_ref) {
|
|
|
1968
694
|
),
|
|
1969
695
|
' to register.'
|
|
1970
696
|
),
|
|
1971
|
-
|
|
697
|
+
React.createElement(
|
|
1972
698
|
'p',
|
|
1973
699
|
{ className: 'mt-1', style: { fontSize: '.8em', textAlign: 'center' } },
|
|
1974
|
-
|
|
700
|
+
React.createElement(
|
|
1975
701
|
'em',
|
|
1976
702
|
null,
|
|
1977
|
-
|
|
703
|
+
React.createElement(
|
|
1978
704
|
'a',
|
|
1979
705
|
{ href: '/forgotpassword', style: { color: 'blue', textDecoration: 'underline' } },
|
|
1980
706
|
'Forgot your password? '
|
|
@@ -1982,7 +708,7 @@ var AuthWrapper = function AuthWrapper(_ref) {
|
|
|
1982
708
|
)
|
|
1983
709
|
)
|
|
1984
710
|
),
|
|
1985
|
-
showForm &&
|
|
711
|
+
showForm && React.createElement('iframe', { className: styles.iframe, src: formUrl })
|
|
1986
712
|
)
|
|
1987
713
|
);
|
|
1988
714
|
} else {
|