@mjhls/mjh-framework 1.0.850-beta.2 → 1.0.850-slideshow

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 +10 -9
  3. package/dist/cjs/AD300x250.js +31 -30
  4. package/dist/cjs/AD300x250x600.js +31 -30
  5. package/dist/cjs/AD728x90.js +34 -33
  6. package/dist/cjs/ADFloatingFooter.js +33 -32
  7. package/dist/cjs/ADFooter.js +15 -14
  8. package/dist/cjs/ADGutter.js +33 -32
  9. package/dist/cjs/{ADInfeed-98c71bcd.js → ADInfeed-fb136f1d.js} +15 -13
  10. package/dist/cjs/ADSkyscraper.js +33 -32
  11. package/dist/cjs/ADSponsoredResources.js +33 -32
  12. package/dist/cjs/ADWebcast.js +33 -32
  13. package/dist/cjs/ADWelcome.js +34 -33
  14. package/dist/cjs/{ADlgInfeed-9de32585.js → ADlgInfeed-d303d27e.js} +11 -10
  15. package/dist/cjs/AccordionPanel.js +31 -29
  16. package/dist/cjs/AdSlot.js +36 -35
  17. package/dist/cjs/AdSlotsProvider.js +21 -19
  18. package/dist/cjs/AlgoliaSearch.js +1087 -1068
  19. package/dist/cjs/AlphabeticList.js +26 -25
  20. package/dist/cjs/ArticleCarousel.js +24 -23
  21. package/dist/cjs/ArticleProgramLandingPage.js +60 -58
  22. package/dist/cjs/ArticleSeriesLandingPage.js +41 -40
  23. package/dist/cjs/ArticleSeriesListing.js +62 -61
  24. package/dist/cjs/Auth.js +3652 -0
  25. package/dist/cjs/AuthWrapper.js +311 -269
  26. package/dist/cjs/{AuthorComponent-bb831b74.js → AuthorComponent-c21aac7f.js} +14 -13
  27. package/dist/cjs/Beam.js +8 -8
  28. package/dist/cjs/{BlockContent-091a991f.js → BlockContent-36e54d77.js} +56 -55
  29. package/dist/cjs/Breadcrumbs.js +29 -27
  30. package/dist/cjs/CMEDeck.js +83 -83
  31. package/dist/cjs/Column1.js +14 -11
  32. package/dist/cjs/Column2.js +36 -33
  33. package/dist/cjs/Column3.js +62 -59
  34. package/dist/cjs/ConferenceArticleCard.js +38 -37
  35. package/dist/cjs/ConferenceBanner-6c9e718a.js +24 -0
  36. package/dist/cjs/DeckContent.js +107 -103
  37. package/dist/cjs/DeckQueue.js +92 -88
  38. package/dist/cjs/{Dfp-26baccf1.js → Dfp-93399f8c.js} +35 -34
  39. package/dist/cjs/EventsDeck.js +159 -152
  40. package/dist/cjs/ExternalResources.js +81 -79
  41. package/dist/cjs/Feature.js +26 -24
  42. package/dist/cjs/ForbesHero.js +43 -42
  43. package/dist/cjs/GridContent.js +238 -233
  44. package/dist/cjs/GridHero.js +45 -44
  45. package/dist/cjs/GroupDeck.js +60 -59
  46. package/dist/cjs/HamMagazine.js +145 -140
  47. package/dist/cjs/Header.js +14 -12
  48. package/dist/cjs/Hero.js +13 -12
  49. package/dist/cjs/HighlightenVideo.js +18 -17
  50. package/dist/cjs/HorizontalArticleListing.js +73 -71
  51. package/dist/cjs/HorizontalHero.js +25 -24
  52. package/dist/cjs/IssueContentDeck.js +78 -73
  53. package/dist/cjs/IssueDeck.js +77 -72
  54. package/dist/cjs/IssueLanding.js +96 -92
  55. package/dist/cjs/KMTracker.js +15 -15
  56. package/dist/cjs/LeftNav.js +41 -39
  57. package/dist/cjs/MasterDeck.js +81 -80
  58. package/dist/cjs/MediaSeriesLanding.js +1118 -1126
  59. package/dist/cjs/NavDvm.js +79 -74
  60. package/dist/cjs/{NavFooter-76c913e3.js → NavFooter-3dcd99a8.js} +15 -14
  61. package/dist/cjs/NavMagazine.js +152 -147
  62. package/dist/cjs/NavNative.js +147 -139
  63. package/dist/cjs/OncliveHero.js +19 -19
  64. package/dist/cjs/OncliveLargeHero.js +73 -72
  65. package/dist/cjs/PageFilter.js +15 -14
  66. package/dist/cjs/PartnerDetailListing.js +109 -105
  67. package/dist/cjs/PdfDownload.js +9 -8
  68. package/dist/cjs/PopUpModal.js +21 -19
  69. package/dist/cjs/PubSection.js +43 -40
  70. package/dist/cjs/PubToc.js +16 -15
  71. package/dist/cjs/PublicationDeck.js +67 -62
  72. package/dist/cjs/PublicationLanding.js +139 -135
  73. package/dist/cjs/QueueDeckExpanded.js +1168 -2172
  74. package/dist/cjs/RecentNews.js +22 -21
  75. package/dist/cjs/RelatedContent.js +55 -54
  76. package/dist/cjs/RelatedTopicsDropdown.js +32 -29
  77. package/dist/cjs/RolesDeck.js +32 -27
  78. package/dist/cjs/Search.js +22 -18
  79. package/dist/cjs/Segment.js +6 -6
  80. package/dist/cjs/SeriesListingDeck.js +38 -38
  81. package/dist/cjs/{SeriesSlider-8bbc989f.js → SeriesSlider-cbab9f0f.js} +40 -39
  82. package/dist/cjs/SetCookie.js +1 -1
  83. package/dist/cjs/SideFooter.js +39 -38
  84. package/dist/cjs/SocialIcons.js +10 -9
  85. package/dist/cjs/{SocialSearchComponent-cea213aa.js → SocialSearchComponent-ecb4f972.js} +40 -36
  86. package/dist/cjs/SocialShare.js +31 -29
  87. package/dist/cjs/TaxonomyCard.js +64 -59
  88. package/dist/cjs/TaxonomyDescription.js +56 -54
  89. package/dist/cjs/TemplateNormal.js +75 -74
  90. package/dist/cjs/ThumbnailCard.js +23 -21
  91. package/dist/cjs/Ustream.js +30 -29
  92. package/dist/cjs/VerticalHero.js +17 -16
  93. package/dist/cjs/VideoProgramLandingPage.js +78 -73
  94. package/dist/cjs/VideoSeriesCard.js +34 -33
  95. package/dist/cjs/VideoSeriesFilter.js +18 -18
  96. package/dist/cjs/VideoSeriesLandingPage.js +51 -50
  97. package/dist/cjs/VideoSeriesListing.js +79 -78
  98. package/dist/cjs/View.js +277 -280
  99. package/dist/cjs/YahooHero.js +42 -41
  100. package/dist/cjs/YoutubeGroup.js +67 -66
  101. package/dist/cjs/{_is-array-754e012d.js → _is-array-6128bd56.js} +6 -6
  102. package/dist/cjs/{_iter-detect-60b2f026.js → _iter-detect-55a5657a.js} +8 -8
  103. package/dist/cjs/{_object-pie-68c5bcbc.js → _object-pie-083f2dd6.js} +4 -4
  104. package/dist/cjs/{_object-sap-5e74ba08.js → _object-sap-a175b4a9.js} +1 -1
  105. package/dist/cjs/{_object-to-array-5762f850.js → _object-to-array-8fe5a54f.js} +2 -2
  106. package/dist/cjs/{_to-object-329a650b.js → _to-object-6de10e57.js} +8 -8
  107. package/dist/cjs/{asyncToGenerator-140e5f89.js → asyncToGenerator-58c289d9.js} +32 -32
  108. package/dist/cjs/{brightcove-react-player-loader.es-156bd4d6.js → brightcove-react-player-loader.es-a195642e.js} +11 -9
  109. package/dist/cjs/{core.get-iterator-method-f62321d4.js → core.get-iterator-method-f474eacc.js} +2 -2
  110. package/dist/cjs/{debounce-529c8d06.js → debounce-d4a2369b.js} +2 -2
  111. package/dist/cjs/{define-property-f4d12f4e.js → define-property-c88be878.js} +6 -6
  112. package/dist/cjs/{defineProperty-55548b25.js → defineProperty-0cb76d99.js} +1 -1
  113. package/dist/cjs/{entities-310b46ee.js → entities-3f9d0f2f.js} +1 -1
  114. package/dist/cjs/{eq-bb2843ed.js → eq-5fc26c07.js} +1 -1
  115. package/dist/cjs/{es6.string.iterator-cc0bbaa4.js → es6.string.iterator-c2573ffd.js} +6 -6
  116. package/dist/cjs/{extends-0a918631.js → extends-29bdbc6d.js} +7 -7
  117. package/dist/cjs/faundadb.js +10 -327
  118. package/dist/cjs/{get-adbb11e3.js → get-5839e5b5.js} +21 -21
  119. package/dist/cjs/getRelatedArticle.js +445 -28
  120. package/dist/cjs/getRootDocGroup.js +6 -6
  121. package/dist/cjs/getSerializers.js +45 -44
  122. package/dist/cjs/{getTargeting-f1821260.js → getTargeting-faf37284.js} +12 -12
  123. package/dist/cjs/getTargeting.js +8 -8
  124. package/dist/cjs/iconBase-68959171.js +0 -3
  125. package/dist/cjs/{index-e2e62963.js → index-8041a4eb.js} +11 -1
  126. package/dist/cjs/{index-4151deb3.js → index-991f0c65.js} +1010 -1564
  127. package/dist/cjs/index-bd6c9f56.js +211 -0
  128. package/dist/cjs/{index-96b3db50.js → index-eadd5035.js} +17 -15
  129. package/dist/cjs/{index-be0c82be.js → index-efca863c.js} +36 -30
  130. package/dist/cjs/{index-3294d3bc.js → index-f86bb269.js} +44 -45
  131. package/dist/cjs/{index-98e01cb9.js → index-fc2f1ca2.js} +13 -12
  132. package/dist/cjs/{index.es-9110add6.js → index.es-f3e47207.js} +31 -12
  133. package/dist/cjs/{index.esm-ff47db6f.js → index.esm-05850a2f.js} +5 -12
  134. package/dist/cjs/{index.esm-e32d3e8e.js → index.esm-44f3e2d0.js} +3 -6
  135. package/dist/cjs/{index.esm-4d410430.js → index.esm-8123cf40.js} +20 -20
  136. package/dist/cjs/{index.esm-90433435.js → index.esm-974f47d9.js} +6 -15
  137. package/dist/cjs/index.js +169 -158
  138. package/dist/cjs/{inherits-9953db94.js → inherits-c2065b95.js} +22 -22
  139. package/dist/cjs/{isSymbol-04666465.js → isSymbol-03abbdf0.js} +15 -15
  140. package/dist/cjs/keys-7f2c2108.js +25 -0
  141. package/dist/cjs/{lodash-fc2922d0.js → lodash-f0783643.js} +128 -31
  142. package/dist/cjs/main-025fdc78.js +973 -0
  143. package/dist/cjs/md5-e1ca5797.js +323 -0
  144. package/dist/cjs/{moment-575fe24c.js → moment-aca40de1.js} +11 -9
  145. package/dist/cjs/{react-social-icons-f7f48f71.js → react-social-icons-af932527.js} +28 -27
  146. package/dist/cjs/{slicedToArray-8f385299.js → slicedToArray-5d1bc3b3.js} +14 -14
  147. package/dist/cjs/{smoothscroll-5054361f.js → smoothscroll-99df7f93.js} +1 -1
  148. package/dist/cjs/stringify-c9ac1214.js +17 -0
  149. package/dist/cjs/timeDifferenceCalc.js +1 -1
  150. package/dist/cjs/{toConsumableArray-9a3476fe.js → toConsumableArray-ddb70795.js} +9 -9
  151. package/dist/cjs/{toNumber-36d1e7e5.js → toNumber-5e1fac58.js} +40 -5
  152. package/dist/cjs/{typeof-725500bc.js → typeof-88a668c5.js} +36 -36
  153. package/dist/cjs/urlFor.js +3 -3
  154. package/dist/cjs/{ustream-api-d092dc31.js → ustream-api-b2b9092f.js} +4 -4
  155. package/dist/cjs/util-6f784d85.js +576 -0
  156. package/dist/cjs/{visibility-sensor-ad5e3116.js → visibility-sensor-eb2c5b69.js} +7 -5
  157. package/dist/cjs/{web.dom.iterable-a0e279c1.js → web.dom.iterable-46657b5c.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-bbdd5398.js → ADInfeed-df562a07.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-4473ee3b.js → ADlgInfeed-53992119.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 +14 -14
  174. package/dist/esm/AlgoliaSearch.js +736 -718
  175. package/dist/esm/AlphabeticList.js +22 -22
  176. package/dist/esm/ArticleCarousel.js +20 -20
  177. package/dist/esm/ArticleProgramLandingPage.js +56 -55
  178. package/dist/esm/ArticleSeriesLandingPage.js +37 -37
  179. package/dist/esm/ArticleSeriesListing.js +57 -57
  180. package/dist/esm/Auth.js +3632 -0
  181. package/dist/esm/AuthWrapper.js +308 -267
  182. package/dist/esm/{AuthorComponent-34b16174.js → AuthorComponent-5ae7409f.js} +11 -11
  183. package/dist/esm/Beam.js +8 -8
  184. package/dist/esm/{BlockContent-e9b4ddcf.js → BlockContent-52cf21c5.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-8792ebd2.js → ConferenceBanner-9162d0ca.js} +4 -4
  192. package/dist/esm/DeckContent.js +98 -98
  193. package/dist/esm/DeckQueue.js +83 -83
  194. package/dist/esm/{Dfp-b7236041.js → Dfp-43f121ff.js} +22 -22
  195. package/dist/esm/EventsDeck.js +129 -129
  196. package/dist/esm/ExternalResources.js +74 -73
  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 -68
  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 -89
  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 +841 -852
  215. package/dist/esm/NavDvm.js +59 -59
  216. package/dist/esm/{NavFooter-e27bd93b.js → NavFooter-c29526b7.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 +16 -17
  220. package/dist/esm/OncliveLargeHero.js +60 -60
  221. package/dist/esm/PageFilter.js +12 -12
  222. package/dist/esm/PartnerDetailListing.js +105 -102
  223. package/dist/esm/PdfDownload.js +6 -6
  224. package/dist/esm/PopUpModal.js +14 -14
  225. package/dist/esm/PubSection.js +39 -37
  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 +1154 -2158
  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-a866bb21.js → SeriesSlider-5c62a578.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-03c3e869.js → SocialSearchComponent-cd38ae60.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 -49
  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 -66
  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 +257 -264
  255. package/dist/esm/YahooHero.js +35 -35
  256. package/dist/esm/YoutubeGroup.js +51 -51
  257. package/dist/esm/{_is-array-58e95429.js → _is-array-3e99e06e.js} +6 -6
  258. package/dist/esm/{_iter-detect-5d49a330.js → _iter-detect-7e5e5ce2.js} +8 -8
  259. package/dist/esm/{_object-pie-33c40e79.js → _object-pie-133f504a.js} +4 -4
  260. package/dist/esm/{_object-sap-964b6feb.js → _object-sap-f353c2a9.js} +1 -1
  261. package/dist/esm/{_object-to-array-7e804fce.js → _object-to-array-0f197f89.js} +2 -2
  262. package/dist/esm/{_to-object-a4107da3.js → _to-object-b50e61c3.js} +9 -9
  263. package/dist/esm/{asyncToGenerator-4877b617.js → asyncToGenerator-7f8f9219.js} +33 -33
  264. package/dist/esm/{brightcove-react-player-loader.es-83f53e4e.js → brightcove-react-player-loader.es-b43c695a.js} +7 -6
  265. package/dist/esm/{core.get-iterator-method-e1de7503.js → core.get-iterator-method-133dfacd.js} +2 -2
  266. package/dist/esm/{debounce-9207d8ee.js → debounce-533d9748.js} +2 -2
  267. package/dist/esm/{define-property-8af5f002.js → define-property-fe54dc9f.js} +6 -6
  268. package/dist/esm/{defineProperty-94fd8bfc.js → defineProperty-f5ff6f5a.js} +1 -1
  269. package/dist/esm/{entities-7cc3bf45.js → entities-932b50cf.js} +1 -1
  270. package/dist/esm/{eq-b470f743.js → eq-bdcbf886.js} +1 -1
  271. package/dist/esm/{es6.string.iterator-c990c18c.js → es6.string.iterator-bc33758b.js} +7 -7
  272. package/dist/esm/{extends-6f2fcc99.js → extends-60e0e1c6.js} +7 -7
  273. package/dist/esm/faundadb.js +8 -325
  274. package/dist/esm/{get-1e515072.js → get-3c308da4.js} +21 -21
  275. package/dist/esm/getRelatedArticle.js +445 -28
  276. package/dist/esm/getRootDocGroup.js +6 -6
  277. package/dist/esm/getSerializers.js +45 -44
  278. package/dist/esm/{getTargeting-bd800589.js → getTargeting-c3401fa7.js} +11 -11
  279. package/dist/esm/getTargeting.js +8 -8
  280. package/dist/esm/{index-73819142.js → index-0dbff1d1.js} +36 -30
  281. package/dist/esm/{index-41a678ea.js → index-2446af28.js} +6 -6
  282. package/dist/esm/{index-d6dc592a.js → index-2dcd3f28.js} +964 -1525
  283. package/dist/esm/{index-5f7e79e7.js → index-35bdcc81.js} +10 -10
  284. package/dist/esm/{index-aaa2dae0.js → index-67e1773f.js} +11 -2
  285. package/dist/esm/{index-ef6d5dcf.js → index-79cfd25c.js} +44 -45
  286. package/dist/esm/index-db3bb315.js +207 -0
  287. package/dist/esm/{index.es-29c1cef5.js → index.es-c6222053.js} +28 -10
  288. package/dist/esm/{index.esm-29e48d38.js → index.esm-3fdda599.js} +6 -15
  289. package/dist/esm/{index.esm-fd746768.js → index.esm-8016b507.js} +17 -18
  290. package/dist/esm/{index.esm-cf08bf18.js → index.esm-a8ff922c.js} +5 -12
  291. package/dist/esm/{index.esm-f8aaeeeb.js → index.esm-c6715e80.js} +3 -6
  292. package/dist/esm/index.js +139 -132
  293. package/dist/esm/{inherits-cf8dde54.js → inherits-a41fe93f.js} +19 -19
  294. package/dist/esm/{isSymbol-1981418f.js → isSymbol-a7e9aafe.js} +15 -15
  295. package/dist/esm/{keys-8eda7a5c.js → keys-7a3adabf.js} +6 -6
  296. package/dist/esm/{lodash-17fdfebb.js → lodash-f97fd99a.js} +128 -31
  297. package/dist/esm/main-b5c5aac1.js +961 -0
  298. package/dist/esm/md5-4e42248e.js +321 -0
  299. package/dist/esm/{moment-e2f9b20c.js → moment-bc12cb97.js} +11 -9
  300. package/dist/esm/{react-social-icons-a7d5c5c7.js → react-social-icons-91f9716f.js} +20 -20
  301. package/dist/esm/{slicedToArray-641f241f.js → slicedToArray-be2f7a22.js} +14 -14
  302. package/dist/esm/{smoothscroll-0cd4c7a6.js → smoothscroll-fa4e3f8c.js} +1 -1
  303. package/dist/esm/stringify-59c8f690.js +15 -0
  304. package/dist/esm/timeDifferenceCalc.js +1 -1
  305. package/dist/esm/{toConsumableArray-43aa614d.js → toConsumableArray-6d9a4616.js} +9 -9
  306. package/dist/esm/{toNumber-2f7a84cd.js → toNumber-5aeba6e7.js} +40 -5
  307. package/dist/esm/{typeof-6435ba1c.js → typeof-a286cf0c.js} +36 -36
  308. package/dist/esm/urlFor.js +1 -1
  309. package/dist/esm/{ustream-api-9a50644d.js → ustream-api-33a866b6.js} +4 -4
  310. package/dist/esm/util-3ab476bf.js +574 -0
  311. package/dist/esm/{visibility-sensor-72fd8f8b.js → visibility-sensor-f40c2564.js} +2 -2
  312. package/dist/esm/{web.dom.iterable-4439f05a.js → web.dom.iterable-4109ff68.js} +3 -3
  313. package/package.json +110 -116
  314. package/dist/cjs/ConferenceBanner-4a16fddc.js +0 -23
  315. package/dist/cjs/keys-a586b7a0.js +0 -25
  316. package/dist/cjs/main-02daeefe.js +0 -862
  317. package/dist/cjs/stringify-7c5aff47.js +0 -17
  318. package/dist/esm/main-e4a934b2.js +0 -851
  319. package/dist/esm/stringify-4330ccdc.js +0 -15
@@ -1,1101 +1,44 @@
1
- import { c as createCommonjsModule, a as commonjsGlobal, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
2
- import './_to-object-a4107da3.js';
3
- import './es6.string.iterator-c990c18c.js';
4
- import './_library-528f1934.js';
5
- import './_iter-detect-5d49a330.js';
6
- import { _ as _toConsumableArray } from './toConsumableArray-43aa614d.js';
7
- import './core.get-iterator-method-e1de7503.js';
8
- import './_object-pie-33c40e79.js';
9
- import { _ as _extends } from './extends-6f2fcc99.js';
10
- import './web.dom.iterable-4439f05a.js';
11
- import React__default, { useEffect, useLayoutEffect, createContext, useContext, useRef, useDebugValue, useState, useCallback, useMemo } from 'react';
1
+ import { _ as _slicedToArray } from './slicedToArray-be2f7a22.js';
2
+ import { _ as _toConsumableArray } from './toConsumableArray-6d9a4616.js';
3
+ import { _ as _extends } from './extends-60e0e1c6.js';
4
+ import React, { useEffect, useState, useRef } from 'react';
5
+ import { Container, Media } from 'react-bootstrap';
6
+ import urlFor from './urlFor.js';
7
+ import { I as InfiniteScroll } from './index.es-c6222053.js';
8
+ import { m as moment } from './moment-bc12cb97.js';
9
+ import { V as VisibilitySensor } from './visibility-sensor-f40c2564.js';
10
+ import { l as lib_3 } from './index-2446af28.js';
11
+ import { useRouter } from 'next/router';
12
+ import { L as LazyLoad } from './index-35bdcc81.js';
13
+ import { m as main_43 } from './main-b5c5aac1.js';
14
+ import { c as clean_html_1 } from './entities-932b50cf.js';
15
+ import { A as ADInfeed } from './ADInfeed-df562a07.js';
16
+ import { A as AuthorComponent } from './AuthorComponent-5ae7409f.js';
17
+ import { l as lodash } from './lodash-f97fd99a.js';
18
+ import { A as ADlgInfeed } from './ADlgInfeed-53992119.js';
19
+ import { g as getContentCategory } from './getContentCategory-15dcc413.js';
20
+ import timeDifferenceCalc from './timeDifferenceCalc.js';
21
+ import './_commonjsHelpers-0c4b6f40.js';
22
+ import './web.dom.iterable-4109ff68.js';
23
+ import './es6.string.iterator-bc33758b.js';
24
+ import './_to-object-b50e61c3.js';
25
+ import './core.get-iterator-method-133dfacd.js';
26
+ import './_iter-detect-7e5e5ce2.js';
27
+ import './_object-pie-133f504a.js';
28
+ import './index-0dbff1d1.js';
29
+ import 'react-dom';
12
30
  import './events-6c3a7a63.js';
13
- import { l as lib_3 } from './index-41a678ea.js';
14
31
  import 'prop-types';
15
32
  import 'react-bootstrap/Card';
16
- import { m as moment } from './moment-e2f9b20c.js';
17
- import { useRouter } from 'next/router';
18
- import './isSymbol-1981418f.js';
19
- import './debounce-9207d8ee.js';
20
- import './toNumber-2f7a84cd.js';
21
- import 'react-dom';
22
- import './index-73819142.js';
23
- import urlFor from './urlFor.js';
24
- import { L as LazyLoad } from './index-5f7e79e7.js';
25
- import { m as main_36 } from './main-e4a934b2.js';
26
- import { c as clean_html_1 } from './entities-7cc3bf45.js';
27
- import { _ as _slicedToArray } from './slicedToArray-641f241f.js';
28
- import './stringify-4330ccdc.js';
29
- import { _ as _asyncToGenerator, r as regenerator } from './asyncToGenerator-4877b617.js';
30
- import './Segment.js';
31
- import './Beam.js';
32
33
  import './AdSlot.js';
33
- import { A as ADInfeed } from './ADInfeed-bbdd5398.js';
34
- import { l as lodash } from './lodash-17fdfebb.js';
35
- import { A as ADlgInfeed } from './ADlgInfeed-4473ee3b.js';
36
- import { g as getContentCategory } from './getContentCategory-15dcc413.js';
37
- import { A as AuthorComponent } from './AuthorComponent-34b16174.js';
38
- import { Container, Media } from 'react-bootstrap';
39
- import timeDifferenceCalc from './timeDifferenceCalc.js';
40
-
41
- var reactPaginate = createCommonjsModule(function (module, exports) {
42
- !function(e,a){module.exports=a(React__default);}(commonjsGlobal,(function(e){return function(e){var a={};function t(r){if(a[r])return a[r].exports;var n=a[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,t),n.l=!0,n.exports}return t.m=e,t.c=a,t.d=function(e,a,r){t.o(e,a)||Object.defineProperty(e,a,{enumerable:!0,get:r});},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0});},t.t=function(e,a){if(1&a&&(e=t(e)),8&a)return e;if(4&a&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&a&&"string"!=typeof e)for(var n in e)t.d(r,n,function(a){return e[a]}.bind(null,n));return r},t.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(a,"a",a),a},t.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},t.p="",t(t.s=4)}([function(e,a,t){e.exports=t(2)();},function(a,t){a.exports=e;},function(e,a,t){var r=t(3);function n(){}function i(){}i.resetWarningCache=n,e.exports=function(){function e(e,a,t,n,i,s){if(s!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function a(){return e}e.isRequired=e;var t={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:a,element:e,elementType:e,instanceOf:a,node:e,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:i,resetWarningCache:n};return t.PropTypes=t,t};},function(e,a,t){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";},function(e,a,t){t.r(a);var r=t(1),n=t.n(r),i=t(0),s=t.n(i);function l(){return (l=Object.assign||function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);}return e}).apply(this,arguments)}var o=function(e){var a=e.pageClassName,t=e.pageLinkClassName,r=e.page,i=e.selected,s=e.activeClassName,o=e.activeLinkClassName,u=e.getEventListener,c=e.pageSelectedHandler,p=e.href,f=e.extraAriaContext,g=e.pageLabelBuilder,d=e.ariaLabel||"Page "+r+(f?" "+f:""),b=null;return i&&(b="page",d=e.ariaLabel||"Page "+r+" is your current page",a=void 0!==a?a+" "+s:s,void 0!==t?void 0!==o&&(t=t+" "+o):t=o),n.a.createElement("li",{className:a},n.a.createElement("a",l({role:"button",className:t,href:p,tabIndex:"0","aria-label":d,"aria-current":b,onKeyPress:c},u(c)),g(r)))};o.propTypes={pageSelectedHandler:s.a.func.isRequired,selected:s.a.bool.isRequired,pageClassName:s.a.string,pageLinkClassName:s.a.string,activeClassName:s.a.string,activeLinkClassName:s.a.string,extraAriaContext:s.a.string,href:s.a.string,ariaLabel:s.a.string,page:s.a.number.isRequired,getEventListener:s.a.func.isRequired,pageLabelBuilder:s.a.func.isRequired};var u=o;function c(){return (c=Object.assign||function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);}return e}).apply(this,arguments)}var p=function(e){var a=e.breakLabel,t=e.breakClassName,r=e.breakLinkClassName,i=e.breakHandler,s=e.getEventListener,l=t||"break";return n.a.createElement("li",{className:l},n.a.createElement("a",c({className:r,role:"button",tabIndex:"0",onKeyPress:i},s(i)),a))};p.propTypes={breakLabel:s.a.oneOfType([s.a.string,s.a.node]),breakClassName:s.a.string,breakLinkClassName:s.a.string,breakHandler:s.a.func.isRequired,getEventListener:s.a.func.isRequired};var f=p;function g(e){return (g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(){return (d=Object.assign||function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);}return e}).apply(this,arguments)}function b(e,a){for(var t=0;t<a.length;t++){var r=a[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r);}}function v(e,a){return (v=Object.setPrototypeOf||function(e,a){return e.__proto__=a,e})(e,a)}function m(e){var a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return !1;if(Reflect.construct.sham)return !1;if("function"==typeof Proxy)return !0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return !1}}();return function(){var t,r=C(e);if(a){var n=C(this).constructor;t=Reflect.construct(r,arguments,n);}else t=r.apply(this,arguments);return h(this,t)}}function h(e,a){return !a||"object"!==g(a)&&"function"!=typeof a?y(e):a}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function C(e){return (C=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function P(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}var k=function(e){!function(e,a){if("function"!=typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(a&&a.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),a&&v(e,a);}(s,e);var a,t,i=m(s);function s(e){var a,t;return function(e,a){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")}(this,s),P(y(a=i.call(this,e)),"handlePreviousPage",(function(e){var t=a.state.selected;e.preventDefault?e.preventDefault():e.returnValue=!1,t>0&&a.handlePageSelected(t-1,e);})),P(y(a),"handleNextPage",(function(e){var t=a.state.selected,r=a.props.pageCount;e.preventDefault?e.preventDefault():e.returnValue=!1,t<r-1&&a.handlePageSelected(t+1,e);})),P(y(a),"handlePageSelected",(function(e,t){t.preventDefault?t.preventDefault():t.returnValue=!1,a.state.selected!==e?(a.setState({selected:e}),a.callCallback(e)):a.callActiveCallback(e);})),P(y(a),"getEventListener",(function(e){return P({},a.props.eventListener,e)})),P(y(a),"handleBreakClick",(function(e,t){t.preventDefault?t.preventDefault():t.returnValue=!1;var r=a.state.selected;a.handlePageSelected(r<e?a.getForwardJump():a.getBackwardJump(),t);})),P(y(a),"callCallback",(function(e){void 0!==a.props.onPageChange&&"function"==typeof a.props.onPageChange&&a.props.onPageChange({selected:e});})),P(y(a),"callActiveCallback",(function(e){void 0!==a.props.onPageActive&&"function"==typeof a.props.onPageActive&&a.props.onPageActive({selected:e});})),P(y(a),"pagination",(function(){var e=[],t=a.props,r=t.pageRangeDisplayed,i=t.pageCount,s=t.marginPagesDisplayed,l=t.breakLabel,o=t.breakClassName,u=t.breakLinkClassName,c=a.state.selected;if(i<=r)for(var p=0;p<i;p++)e.push(a.getPageElement(p));else {var g,d,b,v=r/2,m=r-v;c>i-r/2?v=r-(m=i-c):c<r/2&&(m=r-(v=c));var h=function(e){return a.getPageElement(e)};for(g=0;g<i;g++)(d=g+1)<=s||d>i-s||g>=c-v&&g<=c+m?e.push(h(g)):l&&e[e.length-1]!==b&&(b=n.a.createElement(f,{key:g,breakLabel:l,breakClassName:o,breakLinkClassName:u,breakHandler:a.handleBreakClick.bind(null,g),getEventListener:a.getEventListener}),e.push(b));}return e})),t=e.initialPage?e.initialPage:e.forcePage?e.forcePage:0,a.state={selected:t},a}return a=s,(t=[{key:"componentDidMount",value:function(){var e=this.props,a=e.initialPage,t=e.disableInitialCallback,r=e.extraAriaContext;void 0===a||t||this.callCallback(a),r&&console.warn("DEPRECATED (react-paginate): The extraAriaContext prop is deprecated. You should now use the ariaLabelBuilder instead.");}},{key:"componentDidUpdate",value:function(e){void 0!==this.props.forcePage&&this.props.forcePage!==e.forcePage&&this.setState({selected:this.props.forcePage});}},{key:"getForwardJump",value:function(){var e=this.state.selected,a=this.props,t=a.pageCount,r=e+a.pageRangeDisplayed;return r>=t?t-1:r}},{key:"getBackwardJump",value:function(){var e=this.state.selected-this.props.pageRangeDisplayed;return e<0?0:e}},{key:"hrefBuilder",value:function(e){var a=this.props,t=a.hrefBuilder,r=a.pageCount;if(t&&e!==this.state.selected&&e>=0&&e<r)return t(e+1)}},{key:"ariaLabelBuilder",value:function(e){var a=e===this.state.selected;if(this.props.ariaLabelBuilder&&e>=0&&e<this.props.pageCount){var t=this.props.ariaLabelBuilder(e+1,a);return this.props.extraAriaContext&&!a&&(t=t+" "+this.props.extraAriaContext),t}}},{key:"getPageElement",value:function(e){var a=this.state.selected,t=this.props,r=t.pageClassName,i=t.pageLinkClassName,s=t.activeClassName,l=t.activeLinkClassName,o=t.extraAriaContext,c=t.pageLabelBuilder;return n.a.createElement(u,{key:e,pageSelectedHandler:this.handlePageSelected.bind(null,e),selected:a===e,pageClassName:r,pageLinkClassName:i,activeClassName:s,activeLinkClassName:l,extraAriaContext:o,href:this.hrefBuilder(e),ariaLabel:this.ariaLabelBuilder(e),page:e+1,pageLabelBuilder:c,getEventListener:this.getEventListener})}},{key:"render",value:function(){var e=this.props,a=e.disabledClassName,t=e.pageCount,r=e.containerClassName,i=e.previousLabel,s=e.previousClassName,l=e.previousLinkClassName,o=e.previousAriaLabel,u=e.prevRel,c=e.nextLabel,p=e.nextClassName,f=e.nextLinkClassName,g=e.nextAriaLabel,b=e.nextRel,v=this.state.selected,m=s+(0===v?" ".concat(a):""),h=p+(v===t-1?" ".concat(a):""),y=0===v?"true":"false",C=v===t-1?"true":"false";return n.a.createElement("ul",{className:r},n.a.createElement("li",{className:m},n.a.createElement("a",d({className:l,href:this.hrefBuilder(v-1),tabIndex:"0",role:"button",onKeyPress:this.handlePreviousPage,"aria-disabled":y,"aria-label":o,rel:u},this.getEventListener(this.handlePreviousPage)),i)),this.pagination(),n.a.createElement("li",{className:h},n.a.createElement("a",d({className:f,href:this.hrefBuilder(v+1),tabIndex:"0",role:"button",onKeyPress:this.handleNextPage,"aria-disabled":C,"aria-label":g,rel:b},this.getEventListener(this.handleNextPage)),c)))}}])&&b(a.prototype,t),s}(r.Component);P(k,"propTypes",{pageCount:s.a.number.isRequired,pageRangeDisplayed:s.a.number.isRequired,marginPagesDisplayed:s.a.number.isRequired,previousLabel:s.a.node,previousAriaLabel:s.a.string,prevRel:s.a.string,nextLabel:s.a.node,nextAriaLabel:s.a.string,nextRel:s.a.string,breakLabel:s.a.oneOfType([s.a.string,s.a.node]),hrefBuilder:s.a.func,onPageChange:s.a.func,onPageActive:s.a.func,initialPage:s.a.number,forcePage:s.a.number,disableInitialCallback:s.a.bool,containerClassName:s.a.string,pageClassName:s.a.string,pageLinkClassName:s.a.string,pageLabelBuilder:s.a.func,activeClassName:s.a.string,activeLinkClassName:s.a.string,previousClassName:s.a.string,nextClassName:s.a.string,previousLinkClassName:s.a.string,nextLinkClassName:s.a.string,disabledClassName:s.a.string,breakClassName:s.a.string,breakLinkClassName:s.a.string,extraAriaContext:s.a.string,ariaLabelBuilder:s.a.func,eventListener:s.a.string}),P(k,"defaultProps",{pageCount:10,pageRangeDisplayed:2,marginPagesDisplayed:3,activeClassName:"selected",previousLabel:"Previous",previousClassName:"previous",previousAriaLabel:"Previous page",prevRel:"prev",nextLabel:"Next",nextClassName:"next",nextAriaLabel:"Next page",nextRel:"next",breakLabel:"...",disabledClassName:"disabled",disableInitialCallback:!1,pageLabelBuilder:function(e){return e},eventListener:"onClick"});a.default=k;}])}));
43
-
44
- });
45
-
46
- var ReactPaginate = unwrapExports(reactPaginate);
47
- var reactPaginate_1 = reactPaginate.ReactPaginate;
48
-
49
- var has = Object.prototype.hasOwnProperty;
50
-
51
- function dequal(foo, bar) {
52
- var ctor, len;
53
- if (foo === bar) return true;
54
-
55
- if (foo && bar && (ctor=foo.constructor) === bar.constructor) {
56
- if (ctor === Date) return foo.getTime() === bar.getTime();
57
- if (ctor === RegExp) return foo.toString() === bar.toString();
58
-
59
- if (ctor === Array) {
60
- if ((len=foo.length) === bar.length) {
61
- while (len-- && dequal(foo[len], bar[len]));
62
- }
63
- return len === -1;
64
- }
65
-
66
- if (!ctor || typeof foo === 'object') {
67
- len = 0;
68
- for (ctor in foo) {
69
- if (has.call(foo, ctor) && ++len && !has.call(bar, ctor)) return false;
70
- if (!(ctor in bar) || !dequal(foo[ctor], bar[ctor])) return false;
71
- }
72
- return Object.keys(bar).length === len;
73
- }
74
- }
75
-
76
- return foo !== foo && bar !== bar;
77
- }
78
-
79
- // use WeakMap to store the object->key mapping
80
- // so the objects can be garbage collected.
81
- // WeakMap uses a hashtable under the hood, so the lookup
82
- // complexity is almost O(1).
83
- var table = new WeakMap();
84
- // counter of the key
85
- var counter = 0;
86
- // hashes an array of objects and returns a string
87
- function hash(args) {
88
- if (!args.length)
89
- return '';
90
- var key = 'arg';
91
- for (var i = 0; i < args.length; ++i) {
92
- if (args[i] === null) {
93
- key += '@null';
94
- continue;
95
- }
96
- var _hash = void 0;
97
- if (typeof args[i] !== 'object' && typeof args[i] !== 'function') {
98
- // need to consider the case that args[i] is a string:
99
- // args[i] _hash
100
- // "undefined" -> '"undefined"'
101
- // undefined -> 'undefined'
102
- // 123 -> '123'
103
- // "null" -> '"null"'
104
- if (typeof args[i] === 'string') {
105
- _hash = '"' + args[i] + '"';
106
- }
107
- else {
108
- _hash = String(args[i]);
109
- }
110
- }
111
- else {
112
- if (!table.has(args[i])) {
113
- _hash = counter;
114
- table.set(args[i], counter++);
115
- }
116
- else {
117
- _hash = table.get(args[i]);
118
- }
119
- }
120
- key += '@' + _hash;
121
- }
122
- return key;
123
- }
124
-
125
- var Cache = /** @class */ (function () {
126
- function Cache(initialData) {
127
- if (initialData === void 0) { initialData = {}; }
128
- this.cache = new Map(Object.entries(initialData));
129
- this.subs = [];
130
- }
131
- Cache.prototype.get = function (key) {
132
- var _key = this.serializeKey(key)[0];
133
- return this.cache.get(_key);
134
- };
135
- Cache.prototype.set = function (key, value) {
136
- var _key = this.serializeKey(key)[0];
137
- this.cache.set(_key, value);
138
- this.notify();
139
- };
140
- Cache.prototype.keys = function () {
141
- return Array.from(this.cache.keys());
142
- };
143
- Cache.prototype.has = function (key) {
144
- var _key = this.serializeKey(key)[0];
145
- return this.cache.has(_key);
146
- };
147
- Cache.prototype.clear = function () {
148
- this.cache.clear();
149
- this.notify();
150
- };
151
- Cache.prototype.delete = function (key) {
152
- var _key = this.serializeKey(key)[0];
153
- this.cache.delete(_key);
154
- this.notify();
155
- };
156
- // TODO: introduce namespace for the cache
157
- Cache.prototype.serializeKey = function (key) {
158
- var args = null;
159
- if (typeof key === 'function') {
160
- try {
161
- key = key();
162
- }
163
- catch (err) {
164
- // dependencies not ready
165
- key = '';
166
- }
167
- }
168
- if (Array.isArray(key)) {
169
- // args array
170
- args = key;
171
- key = hash(key);
172
- }
173
- else {
174
- // convert null to ''
175
- key = String(key || '');
176
- }
177
- var errorKey = key ? 'err@' + key : '';
178
- var isValidatingKey = key ? 'validating@' + key : '';
179
- return [key, args, errorKey, isValidatingKey];
180
- };
181
- Cache.prototype.subscribe = function (listener) {
182
- var _this = this;
183
- if (typeof listener !== 'function') {
184
- throw new Error('Expected the listener to be a function.');
185
- }
186
- var isSubscribed = true;
187
- this.subs.push(listener);
188
- return function () {
189
- if (!isSubscribed)
190
- return;
191
- isSubscribed = false;
192
- var index = _this.subs.indexOf(listener);
193
- if (index > -1) {
194
- _this.subs[index] = _this.subs[_this.subs.length - 1];
195
- _this.subs.length--;
196
- }
197
- };
198
- };
199
- // Notify Cache subscribers about a change in the cache
200
- Cache.prototype.notify = function () {
201
- for (var _i = 0, _a = this.subs; _i < _a.length; _i++) {
202
- var listener = _a[_i];
203
- listener();
204
- }
205
- };
206
- return Cache;
207
- }());
208
-
209
- /**
210
- * Due to bug https://bugs.chromium.org/p/chromium/issues/detail?id=678075,
211
- * it's not reliable to detect if the browser is currently online or offline
212
- * based on `navigator.onLine`.
213
- * As a work around, we always assume it's online on first load, and change
214
- * the status upon `online` or `offline` events.
215
- */
216
- var online = true;
217
- var isOnline = function () { return online; };
218
- var isDocumentVisible = function () {
219
- if (typeof document !== 'undefined' &&
220
- document.visibilityState !== undefined) {
221
- return document.visibilityState !== 'hidden';
222
- }
223
- // always assume it's visible
224
- return true;
225
- };
226
- var fetcher = function (url) { return fetch(url).then(function (res) { return res.json(); }); };
227
- var registerOnFocus = function (cb) {
228
- if (typeof window !== 'undefined' &&
229
- window.addEventListener !== undefined &&
230
- typeof document !== 'undefined' &&
231
- document.addEventListener !== undefined) {
232
- // focus revalidate
233
- document.addEventListener('visibilitychange', function () { return cb(); }, false);
234
- window.addEventListener('focus', function () { return cb(); }, false);
235
- }
236
- };
237
- var registerOnReconnect = function (cb) {
238
- if (typeof window !== 'undefined' && window.addEventListener !== undefined) {
239
- // reconnect revalidate
240
- window.addEventListener('online', function () {
241
- online = true;
242
- cb();
243
- }, false);
244
- // nothing to revalidate, just update the status
245
- window.addEventListener('offline', function () { return (online = false); }, false);
246
- }
247
- };
248
- var webPreset = {
249
- isOnline: isOnline,
250
- isDocumentVisible: isDocumentVisible,
251
- fetcher: fetcher,
252
- registerOnFocus: registerOnFocus,
253
- registerOnReconnect: registerOnReconnect
254
- };
255
-
256
- var __assign = (undefined && undefined.__assign) || function () {
257
- __assign = Object.assign || function(t) {
258
- for (var s, i = 1, n = arguments.length; i < n; i++) {
259
- s = arguments[i];
260
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
261
- t[p] = s[p];
262
- }
263
- return t;
264
- };
265
- return __assign.apply(this, arguments);
266
- };
267
- // cache
268
- var cache = new Cache();
269
- // error retry
270
- function onErrorRetry(_, __, config, revalidate, opts) {
271
- if (!config.isDocumentVisible()) {
272
- // if it's hidden, stop
273
- // it will auto revalidate when focus
274
- return;
275
- }
276
- if (typeof config.errorRetryCount === 'number' &&
277
- opts.retryCount > config.errorRetryCount) {
278
- return;
279
- }
280
- // exponential backoff
281
- var count = Math.min(opts.retryCount, 8);
282
- var timeout = ~~((Math.random() + 0.5) * (1 << count)) * config.errorRetryInterval;
283
- setTimeout(revalidate, timeout, opts);
284
- }
285
- // client side: need to adjust the config
286
- // based on the browser status
287
- // slow connection (<= 70Kbps)
288
- var slowConnection = typeof window !== 'undefined' &&
289
- // @ts-ignore
290
- navigator['connection'] &&
291
- // @ts-ignore
292
- ['slow-2g', '2g'].indexOf(navigator['connection'].effectiveType) !== -1;
293
- // config
294
- var defaultConfig = __assign({
295
- // events
296
- 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);
297
-
298
- var IS_SERVER = typeof window === 'undefined' ||
299
- // @ts-ignore
300
- !!(typeof Deno !== 'undefined' && Deno && Deno.version && Deno.version.deno);
301
- // polyfill for requestAnimationFrame
302
- var rAF = IS_SERVER
303
- ? null
304
- : window['requestAnimationFrame']
305
- ? function (f) { return window['requestAnimationFrame'](f); }
306
- : function (f) { return setTimeout(f, 1); };
307
- // React currently throws a warning when using useLayoutEffect on the server.
308
- // To get around it, we can conditionally useEffect on the server (no-op) and
309
- // useLayoutEffect in the browser.
310
- var useIsomorphicLayoutEffect = IS_SERVER ? useEffect : useLayoutEffect;
311
-
312
- var SWRConfigContext = createContext({});
313
- SWRConfigContext.displayName = 'SWRConfigContext';
314
-
315
- var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
316
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
317
- return new (P || (P = Promise))(function (resolve, reject) {
318
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
319
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
320
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
321
- step((generator = generator.apply(thisArg, _arguments || [])).next());
322
- });
323
- };
324
- var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
325
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
326
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
327
- function verb(n) { return function (v) { return step([n, v]); }; }
328
- function step(op) {
329
- if (f) throw new TypeError("Generator is already executing.");
330
- while (_) try {
331
- 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;
332
- if (y = 0, t) op = [op[0] & 2, t.value];
333
- switch (op[0]) {
334
- case 0: case 1: t = op; break;
335
- case 4: _.label++; return { value: op[1], done: false };
336
- case 5: _.label++; y = op[1]; op = [0]; continue;
337
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
338
- default:
339
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
340
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
341
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
342
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
343
- if (t[2]) _.ops.pop();
344
- _.trys.pop(); continue;
345
- }
346
- op = body.call(thisArg, _);
347
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
348
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
349
- }
350
- };
351
- // global state managers
352
- var CONCURRENT_PROMISES = {};
353
- var CONCURRENT_PROMISES_TS = {};
354
- var FOCUS_REVALIDATORS = {};
355
- var RECONNECT_REVALIDATORS = {};
356
- var CACHE_REVALIDATORS = {};
357
- var MUTATION_TS = {};
358
- var MUTATION_END_TS = {};
359
- // generate strictly increasing timestamps
360
- var now = (function () {
361
- var ts = 0;
362
- return function () { return ++ts; };
363
- })();
364
- // setup DOM events listeners for `focus` and `reconnect` actions
365
- if (!IS_SERVER) {
366
- var revalidate_1 = function (revalidators) {
367
- if (!defaultConfig.isDocumentVisible() || !defaultConfig.isOnline())
368
- return;
369
- for (var key in revalidators) {
370
- if (revalidators[key][0])
371
- revalidators[key][0]();
372
- }
373
- };
374
- if (typeof defaultConfig.registerOnFocus === 'function') {
375
- defaultConfig.registerOnFocus(function () { return revalidate_1(FOCUS_REVALIDATORS); });
376
- }
377
- if (typeof defaultConfig.registerOnReconnect === 'function') {
378
- defaultConfig.registerOnReconnect(function () { return revalidate_1(RECONNECT_REVALIDATORS); });
379
- }
380
- }
381
- var trigger = function (_key, shouldRevalidate) {
382
- if (shouldRevalidate === void 0) { shouldRevalidate = true; }
383
- // we are ignoring the second argument which correspond to the arguments
384
- // the fetcher will receive when key is an array
385
- var _a = cache.serializeKey(_key), key = _a[0], keyErr = _a[2], keyValidating = _a[3];
386
- if (!key)
387
- return Promise.resolve();
388
- var updaters = CACHE_REVALIDATORS[key];
389
- if (key && updaters) {
390
- var currentData = cache.get(key);
391
- var currentError = cache.get(keyErr);
392
- var currentIsValidating = cache.get(keyValidating);
393
- var promises = [];
394
- for (var i = 0; i < updaters.length; ++i) {
395
- promises.push(updaters[i](shouldRevalidate, currentData, currentError, currentIsValidating, i > 0));
396
- }
397
- // return new updated value
398
- return Promise.all(promises).then(function () { return cache.get(key); });
399
- }
400
- return Promise.resolve(cache.get(key));
401
- };
402
- var broadcastState = function (key, data, error, isValidating) {
403
- var updaters = CACHE_REVALIDATORS[key];
404
- if (key && updaters) {
405
- for (var i = 0; i < updaters.length; ++i) {
406
- updaters[i](false, data, error, isValidating);
407
- }
408
- }
409
- };
410
- var mutate = function (_key, _data, shouldRevalidate) {
411
- if (shouldRevalidate === void 0) { shouldRevalidate = true; }
412
- return __awaiter(void 0, void 0, void 0, function () {
413
- var _a, key, keyErr, beforeMutationTs, beforeConcurrentPromisesTs, data, error, isAsyncMutation, err_1, shouldAbort, updaters, promises, i;
414
- return __generator(this, function (_b) {
415
- switch (_b.label) {
416
- case 0:
417
- _a = cache.serializeKey(_key), key = _a[0], keyErr = _a[2];
418
- if (!key)
419
- return [2 /*return*/];
420
- // if there is no new data to update, let's just revalidate the key
421
- if (typeof _data === 'undefined')
422
- return [2 /*return*/, trigger(_key, shouldRevalidate)
423
- // update global timestamps
424
- ];
425
- // update global timestamps
426
- MUTATION_TS[key] = now() - 1;
427
- MUTATION_END_TS[key] = 0;
428
- beforeMutationTs = MUTATION_TS[key];
429
- beforeConcurrentPromisesTs = CONCURRENT_PROMISES_TS[key];
430
- isAsyncMutation = false;
431
- if (_data && typeof _data === 'function') {
432
- // `_data` is a function, call it passing current cache value
433
- try {
434
- _data = _data(cache.get(key));
435
- }
436
- catch (err) {
437
- // if `_data` function throws an error synchronously, it shouldn't be cached
438
- _data = undefined;
439
- error = err;
440
- }
441
- }
442
- if (!(_data && typeof _data.then === 'function')) return [3 /*break*/, 5];
443
- // `_data` is a promise
444
- isAsyncMutation = true;
445
- _b.label = 1;
446
- case 1:
447
- _b.trys.push([1, 3, , 4]);
448
- return [4 /*yield*/, _data];
449
- case 2:
450
- data = _b.sent();
451
- return [3 /*break*/, 4];
452
- case 3:
453
- err_1 = _b.sent();
454
- error = err_1;
455
- return [3 /*break*/, 4];
456
- case 4: return [3 /*break*/, 6];
457
- case 5:
458
- data = _data;
459
- _b.label = 6;
460
- case 6:
461
- shouldAbort = function () {
462
- // check if other mutations have occurred since we've started this mutation
463
- if (beforeMutationTs !== MUTATION_TS[key] ||
464
- beforeConcurrentPromisesTs !== CONCURRENT_PROMISES_TS[key]) {
465
- if (error)
466
- throw error;
467
- return true;
468
- }
469
- };
470
- // if there's a race we don't update cache or broadcast change, just return the data
471
- if (shouldAbort())
472
- return [2 /*return*/, data];
473
- if (typeof data !== 'undefined') {
474
- // update cached data
475
- cache.set(key, data);
476
- }
477
- // always update or reset the error
478
- cache.set(keyErr, error);
479
- // reset the timestamp to mark the mutation has ended
480
- MUTATION_END_TS[key] = now() - 1;
481
- if (!isAsyncMutation) {
482
- // we skip broadcasting if there's another mutation happened synchronously
483
- if (shouldAbort())
484
- return [2 /*return*/, data];
485
- }
486
- updaters = CACHE_REVALIDATORS[key];
487
- if (updaters) {
488
- promises = [];
489
- for (i = 0; i < updaters.length; ++i) {
490
- promises.push(updaters[i](!!shouldRevalidate, data, error, undefined, i > 0));
491
- }
492
- // return new updated value
493
- return [2 /*return*/, Promise.all(promises).then(function () {
494
- if (error)
495
- throw error;
496
- return cache.get(key);
497
- })];
498
- }
499
- // throw error or return data to be used by caller of mutate
500
- if (error)
501
- throw error;
502
- return [2 /*return*/, data];
503
- }
504
- });
505
- });
506
- };
507
- function useSWR() {
508
- var _this = this;
509
- var args = [];
510
- for (var _i = 0; _i < arguments.length; _i++) {
511
- args[_i] = arguments[_i];
512
- }
513
- var _key = args[0];
514
- var config = Object.assign({}, defaultConfig, useContext(SWRConfigContext), args.length > 2
515
- ? args[2]
516
- : args.length === 2 && typeof args[1] === 'object'
517
- ? args[1]
518
- : {});
519
- // in typescript args.length > 2 is not same as args.lenth === 3
520
- // we do a safe type assertion here
521
- // args.length === 3
522
- var fn = (args.length > 2
523
- ? args[1]
524
- : args.length === 2 && typeof args[1] === 'function'
525
- ? args[1]
526
- : /**
527
- pass fn as null will disable revalidate
528
- https://paco.sh/blog/shared-hook-state-with-swr
529
- */
530
- args[1] === null
531
- ? args[1]
532
- : config.fetcher);
533
- // we assume `key` as the identifier of the request
534
- // `key` can change but `fn` shouldn't
535
- // (because `revalidate` only depends on `key`)
536
- // `keyErr` is the cache key for error objects
537
- var _a = cache.serializeKey(_key), key = _a[0], fnArgs = _a[1], keyErr = _a[2], keyValidating = _a[3];
538
- var configRef = useRef(config);
539
- useIsomorphicLayoutEffect(function () {
540
- configRef.current = config;
541
- });
542
- var willRevalidateOnMount = function () {
543
- return (config.revalidateOnMount ||
544
- (!config.initialData && config.revalidateOnMount === undefined));
545
- };
546
- var resolveData = function () {
547
- var cachedData = cache.get(key);
548
- return typeof cachedData === 'undefined' ? config.initialData : cachedData;
549
- };
550
- var resolveIsValidating = function () {
551
- return !!cache.get(keyValidating) || (key && willRevalidateOnMount());
552
- };
553
- var initialData = resolveData();
554
- var initialError = cache.get(keyErr);
555
- var initialIsValidating = resolveIsValidating();
556
- // if a state is accessed (data, error or isValidating),
557
- // we add the state to dependencies so if the state is
558
- // updated in the future, we can trigger a rerender
559
- var stateDependencies = useRef({
560
- data: false,
561
- error: false,
562
- isValidating: false
563
- });
564
- var stateRef = useRef({
565
- data: initialData,
566
- error: initialError,
567
- isValidating: initialIsValidating
568
- });
569
- // display the data label in the React DevTools next to SWR hooks
570
- useDebugValue(stateRef.current.data);
571
- var rerender = useState({})[1];
572
- var dispatch = useCallback(function (payload) {
573
- var shouldUpdateState = false;
574
- for (var k in payload) {
575
- // @ts-ignore
576
- if (stateRef.current[k] === payload[k]) {
577
- continue;
578
- }
579
- // @ts-ignore
580
- stateRef.current[k] = payload[k];
581
- // @ts-ignore
582
- if (stateDependencies.current[k]) {
583
- shouldUpdateState = true;
584
- }
585
- }
586
- if (shouldUpdateState) {
587
- // if component is unmounted, should skip rerender
588
- // if component is not mounted, should skip rerender
589
- if (unmountedRef.current || !initialMountedRef.current)
590
- return;
591
- rerender({});
592
- }
593
- },
594
- // config.suspense isn't allowed to change during the lifecycle
595
- // eslint-disable-next-line react-hooks/exhaustive-deps
596
- []);
597
- // error ref inside revalidate (is last request errored?)
598
- var unmountedRef = useRef(false);
599
- var keyRef = useRef(key);
600
- // check if component is mounted in suspense mode
601
- var initialMountedRef = useRef(false);
602
- // do unmount check for callbacks
603
- var eventsCallback = useCallback(function (event) {
604
- var _a;
605
- var params = [];
606
- for (var _i = 1; _i < arguments.length; _i++) {
607
- params[_i - 1] = arguments[_i];
608
- }
609
- if (unmountedRef.current)
610
- return;
611
- if (!initialMountedRef.current)
612
- return;
613
- if (key !== keyRef.current)
614
- return;
615
- // @ts-ignore
616
- (_a = configRef.current)[event].apply(_a, params);
617
- }, [key]);
618
- var boundMutate = useCallback(function (data, shouldRevalidate) {
619
- return mutate(keyRef.current, data, shouldRevalidate);
620
- }, []);
621
- var addRevalidator = function (revalidators, callback) {
622
- if (!revalidators[key]) {
623
- revalidators[key] = [callback];
624
- }
625
- else {
626
- revalidators[key].push(callback);
627
- }
628
- return function () {
629
- var keyedRevalidators = revalidators[key];
630
- var index = keyedRevalidators.indexOf(callback);
631
- if (index >= 0) {
632
- // O(1): faster than splice
633
- keyedRevalidators[index] =
634
- keyedRevalidators[keyedRevalidators.length - 1];
635
- keyedRevalidators.pop();
636
- }
637
- };
638
- };
639
- // start a revalidation
640
- var revalidate = useCallback(function (revalidateOpts) {
641
- if (revalidateOpts === void 0) { revalidateOpts = {}; }
642
- return __awaiter(_this, void 0, void 0, function () {
643
- var _a, retryCount, _b, dedupe, loading, shouldDeduping, newData, startAt, newState, err_2;
644
- return __generator(this, function (_c) {
645
- switch (_c.label) {
646
- case 0:
647
- if (!key || !fn)
648
- return [2 /*return*/, false];
649
- if (unmountedRef.current)
650
- return [2 /*return*/, false];
651
- if (configRef.current.isPaused())
652
- return [2 /*return*/, false];
653
- _a = revalidateOpts.retryCount, retryCount = _a === void 0 ? 0 : _a, _b = revalidateOpts.dedupe, dedupe = _b === void 0 ? false : _b;
654
- loading = true;
655
- shouldDeduping = typeof CONCURRENT_PROMISES[key] !== 'undefined' && dedupe;
656
- _c.label = 1;
657
- case 1:
658
- _c.trys.push([1, 6, , 7]);
659
- dispatch({
660
- isValidating: true
661
- });
662
- cache.set(keyValidating, true);
663
- if (!shouldDeduping) {
664
- // also update other hooks
665
- broadcastState(key, stateRef.current.data, stateRef.current.error, true);
666
- }
667
- newData = void 0;
668
- startAt = void 0;
669
- if (!shouldDeduping) return [3 /*break*/, 3];
670
- // there's already an ongoing request,
671
- // this one needs to be deduplicated.
672
- startAt = CONCURRENT_PROMISES_TS[key];
673
- return [4 /*yield*/, CONCURRENT_PROMISES[key]];
674
- case 2:
675
- newData = _c.sent();
676
- return [3 /*break*/, 5];
677
- case 3:
678
- // if no cache being rendered currently (it shows a blank page),
679
- // we trigger the loading slow event.
680
- if (config.loadingTimeout && !cache.get(key)) {
681
- setTimeout(function () {
682
- if (loading)
683
- eventsCallback('onLoadingSlow', key, config);
684
- }, config.loadingTimeout);
685
- }
686
- if (fnArgs !== null) {
687
- CONCURRENT_PROMISES[key] = fn.apply(void 0, fnArgs);
688
- }
689
- else {
690
- CONCURRENT_PROMISES[key] = fn(key);
691
- }
692
- CONCURRENT_PROMISES_TS[key] = startAt = now();
693
- return [4 /*yield*/, CONCURRENT_PROMISES[key]];
694
- case 4:
695
- newData = _c.sent();
696
- setTimeout(function () {
697
- delete CONCURRENT_PROMISES[key];
698
- delete CONCURRENT_PROMISES_TS[key];
699
- }, config.dedupingInterval);
700
- // trigger the success event,
701
- // only do this for the original request.
702
- eventsCallback('onSuccess', newData, key, config);
703
- _c.label = 5;
704
- case 5:
705
- // if there're other ongoing request(s), started after the current one,
706
- // we need to ignore the current one to avoid possible race conditions:
707
- // req1------------------>res1 (current one)
708
- // req2---------------->res2
709
- // the request that fired later will always be kept.
710
- if (CONCURRENT_PROMISES_TS[key] > startAt) {
711
- return [2 /*return*/, false];
712
- }
713
- // if there're other mutations(s), overlapped with the current revalidation:
714
- // case 1:
715
- // req------------------>res
716
- // mutate------>end
717
- // case 2:
718
- // req------------>res
719
- // mutate------>end
720
- // case 3:
721
- // req------------------>res
722
- // mutate-------...---------->
723
- // we have to ignore the revalidation result (res) because it's no longer fresh.
724
- // meanwhile, a new revalidation should be triggered when the mutation ends.
725
- if (MUTATION_TS[key] &&
726
- // case 1
727
- (startAt <= MUTATION_TS[key] ||
728
- // case 2
729
- startAt <= MUTATION_END_TS[key] ||
730
- // case 3
731
- MUTATION_END_TS[key] === 0)) {
732
- dispatch({ isValidating: false });
733
- return [2 /*return*/, false];
734
- }
735
- cache.set(keyErr, undefined);
736
- cache.set(keyValidating, false);
737
- newState = {
738
- isValidating: false
739
- };
740
- if (typeof stateRef.current.error !== 'undefined') {
741
- // we don't have an error
742
- newState.error = undefined;
743
- }
744
- if (!config.compare(stateRef.current.data, newData)) {
745
- // deep compare to avoid extra re-render
746
- // data changed
747
- newState.data = newData;
748
- }
749
- if (!config.compare(cache.get(key), newData)) {
750
- cache.set(key, newData);
751
- }
752
- // merge the new state
753
- dispatch(newState);
754
- if (!shouldDeduping) {
755
- // also update other hooks
756
- broadcastState(key, newData, newState.error, false);
757
- }
758
- return [3 /*break*/, 7];
759
- case 6:
760
- err_2 = _c.sent();
761
- delete CONCURRENT_PROMISES[key];
762
- delete CONCURRENT_PROMISES_TS[key];
763
- if (configRef.current.isPaused()) {
764
- dispatch({
765
- isValidating: false
766
- });
767
- return [2 /*return*/, false];
768
- }
769
- cache.set(keyErr, err_2);
770
- // get a new error
771
- // don't use deep equal for errors
772
- if (stateRef.current.error !== err_2) {
773
- // we keep the stale data
774
- dispatch({
775
- isValidating: false,
776
- error: err_2
777
- });
778
- if (!shouldDeduping) {
779
- // also broadcast to update other hooks
780
- broadcastState(key, undefined, err_2, false);
781
- }
782
- }
783
- // events and retry
784
- eventsCallback('onError', err_2, key, config);
785
- if (config.shouldRetryOnError) {
786
- // when retrying, we always enable deduping
787
- eventsCallback('onErrorRetry', err_2, key, config, revalidate, {
788
- retryCount: retryCount + 1,
789
- dedupe: true
790
- });
791
- }
792
- return [3 /*break*/, 7];
793
- case 7:
794
- loading = false;
795
- return [2 /*return*/, true];
796
- }
797
- });
798
- });
799
- },
800
- // dispatch is immutable, and `eventsCallback`, `fnArgs`, `keyErr`, and `keyValidating` are based on `key`,
801
- // so we can them from the deps array.
802
- //
803
- // FIXME:
804
- // `fn` and `config` might be changed during the lifecycle,
805
- // but they might be changed every render like this.
806
- // useSWR('key', () => fetch('/api/'), { suspense: true })
807
- // So we omit the values from the deps array
808
- // even though it might cause unexpected behaviors.
809
- // eslint-disable-next-line react-hooks/exhaustive-deps
810
- [key]);
811
- // mounted (client side rendering)
812
- useIsomorphicLayoutEffect(function () {
813
- if (!key)
814
- return undefined;
815
- // after `key` updates, we need to mark it as mounted
816
- unmountedRef.current = false;
817
- var isUpdating = initialMountedRef.current;
818
- initialMountedRef.current = true;
819
- // after the component is mounted (hydrated),
820
- // we need to update the data from the cache
821
- // and trigger a revalidation
822
- var currentHookData = stateRef.current.data;
823
- var latestKeyedData = resolveData();
824
- // update the state if the key changed (not the inital render) or cache updated
825
- keyRef.current = key;
826
- if (!config.compare(currentHookData, latestKeyedData)) {
827
- dispatch({ data: latestKeyedData });
828
- }
829
- // revalidate with deduping
830
- var softRevalidate = function () { return revalidate({ dedupe: true }); };
831
- // trigger a revalidation
832
- if (isUpdating || willRevalidateOnMount()) {
833
- if (typeof latestKeyedData !== 'undefined' && !IS_SERVER) {
834
- // delay revalidate if there's cache
835
- // to not block the rendering
836
- // @ts-ignore it's safe to use requestAnimationFrame in browser
837
- rAF(softRevalidate);
838
- }
839
- else {
840
- softRevalidate();
841
- }
842
- }
843
- var pending = false;
844
- var onFocus = function () {
845
- if (pending || !configRef.current.revalidateOnFocus)
846
- return;
847
- pending = true;
848
- softRevalidate();
849
- setTimeout(function () { return (pending = false); }, configRef.current.focusThrottleInterval);
850
- };
851
- var onReconnect = function () {
852
- if (configRef.current.revalidateOnReconnect) {
853
- softRevalidate();
854
- }
855
- };
856
- // register global cache update listener
857
- var onUpdate = function (shouldRevalidate, updatedData, updatedError, updatedIsValidating, dedupe) {
858
- if (shouldRevalidate === void 0) { shouldRevalidate = true; }
859
- if (dedupe === void 0) { dedupe = true; }
860
- // update hook state
861
- var newState = {};
862
- var needUpdate = false;
863
- if (typeof updatedData !== 'undefined' &&
864
- !config.compare(stateRef.current.data, updatedData)) {
865
- newState.data = updatedData;
866
- needUpdate = true;
867
- }
868
- // always update error
869
- // because it can be `undefined`
870
- if (stateRef.current.error !== updatedError) {
871
- newState.error = updatedError;
872
- needUpdate = true;
873
- }
874
- if (typeof updatedIsValidating !== 'undefined' &&
875
- stateRef.current.isValidating !== updatedIsValidating) {
876
- newState.isValidating = updatedIsValidating;
877
- needUpdate = true;
878
- }
879
- if (needUpdate) {
880
- dispatch(newState);
881
- }
882
- if (shouldRevalidate) {
883
- if (dedupe) {
884
- return softRevalidate();
885
- }
886
- else {
887
- return revalidate();
888
- }
889
- }
890
- return false;
891
- };
892
- var unsubFocus = addRevalidator(FOCUS_REVALIDATORS, onFocus);
893
- var unsubReconnect = addRevalidator(RECONNECT_REVALIDATORS, onReconnect);
894
- var unsubUpdate = addRevalidator(CACHE_REVALIDATORS, onUpdate);
895
- return function () {
896
- // cleanup
897
- dispatch = function () { return null; };
898
- // mark it as unmounted
899
- unmountedRef.current = true;
900
- unsubFocus();
901
- unsubReconnect();
902
- unsubUpdate();
903
- };
904
- }, [key, revalidate]);
905
- useIsomorphicLayoutEffect(function () {
906
- var timer = null;
907
- var tick = function () { return __awaiter(_this, void 0, void 0, function () {
908
- return __generator(this, function (_a) {
909
- switch (_a.label) {
910
- case 0:
911
- if (!(!stateRef.current.error &&
912
- (configRef.current.refreshWhenHidden ||
913
- configRef.current.isDocumentVisible()) &&
914
- (configRef.current.refreshWhenOffline || configRef.current.isOnline()))) return [3 /*break*/, 2];
915
- // only revalidate when the page is visible
916
- // if API request errored, we stop polling in this round
917
- // and let the error retry function handle it
918
- return [4 /*yield*/, revalidate({ dedupe: true })];
919
- case 1:
920
- // only revalidate when the page is visible
921
- // if API request errored, we stop polling in this round
922
- // and let the error retry function handle it
923
- _a.sent();
924
- _a.label = 2;
925
- case 2:
926
- // Read the latest refreshInterval
927
- if (configRef.current.refreshInterval && timer) {
928
- timer = setTimeout(tick, configRef.current.refreshInterval);
929
- }
930
- return [2 /*return*/];
931
- }
932
- });
933
- }); };
934
- if (configRef.current.refreshInterval) {
935
- timer = setTimeout(tick, configRef.current.refreshInterval);
936
- }
937
- return function () {
938
- if (timer) {
939
- clearTimeout(timer);
940
- timer = null;
941
- }
942
- };
943
- }, [
944
- config.refreshInterval,
945
- config.refreshWhenHidden,
946
- config.refreshWhenOffline,
947
- revalidate
948
- ]);
949
- // suspense
950
- var latestData;
951
- var latestError;
952
- if (config.suspense) {
953
- // in suspense mode, we can't return empty state
954
- // (it should be suspended)
955
- // try to get data and error from cache
956
- latestData = cache.get(key);
957
- latestError = cache.get(keyErr);
958
- if (typeof latestData === 'undefined') {
959
- latestData = initialData;
960
- }
961
- if (typeof latestError === 'undefined') {
962
- latestError = initialError;
963
- }
964
- if (typeof latestData === 'undefined' &&
965
- typeof latestError === 'undefined') {
966
- // need to start the request if it hasn't
967
- if (!CONCURRENT_PROMISES[key]) {
968
- // trigger revalidate immediately
969
- // to get the promise
970
- // in this revalidate, should not rerender
971
- revalidate();
972
- }
973
- if (CONCURRENT_PROMISES[key] &&
974
- typeof CONCURRENT_PROMISES[key].then === 'function') {
975
- // if it is a promise
976
- throw CONCURRENT_PROMISES[key];
977
- }
978
- // it's a value, return it directly (override)
979
- latestData = CONCURRENT_PROMISES[key];
980
- }
981
- if (typeof latestData === 'undefined' && latestError) {
982
- // in suspense mode, throw error if there's no content
983
- throw latestError;
984
- }
985
- }
986
- // define returned state
987
- // can be memorized since the state is a ref
988
- var memoizedState = useMemo(function () {
989
- // revalidate will be deprecated in the 1.x release
990
- // because mutate() covers the same use case of revalidate().
991
- // This remains only for backward compatibility
992
- var state = { revalidate: revalidate, mutate: boundMutate };
993
- Object.defineProperties(state, {
994
- error: {
995
- // `key` might be changed in the upcoming hook re-render,
996
- // but the previous state will stay
997
- // so we need to match the latest key and data (fallback to `initialData`)
998
- get: function () {
999
- stateDependencies.current.error = true;
1000
- if (config.suspense) {
1001
- return latestError;
1002
- }
1003
- return keyRef.current === key ? stateRef.current.error : initialError;
1004
- },
1005
- enumerable: true
1006
- },
1007
- data: {
1008
- get: function () {
1009
- stateDependencies.current.data = true;
1010
- if (config.suspense) {
1011
- return latestData;
1012
- }
1013
- return keyRef.current === key ? stateRef.current.data : initialData;
1014
- },
1015
- enumerable: true
1016
- },
1017
- isValidating: {
1018
- get: function () {
1019
- stateDependencies.current.isValidating = true;
1020
- return key ? stateRef.current.isValidating : false;
1021
- },
1022
- enumerable: true
1023
- }
1024
- });
1025
- return state;
1026
- // `config.suspense` isn't allowed to change during the lifecycle.
1027
- // `boundMutate` is immutable, and the immutability of `revalidate` depends on `key`
1028
- // so we can omit them from the deps array,
1029
- // but we put it to enable react-hooks/exhaustive-deps rule.
1030
- // `initialData` and `initialError` are not initial values
1031
- // because they are changed during the lifecycle
1032
- // so we should add them in the deps array.
1033
- }, [
1034
- revalidate,
1035
- initialData,
1036
- initialError,
1037
- boundMutate,
1038
- key,
1039
- config.suspense,
1040
- latestError,
1041
- latestData
1042
- ]);
1043
- return memoizedState;
1044
- }
1045
- Object.defineProperty(SWRConfigContext.Provider, 'default', {
1046
- value: defaultConfig
1047
- });
1048
- var SWRConfig = SWRConfigContext.Provider;
1049
-
1050
- var __awaiter$1 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
1051
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1052
- return new (P || (P = Promise))(function (resolve, reject) {
1053
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
1054
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
1055
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
1056
- step((generator = generator.apply(thisArg, _arguments || [])).next());
1057
- });
1058
- };
1059
- var __generator$1 = (undefined && undefined.__generator) || function (thisArg, body) {
1060
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
1061
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
1062
- function verb(n) { return function (v) { return step([n, v]); }; }
1063
- function step(op) {
1064
- if (f) throw new TypeError("Generator is already executing.");
1065
- while (_) try {
1066
- 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;
1067
- if (y = 0, t) op = [op[0] & 2, t.value];
1068
- switch (op[0]) {
1069
- case 0: case 1: t = op; break;
1070
- case 4: _.label++; return { value: op[1], done: false };
1071
- case 5: _.label++; y = op[1]; op = [0]; continue;
1072
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
1073
- default:
1074
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
1075
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
1076
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
1077
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
1078
- if (t[2]) _.ops.pop();
1079
- _.trys.pop(); continue;
1080
- }
1081
- op = body.call(thisArg, _);
1082
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
1083
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
1084
- }
1085
- };
1086
- var __rest = (undefined && undefined.__rest) || function (s, e) {
1087
- var t = {};
1088
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1089
- t[p] = s[p];
1090
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
1091
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1092
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1093
- t[p[i]] = s[p[i]];
1094
- }
1095
- return t;
1096
- };
1097
-
1098
- var _this = undefined;
34
+ import './debounce-533d9748.js';
35
+ import './isSymbol-a7e9aafe.js';
36
+ import './toNumber-5aeba6e7.js';
37
+ import './Beam.js';
38
+ import './stringify-59c8f690.js';
39
+ import './asyncToGenerator-7f8f9219.js';
40
+ import './_library-528f1934.js';
41
+ import './Segment.js';
1099
42
 
1100
43
  var renderCardImage = function renderCardImage(row, client) {
1101
44
  var imageHeight = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
@@ -1108,129 +51,109 @@ var renderCardImage = function renderCardImage(row, client) {
1108
51
  return url;
1109
52
  };
1110
53
 
1111
- // const loadMore = (values, setValues, itemsPerPage) => {
1112
- // console.log('Values:::', values)
1113
- // setValues({
1114
- // page: values.page + 1,
1115
- // from: values.from + itemsPerPage,
1116
- // to: values.to + itemsPerPage
1117
- // })
1118
- // }
54
+ var loadMore = function loadMore(values, setValues, itemsPerPage) {
55
+ console.log('Values:::', values);
56
+ setValues({
57
+ page: values.page + 1,
58
+ from: values.from + itemsPerPage,
59
+ to: values.to + itemsPerPage
60
+ });
61
+ };
1119
62
 
1120
- // const loadData = (values, query, client, params, setData, setScrolling, setLastDataSize, pointer, pointerArray) => {
1121
- // params = {
1122
- // ...params,
1123
- // from: values.from,
1124
- // to: values.to
1125
- // }
1126
- // client.fetch(query, params).then((dataArr) => {
1127
- // if (pointer && pointerArray) {
1128
- // dataArr = dataArr[pointerArray][pointer]
1129
- // }
63
+ var loadData = function loadData(values, query, client, params, setData, setScrolling, setLastDataSize, pointer, pointerArray) {
64
+ params = _extends({}, params, {
65
+ from: values.from,
66
+ to: values.to
67
+ });
68
+ client.fetch(query, params).then(function (dataArr) {
69
+ if (pointer && pointerArray) {
70
+ dataArr = dataArr[pointerArray][pointer];
71
+ }
1130
72
 
1131
- // if (!dataArr) {
1132
- // dataArr = []
1133
- // }
73
+ if (!dataArr) {
74
+ dataArr = [];
75
+ }
1134
76
 
1135
- // dataArr = dataArr.map((item) => ({
1136
- // ...item,
1137
- // pageNumber: values.page
1138
- // }))
77
+ dataArr = dataArr.map(function (item) {
78
+ return _extends({}, item, {
79
+ pageNumber: values.page
80
+ });
81
+ });
1139
82
 
1140
- // if (dataArr.length > 0) {
1141
- // setData((prevData) => [...prevData, ...dataArr])
1142
- // setLastDataSize(dataArr.length)
1143
- // setScrolling(true)
1144
- // } else {
1145
- // setLastDataSize(0)
1146
- // setScrolling(false)
1147
- // }
1148
- // })
1149
- // }
83
+ if (dataArr.length > 0) {
84
+ setData(function (prevData) {
85
+ return [].concat(_toConsumableArray(prevData), _toConsumableArray(dataArr));
86
+ });
87
+ setLastDataSize(dataArr.length);
88
+ setScrolling(true);
89
+ } else {
90
+ setLastDataSize(0);
91
+ setScrolling(false);
92
+ }
93
+ });
94
+ };
1150
95
 
1151
- // const changePageNumber = (pageNumber, seoPaginate, pageview, router, currentPage, setCurrentPage, itemsPerPage, itemIndex) => {
1152
- // if (seoPaginate) {
1153
- // let path = router.asPath
1154
- // let qrIndex = path.indexOf('?')
1155
- // let pathname = router.pathname
1156
- // let queryString = ''
96
+ var changePageNumber = function changePageNumber(pageNumber, seoPaginate, pageview, router, currentPage, setCurrentPage, itemsPerPage, itemIndex) {
97
+ if (seoPaginate) {
98
+ var path = router.asPath;
99
+ var qrIndex = path.indexOf('?');
100
+ var pathname = router.pathname;
101
+ var queryString = '';
1157
102
 
1158
- // if (qrIndex > 0) {
1159
- // path = path.substring(1, qrIndex)
103
+ if (qrIndex > 0) {
104
+ path = path.substring(1, qrIndex);
1160
105
 
1161
- // let partialQS = router.asPath.substring(qrIndex + 1)
1162
- // let partialQSArr = partialQS.split('&')
106
+ var partialQS = router.asPath.substring(qrIndex + 1);
107
+ var partialQSArr = partialQS.split('&');
1163
108
 
1164
- // // exclude page=xxx from query string
1165
- // partialQSArr.map((item) => {
1166
- // let itemArr = item.split('=')
1167
- // let key = itemArr[0]
1168
- // let val = itemArr[1]
109
+ // exclude page=xxx from query string
110
+ partialQSArr.map(function (item) {
111
+ var itemArr = item.split('=');
112
+ var key = itemArr[0];
113
+ var val = itemArr[1];
1169
114
 
1170
- // if (key !== 'page') {
1171
- // queryString += (queryString.length === 0 ? '' : '&') + key + '=' + val
1172
- // }
1173
- // })
1174
- // }
115
+ if (key !== 'page') {
116
+ queryString += (queryString.length === 0 ? '' : '&') + key + '=' + val;
117
+ }
118
+ });
119
+ }
1175
120
 
1176
- // if (queryString.length > 0) {
1177
- // path += '?' + queryString
1178
- // }
121
+ if (queryString.length > 0) {
122
+ path += '?' + queryString;
123
+ }
1179
124
 
1180
- // pageNumber = parseInt(pageNumber)
1181
- // // const index = Number(itemIndex)
1182
- // // const perPage = Number(itemsPerPage)
125
+ pageNumber = parseInt(pageNumber);
126
+ // const index = Number(itemIndex)
127
+ // const perPage = Number(itemsPerPage)
1183
128
 
1184
- // // pageNumber = Math.ceil((index + 1) / perPage)
129
+ // pageNumber = Math.ceil((index + 1) / perPage)
1185
130
 
1186
- // if (currentPage !== pageNumber) {
1187
- // DFPManager.refresh()
131
+ if (currentPage !== pageNumber) {
132
+ lib_3.refresh();
1188
133
 
1189
- // setCurrentPage(pageNumber)
1190
- // if (path[0] !== '/') {
1191
- // path = '/' + path
1192
- // }
134
+ setCurrentPage(pageNumber);
135
+ if (path[0] !== '/') {
136
+ path = '/' + path;
137
+ }
1193
138
 
1194
- // let newPath = pageNumber === 1 ? `${path}` : `${path}${queryString.length > 0 ? '&' : '?'}page=${pageNumber}`
139
+ var newPath = pageNumber === 1 ? '' + path : '' + path + (queryString.length > 0 ? '&' : '?') + 'page=' + pageNumber;
1195
140
 
1196
- // // if (pageview) {
1197
- // // pageview(newPath)
1198
- // // }
141
+ // if (pageview) {
142
+ // pageview(newPath)
143
+ // }
1199
144
 
1200
- // router.push(pathname, newPath, {
1201
- // shallow: true
1202
- // })
1203
- // }
1204
- // }
1205
- // }
145
+ router.push(pathname, newPath, {
146
+ shallow: true
147
+ });
148
+ }
149
+ }
150
+ };
1206
151
 
1207
152
  var checkExternalUrl = function checkExternalUrl(url) {
1208
153
  return new RegExp(['http', 'https'].join('|')).test(url);
1209
154
  };
1210
155
 
1211
- var CardLoader = function CardLoader(_ref) {
1212
- var data = _ref.data,
1213
- client = _ref.client,
1214
- mapping = _ref.mapping,
1215
- showPublished = _ref.showPublished,
1216
- defaultImage = _ref.defaultImage,
1217
- showAuthor = _ref.showAuthor,
1218
- showCategory = _ref.showCategory,
1219
- imageHeight = _ref.imageHeight,
1220
- imageWidth = _ref.imageWidth,
1221
- imageMaxHeight = _ref.imageMaxHeight,
1222
- imageFit = _ref.imageFit,
1223
- rightItems = _ref.rightItems,
1224
- brandInsightAd = _ref.brandInsightAd,
1225
- showBI = _ref.showBI,
1226
- heroContent = _ref.heroContent,
1227
- lgInfeedAd = _ref.lgInfeedAd,
1228
- showPubInfo = _ref.showPubInfo,
1229
- contentCategoryMapping = _ref.contentCategoryMapping,
1230
- showTimeDiff = _ref.showTimeDiff,
1231
- showTaxonomies = _ref.showTaxonomies,
1232
- showIntro = _ref.showIntro;
1233
-
156
+ var cardLoader = function cardLoader(data, client, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, imageMaxHeight, imageFit, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent, lgInfeedAd, showPubInfo, contentCategoryMapping, showTimeDiff, showTaxonomies, showIntro) {
1234
157
  var numberOfItemsBeforeAd = 6;
1235
158
  var insertBrandInsightAd = function insertBrandInsightAd(arr, index, newElement) {
1236
159
  return [].concat(_toConsumableArray(arr.slice(0, index)), [newElement], _toConsumableArray(arr.slice(index)));
@@ -1312,860 +235,425 @@ var CardLoader = function CardLoader(_ref) {
1312
235
  }
1313
236
  }
1314
237
 
1315
- // // 'articleCount' is New parameter to use instead of 'index' while passing to 'changePageNumber()'
1316
- // // 'index' was including the indexes for infeed ads along with article count making the page number change before it reaches last article.
1317
- // // 'articleCount' will be the indexes of only the articles in the deck.
1318
- // let articleCount = -1
1319
- // data = data.map((ele, i) => {
1320
- // if (ele._type === 'lg-infeed') {
1321
- // // Setting pos as top2 for the first occurence of large infeed ad
1322
- // // const pos = data.indexOf(data.find((d) => d._type === 'lg-infeed')) === i ? 'top2' : `lg-infeed_${i}`
1323
- // return { ...ele, slotId: `lg-infeed_${i}`, targeting: { ...ele.targeting, pos: 'lg-infeed' } }
1324
- // } else if (ele._type === 'article') {
1325
- // // incrementing 'articleCount' for each article.
1326
- // ++articleCount
1327
- // return { ...ele, articleCount: articleCount }
1328
- // } else {
1329
- // return ele
1330
- // }
1331
- // })
238
+ // 'articleCount' is New parameter to use instead of 'index' while passing to 'changePageNumber()'
239
+ // 'index' was including the indexes for infeed ads along with article count making the page number change before it reaches last article.
240
+ // 'articleCount' will be the indexes of only the articles in the deck.
241
+ var articleCount = -1;
242
+ data = data.map(function (ele, i) {
243
+ if (ele._type === 'lg-infeed') {
244
+ // Setting pos as top2 for the first occurence of large infeed ad
245
+ // const pos = data.indexOf(data.find((d) => d._type === 'lg-infeed')) === i ? 'top2' : `lg-infeed_${i}`
246
+ return _extends({}, ele, { slotId: 'lg-infeed_' + i, targeting: _extends({}, ele.targeting, { pos: 'lg-infeed' }) });
247
+ } else if (ele._type === 'article') {
248
+ // incrementing 'articleCount' for each article.
249
+ ++articleCount;
250
+ return _extends({}, ele, { articleCount: articleCount });
251
+ } else {
252
+ return ele;
253
+ }
254
+ });
1332
255
 
1333
256
  var featureCount = 0;
1334
- return React__default.createElement(
257
+ return React.createElement(
1335
258
  'div',
1336
259
  null,
1337
260
  data && data.length > 0 ? dataRemapped ? // For Javascript Enabled Cases
1338
261
  data.map(function (article, index) {
262
+ var pageNumber = article.pageNumber || values.page;
1339
263
  var contentCategoryName = article.contentCategory ? article.contentCategory.name : 'Articles';
1340
264
 
1341
265
  if (article._type === 'feature') {
1342
266
  featureCount++;
1343
267
  if (article.blank || checkExternalUrl(article.url.current)) {
1344
- return React__default.createElement(
1345
- Media,
1346
- {
1347
- key: article._id ? article._id : index,
1348
- className: 'feature-media',
1349
- style: { flexDirection: 'column', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
1350
- (article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
1351
- 'a',
1352
- { rel: 'noopener', href: article.url.current, target: '_blank', className: 'feature-wrapper' },
1353
- React__default.createElement(
1354
- LazyLoad,
1355
- { height: imageHeight, placeholder: React__default.createElement(ImagePlaceholder, null) },
1356
- article.thumbnail && article.thumbnail.asset ? React__default.createElement('img', { className: 'img-fluid', src: renderCardImage(article, client, imageHeight, imageWidth, imageMaxHeight, imageFit), alt: article.title }) : article.thumbnail ? React__default.createElement('img', { src: article.thumbnail, className: 'mr-3', alt: article.title }) : React__default.createElement('img', { src: defaultImage, src2: article.thumbnail, className: 'mr-3', width: '240', height: '135', alt: article.title })
1357
- ),
1358
- article.source && React__default.createElement(
1359
- 'div',
1360
- { className: 'content-category-label' },
1361
- React__default.createElement(
1362
- 'div',
1363
- { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
1364
- article.source
1365
- )
1366
- )
1367
- ),
1368
- React__default.createElement(
1369
- Media.Body,
1370
- null,
1371
- React__default.createElement(
1372
- 'a',
1373
- { rel: 'noopener', href: article.url.current, target: '_blank' },
1374
- article.title && React__default.createElement(
1375
- 'h4',
1376
- { className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
1377
- article.title
1378
- )
1379
- ),
1380
- showPublished && !showTimeDiff && article.published && React__default.createElement(
1381
- 'p',
1382
- { className: 'card-text', style: { color: 'var(--dark)', margin: '.25rem 0' } },
1383
- moment(article.published).format('MMMM DD, YYYY')
1384
- ),
1385
- showTimeDiff && article.published && React__default.createElement(
1386
- 'p',
1387
- { className: 'card-text', style: { color: '#464644', lineHeight: '1.25', fontSize: '.875rem', margin: '.25rem 0' } },
1388
- showTaxonomies && article.taxonomyMapping && article.taxonomyMapping.map(function (taxonomy, index) {
1389
- if (index > 3) {
1390
- return null;
1391
- }
1392
- if (index === 3) {
1393
- return React__default.createElement(
1394
- React__default.Fragment,
1395
- null,
1396
- React__default.createElement(
1397
- 'em',
1398
- { style: { marginRight: '.5rem' } },
1399
- '...'
1400
- )
1401
- );
1402
- }
1403
- return React__default.createElement(
1404
- React__default.Fragment,
1405
- null,
1406
- React__default.createElement(
1407
- 'em',
1408
- null,
1409
- taxonomy.name
1410
- ),
1411
- ' |',
1412
- ' '
1413
- );
1414
- }),
1415
- ' ',
1416
- React__default.createElement(
1417
- 'span',
1418
- { style: { display: 'inline-block' } },
1419
- timeDifferenceCalc(article.published)
1420
- )
1421
- ),
1422
- showAuthor && article.authorMapping && article.authorMapping.length > 0 && React__default.createElement(
1423
- LazyLoad,
1424
- { height: 50 },
1425
- React__default.createElement(AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
1426
- ),
1427
- !article.thumbnail && !defaultImage && article.source && React__default.createElement(
1428
- 'div',
1429
- { className: 'content-category-label' },
1430
- React__default.createElement(
1431
- 'div',
1432
- { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
1433
- article.source
1434
- )
1435
- ),
1436
- React__default.createElement(
1437
- 'div',
1438
- { style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
1439
- showCategory && article.contentCategory && React__default.createElement(
1440
- 'p',
1441
- {
1442
- className: 'article-category',
1443
- style: {
1444
- background: '#3FB618',
1445
- color: '#ffffff',
1446
- marginBottom: '.25rem',
1447
- display: 'inline-block',
1448
- padding: '0 .25rem',
1449
- fontSize: '.8rem'
1450
- } },
1451
- getContentCategory(article.contentCategory.name, contentCategoryMapping)
1452
- ),
1453
- article.issueSection && article.issueSection.name && React__default.createElement(
1454
- 'p',
1455
- {
1456
- className: 'issueSection',
1457
- style: {
1458
- background: '#000000',
1459
- color: '#ffffff',
1460
- marginBottom: '.25rem',
1461
- marginLeft: '.25rem',
1462
- display: 'inline-block',
1463
- padding: '0 .25rem',
1464
- fontSize: '.8rem'
1465
- } },
1466
- article.issueSection.name
1467
- )
1468
- ),
1469
- showPubInfo && (article.issue || article.volume) && React__default.createElement(
1470
- 'div',
1471
- { className: 'pubInfo' },
1472
- article.volume && React__default.createElement(
1473
- 'p',
1474
- { className: 'qdeVolume' },
1475
- article.volume
1476
- ),
1477
- article.issue && React__default.createElement(
1478
- 'p',
1479
- { className: 'qdeIssue' },
1480
- article.issue
1481
- )
1482
- ),
1483
- showIntro && article.summary && React__default.createElement(
1484
- 'p',
1485
- { className: 'pt-2 card-text' },
1486
- clean_html_1(article.summary)
1487
- )
1488
- )
1489
- );
1490
- } else {
1491
- return React__default.createElement(
1492
- Media,
1493
- {
1494
- key: article._id ? article._id : index,
1495
- className: 'feature-media',
1496
- style: { flexDirection: 'column', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
1497
- (article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
1498
- 'a',
1499
- { href: article.url.current, className: 'feature-wrapper' },
1500
- React__default.createElement(
1501
- LazyLoad,
1502
- { height: imageHeight, placeholder: React__default.createElement(ImagePlaceholder, null) },
1503
- article.thumbnail && article.thumbnail.asset ? React__default.createElement('img', { className: 'img-fluid', src: renderCardImage(article, client, imageHeight, imageWidth, imageMaxHeight, imageFit), alt: article.title }) : article.thumbnail ? React__default.createElement('img', { src: article.thumbnail, className: 'mr-3', alt: article.title }) : React__default.createElement('img', { src: defaultImage, src2: article.thumbnail, className: 'mr-3', width: '240', height: '135', alt: article.title })
1504
- ),
1505
- article.source && React__default.createElement(
1506
- 'div',
1507
- { className: 'content-category-label' },
1508
- React__default.createElement(
1509
- 'div',
1510
- { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
1511
- article.source
1512
- )
1513
- )
1514
- ),
1515
- React__default.createElement(
1516
- Media.Body,
1517
- null,
1518
- React__default.createElement(
1519
- 'a',
1520
- { href: article.url.current },
1521
- article.title && React__default.createElement(
1522
- 'h4',
1523
- { className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
1524
- article.title
1525
- )
1526
- ),
1527
- showPublished && !showTimeDiff && article.published && React__default.createElement(
1528
- 'p',
1529
- { className: 'card-text', style: { color: 'var(--dark)', margin: '.25rem 0' } },
1530
- moment(article.published).format('MMMM DD, YYYY')
1531
- ),
1532
- showTimeDiff && article.published && React__default.createElement(
1533
- 'p',
1534
- { className: 'card-text', style: { color: '#464644', lineHeight: '1.25', fontSize: '.875rem', margin: '.25rem 0' } },
1535
- showTaxonomies && article.taxonomyMapping && article.taxonomyMapping.map(function (taxonomy, index) {
1536
- if (index > 3) {
1537
- return null;
1538
- }
1539
- if (index === 3) {
1540
- return React__default.createElement(
1541
- React__default.Fragment,
1542
- null,
1543
- React__default.createElement(
1544
- 'em',
1545
- { style: { marginRight: '.5rem' } },
1546
- '...'
1547
- )
1548
- );
1549
- }
1550
- if (index === 3) {
1551
- return React__default.createElement(
1552
- React__default.Fragment,
1553
- null,
1554
- React__default.createElement(
1555
- 'em',
1556
- { style: { marginRight: '.5rem' } },
1557
- '...'
1558
- )
1559
- );
1560
- }
1561
- return React__default.createElement(
1562
- React__default.Fragment,
1563
- null,
1564
- React__default.createElement(
1565
- 'em',
1566
- null,
1567
- taxonomy.name
1568
- ),
1569
- ' |',
1570
- ' '
1571
- );
1572
- }),
1573
- ' ',
1574
- React__default.createElement(
1575
- 'span',
1576
- { style: { display: 'inline-block' } },
1577
- timeDifferenceCalc(article.published)
1578
- )
1579
- ),
1580
- showAuthor && article.authorMapping && article.authorMapping.length > 0 && React__default.createElement(
1581
- LazyLoad,
1582
- { height: 50 },
1583
- React__default.createElement(AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
1584
- ),
1585
- !article.thumbnail && !defaultImage && article.source && React__default.createElement(
1586
- 'div',
1587
- { className: 'content-category-label' },
1588
- React__default.createElement(
1589
- 'div',
1590
- { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
1591
- article.source
1592
- )
1593
- ),
1594
- React__default.createElement(
1595
- 'div',
1596
- { style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
1597
- showCategory && article.contentCategory && React__default.createElement(
1598
- 'p',
1599
- {
1600
- className: 'article-category',
1601
- style: {
1602
- background: '#3FB618',
1603
- color: '#ffffff',
1604
- marginBottom: '.25rem',
1605
- display: 'inline-block',
1606
- padding: '0 .25rem',
1607
- fontSize: '.8rem'
1608
- } },
1609
- getContentCategory(article.contentCategory.name, contentCategoryMapping)
1610
- ),
1611
- article.issueSection && article.issueSection.name && React__default.createElement(
1612
- 'p',
1613
- {
1614
- className: 'issueSection',
1615
- style: {
1616
- background: '#000000',
1617
- color: '#ffffff',
1618
- marginBottom: '.25rem',
1619
- marginLeft: '.25rem',
1620
- display: 'inline-block',
1621
- padding: '0 .25rem',
1622
- fontSize: '.8rem'
1623
- } },
1624
- article.issueSection.name
1625
- )
1626
- ),
1627
- showPubInfo && (article.issue || article.volume) && React__default.createElement(
1628
- 'div',
1629
- { className: 'pubInfo' },
1630
- article.volume && React__default.createElement(
1631
- 'p',
1632
- { className: 'qdeVolume' },
1633
- article.volume
1634
- ),
1635
- article.issue && React__default.createElement(
1636
- 'p',
1637
- { className: 'qdeIssue' },
1638
- article.issue
1639
- )
1640
- ),
1641
- showIntro && article.summary && React__default.createElement(
1642
- 'p',
1643
- { className: 'pt-2 card-text' },
1644
- clean_html_1(article.summary)
1645
- )
1646
- )
1647
- );
1648
- }
1649
- } else if (article._type === 'lg-infeed' && article.adUnit) {
1650
- return React__default.createElement(ADlgInfeed, _extends({ index: index }, article));
1651
- } else if (article._type === 'brandInsightAd' && article.adUnit) {
1652
- return React__default.createElement(ADInfeed, { index: index, infeedAd: article });
1653
- }
1654
- if ((brandInsightAd ? index > heroContent + featureCount : index + 1 > heroContent + featureCount) && (!article._type || !['lg-infeed', 'brandInsightAd'].includes(article._type))) {
1655
- return React__default.createElement(
1656
- React__default.Fragment,
1657
- { key: article._id ? article._id : index },
1658
- React__default.createElement(
1659
- Media,
268
+ return React.createElement(
269
+ VisibilitySensor,
1660
270
  {
1661
271
  key: article._id ? article._id : index,
1662
- style: { flexDirection: 'row', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
1663
- (article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
1664
- 'a',
1665
- { href: mapping[contentCategoryName] + '/' + article.url.current, className: 'img-wrapper' },
1666
- React__default.createElement(
1667
- LazyLoad,
1668
- { height: imageHeight, placeholder: React__default.createElement(ImagePlaceholder, null) },
1669
- article.thumbnail && article.thumbnail.asset ? React__default.createElement('img', { className: 'mr-3 img-fluid', src: renderCardImage(article, client, imageHeight, imageWidth, imageMaxHeight, imageFit), alt: article.title }) : article.thumbnail ? React__default.createElement('img', { src: article.thumbnail, className: 'mr-3', alt: article.title }) : React__default.createElement('img', { src: defaultImage, src2: article.thumbnail, className: 'mr-3', width: '240', height: '135', alt: article.title })
1670
- ),
1671
- article.source && React__default.createElement(
1672
- 'div',
1673
- { className: 'content-category-label' },
1674
- React__default.createElement(
1675
- 'div',
1676
- { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
1677
- article.source
1678
- )
1679
- )
1680
- ),
1681
- React__default.createElement(
1682
- Media.Body,
272
+ partialVisibility: true,
273
+ onChange: function onChange(isVisible) {
274
+ isVisible && changePageNumber(pageNumber, seoPaginate, pageview, router, currentPage, setCurrentPage);
275
+ } },
276
+ React.createElement(
277
+ React.Fragment,
1683
278
  null,
1684
- React__default.createElement(
1685
- 'a',
1686
- { href: mapping[contentCategoryName] + '/' + article.url.current },
1687
- article.title && React__default.createElement(
1688
- 'h4',
1689
- { className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
1690
- article.title
1691
- )
1692
- ),
1693
- showPublished && !showTimeDiff && article.published && React__default.createElement(
1694
- 'p',
1695
- { className: 'card-text', style: { color: 'var(--dark)', margin: '.25rem 0' } },
1696
- moment(article.published).format('MMMM DD, YYYY')
1697
- ),
1698
- showTimeDiff && article.published && React__default.createElement(
1699
- 'p',
1700
- { className: 'card-text', style: { color: '#464644', lineHeight: '1.25', fontSize: '.875rem', margin: '.25rem 0' } },
1701
- showTaxonomies && article.taxonomyMapping && article.taxonomyMapping.map(function (taxonomy, index) {
1702
- if (index > 3) {
1703
- return null;
1704
- }
1705
- if (index === 3) {
1706
- return React__default.createElement(
1707
- React__default.Fragment,
1708
- null,
1709
- React__default.createElement(
1710
- 'em',
1711
- { style: { marginRight: '.5rem' } },
1712
- '...'
1713
- )
1714
- );
1715
- }
1716
- return React__default.createElement(
1717
- React__default.Fragment,
1718
- null,
1719
- React__default.createElement(
1720
- 'em',
1721
- null,
1722
- taxonomy.name
1723
- ),
1724
- ' |',
1725
- ' '
1726
- );
1727
- }),
1728
- ' ',
1729
- React__default.createElement(
1730
- 'span',
1731
- { style: { display: 'inline-block' } },
1732
- timeDifferenceCalc(article.published)
1733
- )
1734
- ),
1735
- React__default.createElement(
1736
- 'div',
1737
- { className: 'author-sec', style: { lineHeight: 1.5 } },
1738
- showAuthor && article.authorMapping && article.authorMapping.length > 0 && React__default.createElement(
1739
- LazyLoad,
1740
- { height: 50 },
1741
- React__default.createElement(AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
1742
- )
1743
- ),
1744
- !article.thumbnail && !defaultImage && article.source && React__default.createElement(
1745
- 'div',
1746
- { className: 'content-category-label' },
1747
- React__default.createElement(
1748
- 'div',
1749
- { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
1750
- article.source
1751
- )
1752
- ),
1753
- React__default.createElement(
1754
- 'div',
1755
- { style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
1756
- showCategory && article.contentCategory && React__default.createElement(
1757
- 'p',
1758
- {
1759
- className: 'article-category',
1760
- style: {
1761
- background: '#3FB618',
1762
- color: '#ffffff',
1763
- marginBottom: '.25rem',
1764
- display: 'inline-block',
1765
- padding: '0 .25rem',
1766
- fontSize: '.8rem'
1767
- } },
1768
- getContentCategory(article.contentCategory.name, contentCategoryMapping)
1769
- ),
1770
- article.issueSection && article.issueSection.name && React__default.createElement(
1771
- 'p',
1772
- {
1773
- className: 'issueSection',
1774
- style: {
1775
- background: '#000000',
1776
- color: '#ffffff',
1777
- marginBottom: '.25rem',
1778
- marginLeft: '.25rem',
1779
- display: 'inline-block',
1780
- padding: '0 .25rem',
1781
- fontSize: '.8rem'
1782
- } },
1783
- article.issueSection.name
1784
- )
1785
- ),
1786
- showPubInfo && (article.issue || article.volume) && React__default.createElement(
1787
- 'div',
1788
- { className: 'pubInfo' },
1789
- article.volume && React__default.createElement(
1790
- 'p',
1791
- { className: 'qdeVolume' },
1792
- article.volume
1793
- ),
1794
- article.issue && React__default.createElement(
1795
- 'p',
1796
- { className: 'qdeIssue' },
1797
- article.issue
1798
- )
1799
- ),
1800
- showIntro && article.summary && React__default.createElement(
1801
- 'p',
1802
- { className: 'pt-2 card-text' },
1803
- clean_html_1(article.summary)
1804
- )
1805
- )
1806
- ),
1807
- React__default.createElement(
1808
- 'div',
1809
- null,
1810
- main_36 && rightItems && (index + 1) % numberOfItemsBeforeAd === 0 && renderMobileAd(index, numberOfItemsBeforeAd, rightItems)
1811
- )
1812
- );
1813
- } else return null;
1814
- }) :
1815
- // For Javascript Disabled Cases
1816
- React__default.createElement(
1817
- 'noscript',
1818
- null,
1819
- data.map(function (article, index) {
1820
- var contentCategoryName = article.contentCategory ? article.contentCategory.name : 'Articles';
1821
-
1822
- if (article._type === 'feature') {
1823
- featureCount++;
1824
- if (article.blank || checkExternalUrl(article.url.current)) {
1825
- return React__default.createElement(
1826
- Media,
1827
- {
1828
- key: article._id ? article._id : index,
1829
- className: 'feature-media',
1830
- style: { flexDirection: 'column', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
1831
- (article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
1832
- 'a',
1833
- { rel: 'noopener', href: article.url.current, target: '_blank', className: 'feature-wrapper' },
1834
- React__default.createElement(
1835
- LazyLoad,
1836
- { height: imageHeight, placeholder: React__default.createElement(ImagePlaceholder, null) },
1837
- article.thumbnail && article.thumbnail.asset ? React__default.createElement('img', { className: 'img-fluid', src: renderCardImage(article, client, imageHeight, imageWidth, imageMaxHeight, imageFit), alt: article.title }) : article.thumbnail ? React__default.createElement('img', { src: article.thumbnail, className: 'mr-3', alt: article.title }) : React__default.createElement('img', { src: defaultImage, src2: article.thumbnail, className: 'mr-3', width: '240', height: '135', alt: article.title })
1838
- ),
1839
- article.source && React__default.createElement(
1840
- 'div',
1841
- { className: 'content-category-label' },
1842
- React__default.createElement(
1843
- 'div',
1844
- { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
1845
- article.source
1846
- )
1847
- )
1848
- ),
1849
- React__default.createElement(
1850
- Media.Body,
1851
- null,
1852
- React__default.createElement(
279
+ React.createElement(
280
+ Media,
281
+ {
282
+ key: article._id ? article._id : index,
283
+ className: 'feature-media',
284
+ style: { flexDirection: 'column', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
285
+ (article.thumbnail && article.thumbnail.asset || defaultImage) && React.createElement(
1853
286
  'a',
1854
- { rel: 'noopener', href: article.url.current, target: '_blank' },
1855
- article.title && React__default.createElement(
1856
- 'h4',
1857
- { className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
1858
- article.title
1859
- )
1860
- ),
1861
- showPublished && article.published && React__default.createElement(
1862
- 'p',
1863
- { className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
1864
- moment(article.published).format('MMMM DD, YYYY')
1865
- ),
1866
- showTimeDiff && article.published && React__default.createElement(
1867
- 'p',
1868
- { className: 'card-text', style: { color: '#464644', lineHeight: '1.25', fontSize: '.875rem', margin: '.25rem 0' } },
1869
- showTaxonomies && article.taxonomyMapping && article.taxonomyMapping.map(function (taxonomy, index) {
1870
- if (index > 3) {
1871
- return null;
1872
- }
1873
- if (index === 3) {
1874
- return React__default.createElement(
1875
- React__default.Fragment,
1876
- null,
1877
- React__default.createElement(
1878
- 'em',
1879
- { style: { marginRight: '.5rem' } },
1880
- '...'
1881
- )
1882
- );
1883
- }
1884
- return React__default.createElement(
1885
- React__default.Fragment,
1886
- null,
1887
- React__default.createElement(
1888
- 'em',
1889
- null,
1890
- taxonomy.name
1891
- ),
1892
- ' |',
1893
- ' '
1894
- );
1895
- }),
1896
- ' ',
1897
- React__default.createElement(
1898
- 'span',
1899
- { style: { display: 'inline-block' } },
1900
- timeDifferenceCalc(article.published)
1901
- )
1902
- ),
1903
- showAuthor && article.authorMapping && article.authorMapping.length > 0 && React__default.createElement(
1904
- LazyLoad,
1905
- { height: 50 },
1906
- React__default.createElement(AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
1907
- ),
1908
- !article.thumbnail && !defaultImage && article.source && React__default.createElement(
1909
- 'div',
1910
- { className: 'content-category-label' },
1911
- React__default.createElement(
287
+ { rel: 'noopener', href: article.url.current, target: '_blank', className: 'feature-wrapper' },
288
+ React.createElement(
289
+ LazyLoad,
290
+ { height: imageHeight, placeholder: React.createElement(ImagePlaceholder, null) },
291
+ article.thumbnail && article.thumbnail.asset ? React.createElement('img', { className: 'img-fluid', src: renderCardImage(article, client, imageHeight, imageWidth, imageMaxHeight, imageFit), alt: article.title }) : article.thumbnail ? React.createElement('img', { src: article.thumbnail, className: 'mr-3', alt: article.title }) : React.createElement('img', { src: defaultImage, src2: article.thumbnail, className: 'mr-3', width: '240', height: '135', alt: article.title })
292
+ ),
293
+ article.source && React.createElement(
1912
294
  'div',
1913
- { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
1914
- article.source
295
+ { className: 'content-category-label' },
296
+ React.createElement(
297
+ 'div',
298
+ { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
299
+ article.source
300
+ )
1915
301
  )
1916
302
  ),
1917
- React__default.createElement(
1918
- 'div',
1919
- { style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
1920
- showCategory && article.contentCategory && React__default.createElement(
1921
- 'p',
1922
- {
1923
- className: 'article-category',
1924
- style: {
1925
- background: '#3FB618',
1926
- color: '#ffffff',
1927
- marginBottom: '.25rem',
1928
- display: 'inline-block',
1929
- padding: '0 .25rem',
1930
- fontSize: '.8rem'
1931
- } },
1932
- getContentCategory(article.contentCategory.name, contentCategoryMapping)
303
+ React.createElement(
304
+ Media.Body,
305
+ null,
306
+ React.createElement(
307
+ 'a',
308
+ { rel: 'noopener', href: article.url.current, target: '_blank' },
309
+ article.title && React.createElement(
310
+ 'h4',
311
+ { className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
312
+ article.title
313
+ )
1933
314
  ),
1934
- article.issueSection && article.issueSection.name && React__default.createElement(
315
+ showPublished && !showTimeDiff && article.published && React.createElement(
1935
316
  'p',
1936
- {
1937
- className: 'issueSection',
1938
- style: {
1939
- background: '#000000',
1940
- color: '#ffffff',
1941
- marginBottom: '.25rem',
1942
- marginLeft: '.25rem',
1943
- display: 'inline-block',
1944
- padding: '0 .25rem',
1945
- fontSize: '.8rem'
1946
- } },
1947
- article.issueSection.name
1948
- )
1949
- ),
1950
- showPubInfo && (article.issue || article.volume) && React__default.createElement(
1951
- 'div',
1952
- { className: 'pubInfo' },
1953
- article.volume && React__default.createElement(
1954
- 'p',
1955
- { className: 'qdeVolume' },
1956
- article.volume
317
+ { className: 'card-text', style: { color: 'var(--dark)', margin: '.25rem 0' } },
318
+ moment(article.published).format('MMMM DD, YYYY')
1957
319
  ),
1958
- article.issue && React__default.createElement(
320
+ showTimeDiff && article.published && React.createElement(
1959
321
  'p',
1960
- { className: 'qdeIssue' },
1961
- article.issue
1962
- )
1963
- ),
1964
- showIntro && article.summary && React__default.createElement(
1965
- 'p',
1966
- { className: 'pt-2 card-text' },
1967
- clean_html_1(article.summary)
1968
- )
1969
- )
1970
- );
1971
- } else {
1972
- return React__default.createElement(
1973
- Media,
1974
- {
1975
- key: article._id ? article._id : index,
1976
- className: 'feature-media',
1977
- style: { flexDirection: 'column', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
1978
- (article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
1979
- 'a',
1980
- { href: article.url.current, className: 'feature-wrapper' },
1981
- React__default.createElement(
1982
- LazyLoad,
1983
- { height: imageHeight, placeholder: React__default.createElement(ImagePlaceholder, null) },
1984
- article.thumbnail && article.thumbnail.asset ? React__default.createElement('img', { className: 'img-fluid', src: renderCardImage(article, client, imageHeight, imageWidth, imageMaxHeight, imageFit), alt: article.title }) : article.thumbnail ? React__default.createElement('img', { src: article.thumbnail, className: 'mr-3', alt: article.title }) : React__default.createElement('img', { src: defaultImage, src2: article.thumbnail, className: 'mr-3', width: '240', height: '135', alt: article.title })
1985
- ),
1986
- article.source && React__default.createElement(
1987
- 'div',
1988
- { className: 'content-category-label' },
1989
- React__default.createElement(
1990
- 'div',
1991
- { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
1992
- article.source
1993
- )
1994
- )
1995
- ),
1996
- React__default.createElement(
1997
- Media.Body,
1998
- null,
1999
- React__default.createElement(
2000
- 'a',
2001
- { href: article.url.current },
2002
- article.title && React__default.createElement(
2003
- 'h4',
2004
- { className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
2005
- article.title
2006
- )
2007
- ),
2008
- showPublished && article.published && React__default.createElement(
2009
- 'p',
2010
- { className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
2011
- moment(article.published).format('MMMM DD, YYYY')
2012
- ),
2013
- showTimeDiff && article.published && React__default.createElement(
2014
- 'p',
2015
- { className: 'card-text', style: { color: '#464644', lineHeight: '1.25', fontSize: '.875rem', margin: '.25rem 0' } },
2016
- showTaxonomies && article.taxonomyMapping && article.taxonomyMapping.map(function (taxonomy, index) {
2017
- if (index > 3) {
2018
- return null;
2019
- }
2020
- if (index === 3) {
2021
- return React__default.createElement(
2022
- React__default.Fragment,
322
+ { className: 'card-text', style: { color: '#464644', lineHeight: '1.25', fontSize: '.875rem', margin: '.25rem 0' } },
323
+ showTaxonomies && article.taxonomyMapping && article.taxonomyMapping.map(function (taxonomy, index) {
324
+ if (index > 3) {
325
+ return null;
326
+ }
327
+ if (index === 3) {
328
+ return React.createElement(
329
+ React.Fragment,
330
+ null,
331
+ React.createElement(
332
+ 'em',
333
+ { style: { marginRight: '.5rem' } },
334
+ '...'
335
+ )
336
+ );
337
+ }
338
+ return React.createElement(
339
+ React.Fragment,
2023
340
  null,
2024
- React__default.createElement(
341
+ React.createElement(
2025
342
  'em',
2026
- { style: { marginRight: '.5rem' } },
2027
- '...'
2028
- )
343
+ null,
344
+ taxonomy.name
345
+ ),
346
+ ' |',
347
+ ' '
2029
348
  );
2030
- }
2031
- return React__default.createElement(
2032
- React__default.Fragment,
2033
- null,
2034
- React__default.createElement(
2035
- 'em',
2036
- null,
2037
- taxonomy.name
2038
- ),
2039
- ' |',
2040
- ' '
2041
- );
2042
- }),
2043
- ' ',
2044
- React__default.createElement(
2045
- 'span',
2046
- { style: { display: 'inline-block' } },
2047
- timeDifferenceCalc(article.published)
349
+ }),
350
+ ' ',
351
+ React.createElement(
352
+ 'span',
353
+ { style: { display: 'inline-block' } },
354
+ timeDifferenceCalc(article.published)
355
+ )
356
+ ),
357
+ showAuthor && article.authorMapping && article.authorMapping.length > 0 && React.createElement(
358
+ LazyLoad,
359
+ { height: 50 },
360
+ React.createElement(AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
361
+ ),
362
+ !article.thumbnail && !defaultImage && article.source && React.createElement(
363
+ 'div',
364
+ { className: 'content-category-label' },
365
+ React.createElement(
366
+ 'div',
367
+ { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
368
+ article.source
369
+ )
370
+ ),
371
+ React.createElement(
372
+ 'div',
373
+ { style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
374
+ showCategory && article.contentCategory && React.createElement(
375
+ 'p',
376
+ {
377
+ className: 'article-category',
378
+ style: {
379
+ background: '#3FB618',
380
+ color: '#ffffff',
381
+ marginBottom: '.25rem',
382
+ display: 'inline-block',
383
+ padding: '0 .25rem',
384
+ fontSize: '.8rem'
385
+ } },
386
+ getContentCategory(article.contentCategory.name, contentCategoryMapping)
387
+ ),
388
+ article.issueSection && article.issueSection.name && React.createElement(
389
+ 'p',
390
+ {
391
+ className: 'issueSection',
392
+ style: {
393
+ background: '#000000',
394
+ color: '#ffffff',
395
+ marginBottom: '.25rem',
396
+ marginLeft: '.25rem',
397
+ display: 'inline-block',
398
+ padding: '0 .25rem',
399
+ fontSize: '.8rem'
400
+ } },
401
+ article.issueSection.name
402
+ )
403
+ ),
404
+ showPubInfo && (article.issue || article.volume) && React.createElement(
405
+ 'div',
406
+ { className: 'pubInfo' },
407
+ article.volume && React.createElement(
408
+ 'p',
409
+ { className: 'qdeVolume' },
410
+ article.volume
411
+ ),
412
+ article.issue && React.createElement(
413
+ 'p',
414
+ { className: 'qdeIssue' },
415
+ article.issue
416
+ )
417
+ ),
418
+ showIntro && article.summary && React.createElement(
419
+ 'p',
420
+ { className: 'pt-2 card-text' },
421
+ clean_html_1(article.summary)
2048
422
  )
2049
- ),
2050
- showAuthor && article.authorMapping && article.authorMapping.length > 0 && React__default.createElement(
2051
- LazyLoad,
2052
- { height: 50 },
2053
- React__default.createElement(AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
2054
- ),
2055
- !article.thumbnail && !defaultImage && article.source && React__default.createElement(
2056
- 'div',
2057
- { className: 'content-category-label' },
2058
- React__default.createElement(
423
+ )
424
+ )
425
+ )
426
+ );
427
+ } else {
428
+ return React.createElement(
429
+ VisibilitySensor,
430
+ {
431
+ key: article._id ? article._id : index,
432
+ partialVisibility: true,
433
+ onChange: function onChange(isVisible) {
434
+ isVisible && changePageNumber(pageNumber, seoPaginate, pageview, router, currentPage, setCurrentPage);
435
+ } },
436
+ React.createElement(
437
+ React.Fragment,
438
+ null,
439
+ React.createElement(
440
+ Media,
441
+ {
442
+ key: article._id ? article._id : index,
443
+ className: 'feature-media',
444
+ style: { flexDirection: 'column', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
445
+ (article.thumbnail && article.thumbnail.asset || defaultImage) && React.createElement(
446
+ 'a',
447
+ { href: article.url.current, className: 'feature-wrapper' },
448
+ React.createElement(
449
+ LazyLoad,
450
+ { height: imageHeight, placeholder: React.createElement(ImagePlaceholder, null) },
451
+ article.thumbnail && article.thumbnail.asset ? React.createElement('img', { className: 'img-fluid', src: renderCardImage(article, client, imageHeight, imageWidth, imageMaxHeight, imageFit), alt: article.title }) : article.thumbnail ? React.createElement('img', { src: article.thumbnail, className: 'mr-3', alt: article.title }) : React.createElement('img', { src: defaultImage, src2: article.thumbnail, className: 'mr-3', width: '240', height: '135', alt: article.title })
452
+ ),
453
+ article.source && React.createElement(
2059
454
  'div',
2060
- { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
2061
- article.source
455
+ { className: 'content-category-label' },
456
+ React.createElement(
457
+ 'div',
458
+ { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
459
+ article.source
460
+ )
2062
461
  )
2063
462
  ),
2064
- React__default.createElement(
2065
- 'div',
2066
- { style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
2067
- showCategory && article.contentCategory && React__default.createElement(
2068
- 'p',
2069
- {
2070
- className: 'article-category',
2071
- style: {
2072
- background: '#3FB618',
2073
- color: '#ffffff',
2074
- marginBottom: '.25rem',
2075
- display: 'inline-block',
2076
- padding: '0 .25rem',
2077
- fontSize: '.8rem'
2078
- } },
2079
- getContentCategory(article.contentCategory.name, contentCategoryMapping)
463
+ React.createElement(
464
+ Media.Body,
465
+ null,
466
+ React.createElement(
467
+ 'a',
468
+ { href: article.url.current },
469
+ article.title && React.createElement(
470
+ 'h4',
471
+ { className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
472
+ article.title
473
+ )
2080
474
  ),
2081
- article.issueSection && article.issueSection.name && React__default.createElement(
475
+ showPublished && !showTimeDiff && article.published && React.createElement(
2082
476
  'p',
2083
- {
2084
- className: 'issueSection',
2085
- style: {
2086
- background: '#000000',
2087
- color: '#ffffff',
2088
- marginBottom: '.25rem',
2089
- marginLeft: '.25rem',
2090
- display: 'inline-block',
2091
- padding: '0 .25rem',
2092
- fontSize: '.8rem'
2093
- } },
2094
- article.issueSection.name
2095
- )
2096
- ),
2097
- showPubInfo && (article.issue || article.volume) && React__default.createElement(
2098
- 'div',
2099
- { className: 'pubInfo' },
2100
- article.volume && React__default.createElement(
477
+ { className: 'card-text', style: { color: 'var(--dark)', margin: '.25rem 0' } },
478
+ moment(article.published).format('MMMM DD, YYYY')
479
+ ),
480
+ showTimeDiff && article.published && React.createElement(
2101
481
  'p',
2102
- { className: 'qdeVolume' },
2103
- article.volume
482
+ { className: 'card-text', style: { color: '#464644', lineHeight: '1.25', fontSize: '.875rem', margin: '.25rem 0' } },
483
+ showTaxonomies && article.taxonomyMapping && article.taxonomyMapping.map(function (taxonomy, index) {
484
+ if (index > 3) {
485
+ return null;
486
+ }
487
+ if (index === 3) {
488
+ return React.createElement(
489
+ React.Fragment,
490
+ null,
491
+ React.createElement(
492
+ 'em',
493
+ { style: { marginRight: '.5rem' } },
494
+ '...'
495
+ )
496
+ );
497
+ }
498
+ if (index === 3) {
499
+ return React.createElement(
500
+ React.Fragment,
501
+ null,
502
+ React.createElement(
503
+ 'em',
504
+ { style: { marginRight: '.5rem' } },
505
+ '...'
506
+ )
507
+ );
508
+ }
509
+ return React.createElement(
510
+ React.Fragment,
511
+ null,
512
+ React.createElement(
513
+ 'em',
514
+ null,
515
+ taxonomy.name
516
+ ),
517
+ ' |',
518
+ ' '
519
+ );
520
+ }),
521
+ ' ',
522
+ React.createElement(
523
+ 'span',
524
+ { style: { display: 'inline-block' } },
525
+ timeDifferenceCalc(article.published)
526
+ )
527
+ ),
528
+ showAuthor && article.authorMapping && article.authorMapping.length > 0 && React.createElement(
529
+ LazyLoad,
530
+ { height: 50 },
531
+ React.createElement(AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
532
+ ),
533
+ !article.thumbnail && !defaultImage && article.source && React.createElement(
534
+ 'div',
535
+ { className: 'content-category-label' },
536
+ React.createElement(
537
+ 'div',
538
+ { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
539
+ article.source
540
+ )
541
+ ),
542
+ React.createElement(
543
+ 'div',
544
+ { style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
545
+ showCategory && article.contentCategory && React.createElement(
546
+ 'p',
547
+ {
548
+ className: 'article-category',
549
+ style: {
550
+ background: '#3FB618',
551
+ color: '#ffffff',
552
+ marginBottom: '.25rem',
553
+ display: 'inline-block',
554
+ padding: '0 .25rem',
555
+ fontSize: '.8rem'
556
+ } },
557
+ getContentCategory(article.contentCategory.name, contentCategoryMapping)
558
+ ),
559
+ article.issueSection && article.issueSection.name && React.createElement(
560
+ 'p',
561
+ {
562
+ className: 'issueSection',
563
+ style: {
564
+ background: '#000000',
565
+ color: '#ffffff',
566
+ marginBottom: '.25rem',
567
+ marginLeft: '.25rem',
568
+ display: 'inline-block',
569
+ padding: '0 .25rem',
570
+ fontSize: '.8rem'
571
+ } },
572
+ article.issueSection.name
573
+ )
574
+ ),
575
+ showPubInfo && (article.issue || article.volume) && React.createElement(
576
+ 'div',
577
+ { className: 'pubInfo' },
578
+ article.volume && React.createElement(
579
+ 'p',
580
+ { className: 'qdeVolume' },
581
+ article.volume
582
+ ),
583
+ article.issue && React.createElement(
584
+ 'p',
585
+ { className: 'qdeIssue' },
586
+ article.issue
587
+ )
2104
588
  ),
2105
- article.issue && React__default.createElement(
589
+ showIntro && article.summary && React.createElement(
2106
590
  'p',
2107
- { className: 'qdeIssue' },
2108
- article.issue
591
+ { className: 'pt-2 card-text' },
592
+ clean_html_1(article.summary)
2109
593
  )
2110
- ),
2111
- showIntro && article.summary && React__default.createElement(
2112
- 'p',
2113
- { className: 'pt-2 card-text' },
2114
- clean_html_1(article.summary)
2115
594
  )
2116
595
  )
2117
- );
2118
- }
2119
- } else if (article._type === 'lg-infeed' && article.adUnit) {
2120
- return React__default.createElement(ADlgInfeed, _extends({ index: index }, article));
2121
- } else if (article._type === 'brandInsightAd' && article.adUnit) {
2122
- return React__default.createElement(ADInfeed, { index: index, infeedAd: article });
596
+ )
597
+ );
2123
598
  }
2124
- if ((brandInsightAd ? index > heroContent + featureCount : index + 1 > heroContent + featureCount) && (!article._type || !['lg-infeed', 'brandInsightAd'].includes(article._type))) {
2125
- return React__default.createElement(
2126
- React__default.Fragment,
2127
- { key: article._id ? article._id : index },
2128
- React__default.createElement(
599
+ } else if (article._type === 'lg-infeed' && article.adUnit) {
600
+ return React.createElement(ADlgInfeed, _extends({ index: index }, article));
601
+ } else if (article._type === 'brandInsightAd' && article.adUnit) {
602
+ return React.createElement(ADInfeed, { index: index, infeedAd: article });
603
+ }
604
+ if ((brandInsightAd ? index > heroContent + featureCount : index + 1 > heroContent + featureCount) && (!article._type || !['lg-infeed', 'brandInsightAd'].includes(article._type))) {
605
+ return React.createElement(
606
+ VisibilitySensor,
607
+ {
608
+ key: article._id ? article._id : index,
609
+ onChange: function onChange(isVisible) {
610
+ // Passing 'articleCount' instead of index because index will be including the indexes of ads whereas articleCount will be having index of artilce only.
611
+ isVisible && changePageNumber(pageNumber, seoPaginate, pageview, router, currentPage, setCurrentPage, itemsPerPage, article.articleCount ? article.articleCount : index);
612
+ } },
613
+ React.createElement(
614
+ React.Fragment,
615
+ null,
616
+ React.createElement(
2129
617
  Media,
2130
618
  {
2131
619
  key: article._id ? article._id : index,
2132
620
  style: { flexDirection: 'row', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
2133
- (article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
621
+ (article.thumbnail && article.thumbnail.asset || defaultImage) && React.createElement(
2134
622
  'a',
2135
623
  { href: mapping[contentCategoryName] + '/' + article.url.current, className: 'img-wrapper' },
2136
- React__default.createElement(
624
+ React.createElement(
2137
625
  LazyLoad,
2138
- { height: imageHeight, placeholder: React__default.createElement(ImagePlaceholder, null) },
2139
- article.thumbnail && article.thumbnail.asset ? React__default.createElement('img', { className: 'mr-3 img-fluid', src: renderCardImage(article, client, imageHeight, imageWidth, imageMaxHeight, imageFit), alt: article.title }) : article.thumbnail ? React__default.createElement('img', { src: article.thumbnail, className: 'mr-3', alt: article.title }) : React__default.createElement('img', { src: defaultImage, src2: article.thumbnail, className: 'mr-3', width: '240', height: '135', alt: article.title })
626
+ { height: imageHeight, placeholder: React.createElement(ImagePlaceholder, null) },
627
+ article.thumbnail && article.thumbnail.asset ? React.createElement('img', { className: 'mr-3 img-fluid', src: renderCardImage(article, client, imageHeight, imageWidth, imageMaxHeight, imageFit), alt: article.title }) : article.thumbnail ? React.createElement('img', { src: article.thumbnail, className: 'mr-3', alt: article.title }) : React.createElement('img', { src: defaultImage, src2: article.thumbnail, className: 'mr-3', width: '240', height: '135', alt: article.title })
2140
628
  ),
2141
- article.source && React__default.createElement(
629
+ article.source && React.createElement(
2142
630
  'div',
2143
631
  { className: 'content-category-label' },
2144
- React__default.createElement(
632
+ React.createElement(
2145
633
  'div',
2146
634
  { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
2147
635
  article.source
2148
636
  )
2149
637
  )
2150
638
  ),
2151
- React__default.createElement(
639
+ React.createElement(
2152
640
  Media.Body,
2153
641
  null,
2154
- React__default.createElement(
642
+ React.createElement(
2155
643
  'a',
2156
644
  { href: mapping[contentCategoryName] + '/' + article.url.current },
2157
- article.title && React__default.createElement(
645
+ article.title && React.createElement(
2158
646
  'h4',
2159
647
  { className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
2160
648
  article.title
2161
649
  )
2162
650
  ),
2163
- showPublished && article.published && React__default.createElement(
651
+ showPublished && !showTimeDiff && article.published && React.createElement(
2164
652
  'p',
2165
- { className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
653
+ { className: 'card-text', style: { color: 'var(--dark)', margin: '.25rem 0' } },
2166
654
  moment(article.published).format('MMMM DD, YYYY')
2167
655
  ),
2168
- showTimeDiff && article.published && React__default.createElement(
656
+ showTimeDiff && article.published && React.createElement(
2169
657
  'p',
2170
658
  { className: 'card-text', style: { color: '#464644', lineHeight: '1.25', fontSize: '.875rem', margin: '.25rem 0' } },
2171
659
  showTaxonomies && article.taxonomyMapping && article.taxonomyMapping.map(function (taxonomy, index) {
@@ -2173,20 +661,20 @@ var CardLoader = function CardLoader(_ref) {
2173
661
  return null;
2174
662
  }
2175
663
  if (index === 3) {
2176
- return React__default.createElement(
2177
- React__default.Fragment,
664
+ return React.createElement(
665
+ React.Fragment,
2178
666
  null,
2179
- React__default.createElement(
667
+ React.createElement(
2180
668
  'em',
2181
669
  { style: { marginRight: '.5rem' } },
2182
670
  '...'
2183
671
  )
2184
672
  );
2185
673
  }
2186
- return React__default.createElement(
2187
- React__default.Fragment,
674
+ return React.createElement(
675
+ React.Fragment,
2188
676
  null,
2189
- React__default.createElement(
677
+ React.createElement(
2190
678
  'em',
2191
679
  null,
2192
680
  taxonomy.name
@@ -2196,34 +684,34 @@ var CardLoader = function CardLoader(_ref) {
2196
684
  );
2197
685
  }),
2198
686
  ' ',
2199
- React__default.createElement(
687
+ React.createElement(
2200
688
  'span',
2201
689
  { style: { display: 'inline-block' } },
2202
690
  timeDifferenceCalc(article.published)
2203
691
  )
2204
692
  ),
2205
- React__default.createElement(
693
+ React.createElement(
2206
694
  'div',
2207
695
  { className: 'author-sec', style: { lineHeight: 1.5 } },
2208
- showAuthor && article.authorMapping && article.authorMapping.length > 0 && React__default.createElement(
696
+ showAuthor && article.authorMapping && article.authorMapping.length > 0 && React.createElement(
2209
697
  LazyLoad,
2210
698
  { height: 50 },
2211
- React__default.createElement(AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
699
+ React.createElement(AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
2212
700
  )
2213
701
  ),
2214
- !article.thumbnail && !defaultImage && article.source && React__default.createElement(
702
+ !article.thumbnail && !defaultImage && article.source && React.createElement(
2215
703
  'div',
2216
704
  { className: 'content-category-label' },
2217
- React__default.createElement(
705
+ React.createElement(
2218
706
  'div',
2219
707
  { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
2220
708
  article.source
2221
709
  )
2222
710
  ),
2223
- React__default.createElement(
711
+ React.createElement(
2224
712
  'div',
2225
713
  { style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
2226
- showCategory && article.contentCategory && React__default.createElement(
714
+ showCategory && article.contentCategory && React.createElement(
2227
715
  'p',
2228
716
  {
2229
717
  className: 'article-category',
@@ -2237,7 +725,7 @@ var CardLoader = function CardLoader(_ref) {
2237
725
  } },
2238
726
  getContentCategory(article.contentCategory.name, contentCategoryMapping)
2239
727
  ),
2240
- article.issueSection && article.issueSection.name && React__default.createElement(
728
+ article.issueSection && article.issueSection.name && React.createElement(
2241
729
  'p',
2242
730
  {
2243
731
  className: 'issueSection',
@@ -2253,49 +741,556 @@ var CardLoader = function CardLoader(_ref) {
2253
741
  article.issueSection.name
2254
742
  )
2255
743
  ),
2256
- showPubInfo && (article.issue || article.volume) && React__default.createElement(
744
+ showPubInfo && (article.issue || article.volume) && React.createElement(
2257
745
  'div',
2258
746
  { className: 'pubInfo' },
2259
- article.volume && React__default.createElement(
747
+ article.volume && React.createElement(
2260
748
  'p',
2261
749
  { className: 'qdeVolume' },
2262
750
  article.volume
2263
751
  ),
2264
- article.issue && React__default.createElement(
752
+ article.issue && React.createElement(
2265
753
  'p',
2266
754
  { className: 'qdeIssue' },
2267
755
  article.issue
2268
756
  )
2269
757
  ),
2270
- showIntro && article.summary && React__default.createElement(
758
+ showIntro && article.summary && React.createElement(
2271
759
  'p',
2272
760
  { className: 'pt-2 card-text' },
2273
761
  clean_html_1(article.summary)
2274
762
  )
2275
763
  )
2276
764
  ),
2277
- React__default.createElement(
765
+ React.createElement(
2278
766
  'div',
2279
767
  null,
2280
- main_36 && rightItems && (index + 1) % numberOfItemsBeforeAd === 0 && renderMobileAd(index, numberOfItemsBeforeAd, rightItems)
768
+ main_43 && rightItems && (index + 1) % numberOfItemsBeforeAd === 0 && renderMobileAd(index, numberOfItemsBeforeAd, rightItems)
769
+ )
770
+ )
771
+ );
772
+ } else return null;
773
+ }) :
774
+ // For Javascript Disabled Cases
775
+ React.createElement(
776
+ 'noscript',
777
+ null,
778
+ data.map(function (article, index) {
779
+ var pageNumber = article.pageNumber || values.page;
780
+ var contentCategoryName = article.contentCategory ? article.contentCategory.name : 'Articles';
781
+
782
+ if (article._type === 'feature') {
783
+ featureCount++;
784
+ if (article.blank || checkExternalUrl(article.url.current)) {
785
+ return React.createElement(
786
+ VisibilitySensor,
787
+ {
788
+ key: article._id ? article._id : index,
789
+ partialVisibility: true,
790
+ onChange: function onChange(isVisible) {
791
+ isVisible && changePageNumber(pageNumber, seoPaginate, pageview, router, currentPage, setCurrentPage);
792
+ } },
793
+ React.createElement(
794
+ React.Fragment,
795
+ null,
796
+ React.createElement(
797
+ Media,
798
+ {
799
+ key: article._id ? article._id : index,
800
+ className: 'feature-media',
801
+ style: { flexDirection: 'column', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
802
+ (article.thumbnail && article.thumbnail.asset || defaultImage) && React.createElement(
803
+ 'a',
804
+ { rel: 'noopener', href: article.url.current, target: '_blank', className: 'feature-wrapper' },
805
+ React.createElement(
806
+ LazyLoad,
807
+ { height: imageHeight, placeholder: React.createElement(ImagePlaceholder, null) },
808
+ article.thumbnail && article.thumbnail.asset ? React.createElement('img', { className: 'img-fluid', src: renderCardImage(article, client, imageHeight, imageWidth, imageMaxHeight, imageFit), alt: article.title }) : article.thumbnail ? React.createElement('img', { src: article.thumbnail, className: 'mr-3', alt: article.title }) : React.createElement('img', { src: defaultImage, src2: article.thumbnail, className: 'mr-3', width: '240', height: '135', alt: article.title })
809
+ ),
810
+ article.source && React.createElement(
811
+ 'div',
812
+ { className: 'content-category-label' },
813
+ React.createElement(
814
+ 'div',
815
+ { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
816
+ article.source
817
+ )
818
+ )
819
+ ),
820
+ React.createElement(
821
+ Media.Body,
822
+ null,
823
+ React.createElement(
824
+ 'a',
825
+ { rel: 'noopener', href: article.url.current, target: '_blank' },
826
+ article.title && React.createElement(
827
+ 'h4',
828
+ { className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
829
+ article.title
830
+ )
831
+ ),
832
+ showPublished && article.published && React.createElement(
833
+ 'p',
834
+ { className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
835
+ moment(article.published).format('MMMM DD, YYYY')
836
+ ),
837
+ showTimeDiff && article.published && React.createElement(
838
+ 'p',
839
+ { className: 'card-text', style: { color: '#464644', lineHeight: '1.25', fontSize: '.875rem', margin: '.25rem 0' } },
840
+ showTaxonomies && article.taxonomyMapping && article.taxonomyMapping.map(function (taxonomy, index) {
841
+ if (index > 3) {
842
+ return null;
843
+ }
844
+ if (index === 3) {
845
+ return React.createElement(
846
+ React.Fragment,
847
+ null,
848
+ React.createElement(
849
+ 'em',
850
+ { style: { marginRight: '.5rem' } },
851
+ '...'
852
+ )
853
+ );
854
+ }
855
+ return React.createElement(
856
+ React.Fragment,
857
+ null,
858
+ React.createElement(
859
+ 'em',
860
+ null,
861
+ taxonomy.name
862
+ ),
863
+ ' |',
864
+ ' '
865
+ );
866
+ }),
867
+ ' ',
868
+ React.createElement(
869
+ 'span',
870
+ { style: { display: 'inline-block' } },
871
+ timeDifferenceCalc(article.published)
872
+ )
873
+ ),
874
+ showAuthor && article.authorMapping && article.authorMapping.length > 0 && React.createElement(
875
+ LazyLoad,
876
+ { height: 50 },
877
+ React.createElement(AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
878
+ ),
879
+ !article.thumbnail && !defaultImage && article.source && React.createElement(
880
+ 'div',
881
+ { className: 'content-category-label' },
882
+ React.createElement(
883
+ 'div',
884
+ { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
885
+ article.source
886
+ )
887
+ ),
888
+ React.createElement(
889
+ 'div',
890
+ { style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
891
+ showCategory && article.contentCategory && React.createElement(
892
+ 'p',
893
+ {
894
+ className: 'article-category',
895
+ style: {
896
+ background: '#3FB618',
897
+ color: '#ffffff',
898
+ marginBottom: '.25rem',
899
+ display: 'inline-block',
900
+ padding: '0 .25rem',
901
+ fontSize: '.8rem'
902
+ } },
903
+ getContentCategory(article.contentCategory.name, contentCategoryMapping)
904
+ ),
905
+ article.issueSection && article.issueSection.name && React.createElement(
906
+ 'p',
907
+ {
908
+ className: 'issueSection',
909
+ style: {
910
+ background: '#000000',
911
+ color: '#ffffff',
912
+ marginBottom: '.25rem',
913
+ marginLeft: '.25rem',
914
+ display: 'inline-block',
915
+ padding: '0 .25rem',
916
+ fontSize: '.8rem'
917
+ } },
918
+ article.issueSection.name
919
+ )
920
+ ),
921
+ showPubInfo && (article.issue || article.volume) && React.createElement(
922
+ 'div',
923
+ { className: 'pubInfo' },
924
+ article.volume && React.createElement(
925
+ 'p',
926
+ { className: 'qdeVolume' },
927
+ article.volume
928
+ ),
929
+ article.issue && React.createElement(
930
+ 'p',
931
+ { className: 'qdeIssue' },
932
+ article.issue
933
+ )
934
+ ),
935
+ showIntro && article.summary && React.createElement(
936
+ 'p',
937
+ { className: 'pt-2 card-text' },
938
+ clean_html_1(article.summary)
939
+ )
940
+ )
941
+ )
942
+ )
943
+ );
944
+ } else {
945
+ return React.createElement(
946
+ VisibilitySensor,
947
+ {
948
+ key: article._id ? article._id : index,
949
+ partialVisibility: true,
950
+ onChange: function onChange(isVisible) {
951
+ isVisible && changePageNumber(pageNumber, seoPaginate, pageview, router, currentPage, setCurrentPage);
952
+ } },
953
+ React.createElement(
954
+ React.Fragment,
955
+ null,
956
+ React.createElement(
957
+ Media,
958
+ {
959
+ key: article._id ? article._id : index,
960
+ className: 'feature-media',
961
+ style: { flexDirection: 'column', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
962
+ (article.thumbnail && article.thumbnail.asset || defaultImage) && React.createElement(
963
+ 'a',
964
+ { href: article.url.current, className: 'feature-wrapper' },
965
+ React.createElement(
966
+ LazyLoad,
967
+ { height: imageHeight, placeholder: React.createElement(ImagePlaceholder, null) },
968
+ article.thumbnail && article.thumbnail.asset ? React.createElement('img', { className: 'img-fluid', src: renderCardImage(article, client, imageHeight, imageWidth, imageMaxHeight, imageFit), alt: article.title }) : article.thumbnail ? React.createElement('img', { src: article.thumbnail, className: 'mr-3', alt: article.title }) : React.createElement('img', { src: defaultImage, src2: article.thumbnail, className: 'mr-3', width: '240', height: '135', alt: article.title })
969
+ ),
970
+ article.source && React.createElement(
971
+ 'div',
972
+ { className: 'content-category-label' },
973
+ React.createElement(
974
+ 'div',
975
+ { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
976
+ article.source
977
+ )
978
+ )
979
+ ),
980
+ React.createElement(
981
+ Media.Body,
982
+ null,
983
+ React.createElement(
984
+ 'a',
985
+ { href: article.url.current },
986
+ article.title && React.createElement(
987
+ 'h4',
988
+ { className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
989
+ article.title
990
+ )
991
+ ),
992
+ showPublished && article.published && React.createElement(
993
+ 'p',
994
+ { className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
995
+ moment(article.published).format('MMMM DD, YYYY')
996
+ ),
997
+ showTimeDiff && article.published && React.createElement(
998
+ 'p',
999
+ { className: 'card-text', style: { color: '#464644', lineHeight: '1.25', fontSize: '.875rem', margin: '.25rem 0' } },
1000
+ showTaxonomies && article.taxonomyMapping && article.taxonomyMapping.map(function (taxonomy, index) {
1001
+ if (index > 3) {
1002
+ return null;
1003
+ }
1004
+ if (index === 3) {
1005
+ return React.createElement(
1006
+ React.Fragment,
1007
+ null,
1008
+ React.createElement(
1009
+ 'em',
1010
+ { style: { marginRight: '.5rem' } },
1011
+ '...'
1012
+ )
1013
+ );
1014
+ }
1015
+ return React.createElement(
1016
+ React.Fragment,
1017
+ null,
1018
+ React.createElement(
1019
+ 'em',
1020
+ null,
1021
+ taxonomy.name
1022
+ ),
1023
+ ' |',
1024
+ ' '
1025
+ );
1026
+ }),
1027
+ ' ',
1028
+ React.createElement(
1029
+ 'span',
1030
+ { style: { display: 'inline-block' } },
1031
+ timeDifferenceCalc(article.published)
1032
+ )
1033
+ ),
1034
+ showAuthor && article.authorMapping && article.authorMapping.length > 0 && React.createElement(
1035
+ LazyLoad,
1036
+ { height: 50 },
1037
+ React.createElement(AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
1038
+ ),
1039
+ !article.thumbnail && !defaultImage && article.source && React.createElement(
1040
+ 'div',
1041
+ { className: 'content-category-label' },
1042
+ React.createElement(
1043
+ 'div',
1044
+ { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
1045
+ article.source
1046
+ )
1047
+ ),
1048
+ React.createElement(
1049
+ 'div',
1050
+ { style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
1051
+ showCategory && article.contentCategory && React.createElement(
1052
+ 'p',
1053
+ {
1054
+ className: 'article-category',
1055
+ style: {
1056
+ background: '#3FB618',
1057
+ color: '#ffffff',
1058
+ marginBottom: '.25rem',
1059
+ display: 'inline-block',
1060
+ padding: '0 .25rem',
1061
+ fontSize: '.8rem'
1062
+ } },
1063
+ getContentCategory(article.contentCategory.name, contentCategoryMapping)
1064
+ ),
1065
+ article.issueSection && article.issueSection.name && React.createElement(
1066
+ 'p',
1067
+ {
1068
+ className: 'issueSection',
1069
+ style: {
1070
+ background: '#000000',
1071
+ color: '#ffffff',
1072
+ marginBottom: '.25rem',
1073
+ marginLeft: '.25rem',
1074
+ display: 'inline-block',
1075
+ padding: '0 .25rem',
1076
+ fontSize: '.8rem'
1077
+ } },
1078
+ article.issueSection.name
1079
+ )
1080
+ ),
1081
+ showPubInfo && (article.issue || article.volume) && React.createElement(
1082
+ 'div',
1083
+ { className: 'pubInfo' },
1084
+ article.volume && React.createElement(
1085
+ 'p',
1086
+ { className: 'qdeVolume' },
1087
+ article.volume
1088
+ ),
1089
+ article.issue && React.createElement(
1090
+ 'p',
1091
+ { className: 'qdeIssue' },
1092
+ article.issue
1093
+ )
1094
+ ),
1095
+ showIntro && article.summary && React.createElement(
1096
+ 'p',
1097
+ { className: 'pt-2 card-text' },
1098
+ clean_html_1(article.summary)
1099
+ )
1100
+ )
1101
+ )
1102
+ )
1103
+ );
1104
+ }
1105
+ } else if (article._type === 'lg-infeed' && article.adUnit) {
1106
+ return React.createElement(ADlgInfeed, _extends({ index: index }, article));
1107
+ } else if (article._type === 'brandInsightAd' && article.adUnit) {
1108
+ return React.createElement(ADInfeed, { index: index, infeedAd: article });
1109
+ }
1110
+ if ((brandInsightAd ? index > heroContent + featureCount : index + 1 > heroContent + featureCount) && (!article._type || !['lg-infeed', 'brandInsightAd'].includes(article._type))) {
1111
+ return React.createElement(
1112
+ VisibilitySensor,
1113
+ {
1114
+ key: article._id ? article._id : index,
1115
+ onChange: function onChange(isVisible) {
1116
+ // Passing 'articleCount' instead of index because index will be including the indexes of ads whereas articleCount will be having index of artilce only.
1117
+ isVisible && changePageNumber(pageNumber, seoPaginate, pageview, router, currentPage, setCurrentPage, itemsPerPage, article.articleCount ? article.articleCount : index);
1118
+ } },
1119
+ React.createElement(
1120
+ React.Fragment,
1121
+ null,
1122
+ React.createElement(
1123
+ Media,
1124
+ {
1125
+ key: article._id ? article._id : index,
1126
+ style: { flexDirection: 'row', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
1127
+ (article.thumbnail && article.thumbnail.asset || defaultImage) && React.createElement(
1128
+ 'a',
1129
+ { href: mapping[contentCategoryName] + '/' + article.url.current, className: 'img-wrapper' },
1130
+ React.createElement(
1131
+ LazyLoad,
1132
+ { height: imageHeight, placeholder: React.createElement(ImagePlaceholder, null) },
1133
+ article.thumbnail && article.thumbnail.asset ? React.createElement('img', { className: 'mr-3 img-fluid', src: renderCardImage(article, client, imageHeight, imageWidth, imageMaxHeight, imageFit), alt: article.title }) : article.thumbnail ? React.createElement('img', { src: article.thumbnail, className: 'mr-3', alt: article.title }) : React.createElement('img', { src: defaultImage, src2: article.thumbnail, className: 'mr-3', width: '240', height: '135', alt: article.title })
1134
+ ),
1135
+ article.source && React.createElement(
1136
+ 'div',
1137
+ { className: 'content-category-label' },
1138
+ React.createElement(
1139
+ 'div',
1140
+ { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
1141
+ article.source
1142
+ )
1143
+ )
1144
+ ),
1145
+ React.createElement(
1146
+ Media.Body,
1147
+ null,
1148
+ React.createElement(
1149
+ 'a',
1150
+ { href: mapping[contentCategoryName] + '/' + article.url.current },
1151
+ article.title && React.createElement(
1152
+ 'h4',
1153
+ { className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
1154
+ article.title
1155
+ )
1156
+ ),
1157
+ showPublished && article.published && React.createElement(
1158
+ 'p',
1159
+ { className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
1160
+ moment(article.published).format('MMMM DD, YYYY')
1161
+ ),
1162
+ showTimeDiff && article.published && React.createElement(
1163
+ 'p',
1164
+ { className: 'card-text', style: { color: '#464644', lineHeight: '1.25', fontSize: '.875rem', margin: '.25rem 0' } },
1165
+ showTaxonomies && article.taxonomyMapping && article.taxonomyMapping.map(function (taxonomy, index) {
1166
+ if (index > 3) {
1167
+ return null;
1168
+ }
1169
+ if (index === 3) {
1170
+ return React.createElement(
1171
+ React.Fragment,
1172
+ null,
1173
+ React.createElement(
1174
+ 'em',
1175
+ { style: { marginRight: '.5rem' } },
1176
+ '...'
1177
+ )
1178
+ );
1179
+ }
1180
+ return React.createElement(
1181
+ React.Fragment,
1182
+ null,
1183
+ React.createElement(
1184
+ 'em',
1185
+ null,
1186
+ taxonomy.name
1187
+ ),
1188
+ ' |',
1189
+ ' '
1190
+ );
1191
+ }),
1192
+ ' ',
1193
+ React.createElement(
1194
+ 'span',
1195
+ { style: { display: 'inline-block' } },
1196
+ timeDifferenceCalc(article.published)
1197
+ )
1198
+ ),
1199
+ React.createElement(
1200
+ 'div',
1201
+ { className: 'author-sec', style: { lineHeight: 1.5 } },
1202
+ showAuthor && article.authorMapping && article.authorMapping.length > 0 && React.createElement(
1203
+ LazyLoad,
1204
+ { height: 50 },
1205
+ React.createElement(AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
1206
+ )
1207
+ ),
1208
+ !article.thumbnail && !defaultImage && article.source && React.createElement(
1209
+ 'div',
1210
+ { className: 'content-category-label' },
1211
+ React.createElement(
1212
+ 'div',
1213
+ { className: 'mb-1 sanityDisplayLabel displayLabelThumb' },
1214
+ article.source
1215
+ )
1216
+ ),
1217
+ React.createElement(
1218
+ 'div',
1219
+ { style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
1220
+ showCategory && article.contentCategory && React.createElement(
1221
+ 'p',
1222
+ {
1223
+ className: 'article-category',
1224
+ style: {
1225
+ background: '#3FB618',
1226
+ color: '#ffffff',
1227
+ marginBottom: '.25rem',
1228
+ display: 'inline-block',
1229
+ padding: '0 .25rem',
1230
+ fontSize: '.8rem'
1231
+ } },
1232
+ getContentCategory(article.contentCategory.name, contentCategoryMapping)
1233
+ ),
1234
+ article.issueSection && article.issueSection.name && React.createElement(
1235
+ 'p',
1236
+ {
1237
+ className: 'issueSection',
1238
+ style: {
1239
+ background: '#000000',
1240
+ color: '#ffffff',
1241
+ marginBottom: '.25rem',
1242
+ marginLeft: '.25rem',
1243
+ display: 'inline-block',
1244
+ padding: '0 .25rem',
1245
+ fontSize: '.8rem'
1246
+ } },
1247
+ article.issueSection.name
1248
+ )
1249
+ ),
1250
+ showPubInfo && (article.issue || article.volume) && React.createElement(
1251
+ 'div',
1252
+ { className: 'pubInfo' },
1253
+ article.volume && React.createElement(
1254
+ 'p',
1255
+ { className: 'qdeVolume' },
1256
+ article.volume
1257
+ ),
1258
+ article.issue && React.createElement(
1259
+ 'p',
1260
+ { className: 'qdeIssue' },
1261
+ article.issue
1262
+ )
1263
+ ),
1264
+ showIntro && article.summary && React.createElement(
1265
+ 'p',
1266
+ { className: 'pt-2 card-text' },
1267
+ clean_html_1(article.summary)
1268
+ )
1269
+ )
1270
+ ),
1271
+ React.createElement(
1272
+ 'div',
1273
+ null,
1274
+ main_43 && rightItems && (index + 1) % numberOfItemsBeforeAd === 0 && renderMobileAd(index, numberOfItemsBeforeAd, rightItems)
1275
+ )
2281
1276
  )
2282
1277
  );
2283
1278
  } else return null;
2284
1279
  })
2285
- ) : React__default.createElement(
1280
+ ) : React.createElement(
2286
1281
  'div',
2287
1282
  null,
2288
- React__default.createElement(
1283
+ React.createElement(
2289
1284
  'h5',
2290
1285
  null,
2291
- React__default.createElement(
1286
+ React.createElement(
2292
1287
  'em',
2293
1288
  null,
2294
1289
  'New content coming soon, please check back later.'
2295
1290
  )
2296
1291
  )
2297
1292
  ),
2298
- React__default.createElement(
1293
+ React.createElement(
2299
1294
  'style',
2300
1295
  { jsx: 'true' },
2301
1296
  '\n .displayLabelThumb {\n margin: 0 auto;\n margin-top: -1.25rem;\n background-color: white;\n position: relative;\n }\n .content-category-label {\n margin: 0.5rem 0;\n display: block;\n }\n .sanityDisplayLabel {\n margin: 0.5rem 0;\n border: 1px solid black;\n width: fit-content;\n width: -moz-fit-content;\n padding: 5px;\n color: #484848;\n border-radius: 2px;\n }\n .feature-media > .media-body {\n -webkit-box-flex: none;\n -ms-flex: none;\n flex: none;\n }\n .img-wrapper img {\n max-height: 240px;\n height: auto;\n width: 100%;\n object-fit: contain;\n }\n .feature-wrapper {\n height: 100%;\n width: 100%;\n }\n .feature-wrapper img {\n width: 100%;\n margin-bottom: 1em;\n }\n @media only screen and (min-width: 768px) {\n .img-wrapper > img {\n padding-right: 1em;\n }\n }\n @media only screen and (max-width: 767px) {\n .sanityDisplayLabel {\n max-width: 100%;\n }\n .img-wrapper {\n width: 100%;\n }\n .img-wrapper img {\n padding-bottom: 1em;\n }\n .media {\n flex-direction: column !important;\n }\n }\n '
@@ -2304,11 +1299,11 @@ var CardLoader = function CardLoader(_ref) {
2304
1299
  };
2305
1300
 
2306
1301
  var ImagePlaceholder = function ImagePlaceholder() {
2307
- return React__default.createElement(
2308
- React__default.Fragment,
1302
+ return React.createElement(
1303
+ React.Fragment,
2309
1304
  null,
2310
- React__default.createElement('div', { className: 'queuedeck-exp-image-placeholder' }),
2311
- React__default.createElement(
1305
+ React.createElement('div', { className: 'queuedeck-exp-image-placeholder' }),
1306
+ React.createElement(
2312
1307
  'style',
2313
1308
  { jsx: 'true' },
2314
1309
  '\n .queuedeck-exp-image-placeholder {\n width: 240px;\n height: 0;\n padding-top: calc(240px * 9 / 16);\n margin: 0 1rem 0 0;\n }\n @media only screen and (max-width: 767px) {\n .queuedeck-exp-image-placeholder {\n width: 100%;\n height: 0;\n padding-top: calc(100% * 9 / 16);\n margin: 0 0 1rem 0;\n }\n }\n '
@@ -2318,7 +1313,7 @@ var ImagePlaceholder = function ImagePlaceholder() {
2318
1313
 
2319
1314
  var renderMobileAd = function renderMobileAd(index, numberOfItemsBeforeAd, rightItems) {
2320
1315
  var i = ((index + 1) / numberOfItemsBeforeAd - 1) % rightItems.length;
2321
- return React__default.createElement(
1316
+ return React.createElement(
2322
1317
  'div',
2323
1318
  { style: { display: 'flex', flex: '1 0 auto' } },
2324
1319
  rightItems[i].component
@@ -2333,46 +1328,6 @@ var usePrevious = function usePrevious(value) {
2333
1328
  return ref.current;
2334
1329
  };
2335
1330
 
2336
- var Pagination = function Pagination(_ref2) {
2337
- var totalPostsCount = _ref2.totalPostsCount,
2338
- itemsPerPage = _ref2.itemsPerPage,
2339
- currentPage = _ref2.currentPage,
2340
- handlePageChange = _ref2.handlePageChange,
2341
- dataLength = _ref2.dataLength;
2342
-
2343
- var pageCount = Math.ceil(totalPostsCount / itemsPerPage);
2344
- return React__default.createElement(
2345
- 'div',
2346
- null,
2347
- React__default.createElement(ReactPaginate, {
2348
- pageCount: pageCount,
2349
- marginPagesDisplayed: 1,
2350
- pageRangeDisplayed: main_36 ? 3 : 9,
2351
- initialPage: currentPage - 1,
2352
- disableInitialCallback: true,
2353
- onPageChange: function onPageChange(_ref3) {
2354
- var selected = _ref3.selected;
2355
- return handlePageChange(selected + 1);
2356
- },
2357
- hrefBuilder: function hrefBuilder(page) {
2358
- return page === 1 ? '/' : '?page=' + page;
2359
- },
2360
- previousLabel: '<',
2361
- nextLabel: '>',
2362
- containerClassName: 'pagination-container',
2363
- previousLinkClassName: 'previous',
2364
- nextLinkClassName: 'next',
2365
- disabledClassName: 'disbaled',
2366
- activeClassName: 'active'
2367
- }),
2368
- React__default.createElement(
2369
- 'style',
2370
- { jsx: 'true' },
2371
- '\n .pagination-container {\n list-style: none;\n display: flex;\n justify-content: center;\n margin: 3rem 0 3rem 0;\n padding-left: 0;\n }\n .pagination-container a {\n padding: 10px;\n border: 1px solid #dee2e6;\n }\n .pagination-container a:hover {\n text-decoration: none;\n background-color: #e9ecef;\n border-color: #dee2e6;\n }\n .pagination-container .active a {\n color: #fff;\n background-color: var(--primary);\n border-color: #007bff;\n }\n .pagination-container .previous a {\n border-radius: 5px 0 0 5px;\n }\n .pagination-container .next a {\n border-radius: 0 5px 5px 0;\n }\n @media only screen and (max-width: 768px) {\n .pagination-container {\n margin-bottom: 6rem;\n }\n }\n '
2372
- )
2373
- );
2374
- };
2375
-
2376
1331
  var QueueDeckExpanded = function QueueDeckExpanded(props) {
2377
1332
  var router = useRouter();
2378
1333
 
@@ -2388,12 +1343,15 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
2388
1343
  }, [router]);
2389
1344
 
2390
1345
  var initialData = props.dataRecord,
2391
- initialCurrentPage = props.currentPage,
2392
1346
  client = props.client,
2393
1347
  params = props.params,
2394
1348
  query = props.query,
1349
+ autoScroll = props.autoScroll,
1350
+ pointer = props.pointer,
1351
+ pointerArray = props.pointerArray,
2395
1352
  mapping = props.mapping,
2396
1353
  seoPaginate = props.seoPaginate,
1354
+ pageview = props.pageview,
2397
1355
  defaultImage = props.defaultImage,
2398
1356
  showAuthor = props.showAuthor,
2399
1357
  showCategory = props.showCategory,
@@ -2418,122 +1376,160 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
2418
1376
  _props$showIntro = props.showIntro,
2419
1377
  showIntro = _props$showIntro === undefined ? true : _props$showIntro,
2420
1378
  _props$contentCategor = props.contentCategoryMapping,
2421
- contentCategoryMapping = _props$contentCategor === undefined ? [] : _props$contentCategor,
1379
+ contentCategoryMapping = _props$contentCategor === undefined ? [] : _props$contentCategor;
1380
+ var initialCurrentPage = props.currentPage,
2422
1381
  showPublished = props.showPublished;
2423
1382
 
2424
- var _useState3 = useState(initialCurrentPage || 1),
1383
+ var _useState3 = useState(initialData),
2425
1384
  _useState4 = _slicedToArray(_useState3, 2),
2426
- currentPage = _useState4[0],
2427
- setCurrentPage = _useState4[1];
2428
-
2429
- var itemsPerPage = params && params.itemsPerPage ? params.itemsPerPage : params && params.from && params.to ? params.to - params.from : 10;
2430
-
2431
- var fetcher = function () {
2432
- var _ref4 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(currentPage) {
2433
- var start;
2434
- return regenerator.wrap(function _callee$(_context) {
2435
- while (1) {
2436
- switch (_context.prev = _context.next) {
2437
- case 0:
2438
- start = (currentPage - 1) * itemsPerPage;
2439
- _context.next = 3;
2440
- return client.fetch(query, _extends({}, params, {
2441
- from: start,
2442
- to: start + itemsPerPage
2443
- }));
2444
-
2445
- case 3:
2446
- return _context.abrupt('return', _context.sent);
2447
-
2448
- case 4:
2449
- case 'end':
2450
- return _context.stop();
2451
- }
2452
- }
2453
- }, _callee, _this);
2454
- }));
2455
-
2456
- return function fetcher(_x5) {
2457
- return _ref4.apply(this, arguments);
2458
- };
2459
- }();
2460
-
2461
- var onLoadDataSuccess = function onLoadDataSuccess() {
2462
- document.body.scrollTop = 0;
2463
- document.documentElement.scrollTop = 0;
2464
- seoPaginate && seoPagination(currentPage);
2465
- lib_3.refresh();
2466
- };
2467
-
2468
- var _useSWR = useSWR([currentPage], fetcher, { initialData: initialData, onSuccess: onLoadDataSuccess }),
2469
- data = _useSWR.data;
1385
+ data = _useState4[0],
1386
+ setData = _useState4[1];
1387
+
1388
+ var _useState5 = useState(true),
1389
+ _useState6 = _slicedToArray(_useState5, 2),
1390
+ scrolling = _useState6[0],
1391
+ setScrolling = _useState6[1];
1392
+
1393
+ var _useState7 = useState(initialCurrentPage || 1),
1394
+ _useState8 = _slicedToArray(_useState7, 2),
1395
+ currentPage = _useState8[0],
1396
+ setCurrentPage = _useState8[1];
1397
+
1398
+ var _useState9 = useState(initialData ? initialData.length : 0),
1399
+ _useState10 = _slicedToArray(_useState9, 2),
1400
+ lastDataSize = _useState10[0],
1401
+ setLastDataSize = _useState10[1];
1402
+
1403
+ var _useState11 = useState({
1404
+ from: params ? params.from : 0,
1405
+ to: params ? params.to : 0,
1406
+ page: initialCurrentPage ? initialCurrentPage : 1
1407
+ }),
1408
+ _useState12 = _slicedToArray(_useState11, 2),
1409
+ values = _useState12[0],
1410
+ setValues = _useState12[1];
1411
+
1412
+ var itemsPerPage = params && params.itemsPerPage ? params.itemsPerPage : 10;
1413
+
1414
+ var prevValues = usePrevious(values);
1415
+
1416
+ var renderManualPagination = function renderManualPagination(currentPage) {
1417
+ if (lastDataSize < itemsPerPage) {
1418
+ return null;
1419
+ }
2470
1420
 
2471
- var handlePageChange = function handlePageChange(selectedPage) {
2472
- setCurrentPage(selectedPage);
1421
+ return React.createElement(
1422
+ 'div',
1423
+ { className: 'd-flex justify-content-between' },
1424
+ currentPage && currentPage > 1 && React.createElement(
1425
+ 'a',
1426
+ { href: '?page=' + (currentPage - 1) },
1427
+ '<< Previous'
1428
+ ),
1429
+ React.createElement(
1430
+ 'a',
1431
+ { href: '?page=' + (currentPage + 1) },
1432
+ 'Next >>'
1433
+ )
1434
+ );
2473
1435
  };
2474
1436
 
2475
- var seoPagination = function seoPagination(pageNumber) {
2476
- var path = router.asPath;
2477
- var qrIndex = path.indexOf('?');
2478
- var pathname = router.pathname;
2479
- var queryString = '';
2480
- if (qrIndex > 0) {
2481
- path = path.substring(1, qrIndex);
2482
- var partialQS = router.asPath.substring(qrIndex + 1);
2483
- var partialQSArr = partialQS.split('&');
2484
- // exclude page=xxx from query string
2485
- partialQSArr.map(function (item) {
2486
- var itemArr = item.split('=');
2487
- var key = itemArr[0];
2488
- var val = itemArr[1];
2489
- if (key !== 'page') queryString += (queryString.length === 0 ? '' : '&') + key + '=' + val;
1437
+ // check for change in filter parameters from client side and refresh the page
1438
+ useEffect(function () {
1439
+ if (initialData && data !== initialData && initialData.length >= 0) {
1440
+ setData(initialData);
1441
+ setCurrentPage(initialCurrentPage ? initialCurrentPage : 1);
1442
+ setValues({
1443
+ from: params ? params.from : 0,
1444
+ to: params ? params.to : 0,
1445
+ page: initialCurrentPage ? initialCurrentPage : 1
2490
1446
  });
1447
+ if (initialData.length > 0) {
1448
+ setScrolling(true);
1449
+ }
2491
1450
  }
2492
- if (queryString.length > 0) path += '?' + queryString;
2493
- pageNumber = parseInt(pageNumber);
2494
- if (path[0] !== '/') path = '/' + path;
2495
- var newPath = pageNumber === 1 ? '' + path : '' + path + (queryString.length > 0 ? '&' : '?') + 'page=' + pageNumber;
2496
- router.push(pathname, newPath, {
2497
- shallow: true
2498
- });
2499
- };
1451
+ }, [initialData]);
1452
+
1453
+ useEffect(function () {
1454
+ if (prevValues) {
1455
+ if (values.page !== prevValues.page && values.from !== prevValues.from && values.to !== prevValues.to) {
1456
+ loadData(values, query, client, params, setData, setScrolling, setLastDataSize, pointer, pointerArray);
1457
+ }
1458
+ }
1459
+ }, [values, prevValues, query, client, params, setData, setScrolling, setLastDataSize, pointer, pointerArray]);
2500
1460
 
2501
- return React__default.createElement(
1461
+ // useEffect(() => {
1462
+ // document.addEventListener('scroll', trackScrolling)
1463
+ // return () => {
1464
+ // document.removeEventListener('scroll', trackScrolling)
1465
+ // }
1466
+ // }, [currentPage])
1467
+
1468
+ // const trackScrolling = (current) => {
1469
+ // if (window.pageYOffset === 0) {
1470
+ // if (currentPage > 1) {
1471
+ // changePageNumber(1, seoPaginate, pageview, router, currentPage, setCurrentPage, itemsPerPage, 1)
1472
+ // }
1473
+ // }
1474
+ // }
1475
+
1476
+ return React.createElement(
2502
1477
  'div',
2503
1478
  null,
2504
- React__default.createElement(
2505
- Container,
1479
+ autoScroll ? React.createElement(
1480
+ React.Fragment,
2506
1481
  null,
2507
- React__default.createElement(CardLoader, {
2508
- data: data,
2509
- client: client,
2510
- mapping: mapping,
2511
- showPublished: showPublished,
2512
- defaultImage: defaultImage,
2513
- showAuthor: showAuthor,
2514
- showCategory: showCategory,
2515
- imageHeight: imageHeight,
2516
- imageWidth: imageWidth,
2517
- imageMaxHeight: imageMaxHeight,
2518
- imageFit: imageFit,
2519
- rightItems: rightItems,
2520
- brandInsightAd: brandInsightAd,
2521
- showBI: showBI,
2522
- heroContent: heroContent,
2523
- lgInfeedAd: lgInfeedAd,
2524
- showPubInfo: showPubInfo,
2525
- contentCategoryMapping: contentCategoryMapping,
2526
- showTimeDif: showTimeDiff,
2527
- showTaxonomies: showTaxonomies,
2528
- showIntro: showIntro
2529
- }),
2530
- React__default.createElement(Pagination, {
2531
- totalPostsCount: props.totalPostsCount,
2532
- itemsPerPage: props.params.itemsPerPage,
2533
- currentPage: props.currentPage,
2534
- handlePageChange: handlePageChange,
2535
- dataLength: data.length
2536
- })
1482
+ React.createElement(
1483
+ InfiniteScroll,
1484
+ { dataLength: data && data.length, next: function next() {
1485
+ return loadMore(values, setValues, itemsPerPage);
1486
+ }, hasMore: scrolling, scrollThreshold: 0.9 },
1487
+ React.createElement(
1488
+ Container,
1489
+ null,
1490
+ cardLoader(data, client, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, imageMaxHeight, imageFit, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent, lgInfeedAd, showPubInfo, contentCategoryMapping, showTimeDiff, showTaxonomies, showIntro)
1491
+ )
1492
+ ),
1493
+ React.createElement(
1494
+ 'noscript',
1495
+ null,
1496
+ renderManualPagination(currentPage)
1497
+ )
1498
+ ) : React.createElement(
1499
+ React.Fragment,
1500
+ null,
1501
+ React.createElement(
1502
+ Container,
1503
+ null,
1504
+ cardLoader(data, client, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, imageMaxHeight, imageFit, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent, lgInfeedAd, showPubInfo, contentCategoryMapping, showTimeDiff, showTaxonomies, showIntro)
1505
+ ),
1506
+ React.createElement(
1507
+ 'div',
1508
+ { style: { padding: '0px 10px' } },
1509
+ scrolling ? React.createElement(
1510
+ 'button',
1511
+ {
1512
+ className: 'load-more-btn',
1513
+ style: { margin: 'auto', width: '100%' },
1514
+ onClick: function onClick(e) {
1515
+ loadMore(values, setValues, itemsPerPage);
1516
+ } },
1517
+ 'Load More'
1518
+ ) : React.createElement(
1519
+ 'p',
1520
+ { style: { textAlign: 'center' } },
1521
+ React.createElement(
1522
+ 'b',
1523
+ null,
1524
+ 'End of data'
1525
+ )
1526
+ )
1527
+ ),
1528
+ React.createElement(
1529
+ 'noscript',
1530
+ null,
1531
+ renderManualPagination(currentPage)
1532
+ )
2537
1533
  )
2538
1534
  );
2539
1535
  };