contentful 9.1.18 → 9.1.21

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.
@@ -3421,365 +3421,358 @@ function errorHandler(errorResponse) {
3421
3421
  /***/ (function(module, exports, __webpack_require__) {
3422
3422
 
3423
3423
  /* WEBPACK VAR INJECTION */(function(global) {(function (global, factory) {
3424
- true ? module.exports = factory() :
3425
- undefined;
3426
- }(this, (function () { 'use strict';
3427
-
3428
- var toStringFunction = Function.prototype.toString;
3429
- var create = Object.create, defineProperty = Object.defineProperty, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertySymbols = Object.getOwnPropertySymbols, getPrototypeOf = Object.getPrototypeOf;
3430
- var _a = Object.prototype, hasOwnProperty = _a.hasOwnProperty, propertyIsEnumerable = _a.propertyIsEnumerable;
3431
- /**
3432
- * @enum
3433
- *
3434
- * @const {Object} SUPPORTS
3435
- *
3436
- * @property {boolean} SYMBOL_PROPERTIES are symbol properties supported
3437
- * @property {boolean} WEAKMAP is WeakMap supported
3438
- */
3439
- var SUPPORTS = {
3440
- SYMBOL_PROPERTIES: typeof getOwnPropertySymbols === 'function',
3441
- WEAKMAP: typeof WeakMap === 'function',
3442
- };
3443
- /**
3444
- * @function createCache
3445
- *
3446
- * @description
3447
- * get a new cache object to prevent circular references
3448
- *
3449
- * @returns the new cache object
3450
- */
3451
- var createCache = function () {
3452
- if (SUPPORTS.WEAKMAP) {
3453
- return new WeakMap();
3454
- }
3455
- // tiny implementation of WeakMap
3456
- var object = create({
3457
- has: function (key) { return !!~object._keys.indexOf(key); },
3458
- set: function (key, value) {
3459
- object._keys.push(key);
3460
- object._values.push(value);
3461
- },
3462
- get: function (key) { return object._values[object._keys.indexOf(key)]; },
3463
- });
3464
- object._keys = [];
3465
- object._values = [];
3466
- return object;
3467
- };
3468
- /**
3469
- * @function getCleanClone
3470
- *
3471
- * @description
3472
- * get an empty version of the object with the same prototype it has
3473
- *
3474
- * @param object the object to build a clean clone from
3475
- * @param realm the realm the object resides in
3476
- * @returns the empty cloned object
3477
- */
3478
- var getCleanClone = function (object, realm) {
3479
- if (!object.constructor) {
3480
- return create(null);
3481
- }
3482
- var Constructor = object.constructor;
3483
- var prototype = object.__proto__ || getPrototypeOf(object);
3484
- if (Constructor === realm.Object) {
3485
- return prototype === realm.Object.prototype ? {} : create(prototype);
3486
- }
3487
- if (~toStringFunction.call(Constructor).indexOf('[native code]')) {
3488
- try {
3489
- return new Constructor();
3490
- }
3491
- catch (_a) { }
3492
- }
3493
- return create(prototype);
3494
- };
3495
- /**
3496
- * @function getObjectCloneLoose
3497
- *
3498
- * @description
3499
- * get a copy of the object based on loose rules, meaning all enumerable keys
3500
- * and symbols are copied, but property descriptors are not considered
3501
- *
3502
- * @param object the object to clone
3503
- * @param realm the realm the object resides in
3504
- * @param handleCopy the function that handles copying the object
3505
- * @returns the copied object
3506
- */
3507
- var getObjectCloneLoose = function (object, realm, handleCopy, cache) {
3508
- var clone = getCleanClone(object, realm);
3509
- // set in the cache immediately to be able to reuse the object recursively
3510
- cache.set(object, clone);
3511
- for (var key in object) {
3512
- if (hasOwnProperty.call(object, key)) {
3513
- clone[key] = handleCopy(object[key], cache);
3514
- }
3515
- }
3516
- if (SUPPORTS.SYMBOL_PROPERTIES) {
3517
- var symbols = getOwnPropertySymbols(object);
3518
- var length_1 = symbols.length;
3519
- if (length_1) {
3520
- for (var index = 0, symbol = void 0; index < length_1; index++) {
3521
- symbol = symbols[index];
3522
- if (propertyIsEnumerable.call(object, symbol)) {
3523
- clone[symbol] = handleCopy(object[symbol], cache);
3524
- }
3525
- }
3526
- }
3527
- }
3528
- return clone;
3529
- };
3530
- /**
3531
- * @function getObjectCloneStrict
3532
- *
3533
- * @description
3534
- * get a copy of the object based on strict rules, meaning all keys and symbols
3535
- * are copied based on the original property descriptors
3536
- *
3537
- * @param object the object to clone
3538
- * @param realm the realm the object resides in
3539
- * @param handleCopy the function that handles copying the object
3540
- * @returns the copied object
3541
- */
3542
- var getObjectCloneStrict = function (object, realm, handleCopy, cache) {
3543
- var clone = getCleanClone(object, realm);
3544
- // set in the cache immediately to be able to reuse the object recursively
3545
- cache.set(object, clone);
3546
- var properties = SUPPORTS.SYMBOL_PROPERTIES
3547
- ? getOwnPropertyNames(object).concat(getOwnPropertySymbols(object))
3548
- : getOwnPropertyNames(object);
3549
- var length = properties.length;
3550
- if (length) {
3551
- for (var index = 0, property = void 0, descriptor = void 0; index < length; index++) {
3552
- property = properties[index];
3553
- if (property !== 'callee' && property !== 'caller') {
3554
- descriptor = getOwnPropertyDescriptor(object, property);
3555
- if (descriptor) {
3556
- // Only clone the value if actually a value, not a getter / setter.
3557
- if (!descriptor.get && !descriptor.set) {
3558
- descriptor.value = handleCopy(object[property], cache);
3559
- }
3560
- try {
3561
- defineProperty(clone, property, descriptor);
3562
- }
3563
- catch (error) {
3564
- // Tee above can fail on node in edge cases, so fall back to the loose assignment.
3565
- clone[property] = descriptor.value;
3566
- }
3567
- }
3568
- else {
3569
- // In extra edge cases where the property descriptor cannot be retrived, fall back to
3570
- // the loose assignment.
3571
- clone[property] = handleCopy(object[property], cache);
3572
- }
3573
- }
3574
- }
3575
- }
3576
- return clone;
3577
- };
3578
- /**
3579
- * @function getRegExpFlags
3580
- *
3581
- * @description
3582
- * get the flags to apply to the copied regexp
3583
- *
3584
- * @param regExp the regexp to get the flags of
3585
- * @returns the flags for the regexp
3586
- */
3587
- var getRegExpFlags = function (regExp) {
3588
- var flags = '';
3589
- if (regExp.global) {
3590
- flags += 'g';
3591
- }
3592
- if (regExp.ignoreCase) {
3593
- flags += 'i';
3594
- }
3595
- if (regExp.multiline) {
3596
- flags += 'm';
3597
- }
3598
- if (regExp.unicode) {
3599
- flags += 'u';
3600
- }
3601
- if (regExp.sticky) {
3602
- flags += 'y';
3603
- }
3604
- return flags;
3605
- };
3424
+ true ? module.exports = factory() :
3425
+ undefined;
3426
+ })(this, (function () { 'use strict';
3427
+
3428
+ var toStringFunction = Function.prototype.toString;
3429
+ var create = Object.create, defineProperty = Object.defineProperty, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertySymbols = Object.getOwnPropertySymbols, getPrototypeOf$1 = Object.getPrototypeOf;
3430
+ var _a = Object.prototype, hasOwnProperty = _a.hasOwnProperty, propertyIsEnumerable = _a.propertyIsEnumerable;
3431
+ var SYMBOL_PROPERTIES = typeof getOwnPropertySymbols === 'function';
3432
+ var WEAK_MAP = typeof WeakMap === 'function';
3433
+ /**
3434
+ * @function createCache
3435
+ *
3436
+ * @description
3437
+ * get a new cache object to prevent circular references
3438
+ *
3439
+ * @returns the new cache object
3440
+ */
3441
+ var createCache = (function () {
3442
+ if (WEAK_MAP) {
3443
+ return function () { return new WeakMap(); };
3444
+ }
3445
+ var Cache = /** @class */ (function () {
3446
+ function Cache() {
3447
+ this._keys = [];
3448
+ this._values = [];
3449
+ }
3450
+ Cache.prototype.has = function (key) {
3451
+ return !!~this._keys.indexOf(key);
3452
+ };
3453
+ Cache.prototype.get = function (key) {
3454
+ return this._values[this._keys.indexOf(key)];
3455
+ };
3456
+ Cache.prototype.set = function (key, value) {
3457
+ this._keys.push(key);
3458
+ this._values.push(value);
3459
+ };
3460
+ return Cache;
3461
+ }());
3462
+ return function () { return new Cache(); };
3463
+ })();
3464
+ /**
3465
+ * @function getCleanClone
3466
+ *
3467
+ * @description
3468
+ * get an empty version of the object with the same prototype it has
3469
+ *
3470
+ * @param object the object to build a clean clone from
3471
+ * @param realm the realm the object resides in
3472
+ * @returns the empty cloned object
3473
+ */
3474
+ var getCleanClone = function (object, realm) {
3475
+ var prototype = object.__proto__ || getPrototypeOf$1(object);
3476
+ if (!prototype) {
3477
+ return create(null);
3478
+ }
3479
+ var Constructor = prototype.constructor;
3480
+ if (Constructor === realm.Object) {
3481
+ return prototype === realm.Object.prototype ? {} : create(prototype);
3482
+ }
3483
+ if (~toStringFunction.call(Constructor).indexOf('[native code]')) {
3484
+ try {
3485
+ return new Constructor();
3486
+ }
3487
+ catch (_a) { }
3488
+ }
3489
+ return create(prototype);
3490
+ };
3491
+ /**
3492
+ * @function getObjectCloneLoose
3493
+ *
3494
+ * @description
3495
+ * get a copy of the object based on loose rules, meaning all enumerable keys
3496
+ * and symbols are copied, but property descriptors are not considered
3497
+ *
3498
+ * @param object the object to clone
3499
+ * @param realm the realm the object resides in
3500
+ * @param handleCopy the function that handles copying the object
3501
+ * @returns the copied object
3502
+ */
3503
+ var getObjectCloneLoose = function (object, realm, handleCopy, cache) {
3504
+ var clone = getCleanClone(object, realm);
3505
+ // set in the cache immediately to be able to reuse the object recursively
3506
+ cache.set(object, clone);
3507
+ for (var key in object) {
3508
+ if (hasOwnProperty.call(object, key)) {
3509
+ clone[key] = handleCopy(object[key], cache);
3510
+ }
3511
+ }
3512
+ if (SYMBOL_PROPERTIES) {
3513
+ var symbols = getOwnPropertySymbols(object);
3514
+ for (var index = 0, length_1 = symbols.length, symbol = void 0; index < length_1; ++index) {
3515
+ symbol = symbols[index];
3516
+ if (propertyIsEnumerable.call(object, symbol)) {
3517
+ clone[symbol] = handleCopy(object[symbol], cache);
3518
+ }
3519
+ }
3520
+ }
3521
+ return clone;
3522
+ };
3523
+ /**
3524
+ * @function getObjectCloneStrict
3525
+ *
3526
+ * @description
3527
+ * get a copy of the object based on strict rules, meaning all keys and symbols
3528
+ * are copied based on the original property descriptors
3529
+ *
3530
+ * @param object the object to clone
3531
+ * @param realm the realm the object resides in
3532
+ * @param handleCopy the function that handles copying the object
3533
+ * @returns the copied object
3534
+ */
3535
+ var getObjectCloneStrict = function (object, realm, handleCopy, cache) {
3536
+ var clone = getCleanClone(object, realm);
3537
+ // set in the cache immediately to be able to reuse the object recursively
3538
+ cache.set(object, clone);
3539
+ var properties = SYMBOL_PROPERTIES
3540
+ ? getOwnPropertyNames(object).concat(getOwnPropertySymbols(object))
3541
+ : getOwnPropertyNames(object);
3542
+ for (var index = 0, length_2 = properties.length, property = void 0, descriptor = void 0; index < length_2; ++index) {
3543
+ property = properties[index];
3544
+ if (property !== 'callee' && property !== 'caller') {
3545
+ descriptor = getOwnPropertyDescriptor(object, property);
3546
+ if (descriptor) {
3547
+ // Only clone the value if actually a value, not a getter / setter.
3548
+ if (!descriptor.get && !descriptor.set) {
3549
+ descriptor.value = handleCopy(object[property], cache);
3550
+ }
3551
+ try {
3552
+ defineProperty(clone, property, descriptor);
3553
+ }
3554
+ catch (error) {
3555
+ // Tee above can fail on node in edge cases, so fall back to the loose assignment.
3556
+ clone[property] = descriptor.value;
3557
+ }
3558
+ }
3559
+ else {
3560
+ // In extra edge cases where the property descriptor cannot be retrived, fall back to
3561
+ // the loose assignment.
3562
+ clone[property] = handleCopy(object[property], cache);
3563
+ }
3564
+ }
3565
+ }
3566
+ return clone;
3567
+ };
3568
+ /**
3569
+ * @function getRegExpFlags
3570
+ *
3571
+ * @description
3572
+ * get the flags to apply to the copied regexp
3573
+ *
3574
+ * @param regExp the regexp to get the flags of
3575
+ * @returns the flags for the regexp
3576
+ */
3577
+ var getRegExpFlags = function (regExp) {
3578
+ var flags = '';
3579
+ if (regExp.global) {
3580
+ flags += 'g';
3581
+ }
3582
+ if (regExp.ignoreCase) {
3583
+ flags += 'i';
3584
+ }
3585
+ if (regExp.multiline) {
3586
+ flags += 'm';
3587
+ }
3588
+ if (regExp.unicode) {
3589
+ flags += 'u';
3590
+ }
3591
+ if (regExp.sticky) {
3592
+ flags += 'y';
3593
+ }
3594
+ return flags;
3595
+ };
3606
3596
 
3607
- // utils
3608
- var isArray = Array.isArray;
3609
- var GLOBAL_THIS = (function () {
3610
- if (typeof self !== 'undefined') {
3611
- return self;
3612
- }
3613
- if (typeof window !== 'undefined') {
3614
- return window;
3615
- }
3616
- if (typeof global !== 'undefined') {
3617
- return global;
3618
- }
3619
- if (console && console.error) {
3620
- console.error('Unable to locate global object, returning "this".');
3621
- }
3622
- })();
3623
- /**
3624
- * @function copy
3625
- *
3626
- * @description
3627
- * copy an object deeply as much as possible
3628
- *
3629
- * If `strict` is applied, then all properties (including non-enumerable ones)
3630
- * are copied with their original property descriptors on both objects and arrays.
3631
- *
3632
- * The object is compared to the global constructors in the `realm` provided,
3633
- * and the native constructor is always used to ensure that extensions of native
3634
- * objects (allows in ES2015+) are maintained.
3635
- *
3636
- * @param object the object to copy
3637
- * @param [options] the options for copying with
3638
- * @param [options.isStrict] should the copy be strict
3639
- * @param [options.realm] the realm (this) object the object is copied from
3640
- * @returns the copied object
3641
- */
3642
- function copy(object, options) {
3643
- // manually coalesced instead of default parameters for performance
3644
- var isStrict = !!(options && options.isStrict);
3645
- var realm = (options && options.realm) || GLOBAL_THIS;
3646
- var getObjectClone = isStrict
3647
- ? getObjectCloneStrict
3648
- : getObjectCloneLoose;
3649
- /**
3650
- * @function handleCopy
3651
- *
3652
- * @description
3653
- * copy the object recursively based on its type
3654
- *
3655
- * @param object the object to copy
3656
- * @returns the copied object
3657
- */
3658
- var handleCopy = function (object, cache) {
3659
- if (!object || typeof object !== 'object') {
3660
- return object;
3661
- }
3662
- if (cache.has(object)) {
3663
- return cache.get(object);
3664
- }
3665
- var Constructor = object.constructor;
3666
- // plain objects
3667
- if (Constructor === realm.Object) {
3668
- return getObjectClone(object, realm, handleCopy, cache);
3669
- }
3670
- var clone;
3671
- // arrays
3672
- if (isArray(object)) {
3673
- // if strict, include non-standard properties
3674
- if (isStrict) {
3675
- return getObjectCloneStrict(object, realm, handleCopy, cache);
3676
- }
3677
- var length_1 = object.length;
3678
- clone = new Constructor();
3679
- cache.set(object, clone);
3680
- for (var index = 0; index < length_1; index++) {
3681
- clone[index] = handleCopy(object[index], cache);
3682
- }
3683
- return clone;
3684
- }
3685
- // dates
3686
- if (object instanceof realm.Date) {
3687
- return new Constructor(object.getTime());
3688
- }
3689
- // regexps
3690
- if (object instanceof realm.RegExp) {
3691
- clone = new Constructor(object.source, object.flags || getRegExpFlags(object));
3692
- clone.lastIndex = object.lastIndex;
3693
- return clone;
3694
- }
3695
- // maps
3696
- if (realm.Map && object instanceof realm.Map) {
3697
- clone = new Constructor();
3698
- cache.set(object, clone);
3699
- object.forEach(function (value, key) {
3700
- clone.set(key, handleCopy(value, cache));
3701
- });
3702
- return clone;
3703
- }
3704
- // sets
3705
- if (realm.Set && object instanceof realm.Set) {
3706
- clone = new Constructor();
3707
- cache.set(object, clone);
3708
- object.forEach(function (value) {
3709
- clone.add(handleCopy(value, cache));
3710
- });
3711
- return clone;
3712
- }
3713
- // blobs
3714
- if (realm.Blob && object instanceof realm.Blob) {
3715
- return object.slice(0, object.size, object.type);
3716
- }
3717
- // buffers (node-only)
3718
- if (realm.Buffer && realm.Buffer.isBuffer(object)) {
3719
- clone = realm.Buffer.allocUnsafe
3720
- ? realm.Buffer.allocUnsafe(object.length)
3721
- : new Constructor(object.length);
3722
- cache.set(object, clone);
3723
- object.copy(clone);
3724
- return clone;
3725
- }
3726
- // arraybuffers / dataviews
3727
- if (realm.ArrayBuffer) {
3728
- // dataviews
3729
- if (realm.ArrayBuffer.isView(object)) {
3730
- clone = new Constructor(object.buffer.slice(0));
3731
- cache.set(object, clone);
3732
- return clone;
3733
- }
3734
- // arraybuffers
3735
- if (object instanceof realm.ArrayBuffer) {
3736
- clone = object.slice(0);
3737
- cache.set(object, clone);
3738
- return clone;
3739
- }
3740
- }
3741
- // if the object cannot / should not be cloned, don't
3742
- if (
3743
- // promise-like
3744
- typeof object.then === 'function' ||
3745
- // errors
3746
- object instanceof Error ||
3747
- // weakmaps
3748
- (realm.WeakMap && object instanceof realm.WeakMap) ||
3749
- // weaksets
3750
- (realm.WeakSet && object instanceof realm.WeakSet)) {
3751
- return object;
3752
- }
3753
- // assume anything left is a custom constructor
3754
- return getObjectClone(object, realm, handleCopy, cache);
3755
- };
3756
- return handleCopy(object, createCache());
3757
- }
3758
- // Adding reference to allow usage in CommonJS libraries compiled using TSC, which
3759
- // expects there to be a default property on the exported object. See
3760
- // [#37](https://github.com/planttheidea/fast-copy/issues/37) for details.
3761
- copy.default = copy;
3762
- /**
3763
- * @function strictCopy
3764
- *
3765
- * @description
3766
- * copy the object with `strict` option pre-applied
3767
- *
3768
- * @param object the object to copy
3769
- * @param [options] the options for copying with
3770
- * @param [options.realm] the realm (this) object the object is copied from
3771
- * @returns the copied object
3772
- */
3773
- copy.strict = function strictCopy(object, options) {
3774
- return copy(object, {
3775
- isStrict: true,
3776
- realm: options ? options.realm : void 0,
3777
- });
3778
- };
3597
+ // utils
3598
+ var isArray = Array.isArray;
3599
+ var getPrototypeOf = Object.getPrototypeOf;
3600
+ var GLOBAL_THIS = (function () {
3601
+ if (typeof globalThis !== 'undefined') {
3602
+ return globalThis;
3603
+ }
3604
+ if (typeof self !== 'undefined') {
3605
+ return self;
3606
+ }
3607
+ if (typeof window !== 'undefined') {
3608
+ return window;
3609
+ }
3610
+ if (typeof global !== 'undefined') {
3611
+ return global;
3612
+ }
3613
+ if (console && console.error) {
3614
+ console.error('Unable to locate global object, returning "this".');
3615
+ }
3616
+ return this;
3617
+ })();
3618
+ /**
3619
+ * @function copy
3620
+ *
3621
+ * @description
3622
+ * copy an value deeply as much as possible
3623
+ *
3624
+ * If `strict` is applied, then all properties (including non-enumerable ones)
3625
+ * are copied with their original property descriptors on both objects and arrays.
3626
+ *
3627
+ * The value is compared to the global constructors in the `realm` provided,
3628
+ * and the native constructor is always used to ensure that extensions of native
3629
+ * objects (allows in ES2015+) are maintained.
3630
+ *
3631
+ * @param value the value to copy
3632
+ * @param [options] the options for copying with
3633
+ * @param [options.isStrict] should the copy be strict
3634
+ * @param [options.realm] the realm (this) value the value is copied from
3635
+ * @returns the copied value
3636
+ */
3637
+ function copy(value, options) {
3638
+ // manually coalesced instead of default parameters for performance
3639
+ var isStrict = !!(options && options.isStrict);
3640
+ var realm = (options && options.realm) || GLOBAL_THIS;
3641
+ var getObjectClone = isStrict ? getObjectCloneStrict : getObjectCloneLoose;
3642
+ /**
3643
+ * @function handleCopy
3644
+ *
3645
+ * @description
3646
+ * copy the value recursively based on its type
3647
+ *
3648
+ * @param value the value to copy
3649
+ * @returns the copied value
3650
+ */
3651
+ var handleCopy = function (value, cache) {
3652
+ if (!value || typeof value !== 'object') {
3653
+ return value;
3654
+ }
3655
+ if (cache.has(value)) {
3656
+ return cache.get(value);
3657
+ }
3658
+ var prototype = value.__proto__ || getPrototypeOf(value);
3659
+ var Constructor = prototype && prototype.constructor;
3660
+ // plain objects
3661
+ if (!Constructor || Constructor === realm.Object) {
3662
+ return getObjectClone(value, realm, handleCopy, cache);
3663
+ }
3664
+ var clone;
3665
+ // arrays
3666
+ if (isArray(value)) {
3667
+ // if strict, include non-standard properties
3668
+ if (isStrict) {
3669
+ return getObjectCloneStrict(value, realm, handleCopy, cache);
3670
+ }
3671
+ clone = new Constructor();
3672
+ cache.set(value, clone);
3673
+ for (var index = 0, length_1 = value.length; index < length_1; ++index) {
3674
+ clone[index] = handleCopy(value[index], cache);
3675
+ }
3676
+ return clone;
3677
+ }
3678
+ // dates
3679
+ if (value instanceof realm.Date) {
3680
+ return new Constructor(value.getTime());
3681
+ }
3682
+ // regexps
3683
+ if (value instanceof realm.RegExp) {
3684
+ clone = new Constructor(value.source, value.flags || getRegExpFlags(value));
3685
+ clone.lastIndex = value.lastIndex;
3686
+ return clone;
3687
+ }
3688
+ // maps
3689
+ if (realm.Map && value instanceof realm.Map) {
3690
+ clone = new Constructor();
3691
+ cache.set(value, clone);
3692
+ value.forEach(function (value, key) {
3693
+ clone.set(key, handleCopy(value, cache));
3694
+ });
3695
+ return clone;
3696
+ }
3697
+ // sets
3698
+ if (realm.Set && value instanceof realm.Set) {
3699
+ clone = new Constructor();
3700
+ cache.set(value, clone);
3701
+ value.forEach(function (value) {
3702
+ clone.add(handleCopy(value, cache));
3703
+ });
3704
+ return clone;
3705
+ }
3706
+ // blobs
3707
+ if (realm.Blob && value instanceof realm.Blob) {
3708
+ return value.slice(0, value.size, value.type);
3709
+ }
3710
+ // buffers (node-only)
3711
+ if (realm.Buffer && realm.Buffer.isBuffer(value)) {
3712
+ clone = realm.Buffer.allocUnsafe
3713
+ ? realm.Buffer.allocUnsafe(value.length)
3714
+ : new Constructor(value.length);
3715
+ cache.set(value, clone);
3716
+ value.copy(clone);
3717
+ return clone;
3718
+ }
3719
+ // arraybuffers / dataviews
3720
+ if (realm.ArrayBuffer) {
3721
+ // dataviews
3722
+ if (realm.ArrayBuffer.isView(value)) {
3723
+ clone = new Constructor(value.buffer.slice(0));
3724
+ cache.set(value, clone);
3725
+ return clone;
3726
+ }
3727
+ // arraybuffers
3728
+ if (value instanceof realm.ArrayBuffer) {
3729
+ clone = value.slice(0);
3730
+ cache.set(value, clone);
3731
+ return clone;
3732
+ }
3733
+ }
3734
+ // if the value cannot / should not be cloned, don't
3735
+ if (
3736
+ // promise-like
3737
+ typeof value.then === 'function' ||
3738
+ // errors
3739
+ value instanceof Error ||
3740
+ // weakmaps
3741
+ (realm.WeakMap && value instanceof realm.WeakMap) ||
3742
+ // weaksets
3743
+ (realm.WeakSet && value instanceof realm.WeakSet)) {
3744
+ return value;
3745
+ }
3746
+ // assume anything left is a custom constructor
3747
+ return getObjectClone(value, realm, handleCopy, cache);
3748
+ };
3749
+ return handleCopy(value, createCache());
3750
+ }
3751
+ // Adding reference to allow usage in CommonJS libraries compiled using TSC, which
3752
+ // expects there to be a default property on the exported value. See
3753
+ // [#37](https://github.com/planttheidea/fast-copy/issues/37) for details.
3754
+ copy.default = copy;
3755
+ /**
3756
+ * @function strictCopy
3757
+ *
3758
+ * @description
3759
+ * copy the value with `strict` option pre-applied
3760
+ *
3761
+ * @param value the value to copy
3762
+ * @param [options] the options for copying with
3763
+ * @param [options.realm] the realm (this) value the value is copied from
3764
+ * @returns the copied value
3765
+ */
3766
+ copy.strict = function strictCopy(value, options) {
3767
+ return copy(value, {
3768
+ isStrict: true,
3769
+ realm: options ? options.realm : void 0,
3770
+ });
3771
+ };
3779
3772
 
3780
- return copy;
3773
+ return copy;
3781
3774
 
3782
- })));
3775
+ }));
3783
3776
  //# sourceMappingURL=fast-copy.js.map
3784
3777
 
3785
3778
  /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "../node_modules/webpack/buildin/global.js")))
@@ -6535,7 +6528,7 @@ function createClient(params) {
6535
6528
 
6536
6529
  const config = _objectSpread(_objectSpread({}, defaultConfig), params);
6537
6530
 
6538
- const userAgentHeader = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["getUserAgentHeader"])(`contentful.js/${"9.1.18"}`, config.application, config.integration);
6531
+ const userAgentHeader = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["getUserAgentHeader"])(`contentful.js/${"9.1.21"}`, config.application, config.integration);
6539
6532
  config.headers = _objectSpread(_objectSpread({}, config.headers), {}, {
6540
6533
  'Content-Type': 'application/vnd.contentful.delivery.v1+json',
6541
6534
  'X-Contentful-User-Agent': userAgentHeader