@mjhls/mjh-framework 1.0.782-beta.0 → 1.0.782-dev4485

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 (256) hide show
  1. package/README.md +170 -170
  2. package/dist/cjs/AD.js +10 -9
  3. package/dist/cjs/AD300x250.js +12 -10
  4. package/dist/cjs/AD300x250x600.js +12 -10
  5. package/dist/cjs/AD728x90.js +13 -11
  6. package/dist/cjs/ADFloatingFooter.js +14 -12
  7. package/dist/cjs/ADFooter.js +9 -8
  8. package/dist/cjs/ADGutter.js +14 -12
  9. package/dist/cjs/{ADInfeed-5b042ade.js → ADInfeed-de972407.js} +11 -9
  10. package/dist/cjs/ADSkyscraper.js +14 -12
  11. package/dist/cjs/ADSponsoredResources.js +14 -12
  12. package/dist/cjs/ADWebcast.js +14 -12
  13. package/dist/cjs/ADWelcome.js +18 -16
  14. package/dist/cjs/{ADlgInfeed-e92b6f9f.js → ADlgInfeed-6ab92047.js} +7 -6
  15. package/dist/cjs/AccordionPanel.js +24 -22
  16. package/dist/cjs/AdSlot.js +16 -14
  17. package/dist/cjs/AdSlotsProvider.js +10 -8
  18. package/dist/cjs/AlphabeticList.js +16 -15
  19. package/dist/cjs/ArticleCarousel.js +11 -10
  20. package/dist/cjs/ArticleProgramLandingPage.js +26 -24
  21. package/dist/cjs/ArticleSeriesLandingPage.js +22 -20
  22. package/dist/cjs/ArticleSeriesListing.js +40 -39
  23. package/dist/cjs/Auth.js +194 -140
  24. package/dist/cjs/{AuthorComponent-bb831b74.js → AuthorComponent-ac8972ce.js} +13 -12
  25. package/dist/cjs/Beam.js +2 -1
  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 +66 -65
  29. package/dist/cjs/Column1.js +14 -11
  30. package/dist/cjs/Column2.js +24 -20
  31. package/dist/cjs/Column3.js +37 -33
  32. package/dist/cjs/ConferenceArticleCard.js +35 -34
  33. package/dist/cjs/ConferenceBanner-6c9e718a.js +24 -0
  34. package/dist/cjs/DeckContent.js +87 -82
  35. package/dist/cjs/DeckQueue.js +73 -69
  36. package/dist/cjs/{Dfp-b807d8fa.js → Dfp-c226037e.js} +21 -20
  37. package/dist/cjs/EventsDeck.js +140 -133
  38. package/dist/cjs/ExternalResources.js +49 -47
  39. package/dist/cjs/Feature.js +26 -24
  40. package/dist/cjs/ForbesHero.js +34 -33
  41. package/dist/cjs/GridContent.js +155 -150
  42. package/dist/cjs/GridHero.js +35 -34
  43. package/dist/cjs/GroupDeck.js +49 -48
  44. package/dist/cjs/HamMagazine.js +131 -125
  45. package/dist/cjs/Header.js +13 -11
  46. package/dist/cjs/Hero.js +11 -10
  47. package/dist/cjs/HighlightenVideo.js +17 -16
  48. package/dist/cjs/HorizontalArticleListing.js +39 -37
  49. package/dist/cjs/HorizontalHero.js +25 -24
  50. package/dist/cjs/IssueContentDeck.js +70 -65
  51. package/dist/cjs/IssueDeck.js +65 -60
  52. package/dist/cjs/IssueLanding.js +50 -48
  53. package/dist/cjs/KMTracker.js +15 -15
  54. package/dist/cjs/LeftNav.js +24 -21
  55. package/dist/cjs/MasterDeck.js +60 -58
  56. package/dist/cjs/MediaSeriesLanding.js +27 -24
  57. package/dist/cjs/NavDvm.js +70 -64
  58. package/dist/cjs/{NavFooter-76c913e3.js → NavFooter-3dcd99a8.js} +15 -14
  59. package/dist/cjs/NavMagazine.js +133 -127
  60. package/dist/cjs/NavNative.js +127 -118
  61. package/dist/cjs/NavNormal.js +43 -37
  62. package/dist/cjs/OncliveHero.js +18 -18
  63. package/dist/cjs/OncliveLargeHero.js +59 -58
  64. package/dist/cjs/PageFilter.js +9 -8
  65. package/dist/cjs/PartnerDetailListing.js +73 -71
  66. package/dist/cjs/PdfDownload.js +9 -8
  67. package/dist/cjs/PopUpModal.js +15 -13
  68. package/dist/cjs/PubSection.js +22 -20
  69. package/dist/cjs/PubToc.js +10 -8
  70. package/dist/cjs/PublicationDeck.js +64 -59
  71. package/dist/cjs/PublicationLanding.js +129 -213
  72. package/dist/cjs/QueueDeckExpanded.js +272 -271
  73. package/dist/cjs/RecentNews.js +23 -22
  74. package/dist/cjs/RelatedContent.js +50 -49
  75. package/dist/cjs/RelatedTopicsDropdown.js +32 -29
  76. package/dist/cjs/RolesDeck.js +32 -27
  77. package/dist/cjs/Search.js +16 -12
  78. package/dist/cjs/Segment.js +2 -1
  79. package/dist/cjs/SeriesListingDeck.js +26 -26
  80. package/dist/cjs/{SeriesSlider-f662f1f5.js → SeriesSlider-5e6108e0.js} +40 -39
  81. package/dist/cjs/SideFooter.js +28 -26
  82. package/dist/cjs/SocialIcons.js +10 -9
  83. package/dist/cjs/{SocialSearchComponent-8dd468fd.js → SocialSearchComponent-fb784cc3.js} +38 -34
  84. package/dist/cjs/SocialShare.js +31 -29
  85. package/dist/cjs/TaxonomyCard.js +59 -54
  86. package/dist/cjs/TaxonomyDescription.js +24 -22
  87. package/dist/cjs/TemplateNormal.js +38 -36
  88. package/dist/cjs/ThumbnailCard.js +19 -17
  89. package/dist/cjs/Ustream.js +21 -20
  90. package/dist/cjs/VerticalHero.js +17 -16
  91. package/dist/cjs/VideoProgramLandingPage.js +46 -41
  92. package/dist/cjs/VideoSeriesCard.js +25 -24
  93. package/dist/cjs/VideoSeriesFilter.js +11 -10
  94. package/dist/cjs/VideoSeriesLandingPage.js +27 -25
  95. package/dist/cjs/VideoSeriesListing.js +57 -56
  96. package/dist/cjs/View.js +222 -223
  97. package/dist/cjs/YahooHero.js +30 -29
  98. package/dist/cjs/YoutubeGroup.js +56 -55
  99. package/dist/cjs/_set-species-f92c67c5.js +57 -0
  100. package/dist/cjs/{asyncToGenerator-140e5f89.js → asyncToGenerator-533d476a.js} +6 -54
  101. package/dist/cjs/{brightcove-react-player-loader.es-156bd4d6.js → brightcove-react-player-loader.es-4ba0d3d5.js} +6 -5
  102. package/dist/cjs/getQuery.js +1 -1
  103. package/dist/cjs/getRelatedArticle.js +133 -68
  104. package/dist/cjs/getRootDocGroup.js +2 -1
  105. package/dist/cjs/getSerializers.js +13 -12
  106. package/dist/cjs/{getTargeting-9af0ef69.js → getTargeting-7c425fbf.js} +11 -11
  107. package/dist/cjs/getTargeting.js +1 -1
  108. package/dist/cjs/iconBase-68959171.js +0 -3
  109. package/dist/cjs/{index-76417d82.js → index-2410ec98.js} +859 -836
  110. package/dist/cjs/{index-3294d3bc.js → index-5be2866f.js} +1 -1
  111. package/dist/cjs/{index-da796b8c.js → index-8a3fb0bc.js} +12 -10
  112. package/dist/cjs/{index-be0c82be.js → index-b5eb3ff8.js} +20 -19
  113. package/dist/cjs/{index-8bf6c863.js → index-e08f00ce.js} +9 -8
  114. package/dist/cjs/{index.es-9110add6.js → index.es-13533f24.js} +11 -8
  115. package/dist/cjs/{index.esm-ff47db6f.js → index.esm-05850a2f.js} +5 -12
  116. package/dist/cjs/{index.esm-66ffa47a.js → index.esm-3b9b8952.js} +4 -9
  117. package/dist/cjs/{index.esm-4d410430.js → index.esm-3ffa049c.js} +20 -20
  118. package/dist/cjs/{index.esm-90433435.js → index.esm-974f47d9.js} +6 -15
  119. package/dist/cjs/index.js +61 -57
  120. package/dist/cjs/{inherits-c9f99d47.js → inherits-87492b40.js} +1 -1
  121. package/dist/cjs/{lodash-fc2922d0.js → lodash-7fd85bcf.js} +71 -22
  122. package/dist/cjs/{main-02daeefe.js → main-11ec04d2.js} +85 -53
  123. package/dist/cjs/{moment-575fe24c.js → moment-66a6a284.js} +1 -1
  124. package/dist/cjs/{react-social-icons-f7f48f71.js → react-social-icons-07939b41.js} +12 -11
  125. package/dist/cjs/timeDifferenceCalc.js +1 -1
  126. package/dist/cjs/{typeof-725500bc.js → typeof-9d7f610f.js} +1 -1
  127. package/dist/cjs/urlFor.js +2 -2
  128. package/dist/cjs/{visibility-sensor-0c45a583.js → visibility-sensor-8b54af99.js} +7 -5
  129. package/dist/esm/AD.js +7 -7
  130. package/dist/esm/AD300x250.js +9 -8
  131. package/dist/esm/AD300x250x600.js +9 -8
  132. package/dist/esm/AD728x90.js +10 -9
  133. package/dist/esm/ADFloatingFooter.js +11 -10
  134. package/dist/esm/ADFooter.js +6 -6
  135. package/dist/esm/ADGutter.js +11 -10
  136. package/dist/esm/{ADInfeed-eb7bdd41.js → ADInfeed-1cba8312.js} +5 -5
  137. package/dist/esm/ADSkyscraper.js +11 -10
  138. package/dist/esm/ADSponsoredResources.js +11 -10
  139. package/dist/esm/ADWebcast.js +11 -10
  140. package/dist/esm/ADWelcome.js +15 -14
  141. package/dist/esm/{ADlgInfeed-f2ac31d1.js → ADlgInfeed-fe7ad144.js} +4 -4
  142. package/dist/esm/AccordionPanel.js +17 -17
  143. package/dist/esm/AdSlot.js +7 -6
  144. package/dist/esm/AdSlotsProvider.js +7 -6
  145. package/dist/esm/AlphabeticList.js +13 -13
  146. package/dist/esm/ArticleCarousel.js +8 -8
  147. package/dist/esm/ArticleProgramLandingPage.js +22 -21
  148. package/dist/esm/ArticleSeriesLandingPage.js +19 -18
  149. package/dist/esm/ArticleSeriesListing.js +34 -34
  150. package/dist/esm/Auth.js +171 -121
  151. package/dist/esm/{AuthorComponent-34b16174.js → AuthorComponent-8ffd4679.js} +10 -10
  152. package/dist/esm/Beam.js +2 -1
  153. package/dist/esm/{BlockContent-e9b4ddcf.js → BlockContent-d05b5b23.js} +4 -4
  154. package/dist/esm/Breadcrumbs.js +11 -11
  155. package/dist/esm/CMEDeck.js +63 -62
  156. package/dist/esm/Column1.js +5 -5
  157. package/dist/esm/Column2.js +14 -13
  158. package/dist/esm/Column3.js +26 -25
  159. package/dist/esm/ConferenceArticleCard.js +30 -30
  160. package/dist/esm/{ConferenceBanner-8792ebd2.js → ConferenceBanner-9162d0ca.js} +4 -4
  161. package/dist/esm/DeckContent.js +64 -63
  162. package/dist/esm/DeckQueue.js +47 -47
  163. package/dist/esm/{Dfp-ebc4b22f.js → Dfp-c06b41fc.js} +10 -10
  164. package/dist/esm/EventsDeck.js +83 -83
  165. package/dist/esm/ExternalResources.js +41 -40
  166. package/dist/esm/Feature.js +17 -17
  167. package/dist/esm/ForbesHero.js +28 -28
  168. package/dist/esm/GridContent.js +113 -112
  169. package/dist/esm/GridHero.js +29 -29
  170. package/dist/esm/GroupDeck.js +36 -36
  171. package/dist/esm/HamMagazine.js +98 -97
  172. package/dist/esm/Header.js +7 -7
  173. package/dist/esm/Hero.js +7 -7
  174. package/dist/esm/HighlightenVideo.js +14 -14
  175. package/dist/esm/HorizontalArticleListing.js +36 -35
  176. package/dist/esm/HorizontalHero.js +21 -21
  177. package/dist/esm/IssueContentDeck.js +41 -41
  178. package/dist/esm/IssueDeck.js +34 -34
  179. package/dist/esm/IssueLanding.js +47 -46
  180. package/dist/esm/KMTracker.js +15 -15
  181. package/dist/esm/LeftNav.js +18 -17
  182. package/dist/esm/MasterDeck.js +53 -52
  183. package/dist/esm/MediaSeriesLanding.js +17 -16
  184. package/dist/esm/NavDvm.js +45 -44
  185. package/dist/esm/{NavFooter-e27bd93b.js → NavFooter-c29526b7.js} +12 -12
  186. package/dist/esm/NavMagazine.js +102 -101
  187. package/dist/esm/NavNative.js +89 -88
  188. package/dist/esm/NavNormal.js +23 -22
  189. package/dist/esm/OncliveHero.js +14 -15
  190. package/dist/esm/OncliveLargeHero.js +52 -52
  191. package/dist/esm/PageFilter.js +6 -6
  192. package/dist/esm/PartnerDetailListing.js +68 -67
  193. package/dist/esm/PdfDownload.js +6 -6
  194. package/dist/esm/PopUpModal.js +8 -8
  195. package/dist/esm/PubSection.js +19 -18
  196. package/dist/esm/PubToc.js +7 -6
  197. package/dist/esm/PublicationDeck.js +35 -35
  198. package/dist/esm/PublicationLanding.js +88 -176
  199. package/dist/esm/QueueDeckExpanded.js +253 -252
  200. package/dist/esm/RecentNews.js +19 -19
  201. package/dist/esm/RelatedContent.js +45 -45
  202. package/dist/esm/RelatedTopicsDropdown.js +21 -21
  203. package/dist/esm/RolesDeck.js +13 -13
  204. package/dist/esm/Search.js +5 -5
  205. package/dist/esm/Segment.js +2 -1
  206. package/dist/esm/SeriesListingDeck.js +20 -20
  207. package/dist/esm/{SeriesSlider-9245785f.js → SeriesSlider-19a24623.js} +29 -29
  208. package/dist/esm/SideFooter.js +23 -22
  209. package/dist/esm/SocialIcons.js +7 -7
  210. package/dist/esm/{SocialSearchComponent-a2ae84d1.js → SocialSearchComponent-2a4a7398.js} +25 -25
  211. package/dist/esm/SocialShare.js +25 -25
  212. package/dist/esm/TaxonomyCard.js +36 -36
  213. package/dist/esm/TaxonomyDescription.js +18 -17
  214. package/dist/esm/TemplateNormal.js +31 -30
  215. package/dist/esm/ThumbnailCard.js +10 -10
  216. package/dist/esm/Ustream.js +18 -18
  217. package/dist/esm/VerticalHero.js +13 -13
  218. package/dist/esm/VideoProgramLandingPage.js +29 -28
  219. package/dist/esm/VideoSeriesCard.js +18 -18
  220. package/dist/esm/VideoSeriesFilter.js +8 -7
  221. package/dist/esm/VideoSeriesLandingPage.js +19 -18
  222. package/dist/esm/VideoSeriesListing.js +50 -50
  223. package/dist/esm/View.js +198 -203
  224. package/dist/esm/YahooHero.js +25 -25
  225. package/dist/esm/YoutubeGroup.js +39 -39
  226. package/dist/esm/_set-species-3f8319f5.js +52 -0
  227. package/dist/esm/{asyncToGenerator-fc1c2e29.js → asyncToGenerator-502f13b4.js} +5 -49
  228. package/dist/esm/{brightcove-react-player-loader.es-83f53e4e.js → brightcove-react-player-loader.es-e1c6b0f2.js} +3 -3
  229. package/dist/esm/getQuery.js +1 -1
  230. package/dist/esm/getRelatedArticle.js +128 -63
  231. package/dist/esm/getRootDocGroup.js +2 -1
  232. package/dist/esm/getSerializers.js +13 -12
  233. package/dist/esm/{getTargeting-7211f12c.js → getTargeting-f22b76f5.js} +9 -9
  234. package/dist/esm/getTargeting.js +1 -1
  235. package/dist/esm/{index-73819142.js → index-51a80699.js} +20 -19
  236. package/dist/esm/{index-a9e53f80.js → index-acfb8079.js} +3 -3
  237. package/dist/esm/{index-5f9f807a.js → index-c5fd0af5.js} +4 -4
  238. package/dist/esm/{index-ef6d5dcf.js → index-d2f90501.js} +1 -1
  239. package/dist/esm/{index-c1374f98.js → index-f41e3fe9.js} +790 -774
  240. package/dist/esm/{index.es-29c1cef5.js → index.es-7dda2f0a.js} +8 -6
  241. package/dist/esm/{index.esm-29e48d38.js → index.esm-3fdda599.js} +6 -15
  242. package/dist/esm/{index.esm-fd746768.js → index.esm-8ee5ff72.js} +17 -18
  243. package/dist/esm/{index.esm-cf08bf18.js → index.esm-a8ff922c.js} +5 -12
  244. package/dist/esm/{index.esm-b08f4b04.js → index.esm-d6f88d94.js} +4 -9
  245. package/dist/esm/index.js +45 -44
  246. package/dist/esm/{inherits-fb9b6e8f.js → inherits-0d8cda6e.js} +1 -1
  247. package/dist/esm/{lodash-17fdfebb.js → lodash-ec8c6b48.js} +71 -22
  248. package/dist/esm/{main-e4a934b2.js → main-aef58dbc.js} +81 -50
  249. package/dist/esm/{moment-e2f9b20c.js → moment-12415288.js} +1 -1
  250. package/dist/esm/{react-social-icons-a7d5c5c7.js → react-social-icons-3822f1ce.js} +5 -5
  251. package/dist/esm/timeDifferenceCalc.js +1 -1
  252. package/dist/esm/{typeof-6435ba1c.js → typeof-af9c50d8.js} +1 -1
  253. package/dist/esm/urlFor.js +1 -1
  254. package/dist/esm/{visibility-sensor-0baa4eea.js → visibility-sensor-082c757b.js} +2 -2
  255. package/package.json +107 -107
  256. package/dist/cjs/ConferenceBanner-4a16fddc.js +0 -23
@@ -5,7 +5,8 @@ import './_library-528f1934.js';
5
5
  import './_iter-detect-5d49a330.js';
6
6
  import './core.get-iterator-method-e1de7503.js';
7
7
  import './web.dom.iterable-4439f05a.js';
8
- import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-fc1c2e29.js';
8
+ import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-502f13b4.js';
9
+ import './_set-species-3f8319f5.js';
9
10
  import { c as cookie } from './index-db3bb315.js';
10
11
  import getQuery from './getQuery.js';
11
12
 
@@ -29,9 +30,20 @@ function parseString(setCookieValue, options) {
29
30
  ? Object.assign({}, defaultParseOptions, options)
30
31
  : defaultParseOptions;
31
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 '" +
38
+ value +
39
+ "'. Set options.decodeValues to false to disable this feature.",
40
+ e
41
+ );
42
+ }
43
+
32
44
  var cookie = {
33
45
  name: name, // grab everything before the first =
34
- value: options.decodeValues ? decodeURIComponent(value) : value, // decode cookie value
46
+ value: value,
35
47
  };
36
48
 
37
49
  parts.forEach(function (part) {
@@ -202,7 +214,7 @@ setCookie.parse = parse_1;
202
214
  setCookie.parseString = parseString_1;
203
215
  setCookie.splitCookiesString = splitCookiesString_1;
204
216
 
205
- var dist = createCommonjsModule(function (module, exports) {
217
+ var utils = createCommonjsModule(function (module, exports) {
206
218
  var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
207
219
  __assign = Object.assign || function(t) {
208
220
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -215,10 +227,33 @@ var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
215
227
  return __assign.apply(this, arguments);
216
228
  };
217
229
  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'; };
230
+ exports.areCookiesEqual = exports.hasSameProperties = exports.createCookie = exports.isBrowser = void 0;
231
+ /**
232
+ * Tells whether we are in a browser or server.
233
+ */
234
+ function isBrowser() {
235
+ return typeof window !== 'undefined';
236
+ }
237
+ exports.isBrowser = isBrowser;
238
+ /**
239
+ * Create an instance of the Cookie interface
240
+ */
241
+ function createCookie(name, value, options) {
242
+ var sameSite = options.sameSite;
243
+ if (sameSite === true) {
244
+ sameSite = 'strict';
245
+ }
246
+ if (sameSite === undefined || sameSite === false) {
247
+ sameSite = 'lax';
248
+ }
249
+ var cookieToSet = __assign(__assign({}, options), { sameSite: sameSite });
250
+ delete cookieToSet.encode;
251
+ return __assign({ name: name, value: value }, cookieToSet);
252
+ }
253
+ exports.createCookie = createCookie;
254
+ /**
255
+ * Tells whether given objects have the same properties.
256
+ */
222
257
  function hasSameProperties(a, b) {
223
258
  var aProps = Object.getOwnPropertyNames(a);
224
259
  var bProps = Object.getOwnPropertyNames(b);
@@ -233,8 +268,9 @@ function hasSameProperties(a, b) {
233
268
  }
234
269
  return true;
235
270
  }
271
+ exports.hasSameProperties = hasSameProperties;
236
272
  /**
237
- * Compare the cookie and return true if the cookies has equivalent
273
+ * Compare the cookie and return true if the cookies have equivalent
238
274
  * options and the cookies would be overwritten in the browser storage.
239
275
  *
240
276
  * @param a first Cookie for comparison
@@ -247,71 +283,109 @@ function areCookiesEqual(a, b) {
247
283
  }
248
284
  return (hasSameProperties(__assign(__assign({}, a), { sameSite: undefined }), __assign(__assign({}, b), { sameSite: undefined })) && sameSiteSame);
249
285
  }
286
+ exports.areCookiesEqual = areCookiesEqual;
287
+ /* Functions */
288
+
289
+ });
290
+
291
+ unwrapExports(utils);
292
+ var utils_1 = utils.areCookiesEqual;
293
+ var utils_2 = utils.hasSameProperties;
294
+ var utils_3 = utils.createCookie;
295
+ var utils_4 = utils.isBrowser;
296
+
297
+ var dist = createCommonjsModule(function (module, exports) {
298
+ var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
299
+ __assign = Object.assign || function(t) {
300
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
301
+ s = arguments[i];
302
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
303
+ t[p] = s[p];
304
+ }
305
+ return t;
306
+ };
307
+ return __assign.apply(this, arguments);
308
+ };
309
+ Object.defineProperty(exports, "__esModule", { value: true });
310
+ exports.destroyCookie = exports.setCookie = exports.parseCookies = void 0;
311
+
312
+
313
+
250
314
  /**
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
315
  * Parses cookies.
272
316
  *
273
- * @param ctx
274
- * @param options
317
+ * @param ctx NextJS page or API context, express context, null or undefined.
318
+ * @param options Options that we pass down to `cookie` library.
275
319
  */
276
320
  function parseCookies(ctx, options) {
277
- if (ctx && ctx.req && ctx.req.headers && ctx.req.headers.cookie) {
321
+ var _a, _b;
322
+ 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) {
278
323
  return cookie.parse(ctx.req.headers.cookie, options);
279
324
  }
280
- if (isBrowser()) {
325
+ if (utils.isBrowser()) {
281
326
  return cookie.parse(document.cookie, options);
282
327
  }
283
328
  return {};
284
329
  }
285
330
  exports.parseCookies = parseCookies;
286
331
  /**
287
- *
288
332
  * Sets a cookie.
289
333
  *
290
- * @param ctx
291
- * @param name
292
- * @param value
293
- * @param options
334
+ * @param ctx NextJS page or API context, express context, null or undefined.
335
+ * @param name The name of your cookie.
336
+ * @param value The value of your cookie.
337
+ * @param options Options that we pass down to `cookie` library.
294
338
  */
295
339
  function setCookie$1(ctx, name, value, options) {
296
- if (ctx && ctx.res && ctx.res.getHeader && ctx.res.setHeader) {
340
+ var _a, _b;
341
+ if (options === void 0) { options = {}; }
342
+ // SSR
343
+ if (((_a = ctx === null || ctx === void 0 ? void 0 : ctx.res) === null || _a === void 0 ? void 0 : _a.getHeader) && ctx.res.setHeader) {
344
+ // Check if response has finished and warn about it.
345
+ if ((_b = ctx === null || ctx === void 0 ? void 0 : ctx.res) === null || _b === void 0 ? void 0 : _b.finished) {
346
+ console.warn("Not setting \"" + name + "\" cookie. Response has finished.");
347
+ console.warn("You should set cookie before res.send()");
348
+ return {};
349
+ }
350
+ /**
351
+ * Load existing cookies from the header and parse them.
352
+ */
297
353
  var cookies = ctx.res.getHeader('Set-Cookie') || [];
298
354
  if (typeof cookies === 'string')
299
355
  cookies = [cookies];
300
356
  if (typeof cookies === 'number')
301
357
  cookies = [];
302
- var parsedCookies = setCookie.parse(cookies);
358
+ /**
359
+ * Parse cookies but ignore values - we've already encoded
360
+ * them in the previous call.
361
+ */
362
+ var parsedCookies = setCookie.parse(cookies, {
363
+ decodeValues: false,
364
+ });
365
+ /**
366
+ * We create the new cookie and make sure that none of
367
+ * the existing cookies match it.
368
+ */
369
+ var newCookie_1 = utils.createCookie(name, value, options);
303
370
  var cookiesToSet_1 = [];
304
371
  parsedCookies.forEach(function (parsedCookie) {
305
- if (!areCookiesEqual(parsedCookie, createCookie(name, value, options))) {
306
- cookiesToSet_1.push(cookie.serialize(parsedCookie.name, parsedCookie.value, __assign({}, parsedCookie)));
372
+ if (!utils.areCookiesEqual(parsedCookie, newCookie_1)) {
373
+ /**
374
+ * We serialize the cookie back to the original format
375
+ * if it isn't the same as the new one.
376
+ */
377
+ var serializedCookie = cookie.serialize(parsedCookie.name, parsedCookie.value, __assign({
378
+ // we prevent reencoding by default, but you might override it
379
+ encode: function (val) { return val; } }, parsedCookie));
380
+ cookiesToSet_1.push(serializedCookie);
307
381
  }
308
382
  });
309
383
  cookiesToSet_1.push(cookie.serialize(name, value, options));
310
- if (!ctx.res.finished) {
311
- ctx.res.setHeader('Set-Cookie', cookiesToSet_1);
312
- }
384
+ // Update the header.
385
+ ctx.res.setHeader('Set-Cookie', cookiesToSet_1);
313
386
  }
314
- if (isBrowser()) {
387
+ // Browser
388
+ if (utils.isBrowser()) {
315
389
  if (options && options.httpOnly) {
316
390
  throw new Error('Can not set a httpOnly cookie in the browser.');
317
391
  }
@@ -321,30 +395,21 @@ function setCookie$1(ctx, name, value, options) {
321
395
  }
322
396
  exports.setCookie = setCookie$1;
323
397
  /**
324
- *
325
398
  * Destroys a cookie with a particular name.
326
399
  *
327
- * @param ctx
328
- * @param name
329
- * @param options
400
+ * @param ctx NextJS page or API context, express context, null or undefined.
401
+ * @param name Cookie name.
402
+ * @param options Options that we pass down to `cookie` library.
330
403
  */
331
404
  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 {};
405
+ /**
406
+ * We forward the request destroy to setCookie function
407
+ * as it is the same function with modified maxAge value.
408
+ */
409
+ return setCookie$1(ctx, name, '', __assign(__assign({}, (options || {})), { maxAge: -1 }));
346
410
  }
347
411
  exports.destroyCookie = destroyCookie;
412
+ /* Utility Exports */
348
413
  exports.default = {
349
414
  set: setCookie$1,
350
415
  get: parseCookies,
@@ -5,7 +5,8 @@ import './_library-528f1934.js';
5
5
  import './_iter-detect-5d49a330.js';
6
6
  import './core.get-iterator-method-e1de7503.js';
7
7
  import './web.dom.iterable-4439f05a.js';
8
- import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-fc1c2e29.js';
8
+ import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-502f13b4.js';
9
+ import './_set-species-3f8319f5.js';
9
10
 
10
11
  var _this = undefined;
11
12
 
@@ -8,42 +8,43 @@ import './core.get-iterator-method-e1de7503.js';
8
8
  import './_object-pie-33c40e79.js';
9
9
  import './extends-eb69e8ac.js';
10
10
  import './_object-sap-964b6feb.js';
11
- import './inherits-fb9b6e8f.js';
11
+ import './inherits-0d8cda6e.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
- import './index-a9e53f80.js';
17
+ import './index-acfb8079.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-1981418f.js';
24
24
  import './debounce-9207d8ee.js';
25
25
  import './toNumber-2f7a84cd.js';
26
26
  import 'react-dom';
27
- import './index-73819142.js';
28
- import './index-5f9f807a.js';
29
- import './main-e4a934b2.js';
27
+ import './index-51a80699.js';
28
+ import './index-c5fd0af5.js';
29
+ import './main-aef58dbc.js';
30
30
  import './entities-7cc3bf45.js';
31
31
  import './slicedToArray-641f241f.js';
32
32
  import './stringify-4330ccdc.js';
33
- import './asyncToGenerator-fc1c2e29.js';
33
+ import './asyncToGenerator-502f13b4.js';
34
+ import './_set-species-3f8319f5.js';
34
35
  import './Segment.js';
35
36
  import './Beam.js';
36
37
  import './AdSlot.js';
37
- import './BlockContent-e9b4ddcf.js';
38
+ import './BlockContent-d05b5b23.js';
38
39
  import './index-c7e2ac95.js';
39
40
  import './smoothscroll-0cd4c7a6.js';
40
41
  import './GroupDeck.js';
41
42
  import 'react-bootstrap';
42
43
  import './iconBase-602d52fe.js';
43
- import './index.esm-29e48d38.js';
44
- export { g as default } from './index-c1374f98.js';
44
+ import './index.esm-3fdda599.js';
45
+ export { g as default } from './index-f41e3fe9.js';
45
46
  import './util-7700fc59.js';
46
- import './brightcove-react-player-loader.es-83f53e4e.js';
47
+ import './brightcove-react-player-loader.es-e1c6b0f2.js';
47
48
  import 'next/head';
48
49
  import 'react-share';
49
50
  import './SocialShare.js';
@@ -2,18 +2,18 @@ import { _ as _toConsumableArray } from './toConsumableArray-43aa614d.js';
2
2
  import { _ as _extends } from './extends-eb69e8ac.js';
3
3
 
4
4
  var getContentPlacementUrl = function getContentPlacementUrl(cp) {
5
- var cp_url = '';
6
- if (cp.ancestor && typeof cp.ancestor == 'string') {
7
- cp_url += (cp_url === '' ? '' : '/') + cp.ancestor;
8
- }
5
+ var cp_url = '';
6
+ if (cp.ancestor && typeof cp.ancestor == 'string') {
7
+ cp_url += (cp_url === '' ? '' : '/') + cp.ancestor;
8
+ }
9
9
 
10
- if (!cp.ancestor && cp.parent && typeof cp.parent == 'string') {
11
- cp_url += (cp_url === '' ? '' : '/') + cp.parent;
12
- }
10
+ if (!cp.ancestor && cp.parent && typeof cp.parent == 'string') {
11
+ cp_url += (cp_url === '' ? '' : '/') + cp.parent;
12
+ }
13
13
 
14
- cp_url += (cp_url === '' ? '' : '/') + cp.path;
14
+ cp_url += (cp_url === '' ? '' : '/') + cp.path;
15
15
 
16
- return cp_url;
16
+ return cp_url;
17
17
  };
18
18
 
19
19
  var getTargeting = function getTargeting(props) {
@@ -6,4 +6,4 @@ import './toConsumableArray-43aa614d.js';
6
6
  import './core.get-iterator-method-e1de7503.js';
7
7
  import './_object-pie-33c40e79.js';
8
8
  import './extends-eb69e8ac.js';
9
- export { g as default } from './getTargeting-7211f12c.js';
9
+ export { g as default } from './getTargeting-f22b76f5.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
 
5
5
  var domain;
@@ -1040,7 +1040,7 @@ Object.defineProperty(exports, "__esModule", {
1040
1040
  });
1041
1041
  exports.default = exports.Context = void 0;
1042
1042
 
1043
- var _react = _interopRequireDefault(React__default);
1043
+ var _react = _interopRequireDefault(React);
1044
1044
 
1045
1045
  var _propTypes = _interopRequireDefault(PropTypes);
1046
1046
 
@@ -1354,7 +1354,7 @@ Object.defineProperty(exports, "__esModule", {
1354
1354
  });
1355
1355
  exports.default = exports.AdSlot = void 0;
1356
1356
 
1357
- var _react = _interopRequireDefault(React__default);
1357
+ var _react = _interopRequireDefault(React);
1358
1358
 
1359
1359
  var _propTypes = _interopRequireDefault(PropTypes);
1360
1360
 
@@ -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
 
@@ -1,5 +1,5 @@
1
1
  import { c as createCommonjsModule, a as commonjsGlobal, g as getCjsExportFromNamespace } from './_commonjsHelpers-0c4b6f40.js';
2
- import { m as moment } from './moment-e2f9b20c.js';
2
+ import { m as moment } from './moment-12415288.js';
3
3
 
4
4
  var momentTimezone = createCommonjsModule(function (module) {
5
5
  //! moment-timezone.js