@mjhls/mjh-framework 1.0.98 → 1.0.99-0.next12

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 (356) hide show
  1. package/README.md +168 -172
  2. package/dist/cjs/AD.js +32 -0
  3. package/dist/cjs/AD300x250.js +95 -0
  4. package/dist/cjs/AD300x250x600.js +112 -0
  5. package/dist/cjs/AD728x90.js +109 -0
  6. package/dist/cjs/ADFloatingFooter.js +143 -0
  7. package/dist/cjs/ADFooter.js +53 -0
  8. package/dist/cjs/ADGutter.js +115 -0
  9. package/dist/cjs/ADInfeed-cf54cb8a.js +66 -0
  10. package/dist/cjs/ADSkyscraper.js +117 -0
  11. package/dist/cjs/ADSponsoredResources.js +114 -0
  12. package/dist/cjs/ADWebcast.js +119 -0
  13. package/dist/cjs/ADWelcome.js +166 -0
  14. package/dist/cjs/ADlgInfeed-d06624d8.js +60 -0
  15. package/dist/cjs/AccordionPanel.js +94 -0
  16. package/dist/cjs/AdSlot.js +251 -0
  17. package/dist/cjs/AdSlotsProvider.js +183 -0
  18. package/dist/cjs/AlgoliaSearch.js +195 -0
  19. package/dist/cjs/AlphabeticList.js +135 -0
  20. package/dist/cjs/ArticleCarousel.js +46 -0
  21. package/dist/cjs/ArticleProgramLandingPage.js +184 -0
  22. package/dist/cjs/ArticleSeriesLandingPage.js +162 -0
  23. package/dist/cjs/ArticleSeriesListing.js +315 -0
  24. package/dist/cjs/AuthWrapper.js +720 -0
  25. package/dist/cjs/AuthorComponent-39b37d84.js +96 -0
  26. package/dist/cjs/Beam.js +350 -0
  27. package/dist/cjs/BlockContent-36e54d77.js +916 -0
  28. package/dist/cjs/Breadcrumbs.js +107 -0
  29. package/dist/cjs/CMEDeck.js +443 -0
  30. package/dist/cjs/Column1.js +39 -0
  31. package/dist/cjs/Column2.js +75 -0
  32. package/dist/cjs/Column3.js +144 -0
  33. package/dist/cjs/ConferenceArticleCard.js +93 -0
  34. package/dist/cjs/ConferenceBanner-6c9e718a.js +24 -0
  35. package/dist/cjs/ContentCardPaginated.js +417 -0
  36. package/dist/cjs/DeckContent.js +507 -0
  37. package/dist/cjs/DeckQueue.js +403 -0
  38. package/dist/cjs/DeckQueuePaginated.js +348 -0
  39. package/dist/cjs/Dfp-94f8ccdf.js +103 -0
  40. package/dist/cjs/EventsDeck.js +857 -0
  41. package/dist/cjs/ExternalResources.js +217 -0
  42. package/dist/cjs/Feature.js +129 -0
  43. package/dist/cjs/ForbesHero.js +137 -0
  44. package/dist/cjs/GridContent.js +828 -0
  45. package/dist/cjs/GridContentPaginated.js +704 -0
  46. package/dist/cjs/GridHero.js +147 -0
  47. package/dist/cjs/GroupDeck.js +314 -0
  48. package/dist/cjs/HamMagazine.js +602 -0
  49. package/dist/cjs/Header.js +39 -0
  50. package/dist/cjs/HealthCareProfessionalModal.js +78 -0
  51. package/dist/cjs/Hero.js +48 -0
  52. package/dist/cjs/HighlightenVideo.js +69 -0
  53. package/dist/cjs/HorizontalArticleListing.js +165 -0
  54. package/dist/cjs/HorizontalHero.js +111 -0
  55. package/dist/cjs/ImageSlider-a7fb6218.js +182 -0
  56. package/dist/cjs/IssueContentDeck.js +241 -0
  57. package/dist/cjs/IssueDeck.js +268 -0
  58. package/dist/cjs/IssueLanding.js +172 -0
  59. package/dist/cjs/KMTracker.js +27 -0
  60. package/dist/cjs/LeftNav.js +145 -0
  61. package/dist/cjs/MasterDeck.js +555 -0
  62. package/dist/cjs/MasterDeckPaginated.js +469 -0
  63. package/dist/cjs/MediaSeriesCard-36eab8b7.js +9502 -0
  64. package/dist/cjs/MediaSeriesLanding.js +503 -0
  65. package/dist/cjs/MediaSeriesLandingPaginated.js +529 -0
  66. package/dist/cjs/NavDvm.js +245 -0
  67. package/dist/cjs/NavFooter-3dcd99a8.js +66 -0
  68. package/dist/cjs/NavMagazine.js +595 -0
  69. package/dist/cjs/NavNative.js +861 -0
  70. package/dist/cjs/OncliveHero.js +79 -0
  71. package/dist/cjs/OncliveLargeHero.js +241 -0
  72. package/dist/cjs/PageFilter.js +72 -0
  73. package/dist/cjs/Pagination-1e0d5f1d.js +90 -0
  74. package/dist/cjs/PartnerDetailListing.js +326 -0
  75. package/dist/cjs/PartnerDetailListingPaginated.js +318 -0
  76. package/dist/cjs/PdfDownload.js +28 -0
  77. package/dist/cjs/PixelTracking.js +165 -0
  78. package/dist/cjs/PopUpModal.js +58 -0
  79. package/dist/cjs/PtceDeck.js +149 -0
  80. package/dist/cjs/PubSection.js +120 -0
  81. package/dist/cjs/PubToc.js +87 -0
  82. package/dist/cjs/PublicationDeck.js +183 -0
  83. package/dist/cjs/PublicationFeature-be5f3503.js +130 -0
  84. package/dist/cjs/PublicationLanding.js +853 -0
  85. package/dist/cjs/QueueDeckExpanded.js +1540 -0
  86. package/dist/cjs/QueueDeckExpandedPaginated.js +1388 -0
  87. package/dist/cjs/RecentNews.js +91 -0
  88. package/dist/cjs/RelatedContent.js +114 -0
  89. package/dist/cjs/RelatedTopicsDropdown.js +90 -0
  90. package/dist/cjs/RolesDeck.js +94 -0
  91. package/dist/cjs/Schema.js +101 -0
  92. package/dist/cjs/Search.js +66 -0
  93. package/dist/cjs/Segment.js +403 -0
  94. package/dist/cjs/SeriesListingDeck.js +248 -0
  95. package/dist/cjs/SeriesSlider-b94f1dd5.js +332 -0
  96. package/dist/cjs/SetCookie.js +10 -0
  97. package/dist/cjs/SideFooter.js +151 -0
  98. package/dist/cjs/SocialIcons.js +103 -0
  99. package/dist/cjs/SocialSearchComponent-b7faaedc.js +213 -0
  100. package/dist/cjs/SocialShare.js +74 -0
  101. package/dist/cjs/TaxonomyCard.js +253 -0
  102. package/dist/cjs/TaxonomyDescription.js +205 -0
  103. package/dist/cjs/TemplateNormal.js +204 -0
  104. package/dist/cjs/ThumbnailCard.js +59 -0
  105. package/dist/cjs/Ustream.js +156 -0
  106. package/dist/cjs/VerticalHero.js +74 -0
  107. package/dist/cjs/VideoProgramLandingPage.js +260 -0
  108. package/dist/cjs/VideoSeriesCard.js +88 -0
  109. package/dist/cjs/VideoSeriesFilter.js +128 -0
  110. package/dist/cjs/VideoSeriesLandingPage.js +178 -0
  111. package/dist/cjs/VideoSeriesListing.js +422 -0
  112. package/dist/cjs/View.js +2601 -0
  113. package/dist/cjs/YahooHero.js +126 -0
  114. package/dist/cjs/YoutubeGroup.js +371 -0
  115. package/dist/cjs/_commonjsHelpers-06173234.js +25 -0
  116. package/dist/cjs/_is-array-54228b29.js +74 -0
  117. package/dist/cjs/_iter-detect-b1df62f0.js +52 -0
  118. package/dist/cjs/_library-dd23b178.js +5 -0
  119. package/dist/cjs/_object-pie-083f2dd6.js +16 -0
  120. package/dist/cjs/_object-sap-d1978572.js +16 -0
  121. package/dist/cjs/_object-to-array-ce86cae7.js +25 -0
  122. package/dist/cjs/asyncToGenerator-77821af0.js +1395 -0
  123. package/dist/cjs/brightcove-react-player-loader.es-a195642e.js +2232 -0
  124. package/dist/cjs/core.get-iterator-method-5643aa10.js +584 -0
  125. package/dist/cjs/debounce-d4a2369b.js +216 -0
  126. package/dist/cjs/define-property-e8404b64.js +20 -0
  127. package/dist/cjs/defineProperty-9673846a.js +34 -0
  128. package/dist/cjs/entities-3f9d0f2f.js +506 -0
  129. package/dist/cjs/eq-5fc26c07.js +79 -0
  130. package/dist/cjs/extends-7c86182f.js +87 -0
  131. package/dist/cjs/faundadb.js +644 -0
  132. package/dist/cjs/get-5839e5b5.js +920 -0
  133. package/dist/cjs/getContentCategory-f38a4c00.js +11 -0
  134. package/dist/cjs/getKeywords.js +46 -0
  135. package/dist/cjs/getPtceActivities.js +89 -0
  136. package/dist/cjs/getQuery.js +28 -0
  137. package/dist/cjs/getRelatedArticle.js +747 -0
  138. package/dist/cjs/getRootDocGroup.js +62 -0
  139. package/dist/cjs/getSerializers.js +64 -0
  140. package/dist/cjs/getSeriesDetail.js +40 -0
  141. package/dist/cjs/getTargeting-4439c99d.js +164 -0
  142. package/dist/cjs/getTargeting.js +13 -0
  143. package/dist/cjs/iconBase-be4097c0.js +106 -0
  144. package/dist/cjs/index-0e4427c8.js +1683 -0
  145. package/dist/cjs/index-187c967e.js +54 -0
  146. package/dist/cjs/index-7361fa72.js +11305 -0
  147. package/dist/cjs/index-eadd5035.js +613 -0
  148. package/dist/cjs/index-efca863c.js +556 -0
  149. package/dist/cjs/index-f86bb269.js +1571 -0
  150. package/dist/cjs/index.es-f3e47207.js +445 -0
  151. package/dist/cjs/index.esm-2bb721c8.js +96 -0
  152. package/dist/cjs/index.esm-c1e16606.js +13 -0
  153. package/dist/cjs/index.esm-d51c9ac6.js +25 -0
  154. package/dist/cjs/index.esm-d81454e7.js +19 -0
  155. package/dist/cjs/index.js +635 -0
  156. package/dist/cjs/inherits-de66ea16.js +188 -0
  157. package/dist/cjs/isSymbol-03abbdf0.js +209 -0
  158. package/dist/cjs/js.cookie-a511c430.js +160 -0
  159. package/dist/cjs/keys-e982b3fa.js +25 -0
  160. package/dist/cjs/lodash-f0783643.js +17195 -0
  161. package/dist/cjs/main-f1c77adb.js +973 -0
  162. package/dist/cjs/moment-aca40de1.js +5669 -0
  163. package/dist/cjs/react-social-icons-af932527.js +616 -0
  164. package/dist/cjs/slicedToArray-067dd3bc.js +95 -0
  165. package/dist/cjs/smoothscroll-99df7f93.js +438 -0
  166. package/dist/cjs/stringify-f7a37a8d.js +17 -0
  167. package/dist/cjs/style-inject.es-dcee06b6.js +30 -0
  168. package/dist/cjs/timeDifferenceCalc.js +39 -0
  169. package/dist/cjs/toConsumableArray-d7797c2b.js +74 -0
  170. package/dist/cjs/toNumber-5e1fac58.js +104 -0
  171. package/dist/cjs/typeof-567e31ff.js +382 -0
  172. package/dist/cjs/urlFor.js +65 -0
  173. package/dist/cjs/urlForFile-29d3815a.js +24 -0
  174. package/dist/cjs/ustream-api-3819e4aa.js +106 -0
  175. package/dist/cjs/visibility-sensor-eb2c5b69.js +597 -0
  176. package/dist/cjs/web.dom.iterable-d98303e0.js +50 -0
  177. package/dist/esm/AD.js +26 -0
  178. package/dist/esm/AD300x250.js +89 -0
  179. package/dist/esm/AD300x250x600.js +106 -0
  180. package/dist/esm/AD728x90.js +103 -0
  181. package/dist/esm/ADFloatingFooter.js +137 -0
  182. package/dist/esm/ADFooter.js +47 -0
  183. package/dist/esm/ADGutter.js +109 -0
  184. package/dist/esm/ADInfeed-f684cac9.js +59 -0
  185. package/dist/esm/ADSkyscraper.js +111 -0
  186. package/dist/esm/ADSponsoredResources.js +108 -0
  187. package/dist/esm/ADWebcast.js +113 -0
  188. package/dist/esm/ADWelcome.js +160 -0
  189. package/dist/esm/ADlgInfeed-8c438cee.js +54 -0
  190. package/dist/esm/AccordionPanel.js +87 -0
  191. package/dist/esm/AdSlot.js +244 -0
  192. package/dist/esm/AdSlotsProvider.js +176 -0
  193. package/dist/esm/AlgoliaSearch.js +188 -0
  194. package/dist/esm/AlphabeticList.js +129 -0
  195. package/dist/esm/ArticleCarousel.js +40 -0
  196. package/dist/esm/ArticleProgramLandingPage.js +178 -0
  197. package/dist/esm/ArticleSeriesLandingPage.js +156 -0
  198. package/dist/esm/ArticleSeriesListing.js +308 -0
  199. package/dist/esm/AuthWrapper.js +714 -0
  200. package/dist/esm/AuthorComponent-defe68b6.js +90 -0
  201. package/dist/esm/Beam.js +348 -0
  202. package/dist/esm/BlockContent-c99c9a8d.js +909 -0
  203. package/dist/esm/Breadcrumbs.js +100 -0
  204. package/dist/esm/CMEDeck.js +437 -0
  205. package/dist/esm/Column1.js +29 -0
  206. package/dist/esm/Column2.js +65 -0
  207. package/dist/esm/Column3.js +134 -0
  208. package/dist/esm/ConferenceArticleCard.js +87 -0
  209. package/dist/esm/ConferenceBanner-8792ebd2.js +18 -0
  210. package/dist/esm/ContentCardPaginated.js +406 -0
  211. package/dist/esm/DeckContent.js +497 -0
  212. package/dist/esm/DeckQueue.js +393 -0
  213. package/dist/esm/DeckQueuePaginated.js +337 -0
  214. package/dist/esm/Dfp-4b99f79d.js +96 -0
  215. package/dist/esm/EventsDeck.js +844 -0
  216. package/dist/esm/ExternalResources.js +210 -0
  217. package/dist/esm/Feature.js +122 -0
  218. package/dist/esm/ForbesHero.js +131 -0
  219. package/dist/esm/GridContent.js +818 -0
  220. package/dist/esm/GridContentPaginated.js +693 -0
  221. package/dist/esm/GridHero.js +141 -0
  222. package/dist/esm/GroupDeck.js +308 -0
  223. package/dist/esm/HamMagazine.js +590 -0
  224. package/dist/esm/Header.js +30 -0
  225. package/dist/esm/HealthCareProfessionalModal.js +70 -0
  226. package/dist/esm/Hero.js +42 -0
  227. package/dist/esm/HighlightenVideo.js +63 -0
  228. package/dist/esm/HorizontalArticleListing.js +159 -0
  229. package/dist/esm/HorizontalHero.js +105 -0
  230. package/dist/esm/ImageSlider-eab2fe41.js +176 -0
  231. package/dist/esm/IssueContentDeck.js +231 -0
  232. package/dist/esm/IssueDeck.js +258 -0
  233. package/dist/esm/IssueLanding.js +166 -0
  234. package/dist/esm/KMTracker.js +25 -0
  235. package/dist/esm/LeftNav.js +136 -0
  236. package/dist/esm/MasterDeck.js +548 -0
  237. package/dist/esm/MasterDeckPaginated.js +461 -0
  238. package/dist/esm/MediaSeriesCard-99048e65.js +9492 -0
  239. package/dist/esm/MediaSeriesLanding.js +496 -0
  240. package/dist/esm/MediaSeriesLandingPaginated.js +522 -0
  241. package/dist/esm/NavDvm.js +233 -0
  242. package/dist/esm/NavFooter-e27bd93b.js +60 -0
  243. package/dist/esm/NavMagazine.js +583 -0
  244. package/dist/esm/NavNative.js +846 -0
  245. package/dist/esm/OncliveHero.js +73 -0
  246. package/dist/esm/OncliveLargeHero.js +235 -0
  247. package/dist/esm/PageFilter.js +66 -0
  248. package/dist/esm/Pagination-cd21f8c2.js +82 -0
  249. package/dist/esm/PartnerDetailListing.js +320 -0
  250. package/dist/esm/PartnerDetailListingPaginated.js +312 -0
  251. package/dist/esm/PdfDownload.js +22 -0
  252. package/dist/esm/PixelTracking.js +156 -0
  253. package/dist/esm/PopUpModal.js +51 -0
  254. package/dist/esm/PtceDeck.js +143 -0
  255. package/dist/esm/PubSection.js +114 -0
  256. package/dist/esm/PubToc.js +81 -0
  257. package/dist/esm/PublicationDeck.js +173 -0
  258. package/dist/esm/PublicationFeature-03500094.js +121 -0
  259. package/dist/esm/PublicationLanding.js +843 -0
  260. package/dist/esm/QueueDeckExpanded.js +1534 -0
  261. package/dist/esm/QueueDeckExpandedPaginated.js +1382 -0
  262. package/dist/esm/RecentNews.js +85 -0
  263. package/dist/esm/RelatedContent.js +108 -0
  264. package/dist/esm/RelatedTopicsDropdown.js +82 -0
  265. package/dist/esm/RolesDeck.js +84 -0
  266. package/dist/esm/Schema.js +95 -0
  267. package/dist/esm/Search.js +57 -0
  268. package/dist/esm/Segment.js +401 -0
  269. package/dist/esm/SeriesListingDeck.js +242 -0
  270. package/dist/esm/SeriesSlider-609f9d94.js +326 -0
  271. package/dist/esm/SetCookie.js +8 -0
  272. package/dist/esm/SideFooter.js +145 -0
  273. package/dist/esm/SocialIcons.js +97 -0
  274. package/dist/esm/SocialSearchComponent-1d8a9f59.js +204 -0
  275. package/dist/esm/SocialShare.js +67 -0
  276. package/dist/esm/TaxonomyCard.js +243 -0
  277. package/dist/esm/TaxonomyDescription.js +198 -0
  278. package/dist/esm/TemplateNormal.js +197 -0
  279. package/dist/esm/ThumbnailCard.js +52 -0
  280. package/dist/esm/Ustream.js +150 -0
  281. package/dist/esm/VerticalHero.js +68 -0
  282. package/dist/esm/VideoProgramLandingPage.js +251 -0
  283. package/dist/esm/VideoSeriesCard.js +82 -0
  284. package/dist/esm/VideoSeriesFilter.js +122 -0
  285. package/dist/esm/VideoSeriesLandingPage.js +172 -0
  286. package/dist/esm/VideoSeriesListing.js +415 -0
  287. package/dist/esm/View.js +2590 -0
  288. package/dist/esm/YahooHero.js +120 -0
  289. package/dist/esm/YoutubeGroup.js +365 -0
  290. package/dist/esm/_commonjsHelpers-0c4b6f40.js +19 -0
  291. package/dist/esm/_is-array-893ab020.js +71 -0
  292. package/dist/esm/_iter-detect-f089461c.js +48 -0
  293. package/dist/esm/_library-528f1934.js +3 -0
  294. package/dist/esm/_object-pie-133f504a.js +13 -0
  295. package/dist/esm/_object-sap-169d6272.js +14 -0
  296. package/dist/esm/_object-to-array-50a6b9a3.js +23 -0
  297. package/dist/esm/asyncToGenerator-9716ae8d.js +1387 -0
  298. package/dist/esm/brightcove-react-player-loader.es-57a70a56.js +2226 -0
  299. package/dist/esm/core.get-iterator-method-e903ff31.js +547 -0
  300. package/dist/esm/debounce-533d9748.js +214 -0
  301. package/dist/esm/define-property-99e66838.js +18 -0
  302. package/dist/esm/defineProperty-8fa0bc8d.js +32 -0
  303. package/dist/esm/entities-932b50cf.js +503 -0
  304. package/dist/esm/eq-bdcbf886.js +76 -0
  305. package/dist/esm/extends-dc6a71fd.js +83 -0
  306. package/dist/esm/faundadb.js +636 -0
  307. package/dist/esm/get-3c308da4.js +918 -0
  308. package/dist/esm/getContentCategory-15dcc413.js +9 -0
  309. package/dist/esm/getKeywords.js +44 -0
  310. package/dist/esm/getPtceActivities.js +87 -0
  311. package/dist/esm/getQuery.js +26 -0
  312. package/dist/esm/getRelatedArticle.js +745 -0
  313. package/dist/esm/getRootDocGroup.js +60 -0
  314. package/dist/esm/getSerializers.js +58 -0
  315. package/dist/esm/getSeriesDetail.js +38 -0
  316. package/dist/esm/getTargeting-db566006.js +161 -0
  317. package/dist/esm/getTargeting.js +7 -0
  318. package/dist/esm/iconBase-ccc56b97.js +81 -0
  319. package/dist/esm/index-0dbff1d1.js +553 -0
  320. package/dist/esm/index-5cc7b406.js +1674 -0
  321. package/dist/esm/index-755f2cc2.js +605 -0
  322. package/dist/esm/index-79cfd25c.js +1569 -0
  323. package/dist/esm/index-c60f3bb6.js +11284 -0
  324. package/dist/esm/index-c7e2ac95.js +52 -0
  325. package/dist/esm/index.es-a6137319.js +439 -0
  326. package/dist/esm/index.esm-1bd8a0a8.js +18 -0
  327. package/dist/esm/index.esm-37268dca.js +89 -0
  328. package/dist/esm/index.esm-9b042655.js +10 -0
  329. package/dist/esm/index.esm-eb1e8e80.js +14 -0
  330. package/dist/esm/index.js +529 -0
  331. package/dist/esm/inherits-8a801a18.js +179 -0
  332. package/dist/esm/isSymbol-a7e9aafe.js +203 -0
  333. package/dist/esm/js.cookie-6874175c.js +158 -0
  334. package/dist/esm/keys-425c8ab0.js +23 -0
  335. package/dist/esm/lodash-f97fd99a.js +17193 -0
  336. package/dist/esm/main-1894c974.js +961 -0
  337. package/dist/esm/moment-bc12cb97.js +5667 -0
  338. package/dist/esm/react-social-icons-9be47857.js +609 -0
  339. package/dist/esm/slicedToArray-ca2c8b8d.js +92 -0
  340. package/dist/esm/smoothscroll-fa4e3f8c.js +436 -0
  341. package/dist/esm/stringify-c21932b3.js +15 -0
  342. package/dist/esm/style-inject.es-1f59c1d0.js +28 -0
  343. package/dist/esm/timeDifferenceCalc.js +37 -0
  344. package/dist/esm/toConsumableArray-7b1c0e23.js +71 -0
  345. package/dist/esm/toNumber-5aeba6e7.js +102 -0
  346. package/dist/esm/typeof-83d9eb10.js +378 -0
  347. package/dist/esm/urlFor.js +63 -0
  348. package/dist/esm/urlForFile-413f5ddb.js +22 -0
  349. package/dist/esm/ustream-api-41166338.js +104 -0
  350. package/dist/esm/visibility-sensor-72fd8f8b.js +590 -0
  351. package/dist/esm/web.dom.iterable-fdf034f5.js +48 -0
  352. package/package.json +115 -83
  353. package/dist/index.es.js +0 -12784
  354. package/dist/index.es.js.map +0 -1
  355. package/dist/index.js +0 -12819
  356. package/dist/index.js.map +0 -1
@@ -0,0 +1,745 @@
1
+ import { _ as _asyncToGenerator, r as regenerator } from './asyncToGenerator-9716ae8d.js';
2
+ import { c as createCommonjsModule, u as unwrapExports, a as commonjsGlobal } from './_commonjsHelpers-0c4b6f40.js';
3
+ import getQuery from './getQuery.js';
4
+ import './core.get-iterator-method-e903ff31.js';
5
+ import './web.dom.iterable-fdf034f5.js';
6
+ import './_library-528f1934.js';
7
+ import './_iter-detect-f089461c.js';
8
+
9
+ /*!
10
+ * cookie
11
+ * Copyright(c) 2012-2014 Roman Shtylman
12
+ * Copyright(c) 2015 Douglas Christopher Wilson
13
+ * MIT Licensed
14
+ */
15
+
16
+ /**
17
+ * Module exports.
18
+ * @public
19
+ */
20
+
21
+ var parse_1$1 = parse$1;
22
+ var serialize_1 = serialize;
23
+
24
+ /**
25
+ * Module variables.
26
+ * @private
27
+ */
28
+
29
+ var decode = decodeURIComponent;
30
+ var encode = encodeURIComponent;
31
+ var pairSplitRegExp = /; */;
32
+
33
+ /**
34
+ * RegExp to match field-content in RFC 7230 sec 3.2
35
+ *
36
+ * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
37
+ * field-vchar = VCHAR / obs-text
38
+ * obs-text = %x80-FF
39
+ */
40
+
41
+ var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
42
+
43
+ /**
44
+ * Parse a cookie header.
45
+ *
46
+ * Parse the given cookie header string into an object
47
+ * The object has the various cookies as keys(names) => values
48
+ *
49
+ * @param {string} str
50
+ * @param {object} [options]
51
+ * @return {object}
52
+ * @public
53
+ */
54
+
55
+ function parse$1(str, options) {
56
+ if (typeof str !== 'string') {
57
+ throw new TypeError('argument str must be a string');
58
+ }
59
+
60
+ var obj = {};
61
+ var opt = options || {};
62
+ var pairs = str.split(pairSplitRegExp);
63
+ var dec = opt.decode || decode;
64
+
65
+ for (var i = 0; i < pairs.length; i++) {
66
+ var pair = pairs[i];
67
+ var eq_idx = pair.indexOf('=');
68
+
69
+ // skip things that don't look like key=value
70
+ if (eq_idx < 0) {
71
+ continue;
72
+ }
73
+
74
+ var key = pair.substr(0, eq_idx).trim();
75
+ var val = pair.substr(++eq_idx, pair.length).trim();
76
+
77
+ // quoted values
78
+ if ('"' == val[0]) {
79
+ val = val.slice(1, -1);
80
+ }
81
+
82
+ // only assign once
83
+ if (undefined == obj[key]) {
84
+ obj[key] = tryDecode(val, dec);
85
+ }
86
+ }
87
+
88
+ return obj;
89
+ }
90
+
91
+ /**
92
+ * Serialize data into a cookie header.
93
+ *
94
+ * Serialize the a name value pair into a cookie string suitable for
95
+ * http headers. An optional options object specified cookie parameters.
96
+ *
97
+ * serialize('foo', 'bar', { httpOnly: true })
98
+ * => "foo=bar; httpOnly"
99
+ *
100
+ * @param {string} name
101
+ * @param {string} val
102
+ * @param {object} [options]
103
+ * @return {string}
104
+ * @public
105
+ */
106
+
107
+ function serialize(name, val, options) {
108
+ var opt = options || {};
109
+ var enc = opt.encode || encode;
110
+
111
+ if (typeof enc !== 'function') {
112
+ throw new TypeError('option encode is invalid');
113
+ }
114
+
115
+ if (!fieldContentRegExp.test(name)) {
116
+ throw new TypeError('argument name is invalid');
117
+ }
118
+
119
+ var value = enc(val);
120
+
121
+ if (value && !fieldContentRegExp.test(value)) {
122
+ throw new TypeError('argument val is invalid');
123
+ }
124
+
125
+ var str = name + '=' + value;
126
+
127
+ if (null != opt.maxAge) {
128
+ var maxAge = opt.maxAge - 0;
129
+
130
+ if (isNaN(maxAge) || !isFinite(maxAge)) {
131
+ throw new TypeError('option maxAge is invalid')
132
+ }
133
+
134
+ str += '; Max-Age=' + Math.floor(maxAge);
135
+ }
136
+
137
+ if (opt.domain) {
138
+ if (!fieldContentRegExp.test(opt.domain)) {
139
+ throw new TypeError('option domain is invalid');
140
+ }
141
+
142
+ str += '; Domain=' + opt.domain;
143
+ }
144
+
145
+ if (opt.path) {
146
+ if (!fieldContentRegExp.test(opt.path)) {
147
+ throw new TypeError('option path is invalid');
148
+ }
149
+
150
+ str += '; Path=' + opt.path;
151
+ }
152
+
153
+ if (opt.expires) {
154
+ if (typeof opt.expires.toUTCString !== 'function') {
155
+ throw new TypeError('option expires is invalid');
156
+ }
157
+
158
+ str += '; Expires=' + opt.expires.toUTCString();
159
+ }
160
+
161
+ if (opt.httpOnly) {
162
+ str += '; HttpOnly';
163
+ }
164
+
165
+ if (opt.secure) {
166
+ str += '; Secure';
167
+ }
168
+
169
+ if (opt.sameSite) {
170
+ var sameSite = typeof opt.sameSite === 'string'
171
+ ? opt.sameSite.toLowerCase() : opt.sameSite;
172
+
173
+ switch (sameSite) {
174
+ case true:
175
+ str += '; SameSite=Strict';
176
+ break;
177
+ case 'lax':
178
+ str += '; SameSite=Lax';
179
+ break;
180
+ case 'strict':
181
+ str += '; SameSite=Strict';
182
+ break;
183
+ case 'none':
184
+ str += '; SameSite=None';
185
+ break;
186
+ default:
187
+ throw new TypeError('option sameSite is invalid');
188
+ }
189
+ }
190
+
191
+ return str;
192
+ }
193
+
194
+ /**
195
+ * Try decoding a string using a decoding function.
196
+ *
197
+ * @param {string} str
198
+ * @param {function} decode
199
+ * @private
200
+ */
201
+
202
+ function tryDecode(str, decode) {
203
+ try {
204
+ return decode(str);
205
+ } catch (e) {
206
+ return str;
207
+ }
208
+ }
209
+
210
+ var cookie = {
211
+ parse: parse_1$1,
212
+ serialize: serialize_1
213
+ };
214
+
215
+ var defaultParseOptions = {
216
+ decodeValues: true,
217
+ map: false,
218
+ silent: false,
219
+ };
220
+
221
+ function isNonEmptyString(str) {
222
+ return typeof str === "string" && !!str.trim();
223
+ }
224
+
225
+ function parseString(setCookieValue, options) {
226
+ var parts = setCookieValue.split(";").filter(isNonEmptyString);
227
+ var nameValue = parts.shift().split("=");
228
+ var name = nameValue.shift();
229
+ var value = nameValue.join("="); // everything after the first =, joined by a "=" if there was more than one part
230
+
231
+ options = options
232
+ ? Object.assign({}, defaultParseOptions, options)
233
+ : defaultParseOptions;
234
+
235
+ try {
236
+ value = options.decodeValues ? decodeURIComponent(value) : value; // decode cookie value
237
+ } catch (e) {
238
+ console.error(
239
+ "set-cookie-parser encountered an error while decoding a cookie with value '" +
240
+ value +
241
+ "'. Set options.decodeValues to false to disable this feature.",
242
+ e
243
+ );
244
+ }
245
+
246
+ var cookie = {
247
+ name: name, // grab everything before the first =
248
+ value: value,
249
+ };
250
+
251
+ parts.forEach(function (part) {
252
+ var sides = part.split("=");
253
+ var key = sides.shift().trimLeft().toLowerCase();
254
+ var value = sides.join("=");
255
+ if (key === "expires") {
256
+ cookie.expires = new Date(value);
257
+ } else if (key === "max-age") {
258
+ cookie.maxAge = parseInt(value, 10);
259
+ } else if (key === "secure") {
260
+ cookie.secure = true;
261
+ } else if (key === "httponly") {
262
+ cookie.httpOnly = true;
263
+ } else if (key === "samesite") {
264
+ cookie.sameSite = value;
265
+ } else {
266
+ cookie[key] = value;
267
+ }
268
+ });
269
+
270
+ return cookie;
271
+ }
272
+
273
+ function parse(input, options) {
274
+ options = options
275
+ ? Object.assign({}, defaultParseOptions, options)
276
+ : defaultParseOptions;
277
+
278
+ if (!input) {
279
+ if (!options.map) {
280
+ return [];
281
+ } else {
282
+ return {};
283
+ }
284
+ }
285
+
286
+ if (input.headers && input.headers["set-cookie"]) {
287
+ // fast-path for node.js (which automatically normalizes header names to lower-case
288
+ input = input.headers["set-cookie"];
289
+ } else if (input.headers) {
290
+ // slow-path for other environments - see #25
291
+ var sch =
292
+ input.headers[
293
+ Object.keys(input.headers).find(function (key) {
294
+ return key.toLowerCase() === "set-cookie";
295
+ })
296
+ ];
297
+ // warn if called on a request-like object with a cookie header rather than a set-cookie header - see #34, 36
298
+ if (!sch && input.headers.cookie && !options.silent) {
299
+ console.warn(
300
+ "Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."
301
+ );
302
+ }
303
+ input = sch;
304
+ }
305
+ if (!Array.isArray(input)) {
306
+ input = [input];
307
+ }
308
+
309
+ options = options
310
+ ? Object.assign({}, defaultParseOptions, options)
311
+ : defaultParseOptions;
312
+
313
+ if (!options.map) {
314
+ return input.filter(isNonEmptyString).map(function (str) {
315
+ return parseString(str, options);
316
+ });
317
+ } else {
318
+ var cookies = {};
319
+ return input.filter(isNonEmptyString).reduce(function (cookies, str) {
320
+ var cookie = parseString(str, options);
321
+ cookies[cookie.name] = cookie;
322
+ return cookies;
323
+ }, cookies);
324
+ }
325
+ }
326
+
327
+ /*
328
+ Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas
329
+ that are within a single set-cookie field-value, such as in the Expires portion.
330
+
331
+ This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2
332
+ Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128
333
+ React Native's fetch does this for *every* header, including set-cookie.
334
+
335
+ Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25
336
+ Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation
337
+ */
338
+ function splitCookiesString(cookiesString) {
339
+ if (Array.isArray(cookiesString)) {
340
+ return cookiesString;
341
+ }
342
+ if (typeof cookiesString !== "string") {
343
+ return [];
344
+ }
345
+
346
+ var cookiesStrings = [];
347
+ var pos = 0;
348
+ var start;
349
+ var ch;
350
+ var lastComma;
351
+ var nextStart;
352
+ var cookiesSeparatorFound;
353
+
354
+ function skipWhitespace() {
355
+ while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) {
356
+ pos += 1;
357
+ }
358
+ return pos < cookiesString.length;
359
+ }
360
+
361
+ function notSpecialChar() {
362
+ ch = cookiesString.charAt(pos);
363
+
364
+ return ch !== "=" && ch !== ";" && ch !== ",";
365
+ }
366
+
367
+ while (pos < cookiesString.length) {
368
+ start = pos;
369
+ cookiesSeparatorFound = false;
370
+
371
+ while (skipWhitespace()) {
372
+ ch = cookiesString.charAt(pos);
373
+ if (ch === ",") {
374
+ // ',' is a cookie separator if we have later first '=', not ';' or ','
375
+ lastComma = pos;
376
+ pos += 1;
377
+
378
+ skipWhitespace();
379
+ nextStart = pos;
380
+
381
+ while (pos < cookiesString.length && notSpecialChar()) {
382
+ pos += 1;
383
+ }
384
+
385
+ // currently special character
386
+ if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") {
387
+ // we found cookies separator
388
+ cookiesSeparatorFound = true;
389
+ // pos is inside the next cookie, so back up and return it.
390
+ pos = nextStart;
391
+ cookiesStrings.push(cookiesString.substring(start, lastComma));
392
+ start = pos;
393
+ } else {
394
+ // in param ',' or param separator ';',
395
+ // we continue from that comma
396
+ pos = lastComma + 1;
397
+ }
398
+ } else {
399
+ pos += 1;
400
+ }
401
+ }
402
+
403
+ if (!cookiesSeparatorFound || pos >= cookiesString.length) {
404
+ cookiesStrings.push(cookiesString.substring(start, cookiesString.length));
405
+ }
406
+ }
407
+
408
+ return cookiesStrings;
409
+ }
410
+
411
+ var setCookie = parse;
412
+ var parse_1 = parse;
413
+ var parseString_1 = parseString;
414
+ var splitCookiesString_1 = splitCookiesString;
415
+ setCookie.parse = parse_1;
416
+ setCookie.parseString = parseString_1;
417
+ setCookie.splitCookiesString = splitCookiesString_1;
418
+
419
+ var utils = createCommonjsModule(function (module, exports) {
420
+ var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
421
+ __assign = Object.assign || function(t) {
422
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
423
+ s = arguments[i];
424
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
425
+ t[p] = s[p];
426
+ }
427
+ return t;
428
+ };
429
+ return __assign.apply(this, arguments);
430
+ };
431
+ Object.defineProperty(exports, "__esModule", { value: true });
432
+ exports.areCookiesEqual = exports.hasSameProperties = exports.createCookie = exports.isBrowser = void 0;
433
+ /**
434
+ * Tells whether we are in a browser or server.
435
+ */
436
+ function isBrowser() {
437
+ return typeof window !== 'undefined';
438
+ }
439
+ exports.isBrowser = isBrowser;
440
+ /**
441
+ * Create an instance of the Cookie interface
442
+ */
443
+ function createCookie(name, value, options) {
444
+ var sameSite = options.sameSite;
445
+ if (sameSite === true) {
446
+ sameSite = 'strict';
447
+ }
448
+ if (sameSite === undefined || sameSite === false) {
449
+ sameSite = 'lax';
450
+ }
451
+ var cookieToSet = __assign(__assign({}, options), { sameSite: sameSite });
452
+ delete cookieToSet.encode;
453
+ return __assign({ name: name, value: value }, cookieToSet);
454
+ }
455
+ exports.createCookie = createCookie;
456
+ /**
457
+ * Tells whether given objects have the same properties.
458
+ */
459
+ function hasSameProperties(a, b) {
460
+ var aProps = Object.getOwnPropertyNames(a);
461
+ var bProps = Object.getOwnPropertyNames(b);
462
+ if (aProps.length !== bProps.length) {
463
+ return false;
464
+ }
465
+ for (var i = 0; i < aProps.length; i++) {
466
+ var propName = aProps[i];
467
+ if (a[propName] !== b[propName]) {
468
+ return false;
469
+ }
470
+ }
471
+ return true;
472
+ }
473
+ exports.hasSameProperties = hasSameProperties;
474
+ /**
475
+ * Compare the cookie and return true if the cookies have equivalent
476
+ * options and the cookies would be overwritten in the browser storage.
477
+ *
478
+ * @param a first Cookie for comparison
479
+ * @param b second Cookie for comparison
480
+ */
481
+ function areCookiesEqual(a, b) {
482
+ var sameSiteSame = a.sameSite === b.sameSite;
483
+ if (typeof a.sameSite === 'string' && typeof b.sameSite === 'string') {
484
+ sameSiteSame = a.sameSite.toLowerCase() === b.sameSite.toLowerCase();
485
+ }
486
+ return (hasSameProperties(__assign(__assign({}, a), { sameSite: undefined }), __assign(__assign({}, b), { sameSite: undefined })) && sameSiteSame);
487
+ }
488
+ exports.areCookiesEqual = areCookiesEqual;
489
+ /* Functions */
490
+ //# sourceMappingURL=utils.js.map
491
+ });
492
+
493
+ unwrapExports(utils);
494
+ utils.areCookiesEqual;
495
+ utils.hasSameProperties;
496
+ utils.createCookie;
497
+ utils.isBrowser;
498
+
499
+ var dist = createCommonjsModule(function (module, exports) {
500
+ var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
501
+ __assign = Object.assign || function(t) {
502
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
503
+ s = arguments[i];
504
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
505
+ t[p] = s[p];
506
+ }
507
+ return t;
508
+ };
509
+ return __assign.apply(this, arguments);
510
+ };
511
+ Object.defineProperty(exports, "__esModule", { value: true });
512
+ exports.destroyCookie = exports.setCookie = exports.parseCookies = void 0;
513
+
514
+
515
+
516
+ /**
517
+ * Parses cookies.
518
+ *
519
+ * @param ctx NextJS page or API context, express context, null or undefined.
520
+ * @param options Options that we pass down to `cookie` library.
521
+ */
522
+ function parseCookies(ctx, options) {
523
+ var _a, _b;
524
+ if ((_b = (_a = ctx === null || ctx === void 0 ? void 0 : ctx.req) === null || _a === void 0 ? void 0 : _a.headers) === null || _b === void 0 ? void 0 : _b.cookie) {
525
+ return cookie.parse(ctx.req.headers.cookie, options);
526
+ }
527
+ if (utils.isBrowser()) {
528
+ return cookie.parse(document.cookie, options);
529
+ }
530
+ return {};
531
+ }
532
+ exports.parseCookies = parseCookies;
533
+ /**
534
+ * Sets a cookie.
535
+ *
536
+ * @param ctx NextJS page or API context, express context, null or undefined.
537
+ * @param name The name of your cookie.
538
+ * @param value The value of your cookie.
539
+ * @param options Options that we pass down to `cookie` library.
540
+ */
541
+ function setCookie$1(ctx, name, value, options) {
542
+ var _a, _b;
543
+ if (options === void 0) { options = {}; }
544
+ // SSR
545
+ if (((_a = ctx === null || ctx === void 0 ? void 0 : ctx.res) === null || _a === void 0 ? void 0 : _a.getHeader) && ctx.res.setHeader) {
546
+ // Check if response has finished and warn about it.
547
+ if ((_b = ctx === null || ctx === void 0 ? void 0 : ctx.res) === null || _b === void 0 ? void 0 : _b.finished) {
548
+ console.warn("Not setting \"" + name + "\" cookie. Response has finished.");
549
+ console.warn("You should set cookie before res.send()");
550
+ return {};
551
+ }
552
+ /**
553
+ * Load existing cookies from the header and parse them.
554
+ */
555
+ var cookies = ctx.res.getHeader('Set-Cookie') || [];
556
+ if (typeof cookies === 'string')
557
+ cookies = [cookies];
558
+ if (typeof cookies === 'number')
559
+ cookies = [];
560
+ /**
561
+ * Parse cookies but ignore values - we've already encoded
562
+ * them in the previous call.
563
+ */
564
+ var parsedCookies = setCookie.parse(cookies, {
565
+ decodeValues: false,
566
+ });
567
+ /**
568
+ * We create the new cookie and make sure that none of
569
+ * the existing cookies match it.
570
+ */
571
+ var newCookie_1 = utils.createCookie(name, value, options);
572
+ var cookiesToSet_1 = [];
573
+ parsedCookies.forEach(function (parsedCookie) {
574
+ if (!utils.areCookiesEqual(parsedCookie, newCookie_1)) {
575
+ /**
576
+ * We serialize the cookie back to the original format
577
+ * if it isn't the same as the new one.
578
+ */
579
+ var serializedCookie = cookie.serialize(parsedCookie.name, parsedCookie.value, __assign({
580
+ // we prevent reencoding by default, but you might override it
581
+ encode: function (val) { return val; } }, parsedCookie));
582
+ cookiesToSet_1.push(serializedCookie);
583
+ }
584
+ });
585
+ cookiesToSet_1.push(cookie.serialize(name, value, options));
586
+ // Update the header.
587
+ ctx.res.setHeader('Set-Cookie', cookiesToSet_1);
588
+ }
589
+ // Browser
590
+ if (utils.isBrowser()) {
591
+ if (options && options.httpOnly) {
592
+ throw new Error('Can not set a httpOnly cookie in the browser.');
593
+ }
594
+ document.cookie = cookie.serialize(name, value, options);
595
+ }
596
+ return {};
597
+ }
598
+ exports.setCookie = setCookie$1;
599
+ /**
600
+ * Destroys a cookie with a particular name.
601
+ *
602
+ * @param ctx NextJS page or API context, express context, null or undefined.
603
+ * @param name Cookie name.
604
+ * @param options Options that we pass down to `cookie` library.
605
+ */
606
+ function destroyCookie(ctx, name, options) {
607
+ /**
608
+ * We forward the request destroy to setCookie function
609
+ * as it is the same function with modified maxAge value.
610
+ */
611
+ return setCookie$1(ctx, name, '', __assign(__assign({}, (options || {})), { maxAge: -1 }));
612
+ }
613
+ exports.destroyCookie = destroyCookie;
614
+ /* Utility Exports */
615
+ exports.default = {
616
+ set: setCookie$1,
617
+ get: parseCookies,
618
+ destroy: destroyCookie,
619
+ };
620
+ //# sourceMappingURL=index.js.map
621
+ });
622
+
623
+ unwrapExports(dist);
624
+ dist.destroyCookie;
625
+ var dist_2 = dist.setCookie;
626
+ var dist_3 = dist.parseCookies;
627
+
628
+ var _this = undefined;
629
+
630
+ var getRelatedArticle = function () {
631
+ var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee() {
632
+ var ctx = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
633
+ var client = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
634
+ var article = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
635
+ var prevUrl = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '/';
636
+ var articleCount = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
637
+
638
+ var _article$url, url, documentGroupMapping, issueGroup, content_placement, references, params, articles, filters, cookies, prevSlugs, query;
639
+
640
+ return regenerator.wrap(function _callee$(_context) {
641
+ while (1) {
642
+ switch (_context.prev = _context.next) {
643
+ case 0:
644
+ _article$url = article.url;
645
+ _article$url = _article$url === undefined ? {
646
+ current: null
647
+ } : _article$url;
648
+ url = _article$url.current, documentGroupMapping = article.documentGroupMapping, issueGroup = article.issueGroup;
649
+ content_placement = article.content_placement;
650
+ references = [];
651
+
652
+
653
+ content_placement = content_placement && content_placement.length > 0 && content_placement.filter(function (_ref2) {
654
+ var identifier = _ref2.identifier;
655
+ return identifier !== 'news';
656
+ });
657
+ if (content_placement && content_placement.length > 0) {
658
+ content_placement.forEach(function (_ref3) {
659
+ var path = _ref3.path,
660
+ _id = _ref3._id;
661
+
662
+ if (!_id || typeof _id == 'undefined') {
663
+ return null;
664
+ }
665
+ var prev_url_to_check = prevUrl;
666
+ if (prev_url_to_check.includes('?')) {
667
+ prev_url_to_check = prev_url_to_check.split('?')[0];
668
+ }
669
+ if (prev_url_to_check.endsWith(path) && _id) references.push(_id);
670
+ });
671
+ if (references.length === 0) {
672
+ content_placement.forEach(function (_ref4) {
673
+ var _id = _ref4._id;
674
+
675
+ if (_id) references.push(_id);
676
+ });
677
+ }
678
+ }
679
+
680
+ if (documentGroupMapping && documentGroupMapping.length > 0) {
681
+ documentGroupMapping.forEach(function (_ref5) {
682
+ var _id = _ref5._id;
683
+
684
+ if (_id) references.push(_id);
685
+ });
686
+ }
687
+
688
+ if (issueGroup && issueGroup._id) {
689
+ references.push(issueGroup._id);
690
+ }
691
+
692
+ params = { url: url, index: articleCount };
693
+ articles = null;
694
+
695
+ if (!(references && references.length > 0)) {
696
+ _context.next = 24;
697
+ break;
698
+ }
699
+
700
+ filters = '&& references("' + references.join('","') + '") ';
701
+
702
+
703
+ if (ctx && url) {
704
+ cookies = dist_3(ctx);
705
+ prevSlugs = cookies['prevSlugs'];
706
+
707
+ if (!!prevSlugs) {
708
+ if (!prevSlugs.includes(url)) dist_2(ctx, 'prevSlugs', prevSlugs + ',"' + url + '"', {});
709
+ filters = filters + ' && !(url.current in [' + prevSlugs + '])';
710
+ } else dist_2(ctx, 'prevSlugs', '"' + url + '"', {});
711
+ }
712
+
713
+ query = getQuery('related', filters, '', articleCount).replace('&& taxonomyMapping[]._ref in $taxonomy', '');
714
+ _context.prev = 15;
715
+ _context.next = 18;
716
+ return client.fetch(query, params);
717
+
718
+ case 18:
719
+ articles = _context.sent;
720
+ _context.next = 24;
721
+ break;
722
+
723
+ case 21:
724
+ _context.prev = 21;
725
+ _context.t0 = _context['catch'](15);
726
+
727
+ console.error(_context.t0);
728
+
729
+ case 24:
730
+ return _context.abrupt('return', articles);
731
+
732
+ case 25:
733
+ case 'end':
734
+ return _context.stop();
735
+ }
736
+ }
737
+ }, _callee, _this, [[15, 21]]);
738
+ }));
739
+
740
+ return function getRelatedArticle() {
741
+ return _ref.apply(this, arguments);
742
+ };
743
+ }();
744
+
745
+ export default getRelatedArticle;