@mjhls/mjh-framework 1.0.691-beta.5 → 1.0.691-beta.7

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 (45) hide show
  1. package/dist/cjs/ADGutter.js +6 -3
  2. package/dist/cjs/{ADInfeed-8952e375.js → ADInfeed-13f9664d.js} +6 -3
  3. package/dist/cjs/ADSkyscraper.js +6 -3
  4. package/dist/cjs/ADSponsoredResources.js +6 -3
  5. package/dist/cjs/ADWebcast.js +6 -3
  6. package/dist/cjs/{ADlgInfeed-20c916fc.js → ADlgInfeed-1520d505.js} +6 -3
  7. package/dist/cjs/AdSlot.js +1 -1
  8. package/dist/cjs/AdSlotsProvider.js +1 -1
  9. package/dist/cjs/Auth.js +6 -206
  10. package/dist/cjs/DeckContent.js +4 -2
  11. package/dist/cjs/ExternalResources.js +1 -1
  12. package/dist/cjs/GridContent.js +8 -4
  13. package/dist/cjs/IssueLanding.js +2 -2
  14. package/dist/cjs/MasterDeck.js +8 -4
  15. package/dist/cjs/PartnerDetailListing.js +3 -3
  16. package/dist/cjs/QueueDeckExpanded.js +8 -4
  17. package/dist/cjs/View.js +10 -8
  18. package/dist/cjs/getRelatedArticle.js +354 -5
  19. package/dist/cjs/getSerializers.js +1 -1
  20. package/dist/cjs/index-bd6c9f56.js +211 -0
  21. package/dist/cjs/index.js +6 -6
  22. package/dist/esm/ADGutter.js +6 -3
  23. package/dist/esm/{ADInfeed-1153eefc.js → ADInfeed-63798269.js} +6 -3
  24. package/dist/esm/ADSkyscraper.js +6 -3
  25. package/dist/esm/ADSponsoredResources.js +6 -3
  26. package/dist/esm/ADWebcast.js +6 -3
  27. package/dist/esm/{ADlgInfeed-8cb4e36a.js → ADlgInfeed-ea0e136c.js} +6 -3
  28. package/dist/esm/AdSlot.js +1 -1
  29. package/dist/esm/AdSlotsProvider.js +1 -1
  30. package/dist/esm/Auth.js +1 -201
  31. package/dist/esm/DeckContent.js +4 -2
  32. package/dist/esm/ExternalResources.js +1 -1
  33. package/dist/esm/GridContent.js +8 -4
  34. package/dist/esm/IssueLanding.js +2 -2
  35. package/dist/esm/MasterDeck.js +8 -4
  36. package/dist/esm/PartnerDetailListing.js +3 -3
  37. package/dist/esm/QueueDeckExpanded.js +8 -4
  38. package/dist/esm/View.js +10 -8
  39. package/dist/esm/getRelatedArticle.js +354 -5
  40. package/dist/esm/getSerializers.js +1 -1
  41. package/dist/esm/index-db3bb315.js +207 -0
  42. package/dist/esm/index.js +5 -5
  43. package/package.json +1 -1
  44. /package/dist/cjs/{index-0fff88e9.js → index-973d14f9.js} +0 -0
  45. /package/dist/esm/{index-792a492f.js → index-385c2469.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require('./_commonjsHelpers-06173234.js');
3
+ var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
4
4
  require('./_to-object-329a650b.js');
5
5
  require('./es6.string.iterator-cc0bbaa4.js');
6
6
  require('./_library-dd23b178.js');
@@ -9,9 +9,358 @@ require('./core.get-iterator-method-f62321d4.js');
9
9
  require('./web.dom.iterable-a0e279c1.js');
10
10
  var asyncToGenerator = require('./asyncToGenerator-533d476a.js');
11
11
  require('./_set-species-f92c67c5.js');
12
- var nookies = require('nookies');
12
+ var index$4 = require('./index-bd6c9f56.js');
13
13
  var getQuery = require('./getQuery.js');
14
14
 
15
+ var defaultParseOptions = {
16
+ decodeValues: true,
17
+ map: false,
18
+ silent: false,
19
+ };
20
+
21
+ function isNonEmptyString(str) {
22
+ return typeof str === "string" && !!str.trim();
23
+ }
24
+
25
+ function parseString(setCookieValue, options) {
26
+ var parts = setCookieValue.split(";").filter(isNonEmptyString);
27
+ var nameValue = parts.shift().split("=");
28
+ var name = nameValue.shift();
29
+ var value = nameValue.join("="); // everything after the first =, joined by a "=" if there was more than one part
30
+
31
+ options = options
32
+ ? Object.assign({}, defaultParseOptions, options)
33
+ : defaultParseOptions;
34
+
35
+ var cookie = {
36
+ name: name, // grab everything before the first =
37
+ value: options.decodeValues ? decodeURIComponent(value) : value, // decode cookie value
38
+ };
39
+
40
+ parts.forEach(function (part) {
41
+ var sides = part.split("=");
42
+ var key = sides.shift().trimLeft().toLowerCase();
43
+ var value = sides.join("=");
44
+ if (key === "expires") {
45
+ cookie.expires = new Date(value);
46
+ } else if (key === "max-age") {
47
+ cookie.maxAge = parseInt(value, 10);
48
+ } else if (key === "secure") {
49
+ cookie.secure = true;
50
+ } else if (key === "httponly") {
51
+ cookie.httpOnly = true;
52
+ } else if (key === "samesite") {
53
+ cookie.sameSite = value;
54
+ } else {
55
+ cookie[key] = value;
56
+ }
57
+ });
58
+
59
+ return cookie;
60
+ }
61
+
62
+ function parse(input, options) {
63
+ options = options
64
+ ? Object.assign({}, defaultParseOptions, options)
65
+ : defaultParseOptions;
66
+
67
+ if (!input) {
68
+ if (!options.map) {
69
+ return [];
70
+ } else {
71
+ return {};
72
+ }
73
+ }
74
+
75
+ if (input.headers && input.headers["set-cookie"]) {
76
+ // fast-path for node.js (which automatically normalizes header names to lower-case
77
+ input = input.headers["set-cookie"];
78
+ } else if (input.headers) {
79
+ // slow-path for other environments - see #25
80
+ var sch =
81
+ input.headers[
82
+ Object.keys(input.headers).find(function (key) {
83
+ return key.toLowerCase() === "set-cookie";
84
+ })
85
+ ];
86
+ // warn if called on a request-like object with a cookie header rather than a set-cookie header - see #34, 36
87
+ if (!sch && input.headers.cookie && !options.silent) {
88
+ console.warn(
89
+ "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."
90
+ );
91
+ }
92
+ input = sch;
93
+ }
94
+ if (!Array.isArray(input)) {
95
+ input = [input];
96
+ }
97
+
98
+ options = options
99
+ ? Object.assign({}, defaultParseOptions, options)
100
+ : defaultParseOptions;
101
+
102
+ if (!options.map) {
103
+ return input.filter(isNonEmptyString).map(function (str) {
104
+ return parseString(str, options);
105
+ });
106
+ } else {
107
+ var cookies = {};
108
+ return input.filter(isNonEmptyString).reduce(function (cookies, str) {
109
+ var cookie = parseString(str, options);
110
+ cookies[cookie.name] = cookie;
111
+ return cookies;
112
+ }, cookies);
113
+ }
114
+ }
115
+
116
+ /*
117
+ Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas
118
+ that are within a single set-cookie field-value, such as in the Expires portion.
119
+
120
+ This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2
121
+ Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128
122
+ React Native's fetch does this for *every* header, including set-cookie.
123
+
124
+ Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25
125
+ Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation
126
+ */
127
+ function splitCookiesString(cookiesString) {
128
+ if (Array.isArray(cookiesString)) {
129
+ return cookiesString;
130
+ }
131
+ if (typeof cookiesString !== "string") {
132
+ return [];
133
+ }
134
+
135
+ var cookiesStrings = [];
136
+ var pos = 0;
137
+ var start;
138
+ var ch;
139
+ var lastComma;
140
+ var nextStart;
141
+ var cookiesSeparatorFound;
142
+
143
+ function skipWhitespace() {
144
+ while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) {
145
+ pos += 1;
146
+ }
147
+ return pos < cookiesString.length;
148
+ }
149
+
150
+ function notSpecialChar() {
151
+ ch = cookiesString.charAt(pos);
152
+
153
+ return ch !== "=" && ch !== ";" && ch !== ",";
154
+ }
155
+
156
+ while (pos < cookiesString.length) {
157
+ start = pos;
158
+ cookiesSeparatorFound = false;
159
+
160
+ while (skipWhitespace()) {
161
+ ch = cookiesString.charAt(pos);
162
+ if (ch === ",") {
163
+ // ',' is a cookie separator if we have later first '=', not ';' or ','
164
+ lastComma = pos;
165
+ pos += 1;
166
+
167
+ skipWhitespace();
168
+ nextStart = pos;
169
+
170
+ while (pos < cookiesString.length && notSpecialChar()) {
171
+ pos += 1;
172
+ }
173
+
174
+ // currently special character
175
+ if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") {
176
+ // we found cookies separator
177
+ cookiesSeparatorFound = true;
178
+ // pos is inside the next cookie, so back up and return it.
179
+ pos = nextStart;
180
+ cookiesStrings.push(cookiesString.substring(start, lastComma));
181
+ start = pos;
182
+ } else {
183
+ // in param ',' or param separator ';',
184
+ // we continue from that comma
185
+ pos = lastComma + 1;
186
+ }
187
+ } else {
188
+ pos += 1;
189
+ }
190
+ }
191
+
192
+ if (!cookiesSeparatorFound || pos >= cookiesString.length) {
193
+ cookiesStrings.push(cookiesString.substring(start, cookiesString.length));
194
+ }
195
+ }
196
+
197
+ return cookiesStrings;
198
+ }
199
+
200
+ var setCookie = parse;
201
+ var parse_1 = parse;
202
+ var parseString_1 = parseString;
203
+ var splitCookiesString_1 = splitCookiesString;
204
+ setCookie.parse = parse_1;
205
+ setCookie.parseString = parseString_1;
206
+ setCookie.splitCookiesString = splitCookiesString_1;
207
+
208
+ var dist = _commonjsHelpers.createCommonjsModule(function (module, exports) {
209
+ var __assign = (_commonjsHelpers.commonjsGlobal && _commonjsHelpers.commonjsGlobal.__assign) || function () {
210
+ __assign = Object.assign || function(t) {
211
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
212
+ s = arguments[i];
213
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
214
+ t[p] = s[p];
215
+ }
216
+ return t;
217
+ };
218
+ return __assign.apply(this, arguments);
219
+ };
220
+ Object.defineProperty(exports, "__esModule", { value: true });
221
+ exports.destroyCookie = exports.setCookie = exports.parseCookies = void 0;
222
+
223
+
224
+ var isBrowser = function () { return typeof window !== 'undefined'; };
225
+ function hasSameProperties(a, b) {
226
+ var aProps = Object.getOwnPropertyNames(a);
227
+ var bProps = Object.getOwnPropertyNames(b);
228
+ if (aProps.length !== bProps.length) {
229
+ return false;
230
+ }
231
+ for (var i = 0; i < aProps.length; i++) {
232
+ var propName = aProps[i];
233
+ if (a[propName] !== b[propName]) {
234
+ return false;
235
+ }
236
+ }
237
+ return true;
238
+ }
239
+ /**
240
+ * Compare the cookie and return true if the cookies has equivalent
241
+ * options and the cookies would be overwritten in the browser storage.
242
+ *
243
+ * @param a first Cookie for comparison
244
+ * @param b second Cookie for comparison
245
+ */
246
+ function areCookiesEqual(a, b) {
247
+ var sameSiteSame = a.sameSite === b.sameSite;
248
+ if (typeof a.sameSite === 'string' && typeof b.sameSite === 'string') {
249
+ sameSiteSame = a.sameSite.toLowerCase() === b.sameSite.toLowerCase();
250
+ }
251
+ return (hasSameProperties(__assign(__assign({}, a), { sameSite: undefined }), __assign(__assign({}, b), { sameSite: undefined })) && sameSiteSame);
252
+ }
253
+ /**
254
+ * Create an instance of the Cookie interface
255
+ *
256
+ * @param name name of the Cookie
257
+ * @param value value of the Cookie
258
+ * @param options Cookie options
259
+ */
260
+ function createCookie(name, value, options) {
261
+ var sameSite = options.sameSite;
262
+ if (sameSite === true) {
263
+ sameSite = 'strict';
264
+ }
265
+ if (sameSite === undefined || sameSite === false) {
266
+ sameSite = 'lax';
267
+ }
268
+ var cookieToSet = __assign(__assign({}, options), { sameSite: sameSite });
269
+ delete cookieToSet.encode;
270
+ return __assign({ name: name, value: value }, cookieToSet);
271
+ }
272
+ /**
273
+ *
274
+ * Parses cookies.
275
+ *
276
+ * @param ctx
277
+ * @param options
278
+ */
279
+ function parseCookies(ctx, options) {
280
+ if (ctx && ctx.req && ctx.req.headers && ctx.req.headers.cookie) {
281
+ return index$4.cookie.parse(ctx.req.headers.cookie, options);
282
+ }
283
+ if (isBrowser()) {
284
+ return index$4.cookie.parse(document.cookie, options);
285
+ }
286
+ return {};
287
+ }
288
+ exports.parseCookies = parseCookies;
289
+ /**
290
+ *
291
+ * Sets a cookie.
292
+ *
293
+ * @param ctx
294
+ * @param name
295
+ * @param value
296
+ * @param options
297
+ */
298
+ function setCookie$1(ctx, name, value, options) {
299
+ if (ctx && ctx.res && ctx.res.getHeader && ctx.res.setHeader) {
300
+ var cookies = ctx.res.getHeader('Set-Cookie') || [];
301
+ if (typeof cookies === 'string')
302
+ cookies = [cookies];
303
+ if (typeof cookies === 'number')
304
+ cookies = [];
305
+ var parsedCookies = setCookie.parse(cookies);
306
+ var cookiesToSet_1 = [];
307
+ parsedCookies.forEach(function (parsedCookie) {
308
+ if (!areCookiesEqual(parsedCookie, createCookie(name, value, options))) {
309
+ cookiesToSet_1.push(index$4.cookie.serialize(parsedCookie.name, parsedCookie.value, __assign({ encode: function (val) { return val; } }, parsedCookie)));
310
+ }
311
+ });
312
+ cookiesToSet_1.push(index$4.cookie.serialize(name, value, options));
313
+ if (!ctx.res.finished) {
314
+ ctx.res.setHeader('Set-Cookie', cookiesToSet_1);
315
+ }
316
+ }
317
+ if (isBrowser()) {
318
+ if (options && options.httpOnly) {
319
+ throw new Error('Can not set a httpOnly cookie in the browser.');
320
+ }
321
+ document.cookie = index$4.cookie.serialize(name, value, options);
322
+ }
323
+ return {};
324
+ }
325
+ exports.setCookie = setCookie$1;
326
+ /**
327
+ *
328
+ * Destroys a cookie with a particular name.
329
+ *
330
+ * @param ctx
331
+ * @param name
332
+ * @param options
333
+ */
334
+ function destroyCookie(ctx, name, options) {
335
+ var opts = __assign(__assign({}, (options || {})), { maxAge: -1 });
336
+ if (ctx && ctx.res && ctx.res.setHeader && ctx.res.getHeader) {
337
+ var cookies = ctx.res.getHeader('Set-Cookie') || [];
338
+ if (typeof cookies === 'string')
339
+ cookies = [cookies];
340
+ if (typeof cookies === 'number')
341
+ cookies = [];
342
+ cookies.push(index$4.cookie.serialize(name, '', opts));
343
+ ctx.res.setHeader('Set-Cookie', cookies);
344
+ }
345
+ if (isBrowser()) {
346
+ document.cookie = index$4.cookie.serialize(name, '', opts);
347
+ }
348
+ return {};
349
+ }
350
+ exports.destroyCookie = destroyCookie;
351
+ exports.default = {
352
+ set: setCookie$1,
353
+ get: parseCookies,
354
+ destroy: destroyCookie,
355
+ };
356
+
357
+ });
358
+
359
+ _commonjsHelpers.unwrapExports(dist);
360
+ var dist_1 = dist.destroyCookie;
361
+ var dist_2 = dist.setCookie;
362
+ var dist_3 = dist.parseCookies;
363
+
15
364
  var _this = undefined;
16
365
 
17
366
  var getRelatedArticle = function () {
@@ -71,13 +420,13 @@ var getRelatedArticle = function () {
71
420
  conditions = '';
72
421
 
73
422
  if (ctx && url) {
74
- cookies = nookies.parseCookies(ctx);
423
+ cookies = dist_3(ctx);
75
424
  prevSlugs = cookies['prevSlugs'];
76
425
 
77
426
  if (!!prevSlugs) {
78
- nookies.setCookie(ctx, 'prevSlugs', prevSlugs + ',"' + url + '"', {});
427
+ dist_2(ctx, 'prevSlugs', prevSlugs + ',"' + url + '"', {});
79
428
  conditions = '&& !(url.current in [' + prevSlugs + '])';
80
- } else nookies.setCookie(ctx, 'prevSlugs', '"' + url + '"', {});
429
+ } else dist_2(ctx, 'prevSlugs', '"' + url + '"', {});
81
430
  }
82
431
  relatedArticleQuery = getQuery('related', conditions, '', articleCount);
83
432
  _context.next = 12;
@@ -41,7 +41,7 @@ require('./smoothscroll-95231a70.js');
41
41
  require('./GroupDeck.js');
42
42
  require('react-bootstrap');
43
43
  require('react-bootstrap/Button');
44
- var getSerializers = require('./index-0fff88e9.js');
44
+ var getSerializers = require('./index-973d14f9.js');
45
45
  require('./util-f2c1b65b.js');
46
46
  require('./brightcove-react-player-loader.es-156bd4d6.js');
47
47
  require('react-bootstrap/Pagination');
@@ -0,0 +1,211 @@
1
+ 'use strict';
2
+
3
+ /*!
4
+ * cookie
5
+ * Copyright(c) 2012-2014 Roman Shtylman
6
+ * Copyright(c) 2015 Douglas Christopher Wilson
7
+ * MIT Licensed
8
+ */
9
+
10
+ /**
11
+ * Module exports.
12
+ * @public
13
+ */
14
+
15
+ var parse_1 = parse;
16
+ var serialize_1 = serialize;
17
+
18
+ /**
19
+ * Module variables.
20
+ * @private
21
+ */
22
+
23
+ var decode = decodeURIComponent;
24
+ var encode = encodeURIComponent;
25
+ var pairSplitRegExp = /; */;
26
+
27
+ /**
28
+ * RegExp to match field-content in RFC 7230 sec 3.2
29
+ *
30
+ * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
31
+ * field-vchar = VCHAR / obs-text
32
+ * obs-text = %x80-FF
33
+ */
34
+
35
+ var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
36
+
37
+ /**
38
+ * Parse a cookie header.
39
+ *
40
+ * Parse the given cookie header string into an object
41
+ * The object has the various cookies as keys(names) => values
42
+ *
43
+ * @param {string} str
44
+ * @param {object} [options]
45
+ * @return {object}
46
+ * @public
47
+ */
48
+
49
+ function parse(str, options) {
50
+ if (typeof str !== 'string') {
51
+ throw new TypeError('argument str must be a string');
52
+ }
53
+
54
+ var obj = {};
55
+ var opt = options || {};
56
+ var pairs = str.split(pairSplitRegExp);
57
+ var dec = opt.decode || decode;
58
+
59
+ for (var i = 0; i < pairs.length; i++) {
60
+ var pair = pairs[i];
61
+ var eq_idx = pair.indexOf('=');
62
+
63
+ // skip things that don't look like key=value
64
+ if (eq_idx < 0) {
65
+ continue;
66
+ }
67
+
68
+ var key = pair.substr(0, eq_idx).trim();
69
+ var val = pair.substr(++eq_idx, pair.length).trim();
70
+
71
+ // quoted values
72
+ if ('"' == val[0]) {
73
+ val = val.slice(1, -1);
74
+ }
75
+
76
+ // only assign once
77
+ if (undefined == obj[key]) {
78
+ obj[key] = tryDecode(val, dec);
79
+ }
80
+ }
81
+
82
+ return obj;
83
+ }
84
+
85
+ /**
86
+ * Serialize data into a cookie header.
87
+ *
88
+ * Serialize the a name value pair into a cookie string suitable for
89
+ * http headers. An optional options object specified cookie parameters.
90
+ *
91
+ * serialize('foo', 'bar', { httpOnly: true })
92
+ * => "foo=bar; httpOnly"
93
+ *
94
+ * @param {string} name
95
+ * @param {string} val
96
+ * @param {object} [options]
97
+ * @return {string}
98
+ * @public
99
+ */
100
+
101
+ function serialize(name, val, options) {
102
+ var opt = options || {};
103
+ var enc = opt.encode || encode;
104
+
105
+ if (typeof enc !== 'function') {
106
+ throw new TypeError('option encode is invalid');
107
+ }
108
+
109
+ if (!fieldContentRegExp.test(name)) {
110
+ throw new TypeError('argument name is invalid');
111
+ }
112
+
113
+ var value = enc(val);
114
+
115
+ if (value && !fieldContentRegExp.test(value)) {
116
+ throw new TypeError('argument val is invalid');
117
+ }
118
+
119
+ var str = name + '=' + value;
120
+
121
+ if (null != opt.maxAge) {
122
+ var maxAge = opt.maxAge - 0;
123
+
124
+ if (isNaN(maxAge) || !isFinite(maxAge)) {
125
+ throw new TypeError('option maxAge is invalid')
126
+ }
127
+
128
+ str += '; Max-Age=' + Math.floor(maxAge);
129
+ }
130
+
131
+ if (opt.domain) {
132
+ if (!fieldContentRegExp.test(opt.domain)) {
133
+ throw new TypeError('option domain is invalid');
134
+ }
135
+
136
+ str += '; Domain=' + opt.domain;
137
+ }
138
+
139
+ if (opt.path) {
140
+ if (!fieldContentRegExp.test(opt.path)) {
141
+ throw new TypeError('option path is invalid');
142
+ }
143
+
144
+ str += '; Path=' + opt.path;
145
+ }
146
+
147
+ if (opt.expires) {
148
+ if (typeof opt.expires.toUTCString !== 'function') {
149
+ throw new TypeError('option expires is invalid');
150
+ }
151
+
152
+ str += '; Expires=' + opt.expires.toUTCString();
153
+ }
154
+
155
+ if (opt.httpOnly) {
156
+ str += '; HttpOnly';
157
+ }
158
+
159
+ if (opt.secure) {
160
+ str += '; Secure';
161
+ }
162
+
163
+ if (opt.sameSite) {
164
+ var sameSite = typeof opt.sameSite === 'string'
165
+ ? opt.sameSite.toLowerCase() : opt.sameSite;
166
+
167
+ switch (sameSite) {
168
+ case true:
169
+ str += '; SameSite=Strict';
170
+ break;
171
+ case 'lax':
172
+ str += '; SameSite=Lax';
173
+ break;
174
+ case 'strict':
175
+ str += '; SameSite=Strict';
176
+ break;
177
+ case 'none':
178
+ str += '; SameSite=None';
179
+ break;
180
+ default:
181
+ throw new TypeError('option sameSite is invalid');
182
+ }
183
+ }
184
+
185
+ return str;
186
+ }
187
+
188
+ /**
189
+ * Try decoding a string using a decoding function.
190
+ *
191
+ * @param {string} str
192
+ * @param {function} decode
193
+ * @private
194
+ */
195
+
196
+ function tryDecode(str, decode) {
197
+ try {
198
+ return decode(str);
199
+ } catch (e) {
200
+ return str;
201
+ }
202
+ }
203
+
204
+ var cookie = {
205
+ parse: parse_1,
206
+ serialize: serialize_1
207
+ };
208
+
209
+ exports.cookie = cookie;
210
+ exports.parse_1 = parse_1;
211
+ exports.serialize_1 = serialize_1;
package/dist/cjs/index.js CHANGED
@@ -42,10 +42,10 @@ require('./_set-species-f92c67c5.js');
42
42
  var Segment = require('./Segment.js');
43
43
  var Beam = require('./Beam.js');
44
44
  var AdSlot = require('./AdSlot.js');
45
- require('./ADInfeed-8952e375.js');
45
+ require('./ADInfeed-13f9664d.js');
46
46
  var DeckContent = require('./DeckContent.js');
47
47
  require('./lodash-7fd85bcf.js');
48
- require('./ADlgInfeed-20c916fc.js');
48
+ require('./ADlgInfeed-1520d505.js');
49
49
  require('./getContentCategory-f38a4c00.js');
50
50
  require('./get-68c52cb1.js');
51
51
  var AD = require('./AD.js');
@@ -83,7 +83,7 @@ require('react-bootstrap/Form');
83
83
  require('./index-3294d3bc.js');
84
84
  require('./js.cookie-a511c430.js');
85
85
  var CMEDeck = require('./CMEDeck.js');
86
- var getSerializers = require('./index-0fff88e9.js');
86
+ var getSerializers = require('./index-973d14f9.js');
87
87
  require('./util-f2c1b65b.js');
88
88
  require('./brightcove-react-player-loader.es-156bd4d6.js');
89
89
  require('react-bootstrap/Pagination');
@@ -161,9 +161,9 @@ var ConferenceArticleCard = require('./ConferenceArticleCard.js');
161
161
  var KMTracker = require('./KMTracker.js');
162
162
  var getSeriesDetail = require('./getSeriesDetail.js');
163
163
  var SetCookie = require('./SetCookie.js');
164
- require('nookies');
165
- var getQuery = require('./getQuery.js');
164
+ require('./index-bd6c9f56.js');
166
165
  var getRelatedArticle = require('./getRelatedArticle.js');
166
+ var getQuery = require('./getQuery.js');
167
167
  var Auth = require('./Auth.js');
168
168
  require('swr');
169
169
  require('passport-local');
@@ -254,8 +254,8 @@ exports.ConferenceArticleCard = ConferenceArticleCard;
254
254
  exports.KMTracker = KMTracker;
255
255
  exports.getSeriesDetail = getSeriesDetail;
256
256
  exports.SetCookie = SetCookie;
257
- exports.getQuery = getQuery;
258
257
  exports.getRelatedArticle = getRelatedArticle;
258
+ exports.getQuery = getQuery;
259
259
  exports.Auth = Auth.default;
260
260
  exports.getTargeting = getTargeting.getTargeting;
261
261
  exports.View = View;
@@ -23,7 +23,9 @@ var ADGutter = function ADGutter(_ref) {
23
23
  var title = _ref.title,
24
24
  gutterAd = _ref.gutterAd,
25
25
  _ref$minScreenWidth = _ref.minScreenWidth,
26
- minScreenWidth = _ref$minScreenWidth === undefined ? 1700 : _ref$minScreenWidth;
26
+ minScreenWidth = _ref$minScreenWidth === undefined ? 1700 : _ref$minScreenWidth,
27
+ _ref$refreshFlag = _ref.refreshFlag,
28
+ refreshFlag = _ref$refreshFlag === undefined ? false : _ref$refreshFlag;
27
29
  var className = gutterAd.className,
28
30
  slotId = gutterAd.slotId,
29
31
  adUnit = gutterAd.adUnit,
@@ -118,8 +120,9 @@ var ADGutter = function ADGutter(_ref) {
118
120
  networkID: networkID,
119
121
  sizes: sizes,
120
122
  adUnit: adUnit,
121
- targeting: adTargeting,
122
- refreshFlag: false
123
+ targeting: adTargeting
124
+ /* Passing refresh flag */
125
+ , refreshFlag: refreshFlag
123
126
  /* Passing function to check for ad creative only if it is not in preview. */
124
127
  , checkIsAdFound: previewAd ? null : checkIsAdFound
125
128
  })
@@ -6,7 +6,9 @@ import DFPAdSlot from './AdSlot.js';
6
6
 
7
7
  var ADInfeed = function ADInfeed(_ref) {
8
8
  var index = _ref.index,
9
- infeedAd = _ref.infeedAd;
9
+ infeedAd = _ref.infeedAd,
10
+ _ref$refreshFlag = _ref.refreshFlag,
11
+ refreshFlag = _ref$refreshFlag === undefined ? false : _ref$refreshFlag;
10
12
  var className = infeedAd.className,
11
13
  slotId = infeedAd.slotId,
12
14
  adUnit = infeedAd.adUnit,
@@ -73,8 +75,9 @@ var ADInfeed = function ADInfeed(_ref) {
73
75
  targeting: targeting,
74
76
  sizes: sizes
75
77
  /* Passing function to check for ad creative only if it is not in preview. */
76
- , checkIsAdFound: previewAd ? null : checkIsAdFound,
77
- refreshFlag: false
78
+ , checkIsAdFound: previewAd ? null : checkIsAdFound
79
+ /* Passing refresh flag */
80
+ , refreshFlag: refreshFlag
78
81
  })
79
82
  ),
80
83
  React__default.createElement(