@mjhls/mjh-framework 1.0.1023-blanktagremoval-v1 → 1.0.1023

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