diff --git a/dist/grapholscape.esm.js b/dist/grapholscape.esm.js
index a4497236..0545cb6b 100644
--- a/dist/grapholscape.esm.js
+++ b/dist/grapholscape.esm.js
@@ -24,9 +24,11 @@
import '@webcomponents/webcomponentsjs';
import cytoscape from 'cytoscape';
+import '@material/mwc-icon-button';
import '@material/mwc-icon';
import popper from 'cytoscape-popper';
import cola from 'cytoscape-cola';
+import cy_svg from 'cytoscape-svg';
var fails = function (exec) {
try {
@@ -36,7 +38,7 @@ var fails = function (exec) {
}
};
-// Thank's IE8 for his funny defineProperty
+// Detect IE8's incomplete defineProperty implementation
var descriptors = !fails(function () {
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
});
@@ -69,7 +71,7 @@ var global_1 =
check(typeof self == 'object' && self) ||
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
// eslint-disable-next-line no-new-func
- Function('return this')();
+ (function () { return this; })() || Function('return this')();
var isObject = function (it) {
return typeof it === 'object' ? it !== null : typeof it === 'function';
@@ -97,7 +99,7 @@ var anObject = function (it) {
};
// `ToPrimitive` abstract operation
-// https://tc39.github.io/ecma262/#sec-toprimitive
+// https://tc39.es/ecma262/#sec-toprimitive
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
var toPrimitive = function (input, PREFERRED_STRING) {
@@ -112,7 +114,7 @@ var toPrimitive = function (input, PREFERRED_STRING) {
var nativeDefineProperty = Object.defineProperty;
// `Object.defineProperty` method
-// https://tc39.github.io/ecma262/#sec-object.defineproperty
+// https://tc39.es/ecma262/#sec-object.defineproperty
var f = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
anObject(O);
P = toPrimitive(P, true);
@@ -137,7 +139,7 @@ var nameRE = /^\s*function ([^ (]*)/;
var NAME = 'name';
// Function instances `.name` property
-// https://tc39.github.io/ecma262/#sec-function-instances-name
+// https://tc39.es/ecma262/#sec-function-instances-name
if (descriptors && !(NAME in FunctionPrototype)) {
defineProperty(FunctionPrototype, NAME, {
configurable: true,
@@ -186,9 +188,9 @@ var shared = createCommonjsModule(function (module) {
(module.exports = function (key, value) {
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
})('versions', []).push({
- version: '3.6.5',
+ version: '3.8.2',
mode: 'global',
- copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
+ copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
});
});
@@ -275,11 +277,12 @@ var getterFor = function (TYPE) {
};
if (nativeWeakMap) {
- var store$1 = new WeakMap$2();
+ var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$2());
var wmget = store$1.get;
var wmhas = store$1.has;
var wmset = store$1.set;
set = function (it, metadata) {
+ metadata.facade = it;
wmset.call(store$1, it, metadata);
return metadata;
};
@@ -293,6 +296,7 @@ if (nativeWeakMap) {
var STATE = sharedKey('state');
hiddenKeys[STATE] = true;
set = function (it, metadata) {
+ metadata.facade = it;
createNonEnumerableProperty(it, STATE, metadata);
return metadata;
};
@@ -321,9 +325,15 @@ var TEMPLATE = String(String).split('String');
var unsafe = options ? !!options.unsafe : false;
var simple = options ? !!options.enumerable : false;
var noTargetGet = options ? !!options.noTargetGet : false;
+ var state;
if (typeof value == 'function') {
- if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);
- enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
+ if (typeof key == 'string' && !has(value, 'name')) {
+ createNonEnumerableProperty(value, 'name', key);
+ }
+ state = enforceInternalState(value);
+ if (!state.source) {
+ state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
+ }
}
if (O === global_1) {
if (simple) O[key] = value;
@@ -372,13 +382,13 @@ var classof = toStringTagSupport ? classofRaw : function (it) {
};
// `Object.prototype.toString` method implementation
-// https://tc39.github.io/ecma262/#sec-object.prototype.tostring
+// https://tc39.es/ecma262/#sec-object.prototype.tostring
var objectToString = toStringTagSupport ? {}.toString : function toString() {
return '[object ' + classof(this) + ']';
};
// `Object.prototype.toString` method
-// https://tc39.github.io/ecma262/#sec-object.prototype.tostring
+// https://tc39.es/ecma262/#sec-object.prototype.tostring
if (!toStringTagSupport) {
redefine(Object.prototype, 'toString', objectToString, { unsafe: true });
}
@@ -390,7 +400,7 @@ var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
// `Object.prototype.propertyIsEnumerable` method implementation
-// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
+// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
var f$1 = NASHORN_BUG ? function propertyIsEnumerable(V) {
var descriptor = getOwnPropertyDescriptor(this, V);
return !!descriptor && descriptor.enumerable;
@@ -412,7 +422,7 @@ var indexedObject = fails(function () {
} : Object;
// `RequireObjectCoercible` abstract operation
-// https://tc39.github.io/ecma262/#sec-requireobjectcoercible
+// https://tc39.es/ecma262/#sec-requireobjectcoercible
var requireObjectCoercible = function (it) {
if (it == undefined) throw TypeError("Can't call method on " + it);
return it;
@@ -429,7 +439,7 @@ var toIndexedObject = function (it) {
var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
// `Object.getOwnPropertyDescriptor` method
-// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
+// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
var f$2 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
O = toIndexedObject(O);
P = toPrimitive(P, true);
@@ -458,7 +468,7 @@ var ceil = Math.ceil;
var floor = Math.floor;
// `ToInteger` abstract operation
-// https://tc39.github.io/ecma262/#sec-tointeger
+// https://tc39.es/ecma262/#sec-tointeger
var toInteger = function (argument) {
return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
};
@@ -466,7 +476,7 @@ var toInteger = function (argument) {
var min = Math.min;
// `ToLength` abstract operation
-// https://tc39.github.io/ecma262/#sec-tolength
+// https://tc39.es/ecma262/#sec-tolength
var toLength = function (argument) {
return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
};
@@ -504,10 +514,10 @@ var createMethod = function (IS_INCLUDES) {
var arrayIncludes = {
// `Array.prototype.includes` method
- // https://tc39.github.io/ecma262/#sec-array.prototype.includes
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
includes: createMethod(true),
// `Array.prototype.indexOf` method
- // https://tc39.github.io/ecma262/#sec-array.prototype.indexof
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
indexOf: createMethod(false)
};
@@ -541,7 +551,7 @@ var enumBugKeys = [
var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
// `Object.getOwnPropertyNames` method
-// https://tc39.github.io/ecma262/#sec-object.getownpropertynames
+// https://tc39.es/ecma262/#sec-object.getownpropertynames
var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
return objectKeysInternal(O, hiddenKeys$1);
};
@@ -733,28 +743,38 @@ var getIteratorMethod = function (it) {
|| iterators[classof(it)];
};
-// call something on iterator step with safe closing on error
-var callWithSafeIterationClosing = function (iterator, fn, value, ENTRIES) {
- try {
- return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
- // 7.4.6 IteratorClose(iterator, completion)
- } catch (error) {
- var returnMethod = iterator['return'];
- if (returnMethod !== undefined) anObject(returnMethod.call(iterator));
- throw error;
+var iteratorClose = function (iterator) {
+ var returnMethod = iterator['return'];
+ if (returnMethod !== undefined) {
+ return anObject(returnMethod.call(iterator)).value;
}
};
-var iterate_1 = createCommonjsModule(function (module) {
var Result = function (stopped, result) {
this.stopped = stopped;
this.result = result;
};
-var iterate = module.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITERATOR) {
- var boundFunction = functionBindContext(fn, that, AS_ENTRIES ? 2 : 1);
+var iterate = function (iterable, unboundFunction, options) {
+ var that = options && options.that;
+ var AS_ENTRIES = !!(options && options.AS_ENTRIES);
+ var IS_ITERATOR = !!(options && options.IS_ITERATOR);
+ var INTERRUPTED = !!(options && options.INTERRUPTED);
+ var fn = functionBindContext(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED);
var iterator, iterFn, index, length, result, next, step;
+ var stop = function (condition) {
+ if (iterator) iteratorClose(iterator);
+ return new Result(true, condition);
+ };
+
+ var callFn = function (value) {
+ if (AS_ENTRIES) {
+ anObject(value);
+ return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
+ } return INTERRUPTED ? fn(value, stop) : fn(value);
+ };
+
if (IS_ITERATOR) {
iterator = iterable;
} else {
@@ -763,9 +783,7 @@ var iterate = module.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITER
// optimisation for array iterators
if (isArrayIteratorMethod(iterFn)) {
for (index = 0, length = toLength(iterable.length); length > index; index++) {
- result = AS_ENTRIES
- ? boundFunction(anObject(step = iterable[index])[0], step[1])
- : boundFunction(iterable[index]);
+ result = callFn(iterable[index]);
if (result && result instanceof Result) return result;
} return new Result(false);
}
@@ -774,16 +792,16 @@ var iterate = module.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITER
next = iterator.next;
while (!(step = next.call(iterator)).done) {
- result = callWithSafeIterationClosing(iterator, boundFunction, step.value, AS_ENTRIES);
+ try {
+ result = callFn(step.value);
+ } catch (error) {
+ iteratorClose(iterator);
+ throw error;
+ }
if (typeof result == 'object' && result && result instanceof Result) return result;
} return new Result(false);
};
-iterate.stop = function (result) {
- return new Result(true, result);
-};
-});
-
var ITERATOR$2 = wellKnownSymbol('iterator');
var SAFE_CLOSING = false;
@@ -824,7 +842,7 @@ var checkCorrectnessOfIteration = function (exec, SKIP_CLOSING) {
var SPECIES$1 = wellKnownSymbol('species');
// `SpeciesConstructor` abstract operation
-// https://tc39.github.io/ecma262/#sec-speciesconstructor
+// https://tc39.es/ecma262/#sec-speciesconstructor
var speciesConstructor = function (O, defaultConstructor) {
var C = anObject(O).constructor;
var S;
@@ -837,6 +855,8 @@ var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
var engineIsIos = /(iphone|ipod|ipad).*applewebkit/i.test(engineUserAgent);
+var engineIsNode = classofRaw(global_1.process) == 'process';
+
var location = global_1.location;
var set$1 = global_1.setImmediate;
var clear = global_1.clearImmediate;
@@ -889,7 +909,7 @@ if (!set$1 || !clear) {
delete queue[id];
};
// Node.js 0.8-
- if (classofRaw(process) == 'process') {
+ if (engineIsNode) {
defer = function (id) {
process.nextTick(runner(id));
};
@@ -911,8 +931,8 @@ if (!set$1 || !clear) {
global_1.addEventListener &&
typeof postMessage == 'function' &&
!global_1.importScripts &&
- !fails(post) &&
- location.protocol !== 'file:'
+ location && location.protocol !== 'file:' &&
+ !fails(post)
) {
defer = post;
global_1.addEventListener('message', listener, false);
@@ -937,15 +957,18 @@ var task = {
clear: clear
};
-var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
+var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(engineUserAgent);
+var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
var macrotask = task.set;
+
+
var MutationObserver = global_1.MutationObserver || global_1.WebKitMutationObserver;
+var document$2 = global_1.document;
var process$1 = global_1.process;
var Promise$1 = global_1.Promise;
-var IS_NODE = classofRaw(process$1) == 'process';
// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
var queueMicrotaskDescriptor = getOwnPropertyDescriptor$2(global_1, 'queueMicrotask');
var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
@@ -956,7 +979,7 @@ var flush, head, last, notify, toggle, node, promise, then;
if (!queueMicrotask) {
flush = function () {
var parent, fn;
- if (IS_NODE && (parent = process$1.domain)) parent.exit();
+ if (engineIsNode && (parent = process$1.domain)) parent.exit();
while (head) {
fn = head.fn;
head = head.next;
@@ -971,15 +994,11 @@ if (!queueMicrotask) {
if (parent) parent.enter();
};
- // Node.js
- if (IS_NODE) {
- notify = function () {
- process$1.nextTick(flush);
- };
// browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
- } else if (MutationObserver && !engineIsIos) {
+ // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
+ if (!engineIsIos && !engineIsNode && !engineIsWebosWebkit && MutationObserver && document$2) {
toggle = true;
- node = document.createTextNode('');
+ node = document$2.createTextNode('');
new MutationObserver(flush).observe(node, { characterData: true });
notify = function () {
node.data = toggle = !toggle;
@@ -992,6 +1011,11 @@ if (!queueMicrotask) {
notify = function () {
then.call(promise, flush);
};
+ // Node.js without promises
+ } else if (engineIsNode) {
+ notify = function () {
+ process$1.nextTick(flush);
+ };
// for other environments - macrotask based on:
// - setImmediate
// - MessageChannel
@@ -1088,6 +1112,7 @@ var task$1 = task.set;
+
var SPECIES$2 = wellKnownSymbol('species');
var PROMISE = 'Promise';
var getInternalState = internalState.get;
@@ -1095,13 +1120,13 @@ var setInternalState = internalState.set;
var getInternalPromiseState = internalState.getterFor(PROMISE);
var PromiseConstructor = nativePromiseConstructor;
var TypeError$1 = global_1.TypeError;
-var document$2 = global_1.document;
+var document$3 = global_1.document;
var process$3 = global_1.process;
var $fetch = getBuiltIn('fetch');
var newPromiseCapability$1 = newPromiseCapability.f;
var newGenericPromiseCapability = newPromiseCapability$1;
-var IS_NODE$1 = classofRaw(process$3) == 'process';
-var DISPATCH_EVENT = !!(document$2 && document$2.createEvent && global_1.dispatchEvent);
+var DISPATCH_EVENT = !!(document$3 && document$3.createEvent && global_1.dispatchEvent);
+var NATIVE_REJECTION_EVENT = typeof PromiseRejectionEvent == 'function';
var UNHANDLED_REJECTION = 'unhandledrejection';
var REJECTION_HANDLED = 'rejectionhandled';
var PENDING = 0;
@@ -1119,7 +1144,7 @@ var FORCED = isForced_1(PROMISE, function () {
// We can't detect it synchronously, so just check versions
if (engineV8Version === 66) return true;
// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
- if (!IS_NODE$1 && typeof PromiseRejectionEvent != 'function') return true;
+ if (!engineIsNode && !NATIVE_REJECTION_EVENT) return true;
}
// We can't use @@species feature detection in V8 since it causes
// deoptimization and performance degradation
@@ -1145,7 +1170,7 @@ var isThenable = function (it) {
return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
};
-var notify$1 = function (promise, state, isReject) {
+var notify$1 = function (state, isReject) {
if (state.notified) return;
state.notified = true;
var chain = state.reactions;
@@ -1164,7 +1189,7 @@ var notify$1 = function (promise, state, isReject) {
try {
if (handler) {
if (!ok) {
- if (state.rejection === UNHANDLED) onHandleUnhandled(promise, state);
+ if (state.rejection === UNHANDLED) onHandleUnhandled(state);
state.rejection = HANDLED;
}
if (handler === true) result = value;
@@ -1189,36 +1214,37 @@ var notify$1 = function (promise, state, isReject) {
}
state.reactions = [];
state.notified = false;
- if (isReject && !state.rejection) onUnhandled(promise, state);
+ if (isReject && !state.rejection) onUnhandled(state);
});
};
var dispatchEvent = function (name, promise, reason) {
var event, handler;
if (DISPATCH_EVENT) {
- event = document$2.createEvent('Event');
+ event = document$3.createEvent('Event');
event.promise = promise;
event.reason = reason;
event.initEvent(name, false, true);
global_1.dispatchEvent(event);
} else event = { promise: promise, reason: reason };
- if (handler = global_1['on' + name]) handler(event);
+ if (!NATIVE_REJECTION_EVENT && (handler = global_1['on' + name])) handler(event);
else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
};
-var onUnhandled = function (promise, state) {
+var onUnhandled = function (state) {
task$1.call(global_1, function () {
+ var promise = state.facade;
var value = state.value;
var IS_UNHANDLED = isUnhandled(state);
var result;
if (IS_UNHANDLED) {
result = perform(function () {
- if (IS_NODE$1) {
+ if (engineIsNode) {
process$3.emit('unhandledRejection', value, promise);
} else dispatchEvent(UNHANDLED_REJECTION, promise, value);
});
// Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
- state.rejection = IS_NODE$1 || isUnhandled(state) ? UNHANDLED : HANDLED;
+ state.rejection = engineIsNode || isUnhandled(state) ? UNHANDLED : HANDLED;
if (result.error) throw result.value;
}
});
@@ -1228,55 +1254,56 @@ var isUnhandled = function (state) {
return state.rejection !== HANDLED && !state.parent;
};
-var onHandleUnhandled = function (promise, state) {
+var onHandleUnhandled = function (state) {
task$1.call(global_1, function () {
- if (IS_NODE$1) {
+ var promise = state.facade;
+ if (engineIsNode) {
process$3.emit('rejectionHandled', promise);
} else dispatchEvent(REJECTION_HANDLED, promise, state.value);
});
};
-var bind = function (fn, promise, state, unwrap) {
+var bind = function (fn, state, unwrap) {
return function (value) {
- fn(promise, state, value, unwrap);
+ fn(state, value, unwrap);
};
};
-var internalReject = function (promise, state, value, unwrap) {
+var internalReject = function (state, value, unwrap) {
if (state.done) return;
state.done = true;
if (unwrap) state = unwrap;
state.value = value;
state.state = REJECTED;
- notify$1(promise, state, true);
+ notify$1(state, true);
};
-var internalResolve = function (promise, state, value, unwrap) {
+var internalResolve = function (state, value, unwrap) {
if (state.done) return;
state.done = true;
if (unwrap) state = unwrap;
try {
- if (promise === value) throw TypeError$1("Promise can't be resolved itself");
+ if (state.facade === value) throw TypeError$1("Promise can't be resolved itself");
var then = isThenable(value);
if (then) {
microtask(function () {
var wrapper = { done: false };
try {
then.call(value,
- bind(internalResolve, promise, wrapper, state),
- bind(internalReject, promise, wrapper, state)
+ bind(internalResolve, wrapper, state),
+ bind(internalReject, wrapper, state)
);
} catch (error) {
- internalReject(promise, wrapper, error, state);
+ internalReject(wrapper, error, state);
}
});
} else {
state.value = value;
state.state = FULFILLED;
- notify$1(promise, state, false);
+ notify$1(state, false);
}
} catch (error) {
- internalReject(promise, { done: false }, error, state);
+ internalReject({ done: false }, error, state);
}
};
@@ -1289,9 +1316,9 @@ if (FORCED) {
Internal.call(this);
var state = getInternalState(this);
try {
- executor(bind(internalResolve, this, state), bind(internalReject, this, state));
+ executor(bind(internalResolve, state), bind(internalReject, state));
} catch (error) {
- internalReject(this, state, error);
+ internalReject(state, error);
}
};
// eslint-disable-next-line no-unused-vars
@@ -1309,20 +1336,20 @@ if (FORCED) {
};
Internal.prototype = redefineAll(PromiseConstructor.prototype, {
// `Promise.prototype.then` method
- // https://tc39.github.io/ecma262/#sec-promise.prototype.then
+ // https://tc39.es/ecma262/#sec-promise.prototype.then
then: function then(onFulfilled, onRejected) {
var state = getInternalPromiseState(this);
var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor));
reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
reaction.fail = typeof onRejected == 'function' && onRejected;
- reaction.domain = IS_NODE$1 ? process$3.domain : undefined;
+ reaction.domain = engineIsNode ? process$3.domain : undefined;
state.parent = true;
state.reactions.push(reaction);
- if (state.state != PENDING) notify$1(this, state, false);
+ if (state.state != PENDING) notify$1(state, false);
return reaction.promise;
},
// `Promise.prototype.catch` method
- // https://tc39.github.io/ecma262/#sec-promise.prototype.catch
+ // https://tc39.es/ecma262/#sec-promise.prototype.catch
'catch': function (onRejected) {
return this.then(undefined, onRejected);
}
@@ -1331,8 +1358,8 @@ if (FORCED) {
var promise = new Internal();
var state = getInternalState(promise);
this.promise = promise;
- this.resolve = bind(internalResolve, promise, state);
- this.reject = bind(internalReject, promise, state);
+ this.resolve = bind(internalResolve, state);
+ this.reject = bind(internalReject, state);
};
newPromiseCapability.f = newPromiseCapability$1 = function (C) {
return C === PromiseConstructor || C === PromiseWrapper
@@ -1374,7 +1401,7 @@ PromiseWrapper = getBuiltIn(PROMISE);
// statics
_export({ target: PROMISE, stat: true, forced: FORCED }, {
// `Promise.reject` method
- // https://tc39.github.io/ecma262/#sec-promise.reject
+ // https://tc39.es/ecma262/#sec-promise.reject
reject: function reject(r) {
var capability = newPromiseCapability$1(this);
capability.reject.call(undefined, r);
@@ -1384,7 +1411,7 @@ _export({ target: PROMISE, stat: true, forced: FORCED }, {
_export({ target: PROMISE, stat: true, forced: FORCED }, {
// `Promise.resolve` method
- // https://tc39.github.io/ecma262/#sec-promise.resolve
+ // https://tc39.es/ecma262/#sec-promise.resolve
resolve: function resolve(x) {
return promiseResolve( this, x);
}
@@ -1392,7 +1419,7 @@ _export({ target: PROMISE, stat: true, forced: FORCED }, {
_export({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
// `Promise.all` method
- // https://tc39.github.io/ecma262/#sec-promise.all
+ // https://tc39.es/ecma262/#sec-promise.all
all: function all(iterable) {
var C = this;
var capability = newPromiseCapability$1(C);
@@ -1403,7 +1430,7 @@ _export({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
var values = [];
var counter = 0;
var remaining = 1;
- iterate_1(iterable, function (promise) {
+ iterate(iterable, function (promise) {
var index = counter++;
var alreadyCalled = false;
values.push(undefined);
@@ -1421,14 +1448,14 @@ _export({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
return capability.promise;
},
// `Promise.race` method
- // https://tc39.github.io/ecma262/#sec-promise.race
+ // https://tc39.es/ecma262/#sec-promise.race
race: function race(iterable) {
var C = this;
var capability = newPromiseCapability$1(C);
var reject = capability.reject;
var result = perform(function () {
var $promiseResolve = aFunction$1(C.resolve);
- iterate_1(iterable, function (promise) {
+ iterate(iterable, function (promise) {
$promiseResolve.call(C, promise).then(capability.resolve, reject);
});
});
@@ -1443,7 +1470,7 @@ var NON_GENERIC = !!nativePromiseConstructor && fails(function () {
});
// `Promise.prototype.finally` method
-// https://tc39.github.io/ecma262/#sec-promise.prototype.finally
+// https://tc39.es/ecma262/#sec-promise.prototype.finally
_export({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, {
'finally': function (onFinally) {
var C = speciesConstructor(this, getBuiltIn('Promise'));
@@ -1830,25 +1857,25 @@ function _createForOfIteratorHelper(o, allowArrayLike) {
}
// `IsArray` abstract operation
-// https://tc39.github.io/ecma262/#sec-isarray
+// https://tc39.es/ecma262/#sec-isarray
var isArray = Array.isArray || function isArray(arg) {
return classofRaw(arg) == 'Array';
};
// `ToObject` abstract operation
-// https://tc39.github.io/ecma262/#sec-toobject
+// https://tc39.es/ecma262/#sec-toobject
var toObject = function (argument) {
return Object(requireObjectCoercible(argument));
};
// `Object.keys` method
-// https://tc39.github.io/ecma262/#sec-object.keys
+// https://tc39.es/ecma262/#sec-object.keys
var objectKeys = Object.keys || function keys(O) {
return objectKeysInternal(O, enumBugKeys);
};
// `Object.defineProperties` method
-// https://tc39.github.io/ecma262/#sec-object.defineproperties
+// https://tc39.es/ecma262/#sec-object.defineproperties
var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
anObject(O);
var keys = objectKeys(Properties);
@@ -1917,7 +1944,7 @@ var NullProtoObject = function () {
hiddenKeys[IE_PROTO] = true;
// `Object.create` method
-// https://tc39.github.io/ecma262/#sec-object.create
+// https://tc39.es/ecma262/#sec-object.create
var objectCreate = Object.create || function create(O, Properties) {
var result;
if (O !== null) {
@@ -1974,7 +2001,7 @@ var defineWellKnownSymbol = function (NAME) {
var SPECIES$3 = wellKnownSymbol('species');
// `ArraySpeciesCreate` abstract operation
-// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
+// https://tc39.es/ecma262/#sec-arrayspeciescreate
var arraySpeciesCreate = function (originalArray, length) {
var C;
if (isArray(originalArray)) {
@@ -1990,13 +2017,14 @@ var arraySpeciesCreate = function (originalArray, length) {
var push = [].push;
-// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
+// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation
var createMethod$1 = function (TYPE) {
var IS_MAP = TYPE == 1;
var IS_FILTER = TYPE == 2;
var IS_SOME = TYPE == 3;
var IS_EVERY = TYPE == 4;
var IS_FIND_INDEX = TYPE == 6;
+ var IS_FILTER_OUT = TYPE == 7;
var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
return function ($this, callbackfn, that, specificCreate) {
var O = toObject($this);
@@ -2005,7 +2033,7 @@ var createMethod$1 = function (TYPE) {
var length = toLength(self.length);
var index = 0;
var create = specificCreate || arraySpeciesCreate;
- var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
+ var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;
var value, result;
for (;length > index; index++) if (NO_HOLES || index in self) {
value = self[index];
@@ -2017,7 +2045,10 @@ var createMethod$1 = function (TYPE) {
case 5: return value; // find
case 6: return index; // findIndex
case 2: push.call(target, value); // filter
- } else if (IS_EVERY) return false; // every
+ } else switch (TYPE) {
+ case 4: return false; // every
+ case 7: push.call(target, value); // filterOut
+ }
}
}
return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
@@ -2026,26 +2057,29 @@ var createMethod$1 = function (TYPE) {
var arrayIteration = {
// `Array.prototype.forEach` method
- // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
+ // https://tc39.es/ecma262/#sec-array.prototype.foreach
forEach: createMethod$1(0),
// `Array.prototype.map` method
- // https://tc39.github.io/ecma262/#sec-array.prototype.map
+ // https://tc39.es/ecma262/#sec-array.prototype.map
map: createMethod$1(1),
// `Array.prototype.filter` method
- // https://tc39.github.io/ecma262/#sec-array.prototype.filter
+ // https://tc39.es/ecma262/#sec-array.prototype.filter
filter: createMethod$1(2),
// `Array.prototype.some` method
- // https://tc39.github.io/ecma262/#sec-array.prototype.some
+ // https://tc39.es/ecma262/#sec-array.prototype.some
some: createMethod$1(3),
// `Array.prototype.every` method
- // https://tc39.github.io/ecma262/#sec-array.prototype.every
+ // https://tc39.es/ecma262/#sec-array.prototype.every
every: createMethod$1(4),
// `Array.prototype.find` method
- // https://tc39.github.io/ecma262/#sec-array.prototype.find
+ // https://tc39.es/ecma262/#sec-array.prototype.find
find: createMethod$1(5),
// `Array.prototype.findIndex` method
- // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
- findIndex: createMethod$1(6)
+ // https://tc39.es/ecma262/#sec-array.prototype.findIndex
+ findIndex: createMethod$1(6),
+ // `Array.prototype.filterOut` method
+ // https://github.com/tc39/proposal-array-filtering
+ filterOut: createMethod$1(7)
};
var $forEach = arrayIteration.forEach;
@@ -2173,7 +2207,7 @@ var $getOwnPropertySymbols = function getOwnPropertySymbols(O) {
};
// `Symbol` constructor
-// https://tc39.github.io/ecma262/#sec-symbol-constructor
+// https://tc39.es/ecma262/#sec-symbol-constructor
if (!nativeSymbol) {
$Symbol = function Symbol() {
if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');
@@ -2230,7 +2264,7 @@ $forEach(objectKeys(WellKnownSymbolsStore$1), function (name) {
_export({ target: SYMBOL, stat: true, forced: !nativeSymbol }, {
// `Symbol.for` method
- // https://tc39.github.io/ecma262/#sec-symbol.for
+ // https://tc39.es/ecma262/#sec-symbol.for
'for': function (key) {
var string = String(key);
if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];
@@ -2240,7 +2274,7 @@ _export({ target: SYMBOL, stat: true, forced: !nativeSymbol }, {
return symbol;
},
// `Symbol.keyFor` method
- // https://tc39.github.io/ecma262/#sec-symbol.keyfor
+ // https://tc39.es/ecma262/#sec-symbol.keyfor
keyFor: function keyFor(sym) {
if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');
if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
@@ -2251,25 +2285,25 @@ _export({ target: SYMBOL, stat: true, forced: !nativeSymbol }, {
_export({ target: 'Object', stat: true, forced: !nativeSymbol, sham: !descriptors }, {
// `Object.create` method
- // https://tc39.github.io/ecma262/#sec-object.create
+ // https://tc39.es/ecma262/#sec-object.create
create: $create,
// `Object.defineProperty` method
- // https://tc39.github.io/ecma262/#sec-object.defineproperty
+ // https://tc39.es/ecma262/#sec-object.defineproperty
defineProperty: $defineProperty,
// `Object.defineProperties` method
- // https://tc39.github.io/ecma262/#sec-object.defineproperties
+ // https://tc39.es/ecma262/#sec-object.defineproperties
defineProperties: $defineProperties,
// `Object.getOwnPropertyDescriptor` method
- // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
getOwnPropertyDescriptor: $getOwnPropertyDescriptor
});
_export({ target: 'Object', stat: true, forced: !nativeSymbol }, {
// `Object.getOwnPropertyNames` method
- // https://tc39.github.io/ecma262/#sec-object.getownpropertynames
+ // https://tc39.es/ecma262/#sec-object.getownpropertynames
getOwnPropertyNames: $getOwnPropertyNames,
// `Object.getOwnPropertySymbols` method
- // https://tc39.github.io/ecma262/#sec-object.getownpropertysymbols
+ // https://tc39.es/ecma262/#sec-object.getownpropertysymbols
getOwnPropertySymbols: $getOwnPropertySymbols
});
@@ -2282,7 +2316,7 @@ _export({ target: 'Object', stat: true, forced: fails(function () { objectGetOwn
});
// `JSON.stringify` method behavior with symbols
-// https://tc39.github.io/ecma262/#sec-json.stringify
+// https://tc39.es/ecma262/#sec-json.stringify
if ($stringify) {
var FORCED_JSON_STRINGIFY = !nativeSymbol || fails(function () {
var symbol = $Symbol();
@@ -2314,18 +2348,18 @@ if ($stringify) {
}
// `Symbol.prototype[@@toPrimitive]` method
-// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@toprimitive
+// https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive
if (!$Symbol[PROTOTYPE$1][TO_PRIMITIVE]) {
createNonEnumerableProperty($Symbol[PROTOTYPE$1], TO_PRIMITIVE, $Symbol[PROTOTYPE$1].valueOf);
}
// `Symbol.prototype[@@toStringTag]` property
-// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@tostringtag
+// https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag
setToStringTag($Symbol, SYMBOL);
hiddenKeys[HIDDEN] = true;
// `Symbol.asyncIterator` well-known symbol
-// https://tc39.github.io/ecma262/#sec-symbol.asynciterator
+// https://tc39.es/ecma262/#sec-symbol.asynciterator
defineWellKnownSymbol('asyncIterator');
var defineProperty$3 = objectDefineProperty.f;
@@ -2372,1463 +2406,1513 @@ if (descriptors && typeof NativeSymbol == 'function' && (!('description' in Nati
}
// `Symbol.hasInstance` well-known symbol
-// https://tc39.github.io/ecma262/#sec-symbol.hasinstance
+// https://tc39.es/ecma262/#sec-symbol.hasinstance
defineWellKnownSymbol('hasInstance');
// `Symbol.isConcatSpreadable` well-known symbol
-// https://tc39.github.io/ecma262/#sec-symbol.isconcatspreadable
+// https://tc39.es/ecma262/#sec-symbol.isconcatspreadable
defineWellKnownSymbol('isConcatSpreadable');
// `Symbol.iterator` well-known symbol
-// https://tc39.github.io/ecma262/#sec-symbol.iterator
+// https://tc39.es/ecma262/#sec-symbol.iterator
defineWellKnownSymbol('iterator');
// `Symbol.match` well-known symbol
-// https://tc39.github.io/ecma262/#sec-symbol.match
+// https://tc39.es/ecma262/#sec-symbol.match
defineWellKnownSymbol('match');
// `Symbol.matchAll` well-known symbol
+// https://tc39.es/ecma262/#sec-symbol.matchall
defineWellKnownSymbol('matchAll');
// `Symbol.replace` well-known symbol
-// https://tc39.github.io/ecma262/#sec-symbol.replace
+// https://tc39.es/ecma262/#sec-symbol.replace
defineWellKnownSymbol('replace');
// `Symbol.search` well-known symbol
-// https://tc39.github.io/ecma262/#sec-symbol.search
+// https://tc39.es/ecma262/#sec-symbol.search
defineWellKnownSymbol('search');
// `Symbol.species` well-known symbol
-// https://tc39.github.io/ecma262/#sec-symbol.species
+// https://tc39.es/ecma262/#sec-symbol.species
defineWellKnownSymbol('species');
// `Symbol.split` well-known symbol
-// https://tc39.github.io/ecma262/#sec-symbol.split
+// https://tc39.es/ecma262/#sec-symbol.split
defineWellKnownSymbol('split');
// `Symbol.toPrimitive` well-known symbol
-// https://tc39.github.io/ecma262/#sec-symbol.toprimitive
+// https://tc39.es/ecma262/#sec-symbol.toprimitive
defineWellKnownSymbol('toPrimitive');
// `Symbol.toStringTag` well-known symbol
-// https://tc39.github.io/ecma262/#sec-symbol.tostringtag
+// https://tc39.es/ecma262/#sec-symbol.tostringtag
defineWellKnownSymbol('toStringTag');
// `Symbol.unscopables` well-known symbol
-// https://tc39.github.io/ecma262/#sec-symbol.unscopables
+// https://tc39.es/ecma262/#sec-symbol.unscopables
defineWellKnownSymbol('unscopables');
-var nativeAssign = Object.assign;
-var defineProperty$4 = Object.defineProperty;
+var correctPrototypeGetter = !fails(function () {
+ function F() { /* empty */ }
+ F.prototype.constructor = null;
+ return Object.getPrototypeOf(new F()) !== F.prototype;
+});
-// `Object.assign` method
-// https://tc39.github.io/ecma262/#sec-object.assign
-var objectAssign = !nativeAssign || fails(function () {
- // should have correct order of operations (Edge bug)
- if (descriptors && nativeAssign({ b: 1 }, nativeAssign(defineProperty$4({}, 'a', {
- enumerable: true,
- get: function () {
- defineProperty$4(this, 'b', {
- value: 3,
- enumerable: false
- });
- }
- }), { b: 2 })).b !== 1) return true;
- // should work with symbols and should have deterministic property order (V8 bug)
- var A = {};
- var B = {};
- // eslint-disable-next-line no-undef
- var symbol = Symbol();
- var alphabet = 'abcdefghijklmnopqrst';
- A[symbol] = 7;
- alphabet.split('').forEach(function (chr) { B[chr] = chr; });
- return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;
-}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
- var T = toObject(target);
- var argumentsLength = arguments.length;
- var index = 1;
- var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
- var propertyIsEnumerable = objectPropertyIsEnumerable.f;
- while (argumentsLength > index) {
- var S = indexedObject(arguments[index++]);
- var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
- var length = keys.length;
- var j = 0;
- var key;
- while (length > j) {
- key = keys[j++];
- if (!descriptors || propertyIsEnumerable.call(S, key)) T[key] = S[key];
- }
- } return T;
-} : nativeAssign;
+var IE_PROTO$1 = sharedKey('IE_PROTO');
+var ObjectPrototype$1 = Object.prototype;
-// `Object.assign` method
-// https://tc39.github.io/ecma262/#sec-object.assign
-_export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, {
- assign: objectAssign
-});
+// `Object.getPrototypeOf` method
+// https://tc39.es/ecma262/#sec-object.getprototypeof
+var objectGetPrototypeOf = correctPrototypeGetter ? Object.getPrototypeOf : function (O) {
+ O = toObject(O);
+ if (has(O, IE_PROTO$1)) return O[IE_PROTO$1];
+ if (typeof O.constructor == 'function' && O instanceof O.constructor) {
+ return O.constructor.prototype;
+ } return O instanceof Object ? ObjectPrototype$1 : null;
+};
-// `Object.create` method
-// https://tc39.github.io/ecma262/#sec-object.create
-_export({ target: 'Object', stat: true, sham: !descriptors }, {
- create: objectCreate
-});
+var aPossiblePrototype = function (it) {
+ if (!isObject(it) && it !== null) {
+ throw TypeError("Can't set " + String(it) + ' as a prototype');
+ } return it;
+};
-// `Object.defineProperty` method
-// https://tc39.github.io/ecma262/#sec-object.defineproperty
-_export({ target: 'Object', stat: true, forced: !descriptors, sham: !descriptors }, {
- defineProperty: objectDefineProperty.f
-});
+// `Object.setPrototypeOf` method
+// https://tc39.es/ecma262/#sec-object.setprototypeof
+// Works with __proto__ only. Old v8 can't work with null proto objects.
+/* eslint-disable no-proto */
+var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
+ var CORRECT_SETTER = false;
+ var test = {};
+ var setter;
+ try {
+ setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
+ setter.call(test, []);
+ CORRECT_SETTER = test instanceof Array;
+ } catch (error) { /* empty */ }
+ return function setPrototypeOf(O, proto) {
+ anObject(O);
+ aPossiblePrototype(proto);
+ if (CORRECT_SETTER) setter.call(O, proto);
+ else O.__proto__ = proto;
+ return O;
+ };
+}() : undefined);
-// `Object.defineProperties` method
-// https://tc39.github.io/ecma262/#sec-object.defineproperties
-_export({ target: 'Object', stat: true, forced: !descriptors, sham: !descriptors }, {
- defineProperties: objectDefineProperties
+var $AggregateError = function AggregateError(errors, message) {
+ var that = this;
+ if (!(that instanceof $AggregateError)) return new $AggregateError(errors, message);
+ if (objectSetPrototypeOf) {
+ // eslint-disable-next-line unicorn/error-message
+ that = objectSetPrototypeOf(new Error(undefined), objectGetPrototypeOf(that));
+ }
+ if (message !== undefined) createNonEnumerableProperty(that, 'message', String(message));
+ var errorsArray = [];
+ iterate(errors, errorsArray.push, { that: errorsArray });
+ createNonEnumerableProperty(that, 'errors', errorsArray);
+ return that;
+};
+
+$AggregateError.prototype = objectCreate(Error.prototype, {
+ constructor: createPropertyDescriptor(5, $AggregateError),
+ message: createPropertyDescriptor(5, ''),
+ name: createPropertyDescriptor(5, 'AggregateError')
});
-var propertyIsEnumerable = objectPropertyIsEnumerable.f;
+// `AggregateError` constructor
+// https://tc39.es/ecma262/#sec-aggregate-error-constructor
+_export({ global: true }, {
+ AggregateError: $AggregateError
+});
-// `Object.{ entries, values }` methods implementation
-var createMethod$2 = function (TO_ENTRIES) {
- return function (it) {
- var O = toIndexedObject(it);
- var keys = objectKeys(O);
- var length = keys.length;
- var i = 0;
- var result = [];
- var key;
- while (length > i) {
- key = keys[i++];
- if (!descriptors || propertyIsEnumerable.call(O, key)) {
- result.push(TO_ENTRIES ? [key, O[key]] : O[key]);
- }
- }
- return result;
- };
+// call something on iterator step with safe closing on error
+var callWithSafeIterationClosing = function (iterator, fn, value, ENTRIES) {
+ try {
+ return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
+ // 7.4.6 IteratorClose(iterator, completion)
+ } catch (error) {
+ iteratorClose(iterator);
+ throw error;
+ }
};
-var objectToArray = {
- // `Object.entries` method
- // https://tc39.github.io/ecma262/#sec-object.entries
- entries: createMethod$2(true),
- // `Object.values` method
- // https://tc39.github.io/ecma262/#sec-object.values
- values: createMethod$2(false)
+var createProperty = function (object, key, value) {
+ var propertyKey = toPrimitive(key);
+ if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
+ else object[propertyKey] = value;
};
-var $entries = objectToArray.entries;
-
-// `Object.entries` method
-// https://tc39.github.io/ecma262/#sec-object.entries
-_export({ target: 'Object', stat: true }, {
- entries: function entries(O) {
- return $entries(O);
+// `Array.from` method implementation
+// https://tc39.es/ecma262/#sec-array.from
+var arrayFrom = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
+ var O = toObject(arrayLike);
+ var C = typeof this == 'function' ? this : Array;
+ var argumentsLength = arguments.length;
+ var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
+ var mapping = mapfn !== undefined;
+ var iteratorMethod = getIteratorMethod(O);
+ var index = 0;
+ var length, result, step, iterator, next, value;
+ if (mapping) mapfn = functionBindContext(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);
+ // if the target is not iterable or it's an array with the default iterator - use a simple case
+ if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {
+ iterator = iteratorMethod.call(O);
+ next = iterator.next;
+ result = new C();
+ for (;!(step = next.call(iterator)).done; index++) {
+ value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
+ createProperty(result, index, value);
+ }
+ } else {
+ length = toLength(O.length);
+ result = new C(length);
+ for (;length > index; index++) {
+ value = mapping ? mapfn(O[index], index) : O[index];
+ createProperty(result, index, value);
+ }
}
+ result.length = index;
+ return result;
+};
+
+var INCORRECT_ITERATION$1 = !checkCorrectnessOfIteration(function (iterable) {
+ Array.from(iterable);
});
-var freezing = !fails(function () {
- return Object.isExtensible(Object.preventExtensions({}));
+// `Array.from` method
+// https://tc39.es/ecma262/#sec-array.from
+_export({ target: 'Array', stat: true, forced: INCORRECT_ITERATION$1 }, {
+ from: arrayFrom
});
-var internalMetadata = createCommonjsModule(function (module) {
-var defineProperty = objectDefineProperty.f;
+// `Array.isArray` method
+// https://tc39.es/ecma262/#sec-array.isarray
+_export({ target: 'Array', stat: true }, {
+ isArray: isArray
+});
+var ISNT_GENERIC = fails(function () {
+ function F() { /* empty */ }
+ return !(Array.of.call(F) instanceof F);
+});
+// `Array.of` method
+// https://tc39.es/ecma262/#sec-array.of
+// WebKit Array.of isn't generic
+_export({ target: 'Array', stat: true, forced: ISNT_GENERIC }, {
+ of: function of(/* ...args */) {
+ var index = 0;
+ var argumentsLength = arguments.length;
+ var result = new (typeof this == 'function' ? this : Array)(argumentsLength);
+ while (argumentsLength > index) createProperty(result, index, arguments[index++]);
+ result.length = argumentsLength;
+ return result;
+ }
+});
-var METADATA = uid('meta');
-var id = 0;
+var SPECIES$4 = wellKnownSymbol('species');
-var isExtensible = Object.isExtensible || function () {
- return true;
+var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
+ // We can't use this feature detection in V8 since it causes
+ // deoptimization and serious performance degradation
+ // https://github.com/zloirock/core-js/issues/677
+ return engineV8Version >= 51 || !fails(function () {
+ var array = [];
+ var constructor = array.constructor = {};
+ constructor[SPECIES$4] = function () {
+ return { foo: 1 };
+ };
+ return array[METHOD_NAME](Boolean).foo !== 1;
+ });
};
-var setMetadata = function (it) {
- defineProperty(it, METADATA, { value: {
- objectID: 'O' + ++id, // object ID
- weakData: {} // weak collections IDs
- } });
-};
+var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
+var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
+var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
-var fastKey = function (it, create) {
- // return a primitive with prefix
- if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
- if (!has(it, METADATA)) {
- // can't set metadata to uncaught frozen object
- if (!isExtensible(it)) return 'F';
- // not necessary to add metadata
- if (!create) return 'E';
- // add missing metadata
- setMetadata(it);
- // return object ID
- } return it[METADATA].objectID;
-};
+// We can't use this feature detection in V8 since it causes
+// deoptimization and serious performance degradation
+// https://github.com/zloirock/core-js/issues/679
+var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {
+ var array = [];
+ array[IS_CONCAT_SPREADABLE] = false;
+ return array.concat()[0] !== array;
+});
-var getWeakData = function (it, create) {
- if (!has(it, METADATA)) {
- // can't set metadata to uncaught frozen object
- if (!isExtensible(it)) return true;
- // not necessary to add metadata
- if (!create) return false;
- // add missing metadata
- setMetadata(it);
- // return the store of weak collections IDs
- } return it[METADATA].weakData;
-};
+var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
-// add metadata on freeze-family methods calling
-var onFreeze = function (it) {
- if (freezing && meta.REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it);
- return it;
+var isConcatSpreadable = function (O) {
+ if (!isObject(O)) return false;
+ var spreadable = O[IS_CONCAT_SPREADABLE];
+ return spreadable !== undefined ? !!spreadable : isArray(O);
};
-var meta = module.exports = {
- REQUIRED: false,
- fastKey: fastKey,
- getWeakData: getWeakData,
- onFreeze: onFreeze
-};
+var FORCED$1 = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
-hiddenKeys[METADATA] = true;
+// `Array.prototype.concat` method
+// https://tc39.es/ecma262/#sec-array.prototype.concat
+// with adding support of @@isConcatSpreadable and @@species
+_export({ target: 'Array', proto: true, forced: FORCED$1 }, {
+ concat: function concat(arg) { // eslint-disable-line no-unused-vars
+ var O = toObject(this);
+ var A = arraySpeciesCreate(O, 0);
+ var n = 0;
+ var i, k, length, len, E;
+ for (i = -1, length = arguments.length; i < length; i++) {
+ E = i === -1 ? O : arguments[i];
+ if (isConcatSpreadable(E)) {
+ len = toLength(E.length);
+ if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
+ for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
+ } else {
+ if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
+ createProperty(A, n++, E);
+ }
+ }
+ A.length = n;
+ return A;
+ }
});
-var onFreeze = internalMetadata.onFreeze;
-
-var nativeFreeze = Object.freeze;
-var FAILS_ON_PRIMITIVES = fails(function () { nativeFreeze(1); });
+var min$2 = Math.min;
-// `Object.freeze` method
-// https://tc39.github.io/ecma262/#sec-object.freeze
-_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !freezing }, {
- freeze: function freeze(it) {
- return nativeFreeze && isObject(it) ? nativeFreeze(onFreeze(it)) : it;
+// `Array.prototype.copyWithin` method implementation
+// https://tc39.es/ecma262/#sec-array.prototype.copywithin
+var arrayCopyWithin = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {
+ var O = toObject(this);
+ var len = toLength(O.length);
+ var to = toAbsoluteIndex(target, len);
+ var from = toAbsoluteIndex(start, len);
+ var end = arguments.length > 2 ? arguments[2] : undefined;
+ var count = min$2((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);
+ var inc = 1;
+ if (from < to && to < from + count) {
+ inc = -1;
+ from += count - 1;
+ to += count - 1;
}
-});
+ while (count-- > 0) {
+ if (from in O) O[to] = O[from];
+ else delete O[to];
+ to += inc;
+ from += inc;
+ } return O;
+};
-var createProperty = function (object, key, value) {
- var propertyKey = toPrimitive(key);
- if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
- else object[propertyKey] = value;
+var UNSCOPABLES = wellKnownSymbol('unscopables');
+var ArrayPrototype$1 = Array.prototype;
+
+// Array.prototype[@@unscopables]
+// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
+if (ArrayPrototype$1[UNSCOPABLES] == undefined) {
+ objectDefineProperty.f(ArrayPrototype$1, UNSCOPABLES, {
+ configurable: true,
+ value: objectCreate(null)
+ });
+}
+
+// add a key to Array.prototype[@@unscopables]
+var addToUnscopables = function (key) {
+ ArrayPrototype$1[UNSCOPABLES][key] = true;
};
-// `Object.fromEntries` method
-// https://github.com/tc39/proposal-object-from-entries
-_export({ target: 'Object', stat: true }, {
- fromEntries: function fromEntries(iterable) {
- var obj = {};
- iterate_1(iterable, function (k, v) {
- createProperty(obj, k, v);
- }, undefined, true);
- return obj;
- }
+// `Array.prototype.copyWithin` method
+// https://tc39.es/ecma262/#sec-array.prototype.copywithin
+_export({ target: 'Array', proto: true }, {
+ copyWithin: arrayCopyWithin
});
-var nativeGetOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
+// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
+addToUnscopables('copyWithin');
+var arrayMethodIsStrict = function (METHOD_NAME, argument) {
+ var method = [][METHOD_NAME];
+ return !!method && fails(function () {
+ // eslint-disable-next-line no-useless-call,no-throw-literal
+ method.call(null, argument || function () { throw 1; }, 1);
+ });
+};
-var FAILS_ON_PRIMITIVES$1 = fails(function () { nativeGetOwnPropertyDescriptor$2(1); });
-var FORCED$1 = !descriptors || FAILS_ON_PRIMITIVES$1;
+var defineProperty$4 = Object.defineProperty;
+var cache = {};
-// `Object.getOwnPropertyDescriptor` method
-// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
-_export({ target: 'Object', stat: true, forced: FORCED$1, sham: !descriptors }, {
- getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
- return nativeGetOwnPropertyDescriptor$2(toIndexedObject(it), key);
- }
-});
+var thrower = function (it) { throw it; };
-// `Object.getOwnPropertyDescriptors` method
-// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors
-_export({ target: 'Object', stat: true, sham: !descriptors }, {
- getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
- var O = toIndexedObject(object);
- var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
- var keys = ownKeys(O);
- var result = {};
- var index = 0;
- var key, descriptor;
- while (keys.length > index) {
- descriptor = getOwnPropertyDescriptor(O, key = keys[index++]);
- if (descriptor !== undefined) createProperty(result, key, descriptor);
- }
- return result;
- }
-});
+var arrayMethodUsesToLength = function (METHOD_NAME, options) {
+ if (has(cache, METHOD_NAME)) return cache[METHOD_NAME];
+ if (!options) options = {};
+ var method = [][METHOD_NAME];
+ var ACCESSORS = has(options, 'ACCESSORS') ? options.ACCESSORS : false;
+ var argument0 = has(options, 0) ? options[0] : thrower;
+ var argument1 = has(options, 1) ? options[1] : undefined;
-var nativeGetOwnPropertyNames$2 = objectGetOwnPropertyNamesExternal.f;
+ return cache[METHOD_NAME] = !!method && !fails(function () {
+ if (ACCESSORS && !descriptors) return true;
+ var O = { length: -1 };
-var FAILS_ON_PRIMITIVES$2 = fails(function () { return !Object.getOwnPropertyNames(1); });
+ if (ACCESSORS) defineProperty$4(O, 1, { enumerable: true, get: thrower });
+ else O[1] = 1;
-// `Object.getOwnPropertyNames` method
-// https://tc39.github.io/ecma262/#sec-object.getownpropertynames
-_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$2 }, {
- getOwnPropertyNames: nativeGetOwnPropertyNames$2
-});
+ method.call(O, argument0, argument1);
+ });
+};
-var correctPrototypeGetter = !fails(function () {
- function F() { /* empty */ }
- F.prototype.constructor = null;
- return Object.getPrototypeOf(new F()) !== F.prototype;
-});
+var $every = arrayIteration.every;
-var IE_PROTO$1 = sharedKey('IE_PROTO');
-var ObjectPrototype$1 = Object.prototype;
-// `Object.getPrototypeOf` method
-// https://tc39.github.io/ecma262/#sec-object.getprototypeof
-var objectGetPrototypeOf = correctPrototypeGetter ? Object.getPrototypeOf : function (O) {
- O = toObject(O);
- if (has(O, IE_PROTO$1)) return O[IE_PROTO$1];
- if (typeof O.constructor == 'function' && O instanceof O.constructor) {
- return O.constructor.prototype;
- } return O instanceof Object ? ObjectPrototype$1 : null;
-};
-var FAILS_ON_PRIMITIVES$3 = fails(function () { objectGetPrototypeOf(1); });
+var STRICT_METHOD = arrayMethodIsStrict('every');
+var USES_TO_LENGTH = arrayMethodUsesToLength('every');
-// `Object.getPrototypeOf` method
-// https://tc39.github.io/ecma262/#sec-object.getprototypeof
-_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$3, sham: !correctPrototypeGetter }, {
- getPrototypeOf: function getPrototypeOf(it) {
- return objectGetPrototypeOf(toObject(it));
+// `Array.prototype.every` method
+// https://tc39.es/ecma262/#sec-array.prototype.every
+_export({ target: 'Array', proto: true, forced: !STRICT_METHOD || !USES_TO_LENGTH }, {
+ every: function every(callbackfn /* , thisArg */) {
+ return $every(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
-// `SameValue` abstract operation
-// https://tc39.github.io/ecma262/#sec-samevalue
-var sameValue = Object.is || function is(x, y) {
- // eslint-disable-next-line no-self-compare
- return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
+// `Array.prototype.fill` method implementation
+// https://tc39.es/ecma262/#sec-array.prototype.fill
+var arrayFill = function fill(value /* , start = 0, end = @length */) {
+ var O = toObject(this);
+ var length = toLength(O.length);
+ var argumentsLength = arguments.length;
+ var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);
+ var end = argumentsLength > 2 ? arguments[2] : undefined;
+ var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
+ while (endPos > index) O[index++] = value;
+ return O;
};
-// `Object.is` method
-// https://tc39.github.io/ecma262/#sec-object.is
-_export({ target: 'Object', stat: true }, {
- is: sameValue
+// `Array.prototype.fill` method
+// https://tc39.es/ecma262/#sec-array.prototype.fill
+_export({ target: 'Array', proto: true }, {
+ fill: arrayFill
});
-var nativeIsExtensible = Object.isExtensible;
-var FAILS_ON_PRIMITIVES$4 = fails(function () { nativeIsExtensible(1); });
+// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
+addToUnscopables('fill');
-// `Object.isExtensible` method
-// https://tc39.github.io/ecma262/#sec-object.isextensible
-_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$4 }, {
- isExtensible: function isExtensible(it) {
- return isObject(it) ? nativeIsExtensible ? nativeIsExtensible(it) : true : false;
- }
-});
+var $filter = arrayIteration.filter;
-var nativeIsFrozen = Object.isFrozen;
-var FAILS_ON_PRIMITIVES$5 = fails(function () { nativeIsFrozen(1); });
-// `Object.isFrozen` method
-// https://tc39.github.io/ecma262/#sec-object.isfrozen
-_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$5 }, {
- isFrozen: function isFrozen(it) {
- return isObject(it) ? nativeIsFrozen ? nativeIsFrozen(it) : false : true;
- }
-});
-var nativeIsSealed = Object.isSealed;
-var FAILS_ON_PRIMITIVES$6 = fails(function () { nativeIsSealed(1); });
+var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
+// Edge 14- issue
+var USES_TO_LENGTH$1 = arrayMethodUsesToLength('filter');
-// `Object.isSealed` method
-// https://tc39.github.io/ecma262/#sec-object.issealed
-_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$6 }, {
- isSealed: function isSealed(it) {
- return isObject(it) ? nativeIsSealed ? nativeIsSealed(it) : false : true;
+// `Array.prototype.filter` method
+// https://tc39.es/ecma262/#sec-array.prototype.filter
+// with adding support of @@species
+_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH$1 }, {
+ filter: function filter(callbackfn /* , thisArg */) {
+ return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
-var FAILS_ON_PRIMITIVES$7 = fails(function () { objectKeys(1); });
+var $find = arrayIteration.find;
-// `Object.keys` method
-// https://tc39.github.io/ecma262/#sec-object.keys
-_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$7 }, {
- keys: function keys(it) {
- return objectKeys(toObject(it));
- }
-});
-var onFreeze$1 = internalMetadata.onFreeze;
+var FIND = 'find';
+var SKIPS_HOLES = true;
+var USES_TO_LENGTH$2 = arrayMethodUsesToLength(FIND);
-var nativePreventExtensions = Object.preventExtensions;
-var FAILS_ON_PRIMITIVES$8 = fails(function () { nativePreventExtensions(1); });
+// Shouldn't skip holes
+if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
-// `Object.preventExtensions` method
-// https://tc39.github.io/ecma262/#sec-object.preventextensions
-_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$8, sham: !freezing }, {
- preventExtensions: function preventExtensions(it) {
- return nativePreventExtensions && isObject(it) ? nativePreventExtensions(onFreeze$1(it)) : it;
+// `Array.prototype.find` method
+// https://tc39.es/ecma262/#sec-array.prototype.find
+_export({ target: 'Array', proto: true, forced: SKIPS_HOLES || !USES_TO_LENGTH$2 }, {
+ find: function find(callbackfn /* , that = undefined */) {
+ return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
-var onFreeze$2 = internalMetadata.onFreeze;
+// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
+addToUnscopables(FIND);
+var $findIndex = arrayIteration.findIndex;
-var nativeSeal = Object.seal;
-var FAILS_ON_PRIMITIVES$9 = fails(function () { nativeSeal(1); });
-// `Object.seal` method
-// https://tc39.github.io/ecma262/#sec-object.seal
-_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$9, sham: !freezing }, {
- seal: function seal(it) {
- return nativeSeal && isObject(it) ? nativeSeal(onFreeze$2(it)) : it;
+var FIND_INDEX = 'findIndex';
+var SKIPS_HOLES$1 = true;
+
+var USES_TO_LENGTH$3 = arrayMethodUsesToLength(FIND_INDEX);
+
+// Shouldn't skip holes
+if (FIND_INDEX in []) Array(1)[FIND_INDEX](function () { SKIPS_HOLES$1 = false; });
+
+// `Array.prototype.findIndex` method
+// https://tc39.es/ecma262/#sec-array.prototype.findindex
+_export({ target: 'Array', proto: true, forced: SKIPS_HOLES$1 || !USES_TO_LENGTH$3 }, {
+ findIndex: function findIndex(callbackfn /* , that = undefined */) {
+ return $findIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
-var aPossiblePrototype = function (it) {
- if (!isObject(it) && it !== null) {
- throw TypeError("Can't set " + String(it) + ' as a prototype');
- } return it;
-};
+// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
+addToUnscopables(FIND_INDEX);
-// `Object.setPrototypeOf` method
-// https://tc39.github.io/ecma262/#sec-object.setprototypeof
-// Works with __proto__ only. Old v8 can't work with null proto objects.
-/* eslint-disable no-proto */
-var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
- var CORRECT_SETTER = false;
- var test = {};
- var setter;
- try {
- setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
- setter.call(test, []);
- CORRECT_SETTER = test instanceof Array;
- } catch (error) { /* empty */ }
- return function setPrototypeOf(O, proto) {
- anObject(O);
- aPossiblePrototype(proto);
- if (CORRECT_SETTER) setter.call(O, proto);
- else O.__proto__ = proto;
- return O;
- };
-}() : undefined);
+// `FlattenIntoArray` abstract operation
+// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
+var flattenIntoArray = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
+ var targetIndex = start;
+ var sourceIndex = 0;
+ var mapFn = mapper ? functionBindContext(mapper, thisArg, 3) : false;
+ var element;
-// `Object.setPrototypeOf` method
-// https://tc39.github.io/ecma262/#sec-object.setprototypeof
-_export({ target: 'Object', stat: true }, {
- setPrototypeOf: objectSetPrototypeOf
-});
+ while (sourceIndex < sourceLen) {
+ if (sourceIndex in source) {
+ element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
-var $values = objectToArray.values;
+ if (depth > 0 && isArray(element)) {
+ targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1;
+ } else {
+ if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length');
+ target[targetIndex] = element;
+ }
-// `Object.values` method
-// https://tc39.github.io/ecma262/#sec-object.values
-_export({ target: 'Object', stat: true }, {
- values: function values(O) {
- return $values(O);
+ targetIndex++;
+ }
+ sourceIndex++;
+ }
+ return targetIndex;
+};
+
+var flattenIntoArray_1 = flattenIntoArray;
+
+// `Array.prototype.flat` method
+// https://tc39.es/ecma262/#sec-array.prototype.flat
+_export({ target: 'Array', proto: true }, {
+ flat: function flat(/* depthArg = 1 */) {
+ var depthArg = arguments.length ? arguments[0] : undefined;
+ var O = toObject(this);
+ var sourceLen = toLength(O.length);
+ var A = arraySpeciesCreate(O, 0);
+ A.length = flattenIntoArray_1(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg));
+ return A;
}
});
-// Forced replacement object prototype accessors methods
-var objectPrototypeAccessorsForced = !fails(function () {
- var key = Math.random();
- // In FF throws only define methods
- // eslint-disable-next-line no-undef, no-useless-call
- __defineSetter__.call(null, key, function () { /* empty */ });
- delete global_1[key];
+// `Array.prototype.flatMap` method
+// https://tc39.es/ecma262/#sec-array.prototype.flatmap
+_export({ target: 'Array', proto: true }, {
+ flatMap: function flatMap(callbackfn /* , thisArg */) {
+ var O = toObject(this);
+ var sourceLen = toLength(O.length);
+ var A;
+ aFunction$1(callbackfn);
+ A = arraySpeciesCreate(O, 0);
+ A.length = flattenIntoArray_1(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
+ return A;
+ }
});
-// `Object.prototype.__defineGetter__` method
-// https://tc39.github.io/ecma262/#sec-object.prototype.__defineGetter__
-if (descriptors) {
- _export({ target: 'Object', proto: true, forced: objectPrototypeAccessorsForced }, {
- __defineGetter__: function __defineGetter__(P, getter) {
- objectDefineProperty.f(toObject(this), P, { get: aFunction$1(getter), enumerable: true, configurable: true });
- }
- });
-}
+var $forEach$1 = arrayIteration.forEach;
-// `Object.prototype.__defineSetter__` method
-// https://tc39.github.io/ecma262/#sec-object.prototype.__defineSetter__
-if (descriptors) {
- _export({ target: 'Object', proto: true, forced: objectPrototypeAccessorsForced }, {
- __defineSetter__: function __defineSetter__(P, setter) {
- objectDefineProperty.f(toObject(this), P, { set: aFunction$1(setter), enumerable: true, configurable: true });
- }
- });
-}
-var getOwnPropertyDescriptor$3 = objectGetOwnPropertyDescriptor.f;
-// `Object.prototype.__lookupGetter__` method
-// https://tc39.github.io/ecma262/#sec-object.prototype.__lookupGetter__
-if (descriptors) {
- _export({ target: 'Object', proto: true, forced: objectPrototypeAccessorsForced }, {
- __lookupGetter__: function __lookupGetter__(P) {
- var O = toObject(this);
- var key = toPrimitive(P, true);
- var desc;
- do {
- if (desc = getOwnPropertyDescriptor$3(O, key)) return desc.get;
- } while (O = objectGetPrototypeOf(O));
- }
- });
-}
+var STRICT_METHOD$1 = arrayMethodIsStrict('forEach');
+var USES_TO_LENGTH$4 = arrayMethodUsesToLength('forEach');
-var getOwnPropertyDescriptor$4 = objectGetOwnPropertyDescriptor.f;
+// `Array.prototype.forEach` method implementation
+// https://tc39.es/ecma262/#sec-array.prototype.foreach
+var arrayForEach = (!STRICT_METHOD$1 || !USES_TO_LENGTH$4) ? function forEach(callbackfn /* , thisArg */) {
+ return $forEach$1(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
+} : [].forEach;
-// `Object.prototype.__lookupSetter__` method
-// https://tc39.github.io/ecma262/#sec-object.prototype.__lookupSetter__
-if (descriptors) {
- _export({ target: 'Object', proto: true, forced: objectPrototypeAccessorsForced }, {
- __lookupSetter__: function __lookupSetter__(P) {
- var O = toObject(this);
- var key = toPrimitive(P, true);
- var desc;
- do {
- if (desc = getOwnPropertyDescriptor$4(O, key)) return desc.set;
- } while (O = objectGetPrototypeOf(O));
- }
- });
-}
+// `Array.prototype.forEach` method
+// https://tc39.es/ecma262/#sec-array.prototype.foreach
+_export({ target: 'Array', proto: true, forced: [].forEach != arrayForEach }, {
+ forEach: arrayForEach
+});
-var slice$1 = [].slice;
-var factories = {};
+var $includes = arrayIncludes.includes;
-var construct = function (C, argsLength, args) {
- if (!(argsLength in factories)) {
- for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']';
- // eslint-disable-next-line no-new-func
- factories[argsLength] = Function('C,a', 'return new C(' + list.join(',') + ')');
- } return factories[argsLength](C, args);
-};
-// `Function.prototype.bind` method implementation
-// https://tc39.github.io/ecma262/#sec-function.prototype.bind
-var functionBind = Function.bind || function bind(that /* , ...args */) {
- var fn = aFunction$1(this);
- var partArgs = slice$1.call(arguments, 1);
- var boundFunction = function bound(/* args... */) {
- var args = partArgs.concat(slice$1.call(arguments));
- return this instanceof boundFunction ? construct(fn, args.length, args) : fn.apply(that, args);
- };
- if (isObject(fn.prototype)) boundFunction.prototype = fn.prototype;
- return boundFunction;
-};
-// `Function.prototype.bind` method
-// https://tc39.github.io/ecma262/#sec-function.prototype.bind
-_export({ target: 'Function', proto: true }, {
- bind: functionBind
+var USES_TO_LENGTH$5 = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });
+
+// `Array.prototype.includes` method
+// https://tc39.es/ecma262/#sec-array.prototype.includes
+_export({ target: 'Array', proto: true, forced: !USES_TO_LENGTH$5 }, {
+ includes: function includes(el /* , fromIndex = 0 */) {
+ return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
+ }
});
-var HAS_INSTANCE = wellKnownSymbol('hasInstance');
-var FunctionPrototype$1 = Function.prototype;
+// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
+addToUnscopables('includes');
-// `Function.prototype[@@hasInstance]` method
-// https://tc39.github.io/ecma262/#sec-function.prototype-@@hasinstance
-if (!(HAS_INSTANCE in FunctionPrototype$1)) {
- objectDefineProperty.f(FunctionPrototype$1, HAS_INSTANCE, { value: function (O) {
- if (typeof this != 'function' || !isObject(O)) return false;
- if (!isObject(this.prototype)) return O instanceof this;
- // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:
- while (O = objectGetPrototypeOf(O)) if (this.prototype === O) return true;
- return false;
- } });
-}
+var $indexOf = arrayIncludes.indexOf;
-// `globalThis` object
-// https://github.com/tc39/proposal-global
-_export({ global: true }, {
- globalThis: global_1
-});
-// `Array.from` method implementation
-// https://tc39.github.io/ecma262/#sec-array.from
-var arrayFrom = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
- var O = toObject(arrayLike);
- var C = typeof this == 'function' ? this : Array;
- var argumentsLength = arguments.length;
- var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
- var mapping = mapfn !== undefined;
- var iteratorMethod = getIteratorMethod(O);
- var index = 0;
- var length, result, step, iterator, next, value;
- if (mapping) mapfn = functionBindContext(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);
- // if the target is not iterable or it's an array with the default iterator - use a simple case
- if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {
- iterator = iteratorMethod.call(O);
- next = iterator.next;
- result = new C();
- for (;!(step = next.call(iterator)).done; index++) {
- value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
- createProperty(result, index, value);
- }
- } else {
- length = toLength(O.length);
- result = new C(length);
- for (;length > index; index++) {
- value = mapping ? mapfn(O[index], index) : O[index];
- createProperty(result, index, value);
- }
- }
- result.length = index;
- return result;
-};
-var INCORRECT_ITERATION$1 = !checkCorrectnessOfIteration(function (iterable) {
- Array.from(iterable);
-});
+var nativeIndexOf = [].indexOf;
-// `Array.from` method
-// https://tc39.github.io/ecma262/#sec-array.from
-_export({ target: 'Array', stat: true, forced: INCORRECT_ITERATION$1 }, {
- from: arrayFrom
-});
+var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;
+var STRICT_METHOD$2 = arrayMethodIsStrict('indexOf');
+var USES_TO_LENGTH$6 = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });
-// `Array.isArray` method
-// https://tc39.github.io/ecma262/#sec-array.isarray
-_export({ target: 'Array', stat: true }, {
- isArray: isArray
+// `Array.prototype.indexOf` method
+// https://tc39.es/ecma262/#sec-array.prototype.indexof
+_export({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD$2 || !USES_TO_LENGTH$6 }, {
+ indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
+ return NEGATIVE_ZERO
+ // convert -0 to +0
+ ? nativeIndexOf.apply(this, arguments) || 0
+ : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);
+ }
});
-var ISNT_GENERIC = fails(function () {
- function F() { /* empty */ }
- return !(Array.of.call(F) instanceof F);
-});
+var nativeJoin = [].join;
-// `Array.of` method
-// https://tc39.github.io/ecma262/#sec-array.of
-// WebKit Array.of isn't generic
-_export({ target: 'Array', stat: true, forced: ISNT_GENERIC }, {
- of: function of(/* ...args */) {
- var index = 0;
- var argumentsLength = arguments.length;
- var result = new (typeof this == 'function' ? this : Array)(argumentsLength);
- while (argumentsLength > index) createProperty(result, index, arguments[index++]);
- result.length = argumentsLength;
- return result;
+var ES3_STRINGS = indexedObject != Object;
+var STRICT_METHOD$3 = arrayMethodIsStrict('join', ',');
+
+// `Array.prototype.join` method
+// https://tc39.es/ecma262/#sec-array.prototype.join
+_export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$3 }, {
+ join: function join(separator) {
+ return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
}
});
-var SPECIES$4 = wellKnownSymbol('species');
-
-var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
- // We can't use this feature detection in V8 since it causes
- // deoptimization and serious performance degradation
- // https://github.com/zloirock/core-js/issues/677
- return engineV8Version >= 51 || !fails(function () {
- var array = [];
- var constructor = array.constructor = {};
- constructor[SPECIES$4] = function () {
- return { foo: 1 };
- };
- return array[METHOD_NAME](Boolean).foo !== 1;
- });
-};
+var min$3 = Math.min;
+var nativeLastIndexOf = [].lastIndexOf;
+var NEGATIVE_ZERO$1 = !!nativeLastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;
+var STRICT_METHOD$4 = arrayMethodIsStrict('lastIndexOf');
+// For preventing possible almost infinite loop in non-standard implementations, test the forward version of the method
+var USES_TO_LENGTH$7 = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });
+var FORCED$2 = NEGATIVE_ZERO$1 || !STRICT_METHOD$4 || !USES_TO_LENGTH$7;
-var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
-var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
-var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
+// `Array.prototype.lastIndexOf` method implementation
+// https://tc39.es/ecma262/#sec-array.prototype.lastindexof
+var arrayLastIndexOf = FORCED$2 ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
+ // convert -0 to +0
+ if (NEGATIVE_ZERO$1) return nativeLastIndexOf.apply(this, arguments) || 0;
+ var O = toIndexedObject(this);
+ var length = toLength(O.length);
+ var index = length - 1;
+ if (arguments.length > 1) index = min$3(index, toInteger(arguments[1]));
+ if (index < 0) index = length + index;
+ for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;
+ return -1;
+} : nativeLastIndexOf;
-// We can't use this feature detection in V8 since it causes
-// deoptimization and serious performance degradation
-// https://github.com/zloirock/core-js/issues/679
-var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {
- var array = [];
- array[IS_CONCAT_SPREADABLE] = false;
- return array.concat()[0] !== array;
+// `Array.prototype.lastIndexOf` method
+// https://tc39.es/ecma262/#sec-array.prototype.lastindexof
+_export({ target: 'Array', proto: true, forced: arrayLastIndexOf !== [].lastIndexOf }, {
+ lastIndexOf: arrayLastIndexOf
});
-var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
+var $map = arrayIteration.map;
-var isConcatSpreadable = function (O) {
- if (!isObject(O)) return false;
- var spreadable = O[IS_CONCAT_SPREADABLE];
- return spreadable !== undefined ? !!spreadable : isArray(O);
-};
-var FORCED$2 = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
-// `Array.prototype.concat` method
-// https://tc39.github.io/ecma262/#sec-array.prototype.concat
-// with adding support of @@isConcatSpreadable and @@species
-_export({ target: 'Array', proto: true, forced: FORCED$2 }, {
- concat: function concat(arg) { // eslint-disable-line no-unused-vars
- var O = toObject(this);
- var A = arraySpeciesCreate(O, 0);
- var n = 0;
- var i, k, length, len, E;
- for (i = -1, length = arguments.length; i < length; i++) {
- E = i === -1 ? O : arguments[i];
- if (isConcatSpreadable(E)) {
- len = toLength(E.length);
- if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
- for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
- } else {
- if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
- createProperty(A, n++, E);
- }
- }
- A.length = n;
- return A;
+var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('map');
+// FF49- issue
+var USES_TO_LENGTH$8 = arrayMethodUsesToLength('map');
+
+// `Array.prototype.map` method
+// https://tc39.es/ecma262/#sec-array.prototype.map
+// with adding support of @@species
+_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 || !USES_TO_LENGTH$8 }, {
+ map: function map(callbackfn /* , thisArg */) {
+ return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
-var min$2 = Math.min;
+// `Array.prototype.{ reduce, reduceRight }` methods implementation
+var createMethod$2 = function (IS_RIGHT) {
+ return function (that, callbackfn, argumentsLength, memo) {
+ aFunction$1(callbackfn);
+ var O = toObject(that);
+ var self = indexedObject(O);
+ var length = toLength(O.length);
+ var index = IS_RIGHT ? length - 1 : 0;
+ var i = IS_RIGHT ? -1 : 1;
+ if (argumentsLength < 2) while (true) {
+ if (index in self) {
+ memo = self[index];
+ index += i;
+ break;
+ }
+ index += i;
+ if (IS_RIGHT ? index < 0 : length <= index) {
+ throw TypeError('Reduce of empty array with no initial value');
+ }
+ }
+ for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
+ memo = callbackfn(memo, self[index], index, O);
+ }
+ return memo;
+ };
+};
-// `Array.prototype.copyWithin` method implementation
-// https://tc39.github.io/ecma262/#sec-array.prototype.copywithin
-var arrayCopyWithin = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {
- var O = toObject(this);
- var len = toLength(O.length);
- var to = toAbsoluteIndex(target, len);
- var from = toAbsoluteIndex(start, len);
- var end = arguments.length > 2 ? arguments[2] : undefined;
- var count = min$2((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);
- var inc = 1;
- if (from < to && to < from + count) {
- inc = -1;
- from += count - 1;
- to += count - 1;
- }
- while (count-- > 0) {
- if (from in O) O[to] = O[from];
- else delete O[to];
- to += inc;
- from += inc;
- } return O;
+var arrayReduce = {
+ // `Array.prototype.reduce` method
+ // https://tc39.es/ecma262/#sec-array.prototype.reduce
+ left: createMethod$2(false),
+ // `Array.prototype.reduceRight` method
+ // https://tc39.es/ecma262/#sec-array.prototype.reduceright
+ right: createMethod$2(true)
};
-var UNSCOPABLES = wellKnownSymbol('unscopables');
-var ArrayPrototype$1 = Array.prototype;
+var $reduce = arrayReduce.left;
-// Array.prototype[@@unscopables]
-// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
-if (ArrayPrototype$1[UNSCOPABLES] == undefined) {
- objectDefineProperty.f(ArrayPrototype$1, UNSCOPABLES, {
- configurable: true,
- value: objectCreate(null)
- });
-}
-// add a key to Array.prototype[@@unscopables]
-var addToUnscopables = function (key) {
- ArrayPrototype$1[UNSCOPABLES][key] = true;
-};
-// `Array.prototype.copyWithin` method
-// https://tc39.github.io/ecma262/#sec-array.prototype.copywithin
-_export({ target: 'Array', proto: true }, {
- copyWithin: arrayCopyWithin
-});
-// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
-addToUnscopables('copyWithin');
-var arrayMethodIsStrict = function (METHOD_NAME, argument) {
- var method = [][METHOD_NAME];
- return !!method && fails(function () {
- // eslint-disable-next-line no-useless-call,no-throw-literal
- method.call(null, argument || function () { throw 1; }, 1);
- });
-};
+var STRICT_METHOD$5 = arrayMethodIsStrict('reduce');
+var USES_TO_LENGTH$9 = arrayMethodUsesToLength('reduce', { 1: 0 });
+// Chrome 80-82 has a critical bug
+// https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
+var CHROME_BUG = !engineIsNode && engineV8Version > 79 && engineV8Version < 83;
-var defineProperty$5 = Object.defineProperty;
-var cache = {};
+// `Array.prototype.reduce` method
+// https://tc39.es/ecma262/#sec-array.prototype.reduce
+_export({ target: 'Array', proto: true, forced: !STRICT_METHOD$5 || !USES_TO_LENGTH$9 || CHROME_BUG }, {
+ reduce: function reduce(callbackfn /* , initialValue */) {
+ return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
+ }
+});
-var thrower = function (it) { throw it; };
+var $reduceRight = arrayReduce.right;
-var arrayMethodUsesToLength = function (METHOD_NAME, options) {
- if (has(cache, METHOD_NAME)) return cache[METHOD_NAME];
- if (!options) options = {};
- var method = [][METHOD_NAME];
- var ACCESSORS = has(options, 'ACCESSORS') ? options.ACCESSORS : false;
- var argument0 = has(options, 0) ? options[0] : thrower;
- var argument1 = has(options, 1) ? options[1] : undefined;
- return cache[METHOD_NAME] = !!method && !fails(function () {
- if (ACCESSORS && !descriptors) return true;
- var O = { length: -1 };
- if (ACCESSORS) defineProperty$5(O, 1, { enumerable: true, get: thrower });
- else O[1] = 1;
- method.call(O, argument0, argument1);
- });
-};
-var $every = arrayIteration.every;
+var STRICT_METHOD$6 = arrayMethodIsStrict('reduceRight');
+// For preventing possible almost infinite loop in non-standard implementations, test the forward version of the method
+var USES_TO_LENGTH$a = arrayMethodUsesToLength('reduce', { 1: 0 });
+// Chrome 80-82 has a critical bug
+// https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
+var CHROME_BUG$1 = !engineIsNode && engineV8Version > 79 && engineV8Version < 83;
+// `Array.prototype.reduceRight` method
+// https://tc39.es/ecma262/#sec-array.prototype.reduceright
+_export({ target: 'Array', proto: true, forced: !STRICT_METHOD$6 || !USES_TO_LENGTH$a || CHROME_BUG$1 }, {
+ reduceRight: function reduceRight(callbackfn /* , initialValue */) {
+ return $reduceRight(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
+ }
+});
+var nativeReverse = [].reverse;
+var test$1 = [1, 2];
-var STRICT_METHOD = arrayMethodIsStrict('every');
-var USES_TO_LENGTH = arrayMethodUsesToLength('every');
-
-// `Array.prototype.every` method
-// https://tc39.github.io/ecma262/#sec-array.prototype.every
-_export({ target: 'Array', proto: true, forced: !STRICT_METHOD || !USES_TO_LENGTH }, {
- every: function every(callbackfn /* , thisArg */) {
- return $every(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
+// `Array.prototype.reverse` method
+// https://tc39.es/ecma262/#sec-array.prototype.reverse
+// fix for Safari 12.0 bug
+// https://bugs.webkit.org/show_bug.cgi?id=188794
+_export({ target: 'Array', proto: true, forced: String(test$1) === String(test$1.reverse()) }, {
+ reverse: function reverse() {
+ // eslint-disable-next-line no-self-assign
+ if (isArray(this)) this.length = this.length;
+ return nativeReverse.call(this);
}
});
-// `Array.prototype.fill` method implementation
-// https://tc39.github.io/ecma262/#sec-array.prototype.fill
-var arrayFill = function fill(value /* , start = 0, end = @length */) {
- var O = toObject(this);
- var length = toLength(O.length);
- var argumentsLength = arguments.length;
- var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);
- var end = argumentsLength > 2 ? arguments[2] : undefined;
- var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
- while (endPos > index) O[index++] = value;
- return O;
-};
+var HAS_SPECIES_SUPPORT$2 = arrayMethodHasSpeciesSupport('slice');
+var USES_TO_LENGTH$b = arrayMethodUsesToLength('slice', { ACCESSORS: true, 0: 0, 1: 2 });
-// `Array.prototype.fill` method
-// https://tc39.github.io/ecma262/#sec-array.prototype.fill
-_export({ target: 'Array', proto: true }, {
- fill: arrayFill
-});
+var SPECIES$5 = wellKnownSymbol('species');
+var nativeSlice = [].slice;
+var max$1 = Math.max;
-// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
-addToUnscopables('fill');
+// `Array.prototype.slice` method
+// https://tc39.es/ecma262/#sec-array.prototype.slice
+// fallback for not array-like ES3 strings and DOM objects
+_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$2 || !USES_TO_LENGTH$b }, {
+ slice: function slice(start, end) {
+ var O = toIndexedObject(this);
+ var length = toLength(O.length);
+ var k = toAbsoluteIndex(start, length);
+ var fin = toAbsoluteIndex(end === undefined ? length : end, length);
+ // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
+ var Constructor, result, n;
+ if (isArray(O)) {
+ Constructor = O.constructor;
+ // cross-realm fallback
+ if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {
+ Constructor = undefined;
+ } else if (isObject(Constructor)) {
+ Constructor = Constructor[SPECIES$5];
+ if (Constructor === null) Constructor = undefined;
+ }
+ if (Constructor === Array || Constructor === undefined) {
+ return nativeSlice.call(O, k, fin);
+ }
+ }
+ result = new (Constructor === undefined ? Array : Constructor)(max$1(fin - k, 0));
+ for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
+ result.length = n;
+ return result;
+ }
+});
-var $filter = arrayIteration.filter;
+var $some = arrayIteration.some;
-var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
-// Edge 14- issue
-var USES_TO_LENGTH$1 = arrayMethodUsesToLength('filter');
+var STRICT_METHOD$7 = arrayMethodIsStrict('some');
+var USES_TO_LENGTH$c = arrayMethodUsesToLength('some');
-// `Array.prototype.filter` method
-// https://tc39.github.io/ecma262/#sec-array.prototype.filter
-// with adding support of @@species
-_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH$1 }, {
- filter: function filter(callbackfn /* , thisArg */) {
- return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
+// `Array.prototype.some` method
+// https://tc39.es/ecma262/#sec-array.prototype.some
+_export({ target: 'Array', proto: true, forced: !STRICT_METHOD$7 || !USES_TO_LENGTH$c }, {
+ some: function some(callbackfn /* , thisArg */) {
+ return $some(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
-var $find = arrayIteration.find;
+var test$2 = [];
+var nativeSort = test$2.sort;
+// IE8-
+var FAILS_ON_UNDEFINED = fails(function () {
+ test$2.sort(undefined);
+});
+// V8 bug
+var FAILS_ON_NULL = fails(function () {
+ test$2.sort(null);
+});
+// Old WebKit
+var STRICT_METHOD$8 = arrayMethodIsStrict('sort');
+var FORCED$3 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD$8;
-var FIND = 'find';
-var SKIPS_HOLES = true;
+// `Array.prototype.sort` method
+// https://tc39.es/ecma262/#sec-array.prototype.sort
+_export({ target: 'Array', proto: true, forced: FORCED$3 }, {
+ sort: function sort(comparefn) {
+ return comparefn === undefined
+ ? nativeSort.call(toObject(this))
+ : nativeSort.call(toObject(this), aFunction$1(comparefn));
+ }
+});
-var USES_TO_LENGTH$2 = arrayMethodUsesToLength(FIND);
+var HAS_SPECIES_SUPPORT$3 = arrayMethodHasSpeciesSupport('splice');
+var USES_TO_LENGTH$d = arrayMethodUsesToLength('splice', { ACCESSORS: true, 0: 0, 1: 2 });
-// Shouldn't skip holes
-if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
+var max$2 = Math.max;
+var min$4 = Math.min;
+var MAX_SAFE_INTEGER$1 = 0x1FFFFFFFFFFFFF;
+var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';
-// `Array.prototype.find` method
-// https://tc39.github.io/ecma262/#sec-array.prototype.find
-_export({ target: 'Array', proto: true, forced: SKIPS_HOLES || !USES_TO_LENGTH$2 }, {
- find: function find(callbackfn /* , that = undefined */) {
- return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
+// `Array.prototype.splice` method
+// https://tc39.es/ecma262/#sec-array.prototype.splice
+// with adding support of @@species
+_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$3 || !USES_TO_LENGTH$d }, {
+ splice: function splice(start, deleteCount /* , ...items */) {
+ var O = toObject(this);
+ var len = toLength(O.length);
+ var actualStart = toAbsoluteIndex(start, len);
+ var argumentsLength = arguments.length;
+ var insertCount, actualDeleteCount, A, k, from, to;
+ if (argumentsLength === 0) {
+ insertCount = actualDeleteCount = 0;
+ } else if (argumentsLength === 1) {
+ insertCount = 0;
+ actualDeleteCount = len - actualStart;
+ } else {
+ insertCount = argumentsLength - 2;
+ actualDeleteCount = min$4(max$2(toInteger(deleteCount), 0), len - actualStart);
+ }
+ if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER$1) {
+ throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);
+ }
+ A = arraySpeciesCreate(O, actualDeleteCount);
+ for (k = 0; k < actualDeleteCount; k++) {
+ from = actualStart + k;
+ if (from in O) createProperty(A, k, O[from]);
+ }
+ A.length = actualDeleteCount;
+ if (insertCount < actualDeleteCount) {
+ for (k = actualStart; k < len - actualDeleteCount; k++) {
+ from = k + actualDeleteCount;
+ to = k + insertCount;
+ if (from in O) O[to] = O[from];
+ else delete O[to];
+ }
+ for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];
+ } else if (insertCount > actualDeleteCount) {
+ for (k = len - actualDeleteCount; k > actualStart; k--) {
+ from = k + actualDeleteCount - 1;
+ to = k + insertCount - 1;
+ if (from in O) O[to] = O[from];
+ else delete O[to];
+ }
+ }
+ for (k = 0; k < insertCount; k++) {
+ O[k + actualStart] = arguments[k + 2];
+ }
+ O.length = len - actualDeleteCount + insertCount;
+ return A;
}
});
-// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
-addToUnscopables(FIND);
+// `Array[@@species]` getter
+// https://tc39.es/ecma262/#sec-get-array-@@species
+setSpecies('Array');
-var $findIndex = arrayIteration.findIndex;
+// this method was added to unscopables after implementation
+// in popular engines, so it's moved to a separate module
+// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
+addToUnscopables('flat');
-var FIND_INDEX = 'findIndex';
-var SKIPS_HOLES$1 = true;
+// this method was added to unscopables after implementation
+// in popular engines, so it's moved to a separate module
-var USES_TO_LENGTH$3 = arrayMethodUsesToLength(FIND_INDEX);
-// Shouldn't skip holes
-if (FIND_INDEX in []) Array(1)[FIND_INDEX](function () { SKIPS_HOLES$1 = false; });
+// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
+addToUnscopables('flatMap');
-// `Array.prototype.findIndex` method
-// https://tc39.github.io/ecma262/#sec-array.prototype.findindex
-_export({ target: 'Array', proto: true, forced: SKIPS_HOLES$1 || !USES_TO_LENGTH$3 }, {
- findIndex: function findIndex(callbackfn /* , that = undefined */) {
- return $findIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- }
-});
+var ITERATOR$3 = wellKnownSymbol('iterator');
+var BUGGY_SAFARI_ITERATORS = false;
-// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
-addToUnscopables(FIND_INDEX);
+var returnThis = function () { return this; };
-// `FlattenIntoArray` abstract operation
-// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
-var flattenIntoArray = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
- var targetIndex = start;
- var sourceIndex = 0;
- var mapFn = mapper ? functionBindContext(mapper, thisArg, 3) : false;
- var element;
+// `%IteratorPrototype%` object
+// https://tc39.es/ecma262/#sec-%iteratorprototype%-object
+var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
- while (sourceIndex < sourceLen) {
- if (sourceIndex in source) {
- element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
+if ([].keys) {
+ arrayIterator = [].keys();
+ // Safari 8 has buggy iterators w/o `next`
+ if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
+ else {
+ PrototypeOfArrayIteratorPrototype = objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator));
+ if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
+ }
+}
- if (depth > 0 && isArray(element)) {
- targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1;
- } else {
- if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length');
- target[targetIndex] = element;
- }
+if (IteratorPrototype == undefined) IteratorPrototype = {};
- targetIndex++;
- }
- sourceIndex++;
- }
- return targetIndex;
+// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
+if ( !has(IteratorPrototype, ITERATOR$3)) {
+ createNonEnumerableProperty(IteratorPrototype, ITERATOR$3, returnThis);
+}
+
+var iteratorsCore = {
+ IteratorPrototype: IteratorPrototype,
+ BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
};
-var flattenIntoArray_1 = flattenIntoArray;
+var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
-// `Array.prototype.flat` method
-// https://github.com/tc39/proposal-flatMap
-_export({ target: 'Array', proto: true }, {
- flat: function flat(/* depthArg = 1 */) {
- var depthArg = arguments.length ? arguments[0] : undefined;
- var O = toObject(this);
- var sourceLen = toLength(O.length);
- var A = arraySpeciesCreate(O, 0);
- A.length = flattenIntoArray_1(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg));
- return A;
- }
-});
-// `Array.prototype.flatMap` method
-// https://github.com/tc39/proposal-flatMap
-_export({ target: 'Array', proto: true }, {
- flatMap: function flatMap(callbackfn /* , thisArg */) {
- var O = toObject(this);
- var sourceLen = toLength(O.length);
- var A;
- aFunction$1(callbackfn);
- A = arraySpeciesCreate(O, 0);
- A.length = flattenIntoArray_1(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- return A;
- }
-});
-var $forEach$1 = arrayIteration.forEach;
+var returnThis$1 = function () { return this; };
-var STRICT_METHOD$1 = arrayMethodIsStrict('forEach');
-var USES_TO_LENGTH$4 = arrayMethodUsesToLength('forEach');
-
-// `Array.prototype.forEach` method implementation
-// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
-var arrayForEach = (!STRICT_METHOD$1 || !USES_TO_LENGTH$4) ? function forEach(callbackfn /* , thisArg */) {
- return $forEach$1(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
-} : [].forEach;
+var createIteratorConstructor = function (IteratorConstructor, NAME, next) {
+ var TO_STRING_TAG = NAME + ' Iterator';
+ IteratorConstructor.prototype = objectCreate(IteratorPrototype$1, { next: createPropertyDescriptor(1, next) });
+ setToStringTag(IteratorConstructor, TO_STRING_TAG, false);
+ iterators[TO_STRING_TAG] = returnThis$1;
+ return IteratorConstructor;
+};
-// `Array.prototype.forEach` method
-// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
-_export({ target: 'Array', proto: true, forced: [].forEach != arrayForEach }, {
- forEach: arrayForEach
-});
+var IteratorPrototype$2 = iteratorsCore.IteratorPrototype;
+var BUGGY_SAFARI_ITERATORS$1 = iteratorsCore.BUGGY_SAFARI_ITERATORS;
+var ITERATOR$4 = wellKnownSymbol('iterator');
+var KEYS = 'keys';
+var VALUES = 'values';
+var ENTRIES = 'entries';
-var $includes = arrayIncludes.includes;
+var returnThis$2 = function () { return this; };
+var defineIterator = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
+ createIteratorConstructor(IteratorConstructor, NAME, next);
+ var getIterationMethod = function (KIND) {
+ if (KIND === DEFAULT && defaultIterator) return defaultIterator;
+ if (!BUGGY_SAFARI_ITERATORS$1 && KIND in IterablePrototype) return IterablePrototype[KIND];
+ switch (KIND) {
+ case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
+ case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
+ case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
+ } return function () { return new IteratorConstructor(this); };
+ };
-var USES_TO_LENGTH$5 = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });
+ var TO_STRING_TAG = NAME + ' Iterator';
+ var INCORRECT_VALUES_NAME = false;
+ var IterablePrototype = Iterable.prototype;
+ var nativeIterator = IterablePrototype[ITERATOR$4]
+ || IterablePrototype['@@iterator']
+ || DEFAULT && IterablePrototype[DEFAULT];
+ var defaultIterator = !BUGGY_SAFARI_ITERATORS$1 && nativeIterator || getIterationMethod(DEFAULT);
+ var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
+ var CurrentIteratorPrototype, methods, KEY;
-// `Array.prototype.includes` method
-// https://tc39.github.io/ecma262/#sec-array.prototype.includes
-_export({ target: 'Array', proto: true, forced: !USES_TO_LENGTH$5 }, {
- includes: function includes(el /* , fromIndex = 0 */) {
- return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
+ // fix native
+ if (anyNativeIterator) {
+ CurrentIteratorPrototype = objectGetPrototypeOf(anyNativeIterator.call(new Iterable()));
+ if (IteratorPrototype$2 !== Object.prototype && CurrentIteratorPrototype.next) {
+ if ( objectGetPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype$2) {
+ if (objectSetPrototypeOf) {
+ objectSetPrototypeOf(CurrentIteratorPrototype, IteratorPrototype$2);
+ } else if (typeof CurrentIteratorPrototype[ITERATOR$4] != 'function') {
+ createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR$4, returnThis$2);
+ }
+ }
+ // Set @@toStringTag to native iterators
+ setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true);
+ }
}
-});
-// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
-addToUnscopables('includes');
-
-var $indexOf = arrayIncludes.indexOf;
+ // fix Array#{values, @@iterator}.name in V8 / FF
+ if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
+ INCORRECT_VALUES_NAME = true;
+ defaultIterator = function values() { return nativeIterator.call(this); };
+ }
+ // define iterator
+ if ( IterablePrototype[ITERATOR$4] !== defaultIterator) {
+ createNonEnumerableProperty(IterablePrototype, ITERATOR$4, defaultIterator);
+ }
+ iterators[NAME] = defaultIterator;
+ // export additional methods
+ if (DEFAULT) {
+ methods = {
+ values: getIterationMethod(VALUES),
+ keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
+ entries: getIterationMethod(ENTRIES)
+ };
+ if (FORCED) for (KEY in methods) {
+ if (BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
+ redefine(IterablePrototype, KEY, methods[KEY]);
+ }
+ } else _export({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME }, methods);
+ }
-var nativeIndexOf = [].indexOf;
+ return methods;
+};
-var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;
-var STRICT_METHOD$2 = arrayMethodIsStrict('indexOf');
-var USES_TO_LENGTH$6 = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });
+var ARRAY_ITERATOR = 'Array Iterator';
+var setInternalState$2 = internalState.set;
+var getInternalState$2 = internalState.getterFor(ARRAY_ITERATOR);
-// `Array.prototype.indexOf` method
-// https://tc39.github.io/ecma262/#sec-array.prototype.indexof
-_export({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD$2 || !USES_TO_LENGTH$6 }, {
- indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
- return NEGATIVE_ZERO
- // convert -0 to +0
- ? nativeIndexOf.apply(this, arguments) || 0
- : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);
+// `Array.prototype.entries` method
+// https://tc39.es/ecma262/#sec-array.prototype.entries
+// `Array.prototype.keys` method
+// https://tc39.es/ecma262/#sec-array.prototype.keys
+// `Array.prototype.values` method
+// https://tc39.es/ecma262/#sec-array.prototype.values
+// `Array.prototype[@@iterator]` method
+// https://tc39.es/ecma262/#sec-array.prototype-@@iterator
+// `CreateArrayIterator` internal method
+// https://tc39.es/ecma262/#sec-createarrayiterator
+var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
+ setInternalState$2(this, {
+ type: ARRAY_ITERATOR,
+ target: toIndexedObject(iterated), // target
+ index: 0, // next index
+ kind: kind // kind
+ });
+// `%ArrayIteratorPrototype%.next` method
+// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
+}, function () {
+ var state = getInternalState$2(this);
+ var target = state.target;
+ var kind = state.kind;
+ var index = state.index++;
+ if (!target || index >= target.length) {
+ state.target = undefined;
+ return { value: undefined, done: true };
}
-});
+ if (kind == 'keys') return { value: index, done: false };
+ if (kind == 'values') return { value: target[index], done: false };
+ return { value: [index, target[index]], done: false };
+}, 'values');
-var nativeJoin = [].join;
+// argumentsList[@@iterator] is %ArrayProto_values%
+// https://tc39.es/ecma262/#sec-createunmappedargumentsobject
+// https://tc39.es/ecma262/#sec-createmappedargumentsobject
+iterators.Arguments = iterators.Array;
-var ES3_STRINGS = indexedObject != Object;
-var STRICT_METHOD$3 = arrayMethodIsStrict('join', ',');
+// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
+addToUnscopables('keys');
+addToUnscopables('values');
+addToUnscopables('entries');
-// `Array.prototype.join` method
-// https://tc39.github.io/ecma262/#sec-array.prototype.join
-_export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$3 }, {
- join: function join(separator) {
- return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
- }
-});
+var slice$1 = [].slice;
+var factories = {};
-var min$3 = Math.min;
-var nativeLastIndexOf = [].lastIndexOf;
-var NEGATIVE_ZERO$1 = !!nativeLastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;
-var STRICT_METHOD$4 = arrayMethodIsStrict('lastIndexOf');
-// For preventing possible almost infinite loop in non-standard implementations, test the forward version of the method
-var USES_TO_LENGTH$7 = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });
-var FORCED$3 = NEGATIVE_ZERO$1 || !STRICT_METHOD$4 || !USES_TO_LENGTH$7;
+var construct = function (C, argsLength, args) {
+ if (!(argsLength in factories)) {
+ for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']';
+ // eslint-disable-next-line no-new-func
+ factories[argsLength] = Function('C,a', 'return new C(' + list.join(',') + ')');
+ } return factories[argsLength](C, args);
+};
-// `Array.prototype.lastIndexOf` method implementation
-// https://tc39.github.io/ecma262/#sec-array.prototype.lastindexof
-var arrayLastIndexOf = FORCED$3 ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
- // convert -0 to +0
- if (NEGATIVE_ZERO$1) return nativeLastIndexOf.apply(this, arguments) || 0;
- var O = toIndexedObject(this);
- var length = toLength(O.length);
- var index = length - 1;
- if (arguments.length > 1) index = min$3(index, toInteger(arguments[1]));
- if (index < 0) index = length + index;
- for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;
- return -1;
-} : nativeLastIndexOf;
+// `Function.prototype.bind` method implementation
+// https://tc39.es/ecma262/#sec-function.prototype.bind
+var functionBind = Function.bind || function bind(that /* , ...args */) {
+ var fn = aFunction$1(this);
+ var partArgs = slice$1.call(arguments, 1);
+ var boundFunction = function bound(/* args... */) {
+ var args = partArgs.concat(slice$1.call(arguments));
+ return this instanceof boundFunction ? construct(fn, args.length, args) : fn.apply(that, args);
+ };
+ if (isObject(fn.prototype)) boundFunction.prototype = fn.prototype;
+ return boundFunction;
+};
-// `Array.prototype.lastIndexOf` method
-// https://tc39.github.io/ecma262/#sec-array.prototype.lastindexof
-_export({ target: 'Array', proto: true, forced: arrayLastIndexOf !== [].lastIndexOf }, {
- lastIndexOf: arrayLastIndexOf
+// `Function.prototype.bind` method
+// https://tc39.es/ecma262/#sec-function.prototype.bind
+_export({ target: 'Function', proto: true }, {
+ bind: functionBind
});
-var $map = arrayIteration.map;
-
-
+var HAS_INSTANCE = wellKnownSymbol('hasInstance');
+var FunctionPrototype$1 = Function.prototype;
-var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('map');
-// FF49- issue
-var USES_TO_LENGTH$8 = arrayMethodUsesToLength('map');
+// `Function.prototype[@@hasInstance]` method
+// https://tc39.es/ecma262/#sec-function.prototype-@@hasinstance
+if (!(HAS_INSTANCE in FunctionPrototype$1)) {
+ objectDefineProperty.f(FunctionPrototype$1, HAS_INSTANCE, { value: function (O) {
+ if (typeof this != 'function' || !isObject(O)) return false;
+ if (!isObject(this.prototype)) return O instanceof this;
+ // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:
+ while (O = objectGetPrototypeOf(O)) if (this.prototype === O) return true;
+ return false;
+ } });
+}
-// `Array.prototype.map` method
-// https://tc39.github.io/ecma262/#sec-array.prototype.map
-// with adding support of @@species
-_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 || !USES_TO_LENGTH$8 }, {
- map: function map(callbackfn /* , thisArg */) {
- return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- }
+// `globalThis` object
+// https://tc39.es/ecma262/#sec-globalthis
+_export({ global: true }, {
+ globalThis: global_1
});
-// `Array.prototype.{ reduce, reduceRight }` methods implementation
-var createMethod$3 = function (IS_RIGHT) {
- return function (that, callbackfn, argumentsLength, memo) {
- aFunction$1(callbackfn);
- var O = toObject(that);
- var self = indexedObject(O);
- var length = toLength(O.length);
- var index = IS_RIGHT ? length - 1 : 0;
- var i = IS_RIGHT ? -1 : 1;
- if (argumentsLength < 2) while (true) {
- if (index in self) {
- memo = self[index];
- index += i;
- break;
- }
- index += i;
- if (IS_RIGHT ? index < 0 : length <= index) {
- throw TypeError('Reduce of empty array with no initial value');
- }
- }
- for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
- memo = callbackfn(memo, self[index], index, O);
- }
- return memo;
- };
-};
-
-var arrayReduce = {
- // `Array.prototype.reduce` method
- // https://tc39.github.io/ecma262/#sec-array.prototype.reduce
- left: createMethod$3(false),
- // `Array.prototype.reduceRight` method
- // https://tc39.github.io/ecma262/#sec-array.prototype.reduceright
- right: createMethod$3(true)
-};
+var nativeAssign = Object.assign;
+var defineProperty$5 = Object.defineProperty;
-var $reduce = arrayReduce.left;
+// `Object.assign` method
+// https://tc39.es/ecma262/#sec-object.assign
+var objectAssign = !nativeAssign || fails(function () {
+ // should have correct order of operations (Edge bug)
+ if (descriptors && nativeAssign({ b: 1 }, nativeAssign(defineProperty$5({}, 'a', {
+ enumerable: true,
+ get: function () {
+ defineProperty$5(this, 'b', {
+ value: 3,
+ enumerable: false
+ });
+ }
+ }), { b: 2 })).b !== 1) return true;
+ // should work with symbols and should have deterministic property order (V8 bug)
+ var A = {};
+ var B = {};
+ // eslint-disable-next-line no-undef
+ var symbol = Symbol();
+ var alphabet = 'abcdefghijklmnopqrst';
+ A[symbol] = 7;
+ alphabet.split('').forEach(function (chr) { B[chr] = chr; });
+ return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;
+}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
+ var T = toObject(target);
+ var argumentsLength = arguments.length;
+ var index = 1;
+ var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
+ var propertyIsEnumerable = objectPropertyIsEnumerable.f;
+ while (argumentsLength > index) {
+ var S = indexedObject(arguments[index++]);
+ var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
+ var length = keys.length;
+ var j = 0;
+ var key;
+ while (length > j) {
+ key = keys[j++];
+ if (!descriptors || propertyIsEnumerable.call(S, key)) T[key] = S[key];
+ }
+ } return T;
+} : nativeAssign;
+// `Object.assign` method
+// https://tc39.es/ecma262/#sec-object.assign
+_export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, {
+ assign: objectAssign
+});
+// `Object.create` method
+// https://tc39.es/ecma262/#sec-object.create
+_export({ target: 'Object', stat: true, sham: !descriptors }, {
+ create: objectCreate
+});
-var STRICT_METHOD$5 = arrayMethodIsStrict('reduce');
-var USES_TO_LENGTH$9 = arrayMethodUsesToLength('reduce', { 1: 0 });
+// `Object.defineProperty` method
+// https://tc39.es/ecma262/#sec-object.defineproperty
+_export({ target: 'Object', stat: true, forced: !descriptors, sham: !descriptors }, {
+ defineProperty: objectDefineProperty.f
+});
-// `Array.prototype.reduce` method
-// https://tc39.github.io/ecma262/#sec-array.prototype.reduce
-_export({ target: 'Array', proto: true, forced: !STRICT_METHOD$5 || !USES_TO_LENGTH$9 }, {
- reduce: function reduce(callbackfn /* , initialValue */) {
- return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
- }
+// `Object.defineProperties` method
+// https://tc39.es/ecma262/#sec-object.defineproperties
+_export({ target: 'Object', stat: true, forced: !descriptors, sham: !descriptors }, {
+ defineProperties: objectDefineProperties
});
-var $reduceRight = arrayReduce.right;
+var propertyIsEnumerable = objectPropertyIsEnumerable.f;
+// `Object.{ entries, values }` methods implementation
+var createMethod$3 = function (TO_ENTRIES) {
+ return function (it) {
+ var O = toIndexedObject(it);
+ var keys = objectKeys(O);
+ var length = keys.length;
+ var i = 0;
+ var result = [];
+ var key;
+ while (length > i) {
+ key = keys[i++];
+ if (!descriptors || propertyIsEnumerable.call(O, key)) {
+ result.push(TO_ENTRIES ? [key, O[key]] : O[key]);
+ }
+ }
+ return result;
+ };
+};
+var objectToArray = {
+ // `Object.entries` method
+ // https://tc39.es/ecma262/#sec-object.entries
+ entries: createMethod$3(true),
+ // `Object.values` method
+ // https://tc39.es/ecma262/#sec-object.values
+ values: createMethod$3(false)
+};
-var STRICT_METHOD$6 = arrayMethodIsStrict('reduceRight');
-// For preventing possible almost infinite loop in non-standard implementations, test the forward version of the method
-var USES_TO_LENGTH$a = arrayMethodUsesToLength('reduce', { 1: 0 });
+var $entries = objectToArray.entries;
-// `Array.prototype.reduceRight` method
-// https://tc39.github.io/ecma262/#sec-array.prototype.reduceright
-_export({ target: 'Array', proto: true, forced: !STRICT_METHOD$6 || !USES_TO_LENGTH$a }, {
- reduceRight: function reduceRight(callbackfn /* , initialValue */) {
- return $reduceRight(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
+// `Object.entries` method
+// https://tc39.es/ecma262/#sec-object.entries
+_export({ target: 'Object', stat: true }, {
+ entries: function entries(O) {
+ return $entries(O);
}
});
-var nativeReverse = [].reverse;
-var test$1 = [1, 2];
-
-// `Array.prototype.reverse` method
-// https://tc39.github.io/ecma262/#sec-array.prototype.reverse
-// fix for Safari 12.0 bug
-// https://bugs.webkit.org/show_bug.cgi?id=188794
-_export({ target: 'Array', proto: true, forced: String(test$1) === String(test$1.reverse()) }, {
- reverse: function reverse() {
- // eslint-disable-next-line no-self-assign
- if (isArray(this)) this.length = this.length;
- return nativeReverse.call(this);
- }
+var freezing = !fails(function () {
+ return Object.isExtensible(Object.preventExtensions({}));
});
-var HAS_SPECIES_SUPPORT$2 = arrayMethodHasSpeciesSupport('slice');
-var USES_TO_LENGTH$b = arrayMethodUsesToLength('slice', { ACCESSORS: true, 0: 0, 1: 2 });
+var internalMetadata = createCommonjsModule(function (module) {
+var defineProperty = objectDefineProperty.f;
-var SPECIES$5 = wellKnownSymbol('species');
-var nativeSlice = [].slice;
-var max$1 = Math.max;
-// `Array.prototype.slice` method
-// https://tc39.github.io/ecma262/#sec-array.prototype.slice
-// fallback for not array-like ES3 strings and DOM objects
-_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$2 || !USES_TO_LENGTH$b }, {
- slice: function slice(start, end) {
- var O = toIndexedObject(this);
- var length = toLength(O.length);
- var k = toAbsoluteIndex(start, length);
- var fin = toAbsoluteIndex(end === undefined ? length : end, length);
- // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
- var Constructor, result, n;
- if (isArray(O)) {
- Constructor = O.constructor;
- // cross-realm fallback
- if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {
- Constructor = undefined;
- } else if (isObject(Constructor)) {
- Constructor = Constructor[SPECIES$5];
- if (Constructor === null) Constructor = undefined;
- }
- if (Constructor === Array || Constructor === undefined) {
- return nativeSlice.call(O, k, fin);
- }
- }
- result = new (Constructor === undefined ? Array : Constructor)(max$1(fin - k, 0));
- for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
- result.length = n;
- return result;
- }
-});
-var $some = arrayIteration.some;
+var METADATA = uid('meta');
+var id = 0;
+var isExtensible = Object.isExtensible || function () {
+ return true;
+};
+var setMetadata = function (it) {
+ defineProperty(it, METADATA, { value: {
+ objectID: 'O' + ++id, // object ID
+ weakData: {} // weak collections IDs
+ } });
+};
-var STRICT_METHOD$7 = arrayMethodIsStrict('some');
-var USES_TO_LENGTH$c = arrayMethodUsesToLength('some');
+var fastKey = function (it, create) {
+ // return a primitive with prefix
+ if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
+ if (!has(it, METADATA)) {
+ // can't set metadata to uncaught frozen object
+ if (!isExtensible(it)) return 'F';
+ // not necessary to add metadata
+ if (!create) return 'E';
+ // add missing metadata
+ setMetadata(it);
+ // return object ID
+ } return it[METADATA].objectID;
+};
-// `Array.prototype.some` method
-// https://tc39.github.io/ecma262/#sec-array.prototype.some
-_export({ target: 'Array', proto: true, forced: !STRICT_METHOD$7 || !USES_TO_LENGTH$c }, {
- some: function some(callbackfn /* , thisArg */) {
- return $some(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- }
-});
+var getWeakData = function (it, create) {
+ if (!has(it, METADATA)) {
+ // can't set metadata to uncaught frozen object
+ if (!isExtensible(it)) return true;
+ // not necessary to add metadata
+ if (!create) return false;
+ // add missing metadata
+ setMetadata(it);
+ // return the store of weak collections IDs
+ } return it[METADATA].weakData;
+};
-var test$2 = [];
-var nativeSort = test$2.sort;
+// add metadata on freeze-family methods calling
+var onFreeze = function (it) {
+ if (freezing && meta.REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it);
+ return it;
+};
-// IE8-
-var FAILS_ON_UNDEFINED = fails(function () {
- test$2.sort(undefined);
-});
-// V8 bug
-var FAILS_ON_NULL = fails(function () {
- test$2.sort(null);
+var meta = module.exports = {
+ REQUIRED: false,
+ fastKey: fastKey,
+ getWeakData: getWeakData,
+ onFreeze: onFreeze
+};
+
+hiddenKeys[METADATA] = true;
});
-// Old WebKit
-var STRICT_METHOD$8 = arrayMethodIsStrict('sort');
-var FORCED$4 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD$8;
+var onFreeze = internalMetadata.onFreeze;
-// `Array.prototype.sort` method
-// https://tc39.github.io/ecma262/#sec-array.prototype.sort
-_export({ target: 'Array', proto: true, forced: FORCED$4 }, {
- sort: function sort(comparefn) {
- return comparefn === undefined
- ? nativeSort.call(toObject(this))
- : nativeSort.call(toObject(this), aFunction$1(comparefn));
+var nativeFreeze = Object.freeze;
+var FAILS_ON_PRIMITIVES = fails(function () { nativeFreeze(1); });
+
+// `Object.freeze` method
+// https://tc39.es/ecma262/#sec-object.freeze
+_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !freezing }, {
+ freeze: function freeze(it) {
+ return nativeFreeze && isObject(it) ? nativeFreeze(onFreeze(it)) : it;
}
});
-var HAS_SPECIES_SUPPORT$3 = arrayMethodHasSpeciesSupport('splice');
-var USES_TO_LENGTH$d = arrayMethodUsesToLength('splice', { ACCESSORS: true, 0: 0, 1: 2 });
-
-var max$2 = Math.max;
-var min$4 = Math.min;
-var MAX_SAFE_INTEGER$1 = 0x1FFFFFFFFFFFFF;
-var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';
+// `Object.fromEntries` method
+// https://github.com/tc39/proposal-object-from-entries
+_export({ target: 'Object', stat: true }, {
+ fromEntries: function fromEntries(iterable) {
+ var obj = {};
+ iterate(iterable, function (k, v) {
+ createProperty(obj, k, v);
+ }, { AS_ENTRIES: true });
+ return obj;
+ }
+});
-// `Array.prototype.splice` method
-// https://tc39.github.io/ecma262/#sec-array.prototype.splice
-// with adding support of @@species
-_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$3 || !USES_TO_LENGTH$d }, {
- splice: function splice(start, deleteCount /* , ...items */) {
- var O = toObject(this);
- var len = toLength(O.length);
- var actualStart = toAbsoluteIndex(start, len);
- var argumentsLength = arguments.length;
- var insertCount, actualDeleteCount, A, k, from, to;
- if (argumentsLength === 0) {
- insertCount = actualDeleteCount = 0;
- } else if (argumentsLength === 1) {
- insertCount = 0;
- actualDeleteCount = len - actualStart;
- } else {
- insertCount = argumentsLength - 2;
- actualDeleteCount = min$4(max$2(toInteger(deleteCount), 0), len - actualStart);
- }
- if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER$1) {
- throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);
- }
- A = arraySpeciesCreate(O, actualDeleteCount);
- for (k = 0; k < actualDeleteCount; k++) {
- from = actualStart + k;
- if (from in O) createProperty(A, k, O[from]);
- }
- A.length = actualDeleteCount;
- if (insertCount < actualDeleteCount) {
- for (k = actualStart; k < len - actualDeleteCount; k++) {
- from = k + actualDeleteCount;
- to = k + insertCount;
- if (from in O) O[to] = O[from];
- else delete O[to];
- }
- for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];
- } else if (insertCount > actualDeleteCount) {
- for (k = len - actualDeleteCount; k > actualStart; k--) {
- from = k + actualDeleteCount - 1;
- to = k + insertCount - 1;
- if (from in O) O[to] = O[from];
- else delete O[to];
- }
- }
- for (k = 0; k < insertCount; k++) {
- O[k + actualStart] = arguments[k + 2];
+var nativeGetOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
+
+
+var FAILS_ON_PRIMITIVES$1 = fails(function () { nativeGetOwnPropertyDescriptor$2(1); });
+var FORCED$4 = !descriptors || FAILS_ON_PRIMITIVES$1;
+
+// `Object.getOwnPropertyDescriptor` method
+// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
+_export({ target: 'Object', stat: true, forced: FORCED$4, sham: !descriptors }, {
+ getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
+ return nativeGetOwnPropertyDescriptor$2(toIndexedObject(it), key);
+ }
+});
+
+// `Object.getOwnPropertyDescriptors` method
+// https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
+_export({ target: 'Object', stat: true, sham: !descriptors }, {
+ getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
+ var O = toIndexedObject(object);
+ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
+ var keys = ownKeys(O);
+ var result = {};
+ var index = 0;
+ var key, descriptor;
+ while (keys.length > index) {
+ descriptor = getOwnPropertyDescriptor(O, key = keys[index++]);
+ if (descriptor !== undefined) createProperty(result, key, descriptor);
}
- O.length = len - actualDeleteCount + insertCount;
- return A;
+ return result;
}
});
-// `Array[@@species]` getter
-// https://tc39.github.io/ecma262/#sec-get-array-@@species
-setSpecies('Array');
+var nativeGetOwnPropertyNames$2 = objectGetOwnPropertyNamesExternal.f;
-// this method was added to unscopables after implementation
-// in popular engines, so it's moved to a separate module
+var FAILS_ON_PRIMITIVES$2 = fails(function () { return !Object.getOwnPropertyNames(1); });
+// `Object.getOwnPropertyNames` method
+// https://tc39.es/ecma262/#sec-object.getownpropertynames
+_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$2 }, {
+ getOwnPropertyNames: nativeGetOwnPropertyNames$2
+});
-addToUnscopables('flat');
+var FAILS_ON_PRIMITIVES$3 = fails(function () { objectGetPrototypeOf(1); });
-// this method was added to unscopables after implementation
-// in popular engines, so it's moved to a separate module
+// `Object.getPrototypeOf` method
+// https://tc39.es/ecma262/#sec-object.getprototypeof
+_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$3, sham: !correctPrototypeGetter }, {
+ getPrototypeOf: function getPrototypeOf(it) {
+ return objectGetPrototypeOf(toObject(it));
+ }
+});
+// `SameValue` abstract operation
+// https://tc39.es/ecma262/#sec-samevalue
+var sameValue = Object.is || function is(x, y) {
+ // eslint-disable-next-line no-self-compare
+ return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
+};
-addToUnscopables('flatMap');
+// `Object.is` method
+// https://tc39.es/ecma262/#sec-object.is
+_export({ target: 'Object', stat: true }, {
+ is: sameValue
+});
-var ITERATOR$3 = wellKnownSymbol('iterator');
-var BUGGY_SAFARI_ITERATORS = false;
+var nativeIsExtensible = Object.isExtensible;
+var FAILS_ON_PRIMITIVES$4 = fails(function () { nativeIsExtensible(1); });
-var returnThis = function () { return this; };
+// `Object.isExtensible` method
+// https://tc39.es/ecma262/#sec-object.isextensible
+_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$4 }, {
+ isExtensible: function isExtensible(it) {
+ return isObject(it) ? nativeIsExtensible ? nativeIsExtensible(it) : true : false;
+ }
+});
-// `%IteratorPrototype%` object
-// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object
-var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
+var nativeIsFrozen = Object.isFrozen;
+var FAILS_ON_PRIMITIVES$5 = fails(function () { nativeIsFrozen(1); });
-if ([].keys) {
- arrayIterator = [].keys();
- // Safari 8 has buggy iterators w/o `next`
- if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
- else {
- PrototypeOfArrayIteratorPrototype = objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator));
- if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
+// `Object.isFrozen` method
+// https://tc39.es/ecma262/#sec-object.isfrozen
+_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$5 }, {
+ isFrozen: function isFrozen(it) {
+ return isObject(it) ? nativeIsFrozen ? nativeIsFrozen(it) : false : true;
}
-}
+});
-if (IteratorPrototype == undefined) IteratorPrototype = {};
+var nativeIsSealed = Object.isSealed;
+var FAILS_ON_PRIMITIVES$6 = fails(function () { nativeIsSealed(1); });
-// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
-if ( !has(IteratorPrototype, ITERATOR$3)) {
- createNonEnumerableProperty(IteratorPrototype, ITERATOR$3, returnThis);
-}
+// `Object.isSealed` method
+// https://tc39.es/ecma262/#sec-object.issealed
+_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$6 }, {
+ isSealed: function isSealed(it) {
+ return isObject(it) ? nativeIsSealed ? nativeIsSealed(it) : false : true;
+ }
+});
-var iteratorsCore = {
- IteratorPrototype: IteratorPrototype,
- BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
-};
+var FAILS_ON_PRIMITIVES$7 = fails(function () { objectKeys(1); });
-var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
+// `Object.keys` method
+// https://tc39.es/ecma262/#sec-object.keys
+_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$7 }, {
+ keys: function keys(it) {
+ return objectKeys(toObject(it));
+ }
+});
+var onFreeze$1 = internalMetadata.onFreeze;
+var nativePreventExtensions = Object.preventExtensions;
+var FAILS_ON_PRIMITIVES$8 = fails(function () { nativePreventExtensions(1); });
-var returnThis$1 = function () { return this; };
+// `Object.preventExtensions` method
+// https://tc39.es/ecma262/#sec-object.preventextensions
+_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$8, sham: !freezing }, {
+ preventExtensions: function preventExtensions(it) {
+ return nativePreventExtensions && isObject(it) ? nativePreventExtensions(onFreeze$1(it)) : it;
+ }
+});
-var createIteratorConstructor = function (IteratorConstructor, NAME, next) {
- var TO_STRING_TAG = NAME + ' Iterator';
- IteratorConstructor.prototype = objectCreate(IteratorPrototype$1, { next: createPropertyDescriptor(1, next) });
- setToStringTag(IteratorConstructor, TO_STRING_TAG, false);
- iterators[TO_STRING_TAG] = returnThis$1;
- return IteratorConstructor;
-};
+var onFreeze$2 = internalMetadata.onFreeze;
-var IteratorPrototype$2 = iteratorsCore.IteratorPrototype;
-var BUGGY_SAFARI_ITERATORS$1 = iteratorsCore.BUGGY_SAFARI_ITERATORS;
-var ITERATOR$4 = wellKnownSymbol('iterator');
-var KEYS = 'keys';
-var VALUES = 'values';
-var ENTRIES = 'entries';
-var returnThis$2 = function () { return this; };
-var defineIterator = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
- createIteratorConstructor(IteratorConstructor, NAME, next);
+var nativeSeal = Object.seal;
+var FAILS_ON_PRIMITIVES$9 = fails(function () { nativeSeal(1); });
- var getIterationMethod = function (KIND) {
- if (KIND === DEFAULT && defaultIterator) return defaultIterator;
- if (!BUGGY_SAFARI_ITERATORS$1 && KIND in IterablePrototype) return IterablePrototype[KIND];
- switch (KIND) {
- case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
- case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
- case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
- } return function () { return new IteratorConstructor(this); };
- };
+// `Object.seal` method
+// https://tc39.es/ecma262/#sec-object.seal
+_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$9, sham: !freezing }, {
+ seal: function seal(it) {
+ return nativeSeal && isObject(it) ? nativeSeal(onFreeze$2(it)) : it;
+ }
+});
- var TO_STRING_TAG = NAME + ' Iterator';
- var INCORRECT_VALUES_NAME = false;
- var IterablePrototype = Iterable.prototype;
- var nativeIterator = IterablePrototype[ITERATOR$4]
- || IterablePrototype['@@iterator']
- || DEFAULT && IterablePrototype[DEFAULT];
- var defaultIterator = !BUGGY_SAFARI_ITERATORS$1 && nativeIterator || getIterationMethod(DEFAULT);
- var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
- var CurrentIteratorPrototype, methods, KEY;
+// `Object.setPrototypeOf` method
+// https://tc39.es/ecma262/#sec-object.setprototypeof
+_export({ target: 'Object', stat: true }, {
+ setPrototypeOf: objectSetPrototypeOf
+});
- // fix native
- if (anyNativeIterator) {
- CurrentIteratorPrototype = objectGetPrototypeOf(anyNativeIterator.call(new Iterable()));
- if (IteratorPrototype$2 !== Object.prototype && CurrentIteratorPrototype.next) {
- if ( objectGetPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype$2) {
- if (objectSetPrototypeOf) {
- objectSetPrototypeOf(CurrentIteratorPrototype, IteratorPrototype$2);
- } else if (typeof CurrentIteratorPrototype[ITERATOR$4] != 'function') {
- createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR$4, returnThis$2);
- }
- }
- // Set @@toStringTag to native iterators
- setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true);
- }
- }
+var $values = objectToArray.values;
- // fix Array#{values, @@iterator}.name in V8 / FF
- if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
- INCORRECT_VALUES_NAME = true;
- defaultIterator = function values() { return nativeIterator.call(this); };
+// `Object.values` method
+// https://tc39.es/ecma262/#sec-object.values
+_export({ target: 'Object', stat: true }, {
+ values: function values(O) {
+ return $values(O);
}
+});
- // define iterator
- if ( IterablePrototype[ITERATOR$4] !== defaultIterator) {
- createNonEnumerableProperty(IterablePrototype, ITERATOR$4, defaultIterator);
- }
- iterators[NAME] = defaultIterator;
+// Forced replacement object prototype accessors methods
+var objectPrototypeAccessorsForced = !fails(function () {
+ var key = Math.random();
+ // In FF throws only define methods
+ // eslint-disable-next-line no-undef, no-useless-call
+ __defineSetter__.call(null, key, function () { /* empty */ });
+ delete global_1[key];
+});
- // export additional methods
- if (DEFAULT) {
- methods = {
- values: getIterationMethod(VALUES),
- keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
- entries: getIterationMethod(ENTRIES)
- };
- if (FORCED) for (KEY in methods) {
- if (BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
- redefine(IterablePrototype, KEY, methods[KEY]);
- }
- } else _export({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME }, methods);
- }
+// `Object.prototype.__defineGetter__` method
+// https://tc39.es/ecma262/#sec-object.prototype.__defineGetter__
+if (descriptors) {
+ _export({ target: 'Object', proto: true, forced: objectPrototypeAccessorsForced }, {
+ __defineGetter__: function __defineGetter__(P, getter) {
+ objectDefineProperty.f(toObject(this), P, { get: aFunction$1(getter), enumerable: true, configurable: true });
+ }
+ });
+}
- return methods;
-};
+// `Object.prototype.__defineSetter__` method
+// https://tc39.es/ecma262/#sec-object.prototype.__defineSetter__
+if (descriptors) {
+ _export({ target: 'Object', proto: true, forced: objectPrototypeAccessorsForced }, {
+ __defineSetter__: function __defineSetter__(P, setter) {
+ objectDefineProperty.f(toObject(this), P, { set: aFunction$1(setter), enumerable: true, configurable: true });
+ }
+ });
+}
-var ARRAY_ITERATOR = 'Array Iterator';
-var setInternalState$2 = internalState.set;
-var getInternalState$2 = internalState.getterFor(ARRAY_ITERATOR);
+var getOwnPropertyDescriptor$3 = objectGetOwnPropertyDescriptor.f;
-// `Array.prototype.entries` method
-// https://tc39.github.io/ecma262/#sec-array.prototype.entries
-// `Array.prototype.keys` method
-// https://tc39.github.io/ecma262/#sec-array.prototype.keys
-// `Array.prototype.values` method
-// https://tc39.github.io/ecma262/#sec-array.prototype.values
-// `Array.prototype[@@iterator]` method
-// https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator
-// `CreateArrayIterator` internal method
-// https://tc39.github.io/ecma262/#sec-createarrayiterator
-var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
- setInternalState$2(this, {
- type: ARRAY_ITERATOR,
- target: toIndexedObject(iterated), // target
- index: 0, // next index
- kind: kind // kind
+// `Object.prototype.__lookupGetter__` method
+// https://tc39.es/ecma262/#sec-object.prototype.__lookupGetter__
+if (descriptors) {
+ _export({ target: 'Object', proto: true, forced: objectPrototypeAccessorsForced }, {
+ __lookupGetter__: function __lookupGetter__(P) {
+ var O = toObject(this);
+ var key = toPrimitive(P, true);
+ var desc;
+ do {
+ if (desc = getOwnPropertyDescriptor$3(O, key)) return desc.get;
+ } while (O = objectGetPrototypeOf(O));
+ }
});
-// `%ArrayIteratorPrototype%.next` method
-// https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next
-}, function () {
- var state = getInternalState$2(this);
- var target = state.target;
- var kind = state.kind;
- var index = state.index++;
- if (!target || index >= target.length) {
- state.target = undefined;
- return { value: undefined, done: true };
- }
- if (kind == 'keys') return { value: index, done: false };
- if (kind == 'values') return { value: target[index], done: false };
- return { value: [index, target[index]], done: false };
-}, 'values');
+}
-// argumentsList[@@iterator] is %ArrayProto_values%
-// https://tc39.github.io/ecma262/#sec-createunmappedargumentsobject
-// https://tc39.github.io/ecma262/#sec-createmappedargumentsobject
-iterators.Arguments = iterators.Array;
+var getOwnPropertyDescriptor$4 = objectGetOwnPropertyDescriptor.f;
-// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
-addToUnscopables('keys');
-addToUnscopables('values');
-addToUnscopables('entries');
+// `Object.prototype.__lookupSetter__` method
+// https://tc39.es/ecma262/#sec-object.prototype.__lookupSetter__
+if (descriptors) {
+ _export({ target: 'Object', proto: true, forced: objectPrototypeAccessorsForced }, {
+ __lookupSetter__: function __lookupSetter__(P) {
+ var O = toObject(this);
+ var key = toPrimitive(P, true);
+ var desc;
+ do {
+ if (desc = getOwnPropertyDescriptor$4(O, key)) return desc.set;
+ } while (O = objectGetPrototypeOf(O));
+ }
+ });
+}
var fromCharCode = String.fromCharCode;
var nativeFromCodePoint = String.fromCodePoint;
@@ -3837,7 +3921,7 @@ var nativeFromCodePoint = String.fromCodePoint;
var INCORRECT_LENGTH = !!nativeFromCodePoint && nativeFromCodePoint.length != 1;
// `String.fromCodePoint` method
-// https://tc39.github.io/ecma262/#sec-string.fromcodepoint
+// https://tc39.es/ecma262/#sec-string.fromcodepoint
_export({ target: 'String', stat: true, forced: INCORRECT_LENGTH }, {
fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars
var elements = [];
@@ -3856,7 +3940,7 @@ _export({ target: 'String', stat: true, forced: INCORRECT_LENGTH }, {
});
// `String.raw` method
-// https://tc39.github.io/ecma262/#sec-string.raw
+// https://tc39.es/ecma262/#sec-string.raw
_export({ target: 'String', stat: true }, {
raw: function raw(template) {
var rawTemplate = toIndexedObject(template.raw);
@@ -3889,7 +3973,7 @@ var createMethod$4 = function (CONVERT_TO_STRING) {
var stringMultibyte = {
// `String.prototype.codePointAt` method
- // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
+ // https://tc39.es/ecma262/#sec-string.prototype.codepointat
codeAt: createMethod$4(false),
// `String.prototype.at` method
// https://github.com/mathiasbynens/String.prototype.at
@@ -3899,7 +3983,7 @@ var stringMultibyte = {
var codeAt = stringMultibyte.codeAt;
// `String.prototype.codePointAt` method
-// https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
+// https://tc39.es/ecma262/#sec-string.prototype.codepointat
_export({ target: 'String', proto: true }, {
codePointAt: function codePointAt(pos) {
return codeAt(this, pos);
@@ -3909,7 +3993,7 @@ _export({ target: 'String', proto: true }, {
var MATCH = wellKnownSymbol('match');
// `IsRegExp` abstract operation
-// https://tc39.github.io/ecma262/#sec-isregexp
+// https://tc39.es/ecma262/#sec-isregexp
var isRegexp = function (it) {
var isRegExp;
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
@@ -3927,11 +4011,11 @@ var correctIsRegexpLogic = function (METHOD_NAME) {
var regexp = /./;
try {
'/./'[METHOD_NAME](regexp);
- } catch (e) {
+ } catch (error1) {
try {
regexp[MATCH$1] = false;
return '/./'[METHOD_NAME](regexp);
- } catch (f) { /* empty */ }
+ } catch (error2) { /* empty */ }
} return false;
};
@@ -3953,7 +4037,7 @@ var MDN_POLYFILL_BUG = !CORRECT_IS_REGEXP_LOGIC && !!function () {
}();
// `String.prototype.endsWith` method
-// https://tc39.github.io/ecma262/#sec-string.prototype.endswith
+// https://tc39.es/ecma262/#sec-string.prototype.endswith
_export({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
endsWith: function endsWith(searchString /* , endPosition = @length */) {
var that = String(requireObjectCoercible(this));
@@ -3969,7 +4053,7 @@ _export({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_I
});
// `String.prototype.includes` method
-// https://tc39.github.io/ecma262/#sec-string.prototype.includes
+// https://tc39.es/ecma262/#sec-string.prototype.includes
_export({ target: 'String', proto: true, forced: !correctIsRegexpLogic('includes') }, {
includes: function includes(searchString /* , position = 0 */) {
return !!~String(requireObjectCoercible(this))
@@ -3978,7 +4062,7 @@ _export({ target: 'String', proto: true, forced: !correctIsRegexpLogic('includes
});
// `RegExp.prototype.flags` getter implementation
-// https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
+// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
var regexpFlags = function () {
var that = anObject(this);
var result = '';
@@ -4100,6 +4184,8 @@ if (PATCH) {
var regexpExec = patchedExec;
+// `RegExp.prototype.exec` method
+// https://tc39.es/ecma262/#sec-regexp.prototype.exec
_export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, {
exec: regexpExec
});
@@ -4232,13 +4318,13 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, length, exec, sham) {
var charAt = stringMultibyte.charAt;
// `AdvanceStringIndex` abstract operation
-// https://tc39.github.io/ecma262/#sec-advancestringindex
+// https://tc39.es/ecma262/#sec-advancestringindex
var advanceStringIndex = function (S, index, unicode) {
return index + (unicode ? charAt(S, index).length : 1);
};
// `RegExpExec` abstract operation
-// https://tc39.github.io/ecma262/#sec-regexpexec
+// https://tc39.es/ecma262/#sec-regexpexec
var regexpExecAbstract = function (R, S) {
var exec = R.exec;
if (typeof exec === 'function') {
@@ -4260,14 +4346,14 @@ var regexpExecAbstract = function (R, S) {
fixRegexpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {
return [
// `String.prototype.match` method
- // https://tc39.github.io/ecma262/#sec-string.prototype.match
+ // https://tc39.es/ecma262/#sec-string.prototype.match
function match(regexp) {
var O = requireObjectCoercible(this);
var matcher = regexp == undefined ? undefined : regexp[MATCH];
return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
},
// `RegExp.prototype[@@match]` method
- // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match
+ // https://tc39.es/ecma262/#sec-regexp.prototype-@@match
function (regexp) {
var res = maybeCallNative(nativeMatch, regexp, this);
if (res.done) return res.value;
@@ -4359,7 +4445,7 @@ var $matchAll = function (string) {
};
// `String.prototype.matchAll` method
-// https://github.com/tc39/proposal-string-matchall
+// https://tc39.es/ecma262/#sec-string.prototype.matchall
_export({ target: 'String', proto: true, forced: WORKS_WITH_NON_GLOBAL_REGEX }, {
matchAll: function matchAll(regexp) {
var O = requireObjectCoercible(this);
@@ -4386,7 +4472,7 @@ _export({ target: 'String', proto: true, forced: WORKS_WITH_NON_GLOBAL_REGEX },
MATCH_ALL in RegExpPrototype || createNonEnumerableProperty(RegExpPrototype, MATCH_ALL, $matchAll);
// `String.prototype.repeat` method implementation
-// https://tc39.github.io/ecma262/#sec-string.prototype.repeat
+// https://tc39.es/ecma262/#sec-string.prototype.repeat
var stringRepeat = ''.repeat || function repeat(count) {
var str = String(requireObjectCoercible(this));
var result = '';
@@ -4421,10 +4507,10 @@ var createMethod$5 = function (IS_END) {
var stringPad = {
// `String.prototype.padStart` method
- // https://tc39.github.io/ecma262/#sec-string.prototype.padstart
+ // https://tc39.es/ecma262/#sec-string.prototype.padstart
start: createMethod$5(false),
// `String.prototype.padEnd` method
- // https://tc39.github.io/ecma262/#sec-string.prototype.padend
+ // https://tc39.es/ecma262/#sec-string.prototype.padend
end: createMethod$5(true)
};
@@ -4438,7 +4524,7 @@ var $padEnd = stringPad.end;
// `String.prototype.padEnd` method
-// https://tc39.github.io/ecma262/#sec-string.prototype.padend
+// https://tc39.es/ecma262/#sec-string.prototype.padend
_export({ target: 'String', proto: true, forced: stringPadWebkitBug }, {
padEnd: function padEnd(maxLength /* , fillString = ' ' */) {
return $padEnd(this, maxLength, arguments.length > 1 ? arguments[1] : undefined);
@@ -4449,7 +4535,7 @@ var $padStart = stringPad.start;
// `String.prototype.padStart` method
-// https://tc39.github.io/ecma262/#sec-string.prototype.padstart
+// https://tc39.es/ecma262/#sec-string.prototype.padstart
_export({ target: 'String', proto: true, forced: stringPadWebkitBug }, {
padStart: function padStart(maxLength /* , fillString = ' ' */) {
return $padStart(this, maxLength, arguments.length > 1 ? arguments[1] : undefined);
@@ -4457,17 +4543,53 @@ _export({ target: 'String', proto: true, forced: stringPadWebkitBug }, {
});
// `String.prototype.repeat` method
-// https://tc39.github.io/ecma262/#sec-string.prototype.repeat
+// https://tc39.es/ecma262/#sec-string.prototype.repeat
_export({ target: 'String', proto: true }, {
repeat: stringRepeat
});
-var max$3 = Math.max;
-var min$6 = Math.min;
var floor$1 = Math.floor;
+var replace = ''.replace;
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g;
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g;
+// https://tc39.es/ecma262/#sec-getsubstitution
+var getSubstitution = function (matched, str, position, captures, namedCaptures, replacement) {
+ var tailPos = position + matched.length;
+ var m = captures.length;
+ var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
+ if (namedCaptures !== undefined) {
+ namedCaptures = toObject(namedCaptures);
+ symbols = SUBSTITUTION_SYMBOLS;
+ }
+ return replace.call(replacement, symbols, function (match, ch) {
+ var capture;
+ switch (ch.charAt(0)) {
+ case '$': return '$';
+ case '&': return matched;
+ case '`': return str.slice(0, position);
+ case "'": return str.slice(tailPos);
+ case '<':
+ capture = namedCaptures[ch.slice(1, -1)];
+ break;
+ default: // \d\d?
+ var n = +ch;
+ if (n === 0) return match;
+ if (n > m) {
+ var f = floor$1(n / 10);
+ if (f === 0) return match;
+ if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
+ return match;
+ }
+ capture = captures[n - 1];
+ }
+ return capture === undefined ? '' : capture;
+ });
+};
+
+var max$3 = Math.max;
+var min$6 = Math.min;
+
var maybeToString = function (it) {
return it === undefined ? it : String(it);
};
@@ -4480,7 +4602,7 @@ fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, ma
return [
// `String.prototype.replace` method
- // https://tc39.github.io/ecma262/#sec-string.prototype.replace
+ // https://tc39.es/ecma262/#sec-string.prototype.replace
function replace(searchValue, replaceValue) {
var O = requireObjectCoercible(this);
var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
@@ -4489,7 +4611,7 @@ fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, ma
: nativeReplace.call(String(O), searchValue, replaceValue);
},
// `RegExp.prototype[@@replace]` method
- // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
+ // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
function (regexp, replaceValue) {
if (
(!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||
@@ -4552,54 +4674,20 @@ fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, ma
return accumulatedResult + S.slice(nextSourcePosition);
}
];
-
- // https://tc39.github.io/ecma262/#sec-getsubstitution
- function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
- var tailPos = position + matched.length;
- var m = captures.length;
- var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
- if (namedCaptures !== undefined) {
- namedCaptures = toObject(namedCaptures);
- symbols = SUBSTITUTION_SYMBOLS;
- }
- return nativeReplace.call(replacement, symbols, function (match, ch) {
- var capture;
- switch (ch.charAt(0)) {
- case '$': return '$';
- case '&': return matched;
- case '`': return str.slice(0, position);
- case "'": return str.slice(tailPos);
- case '<':
- capture = namedCaptures[ch.slice(1, -1)];
- break;
- default: // \d\d?
- var n = +ch;
- if (n === 0) return match;
- if (n > m) {
- var f = floor$1(n / 10);
- if (f === 0) return match;
- if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
- return match;
- }
- capture = captures[n - 1];
- }
- return capture === undefined ? '' : capture;
- });
- }
});
// @@search logic
fixRegexpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybeCallNative) {
return [
// `String.prototype.search` method
- // https://tc39.github.io/ecma262/#sec-string.prototype.search
+ // https://tc39.es/ecma262/#sec-string.prototype.search
function search(regexp) {
var O = requireObjectCoercible(this);
var searcher = regexp == undefined ? undefined : regexp[SEARCH];
return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
},
// `RegExp.prototype[@@search]` method
- // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search
+ // https://tc39.es/ecma262/#sec-regexp.prototype-@@search
function (regexp) {
var res = maybeCallNative(nativeSearch, regexp, this);
if (res.done) return res.value;
@@ -4678,7 +4766,7 @@ fixRegexpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCal
return [
// `String.prototype.split` method
- // https://tc39.github.io/ecma262/#sec-string.prototype.split
+ // https://tc39.es/ecma262/#sec-string.prototype.split
function split(separator, limit) {
var O = requireObjectCoercible(this);
var splitter = separator == undefined ? undefined : separator[SPLIT];
@@ -4687,7 +4775,7 @@ fixRegexpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCal
: internalSplit.call(String(O), separator, limit);
},
// `RegExp.prototype[@@split]` method
- // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split
+ // https://tc39.es/ecma262/#sec-regexp.prototype-@@split
//
// NOTE: This cannot be properly polyfilled in engines that don't support
// the 'y' flag.
@@ -4757,7 +4845,7 @@ var MDN_POLYFILL_BUG$1 = !CORRECT_IS_REGEXP_LOGIC$1 && !!function () {
}();
// `String.prototype.startsWith` method
-// https://tc39.github.io/ecma262/#sec-string.prototype.startswith
+// https://tc39.es/ecma262/#sec-string.prototype.startswith
_export({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG$1 && !CORRECT_IS_REGEXP_LOGIC$1 }, {
startsWith: function startsWith(searchString /* , position = 0 */) {
var that = String(requireObjectCoercible(this));
@@ -4790,13 +4878,13 @@ var createMethod$6 = function (TYPE) {
var stringTrim = {
// `String.prototype.{ trimLeft, trimStart }` methods
- // https://tc39.github.io/ecma262/#sec-string.prototype.trimstart
+ // https://tc39.es/ecma262/#sec-string.prototype.trimstart
start: createMethod$6(1),
// `String.prototype.{ trimRight, trimEnd }` methods
- // https://tc39.github.io/ecma262/#sec-string.prototype.trimend
+ // https://tc39.es/ecma262/#sec-string.prototype.trimend
end: createMethod$6(2),
// `String.prototype.trim` method
- // https://tc39.github.io/ecma262/#sec-string.prototype.trim
+ // https://tc39.es/ecma262/#sec-string.prototype.trim
trim: createMethod$6(3)
};
@@ -4814,7 +4902,7 @@ var $trim = stringTrim.trim;
// `String.prototype.trim` method
-// https://tc39.github.io/ecma262/#sec-string.prototype.trim
+// https://tc39.es/ecma262/#sec-string.prototype.trim
_export({ target: 'String', proto: true, forced: stringTrimForced('trim') }, {
trim: function trim() {
return $trim(this);
@@ -4831,7 +4919,8 @@ var trimStart = FORCED$5 ? function trimStart() {
} : ''.trimStart;
// `String.prototype.{ trimStart, trimLeft }` methods
-// https://github.com/tc39/ecmascript-string-left-right-trim
+// https://tc39.es/ecma262/#sec-string.prototype.trimstart
+// https://tc39.es/ecma262/#String.prototype.trimleft
_export({ target: 'String', proto: true, forced: FORCED$5 }, {
trimStart: trimStart,
trimLeft: trimStart
@@ -4847,7 +4936,8 @@ var trimEnd = FORCED$6 ? function trimEnd() {
} : ''.trimEnd;
// `String.prototype.{ trimEnd, trimRight }` methods
-// https://github.com/tc39/ecmascript-string-left-right-trim
+// https://tc39.es/ecma262/#sec-string.prototype.trimend
+// https://tc39.es/ecma262/#String.prototype.trimright
_export({ target: 'String', proto: true, forced: FORCED$6 }, {
trimEnd: trimEnd,
trimRight: trimEnd
@@ -4862,7 +4952,7 @@ var setInternalState$4 = internalState.set;
var getInternalState$4 = internalState.getterFor(STRING_ITERATOR);
// `String.prototype[@@iterator]` method
-// https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator
+// https://tc39.es/ecma262/#sec-string.prototype-@@iterator
defineIterator(String, 'String', function (iterated) {
setInternalState$4(this, {
type: STRING_ITERATOR,
@@ -4870,7 +4960,7 @@ defineIterator(String, 'String', function (iterated) {
index: 0
});
// `%StringIteratorPrototype%.next` method
-// https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next
+// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next
}, function next() {
var state = getInternalState$4(this);
var string = state.string;
@@ -4885,7 +4975,7 @@ defineIterator(String, 'String', function (iterated) {
var quot = /"/g;
// B.2.3.2.1 CreateHTML(string, tag, attribute, value)
-// https://tc39.github.io/ecma262/#sec-createhtml
+// https://tc39.es/ecma262/#sec-createhtml
var createHtml = function (string, tag, attribute, value) {
var S = String(requireObjectCoercible(string));
var p1 = '<' + tag;
@@ -4903,7 +4993,7 @@ var stringHtmlForced = function (METHOD_NAME) {
};
// `String.prototype.anchor` method
-// https://tc39.github.io/ecma262/#sec-string.prototype.anchor
+// https://tc39.es/ecma262/#sec-string.prototype.anchor
_export({ target: 'String', proto: true, forced: stringHtmlForced('anchor') }, {
anchor: function anchor(name) {
return createHtml(this, 'a', 'name', name);
@@ -4911,7 +5001,7 @@ _export({ target: 'String', proto: true, forced: stringHtmlForced('anchor') }, {
});
// `String.prototype.big` method
-// https://tc39.github.io/ecma262/#sec-string.prototype.big
+// https://tc39.es/ecma262/#sec-string.prototype.big
_export({ target: 'String', proto: true, forced: stringHtmlForced('big') }, {
big: function big() {
return createHtml(this, 'big', '', '');
@@ -4919,7 +5009,7 @@ _export({ target: 'String', proto: true, forced: stringHtmlForced('big') }, {
});
// `String.prototype.blink` method
-// https://tc39.github.io/ecma262/#sec-string.prototype.blink
+// https://tc39.es/ecma262/#sec-string.prototype.blink
_export({ target: 'String', proto: true, forced: stringHtmlForced('blink') }, {
blink: function blink() {
return createHtml(this, 'blink', '', '');
@@ -4927,7 +5017,7 @@ _export({ target: 'String', proto: true, forced: stringHtmlForced('blink') }, {
});
// `String.prototype.bold` method
-// https://tc39.github.io/ecma262/#sec-string.prototype.bold
+// https://tc39.es/ecma262/#sec-string.prototype.bold
_export({ target: 'String', proto: true, forced: stringHtmlForced('bold') }, {
bold: function bold() {
return createHtml(this, 'b', '', '');
@@ -4935,7 +5025,7 @@ _export({ target: 'String', proto: true, forced: stringHtmlForced('bold') }, {
});
// `String.prototype.fixed` method
-// https://tc39.github.io/ecma262/#sec-string.prototype.fixed
+// https://tc39.es/ecma262/#sec-string.prototype.fixed
_export({ target: 'String', proto: true, forced: stringHtmlForced('fixed') }, {
fixed: function fixed() {
return createHtml(this, 'tt', '', '');
@@ -4943,7 +5033,7 @@ _export({ target: 'String', proto: true, forced: stringHtmlForced('fixed') }, {
});
// `String.prototype.fontcolor` method
-// https://tc39.github.io/ecma262/#sec-string.prototype.fontcolor
+// https://tc39.es/ecma262/#sec-string.prototype.fontcolor
_export({ target: 'String', proto: true, forced: stringHtmlForced('fontcolor') }, {
fontcolor: function fontcolor(color) {
return createHtml(this, 'font', 'color', color);
@@ -4951,7 +5041,7 @@ _export({ target: 'String', proto: true, forced: stringHtmlForced('fontcolor') }
});
// `String.prototype.fontsize` method
-// https://tc39.github.io/ecma262/#sec-string.prototype.fontsize
+// https://tc39.es/ecma262/#sec-string.prototype.fontsize
_export({ target: 'String', proto: true, forced: stringHtmlForced('fontsize') }, {
fontsize: function fontsize(size) {
return createHtml(this, 'font', 'size', size);
@@ -4959,7 +5049,7 @@ _export({ target: 'String', proto: true, forced: stringHtmlForced('fontsize') },
});
// `String.prototype.italics` method
-// https://tc39.github.io/ecma262/#sec-string.prototype.italics
+// https://tc39.es/ecma262/#sec-string.prototype.italics
_export({ target: 'String', proto: true, forced: stringHtmlForced('italics') }, {
italics: function italics() {
return createHtml(this, 'i', '', '');
@@ -4967,7 +5057,7 @@ _export({ target: 'String', proto: true, forced: stringHtmlForced('italics') },
});
// `String.prototype.link` method
-// https://tc39.github.io/ecma262/#sec-string.prototype.link
+// https://tc39.es/ecma262/#sec-string.prototype.link
_export({ target: 'String', proto: true, forced: stringHtmlForced('link') }, {
link: function link(url) {
return createHtml(this, 'a', 'href', url);
@@ -4975,7 +5065,7 @@ _export({ target: 'String', proto: true, forced: stringHtmlForced('link') }, {
});
// `String.prototype.small` method
-// https://tc39.github.io/ecma262/#sec-string.prototype.small
+// https://tc39.es/ecma262/#sec-string.prototype.small
_export({ target: 'String', proto: true, forced: stringHtmlForced('small') }, {
small: function small() {
return createHtml(this, 'small', '', '');
@@ -4983,7 +5073,7 @@ _export({ target: 'String', proto: true, forced: stringHtmlForced('small') }, {
});
// `String.prototype.strike` method
-// https://tc39.github.io/ecma262/#sec-string.prototype.strike
+// https://tc39.es/ecma262/#sec-string.prototype.strike
_export({ target: 'String', proto: true, forced: stringHtmlForced('strike') }, {
strike: function strike() {
return createHtml(this, 'strike', '', '');
@@ -4991,7 +5081,7 @@ _export({ target: 'String', proto: true, forced: stringHtmlForced('strike') }, {
});
// `String.prototype.sub` method
-// https://tc39.github.io/ecma262/#sec-string.prototype.sub
+// https://tc39.es/ecma262/#sec-string.prototype.sub
_export({ target: 'String', proto: true, forced: stringHtmlForced('sub') }, {
sub: function sub() {
return createHtml(this, 'sub', '', '');
@@ -4999,13 +5089,70 @@ _export({ target: 'String', proto: true, forced: stringHtmlForced('sub') }, {
});
// `String.prototype.sup` method
-// https://tc39.github.io/ecma262/#sec-string.prototype.sup
+// https://tc39.es/ecma262/#sec-string.prototype.sup
_export({ target: 'String', proto: true, forced: stringHtmlForced('sup') }, {
sup: function sup() {
return createHtml(this, 'sup', '', '');
}
});
+var REPLACE$1 = wellKnownSymbol('replace');
+var RegExpPrototype$1 = RegExp.prototype;
+var max$4 = Math.max;
+
+var stringIndexOf = function (string, searchValue, fromIndex) {
+ if (fromIndex > string.length) return -1;
+ if (searchValue === '') return fromIndex;
+ return string.indexOf(searchValue, fromIndex);
+};
+
+// `String.prototype.replaceAll` method
+// https://tc39.es/ecma262/#sec-string.prototype.replaceall
+_export({ target: 'String', proto: true }, {
+ replaceAll: function replaceAll(searchValue, replaceValue) {
+ var O = requireObjectCoercible(this);
+ var IS_REG_EXP, flags, replacer, string, searchString, functionalReplace, searchLength, advanceBy, replacement;
+ var position = 0;
+ var endOfLastMatch = 0;
+ var result = '';
+ if (searchValue != null) {
+ IS_REG_EXP = isRegexp(searchValue);
+ if (IS_REG_EXP) {
+ flags = String(requireObjectCoercible('flags' in RegExpPrototype$1
+ ? searchValue.flags
+ : regexpFlags.call(searchValue)
+ ));
+ if (!~flags.indexOf('g')) throw TypeError('`.replaceAll` does not allow non-global regexes');
+ }
+ replacer = searchValue[REPLACE$1];
+ if (replacer !== undefined) {
+ return replacer.call(searchValue, O, replaceValue);
+ }
+ }
+ string = String(O);
+ searchString = String(searchValue);
+ functionalReplace = typeof replaceValue === 'function';
+ if (!functionalReplace) replaceValue = String(replaceValue);
+ searchLength = searchString.length;
+ advanceBy = max$4(1, searchLength);
+ position = stringIndexOf(string, searchString, 0);
+ while (position !== -1) {
+ if (functionalReplace) {
+ replacement = String(replaceValue(searchString, position, string));
+ } else {
+ replacement = getSubstitution(searchString, string, position, [], undefined, replaceValue);
+ }
+ result += string.slice(endOfLastMatch, position) + replacement;
+ endOfLastMatch = position + searchLength;
+ position = stringIndexOf(string, searchString, position + advanceBy);
+ }
+ if (endOfLastMatch < string.length) {
+ result += string.slice(endOfLastMatch);
+ }
+ return result;
+ }
+});
+
// makes subclassing work correct for wrapped built-ins
var inheritIfRequired = function ($this, dummy, Wrapper) {
var NewTarget, NewTargetPrototype;
@@ -5034,7 +5181,7 @@ var setInternalState$5 = internalState.set;
var MATCH$2 = wellKnownSymbol('match');
var NativeRegExp = global_1.RegExp;
-var RegExpPrototype$1 = NativeRegExp.prototype;
+var RegExpPrototype$2 = NativeRegExp.prototype;
var re1 = /a/g;
var re2 = /a/g;
@@ -5050,7 +5197,7 @@ var FORCED$7 = descriptors && isForced_1('RegExp', (!CORRECT_NEW || UNSUPPORTED_
})));
// `RegExp` constructor
-// https://tc39.github.io/ecma262/#sec-regexp-constructor
+// https://tc39.es/ecma262/#sec-regexp-constructor
if (FORCED$7) {
var RegExpWrapper = function RegExp(pattern, flags) {
var thisIsRegExp = this instanceof RegExpWrapper;
@@ -5076,7 +5223,7 @@ if (FORCED$7) {
var result = inheritIfRequired(
CORRECT_NEW ? new NativeRegExp(pattern, flags) : NativeRegExp(pattern, flags),
- thisIsRegExp ? this : RegExpPrototype$1,
+ thisIsRegExp ? this : RegExpPrototype$2,
RegExpWrapper
);
@@ -5094,18 +5241,18 @@ if (FORCED$7) {
var keys$1 = getOwnPropertyNames(NativeRegExp);
var index = 0;
while (keys$1.length > index) proxy(keys$1[index++]);
- RegExpPrototype$1.constructor = RegExpWrapper;
- RegExpWrapper.prototype = RegExpPrototype$1;
+ RegExpPrototype$2.constructor = RegExpWrapper;
+ RegExpWrapper.prototype = RegExpPrototype$2;
redefine(global_1, 'RegExp', RegExpWrapper);
}
-// https://tc39.github.io/ecma262/#sec-get-regexp-@@species
+// https://tc39.es/ecma262/#sec-get-regexp-@@species
setSpecies('RegExp');
var UNSUPPORTED_Y$3 = regexpStickyHelpers.UNSUPPORTED_Y;
// `RegExp.prototype.flags` getter
-// https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
+// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
if (descriptors && (/./g.flags != 'g' || UNSUPPORTED_Y$3)) {
objectDefineProperty.f(RegExp.prototype, 'flags', {
configurable: true,
@@ -5116,14 +5263,15 @@ if (descriptors && (/./g.flags != 'g' || UNSUPPORTED_Y$3)) {
var UNSUPPORTED_Y$4 = regexpStickyHelpers.UNSUPPORTED_Y;
var defineProperty$7 = objectDefineProperty.f;
var getInternalState$5 = internalState.get;
-var RegExpPrototype$2 = RegExp.prototype;
+var RegExpPrototype$3 = RegExp.prototype;
// `RegExp.prototype.sticky` getter
+// https://tc39.es/ecma262/#sec-get-regexp.prototype.sticky
if (descriptors && UNSUPPORTED_Y$4) {
defineProperty$7(RegExp.prototype, 'sticky', {
configurable: true,
get: function () {
- if (this === RegExpPrototype$2) return undefined;
+ if (this === RegExpPrototype$3) return undefined;
// We can't use InternalStateModule.getterFor because
// we don't add metadata for regexps created by a literal.
if (this instanceof RegExp) {
@@ -5151,6 +5299,8 @@ var DELEGATES_TO_EXEC = function () {
var nativeTest = /./.test;
+// `RegExp.prototype.test` method
+// https://tc39.es/ecma262/#sec-regexp.prototype.test
_export({ target: 'RegExp', proto: true, forced: !DELEGATES_TO_EXEC }, {
test: function (str) {
if (typeof this.exec !== 'function') {
@@ -5165,21 +5315,21 @@ _export({ target: 'RegExp', proto: true, forced: !DELEGATES_TO_EXEC }, {
});
var TO_STRING = 'toString';
-var RegExpPrototype$3 = RegExp.prototype;
-var nativeToString = RegExpPrototype$3[TO_STRING];
+var RegExpPrototype$4 = RegExp.prototype;
+var nativeToString = RegExpPrototype$4[TO_STRING];
var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
// FF44- RegExp#toString has a wrong name
var INCORRECT_NAME = nativeToString.name != TO_STRING;
// `RegExp.prototype.toString` method
-// https://tc39.github.io/ecma262/#sec-regexp.prototype.tostring
+// https://tc39.es/ecma262/#sec-regexp.prototype.tostring
if (NOT_GENERIC || INCORRECT_NAME) {
redefine(RegExp.prototype, TO_STRING, function toString() {
var R = anObject(this);
var p = String(R.source);
var rf = R.flags;
- var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype$3) ? regexpFlags.call(R) : rf);
+ var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype$4) ? regexpFlags.call(R) : rf);
return '/' + p + '/' + f;
}, { unsafe: true });
}
@@ -5192,14 +5342,14 @@ var hex = /^[+-]?0[Xx]/;
var FORCED$8 = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22;
// `parseInt` method
-// https://tc39.github.io/ecma262/#sec-parseint-string-radix
+// https://tc39.es/ecma262/#sec-parseint-string-radix
var numberParseInt = FORCED$8 ? function parseInt(string, radix) {
var S = trim(String(string));
return $parseInt(S, (radix >>> 0) || (hex.test(S) ? 16 : 10));
} : $parseInt;
// `parseInt` method
-// https://tc39.github.io/ecma262/#sec-parseint-string-radix
+// https://tc39.es/ecma262/#sec-parseint-string-radix
_export({ global: true, forced: parseInt != numberParseInt }, {
parseInt: numberParseInt
});
@@ -5211,7 +5361,7 @@ var $parseFloat = global_1.parseFloat;
var FORCED$9 = 1 / $parseFloat(whitespaces + '-0') !== -Infinity;
// `parseFloat` method
-// https://tc39.github.io/ecma262/#sec-parsefloat-string
+// https://tc39.es/ecma262/#sec-parsefloat-string
var numberParseFloat = FORCED$9 ? function parseFloat(string) {
var trimmedString = trim$1(String(string));
var result = $parseFloat(trimmedString);
@@ -5219,7 +5369,7 @@ var numberParseFloat = FORCED$9 ? function parseFloat(string) {
} : $parseFloat;
// `parseFloat` method
-// https://tc39.github.io/ecma262/#sec-parsefloat-string
+// https://tc39.es/ecma262/#sec-parsefloat-string
_export({ global: true, forced: parseFloat != numberParseFloat }, {
parseFloat: numberParseFloat
});
@@ -5237,7 +5387,7 @@ var NumberPrototype = NativeNumber.prototype;
var BROKEN_CLASSOF = classofRaw(objectCreate(NumberPrototype)) == NUMBER;
// `ToNumber` abstract operation
-// https://tc39.github.io/ecma262/#sec-tonumber
+// https://tc39.es/ecma262/#sec-tonumber
var toNumber = function (argument) {
var it = toPrimitive(argument, false);
var first, third, radix, maxCode, digits, length, index, code;
@@ -5266,7 +5416,7 @@ var toNumber = function (argument) {
};
// `Number` constructor
-// https://tc39.github.io/ecma262/#sec-number-constructor
+// https://tc39.es/ecma262/#sec-number-constructor
if (isForced_1(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {
var NumberWrapper = function Number(value) {
var it = arguments.length < 1 ? 0 : value;
@@ -5281,7 +5431,9 @@ if (isForced_1(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNu
'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
// ES2015 (in case, if modules with ES2015 Number statics required before):
'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
- 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
+ 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,' +
+ // ESNext
+ 'fromString,range'
).split(','), j = 0, key; keys$2.length > j; j++) {
if (has(NativeNumber, key = keys$2[j]) && !has(NumberWrapper, key)) {
defineProperty$8(NumberWrapper, key, getOwnPropertyDescriptor$7(NativeNumber, key));
@@ -5293,7 +5445,7 @@ if (isForced_1(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNu
}
// `Number.EPSILON` constant
-// https://tc39.github.io/ecma262/#sec-number.epsilon
+// https://tc39.es/ecma262/#sec-number.epsilon
_export({ target: 'Number', stat: true }, {
EPSILON: Math.pow(2, -52)
});
@@ -5301,31 +5453,31 @@ _export({ target: 'Number', stat: true }, {
var globalIsFinite = global_1.isFinite;
// `Number.isFinite` method
-// https://tc39.github.io/ecma262/#sec-number.isfinite
+// https://tc39.es/ecma262/#sec-number.isfinite
var numberIsFinite = Number.isFinite || function isFinite(it) {
return typeof it == 'number' && globalIsFinite(it);
};
// `Number.isFinite` method
-// https://tc39.github.io/ecma262/#sec-number.isfinite
+// https://tc39.es/ecma262/#sec-number.isfinite
_export({ target: 'Number', stat: true }, { isFinite: numberIsFinite });
var floor$2 = Math.floor;
// `Number.isInteger` method implementation
-// https://tc39.github.io/ecma262/#sec-number.isinteger
+// https://tc39.es/ecma262/#sec-number.isinteger
var isInteger = function isInteger(it) {
return !isObject(it) && isFinite(it) && floor$2(it) === it;
};
// `Number.isInteger` method
-// https://tc39.github.io/ecma262/#sec-number.isinteger
+// https://tc39.es/ecma262/#sec-number.isinteger
_export({ target: 'Number', stat: true }, {
isInteger: isInteger
});
// `Number.isNaN` method
-// https://tc39.github.io/ecma262/#sec-number.isnan
+// https://tc39.es/ecma262/#sec-number.isnan
_export({ target: 'Number', stat: true }, {
isNaN: function isNaN(number) {
// eslint-disable-next-line no-self-compare
@@ -5336,7 +5488,7 @@ _export({ target: 'Number', stat: true }, {
var abs = Math.abs;
// `Number.isSafeInteger` method
-// https://tc39.github.io/ecma262/#sec-number.issafeinteger
+// https://tc39.es/ecma262/#sec-number.issafeinteger
_export({ target: 'Number', stat: true }, {
isSafeInteger: function isSafeInteger(number) {
return isInteger(number) && abs(number) <= 0x1FFFFFFFFFFFFF;
@@ -5344,31 +5496,31 @@ _export({ target: 'Number', stat: true }, {
});
// `Number.MAX_SAFE_INTEGER` constant
-// https://tc39.github.io/ecma262/#sec-number.max_safe_integer
+// https://tc39.es/ecma262/#sec-number.max_safe_integer
_export({ target: 'Number', stat: true }, {
MAX_SAFE_INTEGER: 0x1FFFFFFFFFFFFF
});
// `Number.MIN_SAFE_INTEGER` constant
-// https://tc39.github.io/ecma262/#sec-number.min_safe_integer
+// https://tc39.es/ecma262/#sec-number.min_safe_integer
_export({ target: 'Number', stat: true }, {
MIN_SAFE_INTEGER: -0x1FFFFFFFFFFFFF
});
// `Number.parseFloat` method
-// https://tc39.github.io/ecma262/#sec-number.parseFloat
+// https://tc39.es/ecma262/#sec-number.parseFloat
_export({ target: 'Number', stat: true, forced: Number.parseFloat != numberParseFloat }, {
parseFloat: numberParseFloat
});
// `Number.parseInt` method
-// https://tc39.github.io/ecma262/#sec-number.parseint
+// https://tc39.es/ecma262/#sec-number.parseint
_export({ target: 'Number', stat: true, forced: Number.parseInt != numberParseInt }, {
parseInt: numberParseInt
});
// `thisNumberValue` abstract operation
-// https://tc39.github.io/ecma262/#sec-thisnumbervalue
+// https://tc39.es/ecma262/#sec-thisnumbervalue
var thisNumberValue = function (value) {
if (typeof value != 'number' && classofRaw(value) != 'Number') {
throw TypeError('Incorrect invocation');
@@ -5407,7 +5559,7 @@ var FORCED$a = nativeToFixed && (
});
// `Number.prototype.toFixed` method
-// https://tc39.github.io/ecma262/#sec-number.prototype.tofixed
+// https://tc39.es/ecma262/#sec-number.prototype.tofixed
_export({ target: 'Number', proto: true, forced: FORCED$a }, {
// eslint-disable-next-line max-statements
toFixed: function toFixed(fractionDigits) {
@@ -5507,7 +5659,7 @@ var FORCED$b = fails(function () {
});
// `Number.prototype.toPrecision` method
-// https://tc39.github.io/ecma262/#sec-number.prototype.toprecision
+// https://tc39.es/ecma262/#sec-number.prototype.toprecision
_export({ target: 'Number', proto: true, forced: FORCED$b }, {
toPrecision: function toPrecision(precision) {
return precision === undefined
@@ -5519,7 +5671,7 @@ _export({ target: 'Number', proto: true, forced: FORCED$b }, {
var log$1 = Math.log;
// `Math.log1p` method implementation
-// https://tc39.github.io/ecma262/#sec-math.log1p
+// https://tc39.es/ecma262/#sec-math.log1p
var mathLog1p = Math.log1p || function log1p(x) {
return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : log$1(1 + x);
};
@@ -5536,7 +5688,7 @@ var FORCED$c = !nativeAcosh
|| nativeAcosh(Infinity) != Infinity;
// `Math.acosh` method
-// https://tc39.github.io/ecma262/#sec-math.acosh
+// https://tc39.es/ecma262/#sec-math.acosh
_export({ target: 'Math', stat: true, forced: FORCED$c }, {
acosh: function acosh(x) {
return (x = +x) < 1 ? NaN : x > 94906265.62425156
@@ -5554,7 +5706,7 @@ function asinh(x) {
}
// `Math.asinh` method
-// https://tc39.github.io/ecma262/#sec-math.asinh
+// https://tc39.es/ecma262/#sec-math.asinh
// Tor Browser bug: Math.asinh(0) -> -0
_export({ target: 'Math', stat: true, forced: !(nativeAsinh && 1 / nativeAsinh(0) > 0) }, {
asinh: asinh
@@ -5564,7 +5716,7 @@ var nativeAtanh = Math.atanh;
var log$4 = Math.log;
// `Math.atanh` method
-// https://tc39.github.io/ecma262/#sec-math.atanh
+// https://tc39.es/ecma262/#sec-math.atanh
// Tor Browser bug: Math.atanh(-0) -> 0
_export({ target: 'Math', stat: true, forced: !(nativeAtanh && 1 / nativeAtanh(-0) < 0) }, {
atanh: function atanh(x) {
@@ -5573,7 +5725,7 @@ _export({ target: 'Math', stat: true, forced: !(nativeAtanh && 1 / nativeAtanh(-
});
// `Math.sign` method implementation
-// https://tc39.github.io/ecma262/#sec-math.sign
+// https://tc39.es/ecma262/#sec-math.sign
var mathSign = Math.sign || function sign(x) {
// eslint-disable-next-line no-self-compare
return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;
@@ -5583,7 +5735,7 @@ var abs$1 = Math.abs;
var pow$1 = Math.pow;
// `Math.cbrt` method
-// https://tc39.github.io/ecma262/#sec-math.cbrt
+// https://tc39.es/ecma262/#sec-math.cbrt
_export({ target: 'Math', stat: true }, {
cbrt: function cbrt(x) {
return mathSign(x = +x) * pow$1(abs$1(x), 1 / 3);
@@ -5595,7 +5747,7 @@ var log$5 = Math.log;
var LOG2E = Math.LOG2E;
// `Math.clz32` method
-// https://tc39.github.io/ecma262/#sec-math.clz32
+// https://tc39.es/ecma262/#sec-math.clz32
_export({ target: 'Math', stat: true }, {
clz32: function clz32(x) {
return (x >>>= 0) ? 31 - floor$4(log$5(x + 0.5) * LOG2E) : 32;
@@ -5606,7 +5758,7 @@ var nativeExpm1 = Math.expm1;
var exp = Math.exp;
// `Math.expm1` method implementation
-// https://tc39.github.io/ecma262/#sec-math.expm1
+// https://tc39.es/ecma262/#sec-math.expm1
var mathExpm1 = (!nativeExpm1
// Old FF bug
|| nativeExpm1(10) > 22025.465794806719 || nativeExpm1(10) < 22025.4657948067165168
@@ -5621,7 +5773,7 @@ var abs$2 = Math.abs;
var E = Math.E;
// `Math.cosh` method
-// https://tc39.github.io/ecma262/#sec-math.cosh
+// https://tc39.es/ecma262/#sec-math.cosh
_export({ target: 'Math', stat: true, forced: !nativeCosh || nativeCosh(710) === Infinity }, {
cosh: function cosh(x) {
var t = mathExpm1(abs$2(x) - 1) + 1;
@@ -5630,7 +5782,7 @@ _export({ target: 'Math', stat: true, forced: !nativeCosh || nativeCosh(710) ===
});
// `Math.expm1` method
-// https://tc39.github.io/ecma262/#sec-math.expm1
+// https://tc39.es/ecma262/#sec-math.expm1
_export({ target: 'Math', stat: true, forced: mathExpm1 != Math.expm1 }, { expm1: mathExpm1 });
var abs$3 = Math.abs;
@@ -5645,7 +5797,7 @@ var roundTiesToEven = function (n) {
};
// `Math.fround` method implementation
-// https://tc39.github.io/ecma262/#sec-math.fround
+// https://tc39.es/ecma262/#sec-math.fround
var mathFround = Math.fround || function fround(x) {
var $abs = abs$3(x);
var $sign = mathSign(x);
@@ -5659,7 +5811,7 @@ var mathFround = Math.fround || function fround(x) {
};
// `Math.fround` method
-// https://tc39.github.io/ecma262/#sec-math.fround
+// https://tc39.es/ecma262/#sec-math.fround
_export({ target: 'Math', stat: true }, { fround: mathFround });
var $hypot = Math.hypot;
@@ -5671,7 +5823,7 @@ var sqrt$2 = Math.sqrt;
var BUGGY = !!$hypot && $hypot(Infinity, NaN) !== Infinity;
// `Math.hypot` method
-// https://tc39.github.io/ecma262/#sec-math.hypot
+// https://tc39.es/ecma262/#sec-math.hypot
_export({ target: 'Math', stat: true, forced: BUGGY }, {
hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars
var sum = 0;
@@ -5701,7 +5853,7 @@ var FORCED$d = fails(function () {
});
// `Math.imul` method
-// https://tc39.github.io/ecma262/#sec-math.imul
+// https://tc39.es/ecma262/#sec-math.imul
// some WebKit versions fails with big numbers, some has wrong arity
_export({ target: 'Math', stat: true, forced: FORCED$d }, {
imul: function imul(x, y) {
@@ -5718,7 +5870,7 @@ var log$6 = Math.log;
var LOG10E = Math.LOG10E;
// `Math.log10` method
-// https://tc39.github.io/ecma262/#sec-math.log10
+// https://tc39.es/ecma262/#sec-math.log10
_export({ target: 'Math', stat: true }, {
log10: function log10(x) {
return log$6(x) * LOG10E;
@@ -5726,14 +5878,14 @@ _export({ target: 'Math', stat: true }, {
});
// `Math.log1p` method
-// https://tc39.github.io/ecma262/#sec-math.log1p
+// https://tc39.es/ecma262/#sec-math.log1p
_export({ target: 'Math', stat: true }, { log1p: mathLog1p });
var log$7 = Math.log;
var LN2$1 = Math.LN2;
// `Math.log2` method
-// https://tc39.github.io/ecma262/#sec-math.log2
+// https://tc39.es/ecma262/#sec-math.log2
_export({ target: 'Math', stat: true }, {
log2: function log2(x) {
return log$7(x) / LN2$1;
@@ -5741,7 +5893,7 @@ _export({ target: 'Math', stat: true }, {
});
// `Math.sign` method
-// https://tc39.github.io/ecma262/#sec-math.sign
+// https://tc39.es/ecma262/#sec-math.sign
_export({ target: 'Math', stat: true }, {
sign: mathSign
});
@@ -5755,7 +5907,7 @@ var FORCED$e = fails(function () {
});
// `Math.sinh` method
-// https://tc39.github.io/ecma262/#sec-math.sinh
+// https://tc39.es/ecma262/#sec-math.sinh
// V8 near Chromium 38 has a problem with very small numbers
_export({ target: 'Math', stat: true, forced: FORCED$e }, {
sinh: function sinh(x) {
@@ -5766,7 +5918,7 @@ _export({ target: 'Math', stat: true, forced: FORCED$e }, {
var exp$2 = Math.exp;
// `Math.tanh` method
-// https://tc39.github.io/ecma262/#sec-math.tanh
+// https://tc39.es/ecma262/#sec-math.tanh
_export({ target: 'Math', stat: true }, {
tanh: function tanh(x) {
var a = mathExpm1(x = +x);
@@ -5776,14 +5928,14 @@ _export({ target: 'Math', stat: true }, {
});
// Math[@@toStringTag] property
-// https://tc39.github.io/ecma262/#sec-math-@@tostringtag
+// https://tc39.es/ecma262/#sec-math-@@tostringtag
setToStringTag(Math, 'Math', true);
var ceil$2 = Math.ceil;
var floor$5 = Math.floor;
// `Math.trunc` method
-// https://tc39.github.io/ecma262/#sec-math.trunc
+// https://tc39.es/ecma262/#sec-math.trunc
_export({ target: 'Math', stat: true }, {
trunc: function trunc(it) {
return (it > 0 ? floor$5 : ceil$2)(it);
@@ -5791,7 +5943,7 @@ _export({ target: 'Math', stat: true }, {
});
// `Date.now` method
-// https://tc39.github.io/ecma262/#sec-date.now
+// https://tc39.es/ecma262/#sec-date.now
_export({ target: 'Date', stat: true }, {
now: function now() {
return new Date().getTime();
@@ -5804,7 +5956,7 @@ var FORCED$f = fails(function () {
});
// `Date.prototype.toJSON` method
-// https://tc39.github.io/ecma262/#sec-date.prototype.tojson
+// https://tc39.es/ecma262/#sec-date.prototype.tojson
_export({ target: 'Date', proto: true, forced: FORCED$f }, {
// eslint-disable-next-line no-unused-vars
toJSON: function toJSON(key) {
@@ -5822,7 +5974,7 @@ var getTime = DatePrototype.getTime;
var nativeDateToISOString = DatePrototype.toISOString;
// `Date.prototype.toISOString` method implementation
-// https://tc39.github.io/ecma262/#sec-date.prototype.toisostring
+// https://tc39.es/ecma262/#sec-date.prototype.toisostring
// PhantomJS / old WebKit fails here:
var dateToIsoString = (fails(function () {
return nativeDateToISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z';
@@ -5845,7 +5997,7 @@ var dateToIsoString = (fails(function () {
} : nativeDateToISOString;
// `Date.prototype.toISOString` method
-// https://tc39.github.io/ecma262/#sec-date.prototype.toisostring
+// https://tc39.es/ecma262/#sec-date.prototype.toisostring
// PhantomJS / old WebKit has a broken implementations
_export({ target: 'Date', proto: true, forced: Date.prototype.toISOString !== dateToIsoString }, {
toISOString: dateToIsoString
@@ -5858,7 +6010,7 @@ var nativeDateToString = DatePrototype$1[TO_STRING$1];
var getTime$1 = DatePrototype$1.getTime;
// `Date.prototype.toString` method
-// https://tc39.github.io/ecma262/#sec-date.prototype.tostring
+// https://tc39.es/ecma262/#sec-date.prototype.tostring
if (new Date(NaN) + '' != INVALID_DATE) {
redefine(DatePrototype$1, TO_STRING$1, function toString() {
var value = getTime$1.call(this);
@@ -5877,7 +6029,7 @@ var TO_PRIMITIVE$1 = wellKnownSymbol('toPrimitive');
var DatePrototype$2 = Date.prototype;
// `Date.prototype[@@toPrimitive]` method
-// https://tc39.github.io/ecma262/#sec-date.prototype-@@toprimitive
+// https://tc39.es/ecma262/#sec-date.prototype-@@toprimitive
if (!(TO_PRIMITIVE$1 in DatePrototype$2)) {
createNonEnumerableProperty(DatePrototype$2, TO_PRIMITIVE$1, dateToPrimitive);
}
@@ -5901,6 +6053,8 @@ var FORCED$g = fails(function () {
});
if ($stringify$1) {
+ // `JSON.stringify` method
+ // https://tc39.es/ecma262/#sec-json.stringify
// https://github.com/tc39/proposal-well-formed-stringify
_export({ target: 'JSON', stat: true, forced: FORCED$g }, {
// eslint-disable-next-line no-unused-vars
@@ -5912,11 +6066,11 @@ if ($stringify$1) {
}
// JSON[@@toStringTag] property
-// https://tc39.github.io/ecma262/#sec-json-@@tostringtag
+// https://tc39.es/ecma262/#sec-json-@@tostringtag
setToStringTag(global_1.JSON, 'JSON', true);
// `Promise.allSettled` method
-// https://github.com/tc39/proposal-promise-allSettled
+// https://tc39.es/ecma262/#sec-promise.allsettled
_export({ target: 'Promise', stat: true }, {
allSettled: function allSettled(iterable) {
var C = this;
@@ -5928,7 +6082,7 @@ _export({ target: 'Promise', stat: true }, {
var values = [];
var counter = 0;
var remaining = 1;
- iterate_1(iterable, function (promise) {
+ iterate(iterable, function (promise) {
var index = counter++;
var alreadyCalled = false;
values.push(undefined);
@@ -5938,10 +6092,10 @@ _export({ target: 'Promise', stat: true }, {
alreadyCalled = true;
values[index] = { status: 'fulfilled', value: value };
--remaining || resolve(values);
- }, function (e) {
+ }, function (error) {
if (alreadyCalled) return;
alreadyCalled = true;
- values[index] = { status: 'rejected', reason: e };
+ values[index] = { status: 'rejected', reason: error };
--remaining || resolve(values);
});
});
@@ -5952,6 +6106,45 @@ _export({ target: 'Promise', stat: true }, {
}
});
+var PROMISE_ANY_ERROR = 'No one promise resolved';
+
+// `Promise.any` method
+// https://tc39.es/ecma262/#sec-promise.any
+_export({ target: 'Promise', stat: true }, {
+ any: function any(iterable) {
+ var C = this;
+ var capability = newPromiseCapability.f(C);
+ var resolve = capability.resolve;
+ var reject = capability.reject;
+ var result = perform(function () {
+ var promiseResolve = aFunction$1(C.resolve);
+ var errors = [];
+ var counter = 0;
+ var remaining = 1;
+ var alreadyResolved = false;
+ iterate(iterable, function (promise) {
+ var index = counter++;
+ var alreadyRejected = false;
+ errors.push(undefined);
+ remaining++;
+ promiseResolve.call(C, promise).then(function (value) {
+ if (alreadyRejected || alreadyResolved) return;
+ alreadyResolved = true;
+ resolve(value);
+ }, function (error) {
+ if (alreadyRejected || alreadyResolved) return;
+ alreadyRejected = true;
+ errors[index] = error;
+ --remaining || reject(new (getBuiltIn('AggregateError'))(errors, PROMISE_ANY_ERROR));
+ });
+ });
+ --remaining || reject(new (getBuiltIn('AggregateError'))(errors, PROMISE_ANY_ERROR));
+ });
+ if (result.error) reject(result.value);
+ return capability.promise;
+ }
+});
+
var collection = function (CONSTRUCTOR_NAME, wrapper, common) {
var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;
var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;
@@ -6009,7 +6202,7 @@ var collection = function (CONSTRUCTOR_NAME, wrapper, common) {
Constructor = wrapper(function (dummy, iterable) {
anInstance(dummy, Constructor, CONSTRUCTOR_NAME);
var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);
- if (iterable != undefined) iterate_1(iterable, that[ADDER], that, IS_MAP);
+ if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
return that;
});
Constructor.prototype = NativePrototype;
@@ -6065,7 +6258,7 @@ var collectionStrong = {
size: 0
});
if (!descriptors) that.size = 0;
- if (iterable != undefined) iterate_1(iterable, that[ADDER], that, IS_MAP);
+ if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
});
var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
@@ -6225,13 +6418,13 @@ var collectionStrong = {
};
// `Map` constructor
-// https://tc39.github.io/ecma262/#sec-map-objects
+// https://tc39.es/ecma262/#sec-map-objects
var es_map = collection('Map', function (init) {
return function Map() { return init(this, arguments.length ? arguments[0] : undefined); };
}, collectionStrong);
// `Set` constructor
-// https://tc39.github.io/ecma262/#sec-set-objects
+// https://tc39.es/ecma262/#sec-set-objects
var es_set = collection('Set', function (init) {
return function Set() { return init(this, arguments.length ? arguments[0] : undefined); };
}, collectionStrong);
@@ -6297,7 +6490,7 @@ var collectionWeak = {
id: id$1++,
frozen: undefined
});
- if (iterable != undefined) iterate_1(iterable, that[ADDER], that, IS_MAP);
+ if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
});
var getInternalState = internalStateGetterFor$1(CONSTRUCTOR_NAME);
@@ -6377,7 +6570,7 @@ var wrapper = function (init) {
};
// `WeakMap` constructor
-// https://tc39.github.io/ecma262/#sec-weakmap-constructor
+// https://tc39.es/ecma262/#sec-weakmap-constructor
var $WeakMap = module.exports = collection('WeakMap', wrapper, collectionWeak);
// IE11 WeakMap frozen keys fix
@@ -6426,7 +6619,7 @@ if (nativeWeakMap && IS_IE11) {
});
// `WeakSet` constructor
-// https://tc39.github.io/ecma262/#sec-weakset-constructor
+// https://tc39.es/ecma262/#sec-weakset-constructor
collection('WeakSet', function (init) {
return function WeakSet() { return init(this, arguments.length ? arguments[0] : undefined); };
}, collectionWeak);
@@ -6434,7 +6627,7 @@ collection('WeakSet', function (init) {
var arrayBufferNative = typeof ArrayBuffer !== 'undefined' && typeof DataView !== 'undefined';
// `ToIndex` abstract operation
-// https://tc39.github.io/ecma262/#sec-toindex
+// https://tc39.es/ecma262/#sec-toindex
var toIndex = function (it) {
if (it === undefined) return 0;
var number = toInteger(it);
@@ -6750,7 +6943,7 @@ var ArrayBuffer$1 = arrayBuffer[ARRAY_BUFFER$1];
var NativeArrayBuffer$1 = global_1[ARRAY_BUFFER$1];
// `ArrayBuffer` constructor
-// https://tc39.github.io/ecma262/#sec-arraybuffer-constructor
+// https://tc39.es/ecma262/#sec-arraybuffer-constructor
_export({ global: true, forced: NativeArrayBuffer$1 !== ArrayBuffer$1 }, {
ArrayBuffer: ArrayBuffer$1
});
@@ -6791,13 +6984,24 @@ var TypedArrayConstructorsList = {
Float64Array: 8
};
+var BigIntArrayConstructorsList = {
+ BigInt64Array: 8,
+ BigUint64Array: 8
+};
+
var isView = function isView(it) {
+ if (!isObject(it)) return false;
var klass = classof(it);
- return klass === 'DataView' || has(TypedArrayConstructorsList, klass);
+ return klass === 'DataView'
+ || has(TypedArrayConstructorsList, klass)
+ || has(BigIntArrayConstructorsList, klass);
};
var isTypedArray = function (it) {
- return isObject(it) && has(TypedArrayConstructorsList, classof(it));
+ if (!isObject(it)) return false;
+ var klass = classof(it);
+ return has(TypedArrayConstructorsList, klass)
+ || has(BigIntArrayConstructorsList, klass);
};
var aTypedArray = function (it) {
@@ -6908,7 +7112,7 @@ var arrayBufferViewCore = {
var NATIVE_ARRAY_BUFFER_VIEWS$1 = arrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;
// `ArrayBuffer.isView` method
-// https://tc39.github.io/ecma262/#sec-arraybuffer.isview
+// https://tc39.es/ecma262/#sec-arraybuffer.isview
_export({ target: 'ArrayBuffer', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS$1 }, {
isView: arrayBufferViewCore.isView
});
@@ -6922,7 +7126,7 @@ var INCORRECT_SLICE = fails(function () {
});
// `ArrayBuffer.prototype.slice` method
-// https://tc39.github.io/ecma262/#sec-arraybuffer.prototype.slice
+// https://tc39.es/ecma262/#sec-arraybuffer.prototype.slice
_export({ target: 'ArrayBuffer', proto: true, unsafe: true, forced: INCORRECT_SLICE }, {
slice: function slice(start, end) {
if (nativeArrayBufferSlice !== undefined && end === undefined) {
@@ -6942,7 +7146,7 @@ _export({ target: 'ArrayBuffer', proto: true, unsafe: true, forced: INCORRECT_SL
});
// `DataView` constructor
-// https://tc39.github.io/ecma262/#sec-dataview-constructor
+// https://tc39.es/ecma262/#sec-dataview-constructor
_export({ global: true, forced: !arrayBufferNative }, {
DataView: arrayBuffer.DataView
});
@@ -7243,7 +7447,7 @@ if (descriptors) {
});
// `Int8Array` constructor
-// https://tc39.github.io/ecma262/#sec-typedarray-objects
+// https://tc39.es/ecma262/#sec-typedarray-objects
typedArrayConstructor('Int8', function (init) {
return function Int8Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
@@ -7251,7 +7455,7 @@ typedArrayConstructor('Int8', function (init) {
});
// `Uint8Array` constructor
-// https://tc39.github.io/ecma262/#sec-typedarray-objects
+// https://tc39.es/ecma262/#sec-typedarray-objects
typedArrayConstructor('Uint8', function (init) {
return function Uint8Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
@@ -7259,7 +7463,7 @@ typedArrayConstructor('Uint8', function (init) {
});
// `Uint8ClampedArray` constructor
-// https://tc39.github.io/ecma262/#sec-typedarray-objects
+// https://tc39.es/ecma262/#sec-typedarray-objects
typedArrayConstructor('Uint8', function (init) {
return function Uint8ClampedArray(data, byteOffset, length) {
return init(this, data, byteOffset, length);
@@ -7267,7 +7471,7 @@ typedArrayConstructor('Uint8', function (init) {
}, true);
// `Int16Array` constructor
-// https://tc39.github.io/ecma262/#sec-typedarray-objects
+// https://tc39.es/ecma262/#sec-typedarray-objects
typedArrayConstructor('Int16', function (init) {
return function Int16Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
@@ -7275,7 +7479,7 @@ typedArrayConstructor('Int16', function (init) {
});
// `Uint16Array` constructor
-// https://tc39.github.io/ecma262/#sec-typedarray-objects
+// https://tc39.es/ecma262/#sec-typedarray-objects
typedArrayConstructor('Uint16', function (init) {
return function Uint16Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
@@ -7283,7 +7487,7 @@ typedArrayConstructor('Uint16', function (init) {
});
// `Int32Array` constructor
-// https://tc39.github.io/ecma262/#sec-typedarray-objects
+// https://tc39.es/ecma262/#sec-typedarray-objects
typedArrayConstructor('Int32', function (init) {
return function Int32Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
@@ -7291,7 +7495,7 @@ typedArrayConstructor('Int32', function (init) {
});
// `Uint32Array` constructor
-// https://tc39.github.io/ecma262/#sec-typedarray-objects
+// https://tc39.es/ecma262/#sec-typedarray-objects
typedArrayConstructor('Uint32', function (init) {
return function Uint32Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
@@ -7299,7 +7503,7 @@ typedArrayConstructor('Uint32', function (init) {
});
// `Float32Array` constructor
-// https://tc39.github.io/ecma262/#sec-typedarray-objects
+// https://tc39.es/ecma262/#sec-typedarray-objects
typedArrayConstructor('Float32', function (init) {
return function Float32Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
@@ -7307,7 +7511,7 @@ typedArrayConstructor('Float32', function (init) {
});
// `Float64Array` constructor
-// https://tc39.github.io/ecma262/#sec-typedarray-objects
+// https://tc39.es/ecma262/#sec-typedarray-objects
typedArrayConstructor('Float64', function (init) {
return function Float64Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
@@ -7318,14 +7522,14 @@ var exportTypedArrayStaticMethod$1 = arrayBufferViewCore.exportTypedArrayStaticM
// `%TypedArray%.from` method
-// https://tc39.github.io/ecma262/#sec-%typedarray%.from
+// https://tc39.es/ecma262/#sec-%typedarray%.from
exportTypedArrayStaticMethod$1('from', typedArrayFrom, typedArrayConstructorsRequireWrappers);
var aTypedArrayConstructor$2 = arrayBufferViewCore.aTypedArrayConstructor;
var exportTypedArrayStaticMethod$2 = arrayBufferViewCore.exportTypedArrayStaticMethod;
// `%TypedArray%.of` method
-// https://tc39.github.io/ecma262/#sec-%typedarray%.of
+// https://tc39.es/ecma262/#sec-%typedarray%.of
exportTypedArrayStaticMethod$2('of', function of(/* ...items */) {
var index = 0;
var length = arguments.length;
@@ -7338,7 +7542,7 @@ var aTypedArray$1 = arrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod$1 = arrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.copyWithin` method
-// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.copywithin
+// https://tc39.es/ecma262/#sec-%typedarray%.prototype.copywithin
exportTypedArrayMethod$1('copyWithin', function copyWithin(target, start /* , end */) {
return arrayCopyWithin.call(aTypedArray$1(this), target, start, arguments.length > 2 ? arguments[2] : undefined);
});
@@ -7349,7 +7553,7 @@ var aTypedArray$2 = arrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod$2 = arrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.every` method
-// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.every
+// https://tc39.es/ecma262/#sec-%typedarray%.prototype.every
exportTypedArrayMethod$2('every', function every(callbackfn /* , thisArg */) {
return $every$1(aTypedArray$2(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
});
@@ -7358,7 +7562,7 @@ var aTypedArray$3 = arrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod$3 = arrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.fill` method
-// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.fill
+// https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill
// eslint-disable-next-line no-unused-vars
exportTypedArrayMethod$3('fill', function fill(value /* , start, end */) {
return arrayFill.apply(aTypedArray$3(this), arguments);
@@ -7372,7 +7576,7 @@ var aTypedArrayConstructor$3 = arrayBufferViewCore.aTypedArrayConstructor;
var exportTypedArrayMethod$4 = arrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.filter` method
-// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.filter
+// https://tc39.es/ecma262/#sec-%typedarray%.prototype.filter
exportTypedArrayMethod$4('filter', function filter(callbackfn /* , thisArg */) {
var list = $filter$1(aTypedArray$4(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
var C = speciesConstructor(this, this.constructor);
@@ -7389,7 +7593,7 @@ var aTypedArray$5 = arrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod$5 = arrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.find` method
-// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.find
+// https://tc39.es/ecma262/#sec-%typedarray%.prototype.find
exportTypedArrayMethod$5('find', function find(predicate /* , thisArg */) {
return $find$1(aTypedArray$5(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
});
@@ -7400,7 +7604,7 @@ var aTypedArray$6 = arrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod$6 = arrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.findIndex` method
-// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.findindex
+// https://tc39.es/ecma262/#sec-%typedarray%.prototype.findindex
exportTypedArrayMethod$6('findIndex', function findIndex(predicate /* , thisArg */) {
return $findIndex$1(aTypedArray$6(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
});
@@ -7411,7 +7615,7 @@ var aTypedArray$7 = arrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod$7 = arrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.forEach` method
-// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.foreach
+// https://tc39.es/ecma262/#sec-%typedarray%.prototype.foreach
exportTypedArrayMethod$7('forEach', function forEach(callbackfn /* , thisArg */) {
$forEach$2(aTypedArray$7(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
});
@@ -7422,7 +7626,7 @@ var aTypedArray$8 = arrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod$8 = arrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.includes` method
-// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.includes
+// https://tc39.es/ecma262/#sec-%typedarray%.prototype.includes
exportTypedArrayMethod$8('includes', function includes(searchElement /* , fromIndex */) {
return $includes$1(aTypedArray$8(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
});
@@ -7433,7 +7637,7 @@ var aTypedArray$9 = arrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod$9 = arrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.indexOf` method
-// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.indexof
+// https://tc39.es/ecma262/#sec-%typedarray%.prototype.indexof
exportTypedArrayMethod$9('indexOf', function indexOf(searchElement /* , fromIndex */) {
return $indexOf$1(aTypedArray$9(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
});
@@ -7455,20 +7659,20 @@ var typedArrayValues = function values() {
};
// `%TypedArray%.prototype.entries` method
-// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.entries
+// https://tc39.es/ecma262/#sec-%typedarray%.prototype.entries
exportTypedArrayMethod$a('entries', function entries() {
return arrayEntries.call(aTypedArray$a(this));
});
// `%TypedArray%.prototype.keys` method
-// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.keys
+// https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys
exportTypedArrayMethod$a('keys', function keys() {
return arrayKeys.call(aTypedArray$a(this));
});
// `%TypedArray%.prototype.values` method
-// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.values
+// https://tc39.es/ecma262/#sec-%typedarray%.prototype.values
exportTypedArrayMethod$a('values', typedArrayValues, !CORRECT_ITER_NAME);
// `%TypedArray%.prototype[@@iterator]` method
-// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype-@@iterator
+// https://tc39.es/ecma262/#sec-%typedarray%.prototype-@@iterator
exportTypedArrayMethod$a(ITERATOR$5, typedArrayValues, !CORRECT_ITER_NAME);
var aTypedArray$b = arrayBufferViewCore.aTypedArray;
@@ -7476,7 +7680,7 @@ var exportTypedArrayMethod$b = arrayBufferViewCore.exportTypedArrayMethod;
var $join = [].join;
// `%TypedArray%.prototype.join` method
-// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.join
+// https://tc39.es/ecma262/#sec-%typedarray%.prototype.join
// eslint-disable-next-line no-unused-vars
exportTypedArrayMethod$b('join', function join(separator) {
return $join.apply(aTypedArray$b(this), arguments);
@@ -7486,7 +7690,7 @@ var aTypedArray$c = arrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod$c = arrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.lastIndexOf` method
-// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.lastindexof
+// https://tc39.es/ecma262/#sec-%typedarray%.prototype.lastindexof
// eslint-disable-next-line no-unused-vars
exportTypedArrayMethod$c('lastIndexOf', function lastIndexOf(searchElement /* , fromIndex */) {
return arrayLastIndexOf.apply(aTypedArray$c(this), arguments);
@@ -7500,7 +7704,7 @@ var aTypedArrayConstructor$4 = arrayBufferViewCore.aTypedArrayConstructor;
var exportTypedArrayMethod$d = arrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.map` method
-// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.map
+// https://tc39.es/ecma262/#sec-%typedarray%.prototype.map
exportTypedArrayMethod$d('map', function map(mapfn /* , thisArg */) {
return $map$1(aTypedArray$d(this), mapfn, arguments.length > 1 ? arguments[1] : undefined, function (O, length) {
return new (aTypedArrayConstructor$4(speciesConstructor(O, O.constructor)))(length);
@@ -7513,7 +7717,7 @@ var aTypedArray$e = arrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod$e = arrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.reduce` method
-// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.reduce
+// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduce
exportTypedArrayMethod$e('reduce', function reduce(callbackfn /* , initialValue */) {
return $reduce$1(aTypedArray$e(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
});
@@ -7524,7 +7728,7 @@ var aTypedArray$f = arrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod$f = arrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.reduceRicht` method
-// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.reduceright
+// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduceright
exportTypedArrayMethod$f('reduceRight', function reduceRight(callbackfn /* , initialValue */) {
return $reduceRight$1(aTypedArray$f(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
});
@@ -7534,7 +7738,7 @@ var exportTypedArrayMethod$g = arrayBufferViewCore.exportTypedArrayMethod;
var floor$7 = Math.floor;
// `%TypedArray%.prototype.reverse` method
-// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.reverse
+// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reverse
exportTypedArrayMethod$g('reverse', function reverse() {
var that = this;
var length = aTypedArray$g(that).length;
@@ -7557,7 +7761,7 @@ var FORCED$h = fails(function () {
});
// `%TypedArray%.prototype.set` method
-// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.set
+// https://tc39.es/ecma262/#sec-%typedarray%.prototype.set
exportTypedArrayMethod$h('set', function set(arrayLike /* , offset */) {
aTypedArray$h(this);
var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);
@@ -7580,7 +7784,7 @@ var FORCED$i = fails(function () {
});
// `%TypedArray%.prototype.slice` method
-// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.slice
+// https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice
exportTypedArrayMethod$i('slice', function slice(start, end) {
var list = $slice.call(aTypedArray$i(this), start, end);
var C = speciesConstructor(this, this.constructor);
@@ -7597,7 +7801,7 @@ var aTypedArray$j = arrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod$j = arrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.some` method
-// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.some
+// https://tc39.es/ecma262/#sec-%typedarray%.prototype.some
exportTypedArrayMethod$j('some', function some(callbackfn /* , thisArg */) {
return $some$1(aTypedArray$j(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
});
@@ -7607,7 +7811,7 @@ var exportTypedArrayMethod$k = arrayBufferViewCore.exportTypedArrayMethod;
var $sort = [].sort;
// `%TypedArray%.prototype.sort` method
-// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.sort
+// https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort
exportTypedArrayMethod$k('sort', function sort(comparefn) {
return $sort.call(aTypedArray$k(this), comparefn);
});
@@ -7616,7 +7820,7 @@ var aTypedArray$l = arrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod$l = arrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.subarray` method
-// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.subarray
+// https://tc39.es/ecma262/#sec-%typedarray%.prototype.subarray
exportTypedArrayMethod$l('subarray', function subarray(begin, end) {
var O = aTypedArray$l(this);
var length = O.length;
@@ -7646,7 +7850,7 @@ var FORCED$j = fails(function () {
});
// `%TypedArray%.prototype.toLocaleString` method
-// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.tolocalestring
+// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring
exportTypedArrayMethod$m('toLocaleString', function toLocaleString() {
return $toLocaleString.apply(TO_LOCALE_STRING_BUG ? $slice$1.call(aTypedArray$m(this)) : aTypedArray$m(this), arguments);
}, FORCED$j);
@@ -7669,7 +7873,7 @@ if (fails(function () { arrayToString.call({}); })) {
var IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString != arrayToString;
// `%TypedArray%.prototype.toString` method
-// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.tostring
+// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tostring
exportTypedArrayMethod$n('toString', arrayToString, IS_NOT_ARRAY_METHOD);
var nativeApply = getBuiltIn('Reflect', 'apply');
@@ -7681,7 +7885,7 @@ var OPTIONAL_ARGUMENTS_LIST = !fails(function () {
});
// `Reflect.apply` method
-// https://tc39.github.io/ecma262/#sec-reflect.apply
+// https://tc39.es/ecma262/#sec-reflect.apply
_export({ target: 'Reflect', stat: true, forced: OPTIONAL_ARGUMENTS_LIST }, {
apply: function apply(target, thisArgument, argumentsList) {
aFunction$1(target);
@@ -7695,7 +7899,7 @@ _export({ target: 'Reflect', stat: true, forced: OPTIONAL_ARGUMENTS_LIST }, {
var nativeConstruct = getBuiltIn('Reflect', 'construct');
// `Reflect.construct` method
-// https://tc39.github.io/ecma262/#sec-reflect.construct
+// https://tc39.es/ecma262/#sec-reflect.construct
// MS Edge supports only 2 arguments and argumentsList argument is optional
// FF Nightly sets third argument as `new.target`, but does not create `this` from it
var NEW_TARGET_BUG = fails(function () {
@@ -7742,7 +7946,7 @@ var ERROR_INSTEAD_OF_FALSE = fails(function () {
});
// `Reflect.defineProperty` method
-// https://tc39.github.io/ecma262/#sec-reflect.defineproperty
+// https://tc39.es/ecma262/#sec-reflect.defineproperty
_export({ target: 'Reflect', stat: true, forced: ERROR_INSTEAD_OF_FALSE, sham: !descriptors }, {
defineProperty: function defineProperty(target, propertyKey, attributes) {
anObject(target);
@@ -7760,7 +7964,7 @@ _export({ target: 'Reflect', stat: true, forced: ERROR_INSTEAD_OF_FALSE, sham: !
var getOwnPropertyDescriptor$8 = objectGetOwnPropertyDescriptor.f;
// `Reflect.deleteProperty` method
-// https://tc39.github.io/ecma262/#sec-reflect.deleteproperty
+// https://tc39.es/ecma262/#sec-reflect.deleteproperty
_export({ target: 'Reflect', stat: true }, {
deleteProperty: function deleteProperty(target, propertyKey) {
var descriptor = getOwnPropertyDescriptor$8(anObject(target), propertyKey);
@@ -7769,7 +7973,7 @@ _export({ target: 'Reflect', stat: true }, {
});
// `Reflect.get` method
-// https://tc39.github.io/ecma262/#sec-reflect.get
+// https://tc39.es/ecma262/#sec-reflect.get
function get$2(target, propertyKey /* , receiver */) {
var receiver = arguments.length < 3 ? target : arguments[2];
var descriptor, prototype;
@@ -7787,7 +7991,7 @@ _export({ target: 'Reflect', stat: true }, {
});
// `Reflect.getOwnPropertyDescriptor` method
-// https://tc39.github.io/ecma262/#sec-reflect.getownpropertydescriptor
+// https://tc39.es/ecma262/#sec-reflect.getownpropertydescriptor
_export({ target: 'Reflect', stat: true, sham: !descriptors }, {
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) {
return objectGetOwnPropertyDescriptor.f(anObject(target), propertyKey);
@@ -7795,7 +7999,7 @@ _export({ target: 'Reflect', stat: true, sham: !descriptors }, {
});
// `Reflect.getPrototypeOf` method
-// https://tc39.github.io/ecma262/#sec-reflect.getprototypeof
+// https://tc39.es/ecma262/#sec-reflect.getprototypeof
_export({ target: 'Reflect', stat: true, sham: !correctPrototypeGetter }, {
getPrototypeOf: function getPrototypeOf(target) {
return objectGetPrototypeOf(anObject(target));
@@ -7803,7 +8007,7 @@ _export({ target: 'Reflect', stat: true, sham: !correctPrototypeGetter }, {
});
// `Reflect.has` method
-// https://tc39.github.io/ecma262/#sec-reflect.has
+// https://tc39.es/ecma262/#sec-reflect.has
_export({ target: 'Reflect', stat: true }, {
has: function has(target, propertyKey) {
return propertyKey in target;
@@ -7813,7 +8017,7 @@ _export({ target: 'Reflect', stat: true }, {
var objectIsExtensible = Object.isExtensible;
// `Reflect.isExtensible` method
-// https://tc39.github.io/ecma262/#sec-reflect.isextensible
+// https://tc39.es/ecma262/#sec-reflect.isextensible
_export({ target: 'Reflect', stat: true }, {
isExtensible: function isExtensible(target) {
anObject(target);
@@ -7822,13 +8026,13 @@ _export({ target: 'Reflect', stat: true }, {
});
// `Reflect.ownKeys` method
-// https://tc39.github.io/ecma262/#sec-reflect.ownkeys
+// https://tc39.es/ecma262/#sec-reflect.ownkeys
_export({ target: 'Reflect', stat: true }, {
ownKeys: ownKeys
});
// `Reflect.preventExtensions` method
-// https://tc39.github.io/ecma262/#sec-reflect.preventextensions
+// https://tc39.es/ecma262/#sec-reflect.preventextensions
_export({ target: 'Reflect', stat: true, sham: !freezing }, {
preventExtensions: function preventExtensions(target) {
anObject(target);
@@ -7843,7 +8047,7 @@ _export({ target: 'Reflect', stat: true, sham: !freezing }, {
});
// `Reflect.set` method
-// https://tc39.github.io/ecma262/#sec-reflect.set
+// https://tc39.es/ecma262/#sec-reflect.set
function set$3(target, propertyKey, V /* , receiver */) {
var receiver = arguments.length < 4 ? target : arguments[3];
var ownDescriptor = objectGetOwnPropertyDescriptor.f(anObject(target), propertyKey);
@@ -7869,9 +8073,10 @@ function set$3(target, propertyKey, V /* , receiver */) {
// MS Edge 17-18 Reflect.set allows setting the property to object
// with non-writable property on the prototype
var MS_EDGE_BUG = fails(function () {
- var object = objectDefineProperty.f({}, 'a', { configurable: true });
+ var Constructor = function () { /* empty */ };
+ var object = objectDefineProperty.f(new Constructor(), 'a', { configurable: true });
// eslint-disable-next-line no-undef
- return Reflect.set(objectGetPrototypeOf(object), 'a', 1, object) !== false;
+ return Reflect.set(Constructor.prototype, 'a', 1, object) !== false;
});
_export({ target: 'Reflect', stat: true, forced: MS_EDGE_BUG }, {
@@ -7879,7 +8084,7 @@ _export({ target: 'Reflect', stat: true, forced: MS_EDGE_BUG }, {
});
// `Reflect.setPrototypeOf` method
-// https://tc39.github.io/ecma262/#sec-reflect.setprototypeof
+// https://tc39.es/ecma262/#sec-reflect.setprototypeof
if (objectSetPrototypeOf) _export({ target: 'Reflect', stat: true }, {
setPrototypeOf: function setPrototypeOf(target, proto) {
anObject(target);
@@ -7893,6 +8098,12 @@ if (objectSetPrototypeOf) _export({ target: 'Reflect', stat: true }, {
}
});
+_export({ global: true }, { Reflect: {} });
+
+// Reflect[@@toStringTag] property
+// https://tc39.es/ecma262/#sec-reflect-@@tostringtag
+setToStringTag(global_1.Reflect, 'Reflect', true);
+
// iterable DOM collections
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
var domIterables = {
@@ -7981,13 +8192,12 @@ _export({ global: true, bind: true, enumerable: true, forced: FORCED$l }, {
});
var process$4 = global_1.process;
-var isNode = classofRaw(process$4) == 'process';
// `queueMicrotask` method
// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-queuemicrotask
_export({ global: true, enumerable: true, noTargetGet: true }, {
queueMicrotask: function queueMicrotask(fn) {
- var domain = isNode && process$4.domain;
+ var domain = engineIsNode && process$4.domain;
microtask(domain ? domain.bind(fn) : fn);
}
});
@@ -8258,7 +8468,7 @@ var deserialize = function (it) {
var find$1 = /[!'()~]|%20/g;
-var replace = {
+var replace$1 = {
'!': '%21',
"'": '%27',
'(': '%28',
@@ -8268,7 +8478,7 @@ var replace = {
};
var replacer = function (match) {
- return replace[match];
+ return replace$1[match];
};
var serialize = function (it) {
@@ -8360,7 +8570,7 @@ var URLSearchParamsConstructor = function URLSearchParams(/* init */) {
var URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;
redefineAll(URLSearchParamsPrototype, {
- // `URLSearchParams.prototype.appent` method
+ // `URLSearchParams.prototype.append` method
// https://url.spec.whatwg.org/#dom-urlsearchparams-append
append: function append(name, value) {
validateArgumentsLength(arguments.length, 2);
@@ -11145,8 +11355,8 @@ function getPredicateInfo$1(element, xmlDocument) {
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
var property = _step3.value;
- if (property.tagName != 'value' && property.tagName != 'annotations') {
- result[property.tagName] = parseInt(property.textContent) || 0;
+ if (property.tagName != 'value' && property.tagName != 'annotations' && property.textContent != '0') {
+ result[property.tagName] = 1;
}
}
} catch (err) {
@@ -12493,6 +12703,20 @@ var TemplateInstance = /*#__PURE__*/function () {
return TemplateInstance;
}();
+/**
+ * Our TrustedTypePolicy for HTML which is declared using the html template
+ * tag function.
+ *
+ * That HTML is a developer-authored constant, and is parsed with innerHTML
+ * before any untrusted expressions have been mixed in. Therefor it is
+ * considered safe by construction.
+ */
+
+var policy = window.trustedTypes && trustedTypes.createPolicy('lit-html', {
+ createHTML: function createHTML(s) {
+ return s;
+ }
+});
var commentMarker = " ".concat(marker, " ");
/**
* The return type of `html`, which holds a Template and the values from
@@ -12571,7 +12795,17 @@ var TemplateResult = /*#__PURE__*/function () {
key: "getTemplateElement",
value: function getTemplateElement() {
var template = document.createElement('template');
- template.innerHTML = this.getHTML();
+ var value = this.getHTML();
+
+ if (policy !== undefined) {
+ // this is secure because `this.strings` is a TemplateStringsArray.
+ // TODO: validate this when
+ // https://github.com/tc39/proposal-array-is-template-object is
+ // implemented.
+ value = policy.createHTML(value);
+ }
+
+ template.innerHTML = value;
return template;
}
}]);
@@ -12621,19 +12855,45 @@ var AttributeCommitter = /*#__PURE__*/function () {
value: function _getValue() {
var strings = this.strings;
var l = strings.length - 1;
+ var parts = this.parts; // If we're assigning an attribute via syntax like:
+ // attr="${foo}" or attr=${foo}
+ // but not
+ // attr="${foo} ${bar}" or attr="${foo} baz"
+ // then we don't want to coerce the attribute value into one long
+ // string. Instead we want to just return the value itself directly,
+ // so that sanitizeDOMValue can get the actual value rather than
+ // String(value)
+ // The exception is if v is an array, in which case we do want to smash
+ // it together into a string without calling String() on the array.
+ //
+ // This also allows trusted values (when using TrustedTypes) being
+ // assigned to DOM sinks without being stringified in the process.
+
+ if (l === 1 && strings[0] === '' && strings[1] === '') {
+ var v = parts[0].value;
+
+ if (_typeof(v) === 'symbol') {
+ return String(v);
+ }
+
+ if (typeof v === 'string' || !isIterable(v)) {
+ return v;
+ }
+ }
+
var text = '';
for (var i = 0; i < l; i++) {
text += strings[i];
- var part = this.parts[i];
+ var part = parts[i];
if (part !== undefined) {
- var v = part.value;
+ var _v = part.value;
- if (isPrimitive(v) || !isIterable(v)) {
- text += typeof v === 'string' ? v : String(v);
+ if (isPrimitive(_v) || !isIterable(_v)) {
+ text += typeof _v === 'string' ? _v : String(_v);
} else {
- var _iterator = _createForOfIteratorHelper(v),
+ var _iterator = _createForOfIteratorHelper(_v),
_step;
try {
@@ -13326,7 +13586,7 @@ var defaultTemplateProcessor = new DefaultTemplateProcessor();
// TODO(justinfagnani): inject version number at build time
if (typeof window !== 'undefined') {
- (window['litHtmlVersions'] || (window['litHtmlVersions'] = [])).push('1.2.1');
+ (window['litHtmlVersions'] || (window['litHtmlVersions'] = [])).push('1.3.0');
}
/**
* Interprets a template literal as an HTML template that can efficiently
@@ -13397,7 +13657,6 @@ var shadyTemplateFactory = function shadyTemplateFactory(scopeName) {
return template;
};
};
-
var TEMPLATE_TYPES = ['html', 'svg'];
/**
* Removes all style elements from Templates for the given scopeName.
@@ -13639,6 +13898,12 @@ var render$1 = function render$1(result, container, options) {
*/
var _a;
/**
+ * Use this module if you want to create your own base class extending
+ * [[UpdatingElement]].
+ * @packageDocumentation
+ */
+
+/*
* When using Closure Compiler, JSCompiler_renameProperty(property, object) is
* replaced at compile time by the munged name for object[property]. We cannot
* alias this function, so we have to use a small shim that has the same
@@ -13713,6 +13978,7 @@ var finalized = 'finalized';
* Base element class which manages element properties and attributes. When
* properties change, the `update` method is asynchronously called. This method
* should be supplied by subclassers to render updates as desired.
+ * @noInheritDoc
*/
var UpdatingElement = /*#__PURE__*/function (_HTMLElement) {
@@ -13726,24 +13992,6 @@ var UpdatingElement = /*#__PURE__*/function (_HTMLElement) {
_classCallCheck(this, UpdatingElement);
_this = _super.call(this);
- _this._updateState = 0;
- _this._instanceProperties = undefined; // Initialize to an unresolved Promise so we can make sure the element has
- // connected before first update.
-
- _this._updatePromise = new Promise(function (res) {
- return _this._enableUpdatingResolver = res;
- });
- /**
- * Map with keys for any properties that have changed since the last
- * update cycle with previous values.
- */
-
- _this._changedProperties = new Map();
- /**
- * Map with keys of properties that should be reflected when updated.
- */
-
- _this._reflectingProperties = undefined;
_this.initialize();
@@ -13763,11 +14011,19 @@ var UpdatingElement = /*#__PURE__*/function (_HTMLElement) {
* registered properties.
*/
value: function initialize() {
+ var _this2 = this;
+
+ this._updateState = 0;
+ this._updatePromise = new Promise(function (res) {
+ return _this2._enableUpdatingResolver = res;
+ });
+ this._changedProperties = new Map();
+
this._saveInstanceProperties(); // ensures first update will be caught by an early access of
// `updateComplete`
- this._requestUpdate();
+ this.requestUpdateInternal();
}
/**
* Fixes any properties set on the instance before upgrade time.
@@ -13785,20 +14041,20 @@ var UpdatingElement = /*#__PURE__*/function (_HTMLElement) {
}, {
key: "_saveInstanceProperties",
value: function _saveInstanceProperties() {
- var _this2 = this;
+ var _this3 = this;
// Use forEach so this works even if for/of loops are compiled to for loops
// expecting arrays
this.constructor._classProperties.forEach(function (_v, p) {
- if (_this2.hasOwnProperty(p)) {
- var value = _this2[p];
- delete _this2[p];
+ if (_this3.hasOwnProperty(p)) {
+ var value = _this3[p];
+ delete _this3[p];
- if (!_this2._instanceProperties) {
- _this2._instanceProperties = new Map();
+ if (!_this3._instanceProperties) {
+ _this3._instanceProperties = new Map();
}
- _this2._instanceProperties.set(p, value);
+ _this3._instanceProperties.set(p, value);
}
});
}
@@ -13809,13 +14065,13 @@ var UpdatingElement = /*#__PURE__*/function (_HTMLElement) {
}, {
key: "_applyInstanceProperties",
value: function _applyInstanceProperties() {
- var _this3 = this;
+ var _this4 = this;
// Use forEach so this works even if for/of loops are compiled to for loops
// expecting arrays
// tslint:disable-next-line:no-any
this._instanceProperties.forEach(function (v, p) {
- return _this3[p] = v;
+ return _this4[p] = v;
});
this._instanceProperties = undefined;
@@ -13918,19 +14174,19 @@ var UpdatingElement = /*#__PURE__*/function (_HTMLElement) {
}
}
/**
- * This private version of `requestUpdate` does not access or return the
+ * This protected version of `requestUpdate` does not access or return the
* `updateComplete` promise. This promise can be overridden and is therefore
* not free to access.
*/
}, {
- key: "_requestUpdate",
- value: function _requestUpdate(name, oldValue) {
+ key: "requestUpdateInternal",
+ value: function requestUpdateInternal(name, oldValue, options) {
var shouldRequestUpdate = true; // If we have a property key, perform property update steps.
if (name !== undefined) {
var ctor = this.constructor;
- var options = ctor.getPropertyOptions(name);
+ options = options || ctor.getPropertyOptions(name);
if (ctor._valueHasChanged(this[name], oldValue, options.hasChanged)) {
if (!this._changedProperties.has(name)) {
@@ -13975,8 +14231,7 @@ var UpdatingElement = /*#__PURE__*/function (_HTMLElement) {
}, {
key: "requestUpdate",
value: function requestUpdate(name, oldValue) {
- this._requestUpdate(name, oldValue);
-
+ this.requestUpdateInternal(name, oldValue);
return this.updateComplete;
}
/**
@@ -14055,7 +14310,14 @@ var UpdatingElement = /*#__PURE__*/function (_HTMLElement) {
* ```
*/
value: function performUpdate() {
- // Mixin instance properties once, if they exist.
+ // Abort any update if one is not pending when this is called.
+ // This can happen if `performUpdate` is called early to "flush"
+ // the update.
+ if (!this._hasRequestedUpdate) {
+ return;
+ } // Mixin instance properties once, if they exist.
+
+
if (this._instanceProperties) {
this._applyInstanceProperties();
}
@@ -14159,13 +14421,13 @@ var UpdatingElement = /*#__PURE__*/function (_HTMLElement) {
}, {
key: "update",
value: function update(_changedProperties) {
- var _this4 = this;
+ var _this5 = this;
if (this._reflectingProperties !== undefined && this._reflectingProperties.size > 0) {
// Use forEach so this works even if for/of loops are compiled to for
// loops expecting arrays
this._reflectingProperties.forEach(function (v, k) {
- return _this4._propertyToAttribute(k, _this4[k], v);
+ return _this5._propertyToAttribute(k, _this5[k], v);
});
this._reflectingProperties = undefined;
@@ -14225,7 +14487,7 @@ var UpdatingElement = /*#__PURE__*/function (_HTMLElement) {
/** @nocollapse */
value: function _ensureClassProperties() {
- var _this5 = this;
+ var _this6 = this;
// ensure private storage for property declarations.
if (!this.hasOwnProperty(JSCompiler_renameProperty('_classProperties', this))) {
@@ -14235,7 +14497,7 @@ var UpdatingElement = /*#__PURE__*/function (_HTMLElement) {
if (superProperties !== undefined) {
superProperties.forEach(function (v, k) {
- return _this5._classProperties.set(k, v);
+ return _this6._classProperties.set(k, v);
});
}
}
@@ -14318,7 +14580,7 @@ var UpdatingElement = /*#__PURE__*/function (_HTMLElement) {
}, {
key: "getPropertyDescriptor",
- value: function getPropertyDescriptor(name, key, _options) {
+ value: function getPropertyDescriptor(name, key, options) {
return {
// tslint:disable-next-line:no-any no symbol in index
get: function get() {
@@ -14327,8 +14589,7 @@ var UpdatingElement = /*#__PURE__*/function (_HTMLElement) {
set: function set(value) {
var oldValue = this[name];
this[key] = value;
-
- this._requestUpdate(name, oldValue);
+ this.requestUpdateInternal(name, oldValue, options);
},
configurable: true,
enumerable: true
@@ -14464,7 +14725,7 @@ var UpdatingElement = /*#__PURE__*/function (_HTMLElement) {
}, {
key: "observedAttributes",
get: function get() {
- var _this6 = this;
+ var _this7 = this;
// note: piggy backing on this to ensure we're finalized.
this.finalize();
@@ -14472,10 +14733,10 @@ var UpdatingElement = /*#__PURE__*/function (_HTMLElement) {
// expecting arrays
this._classProperties.forEach(function (v, p) {
- var attr = _this6._attributeNameForProperty(p, v);
+ var attr = _this7._attributeNameForProperty(p, v);
if (attr !== undefined) {
- _this6._attributeToPropertyMap.set(attr, p);
+ _this7._attributeToPropertyMap.set(attr, p);
attributes.push(attr);
}
@@ -14504,7 +14765,11 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
part of the polymer project is also subject to an additional IP rights grant
found at http://polymer.github.io/PATENTS.txt
*/
-var supportsAdoptingStyleSheets = 'adoptedStyleSheets' in Document.prototype && 'replace' in CSSStyleSheet.prototype;
+
+/**
+ * Whether the current browser supports `adoptedStyleSheets`.
+ */
+var supportsAdoptingStyleSheets = window.ShadowRoot && (window.ShadyCSS === undefined || window.ShadyCSS.nativeShadow) && 'adoptedStyleSheets' in Document.prototype && 'replace' in CSSStyleSheet.prototype;
var constructionToken = Symbol();
var CSSResult = /*#__PURE__*/function () {
function CSSResult(cssText, safeToken) {
@@ -14528,8 +14793,8 @@ var CSSResult = /*#__PURE__*/function () {
key: "styleSheet",
get: function get() {
if (this._styleSheet === undefined) {
- // Note, if `adoptedStyleSheets` is supported then we assume CSSStyleSheet
- // is constructable.
+ // Note, if `supportsAdoptingStyleSheets` is true then we assume
+ // CSSStyleSheet is constructable.
if (supportsAdoptingStyleSheets) {
this._styleSheet = new CSSStyleSheet();
@@ -14545,6 +14810,17 @@ var CSSResult = /*#__PURE__*/function () {
return CSSResult;
}();
+/**
+ * Wrap a value for interpolation in a [[`css`]] tagged template literal.
+ *
+ * This is unsafe because untrusted CSS text can be used to phone home
+ * or exfiltrate data to an attacker controlled site. Take care to only use
+ * this with trusted input.
+ */
+
+var unsafeCSS = function unsafeCSS(value) {
+ return new CSSResult(String(value), constructionToken);
+};
var textFromCSSResult = function textFromCSSResult(value) {
if (value instanceof CSSResult) {
@@ -14556,10 +14832,10 @@ var textFromCSSResult = function textFromCSSResult(value) {
}
};
/**
- * Template tag which which can be used with LitElement's `style` property to
- * set element styles. For security reasons, only literal string values may be
- * used. To incorporate non-literal values `unsafeCSS` may be used inside a
- * template string part.
+ * Template tag which which can be used with LitElement's [[LitElement.styles |
+ * `styles`]] property to set element styles. For security reasons, only literal
+ * string values may be used. To incorporate non-literal values [[`unsafeCSS`]]
+ * may be used inside a template string part.
*/
@@ -14577,13 +14853,22 @@ var css = function css(strings) {
// This line will be used in regexes to search for LitElement usage.
// TODO(justinfagnani): inject version number at build time
-(window['litElementVersions'] || (window['litElementVersions'] = [])).push('2.3.1');
+(window['litElementVersions'] || (window['litElementVersions'] = [])).push('2.4.0');
/**
* Sentinal value used to avoid calling lit-html's render function when
* subclasses do not implement `render`
*/
var renderNotImplemented = {};
+/**
+ * Base element class that manages element properties and attributes, and
+ * renders a lit-html template.
+ *
+ * To define a component, subclass `LitElement` and implement a
+ * `render` method to provide the component's template. Define properties
+ * using the [[`properties`]] property or the [[`property`]] decorator.
+ */
+
var LitElement = /*#__PURE__*/function (_UpdatingElement) {
_inherits(LitElement, _UpdatingElement);
@@ -14599,9 +14884,9 @@ var LitElement = /*#__PURE__*/function (_UpdatingElement) {
key: "initialize",
/**
- * Performs element initialization. By default this calls `createRenderRoot`
- * to create the element `renderRoot` node and captures any pre-set values for
- * registered properties.
+ * Performs element initialization. By default this calls
+ * [[`createRenderRoot`]] to create the element [[`renderRoot`]] node and
+ * captures any pre-set values for registered properties.
*/
value: function initialize() {
_get(_getPrototypeOf(LitElement.prototype), "initialize", this).call(this);
@@ -14632,7 +14917,7 @@ var LitElement = /*#__PURE__*/function (_UpdatingElement) {
});
}
/**
- * Applies styling to the element shadowRoot using the `static get styles`
+ * Applies styling to the element shadowRoot using the [[`styles`]]
* property. Styling will apply using `shadowRoot.adoptedStyleSheets` where
* available and will fallback otherwise. When Shadow DOM is polyfilled,
* ShadyCSS scopes styles and adds them to the document. When Shadow DOM
@@ -14650,7 +14935,7 @@ var LitElement = /*#__PURE__*/function (_UpdatingElement) {
return;
} // There are three separate cases here based on Shadow DOM support.
// (1) shadowRoot polyfilled: use ShadyCSS
- // (2) shadowRoot.adoptedStyleSheets available: use it.
+ // (2) shadowRoot.adoptedStyleSheets available: use it
// (3) shadowRoot.adoptedStyleSheets polyfilled: append styles after
// rendering
@@ -14661,7 +14946,7 @@ var LitElement = /*#__PURE__*/function (_UpdatingElement) {
}), this.localName);
} else if (supportsAdoptingStyleSheets) {
this.renderRoot.adoptedStyleSheets = styles.map(function (s) {
- return s.styleSheet;
+ return s instanceof CSSStyleSheet ? s : s.styleSheet;
});
} else {
// This must be done after rendering so the actual style insertion is done
@@ -14723,9 +15008,9 @@ var LitElement = /*#__PURE__*/function (_UpdatingElement) {
}
/**
* Invoked on each update to perform rendering tasks. This method may return
- * any value renderable by lit-html's NodePart - typically a TemplateResult.
- * Setting properties inside this method will *not* trigger the element to
- * update.
+ * any value renderable by lit-html's `NodePart` - typically a
+ * `TemplateResult`. Setting properties inside this method will *not* trigger
+ * the element to update.
*/
}, {
@@ -14763,9 +15048,7 @@ var LitElement = /*#__PURE__*/function (_UpdatingElement) {
var userStyles = this.getStyles();
- if (userStyles === undefined) {
- this._styles = [];
- } else if (Array.isArray(userStyles)) {
+ if (Array.isArray(userStyles)) {
// De-duplicate styles preserving the _last_ instance in the set.
// This is a performance optimization to avoid duplicated styles that can
// occur especially when composing via subclassing.
@@ -14789,8 +15072,29 @@ var LitElement = /*#__PURE__*/function (_UpdatingElement) {
});
this._styles = styles;
} else {
- this._styles = [userStyles];
- }
+ this._styles = userStyles === undefined ? [] : [userStyles];
+ } // Ensure that there are no invalid CSSStyleSheet instances here. They are
+ // invalid in two conditions.
+ // (1) the sheet is non-constructible (`sheet` of a HTMLStyleElement), but
+ // this is impossible to check except via .replaceSync or use
+ // (2) the ShadyCSS polyfill is enabled (:. supportsAdoptingStyleSheets is
+ // false)
+
+
+ this._styles = this._styles.map(function (s) {
+ if (s instanceof CSSStyleSheet && !supportsAdoptingStyleSheets) {
+ // Flatten the cssText from the passed constructible stylesheet (or
+ // undetectable non-constructible stylesheet). The user might have
+ // expected to update their stylesheets over time, but the alternative
+ // is a crash.
+ var cssText = Array.prototype.slice.call(s.cssRules).reduce(function (css, rule) {
+ return css + rule.cssText;
+ }, '');
+ return unsafeCSS(cssText);
+ }
+
+ return s;
+ });
}
}]);
@@ -14806,10 +15110,20 @@ var LitElement = /*#__PURE__*/function (_UpdatingElement) {
LitElement['finalized'] = true;
/**
- * Render method used to render the value to the element's DOM.
- * @param result The value to render.
- * @param container Node into which to render.
- * @param options Element name.
+ * Reference to the underlying library method used to render the element's
+ * DOM. By default, points to the `render` method from lit-html's shady-render
+ * module.
+ *
+ * **Most users will never need to touch this property.**
+ *
+ * This property should not be confused with the `render` instance method,
+ * which should be overridden to define a template for the element.
+ *
+ * Advanced users creating a new base class based on LitElement can override
+ * this property to point to a custom render method with a signature that
+ * matches [shady-render's `render`
+ * method](https://lit-html.polymer-project.org/api/modules/shady_render.html#render).
+ *
* @nocollapse
*/
@@ -15907,7 +16221,7 @@ function _templateObject2$1() {
}
function _templateObject$1() {
- var data = _taggedTemplateLiteral(["\n :host, .gscape-panel{\n font-family : \"Open Sans\",\"Helvetica Neue\",Helvetica,sans-serif;\n display: block;\n position: absolute;\n color: var(--theme-gscape-on-primary, ", ");\n background-color:var(--theme-gscape-primary, ", ");\n box-shadow: 0 2px 4px 0 var(--theme-gscape-shadows, ", ");\n border-radius: 8px;\n transition: opacity 0.2s;\n scrollbar-width: thin;\n }\n\n :host(:hover){\n box-shadow: 0 4px 8px 0 var(--theme-gscape-shadows, ", ");\n }\n\n .hide {\n display:none;\n }\n\n .widget-body {\n width: 100%;\n max-height:450px;\n border-top:solid 1px var(--theme-gscape-shadows, ", ");\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit;\n overflow:auto;\n scrollbar-width: inherit;\n }\n\n .gscape-panel {\n position: absolute;\n bottom: 40px;\n width: auto;\n padding:10px;\n overflow: unset;\n border: none;\n }\n\n .gscape-panel::after {\n content: \"\";\n position: absolute;\n top: 100%;\n left: 16px;\n margin-left: -8px;\n border-width: 8px;\n border-style: solid;\n border-color: #ddd transparent transparent transparent;\n }\n\n .gscape-panel-title{\n font-weight: bold;\n text-align: center;\n margin-bottom: 10px;\n }\n\n .widget-body .section:last-of-type {\n margin-bottom: 12px;\n }\n\n .widget-body .section-header {\n text-align: center;\n font-weight: bold;\n border-bottom: solid 1px var(--theme-gscape-shadows, ", ");\n color: var(--theme-gscape-secondary, ", ");\n width: 85%;\n margin: auto;\n margin-bottom: 10px;\n padding-bottom: 5px;\n }\n\n .description {\n margin-bottom: 20px;\n }\n\n .description:last-of-type {\n margin-bottom: 0;\n }\n\n .description .language {\n min-width: 50px;\n display: inline-block;\n font-weight: bold;\n color: var(--theme-gscape-secondary, ", ");\n margin: 5px;\n }\n\n .section { padding: 10px; }\n\n .details_table{\n border-spacing: 0;\n }\n\n .details_table th {\n color: var(--theme-gscape-secondary, ", ");\n border-right: solid 1px var(--theme-gscape-shadows, ", ");\n font-weight: bold;\n text-align:left;\n min-width: 50px;\n }\n\n .details_table th, td {\n padding:5px 8px;\n white-space: nowrap;\n }\n\n .highlight:hover {\n color: var(--theme-gscape-on-secondary, ", ");\n background-color:var(--theme-gscape-secondary, ", ");\n }\n\n /* width */\n ::-webkit-scrollbar {\n width: 5px;\n height: 5px;\n }\n\n /* Track */\n ::-webkit-scrollbar-track {\n background: #f0f0f0;\n }\n\n /* Handle */\n ::-webkit-scrollbar-thumb {\n background: #cdcdcd;\n }\n\n /* Handle on hover */\n ::-webkit-scrollbar-thumb:hover {\n background: #888;\n }\n\n .clickable {\n font-weight:bold;\n text-decoration: underline;\n }\n\n .clickable:hover {\n cursor:pointer;\n color: var(--theme-gscape-secondary-dark, ", ");\n }\n\n "]);
+ var data = _taggedTemplateLiteral(["\n :host, .gscape-panel{\n font-family : \"Open Sans\",\"Helvetica Neue\",Helvetica,sans-serif;\n display: block;\n position: absolute;\n color: var(--theme-gscape-on-primary, ", ");\n background-color:var(--theme-gscape-primary, ", ");\n box-shadow: 0 2px 4px 0 var(--theme-gscape-shadows, ", ");\n border-radius: 8px;\n transition: opacity 0.2s;\n scrollbar-width: thin;\n --mdc-icon-button-size: 24px;\n }\n\n :host(:hover){\n box-shadow: 0 4px 8px 0 var(--theme-gscape-shadows, ", ");\n }\n\n .hide {\n display:none;\n }\n\n .widget-body {\n width: 100%;\n max-height:450px;\n border-top:solid 1px var(--theme-gscape-shadows, ", ");\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit;\n overflow:auto;\n scrollbar-width: inherit;\n }\n\n .gscape-panel {\n position: absolute;\n bottom: 40px;\n width: auto;\n padding:10px;\n overflow: unset;\n border: none;\n }\n\n .gscape-panel::after {\n content: \"\";\n position: absolute;\n top: 100%;\n left: 16px;\n margin-left: -8px;\n border-width: 8px;\n border-style: solid;\n border-color: #ddd transparent transparent transparent;\n }\n\n .gscape-panel-title{\n font-weight: bold;\n text-align: center;\n margin-bottom: 10px;\n }\n\n .widget-body .section:last-of-type {\n margin-bottom: 12px;\n }\n\n .widget-body .section-header {\n text-align: center;\n font-weight: bold;\n border-bottom: solid 1px var(--theme-gscape-shadows, ", ");\n color: var(--theme-gscape-secondary, ", ");\n width: 85%;\n margin: auto;\n margin-bottom: 10px;\n padding-bottom: 5px;\n }\n\n .description {\n margin-bottom: 20px;\n }\n\n .description:last-of-type {\n margin-bottom: 0;\n }\n\n .description .language {\n min-width: 50px;\n display: inline-block;\n font-weight: bold;\n color: var(--theme-gscape-secondary, ", ");\n margin: 5px;\n }\n\n .section { padding: 10px; }\n\n .details_table{\n border-spacing: 0;\n }\n\n .details_table th {\n color: var(--theme-gscape-secondary, ", ");\n border-right: solid 1px var(--theme-gscape-shadows, ", ");\n font-weight: bold;\n text-align:left;\n min-width: 50px;\n }\n\n .details_table th, td {\n padding:5px 8px;\n white-space: nowrap;\n }\n\n .highlight:hover {\n color: var(--theme-gscape-on-secondary, ", ");\n background-color:var(--theme-gscape-secondary, ", ");\n }\n\n /* width */\n ::-webkit-scrollbar {\n width: 5px;\n height: 5px;\n }\n\n /* Track */\n ::-webkit-scrollbar-track {\n background: #f0f0f0;\n }\n\n /* Handle */\n ::-webkit-scrollbar-thumb {\n background: #cdcdcd;\n }\n\n /* Handle on hover */\n ::-webkit-scrollbar-thumb:hover {\n background: #888;\n }\n\n .clickable {\n font-weight:bold;\n text-decoration: underline;\n }\n\n .clickable:hover {\n cursor:pointer;\n color: var(--theme-gscape-secondary-dark, ", ");\n }\n\n "]);
_templateObject$1 = function _templateObject() {
return data;
@@ -16071,10 +16385,15 @@ var GscapeWidget = /*#__PURE__*/function (_LitElement) {
value: function blur() {
this.collapseBody();
}
+ }, {
+ key: "isCustomIcon",
+ value: function isCustomIcon(icon) {
+ return typeof icon !== 'string';
+ }
}, {
key: "isVisible",
get: function get() {
- return this.style.display !== 'none' ? true : false;
+ return this.style.display !== 'none';
}
}, {
key: "hiddenDefault",
@@ -16096,8 +16415,38 @@ var GscapeWidget = /*#__PURE__*/function (_LitElement) {
return GscapeWidget;
}(LitElement); //customElements.define('gscape-widget', GscapeWidget)
+function _templateObject5$1() {
+ var data = _taggedTemplateLiteral(["\n :host {\n display:flex;\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: var(--header-padding, 8px);\n }\n\n .head-btn {\n color:var(--theme-gscape-on-primary, ", ");\n right:0;\n cursor:pointer;\n }\n\n .head-btn:hover{\n color:var(--theme-gscape-secondary, ", ");\n }\n\n .head-title {\n padding: var(--title-padding, 0 10px);\n box-sizing: border-box;\n font-weight:bold;\n cursor:grab;\n width: var(--title-width, '');\n text-align: var(--title-text-align, 'left');\n justify-self: flex-start;\n }\n\n "]);
+
+ _templateObject5$1 = function _templateObject5() {
+ return data;
+ };
+
+ return data;
+}
+
+function _templateObject4$1() {
+ var data = _taggedTemplateLiteral(["\n
Name | \n", " | \n
---|---|
Type | \n", " | \n