contentful 11.4.6 → 11.5.1

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.
@@ -22,7 +22,7 @@ var contentful = (function (exports) {
22
22
  function _throw(n) {
23
23
  asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
24
24
  }
25
- _next(undefined);
25
+ _next(void 0);
26
26
  });
27
27
  };
28
28
  }
@@ -45,7 +45,7 @@ var contentful = (function (exports) {
45
45
  if (r) {
46
46
  if ("string" == typeof r) return _arrayLikeToArray$4(r, a);
47
47
  var t = {}.toString.call(r).slice(8, -1);
48
- return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$4(r, a) : undefined;
48
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$4(r, a) : void 0;
49
49
  }
50
50
  }
51
51
 
@@ -82,7 +82,7 @@ var contentful = (function (exports) {
82
82
  function toPrimitive(t, r) {
83
83
  if ("object" != _typeof$2(t) || !t) return t;
84
84
  var e = t[Symbol.toPrimitive];
85
- if (undefined !== e) {
85
+ if (void 0 !== e) {
86
86
  var i = e.call(t, r);
87
87
  if ("object" != _typeof$2(i)) return i;
88
88
  throw new TypeError("@@toPrimitive must return a primitive value.");
@@ -212,7 +212,7 @@ var contentful = (function (exports) {
212
212
  };
213
213
  t ? t = t.next = i : (r = t = i, resume(e, n));
214
214
  });
215
- }, "function" != typeof e["return"] && (this["return"] = undefined);
215
+ }, "function" != typeof e["return"] && (this["return"] = void 0);
216
216
  }
217
217
  AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function () {
218
218
  return this;
@@ -481,7 +481,7 @@ var contentful = (function (exports) {
481
481
  }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
482
482
  return this;
483
483
  }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
484
- undefined === i && (i = Promise);
484
+ void 0 === i && (i = Promise);
485
485
  var a = new AsyncIterator(wrap(t, r, n, o), i);
486
486
  return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
487
487
  return t.done ? t.value : a.next();
@@ -604,12 +604,12 @@ var contentful = (function (exports) {
604
604
  var _regeneratorRuntime = /*@__PURE__*/getDefaultExportFromCjs(regenerator);
605
605
 
606
606
  function _createForOfIteratorHelper$3(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$3(r)) || e) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: true } : { done: false, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = true, u = false; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = true, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
607
- function _unsupportedIterableToArray$3(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$3(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$3(r, a) : undefined; } }
607
+ function _unsupportedIterableToArray$3(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$3(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$3(r, a) : void 0; } }
608
608
  function _arrayLikeToArray$3(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
609
609
  function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
610
610
  function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
611
611
  function _asyncIterator(r) { var n, t, o, e = 2; for ("undefined" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) { if (t && null != (n = r[t])) return n.call(r); if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r)); t = "@@asyncIterator", o = "@@iterator"; } throw new TypeError("Object is not async iterable"); }
612
- function AsyncFromSyncIterator(r) { function AsyncFromSyncIteratorContinuation(r) { if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); var n = r.done; return Promise.resolve(r.value).then(function (r) { return { value: r, done: n }; }); } return AsyncFromSyncIterator = function AsyncFromSyncIterator(r) { this.s = r, this.n = r.next; }, AsyncFromSyncIterator.prototype = { s: null, n: null, next: function next() { return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); }, return: function _return(r) { var n = this.s.return; return undefined === n ? Promise.resolve({ value: r, done: true }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); }, throw: function _throw(r) { var n = this.s.return; return undefined === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); } }, new AsyncFromSyncIterator(r); }
612
+ function AsyncFromSyncIterator(r) { function AsyncFromSyncIteratorContinuation(r) { if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); var n = r.done; return Promise.resolve(r.value).then(function (r) { return { value: r, done: n }; }); } return AsyncFromSyncIterator = function AsyncFromSyncIterator(r) { this.s = r, this.n = r.next; }, AsyncFromSyncIterator.prototype = { s: null, n: null, next: function next() { return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); }, return: function _return(r) { var n = this.s.return; return void 0 === n ? Promise.resolve({ value: r, done: true }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); }, throw: function _throw(r) { var n = this.s.return; return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); } }, new AsyncFromSyncIterator(r); }
613
613
  function bind$2(fn, thisArg) {
614
614
  return function wrap() {
615
615
  return fn.apply(thisArg, arguments);
@@ -860,7 +860,7 @@ var contentful = (function (exports) {
860
860
  function forEach(obj, fn) {
861
861
  var _ref3 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
862
862
  _ref3$allOwnKeys = _ref3.allOwnKeys,
863
- allOwnKeys = _ref3$allOwnKeys === undefined ? false : _ref3$allOwnKeys;
863
+ allOwnKeys = _ref3$allOwnKeys === void 0 ? false : _ref3$allOwnKeys;
864
864
  // Don't bother if no value provided
865
865
  if (obj === null || typeof obj === 'undefined') {
866
866
  return;
@@ -1205,23 +1205,6 @@ var contentful = (function (exports) {
1205
1205
  var toFiniteNumber = function toFiniteNumber(value, defaultValue) {
1206
1206
  return value != null && Number.isFinite(value = +value) ? value : defaultValue;
1207
1207
  };
1208
- var ALPHA = 'abcdefghijklmnopqrstuvwxyz';
1209
- var DIGIT = '0123456789';
1210
- var ALPHABET = {
1211
- DIGIT: DIGIT,
1212
- ALPHA: ALPHA,
1213
- ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
1214
- };
1215
- var generateString = function generateString() {
1216
- var size = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 16;
1217
- var alphabet = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ALPHABET.ALPHA_DIGIT;
1218
- var str = '';
1219
- var length = alphabet.length;
1220
- while (size--) {
1221
- str += alphabet[Math.random() * length | 0];
1222
- }
1223
- return str;
1224
- };
1225
1208
 
1226
1209
  /**
1227
1210
  * If the thing is a FormData object, return true, otherwise return false.
@@ -1338,8 +1321,6 @@ var contentful = (function (exports) {
1338
1321
  findKey: findKey,
1339
1322
  global: _global,
1340
1323
  isContextDefined: isContextDefined,
1341
- ALPHABET: ALPHABET,
1342
- generateString: generateString,
1343
1324
  isSpecCompliantForm: isSpecCompliantForm,
1344
1325
  toJSONObject: toJSONObject,
1345
1326
  isAsyncFn: isAsyncFn,
@@ -2565,7 +2546,7 @@ var contentful = (function (exports) {
2565
2546
  args[_key5] = arguments[_key5];
2566
2547
  }
2567
2548
  return utils$1$1.asap(function () {
2568
- return fn.apply(undefined, args);
2549
+ return fn.apply(void 0, args);
2569
2550
  });
2570
2551
  };
2571
2552
  };
@@ -2641,8 +2622,9 @@ var contentful = (function (exports) {
2641
2622
  *
2642
2623
  * @returns {string} The combined full path
2643
2624
  */
2644
- function buildFullPath(baseURL, requestedURL) {
2645
- if (baseURL && !isAbsoluteURL(requestedURL)) {
2625
+ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
2626
+ var isRelativeUrl = !isAbsoluteURL(requestedURL);
2627
+ if (baseURL && isRelativeUrl || allowAbsoluteUrls == false) {
2646
2628
  return combineURLs(baseURL, requestedURL);
2647
2629
  }
2648
2630
  return requestedURL;
@@ -3364,7 +3346,7 @@ var contentful = (function (exports) {
3364
3346
  return _regeneratorRuntime.wrap(function _callee7$(_context8) {
3365
3347
  while (1) switch (_context8.prev = _context8.next) {
3366
3348
  case 0:
3367
- _resolveConfig = resolveConfig(config), url = _resolveConfig.url, method = _resolveConfig.method, data = _resolveConfig.data, signal = _resolveConfig.signal, cancelToken = _resolveConfig.cancelToken, timeout = _resolveConfig.timeout, onDownloadProgress = _resolveConfig.onDownloadProgress, onUploadProgress = _resolveConfig.onUploadProgress, responseType = _resolveConfig.responseType, headers = _resolveConfig.headers, _resolveConfig$withCr = _resolveConfig.withCredentials, withCredentials = _resolveConfig$withCr === undefined ? 'same-origin' : _resolveConfig$withCr, fetchOptions = _resolveConfig.fetchOptions;
3349
+ _resolveConfig = resolveConfig(config), url = _resolveConfig.url, method = _resolveConfig.method, data = _resolveConfig.data, signal = _resolveConfig.signal, cancelToken = _resolveConfig.cancelToken, timeout = _resolveConfig.timeout, onDownloadProgress = _resolveConfig.onDownloadProgress, onUploadProgress = _resolveConfig.onUploadProgress, responseType = _resolveConfig.responseType, headers = _resolveConfig.headers, _resolveConfig$withCr = _resolveConfig.withCredentials, withCredentials = _resolveConfig$withCr === void 0 ? 'same-origin' : _resolveConfig$withCr, fetchOptions = _resolveConfig.fetchOptions;
3368
3350
  responseType = responseType ? (responseType + '').toLowerCase() : 'text';
3369
3351
  composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
3370
3352
  unsubscribe = composedSignal && composedSignal.unsubscribe && function () {
@@ -3508,7 +3490,7 @@ var contentful = (function (exports) {
3508
3490
  var rejectedReasons = {};
3509
3491
  for (var i = 0; i < length; i++) {
3510
3492
  nameOrAdapter = adapters[i];
3511
- var id = undefined;
3493
+ var id = void 0;
3512
3494
  adapter = nameOrAdapter;
3513
3495
  if (!isResolvedHandle(nameOrAdapter)) {
3514
3496
  adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
@@ -3589,7 +3571,7 @@ var contentful = (function (exports) {
3589
3571
  return Promise.reject(reason);
3590
3572
  });
3591
3573
  }
3592
- var VERSION = "1.7.9";
3574
+ var VERSION = "1.8.1";
3593
3575
  var validators$1 = {};
3594
3576
 
3595
3577
  // eslint-disable-next-line func-names
@@ -3778,6 +3760,13 @@ var contentful = (function (exports) {
3778
3760
  }, true);
3779
3761
  }
3780
3762
  }
3763
+
3764
+ // Set config.allowAbsoluteUrls
3765
+ if (config.allowAbsoluteUrls !== undefined) ;else if (this.defaults.allowAbsoluteUrls !== undefined) {
3766
+ config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
3767
+ } else {
3768
+ config.allowAbsoluteUrls = true;
3769
+ }
3781
3770
  validator.assertOptions(config, {
3782
3771
  baseUrl: validators.spelling('baseURL'),
3783
3772
  withXsrfToken: validators.spelling('withXSRFToken')
@@ -3850,7 +3839,7 @@ var contentful = (function (exports) {
3850
3839
  key: "getUri",
3851
3840
  value: function getUri(config) {
3852
3841
  config = mergeConfig(this.defaults, config);
3853
- var fullPath = buildFullPath(config.baseURL, config.url);
3842
+ var fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
3854
3843
  return buildURL(fullPath, config.params, config.paramsSerializer);
3855
3844
  }
3856
3845
  }]);
@@ -4300,7 +4289,7 @@ var contentful = (function (exports) {
4300
4289
  */
4301
4290
  function copyOwnPropertiesStrict(value, clone, state) {
4302
4291
  var properties = getStrictProperties(value);
4303
- for (var index = 0, length_1 = properties.length, property = undefined, descriptor = undefined; index < length_1; ++index) {
4292
+ for (var index = 0, length_1 = properties.length, property = void 0, descriptor = void 0; index < length_1; ++index) {
4304
4293
  property = properties[index];
4305
4294
  if (property === 'callee' || property === 'caller') {
4306
4295
  continue;
@@ -4409,7 +4398,7 @@ var contentful = (function (exports) {
4409
4398
  }
4410
4399
  }
4411
4400
  var symbols = getOwnPropertySymbols(object);
4412
- for (var index = 0, length_3 = symbols.length, symbol = undefined; index < length_3; ++index) {
4401
+ for (var index = 0, length_3 = symbols.length, symbol = void 0; index < length_3; ++index) {
4413
4402
  symbol = symbols[index];
4414
4403
  if (propertyIsEnumerable.call(object, symbol)) {
4415
4404
  clone[symbol] = state.copier(object[symbol], state);
@@ -4812,9 +4801,9 @@ var contentful = (function (exports) {
4812
4801
  var maxRetry = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 5;
4813
4802
  var _instance$defaults = instance.defaults,
4814
4803
  _instance$defaults$re = _instance$defaults.responseLogger,
4815
- responseLogger = _instance$defaults$re === undefined ? noop : _instance$defaults$re,
4804
+ responseLogger = _instance$defaults$re === void 0 ? noop : _instance$defaults$re,
4816
4805
  _instance$defaults$re2 = _instance$defaults.requestLogger,
4817
- requestLogger = _instance$defaults$re2 === undefined ? noop : _instance$defaults$re2;
4806
+ requestLogger = _instance$defaults$re2 === void 0 ? noop : _instance$defaults$re2;
4818
4807
  instance.interceptors.request.use(function (config) {
4819
4808
  requestLogger(config);
4820
4809
  return config;
@@ -5088,13 +5077,13 @@ var contentful = (function (exports) {
5088
5077
  var isString$2 = /*@__PURE__*/getDefaultExportFromCjs(isString_1);
5089
5078
 
5090
5079
  function _assertThisInitialized(e) {
5091
- if (undefined === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
5080
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
5092
5081
  return e;
5093
5082
  }
5094
5083
 
5095
5084
  function _possibleConstructorReturn(t, e) {
5096
5085
  if (e && ("object" == _typeof$2(e) || "function" == typeof e)) return e;
5097
- if (undefined !== e) throw new TypeError("Derived constructors may only return object or undefined");
5086
+ if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
5098
5087
  return _assertThisInitialized(t);
5099
5088
  }
5100
5089
 
@@ -5130,11 +5119,11 @@ var contentful = (function (exports) {
5130
5119
  }
5131
5120
 
5132
5121
  function _wrapNativeSuper(t) {
5133
- var r = "function" == typeof Map ? new Map() : undefined;
5122
+ var r = "function" == typeof Map ? new Map() : void 0;
5134
5123
  return _wrapNativeSuper = function _wrapNativeSuper(t) {
5135
5124
  if (null === t || !_isNativeFunction(t)) return t;
5136
5125
  if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
5137
- if (undefined !== r) {
5126
+ if (void 0 !== r) {
5138
5127
  if (r.has(t)) return r.get(t);
5139
5128
  r.set(t, Wrapper);
5140
5129
  }
@@ -5153,7 +5142,7 @@ var contentful = (function (exports) {
5153
5142
  }
5154
5143
 
5155
5144
  function _createForOfIteratorHelper$2(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$2(r)) || e) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: true } : { done: false, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = true, u = false; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = true, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
5156
- function _unsupportedIterableToArray$2(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$2(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$2(r, a) : undefined; } }
5145
+ function _unsupportedIterableToArray$2(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$2(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$2(r, a) : void 0; } }
5157
5146
  function _arrayLikeToArray$2(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
5158
5147
  function _callSuper$2(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$2() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
5159
5148
  function _isNativeReflectConstruct$2() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$2 = function _isNativeReflectConstruct() { return !!t; })(); }
@@ -5226,7 +5215,7 @@ var contentful = (function (exports) {
5226
5215
  if (delay > 0) {
5227
5216
  timeoutId = setTimeout(execute, delay);
5228
5217
  queue.set(timeoutId, reject);
5229
- onDelay === null || onDelay === undefined || onDelay.apply(undefined, arguments_);
5218
+ onDelay === null || onDelay === void 0 || onDelay.apply(void 0, arguments_);
5230
5219
  } else {
5231
5220
  execute();
5232
5221
  }
@@ -5258,7 +5247,7 @@ var contentful = (function (exports) {
5258
5247
  };
5259
5248
  }
5260
5249
 
5261
- function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(e, r) { return new BabelRegExp(e, undefined, r); }; var e = RegExp.prototype, r = new WeakMap(); function BabelRegExp(e, t, p) { var o = RegExp(e, t); return r.set(o, p || r.get(e)), _setPrototypeOf(o, BabelRegExp.prototype); } function buildGroups(e, t) { var p = r.get(t); return Object.keys(p).reduce(function (r, t) { var o = p[t]; if ("number" == typeof o) r[t] = e[o];else { for (var i = 0; undefined === e[o[i]] && i + 1 < o.length;) i++; r[t] = e[o[i]]; } return r; }, Object.create(null)); } return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { var t = e.exec.call(this, r); if (t) { t.groups = buildGroups(t, this); var p = t.indices; p && (p.groups = buildGroups(p, this)); } return t; }, BabelRegExp.prototype[Symbol.replace] = function (t, p) { if ("string" == typeof p) { var o = r.get(this); return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)>/g, function (e, r) { var t = o[r]; return "$" + (Array.isArray(t) ? t.join("$") : t); })); } if ("function" == typeof p) { var i = this; return e[Symbol.replace].call(this, t, function () { var e = arguments; return "object" != _typeof$2(e[e.length - 1]) && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); }); } return e[Symbol.replace].call(this, t, p); }, _wrapRegExp.apply(this, arguments); }
5250
+ function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(e, r) { return new BabelRegExp(e, void 0, r); }; var e = RegExp.prototype, r = new WeakMap(); function BabelRegExp(e, t, p) { var o = RegExp(e, t); return r.set(o, p || r.get(e)), _setPrototypeOf(o, BabelRegExp.prototype); } function buildGroups(e, t) { var p = r.get(t); return Object.keys(p).reduce(function (r, t) { var o = p[t]; if ("number" == typeof o) r[t] = e[o];else { for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; r[t] = e[o[i]]; } return r; }, Object.create(null)); } return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { var t = e.exec.call(this, r); if (t) { t.groups = buildGroups(t, this); var p = t.indices; p && (p.groups = buildGroups(p, this)); } return t; }, BabelRegExp.prototype[Symbol.replace] = function (t, p) { if ("string" == typeof p) { var o = r.get(this); return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)>/g, function (e, r) { var t = o[r]; return "$" + (Array.isArray(t) ? t.join("$") : t); })); } if ("function" == typeof p) { var i = this; return e[Symbol.replace].call(this, t, function () { var e = arguments; return "object" != _typeof$2(e[e.length - 1]) && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); }); } return e[Symbol.replace].call(this, t, p); }, _wrapRegExp.apply(this, arguments); }
5262
5251
  var PERCENTAGE_REGEX = /*#__PURE__*/_wrapRegExp(/(\d+)(%)/, {
5263
5252
  value: 1
5264
5253
  });
@@ -5267,7 +5256,7 @@ var contentful = (function (exports) {
5267
5256
  var limit = max;
5268
5257
  if (PERCENTAGE_REGEX.test(type)) {
5269
5258
  var _type$match;
5270
- var groups = (_type$match = type.match(PERCENTAGE_REGEX)) === null || _type$match === undefined ? undefined : _type$match.groups;
5259
+ var groups = (_type$match = type.match(PERCENTAGE_REGEX)) === null || _type$match === void 0 ? void 0 : _type$match.groups;
5271
5260
  if (groups && groups.value) {
5272
5261
  var percentage = parseInt(groups.value) / 100;
5273
5262
  limit = Math.round(max * percentage);
@@ -5284,7 +5273,7 @@ var contentful = (function (exports) {
5284
5273
  var rateLimitThrottle = (function (axiosInstance) {
5285
5274
  var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'auto';
5286
5275
  var _axiosInstance$defaul = axiosInstance.defaults.logHandler,
5287
- logHandler = _axiosInstance$defaul === undefined ? noop : _axiosInstance$defaul;
5276
+ logHandler = _axiosInstance$defaul === void 0 ? noop : _axiosInstance$defaul;
5288
5277
  var limit = isString$2(type) ? calculateLimit(type) : calculateLimit('auto', type);
5289
5278
  var throttle = createThrottle(limit, logHandler);
5290
5279
  var isCalculated = false;
@@ -5803,7 +5792,7 @@ var contentful = (function (exports) {
5803
5792
  if (!allowMissing) {
5804
5793
  throw new $TypeError$3('base intrinsic for ' + name + ' exists, but the property is not available.');
5805
5794
  }
5806
- return undefined;
5795
+ return void 0;
5807
5796
  }
5808
5797
  if ($gOPD$1 && i + 1 >= parts.length) {
5809
5798
  var desc = $gOPD$1(value, part);
@@ -6973,7 +6962,7 @@ var contentful = (function (exports) {
6973
6962
  var tmpSc = sideChannel;
6974
6963
  var step = 0;
6975
6964
  var findFlag = false;
6976
- while ((tmpSc = tmpSc.get(sentinel)) !== undefined && !findFlag) {
6965
+ while ((tmpSc = tmpSc.get(sentinel)) !== void 0 && !findFlag) {
6977
6966
  // Where object last appeared in the ref tree
6978
6967
  var pos = tmpSc.get(object);
6979
6968
  step += 1;
@@ -7024,7 +7013,7 @@ var contentful = (function (exports) {
7024
7013
  obj = utils$1.maybeMap(obj, encoder);
7025
7014
  }
7026
7015
  objKeys = [{
7027
- value: obj.length > 0 ? obj.join(',') || null : undefined
7016
+ value: obj.length > 0 ? obj.join(',') || null : void 0
7028
7017
  }];
7029
7018
  } else if (isArray$1(filter)) {
7030
7019
  objKeys = filter;
@@ -7586,7 +7575,7 @@ var contentful = (function (exports) {
7586
7575
  }
7587
7576
 
7588
7577
  function _createForOfIteratorHelper$1(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$1(r)) || e) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: true } : { done: false, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = true, u = false; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = true, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
7589
- function _unsupportedIterableToArray$1(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$1(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : undefined; } }
7578
+ function _unsupportedIterableToArray$1(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$1(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0; } }
7590
7579
  function _arrayLikeToArray$1(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
7591
7580
  // copied from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze
7592
7581
  function deepFreeze(object) {
@@ -7809,10 +7798,10 @@ var contentful = (function (exports) {
7809
7798
  if (!isPlainObject$1(response) || !isPlainObject$1(config)) {
7810
7799
  throw errorResponse;
7811
7800
  }
7812
- var data = response === null || response === undefined ? undefined : response.data;
7801
+ var data = response === null || response === void 0 ? void 0 : response.data;
7813
7802
  var errorData = {
7814
- status: response === null || response === undefined ? undefined : response.status,
7815
- statusText: response === null || response === undefined ? undefined : response.statusText,
7803
+ status: response === null || response === void 0 ? void 0 : response.status,
7804
+ statusText: response === null || response === void 0 ? void 0 : response.statusText,
7816
7805
  message: '',
7817
7806
  details: {}
7818
7807
  };
@@ -7835,15 +7824,15 @@ var contentful = (function (exports) {
7835
7824
  if ('details' in data) {
7836
7825
  errorData.details = data.details || {};
7837
7826
  }
7838
- errorName = (_data$sys = data.sys) === null || _data$sys === undefined ? undefined : _data$sys.id;
7827
+ errorName = (_data$sys = data.sys) === null || _data$sys === void 0 ? void 0 : _data$sys.id;
7839
7828
  }
7840
7829
  var error = new Error();
7841
- error.name = errorName && errorName !== 'Unknown' ? errorName : "".concat(response === null || response === undefined ? undefined : response.status, " ").concat(response === null || response === undefined ? undefined : response.statusText);
7830
+ error.name = errorName && errorName !== 'Unknown' ? errorName : "".concat(response === null || response === void 0 ? void 0 : response.status, " ").concat(response === null || response === void 0 ? void 0 : response.statusText);
7842
7831
  try {
7843
7832
  error.message = JSON.stringify(errorData, null, ' ');
7844
7833
  } catch (_unused) {
7845
7834
  var _errorData$message;
7846
- error.message = (_errorData$message = errorData === null || errorData === undefined ? undefined : errorData.message) !== null && _errorData$message !== undefined ? _errorData$message : '';
7835
+ error.message = (_errorData$message = errorData === null || errorData === void 0 ? void 0 : errorData.message) !== null && _errorData$message !== void 0 ? _errorData$message : '';
7847
7836
  }
7848
7837
  throw error;
7849
7838
  }
@@ -7869,7 +7858,7 @@ var contentful = (function (exports) {
7869
7858
  }
7870
7859
 
7871
7860
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: true } : { done: false, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = true, u = false; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = true, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
7872
- function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : undefined; } }
7861
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
7873
7862
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
7874
7863
  var W = {
7875
7864
  0: 8203,
@@ -7933,10 +7922,10 @@ var contentful = (function (exports) {
7933
7922
  function w(t, n) {
7934
7923
  return G(t, n);
7935
7924
  }
7936
- var x, F;
7925
+ var x, k;
7937
7926
  function ne() {
7938
- if (F) return x;
7939
- F = 1;
7927
+ if (k) return x;
7928
+ k = 1;
7940
7929
  var t = Object.prototype.hasOwnProperty,
7941
7930
  n = Object.prototype.toString;
7942
7931
  return x = function x(e, r, s) {
@@ -7977,7 +7966,7 @@ var contentful = (function (exports) {
7977
7966
  }, n.remove = function (o, e) {
7978
7967
  var r = Array.isArray(e) ? e : n.parse(e),
7979
7968
  s = r[r.length - 1];
7980
- if (s === undefined) throw new Error('Invalid JSON pointer for remove: "' + e + '"');
7969
+ if (s === void 0) throw new Error('Invalid JSON pointer for remove: "' + e + '"');
7981
7970
  var c = n.get(o, r.slice(0, -1));
7982
7971
  if (Array.isArray(c)) {
7983
7972
  var i = +s;
@@ -8027,7 +8016,7 @@ var contentful = (function (exports) {
8027
8016
  var r = n[t];
8028
8017
  if (r) {
8029
8018
  delete n[t];
8030
- var s = _C(o, t);
8019
+ var s = _b(o, t);
8031
8020
  var _iterator = _createForOfIteratorHelper(s),
8032
8021
  _step;
8033
8022
  try {
@@ -8044,7 +8033,7 @@ var contentful = (function (exports) {
8044
8033
  _iterator.f();
8045
8034
  }
8046
8035
  } else {
8047
- var _s = _C(o, t);
8036
+ var _s = _b(o, t);
8048
8037
  var _iterator2 = _createForOfIteratorHelper(_s),
8049
8038
  _step2;
8050
8039
  try {
@@ -8061,14 +8050,14 @@ var contentful = (function (exports) {
8061
8050
  }
8062
8051
  }
8063
8052
  },
8064
- _C = function C(t) {
8053
+ _b = function b(t) {
8065
8054
  var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
8066
8055
  var o = [],
8067
8056
  e = p.get(t, n);
8068
- if (e.content) for (var r = 0; r < e.content.length; r++) e.content[r].nodeType === "text" ? o.push("".concat(n, "/content/").concat(r, "/value")) : o.push.apply(o, _toConsumableArray$1(_C(t, "".concat(n, "/content/").concat(r))));
8057
+ if (e.content) for (var r = 0; r < e.content.length; r++) e.content[r].nodeType === "text" ? o.push("".concat(n, "/content/").concat(r, "/value")) : o.push.apply(o, _toConsumableArray$1(_b(t, "".concat(n, "/content/").concat(r))));
8069
8058
  return o;
8070
8059
  },
8071
- b = function b(_ref2) {
8060
+ C = function C(_ref2) {
8072
8061
  var t = _ref2.entityId,
8073
8062
  n = _ref2.entityType,
8074
8063
  o = _ref2.space,
@@ -8142,10 +8131,7 @@ var contentful = (function (exports) {
8142
8131
  var $ = function $(t, n, o, e, r) {
8143
8132
  if (!t.fields) return;
8144
8133
  var s = t.sys.contentSourceMaps;
8145
- if (!s) {
8146
- console.error("Content source maps data is missing");
8147
- return;
8148
- }
8134
+ if (!s) return;
8149
8135
  var c = s.mappings;
8150
8136
  var _loop = function _loop() {
8151
8137
  var u = c[i].source,
@@ -8160,18 +8146,18 @@ var contentful = (function (exports) {
8160
8146
  if (p.has(t, f)) {
8161
8147
  var h = p.get(t, f);
8162
8148
  if (h === null) return {
8163
- v: undefined
8149
+ v: void 0
8164
8150
  };
8165
8151
  var g = f.split("/").pop();
8166
8152
  if (!g) {
8167
8153
  console.error("Field name could not be extracted from the pointer", f);
8168
8154
  return {
8169
- v: undefined
8155
+ v: void 0
8170
8156
  };
8171
8157
  }
8172
8158
  var A = t.sys.locale;
8173
8159
  if (A) {
8174
- var E = b({
8160
+ var E = C({
8175
8161
  entityId: m,
8176
8162
  entityType: v,
8177
8163
  space: a,
@@ -8185,7 +8171,7 @@ var contentful = (function (exports) {
8185
8171
  });
8186
8172
  P(y, h, E, t, f, c);
8187
8173
  } else Object.keys(h).forEach(function (S) {
8188
- var T = b({
8174
+ var T = C({
8189
8175
  entityId: m,
8190
8176
  entityType: v,
8191
8177
  space: a,
@@ -8213,7 +8199,7 @@ var contentful = (function (exports) {
8213
8199
  var e = Q(t);
8214
8200
  if (e.sys && "items" in e) {
8215
8201
  var s = e;
8216
- if (!((r = s.sys) != null && r.contentSourceMapsLookup)) return console.error("Content source maps lookup data is missing"), s;
8202
+ if (!((r = s.sys) != null && r.contentSourceMapsLookup)) return s;
8217
8203
  var _s$sys$contentSourceM = s.sys.contentSourceMapsLookup,
8218
8204
  c = _s$sys$contentSourceM.fieldTypes,
8219
8205
  i = _s$sys$contentSourceM.editorInterfaces,
@@ -8337,7 +8323,7 @@ var contentful = (function (exports) {
8337
8323
  }
8338
8324
  if (SYMBOL_PROPERTIES) {
8339
8325
  var symbols = getOwnPropertySymbols(object);
8340
- for (var index = 0, length_1 = symbols.length, symbol = undefined; index < length_1; ++index) {
8326
+ for (var index = 0, length_1 = symbols.length, symbol = void 0; index < length_1; ++index) {
8341
8327
  symbol = symbols[index];
8342
8328
  if (propertyIsEnumerable.call(object, symbol)) {
8343
8329
  clone[symbol] = handleCopy(object[symbol], cache);
@@ -8363,7 +8349,7 @@ var contentful = (function (exports) {
8363
8349
  // set in the cache immediately to be able to reuse the object recursively
8364
8350
  cache.set(object, clone);
8365
8351
  var properties = SYMBOL_PROPERTIES ? getOwnPropertyNames(object).concat(getOwnPropertySymbols(object)) : getOwnPropertyNames(object);
8366
- for (var index = 0, length_2 = properties.length, property = undefined, descriptor = undefined; index < length_2; ++index) {
8352
+ for (var index = 0, length_2 = properties.length, property = void 0, descriptor = void 0; index < length_2; ++index) {
8367
8353
  property = properties[index];
8368
8354
  if (property !== 'callee' && property !== 'caller') {
8369
8355
  descriptor = getOwnPropertyDescriptor(object, property);
@@ -8586,7 +8572,7 @@ var contentful = (function (exports) {
8586
8572
  copy.strict = function strictCopy(value, options) {
8587
8573
  return copy(value, {
8588
8574
  isStrict: true,
8589
- realm: options ? options.realm : undefined
8575
+ realm: options ? options.realm : void 0
8590
8576
  });
8591
8577
  };
8592
8578
  return copy;
@@ -9288,8 +9274,8 @@ var contentful = (function (exports) {
9288
9274
  var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
9289
9275
  var _a, _b;
9290
9276
  var params = http.httpClientParams;
9291
- var includeContentSourceMaps = (_a = params === null || params === undefined ? undefined : params.includeContentSourceMaps) !== null && _a !== undefined ? _a : (_b = params === null || params === undefined ? undefined : params.alphaFeatures) === null || _b === undefined ? undefined : _b.includeContentSourceMaps;
9292
- var host = params === null || params === undefined ? undefined : params.host;
9277
+ var includeContentSourceMaps = (_a = params === null || params === void 0 ? void 0 : params.includeContentSourceMaps) !== null && _a !== void 0 ? _a : (_b = params === null || params === void 0 ? void 0 : params.alphaFeatures) === null || _b === void 0 ? void 0 : _b.includeContentSourceMaps;
9278
+ var host = params === null || params === void 0 ? void 0 : params.host;
9293
9279
  var areAllowed = checkIncludeContentSourceMapsParamIsAllowed(host, includeContentSourceMaps);
9294
9280
  if (areAllowed) {
9295
9281
  query.includeContentSourceMaps = true;
@@ -9304,7 +9290,7 @@ var contentful = (function (exports) {
9304
9290
  }
9305
9291
  function maybeEncodeCPAResponse(data, config) {
9306
9292
  var _a;
9307
- var includeContentSourceMaps = (_a = config === null || config === undefined ? undefined : config.params) === null || _a === undefined ? undefined : _a.includeContentSourceMaps;
9293
+ var includeContentSourceMaps = (_a = config === null || config === void 0 ? void 0 : config.params) === null || _a === void 0 ? void 0 : _a.includeContentSourceMaps;
9308
9294
  if (includeContentSourceMaps) {
9309
9295
  return fe(data);
9310
9296
  }
@@ -9605,7 +9591,7 @@ var contentful = (function (exports) {
9605
9591
  entries = _context11.sent;
9606
9592
  return _context11.abrupt("return", resolveCircular(entries, {
9607
9593
  resolveLinks: !withoutLinkResolution,
9608
- removeUnresolved: withoutUnresolvableLinks !== null && withoutUnresolvableLinks !== undefined ? withoutUnresolvableLinks : false
9594
+ removeUnresolved: withoutUnresolvableLinks !== null && withoutUnresolvableLinks !== void 0 ? withoutUnresolvableLinks : false
9609
9595
  }));
9610
9596
  case 8:
9611
9597
  _context11.prev = 8;
@@ -9953,7 +9939,7 @@ var contentful = (function (exports) {
9953
9939
  withoutUnresolvableLinks = options.withoutUnresolvableLinks;
9954
9940
  return resolveCircular(data, {
9955
9941
  resolveLinks: !withoutLinkResolution,
9956
- removeUnresolved: withoutUnresolvableLinks !== null && withoutUnresolvableLinks !== undefined ? withoutUnresolvableLinks : false
9942
+ removeUnresolved: withoutUnresolvableLinks !== null && withoutUnresolvableLinks !== void 0 ? withoutUnresolvableLinks : false
9957
9943
  });
9958
9944
  }
9959
9945
  function getConceptScheme(id) {
@@ -10103,7 +10089,7 @@ var contentful = (function (exports) {
10103
10089
  http.defaults.baseURL = getGlobalOptions().environmentBaseUrl;
10104
10090
  }
10105
10091
  return {
10106
- version: "11.4.6",
10092
+ version: "11.5.1",
10107
10093
  getSpace: getSpace,
10108
10094
  getContentType: getContentType,
10109
10095
  getContentTypes: getContentTypes,
@@ -10230,7 +10216,7 @@ var contentful = (function (exports) {
10230
10216
  environment: 'master'
10231
10217
  };
10232
10218
  var config = Object.assign(Object.assign({}, defaultConfig), params);
10233
- var userAgentHeader = getUserAgentHeader("contentful.js/".concat("11.4.6"), config.application, config.integration);
10219
+ var userAgentHeader = getUserAgentHeader("contentful.js/".concat("11.5.1"), config.application, config.integration);
10234
10220
  config.headers = Object.assign(Object.assign({}, config.headers), {
10235
10221
  'Content-Type': 'application/vnd.contentful.delivery.v1+json',
10236
10222
  'X-Contentful-User-Agent': userAgentHeader