@mjhls/mjh-framework 1.0.691-beta.9 → 1.0.692

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 (154) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/AD.js +1 -1
  3. package/dist/cjs/AD300x250.js +3 -3
  4. package/dist/cjs/AD300x250x600.js +3 -3
  5. package/dist/cjs/AD728x90.js +4 -4
  6. package/dist/cjs/ADFloatingFooter.js +2 -2
  7. package/dist/cjs/ADGutter.js +5 -8
  8. package/dist/cjs/{ADInfeed-59543270.js → ADInfeed-3410ab3c.js} +3 -6
  9. package/dist/cjs/ADSkyscraper.js +5 -8
  10. package/dist/cjs/ADSponsoredResources.js +5 -8
  11. package/dist/cjs/ADWebcast.js +5 -8
  12. package/dist/cjs/ADWelcome.js +2 -2
  13. package/dist/cjs/{ADlgInfeed-0a1546ae.js → ADlgInfeed-845aac15.js} +3 -6
  14. package/dist/cjs/AccordionPanel.js +1 -1
  15. package/dist/cjs/AdSlot.js +4 -4
  16. package/dist/cjs/AdSlotsProvider.js +2 -23
  17. package/dist/cjs/ArticleCarousel.js +1 -1
  18. package/dist/cjs/ArticleSeriesListing.js +28 -7
  19. package/dist/cjs/Auth.js +306 -455
  20. package/dist/cjs/{BlockContent-80b15fac.js → BlockContent-88f69acd.js} +1 -1
  21. package/dist/cjs/BrowseVideosListing.js +1 -1
  22. package/dist/cjs/CMEDeck.js +5 -5
  23. package/dist/cjs/Column3.js +4 -4
  24. package/dist/cjs/ConferenceArticleCard.js +2 -2
  25. package/dist/cjs/DeckContent.js +8 -10
  26. package/dist/cjs/DeckQueue.js +6 -6
  27. package/dist/cjs/{Dfp-390337bf.js → Dfp-b2bc3b97.js} +1 -1
  28. package/dist/cjs/EventsDeck.js +4 -4
  29. package/dist/cjs/ExternalResources.js +9 -7
  30. package/dist/cjs/Feature.js +3 -3
  31. package/dist/cjs/ForbesHero.js +2 -2
  32. package/dist/cjs/GridContent.js +13 -17
  33. package/dist/cjs/GridHero.js +2 -2
  34. package/dist/cjs/GroupDeck.js +1 -1
  35. package/dist/cjs/HamMagazine.js +5 -5
  36. package/dist/cjs/Hero.js +1 -1
  37. package/dist/cjs/HorizontalHero.js +2 -2
  38. package/dist/cjs/IssueContentDeck.js +2 -2
  39. package/dist/cjs/IssueDeck.js +2 -2
  40. package/dist/cjs/IssueLanding.js +8 -8
  41. package/dist/cjs/LeftNav.js +2 -2
  42. package/dist/cjs/MasterDeck.js +10 -14
  43. package/dist/cjs/NavMagazine.js +5 -5
  44. package/dist/cjs/NavNative.js +4 -4
  45. package/dist/cjs/OncliveHero.js +2 -2
  46. package/dist/cjs/OncliveLargeHero.js +2 -2
  47. package/dist/cjs/PartnerDetailListing.js +12 -10
  48. package/dist/cjs/PublicationDeck.js +2 -2
  49. package/dist/cjs/QueueDeckExpanded.js +12 -16
  50. package/dist/cjs/RecentNews.js +2 -2
  51. package/dist/cjs/RelatedContent.js +2 -2
  52. package/dist/cjs/{SocialSearchComponent-56d49a1a.js → SocialSearchComponent-6b5e5b47.js} +5 -5
  53. package/dist/cjs/TaxonomyCard.js +2 -2
  54. package/dist/cjs/TemplateNormal.js +4 -4
  55. package/dist/cjs/ThumbnailCard.js +1 -1
  56. package/dist/cjs/Ustream.js +3 -3
  57. package/dist/cjs/VerticalHero.js +2 -2
  58. package/dist/cjs/VideoSeriesCard.js +2 -2
  59. package/dist/cjs/VideoSeriesListing.js +38 -7
  60. package/dist/cjs/View.js +21 -22
  61. package/dist/cjs/YahooHero.js +2 -2
  62. package/dist/cjs/YoutubeGroup.js +1 -1
  63. package/dist/cjs/getRelatedArticle.js +416 -5
  64. package/dist/cjs/getSerializers.js +8 -6
  65. package/dist/cjs/{index-099d45ae.js → index-2d0a4911.js} +4 -6
  66. package/dist/cjs/{index-bc377510.js → index-59436c13.js} +116 -75
  67. package/dist/cjs/{index-3294d3bc.js → index-5be2866f.js} +1 -1
  68. package/dist/cjs/{index-39beccb3.js → index-b5eb3ff8.js} +18 -18
  69. package/dist/cjs/index-bd6c9f56.js +211 -0
  70. package/dist/cjs/{index.es-9110add6.js → index.es-ab3f2690.js} +3 -1
  71. package/dist/cjs/{index.esm-876ca9ff.js → index.esm-90433435.js} +5 -0
  72. package/dist/cjs/index.js +16 -16
  73. package/dist/cjs/{lodash-7fd85bcf.js → lodash-fc2922d0.js} +22 -71
  74. package/dist/cjs/{main-03ffa84c.js → main-b6c96c8d.js} +67 -37
  75. package/dist/cjs/{moment-575fe24c.js → moment-66a6a284.js} +1 -1
  76. package/dist/cjs/timeDifferenceCalc.js +1 -1
  77. package/dist/cjs/urlFor.js +1 -1
  78. package/dist/esm/AD.js +1 -1
  79. package/dist/esm/AD300x250.js +3 -3
  80. package/dist/esm/AD300x250x600.js +3 -3
  81. package/dist/esm/AD728x90.js +4 -4
  82. package/dist/esm/ADFloatingFooter.js +2 -2
  83. package/dist/esm/ADGutter.js +5 -8
  84. package/dist/esm/{ADInfeed-a15fb981.js → ADInfeed-205cb7a9.js} +3 -6
  85. package/dist/esm/ADSkyscraper.js +5 -8
  86. package/dist/esm/ADSponsoredResources.js +5 -8
  87. package/dist/esm/ADWebcast.js +5 -8
  88. package/dist/esm/ADWelcome.js +2 -2
  89. package/dist/esm/{ADlgInfeed-33c8a066.js → ADlgInfeed-e538f17a.js} +3 -6
  90. package/dist/esm/AccordionPanel.js +1 -1
  91. package/dist/esm/AdSlot.js +4 -4
  92. package/dist/esm/AdSlotsProvider.js +3 -24
  93. package/dist/esm/ArticleCarousel.js +1 -1
  94. package/dist/esm/ArticleSeriesListing.js +28 -7
  95. package/dist/esm/Auth.js +301 -450
  96. package/dist/esm/{BlockContent-c409aca5.js → BlockContent-a614acdf.js} +1 -1
  97. package/dist/esm/BrowseVideosListing.js +1 -1
  98. package/dist/esm/CMEDeck.js +5 -5
  99. package/dist/esm/Column3.js +4 -4
  100. package/dist/esm/ConferenceArticleCard.js +2 -2
  101. package/dist/esm/DeckContent.js +8 -10
  102. package/dist/esm/DeckQueue.js +6 -6
  103. package/dist/esm/{Dfp-741c01be.js → Dfp-8a8fca18.js} +1 -1
  104. package/dist/esm/EventsDeck.js +4 -4
  105. package/dist/esm/ExternalResources.js +9 -7
  106. package/dist/esm/Feature.js +3 -3
  107. package/dist/esm/ForbesHero.js +2 -2
  108. package/dist/esm/GridContent.js +13 -17
  109. package/dist/esm/GridHero.js +2 -2
  110. package/dist/esm/GroupDeck.js +1 -1
  111. package/dist/esm/HamMagazine.js +5 -5
  112. package/dist/esm/Hero.js +1 -1
  113. package/dist/esm/HorizontalHero.js +2 -2
  114. package/dist/esm/IssueContentDeck.js +2 -2
  115. package/dist/esm/IssueDeck.js +2 -2
  116. package/dist/esm/IssueLanding.js +8 -8
  117. package/dist/esm/LeftNav.js +2 -2
  118. package/dist/esm/MasterDeck.js +10 -14
  119. package/dist/esm/NavMagazine.js +5 -5
  120. package/dist/esm/NavNative.js +4 -4
  121. package/dist/esm/OncliveHero.js +2 -2
  122. package/dist/esm/OncliveLargeHero.js +2 -2
  123. package/dist/esm/PartnerDetailListing.js +12 -10
  124. package/dist/esm/PublicationDeck.js +2 -2
  125. package/dist/esm/QueueDeckExpanded.js +12 -16
  126. package/dist/esm/RecentNews.js +2 -2
  127. package/dist/esm/RelatedContent.js +2 -2
  128. package/dist/esm/{SocialSearchComponent-677ed3bd.js → SocialSearchComponent-7f14e0f3.js} +5 -5
  129. package/dist/esm/TaxonomyCard.js +2 -2
  130. package/dist/esm/TemplateNormal.js +4 -4
  131. package/dist/esm/ThumbnailCard.js +1 -1
  132. package/dist/esm/Ustream.js +3 -3
  133. package/dist/esm/VerticalHero.js +2 -2
  134. package/dist/esm/VideoSeriesCard.js +2 -2
  135. package/dist/esm/VideoSeriesListing.js +38 -7
  136. package/dist/esm/View.js +21 -22
  137. package/dist/esm/YahooHero.js +2 -2
  138. package/dist/esm/YoutubeGroup.js +1 -1
  139. package/dist/esm/getRelatedArticle.js +416 -5
  140. package/dist/esm/getSerializers.js +8 -6
  141. package/dist/esm/{index-3849e3fe.js → index-51a80699.js} +18 -18
  142. package/dist/esm/{index-3f4dd6f2.js → index-93ec3c59.js} +4 -6
  143. package/dist/esm/{index-d1920c2d.js → index-a2e78632.js} +117 -76
  144. package/dist/esm/{index-ef6d5dcf.js → index-d2f90501.js} +1 -1
  145. package/dist/esm/index-db3bb315.js +207 -0
  146. package/dist/esm/{index.es-29c1cef5.js → index.es-938a3a58.js} +3 -1
  147. package/dist/esm/{index.esm-85cb09e6.js → index.esm-29e48d38.js} +5 -1
  148. package/dist/esm/index.js +15 -15
  149. package/dist/esm/{lodash-ec8c6b48.js → lodash-17fdfebb.js} +22 -71
  150. package/dist/esm/{main-35ff7b4f.js → main-0465b2a0.js} +65 -34
  151. package/dist/esm/{moment-e2f9b20c.js → moment-12415288.js} +1 -1
  152. package/dist/esm/timeDifferenceCalc.js +1 -1
  153. package/dist/esm/urlFor.js +1 -1
  154. package/package.json +3 -3
package/dist/esm/View.js CHANGED
@@ -14,19 +14,19 @@ import './web.dom.iterable-8956f9a5.js';
14
14
  import { _ as _typeof } from './typeof-08f2c380.js';
15
15
  import './_is-array-49698029.js';
16
16
  import React__default, { useState, useRef, useEffect } from 'react';
17
- import { l as lib_3 } from './index-3f4dd6f2.js';
17
+ import { l as lib_3 } from './index-93ec3c59.js';
18
18
  import 'prop-types';
19
19
  import 'react-bootstrap/Row';
20
20
  import 'react-bootstrap/Col';
21
- import { m as moment } from './moment-e2f9b20c.js';
21
+ import { m as moment } from './moment-12415288.js';
22
22
  import { useRouter } from 'next/router';
23
23
  import './isSymbol-807e927e.js';
24
24
  import './debounce-1a993acf.js';
25
- import { I as InfiniteScroll } from './index.es-29c1cef5.js';
25
+ import { I as InfiniteScroll } from './index.es-938a3a58.js';
26
26
  import 'react-dom';
27
- import './index-3849e3fe.js';
27
+ import './index-51a80699.js';
28
28
  import './index-5f9f807a.js';
29
- import { m as main_36 } from './main-35ff7b4f.js';
29
+ import { m as main_39 } from './main-0465b2a0.js';
30
30
  import './entities-7cc3bf45.js';
31
31
  import { _ as _JSON$stringify } from './stringify-008c8802.js';
32
32
  import { a as _getIterator, _ as _slicedToArray } from './slicedToArray-7021e5df.js';
@@ -35,15 +35,16 @@ import './_set-species-cede29f8.js';
35
35
  import './Segment.js';
36
36
  import './Beam.js';
37
37
  import DFPAdSlot from './AdSlot.js';
38
- import { B as BlockContent } from './BlockContent-c409aca5.js';
38
+ import { B as BlockContent } from './BlockContent-a614acdf.js';
39
39
  import './smoothscroll-4b699764.js';
40
40
  import './GroupDeck.js';
41
41
  import 'react-bootstrap';
42
42
  import './iconBase-602d52fe.js';
43
+ import './index.esm-29e48d38.js';
43
44
  import Button from 'react-bootstrap/Button';
44
45
  import { _ as _defineProperty } from './defineProperty-b798470d.js';
45
46
  import Form from 'react-bootstrap/Form';
46
- import { I as InscreenSensor, r as renderAuthor, g as getSerializers } from './index-d1920c2d.js';
47
+ import { I as InscreenSensor, r as renderAuthor, g as getSerializers } from './index-a2e78632.js';
47
48
  import './util-7700fc59.js';
48
49
  import './brightcove-react-player-loader.es-83f53e4e.js';
49
50
  import 'react-bootstrap/Pagination';
@@ -55,9 +56,9 @@ import { _ as _Object$keys } from './keys-fc2d4c34.js';
55
56
  import 'react-bootstrap/Dropdown';
56
57
  import { b as FaMinus, c as FaPlus } from './index.esm-cf08bf18.js';
57
58
  import getSeriesDetail from './getSeriesDetail.js';
58
- import 'nookies';
59
- import getQuery from './getQuery.js';
59
+ import './index-db3bb315.js';
60
60
  import getRelatedArticle from './getRelatedArticle.js';
61
+ import getQuery from './getQuery.js';
61
62
  import { g as getTargeting, a as getContentPlacementUrl } from './getTargeting-2acdec91.js';
62
63
  import getKeywords from './getKeywords.js';
63
64
  import urlFor from './urlFor.js';
@@ -138,9 +139,9 @@ var DocumentGroup = function DocumentGroup(_ref) {
138
139
  style: { display: 'flex', flexDirection: 'column', padding: '0 1rem', justifyContent: thumbnailUrl ? 'center' : 'flex-start', alignItems: 'center' } },
139
140
  thumbnailUrl && React__default.createElement('img', { style: { maxWidth: '220px', maxHeight: '100px', marginTop: '1rem' }, src: thumbnailUrl, alt: name }),
140
141
  !thumbnailUrl && React__default.createElement('p', {
141
- style: { maxWidth: '315px', margin: '0', color: 'var(--primary)', textAlign: thumbnailUrl ? 'center' : main_36 ? 'left' : 'right', marginTop: '.25rem' },
142
+ style: { maxWidth: '315px', margin: '0', color: 'var(--primary)', textAlign: thumbnailUrl ? 'center' : main_39 ? 'left' : 'right', marginTop: '.25rem' },
142
143
  dangerouslySetInnerHTML: { __html: name } }),
143
- main_36 && !thumbnailUrl && React__default.createElement(
144
+ main_39 && !thumbnailUrl && React__default.createElement(
144
145
  'style',
145
146
  { jsx: 'true' },
146
147
  '\n a.doc-group {\n display: block !important;\n padding: 0!important;\n }\n '
@@ -389,9 +390,7 @@ var Article = function Article(props) {
389
390
  _props$sponsoredFlag = props.sponsoredFlag,
390
391
  sponsoredFlag = _props$sponsoredFlag === undefined ? false : _props$sponsoredFlag,
391
392
  _props$authorImgHeigh = props.authorImgHeight,
392
- authorImgHeight = _props$authorImgHeigh === undefined ? 270 : _props$authorImgHeigh,
393
- _props$refreshFlag = props.refreshFlag,
394
- refreshFlag = _props$refreshFlag === undefined ? false : _props$refreshFlag;
393
+ authorImgHeight = _props$authorImgHeigh === undefined ? 270 : _props$authorImgHeigh;
395
394
 
396
395
  var targeting = getTargeting(props);
397
396
  var onChangeArticle = props.onChangeArticle;
@@ -639,13 +638,13 @@ var Article = function Article(props) {
639
638
  React__default.createElement(
640
639
  'div',
641
640
  { id: 'contextual-native-ad-' + payload._id, className: 'contextual-native-ad' },
642
- React__default.createElement(DFPAdSlot, _extends({}, payload.contextualAD, { refreshFlag: refreshFlag, checkIsAdFound: previewAd ? null : checkIsAdFound }))
641
+ React__default.createElement(DFPAdSlot, _extends({}, payload.contextualAD, { refreshFlag: false, checkIsAdFound: previewAd ? null : checkIsAdFound }))
643
642
  ),
644
643
  React__default.createElement('span', { className: 'clearfix' }),
645
644
  React__default.createElement(
646
645
  'div',
647
646
  { id: 'contextual-video-ad-' + payload._id, className: 'contextual-video-ad' },
648
- React__default.createElement(DFPAdSlot, _extends({}, payload.contextualVideoAD, { refreshFlag: refreshFlag, checkIsAdFound: checkIsVideoAdFound }))
647
+ React__default.createElement(DFPAdSlot, _extends({}, payload.contextualVideoAD, { refreshFlag: false, checkIsAdFound: checkIsVideoAdFound }))
649
648
  ),
650
649
  React__default.createElement(BlockContent, _extends({
651
650
  serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
@@ -711,7 +710,7 @@ var Article = function Article(props) {
711
710
  (visibleFlag || queueData && queueData.length === 1 || !props.infiniteScroll) && React__default.createElement(
712
711
  'div',
713
712
  { id: 'contextual-native-ad-' + payload._id, className: 'contextual-native-ad' },
714
- React__default.createElement(DFPAdSlot, _extends({}, payload.contextualAD, { refreshFlag: refreshFlag, checkIsAdFound: previewAd ? null : _checkIsAdFound }))
713
+ React__default.createElement(DFPAdSlot, _extends({}, payload.contextualAD, { refreshFlag: false, checkIsAdFound: previewAd ? null : _checkIsAdFound }))
715
714
  ),
716
715
  contextualADFlag && React__default.createElement('span', { className: 'clearfix' }),
717
716
  React__default.createElement(BlockContent, _extends({
@@ -754,7 +753,7 @@ var Article = function Article(props) {
754
753
  React__default.createElement(
755
754
  'div',
756
755
  { id: 'contextual-video-ad-' + payload._id, className: 'contextual-video-ad' },
757
- React__default.createElement(DFPAdSlot, _extends({}, payload.contextualVideoAD, { refreshFlag: refreshFlag, checkIsAdFound: _checkIsAdFound2 }))
756
+ React__default.createElement(DFPAdSlot, _extends({}, payload.contextualVideoAD, { refreshFlag: false, checkIsAdFound: _checkIsAdFound2 }))
758
757
  ),
759
758
  React__default.createElement(BlockContent, _extends({
760
759
  serializers: getSerializers(client, pageview, videoAccountIDs, onVote, true, drupalLeadSettings, currentPage, false, null, null, null, targeting),
@@ -949,7 +948,7 @@ var Article = function Article(props) {
949
948
  React__default.createElement(
950
949
  'div',
951
950
  { className: 'ad-box', style: { textAlign: 'center' } },
952
- main_36 && !sponsoredFlag && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
951
+ main_39 && !sponsoredFlag && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
953
952
  if (index === 0) {
954
953
  return React__default.createElement(
955
954
  'div',
@@ -1028,7 +1027,7 @@ var Article = function Article(props) {
1028
1027
  })
1029
1028
  )
1030
1029
  ),
1031
- main_36 && !sponsoredFlag && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
1030
+ main_39 && !sponsoredFlag && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
1032
1031
  if (index > 0) {
1033
1032
  return React__default.createElement(
1034
1033
  'div',
@@ -1101,7 +1100,7 @@ var ArticleQueue = function ArticleQueue(props) {
1101
1100
  });
1102
1101
  var targeting = getTargeting({ article: activeArticle, cpModificationRequired: cpModificationRequired, position: props.position, prevUrl: prevUrl });
1103
1102
 
1104
- if (!main_36) {
1103
+ if (!main_39) {
1105
1104
  lib_3.getGoogletag().then(function (googletag) {
1106
1105
  if (window.googletag && googletag.pubadsReady) {
1107
1106
  var slots = googletag.pubads().getSlots();
@@ -1119,7 +1118,7 @@ var ArticleQueue = function ArticleQueue(props) {
1119
1118
  });
1120
1119
  }
1121
1120
  //Refresh leaderboard ad on mobile
1122
- if (main_36) {
1121
+ if (main_39) {
1123
1122
  var leaderboardSlotId = '';
1124
1123
  lib_3.getGoogletag().then(function (googletag) {
1125
1124
  if (window.googletag && googletag.pubadsReady) {
@@ -5,9 +5,9 @@ import './core.get-iterator-method-54d2e411.js';
5
5
  import './web.dom.iterable-8956f9a5.js';
6
6
  import React__default from 'react';
7
7
  import 'prop-types';
8
- import { m as moment } from './moment-e2f9b20c.js';
8
+ import { m as moment } from './moment-12415288.js';
9
9
  import 'react-dom';
10
- import { i as imageUrlBuilder } from './index-3849e3fe.js';
10
+ import { i as imageUrlBuilder } from './index-51a80699.js';
11
11
  import { L as LazyLoad } from './index-5f9f807a.js';
12
12
  import { c as clean_html_1 } from './entities-7cc3bf45.js';
13
13
  import './slicedToArray-7021e5df.js';
@@ -10,7 +10,7 @@ import './_is-array-49698029.js';
10
10
  import React__default, { useRef, useState, useEffect } from 'react';
11
11
  import 'prop-types';
12
12
  import 'react-dom';
13
- import { i as imageUrlBuilder } from './index-3849e3fe.js';
13
+ import { i as imageUrlBuilder } from './index-51a80699.js';
14
14
  import { L as LazyLoad } from './index-5f9f807a.js';
15
15
  import { _ as _slicedToArray } from './slicedToArray-7021e5df.js';
16
16
  import { s as smoothscroll, g as getYoutubeId } from './smoothscroll-4b699764.js';
@@ -1,4 +1,4 @@
1
- import './_commonjsHelpers-0c4b6f40.js';
1
+ import { c as createCommonjsModule, u as unwrapExports, a as commonjsGlobal } from './_commonjsHelpers-0c4b6f40.js';
2
2
  import './_to-object-ded78eb9.js';
3
3
  import './es6.string.iterator-9b2af4a5.js';
4
4
  import './_library-528f1934.js';
@@ -7,9 +7,420 @@ import './core.get-iterator-method-54d2e411.js';
7
7
  import './web.dom.iterable-8956f9a5.js';
8
8
  import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-7c654f36.js';
9
9
  import './_set-species-cede29f8.js';
10
- import { parseCookies, setCookie } from 'nookies';
10
+ import { c as cookie } from './index-db3bb315.js';
11
11
  import getQuery from './getQuery.js';
12
12
 
13
+ var defaultParseOptions = {
14
+ decodeValues: true,
15
+ map: false,
16
+ silent: false,
17
+ };
18
+
19
+ function isNonEmptyString(str) {
20
+ return typeof str === "string" && !!str.trim();
21
+ }
22
+
23
+ function parseString(setCookieValue, options) {
24
+ var parts = setCookieValue.split(";").filter(isNonEmptyString);
25
+ var nameValue = parts.shift().split("=");
26
+ var name = nameValue.shift();
27
+ var value = nameValue.join("="); // everything after the first =, joined by a "=" if there was more than one part
28
+
29
+ options = options
30
+ ? Object.assign({}, defaultParseOptions, options)
31
+ : defaultParseOptions;
32
+
33
+ try {
34
+ value = options.decodeValues ? decodeURIComponent(value) : value; // decode cookie value
35
+ } catch (e) {
36
+ console.error(
37
+ `set-cookie-parser encountered an error while decoding a cookie with value '${value}'. Set options.decodeValues to false to disable this feature.`,
38
+ e
39
+ );
40
+ }
41
+
42
+ var cookie = {
43
+ name: name, // grab everything before the first =
44
+ value: value,
45
+ };
46
+
47
+ parts.forEach(function (part) {
48
+ var sides = part.split("=");
49
+ var key = sides.shift().trimLeft().toLowerCase();
50
+ var value = sides.join("=");
51
+ if (key === "expires") {
52
+ cookie.expires = new Date(value);
53
+ } else if (key === "max-age") {
54
+ cookie.maxAge = parseInt(value, 10);
55
+ } else if (key === "secure") {
56
+ cookie.secure = true;
57
+ } else if (key === "httponly") {
58
+ cookie.httpOnly = true;
59
+ } else if (key === "samesite") {
60
+ cookie.sameSite = value;
61
+ } else {
62
+ cookie[key] = value;
63
+ }
64
+ });
65
+
66
+ return cookie;
67
+ }
68
+
69
+ function parse(input, options) {
70
+ options = options
71
+ ? Object.assign({}, defaultParseOptions, options)
72
+ : defaultParseOptions;
73
+
74
+ if (!input) {
75
+ if (!options.map) {
76
+ return [];
77
+ } else {
78
+ return {};
79
+ }
80
+ }
81
+
82
+ if (input.headers && input.headers["set-cookie"]) {
83
+ // fast-path for node.js (which automatically normalizes header names to lower-case
84
+ input = input.headers["set-cookie"];
85
+ } else if (input.headers) {
86
+ // slow-path for other environments - see #25
87
+ var sch =
88
+ input.headers[
89
+ Object.keys(input.headers).find(function (key) {
90
+ return key.toLowerCase() === "set-cookie";
91
+ })
92
+ ];
93
+ // warn if called on a request-like object with a cookie header rather than a set-cookie header - see #34, 36
94
+ if (!sch && input.headers.cookie && !options.silent) {
95
+ console.warn(
96
+ "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."
97
+ );
98
+ }
99
+ input = sch;
100
+ }
101
+ if (!Array.isArray(input)) {
102
+ input = [input];
103
+ }
104
+
105
+ options = options
106
+ ? Object.assign({}, defaultParseOptions, options)
107
+ : defaultParseOptions;
108
+
109
+ if (!options.map) {
110
+ return input.filter(isNonEmptyString).map(function (str) {
111
+ return parseString(str, options);
112
+ });
113
+ } else {
114
+ var cookies = {};
115
+ return input.filter(isNonEmptyString).reduce(function (cookies, str) {
116
+ var cookie = parseString(str, options);
117
+ cookies[cookie.name] = cookie;
118
+ return cookies;
119
+ }, cookies);
120
+ }
121
+ }
122
+
123
+ /*
124
+ Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas
125
+ that are within a single set-cookie field-value, such as in the Expires portion.
126
+
127
+ This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2
128
+ Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128
129
+ React Native's fetch does this for *every* header, including set-cookie.
130
+
131
+ Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25
132
+ Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation
133
+ */
134
+ function splitCookiesString(cookiesString) {
135
+ if (Array.isArray(cookiesString)) {
136
+ return cookiesString;
137
+ }
138
+ if (typeof cookiesString !== "string") {
139
+ return [];
140
+ }
141
+
142
+ var cookiesStrings = [];
143
+ var pos = 0;
144
+ var start;
145
+ var ch;
146
+ var lastComma;
147
+ var nextStart;
148
+ var cookiesSeparatorFound;
149
+
150
+ function skipWhitespace() {
151
+ while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) {
152
+ pos += 1;
153
+ }
154
+ return pos < cookiesString.length;
155
+ }
156
+
157
+ function notSpecialChar() {
158
+ ch = cookiesString.charAt(pos);
159
+
160
+ return ch !== "=" && ch !== ";" && ch !== ",";
161
+ }
162
+
163
+ while (pos < cookiesString.length) {
164
+ start = pos;
165
+ cookiesSeparatorFound = false;
166
+
167
+ while (skipWhitespace()) {
168
+ ch = cookiesString.charAt(pos);
169
+ if (ch === ",") {
170
+ // ',' is a cookie separator if we have later first '=', not ';' or ','
171
+ lastComma = pos;
172
+ pos += 1;
173
+
174
+ skipWhitespace();
175
+ nextStart = pos;
176
+
177
+ while (pos < cookiesString.length && notSpecialChar()) {
178
+ pos += 1;
179
+ }
180
+
181
+ // currently special character
182
+ if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") {
183
+ // we found cookies separator
184
+ cookiesSeparatorFound = true;
185
+ // pos is inside the next cookie, so back up and return it.
186
+ pos = nextStart;
187
+ cookiesStrings.push(cookiesString.substring(start, lastComma));
188
+ start = pos;
189
+ } else {
190
+ // in param ',' or param separator ';',
191
+ // we continue from that comma
192
+ pos = lastComma + 1;
193
+ }
194
+ } else {
195
+ pos += 1;
196
+ }
197
+ }
198
+
199
+ if (!cookiesSeparatorFound || pos >= cookiesString.length) {
200
+ cookiesStrings.push(cookiesString.substring(start, cookiesString.length));
201
+ }
202
+ }
203
+
204
+ return cookiesStrings;
205
+ }
206
+
207
+ var setCookie = parse;
208
+ var parse_1 = parse;
209
+ var parseString_1 = parseString;
210
+ var splitCookiesString_1 = splitCookiesString;
211
+ setCookie.parse = parse_1;
212
+ setCookie.parseString = parseString_1;
213
+ setCookie.splitCookiesString = splitCookiesString_1;
214
+
215
+ var utils = createCommonjsModule(function (module, exports) {
216
+ var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
217
+ __assign = Object.assign || function(t) {
218
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
219
+ s = arguments[i];
220
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
221
+ t[p] = s[p];
222
+ }
223
+ return t;
224
+ };
225
+ return __assign.apply(this, arguments);
226
+ };
227
+ Object.defineProperty(exports, "__esModule", { value: true });
228
+ exports.areCookiesEqual = exports.hasSameProperties = exports.createCookie = exports.isBrowser = void 0;
229
+ /**
230
+ * Tells whether we are in a browser or server.
231
+ */
232
+ function isBrowser() {
233
+ return typeof window !== 'undefined';
234
+ }
235
+ exports.isBrowser = isBrowser;
236
+ /**
237
+ * Create an instance of the Cookie interface
238
+ */
239
+ function createCookie(name, value, options) {
240
+ var sameSite = options.sameSite;
241
+ if (sameSite === true) {
242
+ sameSite = 'strict';
243
+ }
244
+ if (sameSite === undefined || sameSite === false) {
245
+ sameSite = 'lax';
246
+ }
247
+ var cookieToSet = __assign(__assign({}, options), { sameSite: sameSite });
248
+ delete cookieToSet.encode;
249
+ return __assign({ name: name, value: value }, cookieToSet);
250
+ }
251
+ exports.createCookie = createCookie;
252
+ /**
253
+ * Tells whether given objects have the same properties.
254
+ */
255
+ function hasSameProperties(a, b) {
256
+ var aProps = Object.getOwnPropertyNames(a);
257
+ var bProps = Object.getOwnPropertyNames(b);
258
+ if (aProps.length !== bProps.length) {
259
+ return false;
260
+ }
261
+ for (var i = 0; i < aProps.length; i++) {
262
+ var propName = aProps[i];
263
+ if (a[propName] !== b[propName]) {
264
+ return false;
265
+ }
266
+ }
267
+ return true;
268
+ }
269
+ exports.hasSameProperties = hasSameProperties;
270
+ /**
271
+ * Compare the cookie and return true if the cookies have equivalent
272
+ * options and the cookies would be overwritten in the browser storage.
273
+ *
274
+ * @param a first Cookie for comparison
275
+ * @param b second Cookie for comparison
276
+ */
277
+ function areCookiesEqual(a, b) {
278
+ var sameSiteSame = a.sameSite === b.sameSite;
279
+ if (typeof a.sameSite === 'string' && typeof b.sameSite === 'string') {
280
+ sameSiteSame = a.sameSite.toLowerCase() === b.sameSite.toLowerCase();
281
+ }
282
+ return (hasSameProperties(__assign(__assign({}, a), { sameSite: undefined }), __assign(__assign({}, b), { sameSite: undefined })) && sameSiteSame);
283
+ }
284
+ exports.areCookiesEqual = areCookiesEqual;
285
+ /* Functions */
286
+
287
+ });
288
+
289
+ unwrapExports(utils);
290
+ var utils_1 = utils.areCookiesEqual;
291
+ var utils_2 = utils.hasSameProperties;
292
+ var utils_3 = utils.createCookie;
293
+ var utils_4 = utils.isBrowser;
294
+
295
+ var dist = createCommonjsModule(function (module, exports) {
296
+ var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
297
+ __assign = Object.assign || function(t) {
298
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
299
+ s = arguments[i];
300
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
301
+ t[p] = s[p];
302
+ }
303
+ return t;
304
+ };
305
+ return __assign.apply(this, arguments);
306
+ };
307
+ Object.defineProperty(exports, "__esModule", { value: true });
308
+ exports.destroyCookie = exports.setCookie = exports.parseCookies = void 0;
309
+
310
+
311
+
312
+ /**
313
+ * Parses cookies.
314
+ *
315
+ * @param ctx NextJS page or API context, express context, null or undefined.
316
+ * @param options Options that we pass down to `cookie` library.
317
+ */
318
+ function parseCookies(ctx, options) {
319
+ var _a, _b;
320
+ 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) {
321
+ return cookie.parse(ctx.req.headers.cookie, options);
322
+ }
323
+ if (utils.isBrowser()) {
324
+ return cookie.parse(document.cookie, options);
325
+ }
326
+ return {};
327
+ }
328
+ exports.parseCookies = parseCookies;
329
+ /**
330
+ * Sets a cookie.
331
+ *
332
+ * @param ctx NextJS page or API context, express context, null or undefined.
333
+ * @param name The name of your cookie.
334
+ * @param value The value of your cookie.
335
+ * @param options Options that we pass down to `cookie` library.
336
+ */
337
+ function setCookie$1(ctx, name, value, options) {
338
+ var _a, _b;
339
+ if (options === void 0) { options = {}; }
340
+ // SSR
341
+ if (((_a = ctx === null || ctx === void 0 ? void 0 : ctx.res) === null || _a === void 0 ? void 0 : _a.getHeader) && ctx.res.setHeader) {
342
+ // Check if response has finished and warn about it.
343
+ if ((_b = ctx === null || ctx === void 0 ? void 0 : ctx.res) === null || _b === void 0 ? void 0 : _b.finished) {
344
+ console.warn("Not setting \"" + name + "\" cookie. Response has finished.");
345
+ console.warn("You should set cookie before res.send()");
346
+ return {};
347
+ }
348
+ /**
349
+ * Load existing cookies from the header and parse them.
350
+ */
351
+ var cookies = ctx.res.getHeader('Set-Cookie') || [];
352
+ if (typeof cookies === 'string')
353
+ cookies = [cookies];
354
+ if (typeof cookies === 'number')
355
+ cookies = [];
356
+ /**
357
+ * Parse cookies but ignore values - we've already encoded
358
+ * them in the previous call.
359
+ */
360
+ var parsedCookies = setCookie.parse(cookies, {
361
+ decodeValues: false,
362
+ });
363
+ /**
364
+ * We create the new cookie and make sure that none of
365
+ * the existing cookies match it.
366
+ */
367
+ var newCookie_1 = utils.createCookie(name, value, options);
368
+ var cookiesToSet_1 = [];
369
+ parsedCookies.forEach(function (parsedCookie) {
370
+ if (!utils.areCookiesEqual(parsedCookie, newCookie_1)) {
371
+ /**
372
+ * We serialize the cookie back to the original format
373
+ * if it isn't the same as the new one.
374
+ */
375
+ var serializedCookie = cookie.serialize(parsedCookie.name, parsedCookie.value, __assign({
376
+ // we prevent reencoding by default, but you might override it
377
+ encode: function (val) { return val; } }, parsedCookie));
378
+ cookiesToSet_1.push(serializedCookie);
379
+ }
380
+ });
381
+ cookiesToSet_1.push(cookie.serialize(name, value, options));
382
+ // Update the header.
383
+ ctx.res.setHeader('Set-Cookie', cookiesToSet_1);
384
+ }
385
+ // Browser
386
+ if (utils.isBrowser()) {
387
+ if (options && options.httpOnly) {
388
+ throw new Error('Can not set a httpOnly cookie in the browser.');
389
+ }
390
+ document.cookie = cookie.serialize(name, value, options);
391
+ }
392
+ return {};
393
+ }
394
+ exports.setCookie = setCookie$1;
395
+ /**
396
+ * Destroys a cookie with a particular name.
397
+ *
398
+ * @param ctx NextJS page or API context, express context, null or undefined.
399
+ * @param name Cookie name.
400
+ * @param options Options that we pass down to `cookie` library.
401
+ */
402
+ function destroyCookie(ctx, name, options) {
403
+ /**
404
+ * We forward the request destroy to setCookie function
405
+ * as it is the same function with modified maxAge value.
406
+ */
407
+ return setCookie$1(ctx, name, '', __assign(__assign({}, (options || {})), { maxAge: -1 }));
408
+ }
409
+ exports.destroyCookie = destroyCookie;
410
+ /* Utility Exports */
411
+ exports.default = {
412
+ set: setCookie$1,
413
+ get: parseCookies,
414
+ destroy: destroyCookie,
415
+ };
416
+
417
+ });
418
+
419
+ unwrapExports(dist);
420
+ var dist_1 = dist.destroyCookie;
421
+ var dist_2 = dist.setCookie;
422
+ var dist_3 = dist.parseCookies;
423
+
13
424
  var _this = undefined;
14
425
 
15
426
  var getRelatedArticle = function () {
@@ -69,13 +480,13 @@ var getRelatedArticle = function () {
69
480
  conditions = '';
70
481
 
71
482
  if (ctx && url) {
72
- cookies = parseCookies(ctx);
483
+ cookies = dist_3(ctx);
73
484
  prevSlugs = cookies['prevSlugs'];
74
485
 
75
486
  if (!!prevSlugs) {
76
- setCookie(ctx, 'prevSlugs', prevSlugs + ',"' + url + '"', {});
487
+ dist_2(ctx, 'prevSlugs', prevSlugs + ',"' + url + '"', {});
77
488
  conditions = '&& !(url.current in [' + prevSlugs + '])';
78
- } else setCookie(ctx, 'prevSlugs', '"' + url + '"', {});
489
+ } else dist_2(ctx, 'prevSlugs', '"' + url + '"', {});
79
490
  }
80
491
  relatedArticleQuery = getQuery('related', conditions, '', articleCount);
81
492
  _context.next = 12;
@@ -14,18 +14,18 @@ import './web.dom.iterable-8956f9a5.js';
14
14
  import './typeof-08f2c380.js';
15
15
  import './_is-array-49698029.js';
16
16
  import 'react';
17
- import './index-3f4dd6f2.js';
17
+ import './index-93ec3c59.js';
18
18
  import 'prop-types';
19
19
  import 'react-bootstrap/Row';
20
20
  import 'react-bootstrap/Col';
21
- import './moment-e2f9b20c.js';
21
+ import './moment-12415288.js';
22
22
  import 'next/router';
23
23
  import './isSymbol-807e927e.js';
24
24
  import './debounce-1a993acf.js';
25
25
  import 'react-dom';
26
- import './index-3849e3fe.js';
26
+ import './index-51a80699.js';
27
27
  import './index-5f9f807a.js';
28
- import './main-35ff7b4f.js';
28
+ import './main-0465b2a0.js';
29
29
  import './entities-7cc3bf45.js';
30
30
  import './stringify-008c8802.js';
31
31
  import './slicedToArray-7021e5df.js';
@@ -34,12 +34,14 @@ import './_set-species-cede29f8.js';
34
34
  import './Segment.js';
35
35
  import './Beam.js';
36
36
  import './AdSlot.js';
37
- import './BlockContent-c409aca5.js';
37
+ import './BlockContent-a614acdf.js';
38
38
  import './smoothscroll-4b699764.js';
39
39
  import './GroupDeck.js';
40
40
  import 'react-bootstrap';
41
+ import './iconBase-602d52fe.js';
42
+ import './index.esm-29e48d38.js';
41
43
  import 'react-bootstrap/Button';
42
- export { g as default } from './index-d1920c2d.js';
44
+ export { g as default } from './index-a2e78632.js';
43
45
  import './util-7700fc59.js';
44
46
  import './brightcove-react-player-loader.es-83f53e4e.js';
45
47
  import 'react-bootstrap/Pagination';