@mjhls/mjh-framework 1.0.720-beta.0 → 1.0.720-navigation-scroll-fix-v2

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 (102) hide show
  1. package/dist/cjs/ArticleCarousel.js +1 -1
  2. package/dist/cjs/ArticleProgramLandingPage.js +6 -6
  3. package/dist/cjs/ArticleSeriesLandingPage.js +3 -3
  4. package/dist/cjs/ArticleSeriesListing.js +2 -2
  5. package/dist/cjs/Auth.js +11 -211
  6. package/dist/cjs/{BlockContent-091a991f.js → BlockContent-80b15fac.js} +1 -1
  7. package/dist/cjs/ConferenceArticleCard.js +1 -1
  8. package/dist/cjs/DeckContent.js +2 -2
  9. package/dist/cjs/DeckQueue.js +2 -2
  10. package/dist/cjs/ExternalResources.js +4 -4
  11. package/dist/cjs/Feature.js +1 -1
  12. package/dist/cjs/ForbesHero.js +1 -1
  13. package/dist/cjs/GridContent.js +3 -3
  14. package/dist/cjs/GridHero.js +1 -1
  15. package/dist/cjs/GroupDeck.js +1 -1
  16. package/dist/cjs/HamMagazine.js +9 -8
  17. package/dist/cjs/Hero.js +1 -1
  18. package/dist/cjs/HorizontalArticleListing.js +4 -4
  19. package/dist/cjs/HorizontalHero.js +1 -1
  20. package/dist/cjs/IssueContentDeck.js +1 -1
  21. package/dist/cjs/IssueDeck.js +1 -1
  22. package/dist/cjs/IssueLanding.js +2 -2
  23. package/dist/cjs/MasterDeck.js +3 -3
  24. package/dist/cjs/OncliveHero.js +1 -1
  25. package/dist/cjs/OncliveLargeHero.js +1 -1
  26. package/dist/cjs/PartnerDetailListing.js +7 -7
  27. package/dist/cjs/PublicationDeck.js +2 -2
  28. package/dist/cjs/QueueDeckExpanded.js +2 -2
  29. package/dist/cjs/RecentNews.js +1 -1
  30. package/dist/cjs/RelatedContent.js +1 -1
  31. package/dist/cjs/TaxonomyCard.js +2 -2
  32. package/dist/cjs/TaxonomyDescription.js +4 -4
  33. package/dist/cjs/ThumbnailCard.js +1 -1
  34. package/dist/cjs/VerticalHero.js +1 -1
  35. package/dist/cjs/VideoProgramLandingPage.js +6 -6
  36. package/dist/cjs/VideoSeriesCard.js +3 -3
  37. package/dist/cjs/VideoSeriesLandingPage.js +5 -5
  38. package/dist/cjs/VideoSeriesListing.js +2 -2
  39. package/dist/cjs/View.js +32 -32
  40. package/dist/cjs/YahooHero.js +1 -1
  41. package/dist/cjs/YoutubeGroup.js +9 -11
  42. package/dist/cjs/getRelatedArticle.js +416 -5
  43. package/dist/cjs/getSerializers.js +4 -4
  44. package/dist/cjs/{getTargeting-9af0ef69.js → getTargeting-fee8c429.js} +2 -2
  45. package/dist/cjs/getTargeting.js +1 -1
  46. package/dist/cjs/{index-be0c82be.js → index-39beccb3.js} +2 -1
  47. package/dist/cjs/{index-792274b1.js → index-a2ecf598.js} +451 -439
  48. package/dist/cjs/index-bd6c9f56.js +211 -0
  49. package/dist/cjs/index.js +9 -9
  50. package/dist/cjs/{inherits-c9f99d47.js → inherits-513d81cd.js} +4 -4
  51. package/dist/cjs/{lodash-fc2922d0.js → lodash-7fd85bcf.js} +71 -22
  52. package/dist/cjs/urlFor.js +1 -1
  53. package/dist/esm/ArticleCarousel.js +1 -1
  54. package/dist/esm/ArticleProgramLandingPage.js +3 -3
  55. package/dist/esm/ArticleSeriesLandingPage.js +2 -2
  56. package/dist/esm/ArticleSeriesListing.js +1 -1
  57. package/dist/esm/Auth.js +3 -203
  58. package/dist/esm/{BlockContent-e9b4ddcf.js → BlockContent-c409aca5.js} +1 -1
  59. package/dist/esm/ConferenceArticleCard.js +1 -1
  60. package/dist/esm/DeckContent.js +1 -1
  61. package/dist/esm/DeckQueue.js +1 -1
  62. package/dist/esm/ExternalResources.js +3 -3
  63. package/dist/esm/Feature.js +1 -1
  64. package/dist/esm/ForbesHero.js +1 -1
  65. package/dist/esm/GridContent.js +2 -2
  66. package/dist/esm/GridHero.js +1 -1
  67. package/dist/esm/GroupDeck.js +1 -1
  68. package/dist/esm/HamMagazine.js +9 -8
  69. package/dist/esm/Hero.js +1 -1
  70. package/dist/esm/HorizontalArticleListing.js +3 -3
  71. package/dist/esm/HorizontalHero.js +1 -1
  72. package/dist/esm/IssueContentDeck.js +1 -1
  73. package/dist/esm/IssueDeck.js +1 -1
  74. package/dist/esm/IssueLanding.js +2 -2
  75. package/dist/esm/MasterDeck.js +2 -2
  76. package/dist/esm/OncliveHero.js +1 -1
  77. package/dist/esm/OncliveLargeHero.js +1 -1
  78. package/dist/esm/PartnerDetailListing.js +4 -4
  79. package/dist/esm/PublicationDeck.js +2 -2
  80. package/dist/esm/QueueDeckExpanded.js +2 -2
  81. package/dist/esm/RecentNews.js +1 -1
  82. package/dist/esm/RelatedContent.js +1 -1
  83. package/dist/esm/TaxonomyCard.js +2 -2
  84. package/dist/esm/TaxonomyDescription.js +3 -3
  85. package/dist/esm/ThumbnailCard.js +1 -1
  86. package/dist/esm/VerticalHero.js +1 -1
  87. package/dist/esm/VideoProgramLandingPage.js +3 -3
  88. package/dist/esm/VideoSeriesCard.js +1 -1
  89. package/dist/esm/VideoSeriesLandingPage.js +2 -2
  90. package/dist/esm/VideoSeriesListing.js +1 -1
  91. package/dist/esm/View.js +5 -5
  92. package/dist/esm/YahooHero.js +1 -1
  93. package/dist/esm/YoutubeGroup.js +9 -11
  94. package/dist/esm/getRelatedArticle.js +416 -5
  95. package/dist/esm/getSerializers.js +3 -3
  96. package/dist/esm/{index-c3a5ff39.js → index-2749e7d8.js} +450 -438
  97. package/dist/esm/{index-73819142.js → index-3849e3fe.js} +2 -1
  98. package/dist/esm/index-db3bb315.js +207 -0
  99. package/dist/esm/index.js +6 -6
  100. package/dist/esm/{lodash-17fdfebb.js → lodash-ec8c6b48.js} +71 -22
  101. package/dist/esm/urlFor.js +1 -1
  102. package/package.json +3 -3
@@ -2,7 +2,7 @@ import './_commonjsHelpers-0c4b6f40.js';
2
2
  import React__default from 'react';
3
3
  import 'prop-types';
4
4
  import 'react-dom';
5
- import { i as imageUrlBuilder } from './index-73819142.js';
5
+ import { i as imageUrlBuilder } from './index-3849e3fe.js';
6
6
  import { L as LazyLoad } from './index-5f9f807a.js';
7
7
  import { c as clean_html_1 } from './entities-7cc3bf45.js';
8
8
  import Media from 'react-bootstrap/Media';
@@ -1,7 +1,7 @@
1
1
  import './_commonjsHelpers-0c4b6f40.js';
2
2
  import React__default from 'react';
3
3
  import './moment-e2f9b20c.js';
4
- import { i as imageUrlBuilder } from './index-73819142.js';
4
+ import { i as imageUrlBuilder } from './index-3849e3fe.js';
5
5
 
6
6
  var VerticalHero = function VerticalHero(props) {
7
7
  var client = props.client;
@@ -26,7 +26,7 @@ import './debounce-1a993acf.js';
26
26
  import './index.es-29c1cef5.js';
27
27
  import 'react-dom';
28
28
  import './visibility-sensor-0baa4eea.js';
29
- import './index-73819142.js';
29
+ import './index-3849e3fe.js';
30
30
  import './index-5f9f807a.js';
31
31
  import './main-e4a934b2.js';
32
32
  import './entities-7cc3bf45.js';
@@ -37,7 +37,7 @@ import './_set-species-3f8319f5.js';
37
37
  import './Segment.js';
38
38
  import './Beam.js';
39
39
  import './AdSlot.js';
40
- import { B as BlockContent } from './BlockContent-e9b4ddcf.js';
40
+ import { B as BlockContent } from './BlockContent-c409aca5.js';
41
41
  import './index-c7e2ac95.js';
42
42
  import './smoothscroll-0cd4c7a6.js';
43
43
  import './GroupDeck.js';
@@ -46,7 +46,7 @@ import 'react-bootstrap';
46
46
  import './iconBase-602d52fe.js';
47
47
  import './index.esm-29e48d38.js';
48
48
  import VideoSeriesListing from './VideoSeriesListing.js';
49
- import { g as getSerializers } from './index-c3a5ff39.js';
49
+ import { g as getSerializers } from './index-2749e7d8.js';
50
50
  import './util-7700fc59.js';
51
51
  import './brightcove-react-player-loader.es-83f53e4e.js';
52
52
  import './_object-to-array-7e804fce.js';
@@ -10,7 +10,7 @@ import React__default from 'react';
10
10
  import 'prop-types';
11
11
  import { m as moment } from './moment-e2f9b20c.js';
12
12
  import 'react-dom';
13
- import { i as imageUrlBuilder } from './index-73819142.js';
13
+ import { i as imageUrlBuilder } from './index-3849e3fe.js';
14
14
  import { L as LazyLoad } from './index-5f9f807a.js';
15
15
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
16
16
 
@@ -27,7 +27,7 @@ import './debounce-1a993acf.js';
27
27
  import './index.es-29c1cef5.js';
28
28
  import 'react-dom';
29
29
  import './visibility-sensor-0baa4eea.js';
30
- import './index-73819142.js';
30
+ import './index-3849e3fe.js';
31
31
  import './index-5f9f807a.js';
32
32
  import './main-e4a934b2.js';
33
33
  import './stringify-4330ccdc.js';
@@ -38,7 +38,7 @@ import './Segment.js';
38
38
  import './Beam.js';
39
39
  import './AdSlot.js';
40
40
  import './ADInfeed-bb62ee44.js';
41
- import './lodash-17fdfebb.js';
41
+ import './lodash-ec8c6b48.js';
42
42
  import './ADlgInfeed-ef0a892e.js';
43
43
  import { g as getYoutubeId } from './index-c7e2ac95.js';
44
44
  import MasterDeck from './MasterDeck.js';
@@ -22,7 +22,7 @@ import { d as debounce_1 } from './debounce-1a993acf.js';
22
22
  import { I as InfiniteScroll } from './index.es-29c1cef5.js';
23
23
  import 'react-dom';
24
24
  import { V as VisibilitySensor } from './visibility-sensor-0baa4eea.js';
25
- import './index-73819142.js';
25
+ import './index-3849e3fe.js';
26
26
  import './index-5f9f807a.js';
27
27
  import './main-e4a934b2.js';
28
28
  import './slicedToArray-641f241f.js';
package/dist/esm/View.js CHANGED
@@ -24,7 +24,7 @@ import './isSymbol-807e927e.js';
24
24
  import './debounce-1a993acf.js';
25
25
  import { I as InfiniteScroll } from './index.es-29c1cef5.js';
26
26
  import 'react-dom';
27
- import './index-73819142.js';
27
+ import './index-3849e3fe.js';
28
28
  import './index-5f9f807a.js';
29
29
  import { m as main_36 } from './main-e4a934b2.js';
30
30
  import './entities-7cc3bf45.js';
@@ -35,14 +35,14 @@ import './_set-species-3f8319f5.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-e9b4ddcf.js';
38
+ import { B as BlockContent } from './BlockContent-c409aca5.js';
39
39
  import './index-c7e2ac95.js';
40
40
  import './smoothscroll-0cd4c7a6.js';
41
41
  import './GroupDeck.js';
42
42
  import 'react-bootstrap';
43
43
  import './iconBase-602d52fe.js';
44
44
  import './index.esm-29e48d38.js';
45
- import { I as InscreenSensor, r as renderAuthor, g as getSerializers } from './index-c3a5ff39.js';
45
+ import { I as InscreenSensor, r as renderAuthor, g as getSerializers } from './index-2749e7d8.js';
46
46
  import './util-7700fc59.js';
47
47
  import './brightcove-react-player-loader.es-83f53e4e.js';
48
48
  import './_object-to-array-7e804fce.js';
@@ -58,9 +58,9 @@ import { _ as _Object$keys } from './keys-8eda7a5c.js';
58
58
  import 'react-bootstrap/Dropdown';
59
59
  import { b as FaMinus, c as FaPlus } from './index.esm-cf08bf18.js';
60
60
  import getSeriesDetail from './getSeriesDetail.js';
61
- import 'nookies';
62
- import getQuery from './getQuery.js';
61
+ import './index-db3bb315.js';
63
62
  import getRelatedArticle from './getRelatedArticle.js';
63
+ import getQuery from './getQuery.js';
64
64
  import { g as getTargeting, a as getContentPlacementUrl } from './getTargeting-7211f12c.js';
65
65
  import getKeywords from './getKeywords.js';
66
66
  import urlFor from './urlFor.js';
@@ -7,7 +7,7 @@ import React__default from 'react';
7
7
  import 'prop-types';
8
8
  import { m as moment } from './moment-e2f9b20c.js';
9
9
  import 'react-dom';
10
- import { i as imageUrlBuilder } from './index-73819142.js';
10
+ import { i as imageUrlBuilder } from './index-3849e3fe.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-641f241f.js';
@@ -10,7 +10,7 @@ import './_is-array-58e95429.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-73819142.js';
13
+ import { i as imageUrlBuilder } from './index-3849e3fe.js';
14
14
  import { L as LazyLoad } from './index-5f9f807a.js';
15
15
  import { m as main_36, a as main_41, b as main_35 } from './main-e4a934b2.js';
16
16
  import { _ as _slicedToArray } from './slicedToArray-641f241f.js';
@@ -28,7 +28,6 @@ var YoutubeGroup = function YoutubeGroup(props) {
28
28
  var innerSlider = useRef(null);
29
29
  var tileArray = useRef([]);
30
30
  var viewableWindow = useRef(null);
31
- var viewableArea = useRef(null);
32
31
 
33
32
  var _useState = useState(0),
34
33
  _useState2 = _slicedToArray(_useState, 2),
@@ -72,47 +71,46 @@ var YoutubeGroup = function YoutubeGroup(props) {
72
71
  var setThumbSize = function setThumbSize() {
73
72
  var thumbSize = void 0;
74
73
  var scrollerVisible = false;
75
- var tileDividerWidth = parseInt(getComputedStyle(document.documentElement).fontSize) / 2 || 8;
76
74
 
77
75
  if (viewableWindow.current.offsetWidth > 1399) {
78
- thumbSize = Math.floor((viewableArea.current.clientWidth - tileDividerWidth * 5) / 6);
76
+ thumbSize = Math.floor(viewableWindow.current.clientWidth / 6);
79
77
  if (props.dataset.length > 5) {
80
78
  scrollerVisible = true;
81
79
  }
82
80
  }
83
81
  if (viewableWindow.current.offsetWidth < 1399 && viewableWindow.current.offsetWidth > 992) {
84
- thumbSize = Math.floor((viewableArea.current.clientWidth - tileDividerWidth * 5) / 6);
82
+ thumbSize = Math.floor((viewableWindow.current.clientWidth + 50) / 6);
85
83
  if (props.dataset.length > 5) {
86
84
  scrollerVisible = true;
87
85
  }
88
86
  }
89
87
  if (viewableWindow.current.offsetWidth < 992 && viewableWindow.current.offsetWidth > 768) {
90
- thumbSize = Math.floor((viewableArea.current.clientWidth - tileDividerWidth * 3) / 4);
88
+ thumbSize = Math.floor((viewableWindow.current.clientWidth + 50) / 4);
91
89
  if (props.dataset.length > 4) {
92
90
  scrollerVisible = true;
93
91
  }
94
92
  }
95
93
  if (viewableWindow.current.offsetWidth < 768 && viewableWindow.current.offsetWidth > 604) {
96
- thumbSize = Math.floor((viewableArea.current.clientWidth - tileDividerWidth * 2) / 3);
94
+ thumbSize = Math.floor((viewableWindow.current.clientWidth + 50) / 3);
97
95
  if (props.dataset.length > 3) {
98
96
  scrollerVisible = true;
99
97
  }
100
98
  }
101
99
  if (viewableWindow.current.offsetWidth < 604) {
102
- thumbSize = Math.floor((viewableArea.current.clientWidth - tileDividerWidth * 2) / 3);
100
+ thumbSize = Math.floor(viewableWindow.current.clientWidth / 3);
103
101
  if (props.dataset.length > 3) {
104
102
  scrollerVisible = true;
105
103
  }
106
104
  }
107
105
 
108
106
  if (main_36) {
109
- thumbSize = Math.floor((viewableArea.current.clientWidth - tileDividerWidth) / 2);
107
+ thumbSize = Math.floor(viewableWindow.current.clientWidth / 2);
110
108
  if (props.dataset.length > 2) {
111
109
  scrollerVisible = true;
112
110
  }
113
111
  }
114
112
  if (main_41) {
115
- thumbSize = Math.floor((viewableArea.current.clientWidth - tileDividerWidth * 2) / 3);
113
+ thumbSize = Math.floor((viewableWindow.current.clientWidth + 50) / 3);
116
114
  if (props.dataset.length > 3) {
117
115
  scrollerVisible = true;
118
116
  }
@@ -204,7 +202,7 @@ var YoutubeGroup = function YoutubeGroup(props) {
204
202
  { ref: viewableWindow, id: 'vid-slider', style: { maxWidth: '100%' }, className: 'col' },
205
203
  React__default.createElement(
206
204
  'div',
207
- { ref: viewableArea, className: 'row', style: { display: 'flex', alignItems: 'center' } },
205
+ { className: 'row', style: { display: 'flex', alignItems: 'center' } },
208
206
  showScroller && showScroller && React__default.createElement(
209
207
  'div',
210
208
  {
@@ -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-a4107da3.js';
3
3
  import './es6.string.iterator-c990c18c.js';
4
4
  import './_library-528f1934.js';
@@ -7,9 +7,420 @@ import './core.get-iterator-method-e1de7503.js';
7
7
  import './web.dom.iterable-4439f05a.js';
8
8
  import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-502f13b4.js';
9
9
  import './_set-species-3f8319f5.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 () {
@@ -86,13 +497,13 @@ var getRelatedArticle = function () {
86
497
 
87
498
 
88
499
  if (ctx && url) {
89
- cookies = parseCookies(ctx);
500
+ cookies = dist_3(ctx);
90
501
  prevSlugs = cookies['prevSlugs'];
91
502
 
92
503
  if (!!prevSlugs) {
93
- setCookie(ctx, 'prevSlugs', prevSlugs + ',"' + url + '"', {});
504
+ dist_2(ctx, 'prevSlugs', prevSlugs + ',"' + url + '"', {});
94
505
  filters = '&& !(url.current in [' + prevSlugs + '])';
95
- } else setCookie(ctx, 'prevSlugs', '"' + url + '"', {});
506
+ } else dist_2(ctx, 'prevSlugs', '"' + url + '"', {});
96
507
  }
97
508
 
98
509
  query = getQuery('related', filters, '', articleCount).replace('&& taxonomyMapping[]._ref in $taxonomy', '');
@@ -23,7 +23,7 @@ import 'next/router';
23
23
  import './isSymbol-807e927e.js';
24
24
  import './debounce-1a993acf.js';
25
25
  import 'react-dom';
26
- import './index-73819142.js';
26
+ import './index-3849e3fe.js';
27
27
  import './index-5f9f807a.js';
28
28
  import './main-e4a934b2.js';
29
29
  import './entities-7cc3bf45.js';
@@ -34,14 +34,14 @@ import './_set-species-3f8319f5.js';
34
34
  import './Segment.js';
35
35
  import './Beam.js';
36
36
  import './AdSlot.js';
37
- import './BlockContent-e9b4ddcf.js';
37
+ import './BlockContent-c409aca5.js';
38
38
  import './index-c7e2ac95.js';
39
39
  import './smoothscroll-0cd4c7a6.js';
40
40
  import './GroupDeck.js';
41
41
  import 'react-bootstrap';
42
42
  import './iconBase-602d52fe.js';
43
43
  import './index.esm-29e48d38.js';
44
- export { g as default } from './index-c3a5ff39.js';
44
+ export { g as default } from './index-2749e7d8.js';
45
45
  import './util-7700fc59.js';
46
46
  import './brightcove-react-player-loader.es-83f53e4e.js';
47
47
  import './_object-to-array-7e804fce.js';