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

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 (35) hide show
  1. package/dist/cjs/AdSlot.js +1 -1
  2. package/dist/cjs/Auth.js +206 -6
  3. package/dist/cjs/DeckContent.js +1 -1
  4. package/dist/cjs/ExternalResources.js +1 -1
  5. package/dist/cjs/GridContent.js +2 -2
  6. package/dist/cjs/IssueLanding.js +2 -2
  7. package/dist/cjs/MasterDeck.js +2 -2
  8. package/dist/cjs/PartnerDetailListing.js +3 -3
  9. package/dist/cjs/QueueDeckExpanded.js +2 -2
  10. package/dist/cjs/View.js +3 -3
  11. package/dist/cjs/getRelatedArticle.js +5 -354
  12. package/dist/cjs/getSerializers.js +1 -1
  13. package/dist/cjs/index.js +6 -6
  14. package/dist/esm/AdSlot.js +1 -1
  15. package/dist/esm/Auth.js +201 -1
  16. package/dist/esm/DeckContent.js +1 -1
  17. package/dist/esm/ExternalResources.js +1 -1
  18. package/dist/esm/GridContent.js +2 -2
  19. package/dist/esm/IssueLanding.js +2 -2
  20. package/dist/esm/MasterDeck.js +2 -2
  21. package/dist/esm/PartnerDetailListing.js +3 -3
  22. package/dist/esm/QueueDeckExpanded.js +2 -2
  23. package/dist/esm/View.js +3 -3
  24. package/dist/esm/getRelatedArticle.js +5 -354
  25. package/dist/esm/getSerializers.js +1 -1
  26. package/dist/esm/index.js +5 -5
  27. package/package.json +1 -1
  28. package/dist/cjs/index-bd6c9f56.js +0 -211
  29. package/dist/esm/index-db3bb315.js +0 -207
  30. /package/dist/cjs/{ADInfeed-13f9664d.js → ADInfeed-59543270.js} +0 -0
  31. /package/dist/cjs/{ADlgInfeed-1520d505.js → ADlgInfeed-0a1546ae.js} +0 -0
  32. /package/dist/cjs/{index-973d14f9.js → index-bc377510.js} +0 -0
  33. /package/dist/esm/{ADInfeed-63798269.js → ADInfeed-a15fb981.js} +0 -0
  34. /package/dist/esm/{ADlgInfeed-ea0e136c.js → ADlgInfeed-33c8a066.js} +0 -0
  35. /package/dist/esm/{index-385c2469.js → index-d1920c2d.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
3
+ 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,358 +9,9 @@ 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 index$4 = require('./index-bd6c9f56.js');
12
+ var nookies = require('nookies');
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
-
364
15
  var _this = undefined;
365
16
 
366
17
  var getRelatedArticle = function () {
@@ -420,13 +71,13 @@ var getRelatedArticle = function () {
420
71
  conditions = '';
421
72
 
422
73
  if (ctx && url) {
423
- cookies = dist_3(ctx);
74
+ cookies = nookies.parseCookies(ctx);
424
75
  prevSlugs = cookies['prevSlugs'];
425
76
 
426
77
  if (!!prevSlugs) {
427
- dist_2(ctx, 'prevSlugs', prevSlugs + ',"' + url + '"', {});
78
+ nookies.setCookie(ctx, 'prevSlugs', prevSlugs + ',"' + url + '"', {});
428
79
  conditions = '&& !(url.current in [' + prevSlugs + '])';
429
- } else dist_2(ctx, 'prevSlugs', '"' + url + '"', {});
80
+ } else nookies.setCookie(ctx, 'prevSlugs', '"' + url + '"', {});
430
81
  }
431
82
  relatedArticleQuery = getQuery('related', conditions, '', articleCount);
432
83
  _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-973d14f9.js');
44
+ var getSerializers = require('./index-bc377510.js');
45
45
  require('./util-f2c1b65b.js');
46
46
  require('./brightcove-react-player-loader.es-156bd4d6.js');
47
47
  require('react-bootstrap/Pagination');
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-13f9664d.js');
45
+ require('./ADInfeed-59543270.js');
46
46
  var DeckContent = require('./DeckContent.js');
47
47
  require('./lodash-7fd85bcf.js');
48
- require('./ADlgInfeed-1520d505.js');
48
+ require('./ADlgInfeed-0a1546ae.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-973d14f9.js');
86
+ var getSerializers = require('./index-bc377510.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('./index-bd6c9f56.js');
165
- var getRelatedArticle = require('./getRelatedArticle.js');
164
+ require('nookies');
166
165
  var getQuery = require('./getQuery.js');
166
+ var getRelatedArticle = require('./getRelatedArticle.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.getRelatedArticle = getRelatedArticle;
258
257
  exports.getQuery = getQuery;
258
+ exports.getRelatedArticle = getRelatedArticle;
259
259
  exports.Auth = Auth.default;
260
260
  exports.getTargeting = getTargeting.getTargeting;
261
261
  exports.View = View;
@@ -38,7 +38,7 @@ var DFPAdSlot = function DFPAdSlot(_ref) {
38
38
  adRendered = _useState2[0],
39
39
  setAdRendered = _useState2[1];
40
40
 
41
- var _useState3 = useState(false),
41
+ var _useState3 = useState(true),
42
42
  _useState4 = _slicedToArray(_useState3, 2),
43
43
  adRefreshable = _useState4[0],
44
44
  setAdRefreshable = _useState4[1];
package/dist/esm/Auth.js CHANGED
@@ -15,7 +15,6 @@ import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-7c6
15
15
  import './_set-species-cede29f8.js';
16
16
  import { Col, Form, Button, Spinner } from 'react-bootstrap';
17
17
  import { u as util } from './util-7700fc59.js';
18
- import { s as serialize_1, p as parse_1 } from './index-db3bb315.js';
19
18
  import useSWR from 'swr';
20
19
  import Local from 'passport-local';
21
20
  import mysql from 'mysql';
@@ -1203,6 +1202,207 @@ var SignupForm$1 = function SignupForm(props) {
1203
1202
  );
1204
1203
  };
1205
1204
 
1205
+ /*!
1206
+ * cookie
1207
+ * Copyright(c) 2012-2014 Roman Shtylman
1208
+ * Copyright(c) 2015 Douglas Christopher Wilson
1209
+ * MIT Licensed
1210
+ */
1211
+
1212
+ /**
1213
+ * Module exports.
1214
+ * @public
1215
+ */
1216
+
1217
+ var parse_1 = parse;
1218
+ var serialize_1 = serialize;
1219
+
1220
+ /**
1221
+ * Module variables.
1222
+ * @private
1223
+ */
1224
+
1225
+ var decode = decodeURIComponent;
1226
+ var encode = encodeURIComponent;
1227
+ var pairSplitRegExp = /; */;
1228
+
1229
+ /**
1230
+ * RegExp to match field-content in RFC 7230 sec 3.2
1231
+ *
1232
+ * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
1233
+ * field-vchar = VCHAR / obs-text
1234
+ * obs-text = %x80-FF
1235
+ */
1236
+
1237
+ var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
1238
+
1239
+ /**
1240
+ * Parse a cookie header.
1241
+ *
1242
+ * Parse the given cookie header string into an object
1243
+ * The object has the various cookies as keys(names) => values
1244
+ *
1245
+ * @param {string} str
1246
+ * @param {object} [options]
1247
+ * @return {object}
1248
+ * @public
1249
+ */
1250
+
1251
+ function parse(str, options) {
1252
+ if (typeof str !== 'string') {
1253
+ throw new TypeError('argument str must be a string');
1254
+ }
1255
+
1256
+ var obj = {};
1257
+ var opt = options || {};
1258
+ var pairs = str.split(pairSplitRegExp);
1259
+ var dec = opt.decode || decode;
1260
+
1261
+ for (var i = 0; i < pairs.length; i++) {
1262
+ var pair = pairs[i];
1263
+ var eq_idx = pair.indexOf('=');
1264
+
1265
+ // skip things that don't look like key=value
1266
+ if (eq_idx < 0) {
1267
+ continue;
1268
+ }
1269
+
1270
+ var key = pair.substr(0, eq_idx).trim();
1271
+ var val = pair.substr(++eq_idx, pair.length).trim();
1272
+
1273
+ // quoted values
1274
+ if ('"' == val[0]) {
1275
+ val = val.slice(1, -1);
1276
+ }
1277
+
1278
+ // only assign once
1279
+ if (undefined == obj[key]) {
1280
+ obj[key] = tryDecode(val, dec);
1281
+ }
1282
+ }
1283
+
1284
+ return obj;
1285
+ }
1286
+
1287
+ /**
1288
+ * Serialize data into a cookie header.
1289
+ *
1290
+ * Serialize the a name value pair into a cookie string suitable for
1291
+ * http headers. An optional options object specified cookie parameters.
1292
+ *
1293
+ * serialize('foo', 'bar', { httpOnly: true })
1294
+ * => "foo=bar; httpOnly"
1295
+ *
1296
+ * @param {string} name
1297
+ * @param {string} val
1298
+ * @param {object} [options]
1299
+ * @return {string}
1300
+ * @public
1301
+ */
1302
+
1303
+ function serialize(name, val, options) {
1304
+ var opt = options || {};
1305
+ var enc = opt.encode || encode;
1306
+
1307
+ if (typeof enc !== 'function') {
1308
+ throw new TypeError('option encode is invalid');
1309
+ }
1310
+
1311
+ if (!fieldContentRegExp.test(name)) {
1312
+ throw new TypeError('argument name is invalid');
1313
+ }
1314
+
1315
+ var value = enc(val);
1316
+
1317
+ if (value && !fieldContentRegExp.test(value)) {
1318
+ throw new TypeError('argument val is invalid');
1319
+ }
1320
+
1321
+ var str = name + '=' + value;
1322
+
1323
+ if (null != opt.maxAge) {
1324
+ var maxAge = opt.maxAge - 0;
1325
+
1326
+ if (isNaN(maxAge) || !isFinite(maxAge)) {
1327
+ throw new TypeError('option maxAge is invalid')
1328
+ }
1329
+
1330
+ str += '; Max-Age=' + Math.floor(maxAge);
1331
+ }
1332
+
1333
+ if (opt.domain) {
1334
+ if (!fieldContentRegExp.test(opt.domain)) {
1335
+ throw new TypeError('option domain is invalid');
1336
+ }
1337
+
1338
+ str += '; Domain=' + opt.domain;
1339
+ }
1340
+
1341
+ if (opt.path) {
1342
+ if (!fieldContentRegExp.test(opt.path)) {
1343
+ throw new TypeError('option path is invalid');
1344
+ }
1345
+
1346
+ str += '; Path=' + opt.path;
1347
+ }
1348
+
1349
+ if (opt.expires) {
1350
+ if (typeof opt.expires.toUTCString !== 'function') {
1351
+ throw new TypeError('option expires is invalid');
1352
+ }
1353
+
1354
+ str += '; Expires=' + opt.expires.toUTCString();
1355
+ }
1356
+
1357
+ if (opt.httpOnly) {
1358
+ str += '; HttpOnly';
1359
+ }
1360
+
1361
+ if (opt.secure) {
1362
+ str += '; Secure';
1363
+ }
1364
+
1365
+ if (opt.sameSite) {
1366
+ var sameSite = typeof opt.sameSite === 'string'
1367
+ ? opt.sameSite.toLowerCase() : opt.sameSite;
1368
+
1369
+ switch (sameSite) {
1370
+ case true:
1371
+ str += '; SameSite=Strict';
1372
+ break;
1373
+ case 'lax':
1374
+ str += '; SameSite=Lax';
1375
+ break;
1376
+ case 'strict':
1377
+ str += '; SameSite=Strict';
1378
+ break;
1379
+ case 'none':
1380
+ str += '; SameSite=None';
1381
+ break;
1382
+ default:
1383
+ throw new TypeError('option sameSite is invalid');
1384
+ }
1385
+ }
1386
+
1387
+ return str;
1388
+ }
1389
+
1390
+ /**
1391
+ * Try decoding a string using a decoding function.
1392
+ *
1393
+ * @param {string} str
1394
+ * @param {function} decode
1395
+ * @private
1396
+ */
1397
+
1398
+ function tryDecode(str, decode) {
1399
+ try {
1400
+ return decode(str);
1401
+ } catch (e) {
1402
+ return str;
1403
+ }
1404
+ }
1405
+
1206
1406
  var TOKEN_NAME = 'token';
1207
1407
  var MAX_AGE = 60 * 60 * 8; // 8 hours
1208
1408
 
@@ -38,7 +38,7 @@ import './_set-species-cede29f8.js';
38
38
  import './Segment.js';
39
39
  import './Beam.js';
40
40
  import './AdSlot.js';
41
- import { A as ADInfeed } from './ADInfeed-63798269.js';
41
+ import { A as ADInfeed } from './ADInfeed-a15fb981.js';
42
42
 
43
43
  var DeckContent = function (_React$Component) {
44
44
  _inherits(DeckContent, _React$Component);
@@ -40,7 +40,7 @@ import './GroupDeck.js';
40
40
  import 'react-bootstrap';
41
41
  import Button from 'react-bootstrap/Button';
42
42
  import { m as momentTimezone } from './index-ef6d5dcf.js';
43
- import { g as getSerializers } from './index-385c2469.js';
43
+ import { g as getSerializers } from './index-d1920c2d.js';
44
44
  import './util-7700fc59.js';
45
45
  import './brightcove-react-player-loader.es-83f53e4e.js';
46
46
  import 'react-bootstrap/Pagination';
@@ -38,9 +38,9 @@ import './_set-species-cede29f8.js';
38
38
  import './Segment.js';
39
39
  import './Beam.js';
40
40
  import './AdSlot.js';
41
- import { A as ADInfeed } from './ADInfeed-63798269.js';
41
+ import { A as ADInfeed } from './ADInfeed-a15fb981.js';
42
42
  import { l as lodash } from './lodash-ec8c6b48.js';
43
- import { A as ADlgInfeed } from './ADlgInfeed-ea0e136c.js';
43
+ import { A as ADlgInfeed } from './ADlgInfeed-33c8a066.js';
44
44
  import { g as getContentCategory } from './getContentCategory-15dcc413.js';
45
45
  import { g as get_1 } from './get-5ee14cda.js';
46
46
  import './AD.js';