Update `core-js-bundle`.
This commit is contained in:
parent
ee98aec7f9
commit
8f436cdf0f
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* core-js 3.33.0
|
||||
* core-js 3.33.2
|
||||
* © 2014-2023 Denis Pushkarev (zloirock.ru)
|
||||
* license: https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE
|
||||
* license: https://github.com/zloirock/core-js/blob/v3.33.2/LICENSE
|
||||
* source: https://github.com/zloirock/core-js
|
||||
*/
|
||||
!function (undefined) { 'use strict'; /******/ (function(modules) { // webpackBootstrap
|
||||
|
@ -721,14 +721,15 @@ if (!NATIVE_SYMBOL) {
|
|||
var description = !arguments.length || arguments[0] === undefined ? undefined : $toString(arguments[0]);
|
||||
var tag = uid(description);
|
||||
var setter = function (value) {
|
||||
if (this === ObjectPrototype) call(setter, ObjectPrototypeSymbols, value);
|
||||
if (hasOwn(this, HIDDEN) && hasOwn(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
|
||||
var $this = this === undefined ? global : this;
|
||||
if ($this === ObjectPrototype) call(setter, ObjectPrototypeSymbols, value);
|
||||
if (hasOwn($this, HIDDEN) && hasOwn($this[HIDDEN], tag)) $this[HIDDEN][tag] = false;
|
||||
var descriptor = createPropertyDescriptor(1, value);
|
||||
try {
|
||||
setSymbolDescriptor(this, tag, descriptor);
|
||||
setSymbolDescriptor($this, tag, descriptor);
|
||||
} catch (error) {
|
||||
if (!(error instanceof RangeError)) throw error;
|
||||
fallbackDefineProperty(this, tag, descriptor);
|
||||
fallbackDefineProperty($this, tag, descriptor);
|
||||
}
|
||||
};
|
||||
if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });
|
||||
|
@ -1483,10 +1484,10 @@ var store = __webpack_require__(37);
|
|||
(module.exports = function (key, value) {
|
||||
return store[key] || (store[key] = value !== undefined ? value : {});
|
||||
})('versions', []).push({
|
||||
version: '3.33.0',
|
||||
version: '3.33.2',
|
||||
mode: IS_PURE ? 'pure' : 'global',
|
||||
copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
|
||||
license: 'https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE',
|
||||
license: 'https://github.com/zloirock/core-js/blob/v3.33.2/LICENSE',
|
||||
source: 'https://github.com/zloirock/core-js'
|
||||
});
|
||||
|
||||
|
@ -3758,7 +3759,6 @@ if (ErrorPrototype.toString !== errorToString) {
|
|||
var DESCRIPTORS = __webpack_require__(6);
|
||||
var fails = __webpack_require__(7);
|
||||
var anObject = __webpack_require__(47);
|
||||
var create = __webpack_require__(72);
|
||||
var normalizeStringArgument = __webpack_require__(121);
|
||||
|
||||
var nativeErrorToString = Error.prototype.toString;
|
||||
|
@ -3766,8 +3766,8 @@ var nativeErrorToString = Error.prototype.toString;
|
|||
var INCORRECT_TO_STRING = fails(function () {
|
||||
if (DESCRIPTORS) {
|
||||
// Chrome 32- incorrectly call accessor
|
||||
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
||||
var object = create(Object.defineProperty({}, 'name', { get: function () {
|
||||
// eslint-disable-next-line es/no-object-create, es/no-object-defineproperty -- safe
|
||||
var object = Object.create(Object.defineProperty({}, 'name', { get: function () {
|
||||
return this === object;
|
||||
} }));
|
||||
if (nativeErrorToString.call(object) !== 'true') return true;
|
||||
|
@ -4977,13 +4977,12 @@ module.exports = defineIterator(Array, 'Array', function (iterated, kind) {
|
|||
}, function () {
|
||||
var state = getInternalState(this);
|
||||
var target = state.target;
|
||||
var kind = state.kind;
|
||||
var index = state.index++;
|
||||
if (!target || index >= target.length) {
|
||||
state.target = undefined;
|
||||
return createIterResultObject(undefined, true);
|
||||
}
|
||||
switch (kind) {
|
||||
switch (state.kind) {
|
||||
case 'keys': return createIterResultObject(index, false);
|
||||
case 'values': return createIterResultObject(target[index], false);
|
||||
} return createIterResultObject([index, target[index]], false);
|
||||
|
@ -6008,11 +6007,11 @@ var uncurryThis = __webpack_require__(14);
|
|||
var aCallable = __webpack_require__(31);
|
||||
var toIndexedObject = __webpack_require__(12);
|
||||
var arrayFromConstructorAndList = __webpack_require__(199);
|
||||
var getVirtual = __webpack_require__(200);
|
||||
var getBuiltInPrototypeMethod = __webpack_require__(200);
|
||||
var addToUnscopables = __webpack_require__(140);
|
||||
|
||||
var $Array = Array;
|
||||
var sort = uncurryThis(getVirtual('Array').sort);
|
||||
var sort = uncurryThis(getBuiltInPrototypeMethod('Array', 'sort'));
|
||||
|
||||
// `Array.prototype.toSorted` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.tosorted
|
||||
|
@ -6053,8 +6052,10 @@ module.exports = function (Constructor, list) {
|
|||
|
||||
var global = __webpack_require__(4);
|
||||
|
||||
module.exports = function (CONSTRUCTOR) {
|
||||
return global[CONSTRUCTOR].prototype;
|
||||
module.exports = function (CONSTRUCTOR, METHOD) {
|
||||
var Constructor = global[CONSTRUCTOR];
|
||||
var Prototype = Constructor && Constructor.prototype;
|
||||
return Prototype && Prototype[METHOD];
|
||||
};
|
||||
|
||||
|
||||
|
@ -15957,14 +15958,14 @@ var getIterator = __webpack_require__(135);
|
|||
var getIteratorDirect = __webpack_require__(496);
|
||||
var getIteratorMethod = __webpack_require__(136);
|
||||
var getMethod = __webpack_require__(30);
|
||||
var getVirtual = __webpack_require__(200);
|
||||
var getBuiltIn = __webpack_require__(24);
|
||||
var getBuiltInPrototypeMethod = __webpack_require__(200);
|
||||
var wellKnownSymbol = __webpack_require__(34);
|
||||
var AsyncFromSyncIterator = __webpack_require__(494);
|
||||
var toArray = __webpack_require__(497).toArray;
|
||||
|
||||
var ASYNC_ITERATOR = wellKnownSymbol('asyncIterator');
|
||||
var arrayIterator = uncurryThis(getVirtual('Array').values);
|
||||
var arrayIterator = uncurryThis(getBuiltInPrototypeMethod('Array', 'values'));
|
||||
var arrayIteratorNext = uncurryThis(arrayIterator([]).next);
|
||||
|
||||
var safeArrayIterator = function () {
|
||||
|
@ -17721,7 +17722,7 @@ var AsyncFromSyncIterator = __webpack_require__(494);
|
|||
|
||||
var ASYNC_ITERATOR = wellKnownSymbol('asyncIterator');
|
||||
|
||||
module.exports = function from(obj) {
|
||||
module.exports = function (obj) {
|
||||
var object = anObject(obj);
|
||||
var alreadyAsync = true;
|
||||
var method = getMethod(object, ASYNC_ITERATOR);
|
||||
|
@ -18272,7 +18273,7 @@ var uncurryThis = __webpack_require__(14);
|
|||
var getUint8 = uncurryThis(DataView.prototype.getUint8);
|
||||
|
||||
// `DataView.prototype.getUint8Clamped` method
|
||||
// https://github.com/tc39/proposal-dataview-get-set-uint8c
|
||||
// https://github.com/tc39/proposal-dataview-get-set-uint8clamped
|
||||
$({ target: 'DataView', proto: true, forced: true }, {
|
||||
getUint8Clamped: function getUint8Clamped(byteOffset) {
|
||||
return getUint8(this, byteOffset);
|
||||
|
@ -18345,7 +18346,7 @@ var $TypeError = TypeError;
|
|||
var setUint8 = uncurryThis(DataView.prototype.setUint8);
|
||||
|
||||
// `DataView.prototype.setUint8Clamped` method
|
||||
// https://github.com/tc39/proposal-dataview-get-set-uint8c
|
||||
// https://github.com/tc39/proposal-dataview-get-set-uint8clamped
|
||||
$({ target: 'DataView', proto: true, forced: true }, {
|
||||
setUint8Clamped: function setUint8Clamped(byteOffset, value) {
|
||||
if (classof(this) !== 'DataView') throw new $TypeError('Incorrect receiver');
|
||||
|
@ -20734,18 +20735,19 @@ var INVALID_RADIX = 'Invalid radix';
|
|||
var $RangeError = RangeError;
|
||||
var $SyntaxError = SyntaxError;
|
||||
var $TypeError = TypeError;
|
||||
var valid = /^[\da-z]+$/;
|
||||
var pow = Math.pow;
|
||||
var valid = /^[\d.a-z]+$/;
|
||||
var charAt = uncurryThis(''.charAt);
|
||||
var exec = uncurryThis(valid.exec);
|
||||
var numberToString = uncurryThis(1.0.toString);
|
||||
var stringSlice = uncurryThis(''.slice);
|
||||
var split = uncurryThis(''.split);
|
||||
|
||||
// `Number.fromString` method
|
||||
// https://github.com/tc39/proposal-number-fromstring
|
||||
$({ target: 'Number', stat: true, forced: true }, {
|
||||
fromString: function fromString(string, radix) {
|
||||
var sign = 1;
|
||||
var R, mathNum;
|
||||
if (typeof string != 'string') throw new $TypeError(INVALID_NUMBER_REPRESENTATION);
|
||||
if (!string.length) throw new $SyntaxError(INVALID_NUMBER_REPRESENTATION);
|
||||
if (charAt(string, 0) === '-') {
|
||||
|
@ -20753,11 +20755,13 @@ $({ target: 'Number', stat: true, forced: true }, {
|
|||
string = stringSlice(string, 1);
|
||||
if (!string.length) throw new $SyntaxError(INVALID_NUMBER_REPRESENTATION);
|
||||
}
|
||||
R = radix === undefined ? 10 : toIntegerOrInfinity(radix);
|
||||
var R = radix === undefined ? 10 : toIntegerOrInfinity(radix);
|
||||
if (R < 2 || R > 36) throw new $RangeError(INVALID_RADIX);
|
||||
if (!exec(valid, string) || numberToString(mathNum = parseInt(string, R), R) !== string) {
|
||||
throw new $SyntaxError(INVALID_NUMBER_REPRESENTATION);
|
||||
}
|
||||
if (!exec(valid, string)) throw new $SyntaxError(INVALID_NUMBER_REPRESENTATION);
|
||||
var parts = split(string, '.');
|
||||
var mathNum = parseInt(parts[0], R);
|
||||
if (parts.length > 1) mathNum += parseInt(parts[1], R) / pow(R, parts[1].length);
|
||||
if (numberToString(mathNum, R) !== string) throw new $SyntaxError(INVALID_NUMBER_REPRESENTATION);
|
||||
return sign * mathNum;
|
||||
}
|
||||
});
|
||||
|
@ -23203,7 +23207,6 @@ defineWellKnownSymbol('matcher');
|
|||
|
||||
"use strict";
|
||||
|
||||
// TODO: Remove from `core-js@4`
|
||||
var defineWellKnownSymbol = __webpack_require__(81);
|
||||
|
||||
// `Symbol.metadata` well-known symbol
|
||||
|
@ -23217,6 +23220,7 @@ defineWellKnownSymbol('metadata');
|
|||
|
||||
"use strict";
|
||||
|
||||
// TODO: Remove from `core-js@4`
|
||||
var defineWellKnownSymbol = __webpack_require__(81);
|
||||
|
||||
// `Symbol.metadataKey` well-known symbol
|
||||
|
@ -24449,7 +24453,7 @@ try {
|
|||
var IS_PURE = __webpack_require__(36);
|
||||
var $ = __webpack_require__(3);
|
||||
var global = __webpack_require__(4);
|
||||
var getBuiltin = __webpack_require__(24);
|
||||
var getBuiltIn = __webpack_require__(24);
|
||||
var uncurryThis = __webpack_require__(14);
|
||||
var fails = __webpack_require__(7);
|
||||
var uid = __webpack_require__(41);
|
||||
|
@ -24469,7 +24473,8 @@ var validateArgumentsLength = __webpack_require__(329);
|
|||
var getRegExpFlags = __webpack_require__(369);
|
||||
var MapHelpers = __webpack_require__(506);
|
||||
var SetHelpers = __webpack_require__(659);
|
||||
var arrayBufferTransfer = __webpack_require__(519);
|
||||
var setIterate = __webpack_require__(664);
|
||||
var detachTransferable = __webpack_require__(520);
|
||||
var ERROR_STACK_INSTALLABLE = __webpack_require__(125);
|
||||
var PROPER_STRUCTURED_CLONE_TRANSFER = __webpack_require__(522);
|
||||
|
||||
|
@ -24477,25 +24482,17 @@ var Object = global.Object;
|
|||
var Array = global.Array;
|
||||
var Date = global.Date;
|
||||
var Error = global.Error;
|
||||
var EvalError = global.EvalError;
|
||||
var RangeError = global.RangeError;
|
||||
var ReferenceError = global.ReferenceError;
|
||||
var SyntaxError = global.SyntaxError;
|
||||
var TypeError = global.TypeError;
|
||||
var URIError = global.URIError;
|
||||
var PerformanceMark = global.PerformanceMark;
|
||||
var WebAssembly = global.WebAssembly;
|
||||
var CompileError = WebAssembly && WebAssembly.CompileError || Error;
|
||||
var LinkError = WebAssembly && WebAssembly.LinkError || Error;
|
||||
var RuntimeError = WebAssembly && WebAssembly.RuntimeError || Error;
|
||||
var DOMException = getBuiltin('DOMException');
|
||||
var DOMException = getBuiltIn('DOMException');
|
||||
var Map = MapHelpers.Map;
|
||||
var mapHas = MapHelpers.has;
|
||||
var mapGet = MapHelpers.get;
|
||||
var mapSet = MapHelpers.set;
|
||||
var Set = SetHelpers.Set;
|
||||
var setAdd = SetHelpers.add;
|
||||
var objectKeys = getBuiltin('Object', 'keys');
|
||||
var setHas = SetHelpers.has;
|
||||
var objectKeys = getBuiltIn('Object', 'keys');
|
||||
var push = uncurryThis([].push);
|
||||
var thisBooleanValue = uncurryThis(true.valueOf);
|
||||
var thisNumberValue = uncurryThis(1.0.valueOf);
|
||||
|
@ -24510,7 +24507,7 @@ var checkBasicSemantic = function (structuredCloneImplementation) {
|
|||
var set1 = new global.Set([7]);
|
||||
var set2 = structuredCloneImplementation(set1);
|
||||
var number = structuredCloneImplementation(Object(7));
|
||||
return set2 === set1 || !set2.has(7) || typeof number != 'object' || +number !== 7;
|
||||
return set2 === set1 || !set2.has(7) || !isObject(number) || +number !== 7;
|
||||
}) && structuredCloneImplementation;
|
||||
};
|
||||
|
||||
|
@ -24606,10 +24603,10 @@ var cloneBuffer = function (value, map, $type) {
|
|||
|
||||
// `ArrayBuffer#slice` is not available in IE10
|
||||
// `ArrayBuffer#slice` and `DataView` are not available in old FF
|
||||
if (!DataView && typeof value.slice != 'function') throwUnpolyfillable('ArrayBuffer');
|
||||
if (!DataView && !isCallable(value.slice)) throwUnpolyfillable('ArrayBuffer');
|
||||
// detached buffers throws in `DataView` and `.slice`
|
||||
try {
|
||||
if (typeof value.slice == 'function' && !value.resizable) {
|
||||
if (isCallable(value.slice) && !value.resizable) {
|
||||
clone = value.slice(0);
|
||||
} else {
|
||||
length = value.byteLength;
|
||||
|
@ -24639,13 +24636,7 @@ var cloneView = function (value, type, offset, length, map) {
|
|||
return new C(cloneBuffer(value.buffer, map), offset, length);
|
||||
};
|
||||
|
||||
var Placeholder = function (object, type, metadata) {
|
||||
this.object = object;
|
||||
this.type = type;
|
||||
this.metadata = metadata;
|
||||
};
|
||||
|
||||
var structuredCloneInternal = function (value, map, transferredBuffers) {
|
||||
var structuredCloneInternal = function (value, map) {
|
||||
if (isSymbol(value)) throwUncloneable('Symbol');
|
||||
if (!isObject(value)) return value;
|
||||
// effectively preserves circular references
|
||||
|
@ -24678,34 +24669,21 @@ var structuredCloneInternal = function (value, map, transferredBuffers) {
|
|||
name = value.name;
|
||||
switch (name) {
|
||||
case 'AggregateError':
|
||||
cloned = new (getBuiltin('AggregateError'))([]);
|
||||
cloned = new (getBuiltIn(name))([]);
|
||||
break;
|
||||
case 'EvalError':
|
||||
cloned = new EvalError();
|
||||
break;
|
||||
case 'RangeError':
|
||||
cloned = new RangeError();
|
||||
break;
|
||||
case 'ReferenceError':
|
||||
cloned = new ReferenceError();
|
||||
break;
|
||||
case 'SuppressedError':
|
||||
case 'SyntaxError':
|
||||
cloned = new SyntaxError();
|
||||
break;
|
||||
case 'TypeError':
|
||||
cloned = new TypeError();
|
||||
break;
|
||||
case 'URIError':
|
||||
cloned = new URIError();
|
||||
cloned = new (getBuiltIn(name))();
|
||||
break;
|
||||
case 'CompileError':
|
||||
cloned = new CompileError();
|
||||
break;
|
||||
case 'LinkError':
|
||||
cloned = new LinkError();
|
||||
break;
|
||||
case 'RuntimeError':
|
||||
cloned = new RuntimeError();
|
||||
cloned = new (getBuiltIn('WebAssembly', name))();
|
||||
break;
|
||||
default:
|
||||
cloned = new Error();
|
||||
|
@ -24716,9 +24694,7 @@ var structuredCloneInternal = function (value, map, transferredBuffers) {
|
|||
break;
|
||||
case 'ArrayBuffer':
|
||||
case 'SharedArrayBuffer':
|
||||
cloned = transferredBuffers
|
||||
? new Placeholder(value, type)
|
||||
: cloneBuffer(value, map, type);
|
||||
cloned = cloneBuffer(value, map, type);
|
||||
break;
|
||||
case 'DataView':
|
||||
case 'Int8Array':
|
||||
|
@ -24734,17 +24710,15 @@ var structuredCloneInternal = function (value, map, transferredBuffers) {
|
|||
case 'BigInt64Array':
|
||||
case 'BigUint64Array':
|
||||
length = type === 'DataView' ? value.byteLength : value.length;
|
||||
cloned = transferredBuffers
|
||||
? new Placeholder(value, type, { offset: value.byteOffset, length: length })
|
||||
: cloneView(value, type, value.byteOffset, length, map);
|
||||
cloned = cloneView(value, type, value.byteOffset, length, map);
|
||||
break;
|
||||
case 'DOMQuad':
|
||||
try {
|
||||
cloned = new DOMQuad(
|
||||
structuredCloneInternal(value.p1, map, transferredBuffers),
|
||||
structuredCloneInternal(value.p2, map, transferredBuffers),
|
||||
structuredCloneInternal(value.p3, map, transferredBuffers),
|
||||
structuredCloneInternal(value.p4, map, transferredBuffers)
|
||||
structuredCloneInternal(value.p1, map),
|
||||
structuredCloneInternal(value.p2, map),
|
||||
structuredCloneInternal(value.p3, map),
|
||||
structuredCloneInternal(value.p4, map)
|
||||
);
|
||||
} catch (error) {
|
||||
cloned = tryNativeRestrictedStructuredClone(value, type);
|
||||
|
@ -24765,7 +24739,7 @@ var structuredCloneInternal = function (value, map, transferredBuffers) {
|
|||
dataTransfer = createDataTransfer();
|
||||
if (dataTransfer) {
|
||||
for (i = 0, length = lengthOfArrayLike(value); i < length; i++) {
|
||||
dataTransfer.items.add(structuredCloneInternal(value[i], map, transferredBuffers));
|
||||
dataTransfer.items.add(structuredCloneInternal(value[i], map));
|
||||
}
|
||||
cloned = dataTransfer.files;
|
||||
} else cloned = tryNativeRestrictedStructuredClone(value, type);
|
||||
|
@ -24774,7 +24748,7 @@ var structuredCloneInternal = function (value, map, transferredBuffers) {
|
|||
// Safari 9 ImageData is a constructor, but typeof ImageData is 'object'
|
||||
try {
|
||||
cloned = new ImageData(
|
||||
structuredCloneInternal(value.data, map, transferredBuffers),
|
||||
structuredCloneInternal(value.data, map),
|
||||
value.width,
|
||||
value.height,
|
||||
{ colorSpace: value.colorSpace }
|
||||
|
@ -24871,105 +24845,38 @@ var structuredCloneInternal = function (value, map, transferredBuffers) {
|
|||
keys = objectKeys(value);
|
||||
for (i = 0, length = lengthOfArrayLike(keys); i < length; i++) {
|
||||
key = keys[i];
|
||||
createProperty(cloned, key, structuredCloneInternal(value[key], map, transferredBuffers));
|
||||
createProperty(cloned, key, structuredCloneInternal(value[key], map));
|
||||
} break;
|
||||
case 'Map':
|
||||
value.forEach(function (v, k) {
|
||||
mapSet(cloned, structuredCloneInternal(k, map, transferredBuffers), structuredCloneInternal(v, map, transferredBuffers));
|
||||
mapSet(cloned, structuredCloneInternal(k, map), structuredCloneInternal(v, map));
|
||||
});
|
||||
break;
|
||||
case 'Set':
|
||||
value.forEach(function (v) {
|
||||
setAdd(cloned, structuredCloneInternal(v, map, transferredBuffers));
|
||||
setAdd(cloned, structuredCloneInternal(v, map));
|
||||
});
|
||||
break;
|
||||
case 'Error':
|
||||
createNonEnumerableProperty(cloned, 'message', structuredCloneInternal(value.message, map, transferredBuffers));
|
||||
createNonEnumerableProperty(cloned, 'message', structuredCloneInternal(value.message, map));
|
||||
if (hasOwn(value, 'cause')) {
|
||||
createNonEnumerableProperty(cloned, 'cause', structuredCloneInternal(value.cause, map, transferredBuffers));
|
||||
createNonEnumerableProperty(cloned, 'cause', structuredCloneInternal(value.cause, map));
|
||||
}
|
||||
if (name === 'AggregateError') {
|
||||
cloned.errors = structuredCloneInternal(value.errors, map, transferredBuffers);
|
||||
cloned.errors = structuredCloneInternal(value.errors, map);
|
||||
} else if (name === 'SuppressedError') {
|
||||
cloned.error = structuredCloneInternal(value.error, map);
|
||||
cloned.suppressed = structuredCloneInternal(value.suppressed, map);
|
||||
} // break omitted
|
||||
case 'DOMException':
|
||||
if (ERROR_STACK_INSTALLABLE) {
|
||||
createNonEnumerableProperty(cloned, 'stack', structuredCloneInternal(value.stack, map, transferredBuffers));
|
||||
createNonEnumerableProperty(cloned, 'stack', structuredCloneInternal(value.stack, map));
|
||||
}
|
||||
}
|
||||
|
||||
return cloned;
|
||||
};
|
||||
|
||||
var replacePlaceholders = function (value, map) {
|
||||
if (!isObject(value)) return value;
|
||||
if (mapHas(map, value)) return mapGet(map, value);
|
||||
|
||||
var type, object, metadata, i, length, keys, key, replacement;
|
||||
|
||||
if (value instanceof Placeholder) {
|
||||
type = value.type;
|
||||
object = value.object;
|
||||
|
||||
switch (type) {
|
||||
case 'ArrayBuffer':
|
||||
case 'SharedArrayBuffer':
|
||||
replacement = cloneBuffer(object, map, type);
|
||||
break;
|
||||
case 'DataView':
|
||||
case 'Int8Array':
|
||||
case 'Uint8Array':
|
||||
case 'Uint8ClampedArray':
|
||||
case 'Int16Array':
|
||||
case 'Uint16Array':
|
||||
case 'Int32Array':
|
||||
case 'Uint32Array':
|
||||
case 'Float16Array':
|
||||
case 'Float32Array':
|
||||
case 'Float64Array':
|
||||
case 'BigInt64Array':
|
||||
case 'BigUint64Array':
|
||||
metadata = value.metadata;
|
||||
replacement = cloneView(object, type, metadata.offset, metadata.length, map);
|
||||
}
|
||||
} else switch (classof(value)) {
|
||||
case 'Array':
|
||||
case 'Object':
|
||||
keys = objectKeys(value);
|
||||
for (i = 0, length = lengthOfArrayLike(keys); i < length; i++) {
|
||||
key = keys[i];
|
||||
value[key] = replacePlaceholders(value[key], map);
|
||||
} break;
|
||||
case 'Map':
|
||||
replacement = new Map();
|
||||
value.forEach(function (v, k) {
|
||||
mapSet(replacement, replacePlaceholders(k, map), replacePlaceholders(v, map));
|
||||
});
|
||||
break;
|
||||
case 'Set':
|
||||
replacement = new Set();
|
||||
value.forEach(function (v) {
|
||||
setAdd(replacement, replacePlaceholders(v, map));
|
||||
});
|
||||
break;
|
||||
case 'Error':
|
||||
value.message = replacePlaceholders(value.message, map);
|
||||
if (hasOwn(value, 'cause')) {
|
||||
value.cause = replacePlaceholders(value.cause, map);
|
||||
}
|
||||
if (value.name === 'AggregateError') {
|
||||
value.errors = replacePlaceholders(value.errors, map);
|
||||
} // break omitted
|
||||
case 'DOMException':
|
||||
if (ERROR_STACK_INSTALLABLE) {
|
||||
value.stack = replacePlaceholders(value.stack, map);
|
||||
}
|
||||
}
|
||||
|
||||
mapSet(map, value, replacement || value);
|
||||
|
||||
return replacement || value;
|
||||
};
|
||||
|
||||
var tryToTransfer = function (rawTransfer, map) {
|
||||
if (!isObject(rawTransfer)) throw new TypeError('Transfer option cannot be converted to a sequence');
|
||||
|
||||
|
@ -24981,7 +24888,7 @@ var tryToTransfer = function (rawTransfer, map) {
|
|||
|
||||
var i = 0;
|
||||
var length = lengthOfArrayLike(transfer);
|
||||
var buffers = [];
|
||||
var buffers = new Set();
|
||||
var value, type, C, transferred, canvas, context;
|
||||
|
||||
while (i < length) {
|
||||
|
@ -24989,12 +24896,14 @@ var tryToTransfer = function (rawTransfer, map) {
|
|||
|
||||
type = classof(value);
|
||||
|
||||
if (type === 'ArrayBuffer') {
|
||||
push(buffers, value);
|
||||
continue;
|
||||
if (type === 'ArrayBuffer' ? setHas(buffers, value) : mapHas(map, value)) {
|
||||
throw new DOMException('Duplicate transferable', DATA_CLONE_ERROR);
|
||||
}
|
||||
|
||||
if (mapHas(map, value)) throw new DOMException('Duplicate transferable', DATA_CLONE_ERROR);
|
||||
if (type === 'ArrayBuffer') {
|
||||
setAdd(buffers, value);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (PROPER_STRUCTURED_CLONE_TRANSFER) {
|
||||
transferred = nativeStructuredClone(value, { transfer: [value] });
|
||||
|
@ -25034,25 +24943,18 @@ var tryToTransfer = function (rawTransfer, map) {
|
|||
return buffers;
|
||||
};
|
||||
|
||||
var tryToTransferBuffers = function (transfer, map) {
|
||||
var i = 0;
|
||||
var length = lengthOfArrayLike(transfer);
|
||||
var value, transferred;
|
||||
|
||||
while (i < length) {
|
||||
value = transfer[i++];
|
||||
|
||||
if (mapHas(map, value)) throw new DOMException('Duplicate transferable', DATA_CLONE_ERROR);
|
||||
|
||||
if (arrayBufferTransfer) {
|
||||
transferred = arrayBufferTransfer(value, undefined, true);
|
||||
var detachBuffers = function (buffers) {
|
||||
setIterate(buffers, function (buffer) {
|
||||
if (PROPER_STRUCTURED_CLONE_TRANSFER) {
|
||||
nativeRestrictedStructuredClone(buffer, { transfer: [buffer] });
|
||||
} else if (isCallable(buffer.transfer)) {
|
||||
buffer.transfer();
|
||||
} else if (detachTransferable) {
|
||||
detachTransferable(buffer);
|
||||
} else {
|
||||
if (!isCallable(value.transfer)) throwUnpolyfillable('ArrayBuffer', TRANSFERRING);
|
||||
transferred = value.transfer();
|
||||
throwUnpolyfillable('ArrayBuffer', TRANSFERRING);
|
||||
}
|
||||
|
||||
mapSet(map, value, transferred);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// `structuredClone` method
|
||||
|
@ -25061,24 +24963,18 @@ $({ global: true, enumerable: true, sham: !PROPER_STRUCTURED_CLONE_TRANSFER, for
|
|||
structuredClone: function structuredClone(value /* , { transfer } */) {
|
||||
var options = validateArgumentsLength(arguments.length, 1) > 1 && !isNullOrUndefined(arguments[1]) ? anObject(arguments[1]) : undefined;
|
||||
var transfer = options ? options.transfer : undefined;
|
||||
var transferredBuffers = false;
|
||||
var map, buffers;
|
||||
|
||||
if (transfer !== undefined) {
|
||||
map = new Map();
|
||||
buffers = tryToTransfer(transfer, map);
|
||||
transferredBuffers = !!lengthOfArrayLike(buffers);
|
||||
}
|
||||
|
||||
var clone = structuredCloneInternal(value, map, transferredBuffers);
|
||||
var clone = structuredCloneInternal(value, map);
|
||||
|
||||
// since of an issue with cloning views of transferred buffers, we a forced to transfer / clone them in 2 steps
|
||||
// since of an issue with cloning views of transferred buffers, we a forced to detach them later
|
||||
// https://github.com/zloirock/core-js/issues/1265
|
||||
if (transferredBuffers) {
|
||||
map = new Map();
|
||||
tryToTransferBuffers(transfer, map);
|
||||
clone = replacePlaceholders(clone, map);
|
||||
}
|
||||
if (buffers) detachBuffers(buffers);
|
||||
|
||||
return clone;
|
||||
}
|
||||
|
@ -26468,6 +26364,7 @@ var create = __webpack_require__(72);
|
|||
var createPropertyDescriptor = __webpack_require__(11);
|
||||
var getIterator = __webpack_require__(135);
|
||||
var getIteratorMethod = __webpack_require__(136);
|
||||
var createIterResultObject = __webpack_require__(173);
|
||||
var validateArgumentsLength = __webpack_require__(329);
|
||||
var wellKnownSymbol = __webpack_require__(34);
|
||||
var arraySort = __webpack_require__(189);
|
||||
|
@ -26556,17 +26453,23 @@ var serialize = function (it) {
|
|||
var URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {
|
||||
setInternalState(this, {
|
||||
type: URL_SEARCH_PARAMS_ITERATOR,
|
||||
iterator: getIterator(getInternalParamsState(params).entries),
|
||||
target: getInternalParamsState(params).entries,
|
||||
index: 0,
|
||||
kind: kind
|
||||
});
|
||||
}, 'Iterator', function next() {
|
||||
}, URL_SEARCH_PARAMS, function next() {
|
||||
var state = getInternalIteratorState(this);
|
||||
var kind = state.kind;
|
||||
var step = state.iterator.next();
|
||||
var entry = step.value;
|
||||
if (!step.done) {
|
||||
step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];
|
||||
} return step;
|
||||
var target = state.target;
|
||||
var index = state.index++;
|
||||
if (!target || index >= target.length) {
|
||||
state.target = undefined;
|
||||
return createIterResultObject(undefined, true);
|
||||
}
|
||||
var entry = target[index];
|
||||
switch (state.kind) {
|
||||
case 'keys': return createIterResultObject(entry.key, false);
|
||||
case 'values': return createIterResultObject(entry.value, false);
|
||||
} return createIterResultObject([entry.key, entry.value], false);
|
||||
}, true);
|
||||
|
||||
var URLSearchParamsState = function (init) {
|
||||
|
@ -26586,6 +26489,7 @@ URLSearchParamsState.prototype = {
|
|||
this.update();
|
||||
},
|
||||
parseObject: function (object) {
|
||||
var entries = this.entries;
|
||||
var iteratorMethod = getIteratorMethod(object);
|
||||
var iterator, next, step, entryIterator, entryNext, first, second;
|
||||
|
||||
|
@ -26600,14 +26504,15 @@ URLSearchParamsState.prototype = {
|
|||
(second = call(entryNext, entryIterator)).done ||
|
||||
!call(entryNext, entryIterator).done
|
||||
) throw new TypeError('Expected sequence with length 2');
|
||||
push(this.entries, { key: $toString(first.value), value: $toString(second.value) });
|
||||
push(entries, { key: $toString(first.value), value: $toString(second.value) });
|
||||
}
|
||||
} else for (var key in object) if (hasOwn(object, key)) {
|
||||
push(this.entries, { key: key, value: $toString(object[key]) });
|
||||
push(entries, { key: key, value: $toString(object[key]) });
|
||||
}
|
||||
},
|
||||
parseQuery: function (query) {
|
||||
if (query) {
|
||||
var entries = this.entries;
|
||||
var attributes = split(query, '&');
|
||||
var index = 0;
|
||||
var attribute, entry;
|
||||
|
@ -26615,7 +26520,7 @@ URLSearchParamsState.prototype = {
|
|||
attribute = attributes[index++];
|
||||
if (attribute.length) {
|
||||
entry = split(attribute, '=');
|
||||
push(this.entries, {
|
||||
push(entries, {
|
||||
key: deserialize(shift(entry)),
|
||||
value: deserialize(join(entry, '='))
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue