@mjhls/mjh-framework 1.0.844-beta.2 → 1.0.844-schema-fix-v1

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 (249) hide show
  1. package/dist/cjs/AD.js +10 -9
  2. package/dist/cjs/AD300x250.js +10 -9
  3. package/dist/cjs/AD300x250x600.js +10 -9
  4. package/dist/cjs/AD728x90.js +11 -10
  5. package/dist/cjs/ADFloatingFooter.js +12 -11
  6. package/dist/cjs/ADFooter.js +9 -8
  7. package/dist/cjs/ADGutter.js +12 -11
  8. package/dist/cjs/{ADInfeed-9b50464b.js → ADInfeed-1417ce9a.js} +11 -9
  9. package/dist/cjs/ADSkyscraper.js +12 -11
  10. package/dist/cjs/ADSponsoredResources.js +12 -11
  11. package/dist/cjs/ADWebcast.js +12 -11
  12. package/dist/cjs/ADWelcome.js +16 -15
  13. package/dist/cjs/{ADlgInfeed-65e48ce7.js → ADlgInfeed-01deca1a.js} +7 -6
  14. package/dist/cjs/AccordionPanel.js +24 -22
  15. package/dist/cjs/AdSlot.js +14 -13
  16. package/dist/cjs/AdSlotsProvider.js +12 -10
  17. package/dist/cjs/AlgoliaSearch.js +622 -611
  18. package/dist/cjs/AlphabeticList.js +16 -15
  19. package/dist/cjs/ArticleCarousel.js +11 -10
  20. package/dist/cjs/ArticleProgramLandingPage.js +25 -23
  21. package/dist/cjs/ArticleSeriesLandingPage.js +20 -19
  22. package/dist/cjs/ArticleSeriesListing.js +40 -39
  23. package/dist/cjs/Auth.js +3516 -0
  24. package/dist/cjs/AuthWrapper.js +119 -38
  25. package/dist/cjs/{AuthorComponent-bb831b74.js → AuthorComponent-ac8972ce.js} +13 -12
  26. package/dist/cjs/{BlockContent-091a991f.js → BlockContent-8b494587.js} +25 -24
  27. package/dist/cjs/Breadcrumbs.js +23 -21
  28. package/dist/cjs/CMEDeck.js +64 -64
  29. package/dist/cjs/Column1.js +14 -11
  30. package/dist/cjs/Column2.js +22 -19
  31. package/dist/cjs/Column3.js +35 -32
  32. package/dist/cjs/ConferenceArticleCard.js +18 -17
  33. package/dist/cjs/ConferenceBanner-6c9e718a.js +24 -0
  34. package/dist/cjs/DeckContent.js +76 -72
  35. package/dist/cjs/DeckQueue.js +72 -68
  36. package/dist/cjs/{Dfp-26baccf1.js → Dfp-391fd124.js} +23 -22
  37. package/dist/cjs/EventsDeck.js +123 -116
  38. package/dist/cjs/ExternalResources.js +48 -46
  39. package/dist/cjs/Feature.js +25 -23
  40. package/dist/cjs/ForbesHero.js +35 -34
  41. package/dist/cjs/GridContent.js +208 -203
  42. package/dist/cjs/GridHero.js +36 -35
  43. package/dist/cjs/GroupDeck.js +49 -48
  44. package/dist/cjs/HamMagazine.js +121 -116
  45. package/dist/cjs/Header.js +14 -12
  46. package/dist/cjs/Hero.js +10 -9
  47. package/dist/cjs/HighlightenVideo.js +17 -16
  48. package/dist/cjs/HorizontalArticleListing.js +38 -36
  49. package/dist/cjs/HorizontalHero.js +24 -23
  50. package/dist/cjs/IssueContentDeck.js +70 -65
  51. package/dist/cjs/IssueDeck.js +65 -60
  52. package/dist/cjs/IssueLanding.js +30 -28
  53. package/dist/cjs/LeftNav.js +22 -20
  54. package/dist/cjs/MasterDeck.js +50 -49
  55. package/dist/cjs/MediaSeriesLanding.js +731 -783
  56. package/dist/cjs/NavDvm.js +68 -63
  57. package/dist/cjs/{NavFooter-76c913e3.js → NavFooter-3dcd99a8.js} +15 -14
  58. package/dist/cjs/NavMagazine.js +121 -116
  59. package/dist/cjs/NavNative.js +116 -108
  60. package/dist/cjs/OncliveHero.js +17 -17
  61. package/dist/cjs/OncliveLargeHero.js +64 -63
  62. package/dist/cjs/PageFilter.js +9 -8
  63. package/dist/cjs/PartnerDetailListing.js +71 -69
  64. package/dist/cjs/PdfDownload.js +9 -8
  65. package/dist/cjs/PopUpModal.js +15 -13
  66. package/dist/cjs/PubSection.js +20 -19
  67. package/dist/cjs/PubToc.js +8 -7
  68. package/dist/cjs/PublicationDeck.js +64 -59
  69. package/dist/cjs/PublicationLanding.js +87 -83
  70. package/dist/cjs/QueueDeckExpanded.js +285 -285
  71. package/dist/cjs/RecentNews.js +20 -19
  72. package/dist/cjs/RelatedContent.js +23 -22
  73. package/dist/cjs/RelatedTopicsDropdown.js +22 -19
  74. package/dist/cjs/RolesDeck.js +32 -27
  75. package/dist/cjs/Search.js +16 -12
  76. package/dist/cjs/SeriesListingDeck.js +26 -26
  77. package/dist/cjs/{SeriesSlider-8bbc989f.js → SeriesSlider-0d3bf265.js} +34 -33
  78. package/dist/cjs/SideFooter.js +24 -23
  79. package/dist/cjs/SocialIcons.js +10 -9
  80. package/dist/cjs/{SocialSearchComponent-cea213aa.js → SocialSearchComponent-19548e2a.js} +38 -34
  81. package/dist/cjs/SocialShare.js +31 -29
  82. package/dist/cjs/TaxonomyCard.js +59 -54
  83. package/dist/cjs/TaxonomyDescription.js +23 -21
  84. package/dist/cjs/TemplateNormal.js +35 -34
  85. package/dist/cjs/ThumbnailCard.js +19 -17
  86. package/dist/cjs/Ustream.js +22 -21
  87. package/dist/cjs/VerticalHero.js +16 -15
  88. package/dist/cjs/VideoProgramLandingPage.js +45 -40
  89. package/dist/cjs/VideoSeriesCard.js +24 -23
  90. package/dist/cjs/VideoSeriesFilter.js +9 -9
  91. package/dist/cjs/VideoSeriesLandingPage.js +26 -25
  92. package/dist/cjs/VideoSeriesListing.js +57 -56
  93. package/dist/cjs/View.js +209 -202
  94. package/dist/cjs/YahooHero.js +31 -30
  95. package/dist/cjs/YoutubeGroup.js +51 -50
  96. package/dist/cjs/{brightcove-react-player-loader.es-156bd4d6.js → brightcove-react-player-loader.es-5c98aec7.js} +10 -8
  97. package/dist/cjs/faundadb.js +4 -321
  98. package/dist/cjs/getRelatedArticle.js +374 -21
  99. package/dist/cjs/getSerializers.js +12 -11
  100. package/dist/cjs/{getTargeting-021d644c.js → getTargeting-15ad167c.js} +2 -2
  101. package/dist/cjs/getTargeting.js +1 -1
  102. package/dist/cjs/iconBase-68959171.js +0 -3
  103. package/dist/cjs/{index-98e01cb9.js → index-2cf30c83.js} +9 -8
  104. package/dist/cjs/{index-3294d3bc.js → index-6367b7bf.js} +16 -17
  105. package/dist/cjs/{index-4fdc043f.js → index-73ac3122.js} +884 -1477
  106. package/dist/cjs/{index-96b3db50.js → index-9d365128.js} +12 -10
  107. package/dist/cjs/{index-be0c82be.js → index-b5eb3ff8.js} +20 -19
  108. package/dist/cjs/index-bd6c9f56.js +211 -0
  109. package/dist/cjs/{index.es-9110add6.js → index.es-f3e47207.js} +31 -12
  110. package/dist/cjs/{index.esm-ff47db6f.js → index.esm-05850a2f.js} +5 -12
  111. package/dist/cjs/{index.esm-4d410430.js → index.esm-3ffa049c.js} +20 -20
  112. package/dist/cjs/{index.esm-e32d3e8e.js → index.esm-44f3e2d0.js} +3 -6
  113. package/dist/cjs/{index.esm-90433435.js → index.esm-974f47d9.js} +6 -15
  114. package/dist/cjs/index.js +68 -57
  115. package/dist/cjs/{inherits-9953db94.js → inherits-0c7830c5.js} +4 -4
  116. package/dist/cjs/{lodash-fc2922d0.js → lodash-7fd85bcf.js} +71 -22
  117. package/dist/cjs/{main-02daeefe.js → main-7b5e57b0.js} +90 -54
  118. package/dist/cjs/md5-e1ca5797.js +323 -0
  119. package/dist/cjs/{moment-575fe24c.js → moment-ca3bd9fb.js} +10 -8
  120. package/dist/cjs/{react-social-icons-f7f48f71.js → react-social-icons-07939b41.js} +12 -11
  121. package/dist/cjs/timeDifferenceCalc.js +1 -1
  122. package/dist/cjs/{typeof-725500bc.js → typeof-9d7f610f.js} +1 -1
  123. package/dist/cjs/urlFor.js +3 -3
  124. package/dist/cjs/util-f2c1b65b.js +576 -0
  125. package/dist/cjs/{visibility-sensor-ad5e3116.js → visibility-sensor-eb2c5b69.js} +7 -5
  126. package/dist/esm/AD.js +7 -7
  127. package/dist/esm/AD300x250.js +7 -7
  128. package/dist/esm/AD300x250x600.js +7 -7
  129. package/dist/esm/AD728x90.js +8 -8
  130. package/dist/esm/ADFloatingFooter.js +9 -9
  131. package/dist/esm/ADFooter.js +6 -6
  132. package/dist/esm/ADGutter.js +9 -9
  133. package/dist/esm/{ADInfeed-99535410.js → ADInfeed-bb64ffeb.js} +7 -7
  134. package/dist/esm/ADSkyscraper.js +9 -9
  135. package/dist/esm/ADSponsoredResources.js +9 -9
  136. package/dist/esm/ADWebcast.js +9 -9
  137. package/dist/esm/ADWelcome.js +13 -13
  138. package/dist/esm/{ADlgInfeed-0d359144.js → ADlgInfeed-18efe2e7.js} +4 -4
  139. package/dist/esm/AccordionPanel.js +17 -17
  140. package/dist/esm/AdSlot.js +5 -5
  141. package/dist/esm/AdSlotsProvider.js +5 -5
  142. package/dist/esm/AlgoliaSearch.js +251 -241
  143. package/dist/esm/AlphabeticList.js +13 -13
  144. package/dist/esm/ArticleCarousel.js +8 -8
  145. package/dist/esm/ArticleProgramLandingPage.js +21 -20
  146. package/dist/esm/ArticleSeriesLandingPage.js +17 -17
  147. package/dist/esm/ArticleSeriesListing.js +36 -36
  148. package/dist/esm/Auth.js +3496 -0
  149. package/dist/esm/AuthWrapper.js +116 -36
  150. package/dist/esm/{AuthorComponent-34b16174.js → AuthorComponent-8ffd4679.js} +10 -10
  151. package/dist/esm/{BlockContent-e9b4ddcf.js → BlockContent-d05b5b23.js} +4 -4
  152. package/dist/esm/Breadcrumbs.js +11 -11
  153. package/dist/esm/CMEDeck.js +61 -61
  154. package/dist/esm/Column1.js +9 -9
  155. package/dist/esm/Column2.js +17 -17
  156. package/dist/esm/Column3.js +30 -30
  157. package/dist/esm/ConferenceArticleCard.js +15 -15
  158. package/dist/esm/{ConferenceBanner-8792ebd2.js → ConferenceBanner-9162d0ca.js} +4 -4
  159. package/dist/esm/DeckContent.js +68 -68
  160. package/dist/esm/DeckQueue.js +64 -64
  161. package/dist/esm/{Dfp-b7236041.js → Dfp-2f9796e1.js} +10 -10
  162. package/dist/esm/EventsDeck.js +92 -92
  163. package/dist/esm/ExternalResources.js +42 -41
  164. package/dist/esm/Feature.js +17 -17
  165. package/dist/esm/ForbesHero.js +28 -28
  166. package/dist/esm/GridContent.js +172 -172
  167. package/dist/esm/GridHero.js +29 -29
  168. package/dist/esm/GroupDeck.js +36 -36
  169. package/dist/esm/HamMagazine.js +91 -91
  170. package/dist/esm/Header.js +8 -8
  171. package/dist/esm/Hero.js +7 -7
  172. package/dist/esm/HighlightenVideo.js +14 -14
  173. package/dist/esm/HorizontalArticleListing.js +35 -34
  174. package/dist/esm/HorizontalHero.js +21 -21
  175. package/dist/esm/IssueContentDeck.js +53 -53
  176. package/dist/esm/IssueDeck.js +54 -54
  177. package/dist/esm/IssueLanding.js +27 -26
  178. package/dist/esm/LeftNav.js +16 -16
  179. package/dist/esm/MasterDeck.js +46 -46
  180. package/dist/esm/MediaSeriesLanding.js +451 -506
  181. package/dist/esm/NavDvm.js +46 -46
  182. package/dist/esm/{NavFooter-e27bd93b.js → NavFooter-c29526b7.js} +12 -12
  183. package/dist/esm/NavMagazine.js +93 -93
  184. package/dist/esm/NavNative.js +83 -83
  185. package/dist/esm/OncliveHero.js +14 -15
  186. package/dist/esm/OncliveLargeHero.js +52 -52
  187. package/dist/esm/PageFilter.js +6 -6
  188. package/dist/esm/PartnerDetailListing.js +67 -66
  189. package/dist/esm/PdfDownload.js +6 -6
  190. package/dist/esm/PopUpModal.js +8 -8
  191. package/dist/esm/PubSection.js +17 -17
  192. package/dist/esm/PubToc.js +5 -5
  193. package/dist/esm/PublicationDeck.js +51 -51
  194. package/dist/esm/PublicationLanding.js +69 -69
  195. package/dist/esm/QueueDeckExpanded.js +251 -251
  196. package/dist/esm/RecentNews.js +17 -17
  197. package/dist/esm/RelatedContent.js +17 -17
  198. package/dist/esm/RelatedTopicsDropdown.js +11 -11
  199. package/dist/esm/RolesDeck.js +25 -25
  200. package/dist/esm/Search.js +7 -7
  201. package/dist/esm/SeriesListingDeck.js +20 -20
  202. package/dist/esm/{SeriesSlider-a866bb21.js → SeriesSlider-7d89f4d9.js} +24 -24
  203. package/dist/esm/SideFooter.js +19 -19
  204. package/dist/esm/SocialIcons.js +7 -7
  205. package/dist/esm/{SocialSearchComponent-03c3e869.js → SocialSearchComponent-47815365.js} +28 -28
  206. package/dist/esm/SocialShare.js +25 -25
  207. package/dist/esm/TaxonomyCard.js +50 -50
  208. package/dist/esm/TaxonomyDescription.js +17 -16
  209. package/dist/esm/TemplateNormal.js +31 -31
  210. package/dist/esm/ThumbnailCard.js +10 -10
  211. package/dist/esm/Ustream.js +18 -18
  212. package/dist/esm/VerticalHero.js +13 -13
  213. package/dist/esm/VideoProgramLandingPage.js +33 -32
  214. package/dist/esm/VideoSeriesCard.js +17 -17
  215. package/dist/esm/VideoSeriesFilter.js +6 -6
  216. package/dist/esm/VideoSeriesLandingPage.js +17 -17
  217. package/dist/esm/VideoSeriesListing.js +53 -53
  218. package/dist/esm/View.js +185 -182
  219. package/dist/esm/YahooHero.js +25 -25
  220. package/dist/esm/YoutubeGroup.js +35 -35
  221. package/dist/esm/{brightcove-react-player-loader.es-83f53e4e.js → brightcove-react-player-loader.es-4abff0b1.js} +7 -6
  222. package/dist/esm/faundadb.js +2 -319
  223. package/dist/esm/getRelatedArticle.js +374 -21
  224. package/dist/esm/getSerializers.js +12 -11
  225. package/dist/esm/{index-73819142.js → index-51a80699.js} +20 -19
  226. package/dist/esm/{index-5f7e79e7.js → index-6c12bdd5.js} +4 -4
  227. package/dist/esm/{index-ef6d5dcf.js → index-c00b0bbb.js} +16 -17
  228. package/dist/esm/index-db3bb315.js +207 -0
  229. package/dist/esm/{index-fb819516.js → index-e537f766.js} +833 -1433
  230. package/dist/esm/{index-41a678ea.js → index-f7fb1e25.js} +3 -3
  231. package/dist/esm/{index.es-29c1cef5.js → index.es-c6222053.js} +28 -10
  232. package/dist/esm/{index.esm-29e48d38.js → index.esm-3fdda599.js} +6 -15
  233. package/dist/esm/{index.esm-fd746768.js → index.esm-8ee5ff72.js} +17 -18
  234. package/dist/esm/{index.esm-cf08bf18.js → index.esm-a8ff922c.js} +5 -12
  235. package/dist/esm/{index.esm-f8aaeeeb.js → index.esm-c6715e80.js} +3 -6
  236. package/dist/esm/index.js +55 -48
  237. package/dist/esm/{inherits-cf8dde54.js → inherits-75d45541.js} +1 -1
  238. package/dist/esm/{lodash-17fdfebb.js → lodash-ec8c6b48.js} +71 -22
  239. package/dist/esm/{main-e4a934b2.js → main-747e7d25.js} +87 -52
  240. package/dist/esm/md5-4e42248e.js +321 -0
  241. package/dist/esm/{moment-e2f9b20c.js → moment-b6f49411.js} +10 -8
  242. package/dist/esm/{react-social-icons-a7d5c5c7.js → react-social-icons-3822f1ce.js} +5 -5
  243. package/dist/esm/timeDifferenceCalc.js +1 -1
  244. package/dist/esm/{typeof-6435ba1c.js → typeof-af9c50d8.js} +1 -1
  245. package/dist/esm/urlFor.js +1 -1
  246. package/dist/esm/util-7700fc59.js +574 -0
  247. package/dist/esm/{visibility-sensor-72fd8f8b.js → visibility-sensor-f40c2564.js} +2 -2
  248. package/package.json +2 -6
  249. package/dist/cjs/ConferenceBanner-4a16fddc.js +0 -23
@@ -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';
@@ -6,18 +6,369 @@ import './_iter-detect-5d49a330.js';
6
6
  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-fc1c2e29.js';
9
+ import { c as cookie } from './index-db3bb315.js';
9
10
  import getQuery from './getQuery.js';
10
11
 
12
+ var defaultParseOptions = {
13
+ decodeValues: true,
14
+ map: false,
15
+ silent: false,
16
+ };
17
+
18
+ function isNonEmptyString(str) {
19
+ return typeof str === "string" && !!str.trim();
20
+ }
21
+
22
+ function parseString(setCookieValue, options) {
23
+ var parts = setCookieValue.split(";").filter(isNonEmptyString);
24
+ var nameValue = parts.shift().split("=");
25
+ var name = nameValue.shift();
26
+ var value = nameValue.join("="); // everything after the first =, joined by a "=" if there was more than one part
27
+
28
+ options = options
29
+ ? Object.assign({}, defaultParseOptions, options)
30
+ : defaultParseOptions;
31
+
32
+ var cookie = {
33
+ name: name, // grab everything before the first =
34
+ value: options.decodeValues ? decodeURIComponent(value) : value, // decode cookie value
35
+ };
36
+
37
+ parts.forEach(function (part) {
38
+ var sides = part.split("=");
39
+ var key = sides.shift().trimLeft().toLowerCase();
40
+ var value = sides.join("=");
41
+ if (key === "expires") {
42
+ cookie.expires = new Date(value);
43
+ } else if (key === "max-age") {
44
+ cookie.maxAge = parseInt(value, 10);
45
+ } else if (key === "secure") {
46
+ cookie.secure = true;
47
+ } else if (key === "httponly") {
48
+ cookie.httpOnly = true;
49
+ } else if (key === "samesite") {
50
+ cookie.sameSite = value;
51
+ } else {
52
+ cookie[key] = value;
53
+ }
54
+ });
55
+
56
+ return cookie;
57
+ }
58
+
59
+ function parse(input, options) {
60
+ options = options
61
+ ? Object.assign({}, defaultParseOptions, options)
62
+ : defaultParseOptions;
63
+
64
+ if (!input) {
65
+ if (!options.map) {
66
+ return [];
67
+ } else {
68
+ return {};
69
+ }
70
+ }
71
+
72
+ if (input.headers && input.headers["set-cookie"]) {
73
+ // fast-path for node.js (which automatically normalizes header names to lower-case
74
+ input = input.headers["set-cookie"];
75
+ } else if (input.headers) {
76
+ // slow-path for other environments - see #25
77
+ var sch =
78
+ input.headers[
79
+ Object.keys(input.headers).find(function (key) {
80
+ return key.toLowerCase() === "set-cookie";
81
+ })
82
+ ];
83
+ // warn if called on a request-like object with a cookie header rather than a set-cookie header - see #34, 36
84
+ if (!sch && input.headers.cookie && !options.silent) {
85
+ console.warn(
86
+ "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."
87
+ );
88
+ }
89
+ input = sch;
90
+ }
91
+ if (!Array.isArray(input)) {
92
+ input = [input];
93
+ }
94
+
95
+ options = options
96
+ ? Object.assign({}, defaultParseOptions, options)
97
+ : defaultParseOptions;
98
+
99
+ if (!options.map) {
100
+ return input.filter(isNonEmptyString).map(function (str) {
101
+ return parseString(str, options);
102
+ });
103
+ } else {
104
+ var cookies = {};
105
+ return input.filter(isNonEmptyString).reduce(function (cookies, str) {
106
+ var cookie = parseString(str, options);
107
+ cookies[cookie.name] = cookie;
108
+ return cookies;
109
+ }, cookies);
110
+ }
111
+ }
112
+
113
+ /*
114
+ Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas
115
+ that are within a single set-cookie field-value, such as in the Expires portion.
116
+
117
+ This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2
118
+ Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128
119
+ React Native's fetch does this for *every* header, including set-cookie.
120
+
121
+ Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25
122
+ Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation
123
+ */
124
+ function splitCookiesString(cookiesString) {
125
+ if (Array.isArray(cookiesString)) {
126
+ return cookiesString;
127
+ }
128
+ if (typeof cookiesString !== "string") {
129
+ return [];
130
+ }
131
+
132
+ var cookiesStrings = [];
133
+ var pos = 0;
134
+ var start;
135
+ var ch;
136
+ var lastComma;
137
+ var nextStart;
138
+ var cookiesSeparatorFound;
139
+
140
+ function skipWhitespace() {
141
+ while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) {
142
+ pos += 1;
143
+ }
144
+ return pos < cookiesString.length;
145
+ }
146
+
147
+ function notSpecialChar() {
148
+ ch = cookiesString.charAt(pos);
149
+
150
+ return ch !== "=" && ch !== ";" && ch !== ",";
151
+ }
152
+
153
+ while (pos < cookiesString.length) {
154
+ start = pos;
155
+ cookiesSeparatorFound = false;
156
+
157
+ while (skipWhitespace()) {
158
+ ch = cookiesString.charAt(pos);
159
+ if (ch === ",") {
160
+ // ',' is a cookie separator if we have later first '=', not ';' or ','
161
+ lastComma = pos;
162
+ pos += 1;
163
+
164
+ skipWhitespace();
165
+ nextStart = pos;
166
+
167
+ while (pos < cookiesString.length && notSpecialChar()) {
168
+ pos += 1;
169
+ }
170
+
171
+ // currently special character
172
+ if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") {
173
+ // we found cookies separator
174
+ cookiesSeparatorFound = true;
175
+ // pos is inside the next cookie, so back up and return it.
176
+ pos = nextStart;
177
+ cookiesStrings.push(cookiesString.substring(start, lastComma));
178
+ start = pos;
179
+ } else {
180
+ // in param ',' or param separator ';',
181
+ // we continue from that comma
182
+ pos = lastComma + 1;
183
+ }
184
+ } else {
185
+ pos += 1;
186
+ }
187
+ }
188
+
189
+ if (!cookiesSeparatorFound || pos >= cookiesString.length) {
190
+ cookiesStrings.push(cookiesString.substring(start, cookiesString.length));
191
+ }
192
+ }
193
+
194
+ return cookiesStrings;
195
+ }
196
+
197
+ var setCookie = parse;
198
+ var parse_1 = parse;
199
+ var parseString_1 = parseString;
200
+ var splitCookiesString_1 = splitCookiesString;
201
+ setCookie.parse = parse_1;
202
+ setCookie.parseString = parseString_1;
203
+ setCookie.splitCookiesString = splitCookiesString_1;
204
+
205
+ var dist = createCommonjsModule(function (module, exports) {
206
+ var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
207
+ __assign = Object.assign || function(t) {
208
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
209
+ s = arguments[i];
210
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
211
+ t[p] = s[p];
212
+ }
213
+ return t;
214
+ };
215
+ return __assign.apply(this, arguments);
216
+ };
217
+ Object.defineProperty(exports, "__esModule", { value: true });
218
+ exports.destroyCookie = exports.setCookie = exports.parseCookies = void 0;
219
+
220
+
221
+ var isBrowser = function () { return typeof window !== 'undefined'; };
222
+ function hasSameProperties(a, b) {
223
+ var aProps = Object.getOwnPropertyNames(a);
224
+ var bProps = Object.getOwnPropertyNames(b);
225
+ if (aProps.length !== bProps.length) {
226
+ return false;
227
+ }
228
+ for (var i = 0; i < aProps.length; i++) {
229
+ var propName = aProps[i];
230
+ if (a[propName] !== b[propName]) {
231
+ return false;
232
+ }
233
+ }
234
+ return true;
235
+ }
236
+ /**
237
+ * Compare the cookie and return true if the cookies has equivalent
238
+ * options and the cookies would be overwritten in the browser storage.
239
+ *
240
+ * @param a first Cookie for comparison
241
+ * @param b second Cookie for comparison
242
+ */
243
+ function areCookiesEqual(a, b) {
244
+ var sameSiteSame = a.sameSite === b.sameSite;
245
+ if (typeof a.sameSite === 'string' && typeof b.sameSite === 'string') {
246
+ sameSiteSame = a.sameSite.toLowerCase() === b.sameSite.toLowerCase();
247
+ }
248
+ return (hasSameProperties(__assign(__assign({}, a), { sameSite: undefined }), __assign(__assign({}, b), { sameSite: undefined })) && sameSiteSame);
249
+ }
250
+ /**
251
+ * Create an instance of the Cookie interface
252
+ *
253
+ * @param name name of the Cookie
254
+ * @param value value of the Cookie
255
+ * @param options Cookie options
256
+ */
257
+ function createCookie(name, value, options) {
258
+ var sameSite = options.sameSite;
259
+ if (sameSite === true) {
260
+ sameSite = 'strict';
261
+ }
262
+ if (sameSite === undefined || sameSite === false) {
263
+ sameSite = 'lax';
264
+ }
265
+ var cookieToSet = __assign(__assign({}, options), { sameSite: sameSite });
266
+ delete cookieToSet.encode;
267
+ return __assign({ name: name, value: value }, cookieToSet);
268
+ }
269
+ /**
270
+ *
271
+ * Parses cookies.
272
+ *
273
+ * @param ctx
274
+ * @param options
275
+ */
276
+ function parseCookies(ctx, options) {
277
+ if (ctx && ctx.req && ctx.req.headers && ctx.req.headers.cookie) {
278
+ return cookie.parse(ctx.req.headers.cookie, options);
279
+ }
280
+ if (isBrowser()) {
281
+ return cookie.parse(document.cookie, options);
282
+ }
283
+ return {};
284
+ }
285
+ exports.parseCookies = parseCookies;
286
+ /**
287
+ *
288
+ * Sets a cookie.
289
+ *
290
+ * @param ctx
291
+ * @param name
292
+ * @param value
293
+ * @param options
294
+ */
295
+ function setCookie$1(ctx, name, value, options) {
296
+ if (ctx && ctx.res && ctx.res.getHeader && ctx.res.setHeader) {
297
+ var cookies = ctx.res.getHeader('Set-Cookie') || [];
298
+ if (typeof cookies === 'string')
299
+ cookies = [cookies];
300
+ if (typeof cookies === 'number')
301
+ cookies = [];
302
+ var parsedCookies = setCookie.parse(cookies);
303
+ var cookiesToSet_1 = [];
304
+ parsedCookies.forEach(function (parsedCookie) {
305
+ if (!areCookiesEqual(parsedCookie, createCookie(name, value, options))) {
306
+ cookiesToSet_1.push(cookie.serialize(parsedCookie.name, parsedCookie.value, __assign({ encode: function (val) { return val; } }, parsedCookie)));
307
+ }
308
+ });
309
+ cookiesToSet_1.push(cookie.serialize(name, value, options));
310
+ if (!ctx.res.finished) {
311
+ ctx.res.setHeader('Set-Cookie', cookiesToSet_1);
312
+ }
313
+ }
314
+ if (isBrowser()) {
315
+ if (options && options.httpOnly) {
316
+ throw new Error('Can not set a httpOnly cookie in the browser.');
317
+ }
318
+ document.cookie = cookie.serialize(name, value, options);
319
+ }
320
+ return {};
321
+ }
322
+ exports.setCookie = setCookie$1;
323
+ /**
324
+ *
325
+ * Destroys a cookie with a particular name.
326
+ *
327
+ * @param ctx
328
+ * @param name
329
+ * @param options
330
+ */
331
+ function destroyCookie(ctx, name, options) {
332
+ var opts = __assign(__assign({}, (options || {})), { maxAge: -1 });
333
+ if (ctx && ctx.res && ctx.res.setHeader && ctx.res.getHeader) {
334
+ var cookies = ctx.res.getHeader('Set-Cookie') || [];
335
+ if (typeof cookies === 'string')
336
+ cookies = [cookies];
337
+ if (typeof cookies === 'number')
338
+ cookies = [];
339
+ cookies.push(cookie.serialize(name, '', opts));
340
+ ctx.res.setHeader('Set-Cookie', cookies);
341
+ }
342
+ if (isBrowser()) {
343
+ document.cookie = cookie.serialize(name, '', opts);
344
+ }
345
+ return {};
346
+ }
347
+ exports.destroyCookie = destroyCookie;
348
+ exports.default = {
349
+ set: setCookie$1,
350
+ get: parseCookies,
351
+ destroy: destroyCookie,
352
+ };
353
+
354
+ });
355
+
356
+ unwrapExports(dist);
357
+ var dist_1 = dist.destroyCookie;
358
+ var dist_2 = dist.setCookie;
359
+ var dist_3 = dist.parseCookies;
360
+
11
361
  var _this = undefined;
12
362
 
13
363
  var getRelatedArticle = function () {
14
364
  var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee() {
365
+ var ctx = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
15
366
  var client = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
16
367
  var article = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
17
368
  var prevUrl = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '/';
18
369
  var articleCount = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
19
370
 
20
- var _article$url, url, documentGroupMapping, issueGroup, content_placement, references, params, articles, filters, query;
371
+ var _article$url, url, documentGroupMapping, issueGroup, content_placement, references, params, articles, filters, cookies, prevSlugs, query;
21
372
 
22
373
  return regenerator.wrap(function _callee$(_context) {
23
374
  while (1) {
@@ -75,46 +426,48 @@ var getRelatedArticle = function () {
75
426
  articles = null;
76
427
 
77
428
  if (!(references && references.length > 0)) {
78
- _context.next = 23;
429
+ _context.next = 24;
79
430
  break;
80
431
  }
81
432
 
82
433
  filters = '&& references("' + references.join('","') + '") ';
83
434
 
84
- // if (ctx && url) {
85
- // const cookies = parseCookies(ctx)
86
- // let prevSlugs = cookies['prevSlugs']
87
- // if (!!prevSlugs) {
88
- // if (!prevSlugs.includes(url)) setCookie(ctx, 'prevSlugs', `${prevSlugs},"${url}"`, {})
89
- // filters = `${filters} && !(url.current in [${prevSlugs}])`
90
- // } else setCookie(ctx, 'prevSlugs', `"${url}"`, {})
91
- // }
435
+
436
+ if (ctx && url) {
437
+ cookies = dist_3(ctx);
438
+ prevSlugs = cookies['prevSlugs'];
439
+
440
+ if (!!prevSlugs) {
441
+ if (!prevSlugs.includes(url)) dist_2(ctx, 'prevSlugs', prevSlugs + ',"' + url + '"', {});
442
+ filters = filters + ' && !(url.current in [' + prevSlugs + '])';
443
+ } else dist_2(ctx, 'prevSlugs', '"' + url + '"', {});
444
+ }
92
445
 
93
446
  query = getQuery('related', filters, '', articleCount).replace('&& taxonomyMapping[]._ref in $taxonomy', '');
94
- _context.prev = 14;
95
- _context.next = 17;
447
+ _context.prev = 15;
448
+ _context.next = 18;
96
449
  return client.fetch(query, params);
97
450
 
98
- case 17:
451
+ case 18:
99
452
  articles = _context.sent;
100
- _context.next = 23;
453
+ _context.next = 24;
101
454
  break;
102
455
 
103
- case 20:
104
- _context.prev = 20;
105
- _context.t0 = _context['catch'](14);
456
+ case 21:
457
+ _context.prev = 21;
458
+ _context.t0 = _context['catch'](15);
106
459
 
107
460
  console.error(_context.t0);
108
461
 
109
- case 23:
462
+ case 24:
110
463
  return _context.abrupt('return', articles);
111
464
 
112
- case 24:
465
+ case 25:
113
466
  case 'end':
114
467
  return _context.stop();
115
468
  }
116
469
  }
117
- }, _callee, _this, [[14, 20]]);
470
+ }, _callee, _this, [[15, 21]]);
118
471
  }));
119
472
 
120
473
  return function getRelatedArticle() {
@@ -8,27 +8,27 @@ import './core.get-iterator-method-e1de7503.js';
8
8
  import './_object-pie-33c40e79.js';
9
9
  import './extends-6f2fcc99.js';
10
10
  import './_object-sap-964b6feb.js';
11
- import './inherits-cf8dde54.js';
11
+ import './inherits-75d45541.js';
12
12
  import './define-property-8af5f002.js';
13
13
  import './web.dom.iterable-4439f05a.js';
14
- import './typeof-6435ba1c.js';
14
+ import './typeof-af9c50d8.js';
15
15
  import './_is-array-58e95429.js';
16
16
  import 'react';
17
17
  import './events-6c3a7a63.js';
18
- import './index-41a678ea.js';
18
+ import './index-f7fb1e25.js';
19
19
  import 'prop-types';
20
20
  import 'react-bootstrap/Row';
21
21
  import 'react-bootstrap/Col';
22
- import './moment-e2f9b20c.js';
22
+ import './moment-b6f49411.js';
23
23
  import 'next/router';
24
24
  import './isSymbol-1981418f.js';
25
25
  import './debounce-9207d8ee.js';
26
26
  import './toNumber-2f7a84cd.js';
27
27
  import 'react-dom';
28
- import './index-73819142.js';
28
+ import './index-51a80699.js';
29
29
  import './urlFor.js';
30
- import './index-5f7e79e7.js';
31
- import './main-e4a934b2.js';
30
+ import './index-6c12bdd5.js';
31
+ import './main-747e7d25.js';
32
32
  import './entities-7cc3bf45.js';
33
33
  import './slicedToArray-641f241f.js';
34
34
  import './stringify-4330ccdc.js';
@@ -37,15 +37,16 @@ import './Segment.js';
37
37
  import './Beam.js';
38
38
  import './AdSlot.js';
39
39
  import 'react-bootstrap/Button';
40
- import './BlockContent-e9b4ddcf.js';
40
+ import './BlockContent-d05b5b23.js';
41
41
  import './index-c7e2ac95.js';
42
42
  import './smoothscroll-0cd4c7a6.js';
43
43
  import './GroupDeck.js';
44
44
  import 'react-bootstrap';
45
45
  import './iconBase-602d52fe.js';
46
- import './index.esm-29e48d38.js';
47
- export { g as default } from './index-fb819516.js';
48
- import './brightcove-react-player-loader.es-83f53e4e.js';
46
+ import './index.esm-3fdda599.js';
47
+ export { g as default } from './index-e537f766.js';
48
+ import './util-7700fc59.js';
49
+ import './brightcove-react-player-loader.es-4abff0b1.js';
49
50
  import 'next/head';
50
51
  import 'react-share';
51
52
  import './SocialShare.js';
@@ -58,35 +58,35 @@ function parseSource(source) {
58
58
  if (typeof source === 'string' && isUrl(source)) {
59
59
  // Someone passed an existing image url?
60
60
  image = {
61
- asset: { _ref: urlToId(source) }
61
+ asset: { _ref: urlToId(source) },
62
62
  };
63
63
  }
64
64
  else if (typeof source === 'string') {
65
65
  // Just an asset id
66
66
  image = {
67
- asset: { _ref: source }
67
+ asset: { _ref: source },
68
68
  };
69
69
  }
70
70
  else if (isRef(source)) {
71
71
  // We just got passed an asset directly
72
72
  image = {
73
- asset: source
73
+ asset: source,
74
74
  };
75
75
  }
76
76
  else if (isAsset(source)) {
77
77
  // If we were passed an image asset document
78
78
  image = {
79
79
  asset: {
80
- _ref: source._id || ''
81
- }
80
+ _ref: source._id || '',
81
+ },
82
82
  };
83
83
  }
84
84
  else if (isAssetStub(source)) {
85
85
  // If we were passed a partial asset (`url`, but no `_id`)
86
86
  image = {
87
87
  asset: {
88
- _ref: urlToId(source.asset.url)
89
- }
88
+ _ref: urlToId(source.asset.url),
89
+ },
90
90
  };
91
91
  }
92
92
  else if (typeof source.asset === 'object') {
@@ -127,7 +127,7 @@ function applyDefaults(image) {
127
127
  left: 0,
128
128
  top: 0,
129
129
  bottom: 0,
130
- right: 0
130
+ right: 0,
131
131
  };
132
132
  }
133
133
  if (!result.hotspot) {
@@ -135,7 +135,7 @@ function applyDefaults(image) {
135
135
  x: 0.5,
136
136
  y: 0.5,
137
137
  height: 1.0,
138
- width: 1.0
138
+ width: 1.0,
139
139
  };
140
140
  }
141
141
  return result;
@@ -182,7 +182,7 @@ exports.SPEC_NAME_TO_URL_NAME_MAPPINGS = [
182
182
  ['crop', 'crop'],
183
183
  ['saturation', 'sat'],
184
184
  ['auto', 'auto'],
185
- ['dpr', 'dpr']
185
+ ['dpr', 'dpr'],
186
186
  ];
187
187
  function urlForImage(options) {
188
188
  var spec = __assign({}, (options || {}));
@@ -201,7 +201,7 @@ function urlForImage(options) {
201
201
  left: cropLeft,
202
202
  top: cropTop,
203
203
  width: Math.round(asset.width - image.crop.right * asset.width - cropLeft),
204
- height: Math.round(asset.height - image.crop.bottom * asset.height - cropTop)
204
+ height: Math.round(asset.height - image.crop.bottom * asset.height - cropTop),
205
205
  };
206
206
  // Compute hot spot rect in terms of pixel coordinates
207
207
  var hotSpotVerticalRadius = (image.hotspot.height * asset.height) / 2;
@@ -212,7 +212,7 @@ function urlForImage(options) {
212
212
  left: hotSpotCenterX - hotSpotHorizontalRadius,
213
213
  top: hotSpotCenterY - hotSpotVerticalRadius,
214
214
  right: hotSpotCenterX + hotSpotHorizontalRadius,
215
- bottom: hotSpotCenterY + hotSpotVerticalRadius
215
+ bottom: hotSpotCenterY + hotSpotVerticalRadius,
216
216
  };
217
217
  // If irrelevant, or if we are requested to: don't perform crop/fit based on
218
218
  // the crop/hotspot.
@@ -294,7 +294,7 @@ function fit(source, spec) {
294
294
  left: Math.round(left),
295
295
  top: Math.round(top_2),
296
296
  width: Math.round(width),
297
- height: Math.round(height)
297
+ height: Math.round(height),
298
298
  };
299
299
  }
300
300
  else {
@@ -316,13 +316,13 @@ function fit(source, spec) {
316
316
  left: Math.max(0, Math.floor(left)),
317
317
  top: Math.max(0, Math.floor(top_3)),
318
318
  width: Math.round(width),
319
- height: Math.round(height)
319
+ height: Math.round(height),
320
320
  };
321
321
  }
322
322
  return {
323
323
  width: imgWidth,
324
324
  height: imgHeight,
325
- rect: cropRect
325
+ rect: cropRect,
326
326
  };
327
327
  }
328
328
 
@@ -375,11 +375,12 @@ function urlBuilder(options) {
375
375
  var client = options;
376
376
  if (isSanityClient(client)) {
377
377
  // Inherit config from client
378
- var _a = client.clientConfig, apiHost = _a.apiHost, projectId = _a.projectId, dataset = _a.dataset;
378
+ var _a = client.clientConfig, apiUrl = _a.apiHost, projectId = _a.projectId, dataset = _a.dataset;
379
+ var apiHost = apiUrl || 'https://api.sanity.io';
379
380
  return new ImageUrlBuilder(null, {
380
381
  baseUrl: apiHost.replace(/^https:\/\/api\./, 'https://cdn.'),
381
382
  projectId: projectId,
382
- dataset: dataset
383
+ dataset: dataset,
383
384
  });
384
385
  }
385
386
  // Or just accept the options as given
@@ -392,7 +393,7 @@ var ImageUrlBuilder = /** @class */ (function () {
392
393
  ? __assign(__assign({}, (parent.options || {})), (options || {})) : __assign({}, (options || {})); // Copy options
393
394
  }
394
395
  ImageUrlBuilder.prototype.withOptions = function (options) {
395
- var baseUrl = options.baseUrl || '';
396
+ var baseUrl = options.baseUrl || this.options.baseUrl;
396
397
  var newOptions = { baseUrl: baseUrl };
397
398
  for (var key in options) {
398
399
  if (options.hasOwnProperty(key)) {
@@ -520,7 +521,7 @@ var ImageUrlBuilder = /** @class */ (function () {
520
521
  ImageUrlBuilder.prototype.url = function () {
521
522
  return urlForImage_1$1.default(this.options);
522
523
  };
523
- // Synonym for url()
524
+ // Alias for url()
524
525
  ImageUrlBuilder.prototype.toString = function () {
525
526
  return this.url();
526
527
  };
@@ -1,5 +1,5 @@
1
1
  import { c as createCommonjsModule, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
2
- import React__default from 'react';
2
+ import React from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import ReactDOM from 'react-dom';
5
5
 
@@ -179,7 +179,7 @@ var _createClass = function () { function defineProperties(target, props) { for
179
179
 
180
180
 
181
181
 
182
- var _react2 = _interopRequireDefault(React__default);
182
+ var _react2 = _interopRequireDefault(React);
183
183
 
184
184
 
185
185
 
@@ -530,7 +530,7 @@ var LazyLoad = function (_Component) {
530
530
  }]);
531
531
 
532
532
  return LazyLoad;
533
- }(React__default.Component);
533
+ }(React.Component);
534
534
 
535
535
  LazyLoad.propTypes = {
536
536
  once: _propTypes2.default.bool,
@@ -587,7 +587,7 @@ var decorator = function decorator() {
587
587
  }]);
588
588
 
589
589
  return LazyLoadDecorated;
590
- }(React__default.Component);
590
+ }(React.Component);
591
591
  };
592
592
  };
593
593