@mjhls/mjh-framework 1.0.990-next-12-03 → 1.0.990

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