@mjhls/mjh-framework 1.0.854 → 1.0.855-beta.0

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 (319) hide show
  1. package/README.md +168 -168
  2. package/dist/cjs/AD.js +9 -10
  3. package/dist/cjs/AD300x250.js +30 -31
  4. package/dist/cjs/AD300x250x600.js +30 -31
  5. package/dist/cjs/AD728x90.js +33 -34
  6. package/dist/cjs/ADFloatingFooter.js +32 -33
  7. package/dist/cjs/ADFooter.js +14 -15
  8. package/dist/cjs/ADGutter.js +32 -33
  9. package/dist/cjs/{ADInfeed-fb136f1d.js → ADInfeed-98c71bcd.js} +13 -15
  10. package/dist/cjs/ADSkyscraper.js +32 -33
  11. package/dist/cjs/ADSponsoredResources.js +32 -33
  12. package/dist/cjs/ADWebcast.js +32 -33
  13. package/dist/cjs/ADWelcome.js +33 -34
  14. package/dist/cjs/{ADlgInfeed-d303d27e.js → ADlgInfeed-9de32585.js} +10 -11
  15. package/dist/cjs/AccordionPanel.js +29 -31
  16. package/dist/cjs/AdSlot.js +35 -36
  17. package/dist/cjs/AdSlotsProvider.js +911 -20
  18. package/dist/cjs/AlgoliaSearch.js +1274 -1392
  19. package/dist/cjs/AlphabeticList.js +25 -26
  20. package/dist/cjs/ArticleCarousel.js +23 -24
  21. package/dist/cjs/ArticleProgramLandingPage.js +59 -60
  22. package/dist/cjs/ArticleSeriesLandingPage.js +40 -41
  23. package/dist/cjs/ArticleSeriesListing.js +61 -62
  24. package/dist/cjs/Auth.js +1506 -682
  25. package/dist/cjs/AuthWrapper.js +269 -311
  26. package/dist/cjs/{AuthorComponent-c21aac7f.js → AuthorComponent-bb831b74.js} +13 -14
  27. package/dist/cjs/Beam.js +8 -8
  28. package/dist/cjs/{BlockContent-36e54d77.js → BlockContent-091a991f.js} +55 -56
  29. package/dist/cjs/Breadcrumbs.js +27 -29
  30. package/dist/cjs/CMEDeck.js +83 -83
  31. package/dist/cjs/Column1.js +11 -14
  32. package/dist/cjs/Column2.js +33 -36
  33. package/dist/cjs/Column3.js +59 -62
  34. package/dist/cjs/ConferenceArticleCard.js +37 -38
  35. package/dist/cjs/ConferenceBanner-4a16fddc.js +23 -0
  36. package/dist/cjs/DeckContent.js +103 -107
  37. package/dist/cjs/DeckQueue.js +88 -92
  38. package/dist/cjs/{Dfp-93399f8c.js → Dfp-26baccf1.js} +34 -35
  39. package/dist/cjs/EventsDeck.js +152 -159
  40. package/dist/cjs/ExternalResources.js +80 -81
  41. package/dist/cjs/Feature.js +24 -26
  42. package/dist/cjs/ForbesHero.js +42 -43
  43. package/dist/cjs/GridContent.js +233 -238
  44. package/dist/cjs/GridHero.js +44 -45
  45. package/dist/cjs/GroupDeck.js +59 -60
  46. package/dist/cjs/HamMagazine.js +140 -145
  47. package/dist/cjs/Header.js +12 -14
  48. package/dist/cjs/Hero.js +12 -13
  49. package/dist/cjs/HighlightenVideo.js +17 -18
  50. package/dist/cjs/HorizontalArticleListing.js +72 -73
  51. package/dist/cjs/HorizontalHero.js +24 -25
  52. package/dist/cjs/IssueContentDeck.js +73 -78
  53. package/dist/cjs/IssueDeck.js +72 -77
  54. package/dist/cjs/IssueLanding.js +95 -96
  55. package/dist/cjs/KMTracker.js +15 -15
  56. package/dist/cjs/LeftNav.js +39 -41
  57. package/dist/cjs/MasterDeck.js +80 -81
  58. package/dist/cjs/MediaSeriesLanding.js +1125 -1116
  59. package/dist/cjs/NavDvm.js +74 -79
  60. package/dist/cjs/{NavFooter-3dcd99a8.js → NavFooter-76c913e3.js} +14 -15
  61. package/dist/cjs/NavMagazine.js +147 -152
  62. package/dist/cjs/NavNative.js +139 -147
  63. package/dist/cjs/OncliveHero.js +19 -19
  64. package/dist/cjs/OncliveLargeHero.js +72 -73
  65. package/dist/cjs/PageFilter.js +14 -15
  66. package/dist/cjs/PartnerDetailListing.js +1206 -109
  67. package/dist/cjs/PdfDownload.js +8 -9
  68. package/dist/cjs/PopUpModal.js +19 -21
  69. package/dist/cjs/PubSection.js +42 -43
  70. package/dist/cjs/PubToc.js +15 -16
  71. package/dist/cjs/PublicationDeck.js +62 -67
  72. package/dist/cjs/PublicationLanding.js +135 -139
  73. package/dist/cjs/QueueDeckExpanded.js +310 -310
  74. package/dist/cjs/RecentNews.js +21 -22
  75. package/dist/cjs/RelatedContent.js +54 -55
  76. package/dist/cjs/RelatedTopicsDropdown.js +29 -32
  77. package/dist/cjs/RolesDeck.js +27 -32
  78. package/dist/cjs/Search.js +18 -22
  79. package/dist/cjs/Segment.js +6 -6
  80. package/dist/cjs/SeriesListingDeck.js +38 -38
  81. package/dist/cjs/{SeriesSlider-cbab9f0f.js → SeriesSlider-8bbc989f.js} +39 -40
  82. package/dist/cjs/SetCookie.js +1 -1
  83. package/dist/cjs/SideFooter.js +38 -39
  84. package/dist/cjs/SocialIcons.js +9 -10
  85. package/dist/cjs/{SocialSearchComponent-ecb4f972.js → SocialSearchComponent-cea213aa.js} +36 -40
  86. package/dist/cjs/SocialShare.js +29 -31
  87. package/dist/cjs/TaxonomyCard.js +59 -64
  88. package/dist/cjs/TaxonomyDescription.js +55 -56
  89. package/dist/cjs/TemplateNormal.js +74 -75
  90. package/dist/cjs/ThumbnailCard.js +21 -23
  91. package/dist/cjs/Ustream.js +29 -30
  92. package/dist/cjs/VerticalHero.js +16 -17
  93. package/dist/cjs/VideoProgramLandingPage.js +74 -78
  94. package/dist/cjs/VideoSeriesCard.js +32 -33
  95. package/dist/cjs/VideoSeriesFilter.js +18 -18
  96. package/dist/cjs/VideoSeriesLandingPage.js +49 -50
  97. package/dist/cjs/VideoSeriesListing.js +78 -79
  98. package/dist/cjs/View.js +263 -266
  99. package/dist/cjs/YahooHero.js +41 -42
  100. package/dist/cjs/YoutubeGroup.js +66 -67
  101. package/dist/cjs/{_is-array-6128bd56.js → _is-array-754e012d.js} +6 -6
  102. package/dist/cjs/{_iter-detect-55a5657a.js → _iter-detect-60b2f026.js} +8 -8
  103. package/dist/cjs/{_object-pie-083f2dd6.js → _object-pie-68c5bcbc.js} +4 -4
  104. package/dist/cjs/{_object-sap-a175b4a9.js → _object-sap-5e74ba08.js} +1 -1
  105. package/dist/cjs/{_object-to-array-8fe5a54f.js → _object-to-array-5762f850.js} +2 -2
  106. package/dist/cjs/{_to-object-6de10e57.js → _to-object-329a650b.js} +8 -8
  107. package/dist/cjs/{asyncToGenerator-58c289d9.js → asyncToGenerator-140e5f89.js} +32 -32
  108. package/dist/cjs/{brightcove-react-player-loader.es-a195642e.js → brightcove-react-player-loader.es-156bd4d6.js} +9 -11
  109. package/dist/cjs/{core.get-iterator-method-f474eacc.js → core.get-iterator-method-f62321d4.js} +2 -2
  110. package/dist/cjs/{debounce-d4a2369b.js → debounce-529c8d06.js} +2 -2
  111. package/dist/cjs/{define-property-c88be878.js → define-property-f4d12f4e.js} +6 -6
  112. package/dist/cjs/{defineProperty-0cb76d99.js → defineProperty-55548b25.js} +1 -1
  113. package/dist/cjs/{entities-3f9d0f2f.js → entities-310b46ee.js} +1 -1
  114. package/dist/cjs/{eq-5fc26c07.js → eq-bb2843ed.js} +1 -1
  115. package/dist/cjs/{es6.string.iterator-c2573ffd.js → es6.string.iterator-cc0bbaa4.js} +6 -6
  116. package/dist/cjs/{extends-29bdbc6d.js → extends-0a918631.js} +7 -7
  117. package/dist/cjs/faundadb.js +7 -7
  118. package/dist/cjs/{get-5839e5b5.js → get-adbb11e3.js} +21 -21
  119. package/dist/cjs/getRelatedArticle.js +20 -20
  120. package/dist/cjs/getRootDocGroup.js +6 -6
  121. package/dist/cjs/getSerializers.js +45 -45
  122. package/dist/cjs/{getTargeting-faf37284.js → getTargeting-f1821260.js} +12 -12
  123. package/dist/cjs/getTargeting.js +8 -8
  124. package/dist/cjs/iconBase-68959171.js +3 -0
  125. package/dist/cjs/{index-f86bb269.js → index-3294d3bc.js} +45 -44
  126. package/dist/cjs/{index-d8793467.js → index-665ed72e.js} +1090 -1089
  127. package/dist/cjs/{index-eadd5035.js → index-96b3db50.js} +15 -17
  128. package/dist/cjs/{index-fc2f1ca2.js → index-98e01cb9.js} +12 -13
  129. package/dist/cjs/{index-efca863c.js → index-be0c82be.js} +30 -36
  130. package/dist/cjs/{index-8041a4eb.js → index-e2e62963.js} +1 -11
  131. package/dist/cjs/{index.es-f3e47207.js → index.es-9110add6.js} +12 -31
  132. package/dist/cjs/{index.esm-8123cf40.js → index.esm-4d410430.js} +20 -20
  133. package/dist/cjs/{index.esm-974f47d9.js → index.esm-90433435.js} +15 -6
  134. package/dist/cjs/{index.esm-44f3e2d0.js → index.esm-e32d3e8e.js} +6 -3
  135. package/dist/cjs/{index.esm-05850a2f.js → index.esm-ff47db6f.js} +12 -5
  136. package/dist/cjs/index.js +166 -171
  137. package/dist/cjs/{inherits-c2065b95.js → inherits-452ff02c.js} +19 -19
  138. package/dist/cjs/inherits-8d29278d.js +110 -0
  139. package/dist/cjs/{isSymbol-03abbdf0.js → isSymbol-04666465.js} +15 -15
  140. package/dist/cjs/keys-a586b7a0.js +25 -0
  141. package/dist/cjs/{lodash-f0783643.js → lodash-fc2922d0.js} +31 -128
  142. package/dist/cjs/main-02daeefe.js +862 -0
  143. package/dist/cjs/{md5-e1ca5797.js → md5-5039b1a6.js} +1 -1
  144. package/dist/cjs/{moment-aca40de1.js → moment-575fe24c.js} +9 -11
  145. package/dist/cjs/{react-social-icons-af932527.js → react-social-icons-f7f48f71.js} +27 -28
  146. package/dist/cjs/{slicedToArray-5d1bc3b3.js → slicedToArray-8f385299.js} +14 -14
  147. package/dist/cjs/{smoothscroll-99df7f93.js → smoothscroll-5054361f.js} +1 -1
  148. package/dist/cjs/stringify-7c5aff47.js +17 -0
  149. package/dist/cjs/timeDifferenceCalc.js +1 -1
  150. package/dist/cjs/{toConsumableArray-ddb70795.js → toConsumableArray-9a3476fe.js} +9 -9
  151. package/dist/cjs/{toNumber-5e1fac58.js → toNumber-36d1e7e5.js} +5 -40
  152. package/dist/cjs/{typeof-88a668c5.js → typeof-725500bc.js} +36 -36
  153. package/dist/cjs/urlFor.js +3 -3
  154. package/dist/cjs/{ustream-api-b2b9092f.js → ustream-api-d092dc31.js} +4 -4
  155. package/dist/cjs/{util-6f784d85.js → util-f2c1b65b.js} +1 -1
  156. package/dist/cjs/{visibility-sensor-eb2c5b69.js → visibility-sensor-ad5e3116.js} +5 -7
  157. package/dist/cjs/{web.dom.iterable-46657b5c.js → web.dom.iterable-a0e279c1.js} +3 -3
  158. package/dist/esm/AD.js +7 -7
  159. package/dist/esm/AD300x250.js +27 -27
  160. package/dist/esm/AD300x250x600.js +27 -27
  161. package/dist/esm/AD728x90.js +30 -30
  162. package/dist/esm/ADFloatingFooter.js +29 -29
  163. package/dist/esm/ADFooter.js +11 -11
  164. package/dist/esm/ADGutter.js +29 -29
  165. package/dist/esm/{ADInfeed-df562a07.js → ADInfeed-1cc9d817.js} +11 -11
  166. package/dist/esm/ADSkyscraper.js +29 -29
  167. package/dist/esm/ADSponsoredResources.js +29 -29
  168. package/dist/esm/ADWebcast.js +29 -29
  169. package/dist/esm/ADWelcome.js +30 -30
  170. package/dist/esm/{ADlgInfeed-53992119.js → ADlgInfeed-8c4f129e.js} +8 -8
  171. package/dist/esm/AccordionPanel.js +24 -24
  172. package/dist/esm/AdSlot.js +27 -27
  173. package/dist/esm/AdSlotsProvider.js +909 -17
  174. package/dist/esm/AlgoliaSearch.js +703 -820
  175. package/dist/esm/AlphabeticList.js +22 -22
  176. package/dist/esm/ArticleCarousel.js +20 -20
  177. package/dist/esm/ArticleProgramLandingPage.js +56 -56
  178. package/dist/esm/ArticleSeriesLandingPage.js +37 -37
  179. package/dist/esm/ArticleSeriesListing.js +57 -57
  180. package/dist/esm/Auth.js +1489 -661
  181. package/dist/esm/AuthWrapper.js +267 -308
  182. package/dist/esm/{AuthorComponent-5ae7409f.js → AuthorComponent-34b16174.js} +11 -11
  183. package/dist/esm/Beam.js +8 -8
  184. package/dist/esm/{BlockContent-52cf21c5.js → BlockContent-e9b4ddcf.js} +35 -35
  185. package/dist/esm/Breadcrumbs.js +17 -17
  186. package/dist/esm/CMEDeck.js +79 -79
  187. package/dist/esm/Column1.js +9 -9
  188. package/dist/esm/Column2.js +30 -30
  189. package/dist/esm/Column3.js +56 -56
  190. package/dist/esm/ConferenceArticleCard.js +35 -35
  191. package/dist/esm/{ConferenceBanner-9162d0ca.js → ConferenceBanner-8792ebd2.js} +4 -4
  192. package/dist/esm/DeckContent.js +98 -98
  193. package/dist/esm/DeckQueue.js +83 -83
  194. package/dist/esm/{Dfp-43f121ff.js → Dfp-b7236041.js} +22 -22
  195. package/dist/esm/EventsDeck.js +129 -129
  196. package/dist/esm/ExternalResources.js +74 -74
  197. package/dist/esm/Feature.js +18 -18
  198. package/dist/esm/ForbesHero.js +35 -35
  199. package/dist/esm/GridContent.js +201 -201
  200. package/dist/esm/GridHero.js +37 -37
  201. package/dist/esm/GroupDeck.js +47 -47
  202. package/dist/esm/HamMagazine.js +116 -116
  203. package/dist/esm/Header.js +8 -8
  204. package/dist/esm/Hero.js +10 -10
  205. package/dist/esm/HighlightenVideo.js +14 -14
  206. package/dist/esm/HorizontalArticleListing.js +69 -69
  207. package/dist/esm/HorizontalHero.js +22 -22
  208. package/dist/esm/IssueContentDeck.js +61 -61
  209. package/dist/esm/IssueDeck.js +65 -65
  210. package/dist/esm/IssueLanding.js +92 -92
  211. package/dist/esm/KMTracker.js +15 -15
  212. package/dist/esm/LeftNav.js +35 -35
  213. package/dist/esm/MasterDeck.js +77 -77
  214. package/dist/esm/MediaSeriesLanding.js +853 -841
  215. package/dist/esm/NavDvm.js +59 -59
  216. package/dist/esm/{NavFooter-c29526b7.js → NavFooter-e27bd93b.js} +12 -12
  217. package/dist/esm/NavMagazine.js +126 -126
  218. package/dist/esm/NavNative.js +116 -116
  219. package/dist/esm/OncliveHero.js +17 -16
  220. package/dist/esm/OncliveLargeHero.js +60 -60
  221. package/dist/esm/PageFilter.js +12 -12
  222. package/dist/esm/PartnerDetailListing.js +1204 -107
  223. package/dist/esm/PdfDownload.js +6 -6
  224. package/dist/esm/PopUpModal.js +14 -14
  225. package/dist/esm/PubSection.js +39 -39
  226. package/dist/esm/PubToc.js +12 -12
  227. package/dist/esm/PublicationDeck.js +53 -53
  228. package/dist/esm/PublicationLanding.js +122 -122
  229. package/dist/esm/QueueDeckExpanded.js +275 -275
  230. package/dist/esm/RecentNews.js +19 -19
  231. package/dist/esm/RelatedContent.js +48 -48
  232. package/dist/esm/RelatedTopicsDropdown.js +21 -21
  233. package/dist/esm/RolesDeck.js +25 -25
  234. package/dist/esm/Search.js +13 -13
  235. package/dist/esm/Segment.js +6 -6
  236. package/dist/esm/SeriesListingDeck.js +32 -32
  237. package/dist/esm/{SeriesSlider-5c62a578.js → SeriesSlider-a866bb21.js} +31 -31
  238. package/dist/esm/SetCookie.js +1 -1
  239. package/dist/esm/SideFooter.js +34 -34
  240. package/dist/esm/SocialIcons.js +7 -7
  241. package/dist/esm/{SocialSearchComponent-cd38ae60.js → SocialSearchComponent-03c3e869.js} +30 -30
  242. package/dist/esm/SocialShare.js +25 -25
  243. package/dist/esm/TaxonomyCard.js +54 -54
  244. package/dist/esm/TaxonomyDescription.js +50 -50
  245. package/dist/esm/TemplateNormal.js +70 -70
  246. package/dist/esm/ThumbnailCard.js +14 -14
  247. package/dist/esm/Ustream.js +26 -26
  248. package/dist/esm/VerticalHero.js +14 -14
  249. package/dist/esm/VideoProgramLandingPage.js +67 -67
  250. package/dist/esm/VideoSeriesCard.js +26 -26
  251. package/dist/esm/VideoSeriesFilter.js +15 -15
  252. package/dist/esm/VideoSeriesLandingPage.js +42 -42
  253. package/dist/esm/VideoSeriesListing.js +74 -74
  254. package/dist/esm/View.js +248 -247
  255. package/dist/esm/YahooHero.js +35 -35
  256. package/dist/esm/YoutubeGroup.js +51 -51
  257. package/dist/esm/{_is-array-3e99e06e.js → _is-array-58e95429.js} +6 -6
  258. package/dist/esm/{_iter-detect-7e5e5ce2.js → _iter-detect-5d49a330.js} +8 -8
  259. package/dist/esm/{_object-pie-133f504a.js → _object-pie-33c40e79.js} +4 -4
  260. package/dist/esm/{_object-sap-f353c2a9.js → _object-sap-964b6feb.js} +1 -1
  261. package/dist/esm/{_object-to-array-0f197f89.js → _object-to-array-7e804fce.js} +2 -2
  262. package/dist/esm/{_to-object-b50e61c3.js → _to-object-a4107da3.js} +9 -9
  263. package/dist/esm/{asyncToGenerator-7f8f9219.js → asyncToGenerator-fc1c2e29.js} +32 -32
  264. package/dist/esm/{brightcove-react-player-loader.es-b43c695a.js → brightcove-react-player-loader.es-83f53e4e.js} +6 -7
  265. package/dist/esm/{core.get-iterator-method-133dfacd.js → core.get-iterator-method-e1de7503.js} +2 -2
  266. package/dist/esm/{debounce-533d9748.js → debounce-9207d8ee.js} +2 -2
  267. package/dist/esm/{define-property-fe54dc9f.js → define-property-8af5f002.js} +6 -6
  268. package/dist/esm/{defineProperty-f5ff6f5a.js → defineProperty-94fd8bfc.js} +1 -1
  269. package/dist/esm/{entities-932b50cf.js → entities-7cc3bf45.js} +1 -1
  270. package/dist/esm/{eq-bdcbf886.js → eq-b470f743.js} +1 -1
  271. package/dist/esm/{es6.string.iterator-bc33758b.js → es6.string.iterator-c990c18c.js} +7 -7
  272. package/dist/esm/{extends-60e0e1c6.js → extends-6f2fcc99.js} +7 -7
  273. package/dist/esm/faundadb.js +7 -7
  274. package/dist/esm/{get-3c308da4.js → get-1e515072.js} +21 -21
  275. package/dist/esm/getRelatedArticle.js +14 -14
  276. package/dist/esm/getRootDocGroup.js +6 -6
  277. package/dist/esm/getSerializers.js +45 -45
  278. package/dist/esm/{getTargeting-c3401fa7.js → getTargeting-bd800589.js} +11 -11
  279. package/dist/esm/getTargeting.js +8 -8
  280. package/dist/esm/{index-2446af28.js → index-41a678ea.js} +6 -6
  281. package/dist/esm/{index-35bdcc81.js → index-5f7e79e7.js} +10 -10
  282. package/dist/esm/{index-0dbff1d1.js → index-73819142.js} +30 -36
  283. package/dist/esm/{index-ffedd1e8.js → index-8ea04db3.js} +1049 -1038
  284. package/dist/esm/{index-67e1773f.js → index-aaa2dae0.js} +2 -11
  285. package/dist/esm/{index-79cfd25c.js → index-ef6d5dcf.js} +45 -44
  286. package/dist/esm/{index.es-c6222053.js → index.es-29c1cef5.js} +10 -28
  287. package/dist/esm/{index.esm-3fdda599.js → index.esm-29e48d38.js} +15 -6
  288. package/dist/esm/{index.esm-a8ff922c.js → index.esm-cf08bf18.js} +12 -5
  289. package/dist/esm/{index.esm-c6715e80.js → index.esm-f8aaeeeb.js} +6 -3
  290. package/dist/esm/{index.esm-8016b507.js → index.esm-fd746768.js} +18 -17
  291. package/dist/esm/index.js +139 -141
  292. package/dist/esm/inherits-77d5e4fc.js +101 -0
  293. package/dist/esm/{inherits-a41fe93f.js → inherits-cf8dde54.js} +19 -19
  294. package/dist/esm/{isSymbol-a7e9aafe.js → isSymbol-1981418f.js} +15 -15
  295. package/dist/esm/{keys-7a3adabf.js → keys-8eda7a5c.js} +6 -6
  296. package/dist/esm/{lodash-f97fd99a.js → lodash-17fdfebb.js} +31 -128
  297. package/dist/esm/main-e4a934b2.js +851 -0
  298. package/dist/esm/{md5-4e42248e.js → md5-9be0e905.js} +1 -1
  299. package/dist/esm/{moment-bc12cb97.js → moment-e2f9b20c.js} +9 -11
  300. package/dist/esm/{react-social-icons-91f9716f.js → react-social-icons-a7d5c5c7.js} +20 -20
  301. package/dist/esm/{slicedToArray-be2f7a22.js → slicedToArray-641f241f.js} +14 -14
  302. package/dist/esm/{smoothscroll-fa4e3f8c.js → smoothscroll-0cd4c7a6.js} +1 -1
  303. package/dist/esm/stringify-4330ccdc.js +15 -0
  304. package/dist/esm/timeDifferenceCalc.js +1 -1
  305. package/dist/esm/{toConsumableArray-6d9a4616.js → toConsumableArray-43aa614d.js} +9 -9
  306. package/dist/esm/{toNumber-5aeba6e7.js → toNumber-2f7a84cd.js} +5 -40
  307. package/dist/esm/{typeof-a286cf0c.js → typeof-6435ba1c.js} +36 -36
  308. package/dist/esm/urlFor.js +1 -1
  309. package/dist/esm/{ustream-api-33a866b6.js → ustream-api-9a50644d.js} +4 -4
  310. package/dist/esm/{util-3ab476bf.js → util-7700fc59.js} +1 -1
  311. package/dist/esm/{visibility-sensor-f40c2564.js → visibility-sensor-72fd8f8b.js} +2 -2
  312. package/dist/esm/{web.dom.iterable-4109ff68.js → web.dom.iterable-4439f05a.js} +3 -3
  313. package/package.json +110 -110
  314. package/dist/cjs/ConferenceBanner-6c9e718a.js +0 -24
  315. package/dist/cjs/keys-7f2c2108.js +0 -25
  316. package/dist/cjs/main-025fdc78.js +0 -973
  317. package/dist/cjs/stringify-c9ac1214.js +0 -17
  318. package/dist/esm/main-b5c5aac1.js +0 -961
  319. package/dist/esm/stringify-59c8f690.js +0 -15
package/dist/cjs/Auth.js CHANGED
@@ -2,35 +2,30 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var asyncToGenerator = require('./asyncToGenerator-58c289d9.js');
6
- var stringify = require('./stringify-c9ac1214.js');
7
- var slicedToArray = require('./slicedToArray-5d1bc3b3.js');
5
+ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
6
+
7
+ var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
8
+ require('./_to-object-329a650b.js');
9
+ require('./es6.string.iterator-cc0bbaa4.js');
10
+ require('./_library-dd23b178.js');
11
+ require('./_iter-detect-60b2f026.js');
12
+ require('./core.get-iterator-method-f62321d4.js');
13
+ require('./_object-pie-68c5bcbc.js');
14
+ var _extends$1 = require('./extends-0a918631.js');
15
+ require('./web.dom.iterable-a0e279c1.js');
8
16
  var React = require('react');
17
+ var React__default = _interopDefault(React);
9
18
  var Router = require('next/router');
10
- var _extends = require('./extends-29bdbc6d.js');
19
+ var Router__default = _interopDefault(Router);
20
+ var slicedToArray = require('./slicedToArray-8f385299.js');
21
+ var stringify = require('./stringify-7c5aff47.js');
22
+ var asyncToGenerator = require('./asyncToGenerator-140e5f89.js');
11
23
  var reactBootstrap = require('react-bootstrap');
12
- var useSWR = require('swr');
13
- var index = require('./index-bd6c9f56.js');
14
- var Local = require('passport-local');
15
- var mysql = require('mysql');
16
- var util = require('./util-6f784d85.js');
17
- var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
18
- var md5 = require('./md5-e1ca5797.js');
19
- require('./es6.string.iterator-c2573ffd.js');
20
- require('./_to-object-6de10e57.js');
21
- require('./web.dom.iterable-46657b5c.js');
22
- require('./_library-dd23b178.js');
23
- require('./core.get-iterator-method-f474eacc.js');
24
- require('./_iter-detect-55a5657a.js');
25
- require('./_object-pie-083f2dd6.js');
26
-
27
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
28
-
29
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
30
- var Router__default = /*#__PURE__*/_interopDefaultLegacy(Router);
31
- var useSWR__default = /*#__PURE__*/_interopDefaultLegacy(useSWR);
32
- var Local__default = /*#__PURE__*/_interopDefaultLegacy(Local);
33
- var mysql__default = /*#__PURE__*/_interopDefaultLegacy(mysql);
24
+ var util = require('./util-f2c1b65b.js');
25
+ var index$6 = require('./index-bd6c9f56.js');
26
+ var Local = _interopDefault(require('passport-local'));
27
+ var mysql = _interopDefault(require('mysql'));
28
+ var md5 = require('./md5-5039b1a6.js');
34
29
 
35
30
  var returnFormField = function returnFormField(_ref) {
36
31
  var name = _ref.name,
@@ -69,21 +64,21 @@ var returnFormField = function returnFormField(_ref) {
69
64
  }
70
65
 
71
66
  if (type == 'text' || type == 'email' || type == 'password' || type == 'number') {
72
- return React__default['default'].createElement(
67
+ return React__default.createElement(
73
68
  reactBootstrap.Form.Group,
74
- _extends._extends({}, opts, { controlId: name }),
75
- React__default['default'].createElement(
69
+ _extends$1._extends({}, opts, { controlId: name }),
70
+ React__default.createElement(
76
71
  reactBootstrap.Form.Label,
77
72
  { kye: name + '_label' },
78
73
  label,
79
- required && React__default['default'].createElement(
74
+ required && React__default.createElement(
80
75
  'span',
81
76
  { style: { color: 'red' } },
82
77
  '*'
83
78
  )
84
79
  ),
85
- React__default['default'].createElement(reactBootstrap.Form.Control, { key: name + '_' + type, type: type, readOnly: readonly, name: name, placeholder: '', defaultValue: default_value, required: required }),
86
- React__default['default'].createElement(
80
+ React__default.createElement(reactBootstrap.Form.Control, { key: name + '_' + type, type: type, readOnly: readonly, name: name, placeholder: '', defaultValue: default_value, required: required }),
81
+ React__default.createElement(
87
82
  reactBootstrap.Form.Control.Feedback,
88
83
  { key: name + '_feedback', type: 'invalid' },
89
84
  errors[name]
@@ -91,28 +86,28 @@ var returnFormField = function returnFormField(_ref) {
91
86
  );
92
87
  }
93
88
  if (type == 'select') {
94
- return React__default['default'].createElement(
89
+ return React__default.createElement(
95
90
  reactBootstrap.Form.Group,
96
- _extends._extends({}, opts, { key: name, controlId: name }),
97
- React__default['default'].createElement(
91
+ _extends$1._extends({}, opts, { key: name, controlId: name }),
92
+ React__default.createElement(
98
93
  reactBootstrap.Form.Label,
99
94
  { key: name + '_' + label },
100
95
  label,
101
- required && React__default['default'].createElement(
96
+ required && React__default.createElement(
102
97
  'span',
103
98
  { key: name + '_required_span', style: { color: 'red' } },
104
99
  '*'
105
100
  )
106
101
  ),
107
- React__default['default'].createElement(
102
+ React__default.createElement(
108
103
  reactBootstrap.Form.Control,
109
104
  { key: name + '_select', as: 'select', name: name, required: required, defaultValue: default_value },
110
- React__default['default'].createElement('option', { value: '', key: name + '_options_empty' }),
105
+ React__default.createElement('option', { value: '', key: name + '_options_empty' }),
111
106
  options.map(function (option, index) {
112
107
  var value = option.value ? option.value : option;
113
108
  var label = option.label ? option.label : option;
114
109
  var key = name + '_options_' + index;
115
- return React__default['default'].createElement(
110
+ return React__default.createElement(
116
111
  'option',
117
112
  { key: key, value: value },
118
113
  label
@@ -123,32 +118,1081 @@ var returnFormField = function returnFormField(_ref) {
123
118
  }
124
119
 
125
120
  if (type == 'radio' || type == 'checkbox') {
126
- return React__default['default'].createElement(
121
+ return React__default.createElement(
127
122
  reactBootstrap.Form.Group,
128
123
  opts,
129
- React__default['default'].createElement(
124
+ React__default.createElement(
130
125
  reactBootstrap.Form.Label,
131
126
  null,
132
127
  label,
133
- required && React__default['default'].createElement(
128
+ required && React__default.createElement(
134
129
  'span',
135
130
  { style: { color: 'red' } },
136
131
  '*'
137
132
  )
138
133
  ),
139
134
  options.map(function (option, index) {
140
- return React__default['default'].createElement(
135
+ return React__default.createElement(
141
136
  reactBootstrap.Form.Check,
142
137
  { type: type, key: index, required: required },
143
- React__default['default'].createElement(reactBootstrap.Form.Check.Input, { type: type, key: type + '_' + index + '_input', defaultChecked: default_value ? default_value === option.value : false, name: name, id: name + '_' + index, value: option.value, required: required }),
144
- React__default['default'].createElement(reactBootstrap.Form.Check.Label, { style: { cursor: 'pointer' }, 'for': name + '_' + index, key: type + '_' + index + '_label', dangerouslySetInnerHTML: { __html: option.label } })
138
+ React__default.createElement(reactBootstrap.Form.Check.Input, { type: type, key: type + '_' + index + '_input', defaultChecked: default_value ? default_value === option.value : false, name: name, id: name + '_' + index, value: option.value, required: required }),
139
+ React__default.createElement(reactBootstrap.Form.Check.Label, { style: { cursor: 'pointer' }, 'for': name + '_' + index, key: type + '_' + index + '_label', dangerouslySetInnerHTML: { __html: option.label } })
145
140
  );
146
141
  })
147
142
  );
148
143
  }
149
144
  };
150
145
 
151
- var _this$4 = undefined;
146
+ var has = Object.prototype.hasOwnProperty;
147
+
148
+ function dequal(foo, bar) {
149
+ var ctor, len;
150
+ if (foo === bar) return true;
151
+
152
+ if (foo && bar && (ctor=foo.constructor) === bar.constructor) {
153
+ if (ctor === Date) return foo.getTime() === bar.getTime();
154
+ if (ctor === RegExp) return foo.toString() === bar.toString();
155
+
156
+ if (ctor === Array) {
157
+ if ((len=foo.length) === bar.length) {
158
+ while (len-- && dequal(foo[len], bar[len]));
159
+ }
160
+ return len === -1;
161
+ }
162
+
163
+ if (!ctor || typeof foo === 'object') {
164
+ len = 0;
165
+ for (ctor in foo) {
166
+ if (has.call(foo, ctor) && ++len && !has.call(bar, ctor)) return false;
167
+ if (!(ctor in bar) || !dequal(foo[ctor], bar[ctor])) return false;
168
+ }
169
+ return Object.keys(bar).length === len;
170
+ }
171
+ }
172
+
173
+ return foo !== foo && bar !== bar;
174
+ }
175
+
176
+ // use WeakMap to store the object->key mapping
177
+ // so the objects can be garbage collected.
178
+ // WeakMap uses a hashtable under the hood, so the lookup
179
+ // complexity is almost O(1).
180
+ var table = new WeakMap();
181
+ // counter of the key
182
+ var counter = 0;
183
+ // hashes an array of objects and returns a string
184
+ function hash(args) {
185
+ if (!args.length)
186
+ return '';
187
+ var key = 'arg';
188
+ for (var i = 0; i < args.length; ++i) {
189
+ if (args[i] === null) {
190
+ key += '@null';
191
+ continue;
192
+ }
193
+ var _hash = void 0;
194
+ if (typeof args[i] !== 'object' && typeof args[i] !== 'function') {
195
+ // need to consider the case that args[i] is a string:
196
+ // args[i] _hash
197
+ // "undefined" -> '"undefined"'
198
+ // undefined -> 'undefined'
199
+ // 123 -> '123'
200
+ // "null" -> '"null"'
201
+ if (typeof args[i] === 'string') {
202
+ _hash = '"' + args[i] + '"';
203
+ }
204
+ else {
205
+ _hash = String(args[i]);
206
+ }
207
+ }
208
+ else {
209
+ if (!table.has(args[i])) {
210
+ _hash = counter;
211
+ table.set(args[i], counter++);
212
+ }
213
+ else {
214
+ _hash = table.get(args[i]);
215
+ }
216
+ }
217
+ key += '@' + _hash;
218
+ }
219
+ return key;
220
+ }
221
+
222
+ var Cache = /** @class */ (function () {
223
+ function Cache(initialData) {
224
+ if (initialData === void 0) { initialData = {}; }
225
+ this.cache = new Map(Object.entries(initialData));
226
+ this.subs = [];
227
+ }
228
+ Cache.prototype.get = function (key) {
229
+ var _key = this.serializeKey(key)[0];
230
+ return this.cache.get(_key);
231
+ };
232
+ Cache.prototype.set = function (key, value) {
233
+ var _key = this.serializeKey(key)[0];
234
+ this.cache.set(_key, value);
235
+ this.notify();
236
+ };
237
+ Cache.prototype.keys = function () {
238
+ return Array.from(this.cache.keys());
239
+ };
240
+ Cache.prototype.has = function (key) {
241
+ var _key = this.serializeKey(key)[0];
242
+ return this.cache.has(_key);
243
+ };
244
+ Cache.prototype.clear = function () {
245
+ this.cache.clear();
246
+ this.notify();
247
+ };
248
+ Cache.prototype.delete = function (key) {
249
+ var _key = this.serializeKey(key)[0];
250
+ this.cache.delete(_key);
251
+ this.notify();
252
+ };
253
+ // TODO: introduce namespace for the cache
254
+ Cache.prototype.serializeKey = function (key) {
255
+ var args = null;
256
+ if (typeof key === 'function') {
257
+ try {
258
+ key = key();
259
+ }
260
+ catch (err) {
261
+ // dependencies not ready
262
+ key = '';
263
+ }
264
+ }
265
+ if (Array.isArray(key)) {
266
+ // args array
267
+ args = key;
268
+ key = hash(key);
269
+ }
270
+ else {
271
+ // convert null to ''
272
+ key = String(key || '');
273
+ }
274
+ var errorKey = key ? 'err@' + key : '';
275
+ var isValidatingKey = key ? 'validating@' + key : '';
276
+ return [key, args, errorKey, isValidatingKey];
277
+ };
278
+ Cache.prototype.subscribe = function (listener) {
279
+ var _this = this;
280
+ if (typeof listener !== 'function') {
281
+ throw new Error('Expected the listener to be a function.');
282
+ }
283
+ var isSubscribed = true;
284
+ this.subs.push(listener);
285
+ return function () {
286
+ if (!isSubscribed)
287
+ return;
288
+ isSubscribed = false;
289
+ var index = _this.subs.indexOf(listener);
290
+ if (index > -1) {
291
+ _this.subs[index] = _this.subs[_this.subs.length - 1];
292
+ _this.subs.length--;
293
+ }
294
+ };
295
+ };
296
+ // Notify Cache subscribers about a change in the cache
297
+ Cache.prototype.notify = function () {
298
+ for (var _i = 0, _a = this.subs; _i < _a.length; _i++) {
299
+ var listener = _a[_i];
300
+ listener();
301
+ }
302
+ };
303
+ return Cache;
304
+ }());
305
+
306
+ /**
307
+ * Due to bug https://bugs.chromium.org/p/chromium/issues/detail?id=678075,
308
+ * it's not reliable to detect if the browser is currently online or offline
309
+ * based on `navigator.onLine`.
310
+ * As a work around, we always assume it's online on first load, and change
311
+ * the status upon `online` or `offline` events.
312
+ */
313
+ var online = true;
314
+ var isOnline = function () { return online; };
315
+ var isDocumentVisible = function () {
316
+ if (typeof document !== 'undefined' &&
317
+ document.visibilityState !== undefined) {
318
+ return document.visibilityState !== 'hidden';
319
+ }
320
+ // always assume it's visible
321
+ return true;
322
+ };
323
+ var fetcher = function (url) { return fetch(url).then(function (res) { return res.json(); }); };
324
+ var registerOnFocus = function (cb) {
325
+ if (typeof window !== 'undefined' &&
326
+ window.addEventListener !== undefined &&
327
+ typeof document !== 'undefined' &&
328
+ document.addEventListener !== undefined) {
329
+ // focus revalidate
330
+ document.addEventListener('visibilitychange', function () { return cb(); }, false);
331
+ window.addEventListener('focus', function () { return cb(); }, false);
332
+ }
333
+ };
334
+ var registerOnReconnect = function (cb) {
335
+ if (typeof window !== 'undefined' && window.addEventListener !== undefined) {
336
+ // reconnect revalidate
337
+ window.addEventListener('online', function () {
338
+ online = true;
339
+ cb();
340
+ }, false);
341
+ // nothing to revalidate, just update the status
342
+ window.addEventListener('offline', function () { return (online = false); }, false);
343
+ }
344
+ };
345
+ var webPreset = {
346
+ isOnline: isOnline,
347
+ isDocumentVisible: isDocumentVisible,
348
+ fetcher: fetcher,
349
+ registerOnFocus: registerOnFocus,
350
+ registerOnReconnect: registerOnReconnect
351
+ };
352
+
353
+ var __assign = (undefined && undefined.__assign) || function () {
354
+ __assign = Object.assign || function(t) {
355
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
356
+ s = arguments[i];
357
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
358
+ t[p] = s[p];
359
+ }
360
+ return t;
361
+ };
362
+ return __assign.apply(this, arguments);
363
+ };
364
+ // cache
365
+ var cache = new Cache();
366
+ // error retry
367
+ function onErrorRetry(_, __, config, revalidate, opts) {
368
+ if (!config.isDocumentVisible()) {
369
+ // if it's hidden, stop
370
+ // it will auto revalidate when focus
371
+ return;
372
+ }
373
+ if (typeof config.errorRetryCount === 'number' &&
374
+ opts.retryCount > config.errorRetryCount) {
375
+ return;
376
+ }
377
+ // exponential backoff
378
+ var count = Math.min(opts.retryCount, 8);
379
+ var timeout = ~~((Math.random() + 0.5) * (1 << count)) * config.errorRetryInterval;
380
+ setTimeout(revalidate, timeout, opts);
381
+ }
382
+ // client side: need to adjust the config
383
+ // based on the browser status
384
+ // slow connection (<= 70Kbps)
385
+ var slowConnection = typeof window !== 'undefined' &&
386
+ // @ts-ignore
387
+ navigator['connection'] &&
388
+ // @ts-ignore
389
+ ['slow-2g', '2g'].indexOf(navigator['connection'].effectiveType) !== -1;
390
+ // config
391
+ var defaultConfig = __assign({
392
+ // events
393
+ onLoadingSlow: function () { }, onSuccess: function () { }, onError: function () { }, onErrorRetry: onErrorRetry, errorRetryInterval: (slowConnection ? 10 : 5) * 1000, focusThrottleInterval: 5 * 1000, dedupingInterval: 2 * 1000, loadingTimeout: (slowConnection ? 5 : 3) * 1000, refreshInterval: 0, revalidateOnFocus: true, revalidateOnReconnect: true, refreshWhenHidden: false, refreshWhenOffline: false, shouldRetryOnError: true, suspense: false, compare: dequal, isPaused: function () { return false; } }, webPreset);
394
+
395
+ var IS_SERVER = typeof window === 'undefined' ||
396
+ // @ts-ignore
397
+ !!(typeof Deno !== 'undefined' && Deno && Deno.version && Deno.version.deno);
398
+ // polyfill for requestAnimationFrame
399
+ var rAF = IS_SERVER
400
+ ? null
401
+ : window['requestAnimationFrame']
402
+ ? function (f) { return window['requestAnimationFrame'](f); }
403
+ : function (f) { return setTimeout(f, 1); };
404
+ // React currently throws a warning when using useLayoutEffect on the server.
405
+ // To get around it, we can conditionally useEffect on the server (no-op) and
406
+ // useLayoutEffect in the browser.
407
+ var useIsomorphicLayoutEffect = IS_SERVER ? React.useEffect : React.useLayoutEffect;
408
+
409
+ var SWRConfigContext = React.createContext({});
410
+ SWRConfigContext.displayName = 'SWRConfigContext';
411
+
412
+ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
413
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
414
+ return new (P || (P = Promise))(function (resolve, reject) {
415
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
416
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
417
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
418
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
419
+ });
420
+ };
421
+ var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
422
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
423
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
424
+ function verb(n) { return function (v) { return step([n, v]); }; }
425
+ function step(op) {
426
+ if (f) throw new TypeError("Generator is already executing.");
427
+ while (_) try {
428
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
429
+ if (y = 0, t) op = [op[0] & 2, t.value];
430
+ switch (op[0]) {
431
+ case 0: case 1: t = op; break;
432
+ case 4: _.label++; return { value: op[1], done: false };
433
+ case 5: _.label++; y = op[1]; op = [0]; continue;
434
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
435
+ default:
436
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
437
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
438
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
439
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
440
+ if (t[2]) _.ops.pop();
441
+ _.trys.pop(); continue;
442
+ }
443
+ op = body.call(thisArg, _);
444
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
445
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
446
+ }
447
+ };
448
+ // global state managers
449
+ var CONCURRENT_PROMISES = {};
450
+ var CONCURRENT_PROMISES_TS = {};
451
+ var FOCUS_REVALIDATORS = {};
452
+ var RECONNECT_REVALIDATORS = {};
453
+ var CACHE_REVALIDATORS = {};
454
+ var MUTATION_TS = {};
455
+ var MUTATION_END_TS = {};
456
+ // generate strictly increasing timestamps
457
+ var now = (function () {
458
+ var ts = 0;
459
+ return function () { return ++ts; };
460
+ })();
461
+ // setup DOM events listeners for `focus` and `reconnect` actions
462
+ if (!IS_SERVER) {
463
+ var revalidate_1 = function (revalidators) {
464
+ if (!defaultConfig.isDocumentVisible() || !defaultConfig.isOnline())
465
+ return;
466
+ for (var key in revalidators) {
467
+ if (revalidators[key][0])
468
+ revalidators[key][0]();
469
+ }
470
+ };
471
+ if (typeof defaultConfig.registerOnFocus === 'function') {
472
+ defaultConfig.registerOnFocus(function () { return revalidate_1(FOCUS_REVALIDATORS); });
473
+ }
474
+ if (typeof defaultConfig.registerOnReconnect === 'function') {
475
+ defaultConfig.registerOnReconnect(function () { return revalidate_1(RECONNECT_REVALIDATORS); });
476
+ }
477
+ }
478
+ var trigger = function (_key, shouldRevalidate) {
479
+ if (shouldRevalidate === void 0) { shouldRevalidate = true; }
480
+ // we are ignoring the second argument which correspond to the arguments
481
+ // the fetcher will receive when key is an array
482
+ var _a = cache.serializeKey(_key), key = _a[0], keyErr = _a[2], keyValidating = _a[3];
483
+ if (!key)
484
+ return Promise.resolve();
485
+ var updaters = CACHE_REVALIDATORS[key];
486
+ if (key && updaters) {
487
+ var currentData = cache.get(key);
488
+ var currentError = cache.get(keyErr);
489
+ var currentIsValidating = cache.get(keyValidating);
490
+ var promises = [];
491
+ for (var i = 0; i < updaters.length; ++i) {
492
+ promises.push(updaters[i](shouldRevalidate, currentData, currentError, currentIsValidating, i > 0));
493
+ }
494
+ // return new updated value
495
+ return Promise.all(promises).then(function () { return cache.get(key); });
496
+ }
497
+ return Promise.resolve(cache.get(key));
498
+ };
499
+ var broadcastState = function (key, data, error, isValidating) {
500
+ var updaters = CACHE_REVALIDATORS[key];
501
+ if (key && updaters) {
502
+ for (var i = 0; i < updaters.length; ++i) {
503
+ updaters[i](false, data, error, isValidating);
504
+ }
505
+ }
506
+ };
507
+ var mutate = function (_key, _data, shouldRevalidate) {
508
+ if (shouldRevalidate === void 0) { shouldRevalidate = true; }
509
+ return __awaiter(void 0, void 0, void 0, function () {
510
+ var _a, key, keyErr, beforeMutationTs, beforeConcurrentPromisesTs, data, error, isAsyncMutation, err_1, shouldAbort, updaters, promises, i;
511
+ return __generator(this, function (_b) {
512
+ switch (_b.label) {
513
+ case 0:
514
+ _a = cache.serializeKey(_key), key = _a[0], keyErr = _a[2];
515
+ if (!key)
516
+ return [2 /*return*/];
517
+ // if there is no new data to update, let's just revalidate the key
518
+ if (typeof _data === 'undefined')
519
+ return [2 /*return*/, trigger(_key, shouldRevalidate)
520
+ // update global timestamps
521
+ ];
522
+ // update global timestamps
523
+ MUTATION_TS[key] = now() - 1;
524
+ MUTATION_END_TS[key] = 0;
525
+ beforeMutationTs = MUTATION_TS[key];
526
+ beforeConcurrentPromisesTs = CONCURRENT_PROMISES_TS[key];
527
+ isAsyncMutation = false;
528
+ if (_data && typeof _data === 'function') {
529
+ // `_data` is a function, call it passing current cache value
530
+ try {
531
+ _data = _data(cache.get(key));
532
+ }
533
+ catch (err) {
534
+ // if `_data` function throws an error synchronously, it shouldn't be cached
535
+ _data = undefined;
536
+ error = err;
537
+ }
538
+ }
539
+ if (!(_data && typeof _data.then === 'function')) return [3 /*break*/, 5];
540
+ // `_data` is a promise
541
+ isAsyncMutation = true;
542
+ _b.label = 1;
543
+ case 1:
544
+ _b.trys.push([1, 3, , 4]);
545
+ return [4 /*yield*/, _data];
546
+ case 2:
547
+ data = _b.sent();
548
+ return [3 /*break*/, 4];
549
+ case 3:
550
+ err_1 = _b.sent();
551
+ error = err_1;
552
+ return [3 /*break*/, 4];
553
+ case 4: return [3 /*break*/, 6];
554
+ case 5:
555
+ data = _data;
556
+ _b.label = 6;
557
+ case 6:
558
+ shouldAbort = function () {
559
+ // check if other mutations have occurred since we've started this mutation
560
+ if (beforeMutationTs !== MUTATION_TS[key] ||
561
+ beforeConcurrentPromisesTs !== CONCURRENT_PROMISES_TS[key]) {
562
+ if (error)
563
+ throw error;
564
+ return true;
565
+ }
566
+ };
567
+ // if there's a race we don't update cache or broadcast change, just return the data
568
+ if (shouldAbort())
569
+ return [2 /*return*/, data];
570
+ if (typeof data !== 'undefined') {
571
+ // update cached data
572
+ cache.set(key, data);
573
+ }
574
+ // always update or reset the error
575
+ cache.set(keyErr, error);
576
+ // reset the timestamp to mark the mutation has ended
577
+ MUTATION_END_TS[key] = now() - 1;
578
+ if (!isAsyncMutation) {
579
+ // we skip broadcasting if there's another mutation happened synchronously
580
+ if (shouldAbort())
581
+ return [2 /*return*/, data];
582
+ }
583
+ updaters = CACHE_REVALIDATORS[key];
584
+ if (updaters) {
585
+ promises = [];
586
+ for (i = 0; i < updaters.length; ++i) {
587
+ promises.push(updaters[i](!!shouldRevalidate, data, error, undefined, i > 0));
588
+ }
589
+ // return new updated value
590
+ return [2 /*return*/, Promise.all(promises).then(function () {
591
+ if (error)
592
+ throw error;
593
+ return cache.get(key);
594
+ })];
595
+ }
596
+ // throw error or return data to be used by caller of mutate
597
+ if (error)
598
+ throw error;
599
+ return [2 /*return*/, data];
600
+ }
601
+ });
602
+ });
603
+ };
604
+ function useSWR() {
605
+ var _this = this;
606
+ var args = [];
607
+ for (var _i = 0; _i < arguments.length; _i++) {
608
+ args[_i] = arguments[_i];
609
+ }
610
+ var _key = args[0];
611
+ var config = Object.assign({}, defaultConfig, React.useContext(SWRConfigContext), args.length > 2
612
+ ? args[2]
613
+ : args.length === 2 && typeof args[1] === 'object'
614
+ ? args[1]
615
+ : {});
616
+ // in typescript args.length > 2 is not same as args.lenth === 3
617
+ // we do a safe type assertion here
618
+ // args.length === 3
619
+ var fn = (args.length > 2
620
+ ? args[1]
621
+ : args.length === 2 && typeof args[1] === 'function'
622
+ ? args[1]
623
+ : /**
624
+ pass fn as null will disable revalidate
625
+ https://paco.sh/blog/shared-hook-state-with-swr
626
+ */
627
+ args[1] === null
628
+ ? args[1]
629
+ : config.fetcher);
630
+ // we assume `key` as the identifier of the request
631
+ // `key` can change but `fn` shouldn't
632
+ // (because `revalidate` only depends on `key`)
633
+ // `keyErr` is the cache key for error objects
634
+ var _a = cache.serializeKey(_key), key = _a[0], fnArgs = _a[1], keyErr = _a[2], keyValidating = _a[3];
635
+ var configRef = React.useRef(config);
636
+ useIsomorphicLayoutEffect(function () {
637
+ configRef.current = config;
638
+ });
639
+ var willRevalidateOnMount = function () {
640
+ return (config.revalidateOnMount ||
641
+ (!config.initialData && config.revalidateOnMount === undefined));
642
+ };
643
+ var resolveData = function () {
644
+ var cachedData = cache.get(key);
645
+ return typeof cachedData === 'undefined' ? config.initialData : cachedData;
646
+ };
647
+ var resolveIsValidating = function () {
648
+ return !!cache.get(keyValidating) || (key && willRevalidateOnMount());
649
+ };
650
+ var initialData = resolveData();
651
+ var initialError = cache.get(keyErr);
652
+ var initialIsValidating = resolveIsValidating();
653
+ // if a state is accessed (data, error or isValidating),
654
+ // we add the state to dependencies so if the state is
655
+ // updated in the future, we can trigger a rerender
656
+ var stateDependencies = React.useRef({
657
+ data: false,
658
+ error: false,
659
+ isValidating: false
660
+ });
661
+ var stateRef = React.useRef({
662
+ data: initialData,
663
+ error: initialError,
664
+ isValidating: initialIsValidating
665
+ });
666
+ // display the data label in the React DevTools next to SWR hooks
667
+ React.useDebugValue(stateRef.current.data);
668
+ var rerender = React.useState({})[1];
669
+ var dispatch = React.useCallback(function (payload) {
670
+ var shouldUpdateState = false;
671
+ for (var k in payload) {
672
+ // @ts-ignore
673
+ if (stateRef.current[k] === payload[k]) {
674
+ continue;
675
+ }
676
+ // @ts-ignore
677
+ stateRef.current[k] = payload[k];
678
+ // @ts-ignore
679
+ if (stateDependencies.current[k]) {
680
+ shouldUpdateState = true;
681
+ }
682
+ }
683
+ if (shouldUpdateState) {
684
+ // if component is unmounted, should skip rerender
685
+ // if component is not mounted, should skip rerender
686
+ if (unmountedRef.current || !initialMountedRef.current)
687
+ return;
688
+ rerender({});
689
+ }
690
+ },
691
+ // config.suspense isn't allowed to change during the lifecycle
692
+ // eslint-disable-next-line react-hooks/exhaustive-deps
693
+ []);
694
+ // error ref inside revalidate (is last request errored?)
695
+ var unmountedRef = React.useRef(false);
696
+ var keyRef = React.useRef(key);
697
+ // check if component is mounted in suspense mode
698
+ var initialMountedRef = React.useRef(false);
699
+ // do unmount check for callbacks
700
+ var eventsCallback = React.useCallback(function (event) {
701
+ var _a;
702
+ var params = [];
703
+ for (var _i = 1; _i < arguments.length; _i++) {
704
+ params[_i - 1] = arguments[_i];
705
+ }
706
+ if (unmountedRef.current)
707
+ return;
708
+ if (!initialMountedRef.current)
709
+ return;
710
+ if (key !== keyRef.current)
711
+ return;
712
+ // @ts-ignore
713
+ (_a = configRef.current)[event].apply(_a, params);
714
+ }, [key]);
715
+ var boundMutate = React.useCallback(function (data, shouldRevalidate) {
716
+ return mutate(keyRef.current, data, shouldRevalidate);
717
+ }, []);
718
+ var addRevalidator = function (revalidators, callback) {
719
+ if (!revalidators[key]) {
720
+ revalidators[key] = [callback];
721
+ }
722
+ else {
723
+ revalidators[key].push(callback);
724
+ }
725
+ return function () {
726
+ var keyedRevalidators = revalidators[key];
727
+ var index = keyedRevalidators.indexOf(callback);
728
+ if (index >= 0) {
729
+ // O(1): faster than splice
730
+ keyedRevalidators[index] =
731
+ keyedRevalidators[keyedRevalidators.length - 1];
732
+ keyedRevalidators.pop();
733
+ }
734
+ };
735
+ };
736
+ // start a revalidation
737
+ var revalidate = React.useCallback(function (revalidateOpts) {
738
+ if (revalidateOpts === void 0) { revalidateOpts = {}; }
739
+ return __awaiter(_this, void 0, void 0, function () {
740
+ var _a, retryCount, _b, dedupe, loading, shouldDeduping, newData, startAt, newState, err_2;
741
+ return __generator(this, function (_c) {
742
+ switch (_c.label) {
743
+ case 0:
744
+ if (!key || !fn)
745
+ return [2 /*return*/, false];
746
+ if (unmountedRef.current)
747
+ return [2 /*return*/, false];
748
+ if (configRef.current.isPaused())
749
+ return [2 /*return*/, false];
750
+ _a = revalidateOpts.retryCount, retryCount = _a === void 0 ? 0 : _a, _b = revalidateOpts.dedupe, dedupe = _b === void 0 ? false : _b;
751
+ loading = true;
752
+ shouldDeduping = typeof CONCURRENT_PROMISES[key] !== 'undefined' && dedupe;
753
+ _c.label = 1;
754
+ case 1:
755
+ _c.trys.push([1, 6, , 7]);
756
+ dispatch({
757
+ isValidating: true
758
+ });
759
+ cache.set(keyValidating, true);
760
+ if (!shouldDeduping) {
761
+ // also update other hooks
762
+ broadcastState(key, stateRef.current.data, stateRef.current.error, true);
763
+ }
764
+ newData = void 0;
765
+ startAt = void 0;
766
+ if (!shouldDeduping) return [3 /*break*/, 3];
767
+ // there's already an ongoing request,
768
+ // this one needs to be deduplicated.
769
+ startAt = CONCURRENT_PROMISES_TS[key];
770
+ return [4 /*yield*/, CONCURRENT_PROMISES[key]];
771
+ case 2:
772
+ newData = _c.sent();
773
+ return [3 /*break*/, 5];
774
+ case 3:
775
+ // if no cache being rendered currently (it shows a blank page),
776
+ // we trigger the loading slow event.
777
+ if (config.loadingTimeout && !cache.get(key)) {
778
+ setTimeout(function () {
779
+ if (loading)
780
+ eventsCallback('onLoadingSlow', key, config);
781
+ }, config.loadingTimeout);
782
+ }
783
+ if (fnArgs !== null) {
784
+ CONCURRENT_PROMISES[key] = fn.apply(void 0, fnArgs);
785
+ }
786
+ else {
787
+ CONCURRENT_PROMISES[key] = fn(key);
788
+ }
789
+ CONCURRENT_PROMISES_TS[key] = startAt = now();
790
+ return [4 /*yield*/, CONCURRENT_PROMISES[key]];
791
+ case 4:
792
+ newData = _c.sent();
793
+ setTimeout(function () {
794
+ delete CONCURRENT_PROMISES[key];
795
+ delete CONCURRENT_PROMISES_TS[key];
796
+ }, config.dedupingInterval);
797
+ // trigger the success event,
798
+ // only do this for the original request.
799
+ eventsCallback('onSuccess', newData, key, config);
800
+ _c.label = 5;
801
+ case 5:
802
+ // if there're other ongoing request(s), started after the current one,
803
+ // we need to ignore the current one to avoid possible race conditions:
804
+ // req1------------------>res1 (current one)
805
+ // req2---------------->res2
806
+ // the request that fired later will always be kept.
807
+ if (CONCURRENT_PROMISES_TS[key] > startAt) {
808
+ return [2 /*return*/, false];
809
+ }
810
+ // if there're other mutations(s), overlapped with the current revalidation:
811
+ // case 1:
812
+ // req------------------>res
813
+ // mutate------>end
814
+ // case 2:
815
+ // req------------>res
816
+ // mutate------>end
817
+ // case 3:
818
+ // req------------------>res
819
+ // mutate-------...---------->
820
+ // we have to ignore the revalidation result (res) because it's no longer fresh.
821
+ // meanwhile, a new revalidation should be triggered when the mutation ends.
822
+ if (MUTATION_TS[key] &&
823
+ // case 1
824
+ (startAt <= MUTATION_TS[key] ||
825
+ // case 2
826
+ startAt <= MUTATION_END_TS[key] ||
827
+ // case 3
828
+ MUTATION_END_TS[key] === 0)) {
829
+ dispatch({ isValidating: false });
830
+ return [2 /*return*/, false];
831
+ }
832
+ cache.set(keyErr, undefined);
833
+ cache.set(keyValidating, false);
834
+ newState = {
835
+ isValidating: false
836
+ };
837
+ if (typeof stateRef.current.error !== 'undefined') {
838
+ // we don't have an error
839
+ newState.error = undefined;
840
+ }
841
+ if (!config.compare(stateRef.current.data, newData)) {
842
+ // deep compare to avoid extra re-render
843
+ // data changed
844
+ newState.data = newData;
845
+ }
846
+ if (!config.compare(cache.get(key), newData)) {
847
+ cache.set(key, newData);
848
+ }
849
+ // merge the new state
850
+ dispatch(newState);
851
+ if (!shouldDeduping) {
852
+ // also update other hooks
853
+ broadcastState(key, newData, newState.error, false);
854
+ }
855
+ return [3 /*break*/, 7];
856
+ case 6:
857
+ err_2 = _c.sent();
858
+ delete CONCURRENT_PROMISES[key];
859
+ delete CONCURRENT_PROMISES_TS[key];
860
+ if (configRef.current.isPaused()) {
861
+ dispatch({
862
+ isValidating: false
863
+ });
864
+ return [2 /*return*/, false];
865
+ }
866
+ cache.set(keyErr, err_2);
867
+ // get a new error
868
+ // don't use deep equal for errors
869
+ if (stateRef.current.error !== err_2) {
870
+ // we keep the stale data
871
+ dispatch({
872
+ isValidating: false,
873
+ error: err_2
874
+ });
875
+ if (!shouldDeduping) {
876
+ // also broadcast to update other hooks
877
+ broadcastState(key, undefined, err_2, false);
878
+ }
879
+ }
880
+ // events and retry
881
+ eventsCallback('onError', err_2, key, config);
882
+ if (config.shouldRetryOnError) {
883
+ // when retrying, we always enable deduping
884
+ eventsCallback('onErrorRetry', err_2, key, config, revalidate, {
885
+ retryCount: retryCount + 1,
886
+ dedupe: true
887
+ });
888
+ }
889
+ return [3 /*break*/, 7];
890
+ case 7:
891
+ loading = false;
892
+ return [2 /*return*/, true];
893
+ }
894
+ });
895
+ });
896
+ },
897
+ // dispatch is immutable, and `eventsCallback`, `fnArgs`, `keyErr`, and `keyValidating` are based on `key`,
898
+ // so we can them from the deps array.
899
+ //
900
+ // FIXME:
901
+ // `fn` and `config` might be changed during the lifecycle,
902
+ // but they might be changed every render like this.
903
+ // useSWR('key', () => fetch('/api/'), { suspense: true })
904
+ // So we omit the values from the deps array
905
+ // even though it might cause unexpected behaviors.
906
+ // eslint-disable-next-line react-hooks/exhaustive-deps
907
+ [key]);
908
+ // mounted (client side rendering)
909
+ useIsomorphicLayoutEffect(function () {
910
+ if (!key)
911
+ return undefined;
912
+ // after `key` updates, we need to mark it as mounted
913
+ unmountedRef.current = false;
914
+ var isUpdating = initialMountedRef.current;
915
+ initialMountedRef.current = true;
916
+ // after the component is mounted (hydrated),
917
+ // we need to update the data from the cache
918
+ // and trigger a revalidation
919
+ var currentHookData = stateRef.current.data;
920
+ var latestKeyedData = resolveData();
921
+ // update the state if the key changed (not the inital render) or cache updated
922
+ keyRef.current = key;
923
+ if (!config.compare(currentHookData, latestKeyedData)) {
924
+ dispatch({ data: latestKeyedData });
925
+ }
926
+ // revalidate with deduping
927
+ var softRevalidate = function () { return revalidate({ dedupe: true }); };
928
+ // trigger a revalidation
929
+ if (isUpdating || willRevalidateOnMount()) {
930
+ if (typeof latestKeyedData !== 'undefined' && !IS_SERVER) {
931
+ // delay revalidate if there's cache
932
+ // to not block the rendering
933
+ // @ts-ignore it's safe to use requestAnimationFrame in browser
934
+ rAF(softRevalidate);
935
+ }
936
+ else {
937
+ softRevalidate();
938
+ }
939
+ }
940
+ var pending = false;
941
+ var onFocus = function () {
942
+ if (pending || !configRef.current.revalidateOnFocus)
943
+ return;
944
+ pending = true;
945
+ softRevalidate();
946
+ setTimeout(function () { return (pending = false); }, configRef.current.focusThrottleInterval);
947
+ };
948
+ var onReconnect = function () {
949
+ if (configRef.current.revalidateOnReconnect) {
950
+ softRevalidate();
951
+ }
952
+ };
953
+ // register global cache update listener
954
+ var onUpdate = function (shouldRevalidate, updatedData, updatedError, updatedIsValidating, dedupe) {
955
+ if (shouldRevalidate === void 0) { shouldRevalidate = true; }
956
+ if (dedupe === void 0) { dedupe = true; }
957
+ // update hook state
958
+ var newState = {};
959
+ var needUpdate = false;
960
+ if (typeof updatedData !== 'undefined' &&
961
+ !config.compare(stateRef.current.data, updatedData)) {
962
+ newState.data = updatedData;
963
+ needUpdate = true;
964
+ }
965
+ // always update error
966
+ // because it can be `undefined`
967
+ if (stateRef.current.error !== updatedError) {
968
+ newState.error = updatedError;
969
+ needUpdate = true;
970
+ }
971
+ if (typeof updatedIsValidating !== 'undefined' &&
972
+ stateRef.current.isValidating !== updatedIsValidating) {
973
+ newState.isValidating = updatedIsValidating;
974
+ needUpdate = true;
975
+ }
976
+ if (needUpdate) {
977
+ dispatch(newState);
978
+ }
979
+ if (shouldRevalidate) {
980
+ if (dedupe) {
981
+ return softRevalidate();
982
+ }
983
+ else {
984
+ return revalidate();
985
+ }
986
+ }
987
+ return false;
988
+ };
989
+ var unsubFocus = addRevalidator(FOCUS_REVALIDATORS, onFocus);
990
+ var unsubReconnect = addRevalidator(RECONNECT_REVALIDATORS, onReconnect);
991
+ var unsubUpdate = addRevalidator(CACHE_REVALIDATORS, onUpdate);
992
+ return function () {
993
+ // cleanup
994
+ dispatch = function () { return null; };
995
+ // mark it as unmounted
996
+ unmountedRef.current = true;
997
+ unsubFocus();
998
+ unsubReconnect();
999
+ unsubUpdate();
1000
+ };
1001
+ }, [key, revalidate]);
1002
+ useIsomorphicLayoutEffect(function () {
1003
+ var timer = null;
1004
+ var tick = function () { return __awaiter(_this, void 0, void 0, function () {
1005
+ return __generator(this, function (_a) {
1006
+ switch (_a.label) {
1007
+ case 0:
1008
+ if (!(!stateRef.current.error &&
1009
+ (configRef.current.refreshWhenHidden ||
1010
+ configRef.current.isDocumentVisible()) &&
1011
+ (configRef.current.refreshWhenOffline || configRef.current.isOnline()))) return [3 /*break*/, 2];
1012
+ // only revalidate when the page is visible
1013
+ // if API request errored, we stop polling in this round
1014
+ // and let the error retry function handle it
1015
+ return [4 /*yield*/, revalidate({ dedupe: true })];
1016
+ case 1:
1017
+ // only revalidate when the page is visible
1018
+ // if API request errored, we stop polling in this round
1019
+ // and let the error retry function handle it
1020
+ _a.sent();
1021
+ _a.label = 2;
1022
+ case 2:
1023
+ // Read the latest refreshInterval
1024
+ if (configRef.current.refreshInterval && timer) {
1025
+ timer = setTimeout(tick, configRef.current.refreshInterval);
1026
+ }
1027
+ return [2 /*return*/];
1028
+ }
1029
+ });
1030
+ }); };
1031
+ if (configRef.current.refreshInterval) {
1032
+ timer = setTimeout(tick, configRef.current.refreshInterval);
1033
+ }
1034
+ return function () {
1035
+ if (timer) {
1036
+ clearTimeout(timer);
1037
+ timer = null;
1038
+ }
1039
+ };
1040
+ }, [
1041
+ config.refreshInterval,
1042
+ config.refreshWhenHidden,
1043
+ config.refreshWhenOffline,
1044
+ revalidate
1045
+ ]);
1046
+ // suspense
1047
+ var latestData;
1048
+ var latestError;
1049
+ if (config.suspense) {
1050
+ // in suspense mode, we can't return empty state
1051
+ // (it should be suspended)
1052
+ // try to get data and error from cache
1053
+ latestData = cache.get(key);
1054
+ latestError = cache.get(keyErr);
1055
+ if (typeof latestData === 'undefined') {
1056
+ latestData = initialData;
1057
+ }
1058
+ if (typeof latestError === 'undefined') {
1059
+ latestError = initialError;
1060
+ }
1061
+ if (typeof latestData === 'undefined' &&
1062
+ typeof latestError === 'undefined') {
1063
+ // need to start the request if it hasn't
1064
+ if (!CONCURRENT_PROMISES[key]) {
1065
+ // trigger revalidate immediately
1066
+ // to get the promise
1067
+ // in this revalidate, should not rerender
1068
+ revalidate();
1069
+ }
1070
+ if (CONCURRENT_PROMISES[key] &&
1071
+ typeof CONCURRENT_PROMISES[key].then === 'function') {
1072
+ // if it is a promise
1073
+ throw CONCURRENT_PROMISES[key];
1074
+ }
1075
+ // it's a value, return it directly (override)
1076
+ latestData = CONCURRENT_PROMISES[key];
1077
+ }
1078
+ if (typeof latestData === 'undefined' && latestError) {
1079
+ // in suspense mode, throw error if there's no content
1080
+ throw latestError;
1081
+ }
1082
+ }
1083
+ // define returned state
1084
+ // can be memorized since the state is a ref
1085
+ var memoizedState = React.useMemo(function () {
1086
+ // revalidate will be deprecated in the 1.x release
1087
+ // because mutate() covers the same use case of revalidate().
1088
+ // This remains only for backward compatibility
1089
+ var state = { revalidate: revalidate, mutate: boundMutate };
1090
+ Object.defineProperties(state, {
1091
+ error: {
1092
+ // `key` might be changed in the upcoming hook re-render,
1093
+ // but the previous state will stay
1094
+ // so we need to match the latest key and data (fallback to `initialData`)
1095
+ get: function () {
1096
+ stateDependencies.current.error = true;
1097
+ if (config.suspense) {
1098
+ return latestError;
1099
+ }
1100
+ return keyRef.current === key ? stateRef.current.error : initialError;
1101
+ },
1102
+ enumerable: true
1103
+ },
1104
+ data: {
1105
+ get: function () {
1106
+ stateDependencies.current.data = true;
1107
+ if (config.suspense) {
1108
+ return latestData;
1109
+ }
1110
+ return keyRef.current === key ? stateRef.current.data : initialData;
1111
+ },
1112
+ enumerable: true
1113
+ },
1114
+ isValidating: {
1115
+ get: function () {
1116
+ stateDependencies.current.isValidating = true;
1117
+ return key ? stateRef.current.isValidating : false;
1118
+ },
1119
+ enumerable: true
1120
+ }
1121
+ });
1122
+ return state;
1123
+ // `config.suspense` isn't allowed to change during the lifecycle.
1124
+ // `boundMutate` is immutable, and the immutability of `revalidate` depends on `key`
1125
+ // so we can omit them from the deps array,
1126
+ // but we put it to enable react-hooks/exhaustive-deps rule.
1127
+ // `initialData` and `initialError` are not initial values
1128
+ // because they are changed during the lifecycle
1129
+ // so we should add them in the deps array.
1130
+ }, [
1131
+ revalidate,
1132
+ initialData,
1133
+ initialError,
1134
+ boundMutate,
1135
+ key,
1136
+ config.suspense,
1137
+ latestError,
1138
+ latestData
1139
+ ]);
1140
+ return memoizedState;
1141
+ }
1142
+ Object.defineProperty(SWRConfigContext.Provider, 'default', {
1143
+ value: defaultConfig
1144
+ });
1145
+ var SWRConfig = SWRConfigContext.Provider;
1146
+
1147
+ var __awaiter$1 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
1148
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1149
+ return new (P || (P = Promise))(function (resolve, reject) {
1150
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
1151
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
1152
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
1153
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
1154
+ });
1155
+ };
1156
+ var __generator$1 = (undefined && undefined.__generator) || function (thisArg, body) {
1157
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
1158
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
1159
+ function verb(n) { return function (v) { return step([n, v]); }; }
1160
+ function step(op) {
1161
+ if (f) throw new TypeError("Generator is already executing.");
1162
+ while (_) try {
1163
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
1164
+ if (y = 0, t) op = [op[0] & 2, t.value];
1165
+ switch (op[0]) {
1166
+ case 0: case 1: t = op; break;
1167
+ case 4: _.label++; return { value: op[1], done: false };
1168
+ case 5: _.label++; y = op[1]; op = [0]; continue;
1169
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
1170
+ default:
1171
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
1172
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
1173
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
1174
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
1175
+ if (t[2]) _.ops.pop();
1176
+ _.trys.pop(); continue;
1177
+ }
1178
+ op = body.call(thisArg, _);
1179
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
1180
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
1181
+ }
1182
+ };
1183
+ var __rest = (undefined && undefined.__rest) || function (s, e) {
1184
+ var t = {};
1185
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1186
+ t[p] = s[p];
1187
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
1188
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1189
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1190
+ t[p[i]] = s[p[i]];
1191
+ }
1192
+ return t;
1193
+ };
1194
+
1195
+ var _this = undefined;
152
1196
 
153
1197
  var dataHandler = function () {
154
1198
  var _ref = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee(api_url, body) {
@@ -214,7 +1258,7 @@ var dataHandler = function () {
214
1258
  return _context.stop();
215
1259
  }
216
1260
  }
217
- }, _callee, _this$4, [[0, 20]]);
1261
+ }, _callee, _this, [[0, 20]]);
218
1262
  }));
219
1263
 
220
1264
  return function dataHandler(_x, _x2) {
@@ -227,7 +1271,7 @@ function useUser() {
227
1271
  redirectTo = _ref.redirectTo,
228
1272
  redirectIfFound = _ref.redirectIfFound;
229
1273
 
230
- var _useSWR = useSWR__default['default']('/api/auth/user', dataHandler),
1274
+ var _useSWR = useSWR('/api/auth/user', dataHandler),
231
1275
  data = _useSWR.data,
232
1276
  error = _useSWR.error;
233
1277
 
@@ -242,7 +1286,7 @@ function useUser() {
242
1286
  redirectTo && !redirectIfFound && !hasUser ||
243
1287
  // If redirectIfFound is also set, redirect if the user was found
244
1288
  redirectIfFound && hasUser) {
245
- Router__default['default'].push(redirectTo);
1289
+ Router__default.push(redirectTo);
246
1290
  }
247
1291
  }, [redirectTo, redirectIfFound, finished, hasUser]);
248
1292
 
@@ -348,43 +1392,43 @@ var LoginForm = function LoginForm(props) {
348
1392
  loading = _useState4[0],
349
1393
  setLoading = _useState4[1];
350
1394
 
351
- return React__default['default'].createElement(
1395
+ return React__default.createElement(
352
1396
  reactBootstrap.Form,
353
1397
  { className: 'login', onSubmit: handleSubmit },
354
- React__default['default'].createElement(
1398
+ React__default.createElement(
355
1399
  'h1',
356
1400
  null,
357
1401
  'Login'
358
1402
  ),
359
- React__default['default'].createElement('hr', null),
1403
+ React__default.createElement('hr', null),
360
1404
  returnFormField({ name: 'email', label: 'Email', type: 'email', required: true }),
361
1405
  returnFormField({ name: 'password', label: 'Password', type: 'password', required: true }),
362
- React__default['default'].createElement('hr', null),
363
- React__default['default'].createElement(
1406
+ React__default.createElement('hr', null),
1407
+ React__default.createElement(
364
1408
  reactBootstrap.Form.Row,
365
1409
  null,
366
- React__default['default'].createElement(
1410
+ React__default.createElement(
367
1411
  reactBootstrap.Form.Group,
368
1412
  { as: reactBootstrap.Col },
369
- React__default['default'].createElement(
1413
+ React__default.createElement(
370
1414
  'a',
371
1415
  { href: '/auth/signup' },
372
1416
  'I don\'t have an account'
373
1417
  )
374
1418
  ),
375
- React__default['default'].createElement(
1419
+ React__default.createElement(
376
1420
  reactBootstrap.Form.Group,
377
1421
  { as: reactBootstrap.Col, className: 'text-right' },
378
- !loading && React__default['default'].createElement(
1422
+ !loading && React__default.createElement(
379
1423
  reactBootstrap.Button,
380
1424
  { type: 'submit' },
381
1425
  'Login'
382
1426
  ),
383
- loading && React__default['default'].createElement(
1427
+ loading && React__default.createElement(
384
1428
  reactBootstrap.Button,
385
1429
  { variant: 'primary', disabled: true },
386
- React__default['default'].createElement(reactBootstrap.Spinner, { as: 'span', animation: 'border', role: 'status', 'aria-hidden': 'true', size: 'sm' }),
387
- React__default['default'].createElement(
1430
+ React__default.createElement(reactBootstrap.Spinner, { as: 'span', animation: 'border', role: 'status', 'aria-hidden': 'true', size: 'sm' }),
1431
+ React__default.createElement(
388
1432
  'span',
389
1433
  { className: 'sr-only' },
390
1434
  'Loading...'
@@ -392,12 +1436,12 @@ var LoginForm = function LoginForm(props) {
392
1436
  )
393
1437
  )
394
1438
  ),
395
- errorMsg && React__default['default'].createElement(
1439
+ errorMsg && React__default.createElement(
396
1440
  'p',
397
1441
  { className: 'error' },
398
1442
  errorMsg
399
1443
  ),
400
- React__default['default'].createElement(
1444
+ React__default.createElement(
401
1445
  'style',
402
1446
  { jsx: 'true'.toString() },
403
1447
  '\n .login {\n margin: 0 auto;\n padding: 1rem;\n border: 1px solid #ccc;\n border-radius: 4px;\n }\n .error {\n color: red;\n margin: 1rem 0 0;\n }\n '
@@ -410,9 +1454,9 @@ var countries = ["United States", "Afghanistan", "Albania", "Algeria", "American
410
1454
 
411
1455
  var states = ['AL', 'AK', 'AS', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'DC', 'FM', 'FL', 'GA', 'GU', 'HI', 'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MH', 'MD', 'MA', 'MI', 'MN', 'MS', 'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'MP', 'OH', 'OK', 'OR', 'PW', 'PA', 'PR', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VI', 'VA', 'WA', 'WV', 'WI', 'WY'];
412
1456
 
413
- var _this$3 = undefined;
1457
+ var _this$1 = undefined;
414
1458
 
415
- var SignupForm$1 = function SignupForm(props) {
1459
+ var SignupForm = function SignupForm(props) {
416
1460
  var handleSubmit = function () {
417
1461
  var _ref3 = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee3(e) {
418
1462
  var formData, body, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, key, res;
@@ -573,7 +1617,7 @@ var SignupForm$1 = function SignupForm(props) {
573
1617
  return _context.stop();
574
1618
  }
575
1619
  }
576
- }, _callee, _this$3);
1620
+ }, _callee, _this$1);
577
1621
  }));
578
1622
 
579
1623
  return function loadInitData() {
@@ -640,7 +1684,7 @@ var SignupForm$1 = function SignupForm(props) {
640
1684
  return _context2.stop();
641
1685
  }
642
1686
  }
643
- }, _callee2, _this$3);
1687
+ }, _callee2, _this$1);
644
1688
  }));
645
1689
 
646
1690
  return function handleOccupationChanged(_x) {
@@ -653,29 +1697,29 @@ var SignupForm$1 = function SignupForm(props) {
653
1697
  loading = _useState14[0],
654
1698
  setLoading = _useState14[1];
655
1699
 
656
- return React__default['default'].createElement(
1700
+ return React__default.createElement(
657
1701
  reactBootstrap.Form,
658
1702
  { className: 'login', id: 'signupForm', onSubmit: handleSubmit },
659
- React__default['default'].createElement(
1703
+ React__default.createElement(
660
1704
  'h1',
661
1705
  null,
662
1706
  'Sign Up'
663
1707
  ),
664
- React__default['default'].createElement('hr', null),
1708
+ React__default.createElement('hr', null),
665
1709
  returnFormField({ name: 'email', label: 'Email', type: 'email', required: true }),
666
- React__default['default'].createElement(
1710
+ React__default.createElement(
667
1711
  reactBootstrap.Form.Row,
668
1712
  null,
669
1713
  returnFormField({ name: 'password', label: 'Password', type: 'password', groupType: reactBootstrap.Col, required: true }),
670
1714
  returnFormField({ name: 'rpassword', label: 'Retype Password', type: 'password', groupType: reactBootstrap.Col, required: true })
671
1715
  ),
672
- React__default['default'].createElement(
1716
+ React__default.createElement(
673
1717
  reactBootstrap.Form.Row,
674
1718
  null,
675
1719
  returnFormField({ name: 'first_name', label: 'First Name', type: 'text', groupType: reactBootstrap.Col, required: true }),
676
1720
  returnFormField({ name: 'last_name', label: 'Last Name', type: 'text', groupType: reactBootstrap.Col, required: true })
677
1721
  ),
678
- React__default['default'].createElement(
1722
+ React__default.createElement(
679
1723
  reactBootstrap.Form.Row,
680
1724
  null,
681
1725
  returnFormField({
@@ -689,7 +1733,7 @@ var SignupForm$1 = function SignupForm(props) {
689
1733
  }),
690
1734
  countryUS && returnFormField({ name: 'state', label: 'State', type: 'select', required: true, groupType: reactBootstrap.Col, options: states })
691
1735
  ),
692
- React__default['default'].createElement(
1736
+ React__default.createElement(
693
1737
  reactBootstrap.Form.Row,
694
1738
  null,
695
1739
  countryUS && returnFormField({ name: 'zip', label: 'Working Zip Code', type: 'text', required: true, groupType: reactBootstrap.Col }),
@@ -736,38 +1780,38 @@ var SignupForm$1 = function SignupForm(props) {
736
1780
  required: true,
737
1781
  options: [{ label: 'By registering you agree to our <a href="/terms" style="color:blue">Terms and Conditions</a> and <a href="/privacy" style="color:blue">Privacy Policy</a> and understand that you will be receiving email communications', value: 'Y' }]
738
1782
  }),
739
- React__default['default'].createElement('hr', null),
740
- React__default['default'].createElement(
1783
+ React__default.createElement('hr', null),
1784
+ React__default.createElement(
741
1785
  reactBootstrap.Form.Row,
742
1786
  null,
743
- React__default['default'].createElement(
1787
+ React__default.createElement(
744
1788
  reactBootstrap.Form.Group,
745
1789
  { as: reactBootstrap.Col },
746
- React__default['default'].createElement(
1790
+ React__default.createElement(
747
1791
  'a',
748
1792
  { href: '/auth/login' },
749
1793
  'I already have an account'
750
1794
  )
751
1795
  ),
752
- React__default['default'].createElement(
1796
+ React__default.createElement(
753
1797
  reactBootstrap.Form.Group,
754
1798
  { as: reactBootstrap.Col, className: 'text-right' },
755
- !loading && React__default['default'].createElement(
1799
+ !loading && React__default.createElement(
756
1800
  reactBootstrap.Button,
757
1801
  { type: 'submit' },
758
1802
  'Sign Up'
759
1803
  ),
760
- loading && React__default['default'].createElement(
1804
+ loading && React__default.createElement(
761
1805
  reactBootstrap.Button,
762
1806
  { variant: 'primary', disabled: true },
763
- React__default['default'].createElement(reactBootstrap.Spinner, {
1807
+ React__default.createElement(reactBootstrap.Spinner, {
764
1808
  as: 'span',
765
1809
  animation: 'border',
766
1810
  role: 'status',
767
1811
  'aria-hidden': 'true',
768
1812
  size: 'sm'
769
1813
  }),
770
- React__default['default'].createElement(
1814
+ React__default.createElement(
771
1815
  'span',
772
1816
  { className: 'sr-only' },
773
1817
  'Loading...'
@@ -775,12 +1819,12 @@ var SignupForm$1 = function SignupForm(props) {
775
1819
  )
776
1820
  )
777
1821
  ),
778
- errorMsg && React__default['default'].createElement(
1822
+ errorMsg && React__default.createElement(
779
1823
  'p',
780
1824
  { className: 'error' },
781
1825
  errorMsg
782
1826
  ),
783
- React__default['default'].createElement(
1827
+ React__default.createElement(
784
1828
  'style',
785
1829
  { jsx: 'true'.toString() },
786
1830
  ' \n .login {\n margin: 0 auto;\n padding: 1rem;\n border: 1px solid #ccc;\n border-radius: 4px;\n }\n .error {\n color: red;\n margin: 1rem 0 0;\n }\n '
@@ -790,7 +1834,7 @@ var SignupForm$1 = function SignupForm(props) {
790
1834
 
791
1835
  var _this$2 = undefined;
792
1836
 
793
- var SignupForm = function SignupForm(props) {
1837
+ var SignupForm$1 = function SignupForm(props) {
794
1838
  var handleSubmit = function () {
795
1839
  var _ref3 = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee3(e) {
796
1840
  var formData, body, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, key, res;
@@ -1070,32 +2114,32 @@ var SignupForm = function SignupForm(props) {
1070
2114
  loading = _useState18[0],
1071
2115
  setLoading = _useState18[1];
1072
2116
 
1073
- return React__default['default'].createElement(
2117
+ return React__default.createElement(
1074
2118
  reactBootstrap.Form,
1075
2119
  { className: 'login', id: 'signupForm', onSubmit: handleSubmit },
1076
- React__default['default'].createElement(
2120
+ React__default.createElement(
1077
2121
  'h1',
1078
2122
  null,
1079
2123
  'Profile'
1080
2124
  ),
1081
- React__default['default'].createElement('hr', null),
1082
- userData ? React__default['default'].createElement(
1083
- React__default['default'].Fragment,
2125
+ React__default.createElement('hr', null),
2126
+ userData ? React__default.createElement(
2127
+ React__default.Fragment,
1084
2128
  null,
1085
2129
  returnFormField({ name: 'email', label: 'Email', type: 'email', required: true, readonly: true, default_value: userData.email }),
1086
- React__default['default'].createElement(
2130
+ React__default.createElement(
1087
2131
  reactBootstrap.Form.Row,
1088
2132
  null,
1089
2133
  returnFormField({ name: 'password', label: 'Password', type: 'password', groupType: reactBootstrap.Col, required: false }),
1090
2134
  returnFormField({ name: 'rpassword', label: 'Retype Password', type: 'password', groupType: reactBootstrap.Col, required: false })
1091
2135
  ),
1092
- React__default['default'].createElement(
2136
+ React__default.createElement(
1093
2137
  reactBootstrap.Form.Row,
1094
2138
  null,
1095
2139
  returnFormField({ name: 'first_name', label: 'First Name', type: 'text', groupType: reactBootstrap.Col, required: true, default_value: userData.shared.first_name }),
1096
2140
  returnFormField({ name: 'last_name', label: 'Last Name', type: 'text', groupType: reactBootstrap.Col, required: true, default_value: userData.shared.last_name })
1097
2141
  ),
1098
- React__default['default'].createElement(
2142
+ React__default.createElement(
1099
2143
  reactBootstrap.Form.Row,
1100
2144
  null,
1101
2145
  returnFormField({
@@ -1110,7 +2154,7 @@ var SignupForm = function SignupForm(props) {
1110
2154
  }),
1111
2155
  countryUS && returnFormField({ name: 'state', label: 'State', type: 'select', required: true, groupType: reactBootstrap.Col, options: states, default_value: userData.shared.state })
1112
2156
  ),
1113
- React__default['default'].createElement(
2157
+ React__default.createElement(
1114
2158
  reactBootstrap.Form.Row,
1115
2159
  null,
1116
2160
  countryUS && returnFormField({ name: 'zip', label: 'Working Zip Code', type: 'text', required: true, groupType: reactBootstrap.Col, default_value: userData.shared.zip }),
@@ -1160,29 +2204,29 @@ var SignupForm = function SignupForm(props) {
1160
2204
  required: true,
1161
2205
  options: [{ label: 'By registering you agree to our <a href="/terms">Terms and Conditions</a> and <a href="/privacy">Privacy Policy</a> and understand that you will be receiving email communications', value: 'Y' }]
1162
2206
  }),
1163
- React__default['default'].createElement('hr', null),
1164
- React__default['default'].createElement(
2207
+ React__default.createElement('hr', null),
2208
+ React__default.createElement(
1165
2209
  reactBootstrap.Form.Row,
1166
2210
  null,
1167
- React__default['default'].createElement(
2211
+ React__default.createElement(
1168
2212
  reactBootstrap.Form.Group,
1169
2213
  { as: reactBootstrap.Col },
1170
- !loading && React__default['default'].createElement(
2214
+ !loading && React__default.createElement(
1171
2215
  reactBootstrap.Button,
1172
2216
  { type: 'submit' },
1173
2217
  'Update'
1174
2218
  ),
1175
- loading && React__default['default'].createElement(
2219
+ loading && React__default.createElement(
1176
2220
  reactBootstrap.Button,
1177
2221
  { variant: 'primary', disabled: true },
1178
- React__default['default'].createElement(reactBootstrap.Spinner, {
2222
+ React__default.createElement(reactBootstrap.Spinner, {
1179
2223
  as: 'span',
1180
2224
  animation: 'border',
1181
2225
  role: 'status',
1182
2226
  'aria-hidden': 'true',
1183
2227
  size: 'sm'
1184
2228
  }),
1185
- React__default['default'].createElement(
2229
+ React__default.createElement(
1186
2230
  'span',
1187
2231
  { className: 'sr-only' },
1188
2232
  'Loading...'
@@ -1190,24 +2234,24 @@ var SignupForm = function SignupForm(props) {
1190
2234
  )
1191
2235
  )
1192
2236
  )
1193
- ) : React__default['default'].createElement(reactBootstrap.Spinner, {
2237
+ ) : React__default.createElement(reactBootstrap.Spinner, {
1194
2238
  as: 'span',
1195
2239
  animation: 'border',
1196
2240
  role: 'status',
1197
2241
  'aria-hidden': 'true',
1198
2242
  size: 'sm'
1199
2243
  }),
1200
- errorMsg && React__default['default'].createElement(
2244
+ errorMsg && React__default.createElement(
1201
2245
  'p',
1202
2246
  { className: 'error' },
1203
2247
  errorMsg
1204
2248
  ),
1205
- successMsg && React__default['default'].createElement(
2249
+ successMsg && React__default.createElement(
1206
2250
  'p',
1207
2251
  { className: 'success' },
1208
2252
  successMsg
1209
2253
  ),
1210
- React__default['default'].createElement(
2254
+ React__default.createElement(
1211
2255
  'style',
1212
2256
  { jsx: 'true'.toString() },
1213
2257
  ' \n .login {\n margin: 0 auto;\n padding: 1rem;\n border: 1px solid #ccc;\n border-radius: 4px;\n }\n .error {\n color: red;\n margin: 1rem 0 0;\n }\n .success {\n color: green;\n margin: 1rem 0 0;\n }\n '
@@ -1220,7 +2264,7 @@ var MAX_AGE = 60 * 60 * 8; // 8 hours
1220
2264
 
1221
2265
  function setTokenCookie(res, token, eKey) {
1222
2266
  var cookies_serailized = [];
1223
- cookies_serailized.push(index.serialize_1(TOKEN_NAME, token, {
2267
+ cookies_serailized.push(index$6.serialize_1(TOKEN_NAME, token, {
1224
2268
  //maxAge: MAX_AGE, // we want login cookie to expire when browser
1225
2269
  //expires: new Date(Date.now() + MAX_AGE * 1000),
1226
2270
  //httpOnly: true,
@@ -1229,7 +2273,7 @@ function setTokenCookie(res, token, eKey) {
1229
2273
  //sameSite: 'lax',
1230
2274
  }));
1231
2275
 
1232
- cookies_serailized.push(index.serialize_1('eKey', eKey, {
2276
+ cookies_serailized.push(index$6.serialize_1('eKey', eKey, {
1233
2277
  //maxAge: MAX_AGE, // we want login cookie to expire when browser
1234
2278
  //expires: new Date(Date.now() + MAX_AGE * 1000),
1235
2279
  //httpOnly: true,
@@ -1243,12 +2287,12 @@ function setTokenCookie(res, token, eKey) {
1243
2287
 
1244
2288
  function removeTokenCookie(res) {
1245
2289
  var cookies_serailized = [];
1246
- cookies_serailized.push(index.serialize_1(TOKEN_NAME, '', {
2290
+ cookies_serailized.push(index$6.serialize_1(TOKEN_NAME, '', {
1247
2291
  maxAge: -1,
1248
2292
  expires: new Date(Date.now() - MAX_AGE * 1000),
1249
2293
  path: '/'
1250
2294
  }));
1251
- cookies_serailized.push(index.serialize_1('eKey', '', {
2295
+ cookies_serailized.push(index$6.serialize_1('eKey', '', {
1252
2296
  maxAge: -1,
1253
2297
  expires: new Date(Date.now() - MAX_AGE * 1000),
1254
2298
  path: '/'
@@ -1263,7 +2307,7 @@ function parseCookies(req) {
1263
2307
 
1264
2308
  // For pages we do need to parse the cookies.
1265
2309
  var cookie = req.headers ? req.headers.cookie : null;
1266
- return index.parse_1(cookie || '');
2310
+ return index$6.parse_1(cookie || '');
1267
2311
  }
1268
2312
 
1269
2313
  function getTokenCookie(req) {
@@ -1325,10 +2369,10 @@ var iron = /*#__PURE__*/Object.freeze({
1325
2369
  getSession: getSession
1326
2370
  });
1327
2371
 
1328
- var toStr$5 = Object.prototype.toString;
2372
+ var toStr = Object.prototype.toString;
1329
2373
 
1330
2374
  var isArguments = function isArguments(value) {
1331
- var str = toStr$5.call(value);
2375
+ var str = toStr.call(value);
1332
2376
  var isArgs = str === '[object Arguments]';
1333
2377
  if (!isArgs) {
1334
2378
  isArgs = str !== '[object Array]' &&
@@ -1336,16 +2380,16 @@ var isArguments = function isArguments(value) {
1336
2380
  typeof value === 'object' &&
1337
2381
  typeof value.length === 'number' &&
1338
2382
  value.length >= 0 &&
1339
- toStr$5.call(value.callee) === '[object Function]';
2383
+ toStr.call(value.callee) === '[object Function]';
1340
2384
  }
1341
2385
  return isArgs;
1342
2386
  };
1343
2387
 
1344
- var keysShim$1;
2388
+ var keysShim;
1345
2389
  if (!Object.keys) {
1346
2390
  // modified from https://github.com/es-shims/es5-shim
1347
2391
  var has$1 = Object.prototype.hasOwnProperty;
1348
- var toStr$4 = Object.prototype.toString;
2392
+ var toStr$1 = Object.prototype.toString;
1349
2393
  var isArgs = isArguments; // eslint-disable-line global-require
1350
2394
  var isEnumerable = Object.prototype.propertyIsEnumerable;
1351
2395
  var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');
@@ -1418,11 +2462,11 @@ if (!Object.keys) {
1418
2462
  }
1419
2463
  };
1420
2464
 
1421
- keysShim$1 = function keys(object) {
2465
+ keysShim = function keys(object) {
1422
2466
  var isObject = object !== null && typeof object === 'object';
1423
- var isFunction = toStr$4.call(object) === '[object Function]';
2467
+ var isFunction = toStr$1.call(object) === '[object Function]';
1424
2468
  var isArguments = isArgs(object);
1425
- var isString = isObject && toStr$4.call(object) === '[object String]';
2469
+ var isString = isObject && toStr$1.call(object) === '[object String]';
1426
2470
  var theKeys = [];
1427
2471
 
1428
2472
  if (!isObject && !isFunction && !isArguments) {
@@ -1460,17 +2504,17 @@ if (!Object.keys) {
1460
2504
  return theKeys;
1461
2505
  };
1462
2506
  }
1463
- var implementation$3 = keysShim$1;
2507
+ var implementation = keysShim;
1464
2508
 
1465
- var slice$1 = Array.prototype.slice;
2509
+ var slice = Array.prototype.slice;
1466
2510
 
1467
2511
 
1468
2512
  var origKeys = Object.keys;
1469
- var keysShim = origKeys ? function keys(o) { return origKeys(o); } : implementation$3;
2513
+ var keysShim$1 = origKeys ? function keys(o) { return origKeys(o); } : implementation;
1470
2514
 
1471
2515
  var originalKeys = Object.keys;
1472
2516
 
1473
- keysShim.shim = function shimObjectKeys() {
2517
+ keysShim$1.shim = function shimObjectKeys() {
1474
2518
  if (Object.keys) {
1475
2519
  var keysWorksWithArguments = (function () {
1476
2520
  // Safari 5.0 bug
@@ -1480,27 +2524,27 @@ keysShim.shim = function shimObjectKeys() {
1480
2524
  if (!keysWorksWithArguments) {
1481
2525
  Object.keys = function keys(object) { // eslint-disable-line func-name-matching
1482
2526
  if (isArguments(object)) {
1483
- return originalKeys(slice$1.call(object));
2527
+ return originalKeys(slice.call(object));
1484
2528
  }
1485
2529
  return originalKeys(object);
1486
2530
  };
1487
2531
  }
1488
2532
  } else {
1489
- Object.keys = keysShim;
2533
+ Object.keys = keysShim$1;
1490
2534
  }
1491
- return Object.keys || keysShim;
2535
+ return Object.keys || keysShim$1;
1492
2536
  };
1493
2537
 
1494
- var objectKeys = keysShim;
2538
+ var objectKeys = keysShim$1;
1495
2539
 
1496
- var hasSymbols$4 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
2540
+ var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
1497
2541
 
1498
- var toStr$3 = Object.prototype.toString;
2542
+ var toStr$2 = Object.prototype.toString;
1499
2543
  var concat = Array.prototype.concat;
1500
2544
  var origDefineProperty = Object.defineProperty;
1501
2545
 
1502
2546
  var isFunction = function (fn) {
1503
- return typeof fn === 'function' && toStr$3.call(fn) === '[object Function]';
2547
+ return typeof fn === 'function' && toStr$2.call(fn) === '[object Function]';
1504
2548
  };
1505
2549
 
1506
2550
  var arePropertyDescriptorsSupported = function () {
@@ -1537,7 +2581,7 @@ var defineProperty = function (object, name, value, predicate) {
1537
2581
  var defineProperties = function (object, map) {
1538
2582
  var predicates = arguments.length > 2 ? arguments[2] : {};
1539
2583
  var props = objectKeys(map);
1540
- if (hasSymbols$4) {
2584
+ if (hasSymbols) {
1541
2585
  props = concat.call(props, Object.getOwnPropertySymbols(map));
1542
2586
  }
1543
2587
  for (var i = 0; i < props.length; i += 1) {
@@ -1549,59 +2593,6 @@ defineProperties.supportsDescriptors = !!supportsDescriptors;
1549
2593
 
1550
2594
  var defineProperties_1 = defineProperties;
1551
2595
 
1552
- /* eslint no-invalid-this: 1 */
1553
-
1554
- var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
1555
- var slice = Array.prototype.slice;
1556
- var toStr$2 = Object.prototype.toString;
1557
- var funcType = '[object Function]';
1558
-
1559
- var implementation$2 = function bind(that) {
1560
- var target = this;
1561
- if (typeof target !== 'function' || toStr$2.call(target) !== funcType) {
1562
- throw new TypeError(ERROR_MESSAGE + target);
1563
- }
1564
- var args = slice.call(arguments, 1);
1565
-
1566
- var bound;
1567
- var binder = function () {
1568
- if (this instanceof bound) {
1569
- var result = target.apply(
1570
- this,
1571
- args.concat(slice.call(arguments))
1572
- );
1573
- if (Object(result) === result) {
1574
- return result;
1575
- }
1576
- return this;
1577
- } else {
1578
- return target.apply(
1579
- that,
1580
- args.concat(slice.call(arguments))
1581
- );
1582
- }
1583
- };
1584
-
1585
- var boundLength = Math.max(0, target.length - args.length);
1586
- var boundArgs = [];
1587
- for (var i = 0; i < boundLength; i++) {
1588
- boundArgs.push('$' + i);
1589
- }
1590
-
1591
- bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
1592
-
1593
- if (target.prototype) {
1594
- var Empty = function Empty() {};
1595
- Empty.prototype = target.prototype;
1596
- bound.prototype = new Empty();
1597
- Empty.prototype = null;
1598
- }
1599
-
1600
- return bound;
1601
- };
1602
-
1603
- var functionBind = Function.prototype.bind || implementation$2;
1604
-
1605
2596
  /* eslint complexity: [2, 18], max-statements: [2, 33] */
1606
2597
  var shams = function hasSymbols() {
1607
2598
  if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
@@ -1625,7 +2616,7 @@ var shams = function hasSymbols() {
1625
2616
 
1626
2617
  var symVal = 42;
1627
2618
  obj[sym] = symVal;
1628
- for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
2619
+ for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax
1629
2620
  if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
1630
2621
 
1631
2622
  if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
@@ -1643,10 +2634,10 @@ var shams = function hasSymbols() {
1643
2634
  return true;
1644
2635
  };
1645
2636
 
1646
- var origSymbol = typeof Symbol !== 'undefined' && Symbol;
2637
+ var origSymbol = _commonjsHelpers.commonjsGlobal.Symbol;
1647
2638
 
1648
2639
 
1649
- var hasSymbols$3 = function hasNativeSymbols() {
2640
+ var hasSymbols$1 = function hasNativeSymbols() {
1650
2641
  if (typeof origSymbol !== 'function') { return false; }
1651
2642
  if (typeof Symbol !== 'function') { return false; }
1652
2643
  if (typeof origSymbol('foo') !== 'symbol') { return false; }
@@ -1655,34 +2646,79 @@ var hasSymbols$3 = function hasNativeSymbols() {
1655
2646
  return shams();
1656
2647
  };
1657
2648
 
1658
- var src = functionBind.call(Function.call, Object.prototype.hasOwnProperty);
2649
+ /* eslint no-invalid-this: 1 */
1659
2650
 
1660
- var undefined$1;
2651
+ var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
2652
+ var slice$1 = Array.prototype.slice;
2653
+ var toStr$3 = Object.prototype.toString;
2654
+ var funcType = '[object Function]';
1661
2655
 
1662
- var $SyntaxError$1 = SyntaxError;
1663
- var $Function = Function;
1664
- var $TypeError$5 = TypeError;
2656
+ var implementation$1 = function bind(that) {
2657
+ var target = this;
2658
+ if (typeof target !== 'function' || toStr$3.call(target) !== funcType) {
2659
+ throw new TypeError(ERROR_MESSAGE + target);
2660
+ }
2661
+ var args = slice$1.call(arguments, 1);
1665
2662
 
1666
- // eslint-disable-next-line consistent-return
1667
- var getEvalledConstructor = function (expressionSyntax) {
1668
- try {
1669
- return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
1670
- } catch (e) {}
2663
+ var bound;
2664
+ var binder = function () {
2665
+ if (this instanceof bound) {
2666
+ var result = target.apply(
2667
+ this,
2668
+ args.concat(slice$1.call(arguments))
2669
+ );
2670
+ if (Object(result) === result) {
2671
+ return result;
2672
+ }
2673
+ return this;
2674
+ } else {
2675
+ return target.apply(
2676
+ that,
2677
+ args.concat(slice$1.call(arguments))
2678
+ );
2679
+ }
2680
+ };
2681
+
2682
+ var boundLength = Math.max(0, target.length - args.length);
2683
+ var boundArgs = [];
2684
+ for (var i = 0; i < boundLength; i++) {
2685
+ boundArgs.push('$' + i);
2686
+ }
2687
+
2688
+ bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
2689
+
2690
+ if (target.prototype) {
2691
+ var Empty = function Empty() {};
2692
+ Empty.prototype = target.prototype;
2693
+ bound.prototype = new Empty();
2694
+ Empty.prototype = null;
2695
+ }
2696
+
2697
+ return bound;
1671
2698
  };
1672
2699
 
1673
- var $gOPD$2 = Object.getOwnPropertyDescriptor;
1674
- if ($gOPD$2) {
2700
+ var functionBind = Function.prototype.bind || implementation$1;
2701
+
2702
+ /* globals
2703
+ Atomics,
2704
+ SharedArrayBuffer,
2705
+ */
2706
+
2707
+ var undefined$1;
2708
+
2709
+ var $TypeError = TypeError;
2710
+
2711
+ var $gOPD = Object.getOwnPropertyDescriptor;
2712
+ if ($gOPD) {
1675
2713
  try {
1676
- $gOPD$2({}, '');
2714
+ $gOPD({}, '');
1677
2715
  } catch (e) {
1678
- $gOPD$2 = null; // this is IE 8, which has a broken gOPD
2716
+ $gOPD = null; // this is IE 8, which has a broken gOPD
1679
2717
  }
1680
2718
  }
1681
2719
 
1682
- var throwTypeError = function () {
1683
- throw new $TypeError$5();
1684
- };
1685
- var ThrowTypeError = $gOPD$2
2720
+ var throwTypeError = function () { throw new $TypeError(); };
2721
+ var ThrowTypeError = $gOPD
1686
2722
  ? (function () {
1687
2723
  try {
1688
2724
  // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
@@ -1691,7 +2727,7 @@ var ThrowTypeError = $gOPD$2
1691
2727
  } catch (calleeThrows) {
1692
2728
  try {
1693
2729
  // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
1694
- return $gOPD$2(arguments, 'callee').get;
2730
+ return $gOPD(arguments, 'callee').get;
1695
2731
  } catch (gOPDthrows) {
1696
2732
  return throwTypeError;
1697
2733
  }
@@ -1699,354 +2735,206 @@ var ThrowTypeError = $gOPD$2
1699
2735
  }())
1700
2736
  : throwTypeError;
1701
2737
 
1702
- var hasSymbols$2 = hasSymbols$3();
2738
+ var hasSymbols$2 = hasSymbols$1();
1703
2739
 
1704
2740
  var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
1705
-
1706
- var needsEval = {};
2741
+ var generatorFunction = undefined$1;
2742
+ var asyncFunction = undefined$1;
2743
+ var asyncGenFunction = undefined$1;
1707
2744
 
1708
2745
  var TypedArray = typeof Uint8Array === 'undefined' ? undefined$1 : getProto(Uint8Array);
1709
2746
 
1710
2747
  var INTRINSICS = {
1711
- '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
1712
2748
  '%Array%': Array,
1713
2749
  '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
2750
+ '%ArrayBufferPrototype%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer.prototype,
1714
2751
  '%ArrayIteratorPrototype%': hasSymbols$2 ? getProto([][Symbol.iterator]()) : undefined$1,
2752
+ '%ArrayPrototype%': Array.prototype,
2753
+ '%ArrayProto_entries%': Array.prototype.entries,
2754
+ '%ArrayProto_forEach%': Array.prototype.forEach,
2755
+ '%ArrayProto_keys%': Array.prototype.keys,
2756
+ '%ArrayProto_values%': Array.prototype.values,
1715
2757
  '%AsyncFromSyncIteratorPrototype%': undefined$1,
1716
- '%AsyncFunction%': needsEval,
1717
- '%AsyncGenerator%': needsEval,
1718
- '%AsyncGeneratorFunction%': needsEval,
1719
- '%AsyncIteratorPrototype%': needsEval,
2758
+ '%AsyncFunction%': asyncFunction,
2759
+ '%AsyncFunctionPrototype%': undefined$1,
2760
+ '%AsyncGenerator%': undefined$1,
2761
+ '%AsyncGeneratorFunction%': asyncGenFunction,
2762
+ '%AsyncGeneratorPrototype%': undefined$1,
2763
+ '%AsyncIteratorPrototype%': undefined$1,
1720
2764
  '%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
1721
- '%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
1722
2765
  '%Boolean%': Boolean,
2766
+ '%BooleanPrototype%': Boolean.prototype,
1723
2767
  '%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
2768
+ '%DataViewPrototype%': typeof DataView === 'undefined' ? undefined$1 : DataView.prototype,
1724
2769
  '%Date%': Date,
2770
+ '%DatePrototype%': Date.prototype,
1725
2771
  '%decodeURI%': decodeURI,
1726
2772
  '%decodeURIComponent%': decodeURIComponent,
1727
2773
  '%encodeURI%': encodeURI,
1728
2774
  '%encodeURIComponent%': encodeURIComponent,
1729
2775
  '%Error%': Error,
2776
+ '%ErrorPrototype%': Error.prototype,
1730
2777
  '%eval%': eval, // eslint-disable-line no-eval
1731
2778
  '%EvalError%': EvalError,
2779
+ '%EvalErrorPrototype%': EvalError.prototype,
1732
2780
  '%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
2781
+ '%Float32ArrayPrototype%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array.prototype,
1733
2782
  '%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
1734
- '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
1735
- '%Function%': $Function,
1736
- '%GeneratorFunction%': needsEval,
2783
+ '%Float64ArrayPrototype%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array.prototype,
2784
+ '%Function%': Function,
2785
+ '%FunctionPrototype%': Function.prototype,
2786
+ '%Generator%': undefined$1,
2787
+ '%GeneratorFunction%': generatorFunction,
2788
+ '%GeneratorPrototype%': undefined$1,
1737
2789
  '%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
2790
+ '%Int8ArrayPrototype%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array.prototype,
1738
2791
  '%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
2792
+ '%Int16ArrayPrototype%': typeof Int16Array === 'undefined' ? undefined$1 : Int8Array.prototype,
1739
2793
  '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
2794
+ '%Int32ArrayPrototype%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array.prototype,
1740
2795
  '%isFinite%': isFinite,
1741
2796
  '%isNaN%': isNaN,
1742
2797
  '%IteratorPrototype%': hasSymbols$2 ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
1743
2798
  '%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
2799
+ '%JSONParse%': typeof JSON === 'object' ? JSON.parse : undefined$1,
1744
2800
  '%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
1745
2801
  '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$2 ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
2802
+ '%MapPrototype%': typeof Map === 'undefined' ? undefined$1 : Map.prototype,
1746
2803
  '%Math%': Math,
1747
2804
  '%Number%': Number,
2805
+ '%NumberPrototype%': Number.prototype,
1748
2806
  '%Object%': Object,
2807
+ '%ObjectPrototype%': Object.prototype,
2808
+ '%ObjProto_toString%': Object.prototype.toString,
2809
+ '%ObjProto_valueOf%': Object.prototype.valueOf,
1749
2810
  '%parseFloat%': parseFloat,
1750
2811
  '%parseInt%': parseInt,
1751
2812
  '%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
2813
+ '%PromisePrototype%': typeof Promise === 'undefined' ? undefined$1 : Promise.prototype,
2814
+ '%PromiseProto_then%': typeof Promise === 'undefined' ? undefined$1 : Promise.prototype.then,
2815
+ '%Promise_all%': typeof Promise === 'undefined' ? undefined$1 : Promise.all,
2816
+ '%Promise_reject%': typeof Promise === 'undefined' ? undefined$1 : Promise.reject,
2817
+ '%Promise_resolve%': typeof Promise === 'undefined' ? undefined$1 : Promise.resolve,
1752
2818
  '%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
1753
2819
  '%RangeError%': RangeError,
2820
+ '%RangeErrorPrototype%': RangeError.prototype,
1754
2821
  '%ReferenceError%': ReferenceError,
2822
+ '%ReferenceErrorPrototype%': ReferenceError.prototype,
1755
2823
  '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
1756
2824
  '%RegExp%': RegExp,
2825
+ '%RegExpPrototype%': RegExp.prototype,
1757
2826
  '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
1758
2827
  '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$2 ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
2828
+ '%SetPrototype%': typeof Set === 'undefined' ? undefined$1 : Set.prototype,
1759
2829
  '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
2830
+ '%SharedArrayBufferPrototype%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer.prototype,
1760
2831
  '%String%': String,
1761
2832
  '%StringIteratorPrototype%': hasSymbols$2 ? getProto(''[Symbol.iterator]()) : undefined$1,
2833
+ '%StringPrototype%': String.prototype,
1762
2834
  '%Symbol%': hasSymbols$2 ? Symbol : undefined$1,
1763
- '%SyntaxError%': $SyntaxError$1,
2835
+ '%SymbolPrototype%': hasSymbols$2 ? Symbol.prototype : undefined$1,
2836
+ '%SyntaxError%': SyntaxError,
2837
+ '%SyntaxErrorPrototype%': SyntaxError.prototype,
1764
2838
  '%ThrowTypeError%': ThrowTypeError,
1765
2839
  '%TypedArray%': TypedArray,
1766
- '%TypeError%': $TypeError$5,
2840
+ '%TypedArrayPrototype%': TypedArray ? TypedArray.prototype : undefined$1,
2841
+ '%TypeError%': $TypeError,
2842
+ '%TypeErrorPrototype%': $TypeError.prototype,
1767
2843
  '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
2844
+ '%Uint8ArrayPrototype%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array.prototype,
1768
2845
  '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
2846
+ '%Uint8ClampedArrayPrototype%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray.prototype,
1769
2847
  '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
2848
+ '%Uint16ArrayPrototype%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array.prototype,
1770
2849
  '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
2850
+ '%Uint32ArrayPrototype%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array.prototype,
1771
2851
  '%URIError%': URIError,
2852
+ '%URIErrorPrototype%': URIError.prototype,
1772
2853
  '%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
1773
- '%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
1774
- '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
1775
- };
1776
-
1777
- var doEval = function doEval(name) {
1778
- var value;
1779
- if (name === '%AsyncFunction%') {
1780
- value = getEvalledConstructor('async function () {}');
1781
- } else if (name === '%GeneratorFunction%') {
1782
- value = getEvalledConstructor('function* () {}');
1783
- } else if (name === '%AsyncGeneratorFunction%') {
1784
- value = getEvalledConstructor('async function* () {}');
1785
- } else if (name === '%AsyncGenerator%') {
1786
- var fn = doEval('%AsyncGeneratorFunction%');
1787
- if (fn) {
1788
- value = fn.prototype;
1789
- }
1790
- } else if (name === '%AsyncIteratorPrototype%') {
1791
- var gen = doEval('%AsyncGenerator%');
1792
- if (gen) {
1793
- value = getProto(gen.prototype);
1794
- }
1795
- }
1796
-
1797
- INTRINSICS[name] = value;
1798
-
1799
- return value;
2854
+ '%WeakMapPrototype%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap.prototype,
2855
+ '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet,
2856
+ '%WeakSetPrototype%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet.prototype
1800
2857
  };
1801
2858
 
1802
- var LEGACY_ALIASES = {
1803
- '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
1804
- '%ArrayPrototype%': ['Array', 'prototype'],
1805
- '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
1806
- '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
1807
- '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
1808
- '%ArrayProto_values%': ['Array', 'prototype', 'values'],
1809
- '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
1810
- '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
1811
- '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
1812
- '%BooleanPrototype%': ['Boolean', 'prototype'],
1813
- '%DataViewPrototype%': ['DataView', 'prototype'],
1814
- '%DatePrototype%': ['Date', 'prototype'],
1815
- '%ErrorPrototype%': ['Error', 'prototype'],
1816
- '%EvalErrorPrototype%': ['EvalError', 'prototype'],
1817
- '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
1818
- '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
1819
- '%FunctionPrototype%': ['Function', 'prototype'],
1820
- '%Generator%': ['GeneratorFunction', 'prototype'],
1821
- '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
1822
- '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
1823
- '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
1824
- '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
1825
- '%JSONParse%': ['JSON', 'parse'],
1826
- '%JSONStringify%': ['JSON', 'stringify'],
1827
- '%MapPrototype%': ['Map', 'prototype'],
1828
- '%NumberPrototype%': ['Number', 'prototype'],
1829
- '%ObjectPrototype%': ['Object', 'prototype'],
1830
- '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
1831
- '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
1832
- '%PromisePrototype%': ['Promise', 'prototype'],
1833
- '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
1834
- '%Promise_all%': ['Promise', 'all'],
1835
- '%Promise_reject%': ['Promise', 'reject'],
1836
- '%Promise_resolve%': ['Promise', 'resolve'],
1837
- '%RangeErrorPrototype%': ['RangeError', 'prototype'],
1838
- '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
1839
- '%RegExpPrototype%': ['RegExp', 'prototype'],
1840
- '%SetPrototype%': ['Set', 'prototype'],
1841
- '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
1842
- '%StringPrototype%': ['String', 'prototype'],
1843
- '%SymbolPrototype%': ['Symbol', 'prototype'],
1844
- '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
1845
- '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
1846
- '%TypeErrorPrototype%': ['TypeError', 'prototype'],
1847
- '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
1848
- '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
1849
- '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
1850
- '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
1851
- '%URIErrorPrototype%': ['URIError', 'prototype'],
1852
- '%WeakMapPrototype%': ['WeakMap', 'prototype'],
1853
- '%WeakSetPrototype%': ['WeakSet', 'prototype']
1854
- };
1855
-
1856
-
1857
-
1858
- var $concat$2 = functionBind.call(Function.call, Array.prototype.concat);
1859
- var $spliceApply = functionBind.call(Function.apply, Array.prototype.splice);
2859
+
1860
2860
  var $replace = functionBind.call(Function.call, String.prototype.replace);
1861
- var $strSlice = functionBind.call(Function.call, String.prototype.slice);
1862
2861
 
1863
2862
  /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
1864
2863
  var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
1865
2864
  var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
1866
2865
  var stringToPath = function stringToPath(string) {
1867
- var first = $strSlice(string, 0, 1);
1868
- var last = $strSlice(string, -1);
1869
- if (first === '%' && last !== '%') {
1870
- throw new $SyntaxError$1('invalid intrinsic syntax, expected closing `%`');
1871
- } else if (last === '%' && first !== '%') {
1872
- throw new $SyntaxError$1('invalid intrinsic syntax, expected opening `%`');
1873
- }
1874
2866
  var result = [];
1875
2867
  $replace(string, rePropName, function (match, number, quote, subString) {
1876
- result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
2868
+ result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : (number || match);
1877
2869
  });
1878
2870
  return result;
1879
2871
  };
1880
2872
  /* end adaptation */
1881
2873
 
1882
2874
  var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
1883
- var intrinsicName = name;
1884
- var alias;
1885
- if (src(LEGACY_ALIASES, intrinsicName)) {
1886
- alias = LEGACY_ALIASES[intrinsicName];
1887
- intrinsicName = '%' + alias[0] + '%';
2875
+ if (!(name in INTRINSICS)) {
2876
+ throw new SyntaxError('intrinsic ' + name + ' does not exist!');
1888
2877
  }
1889
2878
 
1890
- if (src(INTRINSICS, intrinsicName)) {
1891
- var value = INTRINSICS[intrinsicName];
1892
- if (value === needsEval) {
1893
- value = doEval(intrinsicName);
1894
- }
1895
- if (typeof value === 'undefined' && !allowMissing) {
1896
- throw new $TypeError$5('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
1897
- }
1898
-
1899
- return {
1900
- alias: alias,
1901
- name: intrinsicName,
1902
- value: value
1903
- };
2879
+ // istanbul ignore if // hopefully this is impossible to test :-)
2880
+ if (typeof INTRINSICS[name] === 'undefined' && !allowMissing) {
2881
+ throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
1904
2882
  }
1905
2883
 
1906
- throw new $SyntaxError$1('intrinsic ' + name + ' does not exist!');
2884
+ return INTRINSICS[name];
1907
2885
  };
1908
2886
 
1909
- var getIntrinsic = function GetIntrinsic(name, allowMissing) {
2887
+ var GetIntrinsic = function GetIntrinsic(name, allowMissing) {
1910
2888
  if (typeof name !== 'string' || name.length === 0) {
1911
- throw new $TypeError$5('intrinsic name must be a non-empty string');
2889
+ throw new TypeError('intrinsic name must be a non-empty string');
1912
2890
  }
1913
2891
  if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
1914
- throw new $TypeError$5('"allowMissing" argument must be a boolean');
2892
+ throw new TypeError('"allowMissing" argument must be a boolean');
1915
2893
  }
1916
2894
 
1917
2895
  var parts = stringToPath(name);
1918
- var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
1919
-
1920
- var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
1921
- var intrinsicRealName = intrinsic.name;
1922
- var value = intrinsic.value;
1923
- var skipFurtherCaching = false;
1924
-
1925
- var alias = intrinsic.alias;
1926
- if (alias) {
1927
- intrinsicBaseName = alias[0];
1928
- $spliceApply(parts, $concat$2([0, 1], alias));
1929
- }
1930
-
1931
- for (var i = 1, isOwn = true; i < parts.length; i += 1) {
1932
- var part = parts[i];
1933
- var first = $strSlice(part, 0, 1);
1934
- var last = $strSlice(part, -1);
1935
- if (
1936
- (
1937
- (first === '"' || first === "'" || first === '`')
1938
- || (last === '"' || last === "'" || last === '`')
1939
- )
1940
- && first !== last
1941
- ) {
1942
- throw new $SyntaxError$1('property names with quotes must have matching quotes');
1943
- }
1944
- if (part === 'constructor' || !isOwn) {
1945
- skipFurtherCaching = true;
1946
- }
1947
2896
 
1948
- intrinsicBaseName += '.' + part;
1949
- intrinsicRealName = '%' + intrinsicBaseName + '%';
1950
-
1951
- if (src(INTRINSICS, intrinsicRealName)) {
1952
- value = INTRINSICS[intrinsicRealName];
1953
- } else if (value != null) {
1954
- if (!(part in value)) {
1955
- if (!allowMissing) {
1956
- throw new $TypeError$5('base intrinsic for ' + name + ' exists, but the property is not available.');
1957
- }
1958
- return void undefined$1;
1959
- }
1960
- if ($gOPD$2 && (i + 1) >= parts.length) {
1961
- var desc = $gOPD$2(value, part);
1962
- isOwn = !!desc;
1963
-
1964
- // By convention, when a data property is converted to an accessor
1965
- // property to emulate a data property that does not suffer from
1966
- // the override mistake, that accessor's getter is marked with
1967
- // an `originalValue` property. Here, when we detect this, we
1968
- // uphold the illusion by pretending to see that original data
1969
- // property, i.e., returning the value rather than the getter
1970
- // itself.
1971
- if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
1972
- value = desc.get;
1973
- } else {
1974
- value = value[part];
2897
+ var value = getBaseIntrinsic('%' + (parts.length > 0 ? parts[0] : '') + '%', allowMissing);
2898
+ for (var i = 1; i < parts.length; i += 1) {
2899
+ if (value != null) {
2900
+ if ($gOPD && (i + 1) >= parts.length) {
2901
+ var desc = $gOPD(value, parts[i]);
2902
+ if (!allowMissing && !(parts[i] in value)) {
2903
+ throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
1975
2904
  }
2905
+ value = desc ? (desc.get || desc.value) : value[parts[i]];
1976
2906
  } else {
1977
- isOwn = src(value, part);
1978
- value = value[part];
1979
- }
1980
-
1981
- if (isOwn && !skipFurtherCaching) {
1982
- INTRINSICS[intrinsicRealName] = value;
2907
+ value = value[parts[i]];
1983
2908
  }
1984
2909
  }
1985
2910
  }
1986
2911
  return value;
1987
2912
  };
1988
2913
 
1989
- var callBind = _commonjsHelpers.createCommonjsModule(function (module) {
2914
+ var $Function = GetIntrinsic('%Function%');
2915
+ var $apply = $Function.apply;
2916
+ var $call = $Function.call;
1990
2917
 
1991
-
1992
-
1993
-
1994
- var $apply = getIntrinsic('%Function.prototype.apply%');
1995
- var $call = getIntrinsic('%Function.prototype.call%');
1996
- var $reflectApply = getIntrinsic('%Reflect.apply%', true) || functionBind.call($call, $apply);
1997
-
1998
- var $gOPD = getIntrinsic('%Object.getOwnPropertyDescriptor%', true);
1999
- var $defineProperty = getIntrinsic('%Object.defineProperty%', true);
2000
- var $max = getIntrinsic('%Math.max%');
2001
-
2002
- if ($defineProperty) {
2003
- try {
2004
- $defineProperty({}, 'a', { value: 1 });
2005
- } catch (e) {
2006
- // IE 8 has a broken defineProperty
2007
- $defineProperty = null;
2008
- }
2009
- }
2010
-
2011
- module.exports = function callBind(originalFunction) {
2012
- var func = $reflectApply(functionBind, $call, arguments);
2013
- if ($gOPD && $defineProperty) {
2014
- var desc = $gOPD(func, 'length');
2015
- if (desc.configurable) {
2016
- // original length, plus the receiver, minus any additional arguments (after the receiver)
2017
- $defineProperty(
2018
- func,
2019
- 'length',
2020
- { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
2021
- );
2022
- }
2023
- }
2024
- return func;
2918
+ var callBind = function callBind() {
2919
+ return functionBind.apply($call, arguments);
2025
2920
  };
2026
2921
 
2027
- var applyBind = function applyBind() {
2028
- return $reflectApply(functionBind, $apply, arguments);
2922
+ var apply = function applyBind() {
2923
+ return functionBind.apply($apply, arguments);
2029
2924
  };
2925
+ callBind.apply = apply;
2030
2926
 
2031
- if ($defineProperty) {
2032
- $defineProperty(module.exports, 'apply', { value: applyBind });
2033
- } else {
2034
- module.exports.apply = applyBind;
2035
- }
2036
- });
2037
- callBind.apply;
2038
-
2039
- var $indexOf = callBind(getIntrinsic('String.prototype.indexOf'));
2927
+ var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
2040
2928
 
2041
- var callBound$1 = function callBoundIntrinsic(name, allowMissing) {
2042
- var intrinsic = getIntrinsic(name, !!allowMissing);
2043
- if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
2929
+ var callBound = function callBoundIntrinsic(name, allowMissing) {
2930
+ var intrinsic = GetIntrinsic(name, !!allowMissing);
2931
+ if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.')) {
2044
2932
  return callBind(intrinsic);
2045
2933
  }
2046
2934
  return intrinsic;
2047
2935
  };
2048
2936
 
2049
- var $defineProperty = getIntrinsic('%Object.defineProperty%', true);
2937
+ var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
2050
2938
 
2051
2939
  if ($defineProperty) {
2052
2940
  try {
@@ -2059,7 +2947,7 @@ if ($defineProperty) {
2059
2947
 
2060
2948
 
2061
2949
 
2062
- var $isEnumerable$1 = callBound$1('Object.prototype.propertyIsEnumerable');
2950
+ var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
2063
2951
 
2064
2952
  // eslint-disable-next-line max-params
2065
2953
  var DefineOwnProperty = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {
@@ -2073,7 +2961,7 @@ var DefineOwnProperty = function DefineOwnProperty(IsDataDescriptor, SameValue,
2073
2961
  }
2074
2962
 
2075
2963
  // fallback for ES3
2076
- if (P in O && $isEnumerable$1(O, P) !== !!desc['[[Enumerable]]']) {
2964
+ if (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {
2077
2965
  // a non-enumerable existing property
2078
2966
  return false;
2079
2967
  }
@@ -2088,13 +2976,15 @@ var DefineOwnProperty = function DefineOwnProperty(IsDataDescriptor, SameValue,
2088
2976
  return true;
2089
2977
  };
2090
2978
 
2091
- var $TypeError$4 = getIntrinsic('%TypeError%');
2092
- var $SyntaxError = getIntrinsic('%SyntaxError%');
2979
+ var src = functionBind.call(Function.call, Object.prototype.hasOwnProperty);
2980
+
2981
+ var $TypeError$1 = GetIntrinsic('%TypeError%');
2982
+ var $SyntaxError = GetIntrinsic('%SyntaxError%');
2093
2983
 
2094
2984
 
2095
2985
 
2096
2986
  var predicates = {
2097
- // https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type
2987
+ // https://ecma-international.org/ecma-262/6.0/#sec-property-descriptor-specification-type
2098
2988
  'Property Descriptor': function isPropertyDescriptor(Type, Desc) {
2099
2989
  if (Type(Desc) !== 'Object') {
2100
2990
  return false;
@@ -2117,7 +3007,7 @@ var predicates = {
2117
3007
  var isData = src(Desc, '[[Value]]');
2118
3008
  var IsAccessor = src(Desc, '[[Get]]') || src(Desc, '[[Set]]');
2119
3009
  if (isData && IsAccessor) {
2120
- throw new $TypeError$4('Property Descriptors may not be both accessor and data descriptors');
3010
+ throw new $TypeError$1('Property Descriptors may not be both accessor and data descriptors');
2121
3011
  }
2122
3012
  return true;
2123
3013
  }
@@ -2129,13 +3019,13 @@ var assertRecord = function assertRecord(Type, recordType, argumentName, value)
2129
3019
  throw new $SyntaxError('unknown record type: ' + recordType);
2130
3020
  }
2131
3021
  if (!predicate(Type, value)) {
2132
- throw new $TypeError$4(argumentName + ' must be a ' + recordType);
3022
+ throw new $TypeError$1(argumentName + ' must be a ' + recordType);
2133
3023
  }
2134
3024
  };
2135
3025
 
2136
- // https://262.ecma-international.org/5.1/#sec-8
3026
+ // https://www.ecma-international.org/ecma-262/5.1/#sec-8
2137
3027
 
2138
- var Type$1 = function Type(x) {
3028
+ var Type = function Type(x) {
2139
3029
  if (x === null) {
2140
3030
  return 'Null';
2141
3031
  }
@@ -2156,26 +3046,23 @@ var Type$1 = function Type(x) {
2156
3046
  }
2157
3047
  };
2158
3048
 
2159
- // https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values
3049
+ // https://www.ecma-international.org/ecma-262/6.0/#sec-tostring
2160
3050
 
2161
- var Type = function Type(x) {
3051
+ var Type$1 = function Type$1(x) {
2162
3052
  if (typeof x === 'symbol') {
2163
3053
  return 'Symbol';
2164
3054
  }
2165
- if (typeof x === 'bigint') {
2166
- return 'BigInt';
2167
- }
2168
- return Type$1(x);
3055
+ return Type(x);
2169
3056
  };
2170
3057
 
2171
- // https://ecma-international.org/ecma-262/6.0/#sec-frompropertydescriptor
3058
+ // https://www.ecma-international.org/ecma-262/6.0/#sec-frompropertydescriptor
2172
3059
 
2173
3060
  var FromPropertyDescriptor = function FromPropertyDescriptor(Desc) {
2174
3061
  if (typeof Desc === 'undefined') {
2175
3062
  return Desc;
2176
3063
  }
2177
3064
 
2178
- assertRecord(Type, 'Property Descriptor', 'Desc', Desc);
3065
+ assertRecord(Type$1, 'Property Descriptor', 'Desc', Desc);
2179
3066
 
2180
3067
  var obj = {};
2181
3068
  if ('[[Value]]' in Desc) {
@@ -2199,7 +3086,7 @@ var FromPropertyDescriptor = function FromPropertyDescriptor(Desc) {
2199
3086
  return obj;
2200
3087
  };
2201
3088
 
2202
- var $gOPD$1 = getIntrinsic('%Object.getOwnPropertyDescriptor%');
3089
+ var $gOPD$1 = GetIntrinsic('%Object.getOwnPropertyDescriptor%');
2203
3090
  if ($gOPD$1) {
2204
3091
  try {
2205
3092
  $gOPD$1([], 'length');
@@ -2211,85 +3098,65 @@ if ($gOPD$1) {
2211
3098
 
2212
3099
  var getOwnPropertyDescriptor = $gOPD$1;
2213
3100
 
2214
- var $Array = getIntrinsic('%Array%');
3101
+ var $Array = GetIntrinsic('%Array%');
2215
3102
 
2216
3103
  // eslint-disable-next-line global-require
2217
- var toStr$1 = !$Array.isArray && callBound$1('Object.prototype.toString');
3104
+ var toStr$4 = !$Array.isArray && callBound('Object.prototype.toString');
2218
3105
 
2219
- // https://ecma-international.org/ecma-262/6.0/#sec-isarray
3106
+ // https://www.ecma-international.org/ecma-262/6.0/#sec-isarray
2220
3107
 
2221
3108
  var IsArray = $Array.isArray || function IsArray(argument) {
2222
- return toStr$1(argument) === '[object Array]';
3109
+ return toStr$4(argument) === '[object Array]';
2223
3110
  };
2224
3111
 
2225
- // https://ecma-international.org/ecma-262/6.0/#sec-ispropertykey
3112
+ // https://www.ecma-international.org/ecma-262/6.0/#sec-ispropertykey
2226
3113
 
2227
3114
  var IsPropertyKey = function IsPropertyKey(argument) {
2228
3115
  return typeof argument === 'string' || typeof argument === 'symbol';
2229
3116
  };
2230
3117
 
2231
- var hasSymbols$1 = hasSymbols$3();
2232
- var hasToStringTag$1 = hasSymbols$1 && typeof Symbol.toStringTag === 'symbol';
2233
- var has;
2234
- var $exec;
2235
- var isRegexMarker;
2236
- var badStringifier;
2237
-
2238
- if (hasToStringTag$1) {
2239
- has = callBound$1('Object.prototype.hasOwnProperty');
2240
- $exec = callBound$1('RegExp.prototype.exec');
2241
- isRegexMarker = {};
3118
+ var regexExec = RegExp.prototype.exec;
3119
+ var gOPD = Object.getOwnPropertyDescriptor;
2242
3120
 
2243
- var throwRegexMarker = function () {
2244
- throw isRegexMarker;
2245
- };
2246
- badStringifier = {
2247
- toString: throwRegexMarker,
2248
- valueOf: throwRegexMarker
2249
- };
3121
+ var tryRegexExecCall = function tryRegexExec(value) {
3122
+ try {
3123
+ var lastIndex = value.lastIndex;
3124
+ value.lastIndex = 0; // eslint-disable-line no-param-reassign
2250
3125
 
2251
- if (typeof Symbol.toPrimitive === 'symbol') {
2252
- badStringifier[Symbol.toPrimitive] = throwRegexMarker;
3126
+ regexExec.call(value);
3127
+ return true;
3128
+ } catch (e) {
3129
+ return false;
3130
+ } finally {
3131
+ value.lastIndex = lastIndex; // eslint-disable-line no-param-reassign
2253
3132
  }
2254
- }
2255
-
2256
- var $toString = callBound$1('Object.prototype.toString');
2257
- var gOPD = Object.getOwnPropertyDescriptor;
3133
+ };
3134
+ var toStr$5 = Object.prototype.toString;
2258
3135
  var regexClass = '[object RegExp]';
3136
+ var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
2259
3137
 
2260
- var isRegex = hasToStringTag$1
2261
- // eslint-disable-next-line consistent-return
2262
- ? function isRegex(value) {
2263
- if (!value || typeof value !== 'object') {
2264
- return false;
2265
- }
2266
-
2267
- var descriptor = gOPD(value, 'lastIndex');
2268
- var hasLastIndexDataProperty = descriptor && has(descriptor, 'value');
2269
- if (!hasLastIndexDataProperty) {
2270
- return false;
2271
- }
3138
+ var isRegex = function isRegex(value) {
3139
+ if (!value || typeof value !== 'object') {
3140
+ return false;
3141
+ }
3142
+ if (!hasToStringTag) {
3143
+ return toStr$5.call(value) === regexClass;
3144
+ }
2272
3145
 
2273
- try {
2274
- $exec(value, badStringifier);
2275
- } catch (e) {
2276
- return e === isRegexMarker;
2277
- }
3146
+ var descriptor = gOPD(value, 'lastIndex');
3147
+ var hasLastIndexDataProperty = descriptor && src(descriptor, 'value');
3148
+ if (!hasLastIndexDataProperty) {
3149
+ return false;
2278
3150
  }
2279
- : function isRegex(value) {
2280
- // In older browsers, typeof regex incorrectly returns 'function'
2281
- if (!value || (typeof value !== 'object' && typeof value !== 'function')) {
2282
- return false;
2283
- }
2284
3151
 
2285
- return $toString(value) === regexClass;
2286
- };
3152
+ return tryRegexExecCall(value);
3153
+ };
2287
3154
 
2288
- // http://262.ecma-international.org/5.1/#sec-9.2
3155
+ // http://www.ecma-international.org/ecma-262/5.1/#sec-9.2
2289
3156
 
2290
3157
  var ToBoolean = function ToBoolean(value) { return !!value; };
2291
3158
 
2292
- var $match = getIntrinsic('%Symbol.match%', true);
3159
+ var $match = GetIntrinsic('%Symbol.match%', true);
2293
3160
 
2294
3161
 
2295
3162
 
@@ -2311,27 +3178,6 @@ var IsRegExp = function IsRegExp(argument) {
2311
3178
  };
2312
3179
 
2313
3180
  var fnToStr = Function.prototype.toString;
2314
- var reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;
2315
- var badArrayLike;
2316
- var isCallableMarker;
2317
- if (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {
2318
- try {
2319
- badArrayLike = Object.defineProperty({}, 'length', {
2320
- get: function () {
2321
- throw isCallableMarker;
2322
- }
2323
- });
2324
- isCallableMarker = {};
2325
- // eslint-disable-next-line no-throw-literal
2326
- reflectApply(function () { throw 42; }, null, badArrayLike);
2327
- } catch (_) {
2328
- if (_ !== isCallableMarker) {
2329
- reflectApply = null;
2330
- }
2331
- }
2332
- } else {
2333
- reflectApply = null;
2334
- }
2335
3181
 
2336
3182
  var constructorRegex = /^\s*class\b/;
2337
3183
  var isES6ClassFn = function isES6ClassFunction(value) {
@@ -2352,52 +3198,36 @@ var tryFunctionObject = function tryFunctionToStr(value) {
2352
3198
  return false;
2353
3199
  }
2354
3200
  };
2355
- var toStr = Object.prototype.toString;
3201
+ var toStr$6 = Object.prototype.toString;
2356
3202
  var fnClass = '[object Function]';
2357
3203
  var genClass = '[object GeneratorFunction]';
2358
- var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
2359
- /* globals document: false */
2360
- var documentDotAll = typeof document === 'object' && typeof document.all === 'undefined' && document.all !== undefined ? document.all : {};
2361
-
2362
- var isCallable = reflectApply
2363
- ? function isCallable(value) {
2364
- if (value === documentDotAll) { return true; }
2365
- if (!value) { return false; }
2366
- if (typeof value !== 'function' && typeof value !== 'object') { return false; }
2367
- if (typeof value === 'function' && !value.prototype) { return true; }
2368
- try {
2369
- reflectApply(value, null, badArrayLike);
2370
- } catch (e) {
2371
- if (e !== isCallableMarker) { return false; }
2372
- }
2373
- return !isES6ClassFn(value);
2374
- }
2375
- : function isCallable(value) {
2376
- if (value === documentDotAll) { return true; }
2377
- if (!value) { return false; }
2378
- if (typeof value !== 'function' && typeof value !== 'object') { return false; }
2379
- if (typeof value === 'function' && !value.prototype) { return true; }
2380
- if (hasToStringTag) { return tryFunctionObject(value); }
2381
- if (isES6ClassFn(value)) { return false; }
2382
- var strClass = toStr.call(value);
2383
- return strClass === fnClass || strClass === genClass;
2384
- };
3204
+ var hasToStringTag$1 = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
3205
+
3206
+ var isCallable = function isCallable(value) {
3207
+ if (!value) { return false; }
3208
+ if (typeof value !== 'function' && typeof value !== 'object') { return false; }
3209
+ if (typeof value === 'function' && !value.prototype) { return true; }
3210
+ if (hasToStringTag$1) { return tryFunctionObject(value); }
3211
+ if (isES6ClassFn(value)) { return false; }
3212
+ var strClass = toStr$6.call(value);
3213
+ return strClass === fnClass || strClass === genClass;
3214
+ };
2385
3215
 
2386
- // http://262.ecma-international.org/5.1/#sec-9.11
3216
+ // http://www.ecma-international.org/ecma-262/5.1/#sec-9.11
2387
3217
 
2388
3218
  var IsCallable = isCallable;
2389
3219
 
2390
- var $TypeError$3 = getIntrinsic('%TypeError%');
3220
+ var $TypeError$2 = GetIntrinsic('%TypeError%');
2391
3221
 
2392
3222
 
2393
3223
 
2394
3224
 
2395
3225
 
2396
- // https://262.ecma-international.org/5.1/#sec-8.10.5
3226
+ // https://ecma-international.org/ecma-262/5.1/#sec-8.10.5
2397
3227
 
2398
3228
  var ToPropertyDescriptor = function ToPropertyDescriptor(Obj) {
2399
- if (Type(Obj) !== 'Object') {
2400
- throw new $TypeError$3('ToPropertyDescriptor requires an object');
3229
+ if (Type$1(Obj) !== 'Object') {
3230
+ throw new $TypeError$2('ToPropertyDescriptor requires an object');
2401
3231
  }
2402
3232
 
2403
3233
  var desc = {};
@@ -2416,29 +3246,29 @@ var ToPropertyDescriptor = function ToPropertyDescriptor(Obj) {
2416
3246
  if (src(Obj, 'get')) {
2417
3247
  var getter = Obj.get;
2418
3248
  if (typeof getter !== 'undefined' && !IsCallable(getter)) {
2419
- throw new $TypeError$3('getter must be a function');
3249
+ throw new TypeError('getter must be a function');
2420
3250
  }
2421
3251
  desc['[[Get]]'] = getter;
2422
3252
  }
2423
3253
  if (src(Obj, 'set')) {
2424
3254
  var setter = Obj.set;
2425
3255
  if (typeof setter !== 'undefined' && !IsCallable(setter)) {
2426
- throw new $TypeError$3('setter must be a function');
3256
+ throw new $TypeError$2('setter must be a function');
2427
3257
  }
2428
3258
  desc['[[Set]]'] = setter;
2429
3259
  }
2430
3260
 
2431
3261
  if ((src(desc, '[[Get]]') || src(desc, '[[Set]]')) && (src(desc, '[[Value]]') || src(desc, '[[Writable]]'))) {
2432
- throw new $TypeError$3('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');
3262
+ throw new $TypeError$2('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');
2433
3263
  }
2434
3264
  return desc;
2435
3265
  };
2436
3266
 
2437
- var $TypeError$2 = getIntrinsic('%TypeError%');
3267
+ var $TypeError$3 = GetIntrinsic('%TypeError%');
2438
3268
 
2439
3269
 
2440
3270
 
2441
- var $isEnumerable = callBound$1('Object.prototype.propertyIsEnumerable');
3271
+ var $isEnumerable$1 = callBound('Object.prototype.propertyIsEnumerable');
2442
3272
 
2443
3273
 
2444
3274
 
@@ -2448,14 +3278,14 @@ var $isEnumerable = callBound$1('Object.prototype.propertyIsEnumerable');
2448
3278
 
2449
3279
 
2450
3280
 
2451
- // https://ecma-international.org/ecma-262/6.0/#sec-ordinarygetownproperty
3281
+ // https://www.ecma-international.org/ecma-262/6.0/#sec-ordinarygetownproperty
2452
3282
 
2453
3283
  var OrdinaryGetOwnProperty = function OrdinaryGetOwnProperty(O, P) {
2454
- if (Type(O) !== 'Object') {
2455
- throw new $TypeError$2('Assertion failed: O must be an Object');
3284
+ if (Type$1(O) !== 'Object') {
3285
+ throw new $TypeError$3('Assertion failed: O must be an Object');
2456
3286
  }
2457
3287
  if (!IsPropertyKey(P)) {
2458
- throw new $TypeError$2('Assertion failed: P must be a Property Key');
3288
+ throw new $TypeError$3('Assertion failed: P must be a Property Key');
2459
3289
  }
2460
3290
  if (!src(O, P)) {
2461
3291
  return void 0;
@@ -2466,7 +3296,7 @@ var OrdinaryGetOwnProperty = function OrdinaryGetOwnProperty(O, P) {
2466
3296
  var regexLastIndex = IsRegExp(O) && P === 'lastIndex';
2467
3297
  return {
2468
3298
  '[[Configurable]]': !(arrayLength || regexLastIndex),
2469
- '[[Enumerable]]': $isEnumerable(O, P),
3299
+ '[[Enumerable]]': $isEnumerable$1(O, P),
2470
3300
  '[[Value]]': O[P],
2471
3301
  '[[Writable]]': true
2472
3302
  };
@@ -2474,14 +3304,14 @@ var OrdinaryGetOwnProperty = function OrdinaryGetOwnProperty(O, P) {
2474
3304
  return ToPropertyDescriptor(getOwnPropertyDescriptor(O, P));
2475
3305
  };
2476
3306
 
2477
- // https://ecma-international.org/ecma-262/6.0/#sec-isdatadescriptor
3307
+ // https://www.ecma-international.org/ecma-262/6.0/#sec-isdatadescriptor
2478
3308
 
2479
3309
  var IsDataDescriptor = function IsDataDescriptor(Desc) {
2480
3310
  if (typeof Desc === 'undefined') {
2481
3311
  return false;
2482
3312
  }
2483
3313
 
2484
- assertRecord(Type, 'Property Descriptor', 'Desc', Desc);
3314
+ assertRecord(Type$1, 'Property Descriptor', 'Desc', Desc);
2485
3315
 
2486
3316
  if (!src(Desc, '[[Value]]') && !src(Desc, '[[Writable]]')) {
2487
3317
  return false;
@@ -2494,14 +3324,14 @@ var isPrimitive = function isPrimitive(value) {
2494
3324
  return value === null || (typeof value !== 'function' && typeof value !== 'object');
2495
3325
  };
2496
3326
 
2497
- var $Object$1 = getIntrinsic('%Object%');
3327
+ var $Object = GetIntrinsic('%Object%');
2498
3328
 
2499
3329
 
2500
3330
 
2501
- var $preventExtensions = $Object$1.preventExtensions;
2502
- var $isExtensible = $Object$1.isExtensible;
3331
+ var $preventExtensions = $Object.preventExtensions;
3332
+ var $isExtensible = $Object.isExtensible;
2503
3333
 
2504
- // https://ecma-international.org/ecma-262/6.0/#sec-isextensible-o
3334
+ // https://www.ecma-international.org/ecma-262/6.0/#sec-isextensible-o
2505
3335
 
2506
3336
  var IsExtensible = $preventExtensions
2507
3337
  ? function IsExtensible(obj) {
@@ -2515,7 +3345,7 @@ var _isNaN = Number.isNaN || function isNaN(a) {
2515
3345
  return a !== a;
2516
3346
  };
2517
3347
 
2518
- // http://262.ecma-international.org/5.1/#sec-9.12
3348
+ // http://www.ecma-international.org/ecma-262/5.1/#sec-9.12
2519
3349
 
2520
3350
  var SameValue = function SameValue(x, y) {
2521
3351
  if (x === y) { // 0 === -0, but they are not identical.
@@ -2525,7 +3355,7 @@ var SameValue = function SameValue(x, y) {
2525
3355
  return _isNaN(x) && _isNaN(y);
2526
3356
  };
2527
3357
 
2528
- var $TypeError$1 = getIntrinsic('%TypeError%');
3358
+ var $TypeError$4 = GetIntrinsic('%TypeError%');
2529
3359
 
2530
3360
 
2531
3361
 
@@ -2537,18 +3367,18 @@ var $TypeError$1 = getIntrinsic('%TypeError%');
2537
3367
 
2538
3368
 
2539
3369
 
2540
- // https://ecma-international.org/ecma-262/6.0/#sec-createdataproperty
3370
+ // https://www.ecma-international.org/ecma-262/6.0/#sec-createdataproperty
2541
3371
 
2542
3372
  var CreateDataProperty = function CreateDataProperty(O, P, V) {
2543
- if (Type(O) !== 'Object') {
2544
- throw new $TypeError$1('Assertion failed: Type(O) is not Object');
3373
+ if (Type$1(O) !== 'Object') {
3374
+ throw new $TypeError$4('Assertion failed: Type(O) is not Object');
2545
3375
  }
2546
3376
  if (!IsPropertyKey(P)) {
2547
- throw new $TypeError$1('Assertion failed: IsPropertyKey(P) is not true');
3377
+ throw new $TypeError$4('Assertion failed: IsPropertyKey(P) is not true');
2548
3378
  }
2549
3379
  var oldDesc = OrdinaryGetOwnProperty(O, P);
2550
- var extensible = !oldDesc || IsExtensible(O);
2551
- var immutable = oldDesc && (!oldDesc['[[Writable]]'] || !oldDesc['[[Configurable]]']);
3380
+ var extensible = oldDesc || IsExtensible(O);
3381
+ var immutable = oldDesc && (!oldDesc.writable || !oldDesc.configurable);
2552
3382
  if (immutable || !extensible) {
2553
3383
  return false;
2554
3384
  }
@@ -2567,44 +3397,44 @@ var CreateDataProperty = function CreateDataProperty(O, P, V) {
2567
3397
  );
2568
3398
  };
2569
3399
 
2570
- var $TypeError = getIntrinsic('%TypeError%');
3400
+ var $TypeError$5 = GetIntrinsic('%TypeError%');
2571
3401
 
2572
- // http://262.ecma-international.org/5.1/#sec-9.10
3402
+ // http://www.ecma-international.org/ecma-262/5.1/#sec-9.10
2573
3403
 
2574
3404
  var CheckObjectCoercible = function CheckObjectCoercible(value, optMessage) {
2575
3405
  if (value == null) {
2576
- throw new $TypeError(optMessage || ('Cannot call method on ' + value));
3406
+ throw new $TypeError$5(optMessage || ('Cannot call method on ' + value));
2577
3407
  }
2578
3408
  return value;
2579
3409
  };
2580
3410
 
2581
3411
  var RequireObjectCoercible = CheckObjectCoercible;
2582
3412
 
2583
- var $Object = getIntrinsic('%Object%');
3413
+ var $Object$1 = GetIntrinsic('%Object%');
2584
3414
 
2585
3415
 
2586
3416
 
2587
- // https://ecma-international.org/ecma-262/6.0/#sec-toobject
3417
+ // https://www.ecma-international.org/ecma-262/6.0/#sec-toobject
2588
3418
 
2589
3419
  var ToObject = function ToObject(value) {
2590
3420
  RequireObjectCoercible(value);
2591
- return $Object(value);
3421
+ return $Object$1(value);
2592
3422
  };
2593
3423
 
2594
- var $gOPD = Object.getOwnPropertyDescriptor;
3424
+ var $gOPD$2 = Object.getOwnPropertyDescriptor;
2595
3425
  var $getOwnNames = Object.getOwnPropertyNames;
2596
3426
  var $getSymbols = Object.getOwnPropertySymbols;
2597
- var $concat$1 = callBound$1('Array.prototype.concat');
2598
- var $reduce = callBound$1('Array.prototype.reduce');
3427
+ var $concat = callBound('Array.prototype.concat');
3428
+ var $reduce = callBound('Array.prototype.reduce');
2599
3429
  var getAll = $getSymbols ? function (obj) {
2600
- return $concat$1($getOwnNames(obj), $getSymbols(obj));
3430
+ return $concat($getOwnNames(obj), $getSymbols(obj));
2601
3431
  } : $getOwnNames;
2602
3432
 
2603
- var isES5$1 = IsCallable($gOPD) && IsCallable($getOwnNames);
3433
+ var isES5 = IsCallable($gOPD$2) && IsCallable($getOwnNames);
2604
3434
 
2605
- var implementation$1 = function getOwnPropertyDescriptors(value) {
3435
+ var implementation$2 = function getOwnPropertyDescriptors(value) {
2606
3436
  RequireObjectCoercible(value);
2607
- if (!isES5$1) {
3437
+ if (!isES5) {
2608
3438
  throw new TypeError('getOwnPropertyDescriptors requires Object.getOwnPropertyDescriptor');
2609
3439
  }
2610
3440
 
@@ -2612,7 +3442,7 @@ var implementation$1 = function getOwnPropertyDescriptors(value) {
2612
3442
  return $reduce(
2613
3443
  getAll(O),
2614
3444
  function (acc, key) {
2615
- var descriptor = $gOPD(O, key);
3445
+ var descriptor = $gOPD$2(O, key);
2616
3446
  if (typeof descriptor !== 'undefined') {
2617
3447
  CreateDataProperty(acc, key, descriptor);
2618
3448
  }
@@ -2622,40 +3452,34 @@ var implementation$1 = function getOwnPropertyDescriptors(value) {
2622
3452
  );
2623
3453
  };
2624
3454
 
2625
- var polyfill$2 = function getPolyfill() {
2626
- return typeof Object.getOwnPropertyDescriptors === 'function' ? Object.getOwnPropertyDescriptors : implementation$1;
3455
+ var polyfill = function getPolyfill() {
3456
+ return typeof Object.getOwnPropertyDescriptors === 'function' ? Object.getOwnPropertyDescriptors : implementation$2;
2627
3457
  };
2628
3458
 
2629
- var shim$1 = function shimGetOwnPropertyDescriptors() {
2630
- var polyfill = polyfill$2();
3459
+ var shim = function shimGetOwnPropertyDescriptors() {
3460
+ var polyfill$1 = polyfill();
2631
3461
  defineProperties_1(
2632
3462
  Object,
2633
- { getOwnPropertyDescriptors: polyfill },
2634
- { getOwnPropertyDescriptors: function () { return Object.getOwnPropertyDescriptors !== polyfill; } }
3463
+ { getOwnPropertyDescriptors: polyfill$1 },
3464
+ { getOwnPropertyDescriptors: function () { return Object.getOwnPropertyDescriptors !== polyfill$1; } }
2635
3465
  );
2636
- return polyfill;
3466
+ return polyfill$1;
2637
3467
  };
2638
3468
 
2639
- var bound = callBind(polyfill$2(), Object);
2640
-
2641
- defineProperties_1(bound, {
2642
- getPolyfill: polyfill$2,
2643
- implementation: implementation$1,
2644
- shim: shim$1
3469
+ defineProperties_1(implementation$2, {
3470
+ getPolyfill: polyfill,
3471
+ implementation: implementation$2,
3472
+ shim: shim
2645
3473
  });
2646
3474
 
2647
- var object_getownpropertydescriptors = bound;
3475
+ var object_getownpropertydescriptors = implementation$2;
2648
3476
 
2649
- // TODO; semver-major: remove
2650
-
2651
- var callBound = callBound$1;
2652
-
2653
- var isES5 = typeof Object.defineProperty === 'function'
3477
+ var isES5$1 = typeof Object.defineProperty === 'function'
2654
3478
  && typeof Object.defineProperties === 'function';
2655
3479
 
2656
3480
  var hasProto = [].__proto__ === Array.prototype; // eslint-disable-line no-proto
2657
3481
 
2658
- if (!isES5 || !hasProto) {
3482
+ if (!isES5$1 || !hasProto) {
2659
3483
  throw new TypeError('util.promisify requires a true ES5 environment, that also supports `__proto__`');
2660
3484
  }
2661
3485
 
@@ -2668,15 +3492,15 @@ if (typeof Promise !== 'function') {
2668
3492
 
2669
3493
 
2670
3494
  var $slice = callBound('Array.prototype.slice');
2671
- var $concat = callBound('Array.prototype.concat');
3495
+ var $concat$1 = callBound('Array.prototype.concat');
2672
3496
  var $forEach = callBound('Array.prototype.forEach');
2673
3497
 
2674
- var hasSymbols = hasSymbols$3();
3498
+ var hasSymbols$3 = hasSymbols$1();
2675
3499
 
2676
- var kCustomPromisifiedSymbol = hasSymbols ? Symbol('util.promisify.custom') : null;
2677
- var kCustomPromisifyArgsSymbol = hasSymbols ? Symbol('customPromisifyArgs') : null;
3500
+ var kCustomPromisifiedSymbol = hasSymbols$3 ? Symbol('util.promisify.custom') : null;
3501
+ var kCustomPromisifyArgsSymbol = hasSymbols$3 ? Symbol('customPromisifyArgs') : null;
2678
3502
 
2679
- var implementation = function promisify(orig) {
3503
+ var implementation$3 = function promisify(orig) {
2680
3504
  if (typeof orig !== 'function') {
2681
3505
  var error = new TypeError('The "original" argument must be of type function');
2682
3506
  error.name = 'TypeError [ERR_INVALID_ARG_TYPE]';
@@ -2684,7 +3508,7 @@ var implementation = function promisify(orig) {
2684
3508
  throw error;
2685
3509
  }
2686
3510
 
2687
- if (hasSymbols && orig[kCustomPromisifiedSymbol]) {
3511
+ if (hasSymbols$3 && orig[kCustomPromisifiedSymbol]) {
2688
3512
  var customFunction = orig[kCustomPromisifiedSymbol];
2689
3513
  if (typeof customFunction !== 'function') {
2690
3514
  throw new TypeError('The [util.promisify.custom] property must be a function');
@@ -2706,7 +3530,7 @@ var implementation = function promisify(orig) {
2706
3530
  var args = $slice(arguments);
2707
3531
  var self = this; // eslint-disable-line no-invalid-this
2708
3532
  return new Promise(function (resolve, reject) {
2709
- orig.apply(self, $concat(args, function (err) {
3533
+ orig.apply(self, $concat$1(args, function (err) {
2710
3534
  var values = arguments.length > 1 ? $slice(arguments, 1) : [];
2711
3535
  if (err) {
2712
3536
  reject(err);
@@ -2736,17 +3560,17 @@ var implementation = function promisify(orig) {
2736
3560
 
2737
3561
  var custom = kCustomPromisifiedSymbol;
2738
3562
  var customPromisifyArgs = kCustomPromisifyArgsSymbol;
2739
- implementation.custom = custom;
2740
- implementation.customPromisifyArgs = customPromisifyArgs;
3563
+ implementation$3.custom = custom;
3564
+ implementation$3.customPromisifyArgs = customPromisifyArgs;
2741
3565
 
2742
3566
  var polyfill$1 = function getPolyfill() {
2743
3567
  if (typeof util.util.promisify === 'function') {
2744
3568
  return util.util.promisify;
2745
3569
  }
2746
- return implementation;
3570
+ return implementation$3;
2747
3571
  };
2748
3572
 
2749
- var shim = function shimUtilPromisify() {
3573
+ var shim$1 = function shimUtilPromisify() {
2750
3574
  var polyfill = polyfill$1();
2751
3575
  if (polyfill !== util.util.promisify) {
2752
3576
  Object.defineProperty(util.util, 'promisify', {
@@ -2759,20 +3583,20 @@ var shim = function shimUtilPromisify() {
2759
3583
  return polyfill;
2760
3584
  };
2761
3585
 
2762
- var polyfill = polyfill$1();
3586
+ var polyfill$2 = polyfill$1();
2763
3587
 
2764
3588
 
2765
3589
  /* eslint-disable no-unused-vars */
2766
3590
  var boundPromisify = function promisify(orig) {
2767
3591
  /* eslint-enable no-unused-vars */
2768
- return polyfill.apply(util.util, arguments);
3592
+ return polyfill$2.apply(util.util, arguments);
2769
3593
  };
2770
3594
  defineProperties_1(boundPromisify, {
2771
- custom: polyfill.custom,
2772
- customPromisifyArgs: polyfill.customPromisifyArgs,
3595
+ custom: polyfill$2.custom,
3596
+ customPromisifyArgs: polyfill$2.customPromisifyArgs,
2773
3597
  getPolyfill: polyfill$1,
2774
- implementation: implementation,
2775
- shim: shim
3598
+ implementation: implementation$3,
3599
+ shim: shim$1
2776
3600
  });
2777
3601
 
2778
3602
  var util_promisify = boundPromisify;
@@ -2791,7 +3615,7 @@ function connect() {
2791
3615
  };
2792
3616
  }
2793
3617
 
2794
- var connection = mysql__default['default'].createConnection(config);
3618
+ var connection = mysql.createConnection(config);
2795
3619
  return {
2796
3620
  query: function query(sql, args) {
2797
3621
  return util.util.promisify(connection.query).call(connection, sql, args);
@@ -2813,16 +3637,16 @@ function connect() {
2813
3637
 
2814
3638
  var db = connect;
2815
3639
 
2816
- var _this$1 = undefined;
3640
+ var _this$3 = undefined;
2817
3641
 
2818
- var config$1 = {
3642
+ var config = {
2819
3643
  host: 'sanity-datasource.cluster-crao688bsrdh.us-east-1.rds.amazonaws.com',
2820
3644
  user: 'nasp',
2821
3645
  password: 'uRNkF9SkfXQs6AKK',
2822
3646
  database: 'user'
2823
3647
  };
2824
3648
 
2825
- var findUser$1 = function () {
3649
+ var findUser = function () {
2826
3650
  var _ref = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee(email) {
2827
3651
  var password = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
2828
3652
  var db$1, query, res, user, hash, passwordsMatch, user_shared, occupation_id;
@@ -2834,7 +3658,7 @@ var findUser$1 = function () {
2834
3658
  _context.prev = 1;
2835
3659
 
2836
3660
 
2837
- db$1 = db(config$1);
3661
+ db$1 = db(config);
2838
3662
 
2839
3663
  query = '\n select * \n from user \n where trim(lower(email)) = ?\n ';
2840
3664
  _context.next = 6;
@@ -2930,7 +3754,7 @@ var findUser$1 = function () {
2930
3754
  };
2931
3755
  }();
2932
3756
 
2933
- var updateUser$1 = function () {
3757
+ var updateUser = function () {
2934
3758
  var _ref2 = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee2(data) {
2935
3759
  var db$1, query, res, hash, columns, i, column, occupation_name;
2936
3760
  return asyncToGenerator.regenerator.wrap(function _callee2$(_context2) {
@@ -2943,7 +3767,7 @@ var updateUser$1 = function () {
2943
3767
 
2944
3768
  validateUserData(data);
2945
3769
 
2946
- db$1 = db(config$1);
3770
+ db$1 = db(config);
2947
3771
 
2948
3772
  _context2.next = 6;
2949
3773
  return db$1.beginTransaction();
@@ -3050,7 +3874,7 @@ var updateUser$1 = function () {
3050
3874
 
3051
3875
  return _context2.abrupt('return', {
3052
3876
  error: '',
3053
- user: findUser$1(data.email)
3877
+ user: findUser(data.email)
3054
3878
  });
3055
3879
 
3056
3880
  case 45:
@@ -3162,7 +3986,7 @@ var getOccupationNameById = function () {
3162
3986
  return _context3.stop();
3163
3987
  }
3164
3988
  }
3165
- }, _callee3, _this$1);
3989
+ }, _callee3, _this$3);
3166
3990
  }));
3167
3991
 
3168
3992
  return function getOccupationNameById(_x5, _x6) {
@@ -3170,7 +3994,7 @@ var getOccupationNameById = function () {
3170
3994
  };
3171
3995
  }();
3172
3996
 
3173
- var createUser$1 = function () {
3997
+ var createUser = function () {
3174
3998
  var _ref4 = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee4(data) {
3175
3999
  var db$1, query, res, hash, columns, i, column, user_id, occupation_name;
3176
4000
  return asyncToGenerator.regenerator.wrap(function _callee4$(_context4) {
@@ -3183,7 +4007,7 @@ var createUser$1 = function () {
3183
4007
 
3184
4008
  validateUserData(data, true);
3185
4009
 
3186
- db$1 = db(config$1);
4010
+ db$1 = db(config);
3187
4011
 
3188
4012
  _context4.next = 6;
3189
4013
  return db$1.beginTransaction();
@@ -3279,7 +4103,7 @@ var createUser$1 = function () {
3279
4103
  case 39:
3280
4104
  return _context4.abrupt('return', {
3281
4105
  error: '',
3282
- user: findUser$1(data.email)
4106
+ user: findUser(data.email)
3283
4107
  });
3284
4108
 
3285
4109
  case 42:
@@ -3317,7 +4141,7 @@ var createUser$1 = function () {
3317
4141
  };
3318
4142
  }();
3319
4143
 
3320
- var createUser = function () {
4144
+ var createUser$1 = function () {
3321
4145
  var _ref = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee(data) {
3322
4146
  var res;
3323
4147
  return asyncToGenerator.regenerator.wrap(function _callee$(_context) {
@@ -3325,7 +4149,7 @@ var createUser = function () {
3325
4149
  switch (_context.prev = _context.next) {
3326
4150
  case 0:
3327
4151
  _context.next = 2;
3328
- return createUser$1(data);
4152
+ return createUser(data);
3329
4153
 
3330
4154
  case 2:
3331
4155
  res = _context.sent;
@@ -3353,7 +4177,7 @@ var createUser = function () {
3353
4177
  };
3354
4178
  }();
3355
4179
 
3356
- var updateUser = function () {
4180
+ var updateUser$1 = function () {
3357
4181
  var _ref2 = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee2(data) {
3358
4182
  var res;
3359
4183
  return asyncToGenerator.regenerator.wrap(function _callee2$(_context2) {
@@ -3361,7 +4185,7 @@ var updateUser = function () {
3361
4185
  switch (_context2.prev = _context2.next) {
3362
4186
  case 0:
3363
4187
  _context2.next = 2;
3364
- return updateUser$1(data);
4188
+ return updateUser(data);
3365
4189
 
3366
4190
  case 2:
3367
4191
  res = _context2.sent;
@@ -3389,7 +4213,7 @@ var updateUser = function () {
3389
4213
  };
3390
4214
  }();
3391
4215
 
3392
- var findUser = function () {
4216
+ var findUser$1 = function () {
3393
4217
  var _ref3 = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee3(_ref4) {
3394
4218
  var email = _ref4.email,
3395
4219
  password = _ref4.password;
@@ -3399,7 +4223,7 @@ var findUser = function () {
3399
4223
  switch (_context3.prev = _context3.next) {
3400
4224
  case 0:
3401
4225
  _context3.next = 2;
3402
- return findUser$1(email, password);
4226
+ return findUser(email, password);
3403
4227
 
3404
4228
  case 2:
3405
4229
  res = _context3.sent;
@@ -3429,17 +4253,17 @@ var findUser = function () {
3429
4253
 
3430
4254
  var user = /*#__PURE__*/Object.freeze({
3431
4255
  __proto__: null,
3432
- createUser: createUser,
3433
- updateUser: updateUser,
3434
- findUser: findUser
4256
+ createUser: createUser$1,
4257
+ updateUser: updateUser$1,
4258
+ findUser: findUser$1
3435
4259
  });
3436
4260
 
3437
- var localStrategy = new Local__default['default'].Strategy({
4261
+ var localStrategy = new Local.Strategy({
3438
4262
  usernameField: 'email',
3439
4263
  passwordField: 'password'
3440
4264
  }, function (email, password, done) {
3441
4265
 
3442
- findUser({ email: email, password: password }).then(function (user) {
4266
+ findUser$1({ email: email, password: password }).then(function (user) {
3443
4267
  done(null, user);
3444
4268
  }).catch(function (error) {
3445
4269
  done(error);
@@ -3451,9 +4275,9 @@ var passportLocal = /*#__PURE__*/Object.freeze({
3451
4275
  localStrategy: localStrategy
3452
4276
  });
3453
4277
 
3454
- var _this = undefined;
4278
+ var _this$4 = undefined;
3455
4279
 
3456
- var config = {
4280
+ var config$1 = {
3457
4281
  host: 'sanity-datasource.cluster-crao688bsrdh.us-east-1.rds.amazonaws.com',
3458
4282
  user: 'nasp',
3459
4283
  password: 'uRNkF9SkfXQs6AKK',
@@ -3467,7 +4291,7 @@ var getOccupation = function () {
3467
4291
  while (1) {
3468
4292
  switch (_context.prev = _context.next) {
3469
4293
  case 0:
3470
- db$1 = db(config);
4294
+ db$1 = db(config$1);
3471
4295
  query = '\n select name as label, id as value\n from occupation\n where type = ?\n ';
3472
4296
  _context.next = 4;
3473
4297
  return db$1.query(query, [type]);
@@ -3485,7 +4309,7 @@ var getOccupation = function () {
3485
4309
  return _context.stop();
3486
4310
  }
3487
4311
  }
3488
- }, _callee, _this);
4312
+ }, _callee, _this$4);
3489
4313
  }));
3490
4314
 
3491
4315
  return function getOccupation(_x) {
@@ -3500,7 +4324,7 @@ var getFieldsAndOptions = function () {
3500
4324
  while (1) {
3501
4325
  switch (_context2.prev = _context2.next) {
3502
4326
  case 0:
3503
- db$1 = db(config);
4327
+ db$1 = db(config$1);
3504
4328
  query = '\n select * \n from field\n where occupation_id = ?\n order by sorting\n ';
3505
4329
  _context2.next = 4;
3506
4330
  return db$1.query(query, [occupation]);
@@ -3548,7 +4372,7 @@ var getFieldsAndOptions = function () {
3548
4372
  return _context2.stop();
3549
4373
  }
3550
4374
  }
3551
- }, _callee2, _this);
4375
+ }, _callee2, _this$4);
3552
4376
  }));
3553
4377
 
3554
4378
  return function getFieldsAndOptions(_x2) {
@@ -3619,8 +4443,8 @@ var ProcessData = (function () {
3619
4443
  })();
3620
4444
 
3621
4445
  var LoginForm_1 = LoginForm;
3622
- var SignupForm_1 = SignupForm$1;
3623
- var ProfileForm_1 = SignupForm;
4446
+ var SignupForm_1 = SignupForm;
4447
+ var ProfileForm_1 = SignupForm$1;
3624
4448
  var AuthCookies_1 = authCookies;
3625
4449
  var AuthHooks_1 = hooks;
3626
4450
  var Iron_1 = iron;