diff --git a/application/controllers/admin/DataEntry.php b/application/controllers/admin/DataEntry.php
index b78c00bf284..7d45fa79153 100644
--- a/application/controllers/admin/DataEntry.php
+++ b/application/controllers/admin/DataEntry.php
@@ -615,31 +615,43 @@ public function editdata($subaction, $id, $surveyid)
$nfncount--;
}
}
+
+ $questionTypes = QuestionType::modelsAttributes();
$aDataentryoutput = '';
foreach ($results as $idrow) {
$fname = reset($fnames);
do {
$question = $fname['question'];
+ $questionTypeClass = isset($questionTypes[$fname['type']]) ? $questionTypes[$fname['type']]['class'] : '';
$aDataentryoutput .= "\t
"
- . "\n";
+ $aDataentryoutput .= ">\n";
+ // First column (Question)
+ $aDataentryoutput .= "";
$aDataentryoutput .= stripJavaScript($question);
- $aDataentryoutput .= " | \n"
- . "\n";
+ $aDataentryoutput .= " | \n";
+ // Second column (Answer)
+ $aDataentryoutput .= "\n";
//$aDataentryoutput .= "\t-={$fname[3]}=-"; //Debugging info
$qidattributes = [];
if (isset($fname['qid']) && isset($fname['type'])) {
$qidattributes = QuestionAttribute::model()->getQuestionAttributes($fname['qid']);
}
- switch ($fname['type']) {
+ /** @var array */
+ $questionInputs = [];
+ /** @var array "Unseen" status for each field. */
+ $unseenStatus = [
+ $fname['fieldname'] => !isset($idrow[$fname['fieldname']])
+ ];
+ $answerWrapperClass = '';
+ $fieldType = $fname['type'];
+ switch ($fieldType) {
case "completed":
$selected = (empty($idrow['submitdate'])) ? 'N' : 'Y';
$select_options = array(
@@ -651,20 +663,25 @@ public function editdata($subaction, $id, $surveyid)
break;
case Question::QT_X_TEXT_DISPLAY: //Boilerplate question
- $aDataentryoutput .= "";
+ // We add an empty entry here so the "Unseen" checkbox is displayed.
+ // Although a value can't be entered, there is still a difference between
+ // Text Display questions shown and not shown.
+ $questionInputs[$fname['fieldname']] = "";
break;
case Question::QT_Q_MULTIPLE_SHORT_TEXT:
- $aDataentryoutput .= $fname['subquestion'] . ' ';
- $aDataentryoutput .= CHtml::textField($fname['fieldname'], $idrow[$fname['fieldname']]);
+ $questionInput = $fname['subquestion'] . ' ';
+ $questionInput .= CHtml::textField($fname['fieldname'], $idrow[$fname['fieldname']]);
+ $questionInputs[$fname['fieldname']] = $questionInput;
break;
case Question::QT_K_MULTIPLE_NUMERICAL:
- $aDataentryoutput .= $fname['subquestion'] . ' ';
+ $questionInput = $fname['subquestion'] . ' ';
/* Fix DB DECIMAL type */
$value = $idrow[$fname['fieldname']];
if (strpos((string) $value, ".")) {
$value = rtrim(rtrim((string) $value, "0"), ".");
}
- $aDataentryoutput .= CHtml::textField($fname['fieldname'], $value, array('pattern' => "[-]?([0-9]{0,20}([\.][0-9]{0,10})?)?",'title' => gT("Only numbers may be entered in this field.")));
+ $questionInput .= CHtml::textField($fname['fieldname'], $value, array('pattern' => "[-]?([0-9]{0,20}([\.][0-9]{0,10})?)?",'title' => gT("Only numbers may be entered in this field.")));
+ $questionInputs[$fname['fieldname']] = $questionInput;
break;
case "id":
$aDataentryoutput .= CHtml::tag('span', array('style' => 'font-weight: bold;'), ' ' . $idrow[$fname['fieldname']]);
@@ -673,16 +690,24 @@ public function editdata($subaction, $id, $surveyid)
$aDataentryoutput .= CHtml::tag('span', array(), ' ' . $idrow[$fname['fieldname']]);
break;
case Question::QT_5_POINT_CHOICE: //5 POINT CHOICE radio-buttons
+ $questionInput = '';
for ($i = 1; $i <= 5; $i++) {
$checked = false;
if ($idrow[$fname['fieldname']] == $i) {
$checked = true;
}
- $aDataentryoutput .= '';
- $aDataentryoutput .= CHtml::radioButton($fname['fieldname'], $checked, array('class' => '', 'value' => $i, 'id' => '5-point-choice-' . $i));
- $aDataentryoutput .= '';
- $aDataentryoutput .= '';
+ $questionInput .= '';
+ $questionInput .= CHtml::radioButton($fname['fieldname'], $checked, array('class' => '', 'value' => $i, 'id' => '5-point-choice-' . $i));
+ $questionInput .= '';
+ $questionInput .= ' ';
+ }
+ //Add 'No Answer'
+ $questionInput .= " 'return window.LS.goodchars(event,\'' . $goodchars . '\')'
)
);
- $aDataentryoutput .= CHtml::hiddenField(
+ $questionInput .= CHtml::hiddenField(
'dateformat' . $fname['fieldname'],
$dateformatdetails['jsdate'],
array('id' => "dateformat{$fname['fieldname']}")
);
+ $questionInputs[$fname['fieldname']] = $questionInput;
} else {
if ($datetimeobj) {
$thisdate = $datetimeobj->format("Y-m-d\TH:i");
}
- $aDataentryoutput .= CHtml::dateTimeLocalField($fname['fieldname'], $thisdate);
+ $questionInputs[$fname['fieldname']] = CHtml::dateTimeLocalField($fname['fieldname'], $thisdate);
}
break;
case Question::QT_G_GENDER: //GENDER drop-down list
@@ -728,7 +754,7 @@ public function editdata($subaction, $id, $surveyid)
'F' => gT("Female"),
'M' => gT("Male")
);
- $aDataentryoutput .= CHtml::listBox($fname['fieldname'], $idrow[$fname['fieldname']], $select_options);
+ $questionInputs[$fname['fieldname']] = CHtml::listBox($fname['fieldname'], $idrow[$fname['fieldname']], $select_options);
break;
case Question::QT_L_LIST: //LIST drop-down
case Question::QT_EXCLAMATION_LIST_DROPDOWN: //List (Radio)
@@ -740,23 +766,24 @@ public function editdata($subaction, $id, $surveyid)
}
if (substr((string) $fname['fieldname'], -5) == "other") {
- $aDataentryoutput .= "\t\n";
} else {
$lresult = Answer::model()->with('answerl10ns')->findAll(array('condition' => 'qid =:qid AND language = :language', 'params' => array('qid' => $fname['qid'], 'language' => $sDataEntryLanguage)));
- $aDataentryoutput .= "\t\n";
+ $questionInput .= "\t\n";
+ $questionInputs[$fname['fieldname']] = $questionInput;
}
break;
case Question::QT_O_LIST_WITH_COMMENT: //LIST WITH COMMENT drop-down/radio-button list + textarea
$lresult = Answer::model()->findAll("qid={$fname['qid']}");
- $aDataentryoutput .= "\t |
\n";
} while ($fname = next($fnames));
@@ -1346,6 +1413,13 @@ public function editdata($subaction, $id, $surveyid)
$aDataentryoutput .= "\n";
+ // Register JS variables for localized messages
+ Yii::app()->getClientScript()->registerScript("dataentry-vars", "
+ var invalidUnseenCheckboxMessage = '" . gT("If the field is marked as Unseen no value should be set.") . "';
+ ", LSYii_ClientScript::POS_BEGIN);
+
+ Yii::app()->getClientScript()->registerScriptFile(Yii::app()->getConfig('adminscripts') . 'dataentry.js');
+
$aViewUrls['output'] = $aDataentryoutput;
$aData['sidemenu']['state'] = false;
$aData['topbar']['rightButtons'] = Yii::app()->getController()->renderPartial(
@@ -1456,6 +1530,25 @@ public function update()
continue;
}
$thisvalue = Yii::app()->request->getPost($fieldname, '');
+ // For questions, if the "Unseen" checkbox is checked, we must set the field to null.
+ // There are some special cases we need to handle.
+ if ($irow['type'] == Question::QT_R_RANKING) {
+ $unseenFieldName = "unseen:" . $irow['sid'] . 'X' . $irow['gid'] . 'X' . $irow['qid'];
+ } elseif ($irow['type'] == Question::QT_P_MULTIPLE_CHOICE_WITH_COMMENTS) {
+ // Remove trailing "comment" from the fieldname, if present
+ $unseenFieldName = "unseen:" . preg_replace('/comment$/', '', $fieldname);
+ } else {
+ $unseenFieldName = "unseen:" . $fieldname;
+ }
+ if (!empty($irow['title']) && Yii::app()->request->getPost($unseenFieldName, false)) {
+ // Throw an error if "unseen" is checked but the field is not empty. This should never happen.
+ if ($thisvalue !== '') {
+ Yii::app()->setFlashMessage(sprintf(gT("Question %s was marked as \"Unseen\" but a value was provided. The \"Unseen\" status has been ignored."), $irow['title']), 'warning');
+ } else {
+ $oResponse->$fieldname = null;
+ continue;
+ }
+ }
switch ($irow['type']) {
case 'lastpage':
// Last page not updated : not in view
diff --git a/assets/admin_themes/adminbasics_temporary/000-lime-admin-common.scss b/assets/admin_themes/adminbasics_temporary/000-lime-admin-common.scss
index 4790eaaeb00..eaba6ae2dde 100644
--- a/assets/admin_themes/adminbasics_temporary/000-lime-admin-common.scss
+++ b/assets/admin_themes/adminbasics_temporary/000-lime-admin-common.scss
@@ -3490,4 +3490,79 @@ html[dir="rtl"] th {
#rel-eq-th, td.relevance-equation {
display: none;
}
+}
+
+/** Styles for Data Entry screen */
+#responsedetail {
+ .checkbox {
+ input[type="checkbox"] {
+ margin-left: 0;
+ }
+ label {
+ padding-left: 0px;
+ }
+ }
+
+ .answer-item {
+ display:flex;
+ gap:1em;
+ margin-bottom: 1em;
+ }
+
+ .checkbox.unseen-checkbox {
+ margin-top: 0;
+ min-width: 6em;
+ }
+
+ .checkbox:not(.unseen-checkbox) {
+ margin-top: 0;
+ }
+
+ tr.multiple-opt-comments {
+ input[type="text"] {
+ width: 100%;
+ }
+ .checkbox {
+ margin-bottom: 0;
+ }
+ .answer-wrapper {
+ display: flex;
+ flex-wrap: wrap;
+ gap: .5em;
+ }
+ }
+
+ tr.array-5-pt,
+ tr.array-10-pt,
+ tr.array-yes-uncertain-no,
+ tr.array-increase-same-decrease,
+ tr.array-flexible-row,
+ tr.array-flexible-column,
+ tr.array-flexible-dual-scale {
+ .answer-wrapper {
+ display: flex;
+ gap: 1em;
+ }
+ .answer-wrapper > span {
+ flex: 1;
+ }
+ .answer-wrapper > span:first-of-type {
+ text-align: end;
+ }
+ }
+
+ tr.array-multi-flexi,
+ tr.array-multi-flexi-text {
+ .answer-wrapper {
+ display: flex;
+ gap: 1em;
+ }
+ .answer-wrapper > span {
+ flex: 1;
+ }
+ }
+
+ .answer-wrapper {
+ flex-grow: 1;
+ }
}
\ No newline at end of file
diff --git a/assets/packages/adminbasics/build/adminbasics.js b/assets/packages/adminbasics/build/adminbasics.js
index eee671c1fc3..9ea2719cf2f 100644
--- a/assets/packages/adminbasics/build/adminbasics.js
+++ b/assets/packages/adminbasics/build/adminbasics.js
@@ -1,35594 +1,29015 @@
(function (factory) {
- typeof define === 'function' && define.amd ? define(factory) :
- factory();
+ typeof define === 'function' && define.amd ? define(factory) :
+ factory();
})((function () { 'use strict';
- function _typeof(obj) {
- "@babel/helpers - typeof";
-
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
- return typeof obj;
- } : function (obj) {
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
- }, _typeof(obj);
- }
-
- function _classCallCheck(instance, Constructor) {
- if (!(instance instanceof Constructor)) {
- throw new TypeError("Cannot call a class as a function");
- }
- }
-
- function _defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || false;
- descriptor.configurable = true;
- if ("value" in descriptor) descriptor.writable = true;
- Object.defineProperty(target, descriptor.key, descriptor);
- }
- }
-
- function _createClass(Constructor, protoProps, staticProps) {
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
- if (staticProps) _defineProperties(Constructor, staticProps);
- Object.defineProperty(Constructor, "prototype", {
- writable: false
- });
- return Constructor;
- }
-
- function _inherits(subClass, superClass) {
- if (typeof superClass !== "function" && superClass !== null) {
- throw new TypeError("Super expression must either be null or a function");
- }
-
- subClass.prototype = Object.create(superClass && superClass.prototype, {
- constructor: {
- value: subClass,
- writable: true,
- configurable: true
- }
- });
- Object.defineProperty(subClass, "prototype", {
- writable: false
- });
- if (superClass) _setPrototypeOf(subClass, superClass);
- }
-
- function _getPrototypeOf(o) {
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
- return o.__proto__ || Object.getPrototypeOf(o);
- };
- return _getPrototypeOf(o);
- }
-
- function _setPrototypeOf(o, p) {
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
- o.__proto__ = p;
- return o;
- };
-
- return _setPrototypeOf(o, p);
- }
-
- function _isNativeReflectConstruct() {
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
- if (Reflect.construct.sham) return false;
- if (typeof Proxy === "function") return true;
-
- try {
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
- return true;
- } catch (e) {
- return false;
- }
- }
-
- function _assertThisInitialized(self) {
- if (self === void 0) {
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
- }
-
- return self;
- }
-
- function _possibleConstructorReturn(self, call) {
- if (call && (typeof call === "object" || typeof call === "function")) {
- return call;
- } else if (call !== void 0) {
- throw new TypeError("Derived constructors may only return object or undefined");
- }
-
- return _assertThisInitialized(self);
- }
-
- function _createSuper(Derived) {
- var hasNativeReflectConstruct = _isNativeReflectConstruct();
-
- return function _createSuperInternal() {
- var Super = _getPrototypeOf(Derived),
- result;
-
- if (hasNativeReflectConstruct) {
- var NewTarget = _getPrototypeOf(this).constructor;
-
- result = Reflect.construct(Super, arguments, NewTarget);
- } else {
- result = Super.apply(this, arguments);
- }
-
- return _possibleConstructorReturn(this, result);
- };
- }
-
- function _superPropBase(object, property) {
- while (!Object.prototype.hasOwnProperty.call(object, property)) {
- object = _getPrototypeOf(object);
- if (object === null) break;
- }
-
- return object;
- }
-
- function _get() {
- if (typeof Reflect !== "undefined" && Reflect.get) {
- _get = Reflect.get;
- } else {
- _get = function _get(target, property, receiver) {
- var base = _superPropBase(target, property);
-
- if (!base) return;
- var desc = Object.getOwnPropertyDescriptor(base, property);
-
- if (desc.get) {
- return desc.get.call(arguments.length < 3 ? target : receiver);
- }
-
- return desc.value;
- };
- }
-
- return _get.apply(this, arguments);
- }
-
- function _toConsumableArray(arr) {
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
- }
-
- function _arrayWithoutHoles(arr) {
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
- }
-
- function _iterableToArray(iter) {
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
- }
-
- function _unsupportedIterableToArray(o, minLen) {
- if (!o) return;
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
- var n = Object.prototype.toString.call(o).slice(8, -1);
- if (n === "Object" && o.constructor) n = o.constructor.name;
- if (n === "Map" || n === "Set") return Array.from(o);
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
- }
-
- function _arrayLikeToArray(arr, len) {
- if (len == null || len > arr.length) len = arr.length;
-
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
-
- return arr2;
- }
-
- function _nonIterableSpread() {
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
- }
-
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
-
- function createCommonjsModule(fn, module) {
- return module = { exports: {} }, fn(module, module.exports), module.exports;
- }
-
- var check = function (it) {
- return it && it.Math == Math && it;
- }; // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
-
-
- var global_1 = // eslint-disable-next-line es/no-global-this -- safe
- check(typeof globalThis == 'object' && globalThis) || check(typeof window == 'object' && window) || // eslint-disable-next-line no-restricted-globals -- safe
- check(typeof self == 'object' && self) || check(typeof commonjsGlobal == 'object' && commonjsGlobal) || // eslint-disable-next-line no-new-func -- fallback
- function () {
- return this;
- }() || Function('return this')();
-
- var fails = function (exec) {
- try {
- return !!exec();
- } catch (error) {
- return true;
- }
- };
-
- var descriptors = !fails(function () {
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
- return Object.defineProperty({}, 1, {
- get: function () {
- return 7;
- }
- })[1] != 7;
- });
-
- var functionBindNative = !fails(function () {
- var test = function () {
- /* empty */
- }.bind(); // eslint-disable-next-line no-prototype-builtins -- safe
-
-
- return typeof test != 'function' || test.hasOwnProperty('prototype');
- });
-
- var call$2 = Function.prototype.call;
- var functionCall = functionBindNative ? call$2.bind(call$2) : function () {
- return call$2.apply(call$2, arguments);
- };
-
- var $propertyIsEnumerable$2 = {}.propertyIsEnumerable; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
-
- var getOwnPropertyDescriptor$8 = Object.getOwnPropertyDescriptor; // Nashorn ~ JDK8 bug
-
- var NASHORN_BUG = getOwnPropertyDescriptor$8 && !$propertyIsEnumerable$2.call({
- 1: 2
- }, 1); // `Object.prototype.propertyIsEnumerable` method implementation
- // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
-
- var f$8 = NASHORN_BUG ? function propertyIsEnumerable(V) {
- var descriptor = getOwnPropertyDescriptor$8(this, V);
- return !!descriptor && descriptor.enumerable;
- } : $propertyIsEnumerable$2;
- var objectPropertyIsEnumerable = {
- f: f$8
- };
-
- var createPropertyDescriptor = function (bitmap, value) {
- return {
- enumerable: !(bitmap & 1),
- configurable: !(bitmap & 2),
- writable: !(bitmap & 4),
- value: value
- };
- };
-
- var FunctionPrototype$4 = Function.prototype;
- var bind$3 = FunctionPrototype$4.bind;
- var call$1 = FunctionPrototype$4.call;
- var uncurryThis = functionBindNative && bind$3.bind(call$1, call$1);
- var functionUncurryThis = functionBindNative ? function (fn) {
- return fn && uncurryThis(fn);
- } : function (fn) {
- return fn && function () {
- return call$1.apply(fn, arguments);
- };
- };
-
- var toString$2 = functionUncurryThis({}.toString);
- var stringSlice$e = functionUncurryThis(''.slice);
-
- var classofRaw = function (it) {
- return stringSlice$e(toString$2(it), 8, -1);
- };
-
- var Object$7 = global_1.Object;
- var split$3 = functionUncurryThis(''.split); // fallback for non-array-like ES3 and non-enumerable old V8 strings
-
- var indexedObject = fails(function () {
- // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
- // eslint-disable-next-line no-prototype-builtins -- safe
- return !Object$7('z').propertyIsEnumerable(0);
- }) ? function (it) {
- return classofRaw(it) == 'String' ? split$3(it, '') : Object$7(it);
- } : Object$7;
-
- var TypeError$y = global_1.TypeError; // `RequireObjectCoercible` abstract operation
- // https://tc39.es/ecma262/#sec-requireobjectcoercible
-
- var requireObjectCoercible = function (it) {
- if (it == undefined) throw TypeError$y("Can't call method on " + it);
- return it;
- };
-
- var toIndexedObject = function (it) {
- return indexedObject(requireObjectCoercible(it));
- };
-
- // `IsCallable` abstract operation
- // https://tc39.es/ecma262/#sec-iscallable
- var isCallable = function (argument) {
- return typeof argument == 'function';
- };
-
- var isObject$2 = function (it) {
- return typeof it == 'object' ? it !== null : isCallable(it);
- };
-
- var aFunction = function (argument) {
- return isCallable(argument) ? argument : undefined;
- };
-
- var getBuiltIn = function (namespace, method) {
- return arguments.length < 2 ? aFunction(global_1[namespace]) : global_1[namespace] && global_1[namespace][method];
- };
-
- var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
-
- var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
-
- var process$4 = global_1.process;
- var Deno = global_1.Deno;
- var versions = process$4 && process$4.versions || Deno && Deno.version;
- var v8 = versions && versions.v8;
- var match, version;
-
- if (v8) {
- match = v8.split('.'); // in old Chrome, versions of V8 isn't V8 = Chrome / 10
- // but their correct versions are not interesting for us
-
- version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
- } // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
- // so check `userAgent` even if `.v8` exists, but 0
-
-
- if (!version && engineUserAgent) {
- match = engineUserAgent.match(/Edge\/(\d+)/);
-
- if (!match || match[1] >= 74) {
- match = engineUserAgent.match(/Chrome\/(\d+)/);
- if (match) version = +match[1];
- }
- }
-
- var engineV8Version = version;
-
- /* eslint-disable es/no-symbol -- required for testing */
- // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
-
- var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
- var symbol = Symbol(); // Chrome 38 Symbol has incorrect toString conversion
- // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
-
- return !String(symbol) || !(Object(symbol) instanceof Symbol) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
- !Symbol.sham && engineV8Version && engineV8Version < 41;
- });
-
- /* eslint-disable es/no-symbol -- required for testing */
-
- var useSymbolAsUid = nativeSymbol && !Symbol.sham && typeof Symbol.iterator == 'symbol';
-
- var Object$6 = global_1.Object;
- var isSymbol = useSymbolAsUid ? function (it) {
- return typeof it == 'symbol';
- } : function (it) {
- var $Symbol = getBuiltIn('Symbol');
- return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$6(it));
- };
-
- var String$6 = global_1.String;
-
- var tryToString = function (argument) {
- try {
- return String$6(argument);
- } catch (error) {
- return 'Object';
- }
- };
-
- var TypeError$x = global_1.TypeError; // `Assert: IsCallable(argument) is true`
-
- var aCallable = function (argument) {
- if (isCallable(argument)) return argument;
- throw TypeError$x(tryToString(argument) + ' is not a function');
- };
-
- // https://tc39.es/ecma262/#sec-getmethod
-
- var getMethod = function (V, P) {
- var func = V[P];
- return func == null ? undefined : aCallable(func);
- };
-
- var TypeError$w = global_1.TypeError; // `OrdinaryToPrimitive` abstract operation
- // https://tc39.es/ecma262/#sec-ordinarytoprimitive
-
- var ordinaryToPrimitive = function (input, pref) {
- var fn, val;
- if (pref === 'string' && isCallable(fn = input.toString) && !isObject$2(val = functionCall(fn, input))) return val;
- if (isCallable(fn = input.valueOf) && !isObject$2(val = functionCall(fn, input))) return val;
- if (pref !== 'string' && isCallable(fn = input.toString) && !isObject$2(val = functionCall(fn, input))) return val;
- throw TypeError$w("Can't convert object to primitive value");
- };
-
- var isPure = false;
-
- var defineProperty$g = Object.defineProperty;
-
- var setGlobal = function (key, value) {
- try {
- defineProperty$g(global_1, key, {
- value: value,
- configurable: true,
- writable: true
- });
- } catch (error) {
- global_1[key] = value;
- }
-
- return value;
- };
-
- var SHARED = '__core-js_shared__';
- var store$3 = global_1[SHARED] || setGlobal(SHARED, {});
- var sharedStore = store$3;
-
- var shared = createCommonjsModule(function (module) {
- (module.exports = function (key, value) {
- return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
- })('versions', []).push({
- version: '3.21.0',
- mode: 'global',
- copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
- license: 'https://github.com/zloirock/core-js/blob/v3.21.0/LICENSE',
- source: 'https://github.com/zloirock/core-js'
- });
- });
-
- var Object$5 = global_1.Object; // `ToObject` abstract operation
- // https://tc39.es/ecma262/#sec-toobject
-
- var toObject$1 = function (argument) {
- return Object$5(requireObjectCoercible(argument));
- };
-
- var hasOwnProperty$b = functionUncurryThis({}.hasOwnProperty); // `HasOwnProperty` abstract operation
- // https://tc39.es/ecma262/#sec-hasownproperty
-
- var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
- return hasOwnProperty$b(toObject$1(it), key);
- };
-
- var id$1 = 0;
- var postfix = Math.random();
- var toString$1 = functionUncurryThis(1.0.toString);
-
- var uid$1 = function (key) {
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$1(++id$1 + postfix, 36);
- };
-
- var WellKnownSymbolsStore$1 = shared('wks');
- var Symbol$4 = global_1.Symbol;
- var symbolFor = Symbol$4 && Symbol$4['for'];
- var createWellKnownSymbol = useSymbolAsUid ? Symbol$4 : Symbol$4 && Symbol$4.withoutSetter || uid$1;
-
- var wellKnownSymbol = function (name) {
- if (!hasOwnProperty_1(WellKnownSymbolsStore$1, name) || !(nativeSymbol || typeof WellKnownSymbolsStore$1[name] == 'string')) {
- var description = 'Symbol.' + name;
-
- if (nativeSymbol && hasOwnProperty_1(Symbol$4, name)) {
- WellKnownSymbolsStore$1[name] = Symbol$4[name];
- } else if (useSymbolAsUid && symbolFor) {
- WellKnownSymbolsStore$1[name] = symbolFor(description);
- } else {
- WellKnownSymbolsStore$1[name] = createWellKnownSymbol(description);
- }
- }
-
- return WellKnownSymbolsStore$1[name];
- };
-
- var TypeError$v = global_1.TypeError;
- var TO_PRIMITIVE$2 = wellKnownSymbol('toPrimitive'); // `ToPrimitive` abstract operation
- // https://tc39.es/ecma262/#sec-toprimitive
-
- var toPrimitive = function (input, pref) {
- if (!isObject$2(input) || isSymbol(input)) return input;
- var exoticToPrim = getMethod(input, TO_PRIMITIVE$2);
- var result;
-
- if (exoticToPrim) {
- if (pref === undefined) pref = 'default';
- result = functionCall(exoticToPrim, input, pref);
- if (!isObject$2(result) || isSymbol(result)) return result;
- throw TypeError$v("Can't convert object to primitive value");
- }
-
- if (pref === undefined) pref = 'number';
- return ordinaryToPrimitive(input, pref);
- };
-
- // https://tc39.es/ecma262/#sec-topropertykey
-
- var toPropertyKey = function (argument) {
- var key = toPrimitive(argument, 'string');
- return isSymbol(key) ? key : key + '';
- };
-
- var document$3 = global_1.document; // typeof document.createElement is 'object' in old IE
-
- var EXISTS$1 = isObject$2(document$3) && isObject$2(document$3.createElement);
-
- var documentCreateElement = function (it) {
- return EXISTS$1 ? document$3.createElement(it) : {};
- };
-
- var ie8DomDefine = !descriptors && !fails(function () {
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
- return Object.defineProperty(documentCreateElement('div'), 'a', {
- get: function () {
- return 7;
- }
- }).a != 7;
- });
-
- var $getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor; // `Object.getOwnPropertyDescriptor` method
- // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
-
- var f$7 = descriptors ? $getOwnPropertyDescriptor$2 : function getOwnPropertyDescriptor(O, P) {
- O = toIndexedObject(O);
- P = toPropertyKey(P);
- if (ie8DomDefine) try {
- return $getOwnPropertyDescriptor$2(O, P);
- } catch (error) {
- /* empty */
- }
- if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]);
- };
- var objectGetOwnPropertyDescriptor = {
- f: f$7
- };
-
- // https://bugs.chromium.org/p/v8/issues/detail?id=3334
-
- var v8PrototypeDefineBug = descriptors && fails(function () {
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
- return Object.defineProperty(function () {
- /* empty */
- }, 'prototype', {
- value: 42,
- writable: false
- }).prototype != 42;
- });
-
- var String$5 = global_1.String;
- var TypeError$u = global_1.TypeError; // `Assert: Type(argument) is Object`
-
- var anObject = function (argument) {
- if (isObject$2(argument)) return argument;
- throw TypeError$u(String$5(argument) + ' is not an object');
- };
-
- var TypeError$t = global_1.TypeError; // eslint-disable-next-line es/no-object-defineproperty -- safe
-
- var $defineProperty$1 = Object.defineProperty; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
-
- var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
- var ENUMERABLE = 'enumerable';
- var CONFIGURABLE$1 = 'configurable';
- var WRITABLE = 'writable'; // `Object.defineProperty` method
- // https://tc39.es/ecma262/#sec-object.defineproperty
-
- var f$6 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Attributes) {
- anObject(O);
- P = toPropertyKey(P);
- anObject(Attributes);
-
- if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
- var current = $getOwnPropertyDescriptor$1(O, P);
-
- if (current && current[WRITABLE]) {
- O[P] = Attributes.value;
- Attributes = {
- configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
- enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
- writable: false
- };
- }
- }
-
- return $defineProperty$1(O, P, Attributes);
- } : $defineProperty$1 : function defineProperty(O, P, Attributes) {
- anObject(O);
- P = toPropertyKey(P);
- anObject(Attributes);
- if (ie8DomDefine) try {
- return $defineProperty$1(O, P, Attributes);
- } catch (error) {
- /* empty */
- }
- if ('get' in Attributes || 'set' in Attributes) throw TypeError$t('Accessors not supported');
- if ('value' in Attributes) O[P] = Attributes.value;
- return O;
- };
- var objectDefineProperty = {
- f: f$6
- };
-
- var createNonEnumerableProperty = descriptors ? function (object, key, value) {
- return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
- } : function (object, key, value) {
- object[key] = value;
- return object;
- };
-
- var functionToString$1 = functionUncurryThis(Function.toString); // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
-
- if (!isCallable(sharedStore.inspectSource)) {
- sharedStore.inspectSource = function (it) {
- return functionToString$1(it);
- };
- }
-
- var inspectSource = sharedStore.inspectSource;
-
- var WeakMap$3 = global_1.WeakMap;
- var nativeWeakMap = isCallable(WeakMap$3) && /native code/.test(inspectSource(WeakMap$3));
-
- var keys$4 = shared('keys');
-
- var sharedKey = function (key) {
- return keys$4[key] || (keys$4[key] = uid$1(key));
- };
-
- var hiddenKeys$1 = {};
-
- var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
- var TypeError$s = global_1.TypeError;
- var WeakMap$2 = global_1.WeakMap;
- var set$4, get$2, has$1;
-
- var enforce = function (it) {
- return has$1(it) ? get$2(it) : set$4(it, {});
- };
-
- var getterFor$1 = function (TYPE) {
- return function (it) {
- var state;
-
- if (!isObject$2(it) || (state = get$2(it)).type !== TYPE) {
- throw TypeError$s('Incompatible receiver, ' + TYPE + ' required');
- }
-
- return state;
- };
- };
-
- if (nativeWeakMap || sharedStore.state) {
- var store$2 = sharedStore.state || (sharedStore.state = new WeakMap$2());
- var wmget = functionUncurryThis(store$2.get);
- var wmhas = functionUncurryThis(store$2.has);
- var wmset = functionUncurryThis(store$2.set);
-
- set$4 = function (it, metadata) {
- if (wmhas(store$2, it)) throw new TypeError$s(OBJECT_ALREADY_INITIALIZED);
- metadata.facade = it;
- wmset(store$2, it, metadata);
- return metadata;
- };
-
- get$2 = function (it) {
- return wmget(store$2, it) || {};
- };
-
- has$1 = function (it) {
- return wmhas(store$2, it);
- };
- } else {
- var STATE = sharedKey('state');
- hiddenKeys$1[STATE] = true;
-
- set$4 = function (it, metadata) {
- if (hasOwnProperty_1(it, STATE)) throw new TypeError$s(OBJECT_ALREADY_INITIALIZED);
- metadata.facade = it;
- createNonEnumerableProperty(it, STATE, metadata);
- return metadata;
- };
-
- get$2 = function (it) {
- return hasOwnProperty_1(it, STATE) ? it[STATE] : {};
- };
-
- has$1 = function (it) {
- return hasOwnProperty_1(it, STATE);
- };
- }
-
- var internalState = {
- set: set$4,
- get: get$2,
- has: has$1,
- enforce: enforce,
- getterFor: getterFor$1
- };
-
- var FunctionPrototype$3 = Function.prototype; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
-
- var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
- var EXISTS = hasOwnProperty_1(FunctionPrototype$3, 'name'); // additional protection from minified / mangled / dropped function names
-
- var PROPER = EXISTS && function something() {
- /* empty */
- }.name === 'something';
-
- var CONFIGURABLE = EXISTS && (!descriptors || descriptors && getDescriptor(FunctionPrototype$3, 'name').configurable);
- var functionName = {
- EXISTS: EXISTS,
- PROPER: PROPER,
- CONFIGURABLE: CONFIGURABLE
- };
-
- var redefine = createCommonjsModule(function (module) {
- var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
- var getInternalState = internalState.get;
- var enforceInternalState = internalState.enforce;
- var TEMPLATE = String(String).split('String');
- (module.exports = function (O, key, value, options) {
- var unsafe = options ? !!options.unsafe : false;
- var simple = options ? !!options.enumerable : false;
- var noTargetGet = options ? !!options.noTargetGet : false;
- var name = options && options.name !== undefined ? options.name : key;
- var state;
-
- if (isCallable(value)) {
- if (String(name).slice(0, 7) === 'Symbol(') {
- name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
- }
-
- if (!hasOwnProperty_1(value, 'name') || CONFIGURABLE_FUNCTION_NAME && value.name !== name) {
- createNonEnumerableProperty(value, 'name', name);
- }
-
- state = enforceInternalState(value);
-
- if (!state.source) {
- state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
- }
- }
-
- if (O === global_1) {
- if (simple) O[key] = value;else setGlobal(key, value);
- return;
- } else if (!unsafe) {
- delete O[key];
- } else if (!noTargetGet && O[key]) {
- simple = true;
- }
-
- if (simple) O[key] = value;else createNonEnumerableProperty(O, key, value); // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
- })(Function.prototype, 'toString', function toString() {
- return isCallable(this) && getInternalState(this).source || inspectSource(this);
- });
- });
-
- var ceil$2 = Math.ceil;
- var floor$a = Math.floor; // `ToIntegerOrInfinity` abstract operation
- // https://tc39.es/ecma262/#sec-tointegerorinfinity
-
- var toIntegerOrInfinity = function (argument) {
- var number = +argument; // eslint-disable-next-line no-self-compare -- safe
-
- return number !== number || number === 0 ? 0 : (number > 0 ? floor$a : ceil$2)(number);
- };
-
- var max$6 = Math.max;
- var min$9 = Math.min; // Helper for a popular repeating case of the spec:
- // Let integer be ? ToInteger(index).
- // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
-
- var toAbsoluteIndex = function (index, length) {
- var integer = toIntegerOrInfinity(index);
- return integer < 0 ? max$6(integer + length, 0) : min$9(integer, length);
- };
-
- var min$8 = Math.min; // `ToLength` abstract operation
- // https://tc39.es/ecma262/#sec-tolength
-
- var toLength = function (argument) {
- return argument > 0 ? min$8(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
- };
-
- // https://tc39.es/ecma262/#sec-lengthofarraylike
-
- var lengthOfArrayLike = function (obj) {
- return toLength(obj.length);
- };
-
- var createMethod$6 = function (IS_INCLUDES) {
- return function ($this, el, fromIndex) {
- var O = toIndexedObject($this);
- var length = lengthOfArrayLike(O);
- var index = toAbsoluteIndex(fromIndex, length);
- var value; // Array#includes uses SameValueZero equality algorithm
- // eslint-disable-next-line no-self-compare -- NaN check
-
- if (IS_INCLUDES && el != el) while (length > index) {
- value = O[index++]; // eslint-disable-next-line no-self-compare -- NaN check
-
- if (value != value) return true; // Array#indexOf ignores holes, Array#includes - not
- } else for (; length > index; index++) {
- if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
- }
- return !IS_INCLUDES && -1;
- };
- };
-
- var arrayIncludes = {
- // `Array.prototype.includes` method
- // https://tc39.es/ecma262/#sec-array.prototype.includes
- includes: createMethod$6(true),
- // `Array.prototype.indexOf` method
- // https://tc39.es/ecma262/#sec-array.prototype.indexof
- indexOf: createMethod$6(false)
- };
-
- var indexOf$2 = arrayIncludes.indexOf;
- var push$h = functionUncurryThis([].push);
-
- var objectKeysInternal = function (object, names) {
- var O = toIndexedObject(object);
- var i = 0;
- var result = [];
- var key;
-
- for (key in O) !hasOwnProperty_1(hiddenKeys$1, key) && hasOwnProperty_1(O, key) && push$h(result, key); // Don't enum bug & hidden keys
-
-
- while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) {
- ~indexOf$2(result, key) || push$h(result, key);
- }
-
- return result;
- };
-
- // IE8- don't enum bug keys
- var enumBugKeys = ['constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf'];
-
- var hiddenKeys = enumBugKeys.concat('length', 'prototype'); // `Object.getOwnPropertyNames` method
- // https://tc39.es/ecma262/#sec-object.getownpropertynames
- // eslint-disable-next-line es/no-object-getownpropertynames -- safe
-
- var f$5 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
- return objectKeysInternal(O, hiddenKeys);
- };
-
- var objectGetOwnPropertyNames = {
- f: f$5
- };
-
- // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
- var f$4 = Object.getOwnPropertySymbols;
- var objectGetOwnPropertySymbols = {
- f: f$4
- };
-
- var concat$5 = functionUncurryThis([].concat); // all object keys, includes non-enumerable and symbols
-
- var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
- var keys = objectGetOwnPropertyNames.f(anObject(it));
- var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
- return getOwnPropertySymbols ? concat$5(keys, getOwnPropertySymbols(it)) : keys;
- };
-
- var copyConstructorProperties = function (target, source, exceptions) {
- var keys = ownKeys(source);
- var defineProperty = objectDefineProperty.f;
- var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
-
- for (var i = 0; i < keys.length; i++) {
- var key = keys[i];
-
- if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) {
- defineProperty(target, key, getOwnPropertyDescriptor(source, key));
- }
- }
- };
-
- var replacement = /#|\.prototype\./;
-
- var isForced = function (feature, detection) {
- var value = data[normalize$1(feature)];
- return value == POLYFILL ? true : value == NATIVE ? false : isCallable(detection) ? fails(detection) : !!detection;
- };
-
- var normalize$1 = isForced.normalize = function (string) {
- return String(string).replace(replacement, '.').toLowerCase();
- };
-
- var data = isForced.data = {};
- var NATIVE = isForced.NATIVE = 'N';
- var POLYFILL = isForced.POLYFILL = 'P';
- var isForced_1 = isForced;
-
- var getOwnPropertyDescriptor$7 = objectGetOwnPropertyDescriptor.f;
- /*
- options.target - name of the target object
- options.global - target is the global object
- options.stat - export as static methods of target
- options.proto - export as prototype methods of target
- options.real - real prototype method for the `pure` version
- options.forced - export even if the native feature is available
- options.bind - bind methods to the target, required for the `pure` version
- options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
- options.unsafe - use the simple assignment of property instead of delete + defineProperty
- options.sham - add a flag to not completely full polyfills
- options.enumerable - export as enumerable property
- options.noTargetGet - prevent calling a getter on target
- options.name - the .name of the function if it does not match the key
- */
-
- var _export = function (options, source) {
- var TARGET = options.target;
- var GLOBAL = options.global;
- var STATIC = options.stat;
- var FORCED, target, key, targetProperty, sourceProperty, descriptor;
-
- if (GLOBAL) {
- target = global_1;
- } else if (STATIC) {
- target = global_1[TARGET] || setGlobal(TARGET, {});
- } else {
- target = (global_1[TARGET] || {}).prototype;
- }
-
- if (target) for (key in source) {
- sourceProperty = source[key];
-
- if (options.noTargetGet) {
- descriptor = getOwnPropertyDescriptor$7(target, key);
- targetProperty = descriptor && descriptor.value;
- } else targetProperty = target[key];
-
- FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); // contained in target
-
- if (!FORCED && targetProperty !== undefined) {
- if (typeof sourceProperty == typeof targetProperty) continue;
- copyConstructorProperties(sourceProperty, targetProperty);
- } // add a flag to not completely full polyfills
-
-
- if (options.sham || targetProperty && targetProperty.sham) {
- createNonEnumerableProperty(sourceProperty, 'sham', true);
- } // extend global
-
-
- redefine(target, key, sourceProperty, options);
- }
- };
-
- var FunctionPrototype$2 = Function.prototype;
- var apply$1 = FunctionPrototype$2.apply;
- var call = FunctionPrototype$2.call; // eslint-disable-next-line es/no-reflect -- safe
-
- var functionApply = typeof Reflect == 'object' && Reflect.apply || (functionBindNative ? call.bind(apply$1) : function () {
- return call.apply(apply$1, arguments);
- });
-
- // https://tc39.es/ecma262/#sec-isarray
- // eslint-disable-next-line es/no-array-isarray -- safe
-
- var isArray$1 = Array.isArray || function isArray(argument) {
- return classofRaw(argument) == 'Array';
- };
-
- var TO_STRING_TAG$5 = wellKnownSymbol('toStringTag');
- var test$1 = {};
- test$1[TO_STRING_TAG$5] = 'z';
- var toStringTagSupport = String(test$1) === '[object z]';
-
- var TO_STRING_TAG$4 = wellKnownSymbol('toStringTag');
- var Object$4 = global_1.Object; // ES3 wrong here
-
- var CORRECT_ARGUMENTS = classofRaw(function () {
- return arguments;
- }()) == 'Arguments'; // fallback for IE11 Script Access Denied error
-
- var tryGet = function (it, key) {
- try {
- return it[key];
- } catch (error) {
- /* empty */
- }
- }; // getting tag from ES6+ `Object.prototype.toString`
-
-
- var classof = toStringTagSupport ? classofRaw : function (it) {
- var O, tag, result;
- return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case
- : typeof (tag = tryGet(O = Object$4(it), TO_STRING_TAG$4)) == 'string' ? tag // builtinTag case
- : CORRECT_ARGUMENTS ? classofRaw(O) // ES3 arguments fallback
- : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
- };
-
- var String$4 = global_1.String;
-
- var toString_1 = function (argument) {
- if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
- return String$4(argument);
- };
-
- // https://tc39.es/ecma262/#sec-object.keys
- // eslint-disable-next-line es/no-object-keys -- safe
-
- var objectKeys = Object.keys || function keys(O) {
- return objectKeysInternal(O, enumBugKeys);
- };
-
- // https://tc39.es/ecma262/#sec-object.defineproperties
- // eslint-disable-next-line es/no-object-defineproperties -- safe
-
- var f$3 = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
- anObject(O);
- var props = toIndexedObject(Properties);
- var keys = objectKeys(Properties);
- var length = keys.length;
- var index = 0;
- var key;
-
- while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]);
-
- return O;
- };
- var objectDefineProperties = {
- f: f$3
- };
-
- var html = getBuiltIn('document', 'documentElement');
-
- /* global ActiveXObject -- old IE, WSH */
-
- var GT = '>';
- var LT = '<';
- var PROTOTYPE$2 = 'prototype';
- var SCRIPT = 'script';
- var IE_PROTO$1 = sharedKey('IE_PROTO');
-
- var EmptyConstructor = function () {
- /* empty */
- };
-
- var scriptTag = function (content) {
- return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
- }; // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
-
-
- var NullProtoObjectViaActiveX = function (activeXDocument) {
- activeXDocument.write(scriptTag(''));
- activeXDocument.close();
- var temp = activeXDocument.parentWindow.Object;
- activeXDocument = null; // avoid memory leak
-
- return temp;
- }; // Create object with fake `null` prototype: use iframe Object with cleared prototype
-
-
- var NullProtoObjectViaIFrame = function () {
- // Thrash, waste and sodomy: IE GC bug
- var iframe = documentCreateElement('iframe');
- var JS = 'java' + SCRIPT + ':';
- var iframeDocument;
- iframe.style.display = 'none';
- html.appendChild(iframe); // https://github.com/zloirock/core-js/issues/475
-
- iframe.src = String(JS);
- iframeDocument = iframe.contentWindow.document;
- iframeDocument.open();
- iframeDocument.write(scriptTag('document.F=Object'));
- iframeDocument.close();
- return iframeDocument.F;
- }; // Check for document.domain and active x support
- // No need to use active x approach when document.domain is not set
- // see https://github.com/es-shims/es5-shim/issues/150
- // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
- // avoid IE GC bug
-
-
- var activeXDocument;
-
- var NullProtoObject = function () {
- try {
- activeXDocument = new ActiveXObject('htmlfile');
- } catch (error) {
- /* ignore */
- }
-
- NullProtoObject = typeof document != 'undefined' ? document.domain && activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) // old IE
- : NullProtoObjectViaIFrame() : NullProtoObjectViaActiveX(activeXDocument); // WSH
-
- var length = enumBugKeys.length;
-
- while (length--) delete NullProtoObject[PROTOTYPE$2][enumBugKeys[length]];
-
- return NullProtoObject();
- };
-
- hiddenKeys$1[IE_PROTO$1] = true; // `Object.create` method
- // https://tc39.es/ecma262/#sec-object.create
-
- var objectCreate$1 = Object.create || function create(O, Properties) {
- var result;
-
- if (O !== null) {
- EmptyConstructor[PROTOTYPE$2] = anObject(O);
- result = new EmptyConstructor();
- EmptyConstructor[PROTOTYPE$2] = null; // add "__proto__" for Object.getPrototypeOf polyfill
-
- result[IE_PROTO$1] = O;
- } else result = NullProtoObject();
-
- return Properties === undefined ? result : objectDefineProperties.f(result, Properties);
- };
-
- var createProperty = function (object, key, value) {
- var propertyKey = toPropertyKey(key);
- if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));else object[propertyKey] = value;
- };
-
- var Array$9 = global_1.Array;
- var max$5 = Math.max;
-
- var arraySliceSimple = function (O, start, end) {
- var length = lengthOfArrayLike(O);
- var k = toAbsoluteIndex(start, length);
- var fin = toAbsoluteIndex(end === undefined ? length : end, length);
- var result = Array$9(max$5(fin - k, 0));
-
- for (var n = 0; k < fin; k++, n++) createProperty(result, n, O[k]);
-
- result.length = n;
- return result;
- };
-
- /* eslint-disable es/no-object-getownpropertynames -- safe */
-
- var $getOwnPropertyNames$1 = objectGetOwnPropertyNames.f;
- var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [];
-
- var getWindowNames = function (it) {
- try {
- return $getOwnPropertyNames$1(it);
- } catch (error) {
- return arraySliceSimple(windowNames);
- }
- }; // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
-
-
- var f$2 = function getOwnPropertyNames(it) {
- return windowNames && classofRaw(it) == 'Window' ? getWindowNames(it) : $getOwnPropertyNames$1(toIndexedObject(it));
- };
-
- var objectGetOwnPropertyNamesExternal = {
- f: f$2
- };
-
- var arraySlice$1 = functionUncurryThis([].slice);
-
- var f$1 = wellKnownSymbol;
- var wellKnownSymbolWrapped = {
- f: f$1
- };
-
- var path = global_1;
-
- var defineProperty$f = objectDefineProperty.f;
-
- var defineWellKnownSymbol = function (NAME) {
- var Symbol = path.Symbol || (path.Symbol = {});
- if (!hasOwnProperty_1(Symbol, NAME)) defineProperty$f(Symbol, NAME, {
- value: wellKnownSymbolWrapped.f(NAME)
- });
- };
-
- var defineProperty$e = objectDefineProperty.f;
- var TO_STRING_TAG$3 = wellKnownSymbol('toStringTag');
-
- var setToStringTag = function (target, TAG, STATIC) {
- if (target && !STATIC) target = target.prototype;
-
- if (target && !hasOwnProperty_1(target, TO_STRING_TAG$3)) {
- defineProperty$e(target, TO_STRING_TAG$3, {
- configurable: true,
- value: TAG
- });
- }
- };
-
- var bind$2 = functionUncurryThis(functionUncurryThis.bind); // optional / simple context binding
-
- var functionBindContext = function (fn, that) {
- aCallable(fn);
- return that === undefined ? fn : functionBindNative ? bind$2(fn, that) : function
- /* ...args */
- () {
- return fn.apply(that, arguments);
- };
- };
-
- var noop$1 = function () {
- /* empty */
- };
-
- var empty = [];
- var construct$1 = getBuiltIn('Reflect', 'construct');
- var constructorRegExp = /^\s*(?:class|function)\b/;
- var exec$6 = functionUncurryThis(constructorRegExp.exec);
- var INCORRECT_TO_STRING = !constructorRegExp.exec(noop$1);
-
- var isConstructorModern = function isConstructor(argument) {
- if (!isCallable(argument)) return false;
-
- try {
- construct$1(noop$1, empty, argument);
- return true;
- } catch (error) {
- return false;
- }
- };
-
- var isConstructorLegacy = function isConstructor(argument) {
- if (!isCallable(argument)) return false;
-
- switch (classof(argument)) {
- case 'AsyncFunction':
- case 'GeneratorFunction':
- case 'AsyncGeneratorFunction':
- return false;
- }
-
- try {
- // we can't check .prototype since constructors produced by .bind haven't it
- // `Function#toString` throws on some built-it function in some legacy engines
- // (for example, `DOMQuad` and similar in FF41-)
- return INCORRECT_TO_STRING || !!exec$6(constructorRegExp, inspectSource(argument));
- } catch (error) {
- return true;
- }
- };
-
- isConstructorLegacy.sham = true; // `IsConstructor` abstract operation
- // https://tc39.es/ecma262/#sec-isconstructor
-
- var isConstructor = !construct$1 || fails(function () {
- var called;
- return isConstructorModern(isConstructorModern.call) || !isConstructorModern(Object) || !isConstructorModern(function () {
- called = true;
- }) || called;
- }) ? isConstructorLegacy : isConstructorModern;
-
- var SPECIES$6 = wellKnownSymbol('species');
- var Array$8 = global_1.Array; // a part of `ArraySpeciesCreate` abstract operation
- // https://tc39.es/ecma262/#sec-arrayspeciescreate
-
- var arraySpeciesConstructor = function (originalArray) {
- var C;
-
- if (isArray$1(originalArray)) {
- C = originalArray.constructor; // cross-realm fallback
-
- if (isConstructor(C) && (C === Array$8 || isArray$1(C.prototype))) C = undefined;else if (isObject$2(C)) {
- C = C[SPECIES$6];
- if (C === null) C = undefined;
- }
- }
-
- return C === undefined ? Array$8 : C;
- };
-
- // https://tc39.es/ecma262/#sec-arrayspeciescreate
-
- var arraySpeciesCreate = function (originalArray, length) {
- return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
- };
-
- var push$g = functionUncurryThis([].push); // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
-
- var createMethod$5 = 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_REJECT = TYPE == 7;
- var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
- return function ($this, callbackfn, that, specificCreate) {
- var O = toObject$1($this);
- var self = indexedObject(O);
- var boundFunction = functionBindContext(callbackfn, that);
- var length = lengthOfArrayLike(self);
- var index = 0;
- var create = specificCreate || arraySpeciesCreate;
- var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
- var value, result;
-
- for (; length > index; index++) if (NO_HOLES || index in self) {
- value = self[index];
- result = boundFunction(value, index, O);
-
- if (TYPE) {
- if (IS_MAP) target[index] = result; // map
- else if (result) switch (TYPE) {
- case 3:
- return true;
- // some
-
- case 5:
- return value;
- // find
-
- case 6:
- return index;
- // findIndex
-
- case 2:
- push$g(target, value);
- // filter
- } else switch (TYPE) {
- case 4:
- return false;
- // every
-
- case 7:
- push$g(target, value);
- // filterReject
- }
- }
- }
-
- return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
- };
- };
-
- var arrayIteration = {
- // `Array.prototype.forEach` method
- // https://tc39.es/ecma262/#sec-array.prototype.foreach
- forEach: createMethod$5(0),
- // `Array.prototype.map` method
- // https://tc39.es/ecma262/#sec-array.prototype.map
- map: createMethod$5(1),
- // `Array.prototype.filter` method
- // https://tc39.es/ecma262/#sec-array.prototype.filter
- filter: createMethod$5(2),
- // `Array.prototype.some` method
- // https://tc39.es/ecma262/#sec-array.prototype.some
- some: createMethod$5(3),
- // `Array.prototype.every` method
- // https://tc39.es/ecma262/#sec-array.prototype.every
- every: createMethod$5(4),
- // `Array.prototype.find` method
- // https://tc39.es/ecma262/#sec-array.prototype.find
- find: createMethod$5(5),
- // `Array.prototype.findIndex` method
- // https://tc39.es/ecma262/#sec-array.prototype.findIndex
- findIndex: createMethod$5(6),
- // `Array.prototype.filterReject` method
- // https://github.com/tc39/proposal-array-filtering
- filterReject: createMethod$5(7)
- };
-
- var $forEach$2 = arrayIteration.forEach;
- var HIDDEN = sharedKey('hidden');
- var SYMBOL = 'Symbol';
- var PROTOTYPE$1 = 'prototype';
- var TO_PRIMITIVE$1 = wellKnownSymbol('toPrimitive');
- var setInternalState$c = internalState.set;
- var getInternalState$8 = internalState.getterFor(SYMBOL);
- var ObjectPrototype$4 = Object[PROTOTYPE$1];
- var $Symbol = global_1.Symbol;
- var SymbolPrototype$1 = $Symbol && $Symbol[PROTOTYPE$1];
- var TypeError$r = global_1.TypeError;
- var QObject = global_1.QObject;
- var $stringify = getBuiltIn('JSON', 'stringify');
- var nativeGetOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
- var nativeDefineProperty = objectDefineProperty.f;
- var nativeGetOwnPropertyNames = objectGetOwnPropertyNamesExternal.f;
- var nativePropertyIsEnumerable = objectPropertyIsEnumerable.f;
- var push$f = functionUncurryThis([].push);
- var AllSymbols = shared('symbols');
- var ObjectPrototypeSymbols = shared('op-symbols');
- var StringToSymbolRegistry = shared('string-to-symbol-registry');
- var SymbolToStringRegistry = shared('symbol-to-string-registry');
- var WellKnownSymbolsStore = shared('wks'); // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
-
- var USE_SETTER = !QObject || !QObject[PROTOTYPE$1] || !QObject[PROTOTYPE$1].findChild; // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
-
- var setSymbolDescriptor = descriptors && fails(function () {
- return objectCreate$1(nativeDefineProperty({}, 'a', {
- get: function () {
- return nativeDefineProperty(this, 'a', {
- value: 7
- }).a;
- }
- })).a != 7;
- }) ? function (O, P, Attributes) {
- var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor$1(ObjectPrototype$4, P);
- if (ObjectPrototypeDescriptor) delete ObjectPrototype$4[P];
- nativeDefineProperty(O, P, Attributes);
-
- if (ObjectPrototypeDescriptor && O !== ObjectPrototype$4) {
- nativeDefineProperty(ObjectPrototype$4, P, ObjectPrototypeDescriptor);
- }
- } : nativeDefineProperty;
-
- var wrap = function (tag, description) {
- var symbol = AllSymbols[tag] = objectCreate$1(SymbolPrototype$1);
- setInternalState$c(symbol, {
- type: SYMBOL,
- tag: tag,
- description: description
- });
- if (!descriptors) symbol.description = description;
- return symbol;
- };
-
- var $defineProperty = function defineProperty(O, P, Attributes) {
- if (O === ObjectPrototype$4) $defineProperty(ObjectPrototypeSymbols, P, Attributes);
- anObject(O);
- var key = toPropertyKey(P);
- anObject(Attributes);
-
- if (hasOwnProperty_1(AllSymbols, key)) {
- if (!Attributes.enumerable) {
- if (!hasOwnProperty_1(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));
- O[HIDDEN][key] = true;
- } else {
- if (hasOwnProperty_1(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;
- Attributes = objectCreate$1(Attributes, {
- enumerable: createPropertyDescriptor(0, false)
- });
- }
-
- return setSymbolDescriptor(O, key, Attributes);
- }
-
- return nativeDefineProperty(O, key, Attributes);
- };
-
- var $defineProperties = function defineProperties(O, Properties) {
- anObject(O);
- var properties = toIndexedObject(Properties);
- var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));
- $forEach$2(keys, function (key) {
- if (!descriptors || functionCall($propertyIsEnumerable$1, properties, key)) $defineProperty(O, key, properties[key]);
- });
- return O;
- };
-
- var $create = function create(O, Properties) {
- return Properties === undefined ? objectCreate$1(O) : $defineProperties(objectCreate$1(O), Properties);
- };
-
- var $propertyIsEnumerable$1 = function propertyIsEnumerable(V) {
- var P = toPropertyKey(V);
- var enumerable = functionCall(nativePropertyIsEnumerable, this, P);
- if (this === ObjectPrototype$4 && hasOwnProperty_1(AllSymbols, P) && !hasOwnProperty_1(ObjectPrototypeSymbols, P)) return false;
- return enumerable || !hasOwnProperty_1(this, P) || !hasOwnProperty_1(AllSymbols, P) || hasOwnProperty_1(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true;
- };
-
- var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {
- var it = toIndexedObject(O);
- var key = toPropertyKey(P);
- if (it === ObjectPrototype$4 && hasOwnProperty_1(AllSymbols, key) && !hasOwnProperty_1(ObjectPrototypeSymbols, key)) return;
- var descriptor = nativeGetOwnPropertyDescriptor$1(it, key);
-
- if (descriptor && hasOwnProperty_1(AllSymbols, key) && !(hasOwnProperty_1(it, HIDDEN) && it[HIDDEN][key])) {
- descriptor.enumerable = true;
- }
-
- return descriptor;
- };
-
- var $getOwnPropertyNames = function getOwnPropertyNames(O) {
- var names = nativeGetOwnPropertyNames(toIndexedObject(O));
- var result = [];
- $forEach$2(names, function (key) {
- if (!hasOwnProperty_1(AllSymbols, key) && !hasOwnProperty_1(hiddenKeys$1, key)) push$f(result, key);
- });
- return result;
- };
-
- var $getOwnPropertySymbols = function getOwnPropertySymbols(O) {
- var IS_OBJECT_PROTOTYPE = O === ObjectPrototype$4;
- var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));
- var result = [];
- $forEach$2(names, function (key) {
- if (hasOwnProperty_1(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || hasOwnProperty_1(ObjectPrototype$4, key))) {
- push$f(result, AllSymbols[key]);
- }
- });
- return result;
- }; // `Symbol` constructor
- // https://tc39.es/ecma262/#sec-symbol-constructor
-
-
- if (!nativeSymbol) {
- $Symbol = function Symbol() {
- if (objectIsPrototypeOf(SymbolPrototype$1, this)) throw TypeError$r('Symbol is not a constructor');
- var description = !arguments.length || arguments[0] === undefined ? undefined : toString_1(arguments[0]);
- var tag = uid$1(description);
-
- var setter = function (value) {
- if (this === ObjectPrototype$4) functionCall(setter, ObjectPrototypeSymbols, value);
- if (hasOwnProperty_1(this, HIDDEN) && hasOwnProperty_1(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
- setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));
- };
-
- if (descriptors && USE_SETTER) setSymbolDescriptor(ObjectPrototype$4, tag, {
- configurable: true,
- set: setter
- });
- return wrap(tag, description);
- };
-
- SymbolPrototype$1 = $Symbol[PROTOTYPE$1];
- redefine(SymbolPrototype$1, 'toString', function toString() {
- return getInternalState$8(this).tag;
- });
- redefine($Symbol, 'withoutSetter', function (description) {
- return wrap(uid$1(description), description);
- });
- objectPropertyIsEnumerable.f = $propertyIsEnumerable$1;
- objectDefineProperty.f = $defineProperty;
- objectDefineProperties.f = $defineProperties;
- objectGetOwnPropertyDescriptor.f = $getOwnPropertyDescriptor;
- objectGetOwnPropertyNames.f = objectGetOwnPropertyNamesExternal.f = $getOwnPropertyNames;
- objectGetOwnPropertySymbols.f = $getOwnPropertySymbols;
-
- wellKnownSymbolWrapped.f = function (name) {
- return wrap(wellKnownSymbol(name), name);
- };
-
- if (descriptors) {
- // https://github.com/tc39/proposal-Symbol-description
- nativeDefineProperty(SymbolPrototype$1, 'description', {
- configurable: true,
- get: function description() {
- return getInternalState$8(this).description;
- }
- });
-
- {
- redefine(ObjectPrototype$4, 'propertyIsEnumerable', $propertyIsEnumerable$1, {
- unsafe: true
- });
- }
- }
- }
-
- _export({
- global: true,
- wrap: true,
- forced: !nativeSymbol,
- sham: !nativeSymbol
- }, {
- Symbol: $Symbol
- });
- $forEach$2(objectKeys(WellKnownSymbolsStore), function (name) {
- defineWellKnownSymbol(name);
- });
- _export({
- target: SYMBOL,
- stat: true,
- forced: !nativeSymbol
- }, {
- // `Symbol.for` method
- // https://tc39.es/ecma262/#sec-symbol.for
- 'for': function (key) {
- var string = toString_1(key);
- if (hasOwnProperty_1(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];
- var symbol = $Symbol(string);
- StringToSymbolRegistry[string] = symbol;
- SymbolToStringRegistry[symbol] = string;
- return symbol;
- },
- // `Symbol.keyFor` method
- // https://tc39.es/ecma262/#sec-symbol.keyfor
- keyFor: function keyFor(sym) {
- if (!isSymbol(sym)) throw TypeError$r(sym + ' is not a symbol');
- if (hasOwnProperty_1(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
- },
- useSetter: function () {
- USE_SETTER = true;
- },
- useSimple: function () {
- USE_SETTER = false;
- }
- });
- _export({
- target: 'Object',
- stat: true,
- forced: !nativeSymbol,
- sham: !descriptors
- }, {
- // `Object.create` method
- // https://tc39.es/ecma262/#sec-object.create
- create: $create,
- // `Object.defineProperty` method
- // https://tc39.es/ecma262/#sec-object.defineproperty
- defineProperty: $defineProperty,
- // `Object.defineProperties` method
- // https://tc39.es/ecma262/#sec-object.defineproperties
- defineProperties: $defineProperties,
- // `Object.getOwnPropertyDescriptor` method
- // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
- getOwnPropertyDescriptor: $getOwnPropertyDescriptor
- });
- _export({
- target: 'Object',
- stat: true,
- forced: !nativeSymbol
- }, {
- // `Object.getOwnPropertyNames` method
- // https://tc39.es/ecma262/#sec-object.getownpropertynames
- getOwnPropertyNames: $getOwnPropertyNames,
- // `Object.getOwnPropertySymbols` method
- // https://tc39.es/ecma262/#sec-object.getownpropertysymbols
- getOwnPropertySymbols: $getOwnPropertySymbols
- }); // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
- // https://bugs.chromium.org/p/v8/issues/detail?id=3443
-
- _export({
- target: 'Object',
- stat: true,
- forced: fails(function () {
- objectGetOwnPropertySymbols.f(1);
- })
- }, {
- getOwnPropertySymbols: function getOwnPropertySymbols(it) {
- return objectGetOwnPropertySymbols.f(toObject$1(it));
- }
- }); // `JSON.stringify` method behavior with symbols
- // https://tc39.es/ecma262/#sec-json.stringify
-
- if ($stringify) {
- var FORCED_JSON_STRINGIFY = !nativeSymbol || fails(function () {
- var symbol = $Symbol(); // MS Edge converts symbol values to JSON as {}
-
- return $stringify([symbol]) != '[null]' // WebKit converts symbol values to JSON as null
- || $stringify({
- a: symbol
- }) != '{}' // V8 throws on boxed symbols
- || $stringify(Object(symbol)) != '{}';
- });
- _export({
- target: 'JSON',
- stat: true,
- forced: FORCED_JSON_STRINGIFY
- }, {
- // eslint-disable-next-line no-unused-vars -- required for `.length`
- stringify: function stringify(it, replacer, space) {
- var args = arraySlice$1(arguments);
- var $replacer = replacer;
- if (!isObject$2(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
-
- if (!isArray$1(replacer)) replacer = function (key, value) {
- if (isCallable($replacer)) value = functionCall($replacer, this, key, value);
- if (!isSymbol(value)) return value;
- };
- args[1] = replacer;
- return functionApply($stringify, null, args);
- }
- });
- } // `Symbol.prototype[@@toPrimitive]` method
- // https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive
-
-
- if (!SymbolPrototype$1[TO_PRIMITIVE$1]) {
- var valueOf = SymbolPrototype$1.valueOf; // eslint-disable-next-line no-unused-vars -- required for .length
-
- redefine(SymbolPrototype$1, TO_PRIMITIVE$1, function (hint) {
- // TODO: improve hint logic
- return functionCall(valueOf, this);
- });
- } // `Symbol.prototype[@@toStringTag]` property
- // https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag
-
-
- setToStringTag($Symbol, SYMBOL);
- hiddenKeys$1[HIDDEN] = true;
-
- var defineProperty$d = objectDefineProperty.f;
- var NativeSymbol = global_1.Symbol;
- var SymbolPrototype = NativeSymbol && NativeSymbol.prototype;
-
- if (descriptors && isCallable(NativeSymbol) && (!('description' in SymbolPrototype) || // Safari 12 bug
- NativeSymbol().description !== undefined)) {
- var EmptyStringDescriptionStore = {}; // wrap Symbol constructor for correct work with undefined description
-
- var SymbolWrapper = function Symbol() {
- var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString_1(arguments[0]);
- var result = objectIsPrototypeOf(SymbolPrototype, this) ? new NativeSymbol(description) // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
- : description === undefined ? NativeSymbol() : NativeSymbol(description);
- if (description === '') EmptyStringDescriptionStore[result] = true;
- return result;
- };
-
- copyConstructorProperties(SymbolWrapper, NativeSymbol);
- SymbolWrapper.prototype = SymbolPrototype;
- SymbolPrototype.constructor = SymbolWrapper;
- var NATIVE_SYMBOL = String(NativeSymbol('test')) == 'Symbol(test)';
- var symbolToString = functionUncurryThis(SymbolPrototype.toString);
- var symbolValueOf = functionUncurryThis(SymbolPrototype.valueOf);
- var regexp = /^Symbol\((.*)\)[^)]+$/;
- var replace$9 = functionUncurryThis(''.replace);
- var stringSlice$d = functionUncurryThis(''.slice);
- defineProperty$d(SymbolPrototype, 'description', {
- configurable: true,
- get: function description() {
- var symbol = symbolValueOf(this);
- var string = symbolToString(symbol);
- if (hasOwnProperty_1(EmptyStringDescriptionStore, symbol)) return '';
- var desc = NATIVE_SYMBOL ? stringSlice$d(string, 7, -1) : replace$9(string, regexp, '$1');
- return desc === '' ? undefined : desc;
- }
- });
- _export({
- global: true,
- forced: true
- }, {
- Symbol: SymbolWrapper
- });
- }
-
- // https://tc39.es/ecma262/#sec-symbol.asynciterator
-
- defineWellKnownSymbol('asyncIterator');
-
- // https://tc39.es/ecma262/#sec-symbol.hasinstance
-
- defineWellKnownSymbol('hasInstance');
-
- // https://tc39.es/ecma262/#sec-symbol.isconcatspreadable
-
- defineWellKnownSymbol('isConcatSpreadable');
-
- // https://tc39.es/ecma262/#sec-symbol.iterator
-
- defineWellKnownSymbol('iterator');
-
- // https://tc39.es/ecma262/#sec-symbol.match
-
- defineWellKnownSymbol('match');
-
- // https://tc39.es/ecma262/#sec-symbol.replace
-
- defineWellKnownSymbol('replace');
-
- // https://tc39.es/ecma262/#sec-symbol.search
-
- defineWellKnownSymbol('search');
-
- // https://tc39.es/ecma262/#sec-symbol.species
-
- defineWellKnownSymbol('species');
-
- // https://tc39.es/ecma262/#sec-symbol.split
-
- defineWellKnownSymbol('split');
-
- // https://tc39.es/ecma262/#sec-symbol.toprimitive
-
- defineWellKnownSymbol('toPrimitive');
-
- // https://tc39.es/ecma262/#sec-symbol.tostringtag
-
- defineWellKnownSymbol('toStringTag');
-
- // https://tc39.es/ecma262/#sec-symbol.unscopables
-
- defineWellKnownSymbol('unscopables');
-
- var SPECIES$5 = 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$5] = function () {
- return {
- foo: 1
- };
- };
-
- return array[METHOD_NAME](Boolean).foo !== 1;
- });
- };
-
- var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
- var MAX_SAFE_INTEGER$3 = 0x1FFFFFFFFFFFFF;
- var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
- var TypeError$q = global_1.TypeError; // 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 SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
-
- var isConcatSpreadable = function (O) {
- if (!isObject$2(O)) return false;
- var spreadable = O[IS_CONCAT_SPREADABLE];
- return spreadable !== undefined ? !!spreadable : isArray$1(O);
- };
-
- var FORCED$i = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT; // `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$i
- }, {
- // eslint-disable-next-line no-unused-vars -- required for `.length`
- concat: function concat(arg) {
- var O = toObject$1(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 = lengthOfArrayLike(E);
- if (n + len > MAX_SAFE_INTEGER$3) throw TypeError$q(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$3) throw TypeError$q(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
- createProperty(A, n++, E);
- }
- }
-
- A.length = n;
- return A;
- }
- });
-
- var min$7 = Math.min; // `Array.prototype.copyWithin` method implementation
- // https://tc39.es/ecma262/#sec-array.prototype.copywithin
- // eslint-disable-next-line es/no-array-prototype-copywithin -- safe
-
- var arrayCopyWithin = [].copyWithin || function copyWithin(target
- /* = 0 */
- , start
- /* = 0, end = @length */
- ) {
- var O = toObject$1(this);
- var len = lengthOfArrayLike(O);
- var to = toAbsoluteIndex(target, len);
- var from = toAbsoluteIndex(start, len);
- var end = arguments.length > 2 ? arguments[2] : undefined;
- var count = min$7((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 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$1(null)
- });
- } // add a key to Array.prototype[@@unscopables]
-
-
- var addToUnscopables = function (key) {
- ArrayPrototype$1[UNSCOPABLES][key] = true;
- };
-
- // https://tc39.es/ecma262/#sec-array.prototype.copywithin
-
- _export({
- target: 'Array',
- proto: true
- }, {
- copyWithin: arrayCopyWithin
- }); // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
-
- addToUnscopables('copyWithin');
-
- // https://tc39.es/ecma262/#sec-array.prototype.fill
-
-
- var arrayFill = function fill(value
- /* , start = 0, end = @length */
- ) {
- var O = toObject$1(this);
- var length = lengthOfArrayLike(O);
- 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;
- };
-
- // https://tc39.es/ecma262/#sec-array.prototype.fill
-
- _export({
- target: 'Array',
- proto: true
- }, {
- fill: arrayFill
- }); // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
-
- addToUnscopables('fill');
-
- var $filter$1 = arrayIteration.filter;
- var HAS_SPECIES_SUPPORT$3 = arrayMethodHasSpeciesSupport('filter'); // `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$3
- }, {
- filter: function filter(callbackfn
- /* , thisArg */
- ) {
- return $filter$1(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- }
- });
-
- var $find$1 = arrayIteration.find;
- var FIND = 'find';
- var SKIPS_HOLES$1 = true; // Shouldn't skip holes
-
- if (FIND in []) Array(1)[FIND](function () {
- SKIPS_HOLES$1 = false;
- }); // `Array.prototype.find` method
- // https://tc39.es/ecma262/#sec-array.prototype.find
-
- _export({
- target: 'Array',
- proto: true,
- forced: SKIPS_HOLES$1
- }, {
- find: function find(callbackfn
- /* , that = undefined */
- ) {
- return $find$1(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- }
- }); // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
-
- addToUnscopables(FIND);
-
- var $findIndex$1 = arrayIteration.findIndex;
- var FIND_INDEX = 'findIndex';
- var SKIPS_HOLES = true; // Shouldn't skip holes
-
- if (FIND_INDEX in []) Array(1)[FIND_INDEX](function () {
- SKIPS_HOLES = false;
- }); // `Array.prototype.findIndex` method
- // https://tc39.es/ecma262/#sec-array.prototype.findindex
-
- _export({
- target: 'Array',
- proto: true,
- forced: SKIPS_HOLES
- }, {
- findIndex: function findIndex(callbackfn
- /* , that = undefined */
- ) {
- return $findIndex$1(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- }
- }); // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
-
- addToUnscopables(FIND_INDEX);
-
- var TypeError$p = global_1.TypeError; // `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) : false;
- var element, elementLen;
-
- while (sourceIndex < sourceLen) {
- if (sourceIndex in source) {
- element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
-
- if (depth > 0 && isArray$1(element)) {
- elementLen = lengthOfArrayLike(element);
- targetIndex = flattenIntoArray(target, original, element, elementLen, targetIndex, depth - 1) - 1;
- } else {
- if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError$p('Exceed the acceptable array length');
- target[targetIndex] = element;
- }
-
- targetIndex++;
- }
-
- sourceIndex++;
- }
-
- return targetIndex;
- };
-
- var flattenIntoArray_1 = flattenIntoArray;
-
- // https://tc39.es/ecma262/#sec-array.prototype.flat
-
-
- _export({
- target: 'Array',
- proto: true
- }, {
- flat: function
- /* depthArg = 1 */
- flat() {
- var depthArg = arguments.length ? arguments[0] : undefined;
- var O = toObject$1(this);
- var sourceLen = lengthOfArrayLike(O);
- var A = arraySpeciesCreate(O, 0);
- A.length = flattenIntoArray_1(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toIntegerOrInfinity(depthArg));
- return A;
- }
- });
-
- // https://tc39.es/ecma262/#sec-array.prototype.flatmap
-
-
- _export({
- target: 'Array',
- proto: true
- }, {
- flatMap: function flatMap(callbackfn
- /* , thisArg */
- ) {
- var O = toObject$1(this);
- var sourceLen = lengthOfArrayLike(O);
- var A;
- aCallable(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 iteratorClose = function (iterator, kind, value) {
- var innerResult, innerError;
- anObject(iterator);
-
- try {
- innerResult = getMethod(iterator, 'return');
-
- if (!innerResult) {
- if (kind === 'throw') throw value;
- return value;
- }
-
- innerResult = functionCall(innerResult, iterator);
- } catch (error) {
- innerError = true;
- innerResult = error;
- }
-
- if (kind === 'throw') throw value;
- if (innerError) throw innerResult;
- anObject(innerResult);
- return value;
- };
-
- var callWithSafeIterationClosing = function (iterator, fn, value, ENTRIES) {
- try {
- return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
- } catch (error) {
- iteratorClose(iterator, 'throw', error);
- }
- };
-
- var iterators = {};
-
- var ITERATOR$a = wellKnownSymbol('iterator');
- var ArrayPrototype = Array.prototype; // check on default Array iterator
-
- var isArrayIteratorMethod = function (it) {
- return it !== undefined && (iterators.Array === it || ArrayPrototype[ITERATOR$a] === it);
- };
-
- var ITERATOR$9 = wellKnownSymbol('iterator');
-
- var getIteratorMethod = function (it) {
- if (it != undefined) return getMethod(it, ITERATOR$9) || getMethod(it, '@@iterator') || iterators[classof(it)];
- };
-
- var TypeError$o = global_1.TypeError;
-
- var getIterator = function (argument, usingIterator) {
- var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
- if (aCallable(iteratorMethod)) return anObject(functionCall(iteratorMethod, argument));
- throw TypeError$o(tryToString(argument) + ' is not iterable');
- };
-
- var Array$7 = global_1.Array; // `Array.from` method implementation
- // https://tc39.es/ecma262/#sec-array.from
-
- var arrayFrom = function from(arrayLike
- /* , mapfn = undefined, thisArg = undefined */
- ) {
- var O = toObject$1(arrayLike);
- var IS_CONSTRUCTOR = isConstructor(this);
- var argumentsLength = arguments.length;
- var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
- var mapping = mapfn !== undefined;
- if (mapping) mapfn = functionBindContext(mapfn, argumentsLength > 2 ? arguments[2] : undefined);
- var iteratorMethod = getIteratorMethod(O);
- var index = 0;
- var length, result, step, iterator, next, value; // if the target is not iterable or it's an array with the default iterator - use a simple case
-
- if (iteratorMethod && !(this == Array$7 && isArrayIteratorMethod(iteratorMethod))) {
- iterator = getIterator(O, iteratorMethod);
- next = iterator.next;
- result = IS_CONSTRUCTOR ? new this() : [];
-
- for (; !(step = functionCall(next, iterator)).done; index++) {
- value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
- createProperty(result, index, value);
- }
- } else {
- length = lengthOfArrayLike(O);
- result = IS_CONSTRUCTOR ? new this(length) : Array$7(length);
-
- for (; length > index; index++) {
- value = mapping ? mapfn(O[index], index) : O[index];
- createProperty(result, index, value);
- }
- }
-
- result.length = index;
- return result;
- };
-
- var ITERATOR$8 = wellKnownSymbol('iterator');
- var SAFE_CLOSING = false;
-
- try {
- var called = 0;
- var iteratorWithReturn = {
- next: function () {
- return {
- done: !!called++
- };
- },
- 'return': function () {
- SAFE_CLOSING = true;
- }
- };
-
- iteratorWithReturn[ITERATOR$8] = function () {
- return this;
- }; // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
-
-
- Array.from(iteratorWithReturn, function () {
- throw 2;
- });
- } catch (error) {
- /* empty */
- }
-
- var checkCorrectnessOfIteration = function (exec, SKIP_CLOSING) {
- if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
- var ITERATION_SUPPORT = false;
-
- try {
- var object = {};
-
- object[ITERATOR$8] = function () {
- return {
- next: function () {
- return {
- done: ITERATION_SUPPORT = true
- };
- }
- };
- };
-
- exec(object);
- } catch (error) {
- /* empty */
- }
-
- return ITERATION_SUPPORT;
- };
-
- var INCORRECT_ITERATION$1 = !checkCorrectnessOfIteration(function (iterable) {
- // eslint-disable-next-line es/no-array-from -- required for testing
- Array.from(iterable);
- }); // `Array.from` method
- // https://tc39.es/ecma262/#sec-array.from
-
- _export({
- target: 'Array',
- stat: true,
- forced: INCORRECT_ITERATION$1
- }, {
- from: arrayFrom
- });
-
- var $includes$1 = arrayIncludes.includes; // `Array.prototype.includes` method
- // https://tc39.es/ecma262/#sec-array.prototype.includes
-
- _export({
- target: 'Array',
- proto: true
- }, {
- includes: function includes(el
- /* , fromIndex = 0 */
- ) {
- return $includes$1(this, el, arguments.length > 1 ? arguments[1] : undefined);
- }
- }); // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
-
- addToUnscopables('includes');
-
- var arrayMethodIsStrict = function (METHOD_NAME, argument) {
- var method = [][METHOD_NAME];
- return !!method && fails(function () {
- // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing
- method.call(null, argument || function () {
- throw 1;
- }, 1);
- });
- };
-
- /* eslint-disable es/no-array-prototype-indexof -- required for testing */
-
-
- var $IndexOf = arrayIncludes.indexOf;
- var un$IndexOf = functionUncurryThis([].indexOf);
- var NEGATIVE_ZERO$1 = !!un$IndexOf && 1 / un$IndexOf([1], 1, -0) < 0;
- var STRICT_METHOD$6 = arrayMethodIsStrict('indexOf'); // `Array.prototype.indexOf` method
- // https://tc39.es/ecma262/#sec-array.prototype.indexof
-
- _export({
- target: 'Array',
- proto: true,
- forced: NEGATIVE_ZERO$1 || !STRICT_METHOD$6
- }, {
- indexOf: function indexOf(searchElement
- /* , fromIndex = 0 */
- ) {
- var fromIndex = arguments.length > 1 ? arguments[1] : undefined;
- return NEGATIVE_ZERO$1 // convert -0 to +0
- ? un$IndexOf(this, searchElement, fromIndex) || 0 : $IndexOf(this, searchElement, fromIndex);
- }
- });
-
- var correctPrototypeGetter = !fails(function () {
- function F() {
- /* empty */
- }
-
- F.prototype.constructor = null; // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
-
- return Object.getPrototypeOf(new F()) !== F.prototype;
- });
-
- var IE_PROTO = sharedKey('IE_PROTO');
- var Object$3 = global_1.Object;
- var ObjectPrototype$3 = Object$3.prototype; // `Object.getPrototypeOf` method
- // https://tc39.es/ecma262/#sec-object.getprototypeof
-
- var objectGetPrototypeOf = correctPrototypeGetter ? Object$3.getPrototypeOf : function (O) {
- var object = toObject$1(O);
- if (hasOwnProperty_1(object, IE_PROTO)) return object[IE_PROTO];
- var constructor = object.constructor;
-
- if (isCallable(constructor) && object instanceof constructor) {
- return constructor.prototype;
- }
-
- return object instanceof Object$3 ? ObjectPrototype$3 : null;
- };
-
- var ITERATOR$7 = wellKnownSymbol('iterator');
- var BUGGY_SAFARI_ITERATORS$1 = false; // `%IteratorPrototype%` object
- // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
-
- var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
- /* eslint-disable es/no-array-prototype-keys -- safe */
-
- if ([].keys) {
- arrayIterator = [].keys(); // Safari 8 has buggy iterators w/o `next`
-
- if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;else {
- PrototypeOfArrayIteratorPrototype = objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator));
- if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype;
- }
- }
-
- var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$2 == undefined || fails(function () {
- var test = {}; // FF44- legacy iterators case
-
- return IteratorPrototype$2[ITERATOR$7].call(test) !== test;
- });
- if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {}; // `%IteratorPrototype%[@@iterator]()` method
- // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
-
- if (!isCallable(IteratorPrototype$2[ITERATOR$7])) {
- redefine(IteratorPrototype$2, ITERATOR$7, function () {
- return this;
- });
- }
-
- var iteratorsCore = {
- IteratorPrototype: IteratorPrototype$2,
- BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
- };
-
- var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
-
- var returnThis$1 = function () {
- return this;
- };
-
- var createIteratorConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
- var TO_STRING_TAG = NAME + ' Iterator';
- IteratorConstructor.prototype = objectCreate$1(IteratorPrototype$1, {
- next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next)
- });
- setToStringTag(IteratorConstructor, TO_STRING_TAG, false);
- iterators[TO_STRING_TAG] = returnThis$1;
- return IteratorConstructor;
- };
-
- var String$3 = global_1.String;
- var TypeError$n = global_1.TypeError;
-
- var aPossiblePrototype = function (argument) {
- if (typeof argument == 'object' || isCallable(argument)) return argument;
- throw TypeError$n("Can't set " + String$3(argument) + ' as a prototype');
- };
-
- /* eslint-disable no-proto -- safe */
- // `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-next-line es/no-object-setprototypeof -- safe
-
- var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
- var CORRECT_SETTER = false;
- var test = {};
- var setter;
-
- try {
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
- setter = functionUncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
- setter(test, []);
- CORRECT_SETTER = test instanceof Array;
- } catch (error) {
- /* empty */
- }
-
- return function setPrototypeOf(O, proto) {
- anObject(O);
- aPossiblePrototype(proto);
- if (CORRECT_SETTER) setter(O, proto);else O.__proto__ = proto;
- return O;
- };
- }() : undefined);
-
- var PROPER_FUNCTION_NAME$3 = functionName.PROPER;
- var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
- var IteratorPrototype = iteratorsCore.IteratorPrototype;
- var BUGGY_SAFARI_ITERATORS = iteratorsCore.BUGGY_SAFARI_ITERATORS;
- var ITERATOR$6 = wellKnownSymbol('iterator');
- var KEYS = 'keys';
- var VALUES = 'values';
- var ENTRIES = 'entries';
-
- var returnThis = 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 && 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 TO_STRING_TAG = NAME + ' Iterator';
- var INCORRECT_VALUES_NAME = false;
- var IterablePrototype = Iterable.prototype;
- var nativeIterator = IterablePrototype[ITERATOR$6] || IterablePrototype['@@iterator'] || DEFAULT && IterablePrototype[DEFAULT];
- var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
- var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
- var CurrentIteratorPrototype, methods, KEY; // fix native
-
- if (anyNativeIterator) {
- CurrentIteratorPrototype = objectGetPrototypeOf(anyNativeIterator.call(new Iterable()));
-
- if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
- if (objectGetPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
- if (objectSetPrototypeOf) {
- objectSetPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
- } else if (!isCallable(CurrentIteratorPrototype[ITERATOR$6])) {
- redefine(CurrentIteratorPrototype, ITERATOR$6, returnThis);
- }
- } // Set @@toStringTag to native iterators
-
-
- setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true);
- }
- } // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
-
-
- if (PROPER_FUNCTION_NAME$3 && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
- if (CONFIGURABLE_FUNCTION_NAME$1) {
- createNonEnumerableProperty(IterablePrototype, 'name', VALUES);
- } else {
- INCORRECT_VALUES_NAME = true;
-
- defaultIterator = function values() {
- return functionCall(nativeIterator, this);
- };
- }
- } // 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 || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
- redefine(IterablePrototype, KEY, methods[KEY]);
- }
- } else _export({
- target: NAME,
- proto: true,
- forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME
- }, methods);
- } // define iterator
-
-
- if (IterablePrototype[ITERATOR$6] !== defaultIterator) {
- redefine(IterablePrototype, ITERATOR$6, defaultIterator, {
- name: DEFAULT
- });
- }
-
- iterators[NAME] = defaultIterator;
- return methods;
- };
-
- var defineProperty$c = objectDefineProperty.f;
- var ARRAY_ITERATOR = 'Array Iterator';
- var setInternalState$b = internalState.set;
- var getInternalState$7 = internalState.getterFor(ARRAY_ITERATOR); // `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$b(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$7(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.es/ecma262/#sec-createunmappedargumentsobject
- // https://tc39.es/ecma262/#sec-createmappedargumentsobject
-
- var values = iterators.Arguments = iterators.Array; // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
-
- addToUnscopables('keys');
- addToUnscopables('values');
- addToUnscopables('entries'); // V8 ~ Chrome 45- bug
-
- if (descriptors && values.name !== 'values') try {
- defineProperty$c(values, 'name', {
- value: 'values'
- });
- } catch (error) {
- /* empty */
- }
-
- var un$Join = functionUncurryThis([].join);
- var ES3_STRINGS = indexedObject != Object;
- var STRICT_METHOD$5 = arrayMethodIsStrict('join', ','); // `Array.prototype.join` method
- // https://tc39.es/ecma262/#sec-array.prototype.join
-
- _export({
- target: 'Array',
- proto: true,
- forced: ES3_STRINGS || !STRICT_METHOD$5
- }, {
- join: function join(separator) {
- return un$Join(toIndexedObject(this), separator === undefined ? ',' : separator);
- }
- });
-
- /* eslint-disable es/no-array-prototype-lastindexof -- safe */
-
-
- var min$6 = Math.min;
- var $lastIndexOf = [].lastIndexOf;
- var NEGATIVE_ZERO = !!$lastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;
- var STRICT_METHOD$4 = arrayMethodIsStrict('lastIndexOf');
- var FORCED$h = NEGATIVE_ZERO || !STRICT_METHOD$4; // `Array.prototype.lastIndexOf` method implementation
- // https://tc39.es/ecma262/#sec-array.prototype.lastindexof
-
- var arrayLastIndexOf = FORCED$h ? function lastIndexOf(searchElement
- /* , fromIndex = @[*-1] */
- ) {
- // convert -0 to +0
- if (NEGATIVE_ZERO) return functionApply($lastIndexOf, this, arguments) || 0;
- var O = toIndexedObject(this);
- var length = lengthOfArrayLike(O);
- var index = length - 1;
- if (arguments.length > 1) index = min$6(index, toIntegerOrInfinity(arguments[1]));
- if (index < 0) index = length + index;
-
- for (; index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;
-
- return -1;
- } : $lastIndexOf;
-
- // https://tc39.es/ecma262/#sec-array.prototype.lastindexof
- // eslint-disable-next-line es/no-array-prototype-lastindexof -- required for testing
-
- _export({
- target: 'Array',
- proto: true,
- forced: arrayLastIndexOf !== [].lastIndexOf
- }, {
- lastIndexOf: arrayLastIndexOf
- });
-
- var $map$1 = arrayIteration.map;
- var HAS_SPECIES_SUPPORT$2 = arrayMethodHasSpeciesSupport('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$2
- }, {
- map: function map(callbackfn
- /* , thisArg */
- ) {
- return $map$1(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- }
- });
-
- var Array$6 = global_1.Array;
- var ISNT_GENERIC = fails(function () {
- function F() {
- /* empty */
- }
-
- return !(Array$6.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
- /* ...args */
- of() {
- var index = 0;
- var argumentsLength = arguments.length;
- var result = new (isConstructor(this) ? this : Array$6)(argumentsLength);
-
- while (argumentsLength > index) createProperty(result, index, arguments[index++]);
-
- result.length = argumentsLength;
- return result;
- }
- });
-
- var TypeError$m = global_1.TypeError; // `Array.prototype.{ reduce, reduceRight }` methods implementation
-
- var createMethod$4 = function (IS_RIGHT) {
- return function (that, callbackfn, argumentsLength, memo) {
- aCallable(callbackfn);
- var O = toObject$1(that);
- var self = indexedObject(O);
- var length = lengthOfArrayLike(O);
- 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$m('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.es/ecma262/#sec-array.prototype.reduce
- left: createMethod$4(false),
- // `Array.prototype.reduceRight` method
- // https://tc39.es/ecma262/#sec-array.prototype.reduceright
- right: createMethod$4(true)
- };
-
- var engineIsNode = classofRaw(global_1.process) == 'process';
-
- var $reduce$1 = arrayReduce.left;
- var STRICT_METHOD$3 = arrayMethodIsStrict('reduce'); // 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.reduce` method
- // https://tc39.es/ecma262/#sec-array.prototype.reduce
-
- _export({
- target: 'Array',
- proto: true,
- forced: !STRICT_METHOD$3 || CHROME_BUG$1
- }, {
- reduce: function reduce(callbackfn
- /* , initialValue */
- ) {
- var length = arguments.length;
- return $reduce$1(this, callbackfn, length, length > 1 ? arguments[1] : undefined);
- }
- });
-
- var $reduceRight$1 = arrayReduce.right;
- var STRICT_METHOD$2 = arrayMethodIsStrict('reduceRight'); // 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; // `Array.prototype.reduceRight` method
- // https://tc39.es/ecma262/#sec-array.prototype.reduceright
-
- _export({
- target: 'Array',
- proto: true,
- forced: !STRICT_METHOD$2 || CHROME_BUG
- }, {
- reduceRight: function reduceRight(callbackfn
- /* , initialValue */
- ) {
- return $reduceRight$1(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
- }
- });
-
- var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('slice');
- var SPECIES$4 = wellKnownSymbol('species');
- var Array$5 = global_1.Array;
- var max$4 = Math.max; // `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$1
- }, {
- slice: function slice(start, end) {
- var O = toIndexedObject(this);
- var length = lengthOfArrayLike(O);
- 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$1(O)) {
- Constructor = O.constructor; // cross-realm fallback
-
- if (isConstructor(Constructor) && (Constructor === Array$5 || isArray$1(Constructor.prototype))) {
- Constructor = undefined;
- } else if (isObject$2(Constructor)) {
- Constructor = Constructor[SPECIES$4];
- if (Constructor === null) Constructor = undefined;
- }
-
- if (Constructor === Array$5 || Constructor === undefined) {
- return arraySlice$1(O, k, fin);
- }
- }
-
- result = new (Constructor === undefined ? Array$5 : Constructor)(max$4(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 floor$9 = Math.floor;
-
- var mergeSort = function (array, comparefn) {
- var length = array.length;
- var middle = floor$9(length / 2);
- return length < 8 ? insertionSort(array, comparefn) : merge$1(array, mergeSort(arraySliceSimple(array, 0, middle), comparefn), mergeSort(arraySliceSimple(array, middle), comparefn), comparefn);
- };
-
- var insertionSort = function (array, comparefn) {
- var length = array.length;
- var i = 1;
- var element, j;
-
- while (i < length) {
- j = i;
- element = array[i];
-
- while (j && comparefn(array[j - 1], element) > 0) {
- array[j] = array[--j];
- }
-
- if (j !== i++) array[j] = element;
- }
-
- return array;
- };
-
- var merge$1 = function (array, left, right, comparefn) {
- var llength = left.length;
- var rlength = right.length;
- var lindex = 0;
- var rindex = 0;
-
- while (lindex < llength || rindex < rlength) {
- array[lindex + rindex] = lindex < llength && rindex < rlength ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++] : lindex < llength ? left[lindex++] : right[rindex++];
- }
-
- return array;
- };
-
- var arraySort = mergeSort;
-
- var firefox = engineUserAgent.match(/firefox\/(\d+)/i);
- var engineFfVersion = !!firefox && +firefox[1];
-
- var engineIsIeOrEdge = /MSIE|Trident/.test(engineUserAgent);
-
- var webkit = engineUserAgent.match(/AppleWebKit\/(\d+)\./);
- var engineWebkitVersion = !!webkit && +webkit[1];
-
- var test = [];
- var un$Sort$1 = functionUncurryThis(test.sort);
- var push$e = functionUncurryThis(test.push); // IE8-
-
- var FAILS_ON_UNDEFINED = fails(function () {
- test.sort(undefined);
- }); // V8 bug
-
- var FAILS_ON_NULL = fails(function () {
- test.sort(null);
- }); // Old WebKit
-
- var STRICT_METHOD$1 = arrayMethodIsStrict('sort');
- var STABLE_SORT$1 = !fails(function () {
- // feature detection can be too slow, so check engines versions
- if (engineV8Version) return engineV8Version < 70;
- if (engineFfVersion && engineFfVersion > 3) return;
- if (engineIsIeOrEdge) return true;
- if (engineWebkitVersion) return engineWebkitVersion < 603;
- var result = '';
- var code, chr, value, index; // generate an array with more 512 elements (Chakra and old V8 fails only in this case)
-
- for (code = 65; code < 76; code++) {
- chr = String.fromCharCode(code);
-
- switch (code) {
- case 66:
- case 69:
- case 70:
- case 72:
- value = 3;
- break;
-
- case 68:
- case 71:
- value = 4;
- break;
-
- default:
- value = 2;
- }
-
- for (index = 0; index < 47; index++) {
- test.push({
- k: chr + index,
- v: value
- });
- }
- }
-
- test.sort(function (a, b) {
- return b.v - a.v;
- });
-
- for (index = 0; index < test.length; index++) {
- chr = test[index].k.charAt(0);
- if (result.charAt(result.length - 1) !== chr) result += chr;
- }
-
- return result !== 'DGBEFHACIJK';
- });
- var FORCED$g = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD$1 || !STABLE_SORT$1;
-
- var getSortCompare$1 = function (comparefn) {
- return function (x, y) {
- if (y === undefined) return -1;
- if (x === undefined) return 1;
- if (comparefn !== undefined) return +comparefn(x, y) || 0;
- return toString_1(x) > toString_1(y) ? 1 : -1;
- };
- }; // `Array.prototype.sort` method
- // https://tc39.es/ecma262/#sec-array.prototype.sort
-
-
- _export({
- target: 'Array',
- proto: true,
- forced: FORCED$g
- }, {
- sort: function sort(comparefn) {
- if (comparefn !== undefined) aCallable(comparefn);
- var array = toObject$1(this);
- if (STABLE_SORT$1) return comparefn === undefined ? un$Sort$1(array) : un$Sort$1(array, comparefn);
- var items = [];
- var arrayLength = lengthOfArrayLike(array);
- var itemsLength, index;
-
- for (index = 0; index < arrayLength; index++) {
- if (index in array) push$e(items, array[index]);
- }
-
- arraySort(items, getSortCompare$1(comparefn));
- itemsLength = items.length;
- index = 0;
-
- while (index < itemsLength) array[index] = items[index++];
-
- while (index < arrayLength) delete array[index++];
-
- return array;
- }
- });
-
- var SPECIES$3 = wellKnownSymbol('species');
-
- var setSpecies = function (CONSTRUCTOR_NAME) {
- var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
- var defineProperty = objectDefineProperty.f;
-
- if (descriptors && Constructor && !Constructor[SPECIES$3]) {
- defineProperty(Constructor, SPECIES$3, {
- configurable: true,
- get: function () {
- return this;
- }
- });
- }
- };
-
- // https://tc39.es/ecma262/#sec-get-array-@@species
-
- setSpecies('Array');
-
- var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');
- var TypeError$l = global_1.TypeError;
- var max$3 = Math.max;
- var min$5 = Math.min;
- var MAX_SAFE_INTEGER$2 = 0x1FFFFFFFFFFFFF;
- var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded'; // `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
- }, {
- splice: function splice(start, deleteCount
- /* , ...items */
- ) {
- var O = toObject$1(this);
- var len = lengthOfArrayLike(O);
- 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$5(max$3(toIntegerOrInfinity(deleteCount), 0), len - actualStart);
- }
-
- if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER$2) {
- throw TypeError$l(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;
- }
- });
-
- // in popular engines, so it's moved to a separate module
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
-
- addToUnscopables('flat');
-
- // in popular engines, so it's moved to a separate module
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
-
- addToUnscopables('flatMap');
-
- // eslint-disable-next-line es/no-typed-arrays -- safe
- var arrayBufferNative = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';
-
- var redefineAll = function (target, src, options) {
- for (var key in src) redefine(target, key, src[key], options);
-
- return target;
- };
-
- var TypeError$k = global_1.TypeError;
-
- var anInstance = function (it, Prototype) {
- if (objectIsPrototypeOf(Prototype, it)) return it;
- throw TypeError$k('Incorrect invocation');
- };
-
- var RangeError$9 = global_1.RangeError; // `ToIndex` abstract operation
- // https://tc39.es/ecma262/#sec-toindex
-
- var toIndex = function (it) {
- if (it === undefined) return 0;
- var number = toIntegerOrInfinity(it);
- var length = toLength(number);
- if (number !== length) throw RangeError$9('Wrong length or index');
- return length;
- };
-
- var Array$4 = global_1.Array;
- var abs$6 = Math.abs;
- var pow$4 = Math.pow;
- var floor$8 = Math.floor;
- var log$8 = Math.log;
- var LN2$2 = Math.LN2;
-
- var pack = function (number, mantissaLength, bytes) {
- var buffer = Array$4(bytes);
- var exponentLength = bytes * 8 - mantissaLength - 1;
- var eMax = (1 << exponentLength) - 1;
- var eBias = eMax >> 1;
- var rt = mantissaLength === 23 ? pow$4(2, -24) - pow$4(2, -77) : 0;
- var sign = number < 0 || number === 0 && 1 / number < 0 ? 1 : 0;
- var index = 0;
- var exponent, mantissa, c;
- number = abs$6(number); // eslint-disable-next-line no-self-compare -- NaN check
-
- if (number != number || number === Infinity) {
- // eslint-disable-next-line no-self-compare -- NaN check
- mantissa = number != number ? 1 : 0;
- exponent = eMax;
- } else {
- exponent = floor$8(log$8(number) / LN2$2);
- c = pow$4(2, -exponent);
-
- if (number * c < 1) {
- exponent--;
- c *= 2;
- }
-
- if (exponent + eBias >= 1) {
- number += rt / c;
- } else {
- number += rt * pow$4(2, 1 - eBias);
- }
-
- if (number * c >= 2) {
- exponent++;
- c /= 2;
- }
-
- if (exponent + eBias >= eMax) {
- mantissa = 0;
- exponent = eMax;
- } else if (exponent + eBias >= 1) {
- mantissa = (number * c - 1) * pow$4(2, mantissaLength);
- exponent = exponent + eBias;
- } else {
- mantissa = number * pow$4(2, eBias - 1) * pow$4(2, mantissaLength);
- exponent = 0;
- }
- }
-
- while (mantissaLength >= 8) {
- buffer[index++] = mantissa & 255;
- mantissa /= 256;
- mantissaLength -= 8;
- }
-
- exponent = exponent << mantissaLength | mantissa;
- exponentLength += mantissaLength;
-
- while (exponentLength > 0) {
- buffer[index++] = exponent & 255;
- exponent /= 256;
- exponentLength -= 8;
- }
-
- buffer[--index] |= sign * 128;
- return buffer;
- };
-
- var unpack = function (buffer, mantissaLength) {
- var bytes = buffer.length;
- var exponentLength = bytes * 8 - mantissaLength - 1;
- var eMax = (1 << exponentLength) - 1;
- var eBias = eMax >> 1;
- var nBits = exponentLength - 7;
- var index = bytes - 1;
- var sign = buffer[index--];
- var exponent = sign & 127;
- var mantissa;
- sign >>= 7;
-
- while (nBits > 0) {
- exponent = exponent * 256 + buffer[index--];
- nBits -= 8;
- }
-
- mantissa = exponent & (1 << -nBits) - 1;
- exponent >>= -nBits;
- nBits += mantissaLength;
-
- while (nBits > 0) {
- mantissa = mantissa * 256 + buffer[index--];
- nBits -= 8;
- }
-
- if (exponent === 0) {
- exponent = 1 - eBias;
- } else if (exponent === eMax) {
- return mantissa ? NaN : sign ? -Infinity : Infinity;
- } else {
- mantissa = mantissa + pow$4(2, mantissaLength);
- exponent = exponent - eBias;
- }
-
- return (sign ? -1 : 1) * mantissa * pow$4(2, exponent - mantissaLength);
- };
-
- var ieee754 = {
- pack: pack,
- unpack: unpack
- };
-
- var getOwnPropertyNames$3 = objectGetOwnPropertyNames.f;
- var defineProperty$b = objectDefineProperty.f;
- var PROPER_FUNCTION_NAME$2 = functionName.PROPER;
- var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
- var getInternalState$6 = internalState.get;
- var setInternalState$a = internalState.set;
- var ARRAY_BUFFER$1 = 'ArrayBuffer';
- var DATA_VIEW = 'DataView';
- var PROTOTYPE = 'prototype';
- var WRONG_LENGTH = 'Wrong length';
- var WRONG_INDEX = 'Wrong index';
- var NativeArrayBuffer$1 = global_1[ARRAY_BUFFER$1];
- var $ArrayBuffer = NativeArrayBuffer$1;
- var ArrayBufferPrototype = $ArrayBuffer && $ArrayBuffer[PROTOTYPE];
- var $DataView = global_1[DATA_VIEW];
- var DataViewPrototype = $DataView && $DataView[PROTOTYPE];
- var ObjectPrototype$2 = Object.prototype;
- var Array$3 = global_1.Array;
- var RangeError$8 = global_1.RangeError;
- var fill = functionUncurryThis(arrayFill);
- var reverse = functionUncurryThis([].reverse);
- var packIEEE754 = ieee754.pack;
- var unpackIEEE754 = ieee754.unpack;
-
- var packInt8 = function (number) {
- return [number & 0xFF];
- };
-
- var packInt16 = function (number) {
- return [number & 0xFF, number >> 8 & 0xFF];
- };
-
- var packInt32 = function (number) {
- return [number & 0xFF, number >> 8 & 0xFF, number >> 16 & 0xFF, number >> 24 & 0xFF];
- };
-
- var unpackInt32 = function (buffer) {
- return buffer[3] << 24 | buffer[2] << 16 | buffer[1] << 8 | buffer[0];
- };
-
- var packFloat32 = function (number) {
- return packIEEE754(number, 23, 4);
- };
-
- var packFloat64 = function (number) {
- return packIEEE754(number, 52, 8);
- };
-
- var addGetter = function (Constructor, key) {
- defineProperty$b(Constructor[PROTOTYPE], key, {
- get: function () {
- return getInternalState$6(this)[key];
- }
- });
- };
-
- var get$1 = function (view, count, index, isLittleEndian) {
- var intIndex = toIndex(index);
- var store = getInternalState$6(view);
- if (intIndex + count > store.byteLength) throw RangeError$8(WRONG_INDEX);
- var bytes = getInternalState$6(store.buffer).bytes;
- var start = intIndex + store.byteOffset;
- var pack = arraySliceSimple(bytes, start, start + count);
- return isLittleEndian ? pack : reverse(pack);
- };
-
- var set$3 = function (view, count, index, conversion, value, isLittleEndian) {
- var intIndex = toIndex(index);
- var store = getInternalState$6(view);
- if (intIndex + count > store.byteLength) throw RangeError$8(WRONG_INDEX);
- var bytes = getInternalState$6(store.buffer).bytes;
- var start = intIndex + store.byteOffset;
- var pack = conversion(+value);
-
- for (var i = 0; i < count; i++) bytes[start + i] = pack[isLittleEndian ? i : count - i - 1];
- };
-
- if (!arrayBufferNative) {
- $ArrayBuffer = function ArrayBuffer(length) {
- anInstance(this, ArrayBufferPrototype);
- var byteLength = toIndex(length);
- setInternalState$a(this, {
- bytes: fill(Array$3(byteLength), 0),
- byteLength: byteLength
- });
- if (!descriptors) this.byteLength = byteLength;
- };
-
- ArrayBufferPrototype = $ArrayBuffer[PROTOTYPE];
-
- $DataView = function DataView(buffer, byteOffset, byteLength) {
- anInstance(this, DataViewPrototype);
- anInstance(buffer, ArrayBufferPrototype);
- var bufferLength = getInternalState$6(buffer).byteLength;
- var offset = toIntegerOrInfinity(byteOffset);
- if (offset < 0 || offset > bufferLength) throw RangeError$8('Wrong offset');
- byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
- if (offset + byteLength > bufferLength) throw RangeError$8(WRONG_LENGTH);
- setInternalState$a(this, {
- buffer: buffer,
- byteLength: byteLength,
- byteOffset: offset
- });
-
- if (!descriptors) {
- this.buffer = buffer;
- this.byteLength = byteLength;
- this.byteOffset = offset;
- }
- };
-
- DataViewPrototype = $DataView[PROTOTYPE];
-
- if (descriptors) {
- addGetter($ArrayBuffer, 'byteLength');
- addGetter($DataView, 'buffer');
- addGetter($DataView, 'byteLength');
- addGetter($DataView, 'byteOffset');
- }
-
- redefineAll(DataViewPrototype, {
- getInt8: function getInt8(byteOffset) {
- return get$1(this, 1, byteOffset)[0] << 24 >> 24;
- },
- getUint8: function getUint8(byteOffset) {
- return get$1(this, 1, byteOffset)[0];
- },
- getInt16: function getInt16(byteOffset
- /* , littleEndian */
- ) {
- var bytes = get$1(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);
- return (bytes[1] << 8 | bytes[0]) << 16 >> 16;
- },
- getUint16: function getUint16(byteOffset
- /* , littleEndian */
- ) {
- var bytes = get$1(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);
- return bytes[1] << 8 | bytes[0];
- },
- getInt32: function getInt32(byteOffset
- /* , littleEndian */
- ) {
- return unpackInt32(get$1(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined));
- },
- getUint32: function getUint32(byteOffset
- /* , littleEndian */
- ) {
- return unpackInt32(get$1(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)) >>> 0;
- },
- getFloat32: function getFloat32(byteOffset
- /* , littleEndian */
- ) {
- return unpackIEEE754(get$1(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 23);
- },
- getFloat64: function getFloat64(byteOffset
- /* , littleEndian */
- ) {
- return unpackIEEE754(get$1(this, 8, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 52);
- },
- setInt8: function setInt8(byteOffset, value) {
- set$3(this, 1, byteOffset, packInt8, value);
- },
- setUint8: function setUint8(byteOffset, value) {
- set$3(this, 1, byteOffset, packInt8, value);
- },
- setInt16: function setInt16(byteOffset, value
- /* , littleEndian */
- ) {
- set$3(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);
- },
- setUint16: function setUint16(byteOffset, value
- /* , littleEndian */
- ) {
- set$3(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);
- },
- setInt32: function setInt32(byteOffset, value
- /* , littleEndian */
- ) {
- set$3(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);
- },
- setUint32: function setUint32(byteOffset, value
- /* , littleEndian */
- ) {
- set$3(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);
- },
- setFloat32: function setFloat32(byteOffset, value
- /* , littleEndian */
- ) {
- set$3(this, 4, byteOffset, packFloat32, value, arguments.length > 2 ? arguments[2] : undefined);
- },
- setFloat64: function setFloat64(byteOffset, value
- /* , littleEndian */
- ) {
- set$3(this, 8, byteOffset, packFloat64, value, arguments.length > 2 ? arguments[2] : undefined);
- }
- });
- } else {
- var INCORRECT_ARRAY_BUFFER_NAME = PROPER_FUNCTION_NAME$2 && NativeArrayBuffer$1.name !== ARRAY_BUFFER$1;
- /* eslint-disable no-new -- required for testing */
-
- if (!fails(function () {
- NativeArrayBuffer$1(1);
- }) || !fails(function () {
- new NativeArrayBuffer$1(-1);
- }) || fails(function () {
- new NativeArrayBuffer$1();
- new NativeArrayBuffer$1(1.5);
- new NativeArrayBuffer$1(NaN);
- return INCORRECT_ARRAY_BUFFER_NAME && !CONFIGURABLE_FUNCTION_NAME;
- })) {
- /* eslint-enable no-new -- required for testing */
- $ArrayBuffer = function ArrayBuffer(length) {
- anInstance(this, ArrayBufferPrototype);
- return new NativeArrayBuffer$1(toIndex(length));
- };
-
- $ArrayBuffer[PROTOTYPE] = ArrayBufferPrototype;
-
- for (var keys$3 = getOwnPropertyNames$3(NativeArrayBuffer$1), j$1 = 0, key$1; keys$3.length > j$1;) {
- if (!((key$1 = keys$3[j$1++]) in $ArrayBuffer)) {
- createNonEnumerableProperty($ArrayBuffer, key$1, NativeArrayBuffer$1[key$1]);
- }
- }
-
- ArrayBufferPrototype.constructor = $ArrayBuffer;
- } else if (INCORRECT_ARRAY_BUFFER_NAME && CONFIGURABLE_FUNCTION_NAME) {
- createNonEnumerableProperty(NativeArrayBuffer$1, 'name', ARRAY_BUFFER$1);
- } // WebKit bug - the same parent prototype for typed arrays and data view
-
-
- if (objectSetPrototypeOf && objectGetPrototypeOf(DataViewPrototype) !== ObjectPrototype$2) {
- objectSetPrototypeOf(DataViewPrototype, ObjectPrototype$2);
- } // iOS Safari 7.x bug
-
-
- var testView = new $DataView(new $ArrayBuffer(2));
- var $setInt8 = functionUncurryThis(DataViewPrototype.setInt8);
- testView.setInt8(0, 2147483648);
- testView.setInt8(1, 2147483649);
- if (testView.getInt8(0) || !testView.getInt8(1)) redefineAll(DataViewPrototype, {
- setInt8: function setInt8(byteOffset, value) {
- $setInt8(this, byteOffset, value << 24 >> 24);
- },
- setUint8: function setUint8(byteOffset, value) {
- $setInt8(this, byteOffset, value << 24 >> 24);
- }
- }, {
- unsafe: true
- });
- }
-
- setToStringTag($ArrayBuffer, ARRAY_BUFFER$1);
- setToStringTag($DataView, DATA_VIEW);
- var arrayBuffer = {
- ArrayBuffer: $ArrayBuffer,
- DataView: $DataView
- };
-
- var ARRAY_BUFFER = 'ArrayBuffer';
- var ArrayBuffer$2 = arrayBuffer[ARRAY_BUFFER];
- var NativeArrayBuffer = global_1[ARRAY_BUFFER]; // `ArrayBuffer` constructor
- // https://tc39.es/ecma262/#sec-arraybuffer-constructor
-
- _export({
- global: true,
- forced: NativeArrayBuffer !== ArrayBuffer$2
- }, {
- ArrayBuffer: ArrayBuffer$2
- });
- setSpecies(ARRAY_BUFFER);
-
- var TypeError$j = global_1.TypeError; // `Date.prototype[@@toPrimitive](hint)` method implementation
- // https://tc39.es/ecma262/#sec-date.prototype-@@toprimitive
-
- var dateToPrimitive = function (hint) {
- anObject(this);
- if (hint === 'string' || hint === 'default') hint = 'string';else if (hint !== 'number') throw TypeError$j('Incorrect hint');
- return ordinaryToPrimitive(this, hint);
- };
-
- var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
- var DatePrototype = Date.prototype; // `Date.prototype[@@toPrimitive]` method
- // https://tc39.es/ecma262/#sec-date.prototype-@@toprimitive
-
- if (!hasOwnProperty_1(DatePrototype, TO_PRIMITIVE)) {
- redefine(DatePrototype, TO_PRIMITIVE, dateToPrimitive);
- }
-
- var HAS_INSTANCE = wellKnownSymbol('hasInstance');
- var FunctionPrototype$1 = Function.prototype; // `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 (!isCallable(this) || !isObject$2(O)) return false;
- var P = this.prototype;
- if (!isObject$2(P)) return O instanceof this; // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:
-
- while (O = objectGetPrototypeOf(O)) if (P === O) return true;
-
- return false;
- }
- });
- }
-
- var FUNCTION_NAME_EXISTS = functionName.EXISTS;
- var defineProperty$a = objectDefineProperty.f;
- var FunctionPrototype = Function.prototype;
- var functionToString = functionUncurryThis(FunctionPrototype.toString);
- var nameRE = /function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/;
- var regExpExec = functionUncurryThis(nameRE.exec);
- var NAME$1 = 'name'; // Function instances `.name` property
- // https://tc39.es/ecma262/#sec-function-instances-name
-
- if (descriptors && !FUNCTION_NAME_EXISTS) {
- defineProperty$a(FunctionPrototype, NAME$1, {
- configurable: true,
- get: function () {
- try {
- return regExpExec(nameRE, functionToString(this))[1];
- } catch (error) {
- return '';
- }
- }
- });
- }
-
- // https://tc39.es/ecma262/#sec-json-@@tostringtag
-
- setToStringTag(global_1.JSON, 'JSON', true);
-
- var arrayBufferNonExtensible = fails(function () {
- if (typeof ArrayBuffer == 'function') {
- var buffer = new ArrayBuffer(8); // eslint-disable-next-line es/no-object-isextensible, es/no-object-defineproperty -- safe
-
- if (Object.isExtensible(buffer)) Object.defineProperty(buffer, 'a', {
- value: 8
- });
- }
- });
-
- var $isExtensible = Object.isExtensible;
- var FAILS_ON_PRIMITIVES$9 = fails(function () {
- $isExtensible(1);
- }); // `Object.isExtensible` method
- // https://tc39.es/ecma262/#sec-object.isextensible
-
- var objectIsExtensible = FAILS_ON_PRIMITIVES$9 || arrayBufferNonExtensible ? function isExtensible(it) {
- if (!isObject$2(it)) return false;
- if (arrayBufferNonExtensible && classofRaw(it) == 'ArrayBuffer') return false;
- return $isExtensible ? $isExtensible(it) : true;
- } : $isExtensible;
-
- var freezing = !fails(function () {
- // eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing
- return Object.isExtensible(Object.preventExtensions({}));
- });
-
- var internalMetadata = createCommonjsModule(function (module) {
- var defineProperty = objectDefineProperty.f;
- var REQUIRED = false;
- var METADATA = uid$1('meta');
- var id = 0;
-
- var setMetadata = function (it) {
- defineProperty(it, METADATA, {
- value: {
- objectID: 'O' + id++,
- // object ID
- weakData: {} // weak collections IDs
-
- }
- });
- };
-
- var fastKey = function (it, create) {
- // return a primitive with prefix
- if (!isObject$2(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
-
- if (!hasOwnProperty_1(it, METADATA)) {
- // can't set metadata to uncaught frozen object
- if (!objectIsExtensible(it)) return 'F'; // not necessary to add metadata
-
- if (!create) return 'E'; // add missing metadata
-
- setMetadata(it); // return object ID
- }
-
- return it[METADATA].objectID;
- };
-
- var getWeakData = function (it, create) {
- if (!hasOwnProperty_1(it, METADATA)) {
- // can't set metadata to uncaught frozen object
- if (!objectIsExtensible(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;
- }; // add metadata on freeze-family methods calling
-
-
- var onFreeze = function (it) {
- if (freezing && REQUIRED && objectIsExtensible(it) && !hasOwnProperty_1(it, METADATA)) setMetadata(it);
- return it;
- };
-
- var enable = function () {
- meta.enable = function () {
- /* empty */
- };
-
- REQUIRED = true;
- var getOwnPropertyNames = objectGetOwnPropertyNames.f;
- var splice = functionUncurryThis([].splice);
- var test = {};
- test[METADATA] = 1; // prevent exposing of metadata key
-
- if (getOwnPropertyNames(test).length) {
- objectGetOwnPropertyNames.f = function (it) {
- var result = getOwnPropertyNames(it);
-
- for (var i = 0, length = result.length; i < length; i++) {
- if (result[i] === METADATA) {
- splice(result, i, 1);
- break;
- }
- }
-
- return result;
- };
-
- _export({
- target: 'Object',
- stat: true,
- forced: true
- }, {
- getOwnPropertyNames: objectGetOwnPropertyNamesExternal.f
- });
- }
- };
-
- var meta = module.exports = {
- enable: enable,
- fastKey: fastKey,
- getWeakData: getWeakData,
- onFreeze: onFreeze
- };
- hiddenKeys$1[METADATA] = true;
- });
- internalMetadata.enable;
- internalMetadata.fastKey;
- internalMetadata.getWeakData;
- internalMetadata.onFreeze;
-
- var TypeError$i = global_1.TypeError;
-
- var Result = function (stopped, result) {
- this.stopped = stopped;
- this.result = result;
- };
-
- var ResultPrototype = Result.prototype;
-
- 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);
- var iterator, iterFn, index, length, result, next, step;
-
- var stop = function (condition) {
- if (iterator) iteratorClose(iterator, 'normal', condition);
- 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 {
- iterFn = getIteratorMethod(iterable);
- if (!iterFn) throw TypeError$i(tryToString(iterable) + ' is not iterable'); // optimisation for array iterators
-
- if (isArrayIteratorMethod(iterFn)) {
- for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
- result = callFn(iterable[index]);
- if (result && objectIsPrototypeOf(ResultPrototype, result)) return result;
- }
-
- return new Result(false);
- }
-
- iterator = getIterator(iterable, iterFn);
- }
-
- next = iterator.next;
-
- while (!(step = functionCall(next, iterator)).done) {
- try {
- result = callFn(step.value);
- } catch (error) {
- iteratorClose(iterator, 'throw', error);
- }
-
- if (typeof result == 'object' && result && objectIsPrototypeOf(ResultPrototype, result)) return result;
- }
-
- return new Result(false);
- };
-
- var inheritIfRequired = function ($this, dummy, Wrapper) {
- var NewTarget, NewTargetPrototype;
- if ( // it can work only with native `setPrototypeOf`
- objectSetPrototypeOf && // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
- isCallable(NewTarget = dummy.constructor) && NewTarget !== Wrapper && isObject$2(NewTargetPrototype = NewTarget.prototype) && NewTargetPrototype !== Wrapper.prototype) objectSetPrototypeOf($this, NewTargetPrototype);
- return $this;
- };
-
- var collection = function (CONSTRUCTOR_NAME, wrapper, common) {
- var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;
- var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;
- var ADDER = IS_MAP ? 'set' : 'add';
- var NativeConstructor = global_1[CONSTRUCTOR_NAME];
- var NativePrototype = NativeConstructor && NativeConstructor.prototype;
- var Constructor = NativeConstructor;
- var exported = {};
-
- var fixMethod = function (KEY) {
- var uncurriedNativeMethod = functionUncurryThis(NativePrototype[KEY]);
- redefine(NativePrototype, KEY, KEY == 'add' ? function add(value) {
- uncurriedNativeMethod(this, value === 0 ? 0 : value);
- return this;
- } : KEY == 'delete' ? function (key) {
- return IS_WEAK && !isObject$2(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);
- } : KEY == 'get' ? function get(key) {
- return IS_WEAK && !isObject$2(key) ? undefined : uncurriedNativeMethod(this, key === 0 ? 0 : key);
- } : KEY == 'has' ? function has(key) {
- return IS_WEAK && !isObject$2(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);
- } : function set(key, value) {
- uncurriedNativeMethod(this, key === 0 ? 0 : key, value);
- return this;
- });
- };
-
- var REPLACE = isForced_1(CONSTRUCTOR_NAME, !isCallable(NativeConstructor) || !(IS_WEAK || NativePrototype.forEach && !fails(function () {
- new NativeConstructor().entries().next();
- })));
-
- if (REPLACE) {
- // create collection constructor
- Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);
- internalMetadata.enable();
- } else if (isForced_1(CONSTRUCTOR_NAME, true)) {
- var instance = new Constructor(); // early implementations not supports chaining
-
- var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance; // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
-
- var THROWS_ON_PRIMITIVES = fails(function () {
- instance.has(1);
- }); // most early implementations doesn't supports iterables, most modern - not close it correctly
- // eslint-disable-next-line no-new -- required for testing
-
- var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) {
- new NativeConstructor(iterable);
- }); // for early implementations -0 and +0 not the same
-
- var BUGGY_ZERO = !IS_WEAK && fails(function () {
- // V8 ~ Chromium 42- fails only with 5+ elements
- var $instance = new NativeConstructor();
- var index = 5;
-
- while (index--) $instance[ADDER](index, index);
-
- return !$instance.has(-0);
- });
-
- if (!ACCEPT_ITERABLES) {
- Constructor = wrapper(function (dummy, iterable) {
- anInstance(dummy, NativePrototype);
- var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);
- if (iterable != undefined) iterate(iterable, that[ADDER], {
- that: that,
- AS_ENTRIES: IS_MAP
- });
- return that;
- });
- Constructor.prototype = NativePrototype;
- NativePrototype.constructor = Constructor;
- }
-
- if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {
- fixMethod('delete');
- fixMethod('has');
- IS_MAP && fixMethod('get');
- }
-
- if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); // weak collections should not contains .clear method
-
- if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;
- }
-
- exported[CONSTRUCTOR_NAME] = Constructor;
- _export({
- global: true,
- forced: Constructor != NativeConstructor
- }, exported);
- setToStringTag(Constructor, CONSTRUCTOR_NAME);
- if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);
- return Constructor;
- };
-
- var defineProperty$9 = objectDefineProperty.f;
- var fastKey = internalMetadata.fastKey;
- var setInternalState$9 = internalState.set;
- var internalStateGetterFor$1 = internalState.getterFor;
- var collectionStrong = {
- getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {
- var Constructor = wrapper(function (that, iterable) {
- anInstance(that, Prototype);
- setInternalState$9(that, {
- type: CONSTRUCTOR_NAME,
- index: objectCreate$1(null),
- first: undefined,
- last: undefined,
- size: 0
- });
- if (!descriptors) that.size = 0;
- if (iterable != undefined) iterate(iterable, that[ADDER], {
- that: that,
- AS_ENTRIES: IS_MAP
- });
- });
- var Prototype = Constructor.prototype;
- var getInternalState = internalStateGetterFor$1(CONSTRUCTOR_NAME);
-
- var define = function (that, key, value) {
- var state = getInternalState(that);
- var entry = getEntry(that, key);
- var previous, index; // change existing entry
-
- if (entry) {
- entry.value = value; // create new entry
- } else {
- state.last = entry = {
- index: index = fastKey(key, true),
- key: key,
- value: value,
- previous: previous = state.last,
- next: undefined,
- removed: false
- };
- if (!state.first) state.first = entry;
- if (previous) previous.next = entry;
- if (descriptors) state.size++;else that.size++; // add to index
-
- if (index !== 'F') state.index[index] = entry;
- }
-
- return that;
- };
-
- var getEntry = function (that, key) {
- var state = getInternalState(that); // fast case
-
- var index = fastKey(key);
- var entry;
- if (index !== 'F') return state.index[index]; // frozen object case
-
- for (entry = state.first; entry; entry = entry.next) {
- if (entry.key == key) return entry;
- }
- };
-
- redefineAll(Prototype, {
- // `{ Map, Set }.prototype.clear()` methods
- // https://tc39.es/ecma262/#sec-map.prototype.clear
- // https://tc39.es/ecma262/#sec-set.prototype.clear
- clear: function clear() {
- var that = this;
- var state = getInternalState(that);
- var data = state.index;
- var entry = state.first;
-
- while (entry) {
- entry.removed = true;
- if (entry.previous) entry.previous = entry.previous.next = undefined;
- delete data[entry.index];
- entry = entry.next;
- }
-
- state.first = state.last = undefined;
- if (descriptors) state.size = 0;else that.size = 0;
- },
- // `{ Map, Set }.prototype.delete(key)` methods
- // https://tc39.es/ecma262/#sec-map.prototype.delete
- // https://tc39.es/ecma262/#sec-set.prototype.delete
- 'delete': function (key) {
- var that = this;
- var state = getInternalState(that);
- var entry = getEntry(that, key);
-
- if (entry) {
- var next = entry.next;
- var prev = entry.previous;
- delete state.index[entry.index];
- entry.removed = true;
- if (prev) prev.next = next;
- if (next) next.previous = prev;
- if (state.first == entry) state.first = next;
- if (state.last == entry) state.last = prev;
- if (descriptors) state.size--;else that.size--;
- }
-
- return !!entry;
- },
- // `{ Map, Set }.prototype.forEach(callbackfn, thisArg = undefined)` methods
- // https://tc39.es/ecma262/#sec-map.prototype.foreach
- // https://tc39.es/ecma262/#sec-set.prototype.foreach
- forEach: function forEach(callbackfn
- /* , that = undefined */
- ) {
- var state = getInternalState(this);
- var boundFunction = functionBindContext(callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- var entry;
-
- while (entry = entry ? entry.next : state.first) {
- boundFunction(entry.value, entry.key, this); // revert to the last existing entry
-
- while (entry && entry.removed) entry = entry.previous;
- }
- },
- // `{ Map, Set}.prototype.has(key)` methods
- // https://tc39.es/ecma262/#sec-map.prototype.has
- // https://tc39.es/ecma262/#sec-set.prototype.has
- has: function has(key) {
- return !!getEntry(this, key);
- }
- });
- redefineAll(Prototype, IS_MAP ? {
- // `Map.prototype.get(key)` method
- // https://tc39.es/ecma262/#sec-map.prototype.get
- get: function get(key) {
- var entry = getEntry(this, key);
- return entry && entry.value;
- },
- // `Map.prototype.set(key, value)` method
- // https://tc39.es/ecma262/#sec-map.prototype.set
- set: function set(key, value) {
- return define(this, key === 0 ? 0 : key, value);
- }
- } : {
- // `Set.prototype.add(value)` method
- // https://tc39.es/ecma262/#sec-set.prototype.add
- add: function add(value) {
- return define(this, value = value === 0 ? 0 : value, value);
- }
- });
- if (descriptors) defineProperty$9(Prototype, 'size', {
- get: function () {
- return getInternalState(this).size;
- }
- });
- return Constructor;
- },
- setStrong: function (Constructor, CONSTRUCTOR_NAME, IS_MAP) {
- var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';
- var getInternalCollectionState = internalStateGetterFor$1(CONSTRUCTOR_NAME);
- var getInternalIteratorState = internalStateGetterFor$1(ITERATOR_NAME); // `{ Map, Set }.prototype.{ keys, values, entries, @@iterator }()` methods
- // https://tc39.es/ecma262/#sec-map.prototype.entries
- // https://tc39.es/ecma262/#sec-map.prototype.keys
- // https://tc39.es/ecma262/#sec-map.prototype.values
- // https://tc39.es/ecma262/#sec-map.prototype-@@iterator
- // https://tc39.es/ecma262/#sec-set.prototype.entries
- // https://tc39.es/ecma262/#sec-set.prototype.keys
- // https://tc39.es/ecma262/#sec-set.prototype.values
- // https://tc39.es/ecma262/#sec-set.prototype-@@iterator
-
- defineIterator(Constructor, CONSTRUCTOR_NAME, function (iterated, kind) {
- setInternalState$9(this, {
- type: ITERATOR_NAME,
- target: iterated,
- state: getInternalCollectionState(iterated),
- kind: kind,
- last: undefined
- });
- }, function () {
- var state = getInternalIteratorState(this);
- var kind = state.kind;
- var entry = state.last; // revert to the last existing entry
-
- while (entry && entry.removed) entry = entry.previous; // get next entry
-
-
- if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {
- // or finish the iteration
- state.target = undefined;
- return {
- value: undefined,
- done: true
- };
- } // return step by kind
-
-
- if (kind == 'keys') return {
- value: entry.key,
- done: false
- };
- if (kind == 'values') return {
- value: entry.value,
- done: false
- };
- return {
- value: [entry.key, entry.value],
- done: false
- };
- }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); // `{ Map, Set }.prototype[@@species]` accessors
- // https://tc39.es/ecma262/#sec-get-map-@@species
- // https://tc39.es/ecma262/#sec-get-set-@@species
-
- setSpecies(CONSTRUCTOR_NAME);
- }
- };
- collectionStrong.getConstructor;
- collectionStrong.setStrong;
-
- // https://tc39.es/ecma262/#sec-map-objects
-
-
- collection('Map', function (init) {
- return function Map() {
- return init(this, arguments.length ? arguments[0] : undefined);
- };
- }, collectionStrong);
-
- var log$7 = Math.log; // `Math.log1p` method implementation
- // https://tc39.es/ecma262/#sec-math.log1p
- // eslint-disable-next-line es/no-math-log1p -- safe
-
- var mathLog1p = Math.log1p || function log1p(x) {
- return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : log$7(1 + x);
- };
-
- var $acosh = Math.acosh;
- var log$6 = Math.log;
- var sqrt$2 = Math.sqrt;
- var LN2$1 = Math.LN2;
- var FORCED$f = !$acosh // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509
- || Math.floor($acosh(Number.MAX_VALUE)) != 710 // Tor Browser bug: Math.acosh(Infinity) -> NaN
- || $acosh(Infinity) != Infinity; // `Math.acosh` method
- // https://tc39.es/ecma262/#sec-math.acosh
-
- _export({
- target: 'Math',
- stat: true,
- forced: FORCED$f
- }, {
- acosh: function acosh(x) {
- return (x = +x) < 1 ? NaN : x > 94906265.62425156 ? log$6(x) + LN2$1 : mathLog1p(x - 1 + sqrt$2(x - 1) * sqrt$2(x + 1));
- }
- });
-
- var $asinh = Math.asinh;
- var log$5 = Math.log;
- var sqrt$1 = Math.sqrt;
-
- function asinh(x) {
- return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : log$5(x + sqrt$1(x * x + 1));
- } // `Math.asinh` method
- // https://tc39.es/ecma262/#sec-math.asinh
- // Tor Browser bug: Math.asinh(0) -> -0
-
-
- _export({
- target: 'Math',
- stat: true,
- forced: !($asinh && 1 / $asinh(0) > 0)
- }, {
- asinh: asinh
- });
-
- var $atanh = Math.atanh;
- var log$4 = Math.log; // `Math.atanh` method
- // https://tc39.es/ecma262/#sec-math.atanh
- // Tor Browser bug: Math.atanh(-0) -> 0
-
- _export({
- target: 'Math',
- stat: true,
- forced: !($atanh && 1 / $atanh(-0) < 0)
- }, {
- atanh: function atanh(x) {
- return (x = +x) == 0 ? x : log$4((1 + x) / (1 - x)) / 2;
- }
- });
-
- // `Math.sign` method implementation
- // https://tc39.es/ecma262/#sec-math.sign
- // eslint-disable-next-line es/no-math-sign -- safe
- var mathSign = Math.sign || function sign(x) {
- // eslint-disable-next-line no-self-compare -- NaN check
- return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;
- };
-
- var abs$5 = Math.abs;
- var pow$3 = Math.pow; // `Math.cbrt` method
- // https://tc39.es/ecma262/#sec-math.cbrt
-
- _export({
- target: 'Math',
- stat: true
- }, {
- cbrt: function cbrt(x) {
- return mathSign(x = +x) * pow$3(abs$5(x), 1 / 3);
- }
- });
-
- var floor$7 = Math.floor;
- var log$3 = Math.log;
- var LOG2E = Math.LOG2E; // `Math.clz32` method
- // https://tc39.es/ecma262/#sec-math.clz32
-
- _export({
- target: 'Math',
- stat: true
- }, {
- clz32: function clz32(x) {
- return (x >>>= 0) ? 31 - floor$7(log$3(x + 0.5) * LOG2E) : 32;
- }
- });
-
- // eslint-disable-next-line es/no-math-expm1 -- safe
- var $expm1 = Math.expm1;
- var exp$2 = Math.exp; // `Math.expm1` method implementation
- // https://tc39.es/ecma262/#sec-math.expm1
-
- var mathExpm1 = !$expm1 // Old FF bug
- || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 // Tor Browser bug
- || $expm1(-2e-17) != -2e-17 ? function expm1(x) {
- return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : exp$2(x) - 1;
- } : $expm1;
-
- var $cosh = Math.cosh;
- var abs$4 = Math.abs;
- var E$1 = Math.E; // `Math.cosh` method
- // https://tc39.es/ecma262/#sec-math.cosh
-
- _export({
- target: 'Math',
- stat: true,
- forced: !$cosh || $cosh(710) === Infinity
- }, {
- cosh: function cosh(x) {
- var t = mathExpm1(abs$4(x) - 1) + 1;
- return (t + 1 / (t * E$1 * E$1)) * (E$1 / 2);
- }
- });
-
- // https://tc39.es/ecma262/#sec-math.expm1
- // eslint-disable-next-line es/no-math-expm1 -- required for testing
-
- _export({
- target: 'Math',
- stat: true,
- forced: mathExpm1 != Math.expm1
- }, {
- expm1: mathExpm1
- });
-
- var abs$3 = Math.abs;
- var pow$2 = Math.pow;
- var EPSILON = pow$2(2, -52);
- var EPSILON32 = pow$2(2, -23);
- var MAX32 = pow$2(2, 127) * (2 - EPSILON32);
- var MIN32 = pow$2(2, -126);
-
- var roundTiesToEven = function (n) {
- return n + 1 / EPSILON - 1 / EPSILON;
- }; // `Math.fround` method implementation
- // https://tc39.es/ecma262/#sec-math.fround
- // eslint-disable-next-line es/no-math-fround -- safe
-
-
- var mathFround = Math.fround || function fround(x) {
- var $abs = abs$3(x);
- var $sign = mathSign(x);
- var a, result;
- if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32;
- a = (1 + EPSILON32 / EPSILON) * $abs;
- result = a - (a - $abs); // eslint-disable-next-line no-self-compare -- NaN check
-
- if (result > MAX32 || result != result) return $sign * Infinity;
- return $sign * result;
- };
-
- // https://tc39.es/ecma262/#sec-math.fround
-
- _export({
- target: 'Math',
- stat: true
- }, {
- fround: mathFround
- });
-
- var $hypot = Math.hypot;
- var abs$2 = Math.abs;
- var sqrt = Math.sqrt; // Chrome 77 bug
- // https://bugs.chromium.org/p/v8/issues/detail?id=9546
-
- var BUGGY = !!$hypot && $hypot(Infinity, NaN) !== Infinity; // `Math.hypot` method
- // https://tc39.es/ecma262/#sec-math.hypot
-
- _export({
- target: 'Math',
- stat: true,
- forced: BUGGY
- }, {
- // eslint-disable-next-line no-unused-vars -- required for `.length`
- hypot: function hypot(value1, value2) {
- var sum = 0;
- var i = 0;
- var aLen = arguments.length;
- var larg = 0;
- var arg, div;
-
- while (i < aLen) {
- arg = abs$2(arguments[i++]);
-
- if (larg < arg) {
- div = larg / arg;
- sum = sum * div * div + 1;
- larg = arg;
- } else if (arg > 0) {
- div = arg / larg;
- sum += div * div;
- } else sum += arg;
- }
-
- return larg === Infinity ? Infinity : larg * sqrt(sum);
- }
- });
-
- var $imul = Math.imul;
- var FORCED$e = fails(function () {
- return $imul(0xFFFFFFFF, 5) != -5 || $imul.length != 2;
- }); // `Math.imul` method
- // 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$e
- }, {
- imul: function imul(x, y) {
- var UINT16 = 0xFFFF;
- var xn = +x;
- var yn = +y;
- var xl = UINT16 & xn;
- var yl = UINT16 & yn;
- return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0);
- }
- });
-
- var log$2 = Math.log;
- var LOG10E = Math.LOG10E; // eslint-disable-next-line es/no-math-log10 -- safe
-
- var mathLog10 = Math.log10 || function log10(x) {
- return log$2(x) * LOG10E;
- };
-
- // https://tc39.es/ecma262/#sec-math.log10
-
- _export({
- target: 'Math',
- stat: true
- }, {
- log10: mathLog10
- });
-
- // https://tc39.es/ecma262/#sec-math.log1p
-
- _export({
- target: 'Math',
- stat: true
- }, {
- log1p: mathLog1p
- });
-
- var log$1 = Math.log;
- var LN2 = Math.LN2; // `Math.log2` method
- // https://tc39.es/ecma262/#sec-math.log2
-
- _export({
- target: 'Math',
- stat: true
- }, {
- log2: function log2(x) {
- return log$1(x) / LN2;
- }
- });
-
- // https://tc39.es/ecma262/#sec-math.sign
-
- _export({
- target: 'Math',
- stat: true
- }, {
- sign: mathSign
- });
-
- var abs$1 = Math.abs;
- var exp$1 = Math.exp;
- var E = Math.E;
- var FORCED$d = fails(function () {
- // eslint-disable-next-line es/no-math-sinh -- required for testing
- return Math.sinh(-2e-17) != -2e-17;
- }); // `Math.sinh` method
- // 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$d
- }, {
- sinh: function sinh(x) {
- return abs$1(x = +x) < 1 ? (mathExpm1(x) - mathExpm1(-x)) / 2 : (exp$1(x - 1) - exp$1(-x - 1)) * (E / 2);
- }
- });
-
- var exp = Math.exp; // `Math.tanh` method
- // https://tc39.es/ecma262/#sec-math.tanh
-
- _export({
- target: 'Math',
- stat: true
- }, {
- tanh: function tanh(x) {
- var a = mathExpm1(x = +x);
- var b = mathExpm1(-x);
- return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));
- }
- });
-
- // https://tc39.es/ecma262/#sec-math-@@tostringtag
-
- setToStringTag(Math, 'Math', true);
-
- var ceil$1 = Math.ceil;
- var floor$6 = Math.floor; // `Math.trunc` method
- // https://tc39.es/ecma262/#sec-math.trunc
-
- _export({
- target: 'Math',
- stat: true
- }, {
- trunc: function trunc(it) {
- return (it > 0 ? floor$6 : ceil$1)(it);
- }
- });
-
- // https://tc39.es/ecma262/#sec-thisnumbervalue
-
- var thisNumberValue = functionUncurryThis(1.0.valueOf);
-
- // a string of all valid unicode whitespaces
- var whitespaces = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' + '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
-
- var replace$8 = functionUncurryThis(''.replace);
- var whitespace = '[' + whitespaces + ']';
- var ltrim = RegExp('^' + whitespace + whitespace + '*');
- var rtrim = RegExp(whitespace + whitespace + '*$'); // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
-
- var createMethod$3 = function (TYPE) {
- return function ($this) {
- var string = toString_1(requireObjectCoercible($this));
- if (TYPE & 1) string = replace$8(string, ltrim, '');
- if (TYPE & 2) string = replace$8(string, rtrim, '');
- return string;
- };
- };
-
- var stringTrim = {
- // `String.prototype.{ trimLeft, trimStart }` methods
- // https://tc39.es/ecma262/#sec-string.prototype.trimstart
- start: createMethod$3(1),
- // `String.prototype.{ trimRight, trimEnd }` methods
- // https://tc39.es/ecma262/#sec-string.prototype.trimend
- end: createMethod$3(2),
- // `String.prototype.trim` method
- // https://tc39.es/ecma262/#sec-string.prototype.trim
- trim: createMethod$3(3)
- };
-
- var getOwnPropertyNames$2 = objectGetOwnPropertyNames.f;
- var getOwnPropertyDescriptor$6 = objectGetOwnPropertyDescriptor.f;
- var defineProperty$8 = objectDefineProperty.f;
- var trim$2 = stringTrim.trim;
- var NUMBER = 'Number';
- var NativeNumber = global_1[NUMBER];
- var NumberPrototype = NativeNumber.prototype;
- var TypeError$h = global_1.TypeError;
- var arraySlice = functionUncurryThis(''.slice);
- var charCodeAt$2 = functionUncurryThis(''.charCodeAt); // `ToNumeric` abstract operation
- // https://tc39.es/ecma262/#sec-tonumeric
-
- var toNumeric = function (value) {
- var primValue = toPrimitive(value, 'number');
- return typeof primValue == 'bigint' ? primValue : toNumber$1(primValue);
- }; // `ToNumber` abstract operation
- // https://tc39.es/ecma262/#sec-tonumber
-
-
- var toNumber$1 = function (argument) {
- var it = toPrimitive(argument, 'number');
- var first, third, radix, maxCode, digits, length, index, code;
- if (isSymbol(it)) throw TypeError$h('Cannot convert a Symbol value to a number');
-
- if (typeof it == 'string' && it.length > 2) {
- it = trim$2(it);
- first = charCodeAt$2(it, 0);
-
- if (first === 43 || first === 45) {
- third = charCodeAt$2(it, 2);
- if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
- } else if (first === 48) {
- switch (charCodeAt$2(it, 1)) {
- case 66:
- case 98:
- radix = 2;
- maxCode = 49;
- break;
- // fast equal of /^0b[01]+$/i
-
- case 79:
- case 111:
- radix = 8;
- maxCode = 55;
- break;
- // fast equal of /^0o[0-7]+$/i
-
- default:
- return +it;
- }
-
- digits = arraySlice(it, 2);
- length = digits.length;
-
- for (index = 0; index < length; index++) {
- code = charCodeAt$2(digits, index); // parseInt parses a string to a first unavailable symbol
- // but ToNumber should return NaN if a string contains unavailable symbols
-
- if (code < 48 || code > maxCode) return NaN;
- }
-
- return parseInt(digits, radix);
- }
- }
-
- return +it;
- }; // `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 n = arguments.length < 1 ? 0 : NativeNumber(toNumeric(value));
- var dummy = this; // check on 1..constructor(foo) case
-
- return objectIsPrototypeOf(NumberPrototype, dummy) && fails(function () {
- thisNumberValue(dummy);
- }) ? inheritIfRequired(Object(n), dummy, NumberWrapper) : n;
- };
-
- for (var keys$2 = descriptors ? getOwnPropertyNames$2(NativeNumber) : ( // ES3:
- 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + // ES2015 (in case, if modules with ES2015 Number statics required before):
- 'EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,' + // ESNext
- 'fromString,range').split(','), j = 0, key; keys$2.length > j; j++) {
- if (hasOwnProperty_1(NativeNumber, key = keys$2[j]) && !hasOwnProperty_1(NumberWrapper, key)) {
- defineProperty$8(NumberWrapper, key, getOwnPropertyDescriptor$6(NativeNumber, key));
- }
- }
-
- NumberWrapper.prototype = NumberPrototype;
- NumberPrototype.constructor = NumberWrapper;
- redefine(global_1, NUMBER, NumberWrapper);
- }
-
- // https://tc39.es/ecma262/#sec-number.epsilon
-
- _export({
- target: 'Number',
- stat: true
- }, {
- EPSILON: Math.pow(2, -52)
- });
-
- var globalIsFinite = global_1.isFinite; // `Number.isFinite` method
- // https://tc39.es/ecma262/#sec-number.isfinite
- // eslint-disable-next-line es/no-number-isfinite -- safe
-
- var numberIsFinite = Number.isFinite || function isFinite(it) {
- return typeof it == 'number' && globalIsFinite(it);
- };
-
- // https://tc39.es/ecma262/#sec-number.isfinite
-
- _export({
- target: 'Number',
- stat: true
- }, {
- isFinite: numberIsFinite
- });
-
- var floor$5 = Math.floor; // `IsIntegralNumber` abstract operation
- // https://tc39.es/ecma262/#sec-isintegralnumber
- // eslint-disable-next-line es/no-number-isinteger -- safe
-
- var isIntegralNumber = Number.isInteger || function isInteger(it) {
- return !isObject$2(it) && isFinite(it) && floor$5(it) === it;
- };
-
- // https://tc39.es/ecma262/#sec-number.isinteger
-
- _export({
- target: 'Number',
- stat: true
- }, {
- isInteger: isIntegralNumber
- });
-
- // https://tc39.es/ecma262/#sec-number.isnan
-
- _export({
- target: 'Number',
- stat: true
- }, {
- isNaN: function isNaN(number) {
- // eslint-disable-next-line no-self-compare -- NaN check
- return number != number;
- }
- });
-
- var abs = Math.abs; // `Number.isSafeInteger` method
- // https://tc39.es/ecma262/#sec-number.issafeinteger
-
- _export({
- target: 'Number',
- stat: true
- }, {
- isSafeInteger: function isSafeInteger(number) {
- return isIntegralNumber(number) && abs(number) <= 0x1FFFFFFFFFFFFF;
- }
- });
-
- // https://tc39.es/ecma262/#sec-number.max_safe_integer
-
- _export({
- target: 'Number',
- stat: true
- }, {
- MAX_SAFE_INTEGER: 0x1FFFFFFFFFFFFF
- });
-
- // https://tc39.es/ecma262/#sec-number.min_safe_integer
-
- _export({
- target: 'Number',
- stat: true
- }, {
- MIN_SAFE_INTEGER: -0x1FFFFFFFFFFFFF
- });
-
- var trim$1 = stringTrim.trim;
- var charAt$b = functionUncurryThis(''.charAt);
- var n$ParseFloat = global_1.parseFloat;
- var Symbol$3 = global_1.Symbol;
- var ITERATOR$5 = Symbol$3 && Symbol$3.iterator;
- var FORCED$c = 1 / n$ParseFloat(whitespaces + '-0') !== -Infinity // MS Edge 18- broken with boxed symbols
- || ITERATOR$5 && !fails(function () {
- n$ParseFloat(Object(ITERATOR$5));
- }); // `parseFloat` method
- // https://tc39.es/ecma262/#sec-parsefloat-string
-
- var numberParseFloat = FORCED$c ? function parseFloat(string) {
- var trimmedString = trim$1(toString_1(string));
- var result = n$ParseFloat(trimmedString);
- return result === 0 && charAt$b(trimmedString, 0) == '-' ? -0 : result;
- } : n$ParseFloat;
-
- // https://tc39.es/ecma262/#sec-number.parseFloat
- // eslint-disable-next-line es/no-number-parsefloat -- required for testing
-
- _export({
- target: 'Number',
- stat: true,
- forced: Number.parseFloat != numberParseFloat
- }, {
- parseFloat: numberParseFloat
- });
-
- var trim = stringTrim.trim;
- var $parseInt = global_1.parseInt;
- var Symbol$2 = global_1.Symbol;
- var ITERATOR$4 = Symbol$2 && Symbol$2.iterator;
- var hex = /^[+-]?0x/i;
- var exec$5 = functionUncurryThis(hex.exec);
- var FORCED$b = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22 // MS Edge 18- broken with boxed symbols
- || ITERATOR$4 && !fails(function () {
- $parseInt(Object(ITERATOR$4));
- }); // `parseInt` method
- // https://tc39.es/ecma262/#sec-parseint-string-radix
-
- var numberParseInt = FORCED$b ? function parseInt(string, radix) {
- var S = trim(toString_1(string));
- return $parseInt(S, radix >>> 0 || (exec$5(hex, S) ? 16 : 10));
- } : $parseInt;
-
- // https://tc39.es/ecma262/#sec-number.parseint
- // eslint-disable-next-line es/no-number-parseint -- required for testing
-
- _export({
- target: 'Number',
- stat: true,
- forced: Number.parseInt != numberParseInt
- }, {
- parseInt: numberParseInt
- });
-
- var RangeError$7 = global_1.RangeError; // `String.prototype.repeat` method implementation
- // https://tc39.es/ecma262/#sec-string.prototype.repeat
-
- var stringRepeat = function repeat(count) {
- var str = toString_1(requireObjectCoercible(this));
- var result = '';
- var n = toIntegerOrInfinity(count);
- if (n < 0 || n == Infinity) throw RangeError$7('Wrong number of repetitions');
-
- for (; n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str;
-
- return result;
- };
-
- var RangeError$6 = global_1.RangeError;
- var String$2 = global_1.String;
- var floor$4 = Math.floor;
- var repeat$2 = functionUncurryThis(stringRepeat);
- var stringSlice$c = functionUncurryThis(''.slice);
- var un$ToFixed = functionUncurryThis(1.0.toFixed);
-
- var pow$1 = function (x, n, acc) {
- return n === 0 ? acc : n % 2 === 1 ? pow$1(x, n - 1, acc * x) : pow$1(x * x, n / 2, acc);
- };
-
- var log = function (x) {
- var n = 0;
- var x2 = x;
-
- while (x2 >= 4096) {
- n += 12;
- x2 /= 4096;
- }
-
- while (x2 >= 2) {
- n += 1;
- x2 /= 2;
- }
-
- return n;
- };
-
- var multiply = function (data, n, c) {
- var index = -1;
- var c2 = c;
-
- while (++index < 6) {
- c2 += n * data[index];
- data[index] = c2 % 1e7;
- c2 = floor$4(c2 / 1e7);
- }
- };
-
- var divide = function (data, n) {
- var index = 6;
- var c = 0;
-
- while (--index >= 0) {
- c += data[index];
- data[index] = floor$4(c / n);
- c = c % n * 1e7;
- }
- };
-
- var dataToString = function (data) {
- var index = 6;
- var s = '';
-
- while (--index >= 0) {
- if (s !== '' || index === 0 || data[index] !== 0) {
- var t = String$2(data[index]);
- s = s === '' ? t : s + repeat$2('0', 7 - t.length) + t;
- }
- }
-
- return s;
- };
-
- var FORCED$a = fails(function () {
- return un$ToFixed(0.00008, 3) !== '0.000' || un$ToFixed(0.9, 0) !== '1' || un$ToFixed(1.255, 2) !== '1.25' || un$ToFixed(1000000000000000128.0, 0) !== '1000000000000000128';
- }) || !fails(function () {
- // V8 ~ Android 4.3-
- un$ToFixed({});
- }); // `Number.prototype.toFixed` method
- // https://tc39.es/ecma262/#sec-number.prototype.tofixed
-
- _export({
- target: 'Number',
- proto: true,
- forced: FORCED$a
- }, {
- toFixed: function toFixed(fractionDigits) {
- var number = thisNumberValue(this);
- var fractDigits = toIntegerOrInfinity(fractionDigits);
- var data = [0, 0, 0, 0, 0, 0];
- var sign = '';
- var result = '0';
- var e, z, j, k; // TODO: ES2018 increased the maximum number of fraction digits to 100, need to improve the implementation
-
- if (fractDigits < 0 || fractDigits > 20) throw RangeError$6('Incorrect fraction digits'); // eslint-disable-next-line no-self-compare -- NaN check
-
- if (number != number) return 'NaN';
- if (number <= -1e21 || number >= 1e21) return String$2(number);
-
- if (number < 0) {
- sign = '-';
- number = -number;
- }
-
- if (number > 1e-21) {
- e = log(number * pow$1(2, 69, 1)) - 69;
- z = e < 0 ? number * pow$1(2, -e, 1) : number / pow$1(2, e, 1);
- z *= 0x10000000000000;
- e = 52 - e;
-
- if (e > 0) {
- multiply(data, 0, z);
- j = fractDigits;
-
- while (j >= 7) {
- multiply(data, 1e7, 0);
- j -= 7;
- }
-
- multiply(data, pow$1(10, j, 1), 0);
- j = e - 1;
-
- while (j >= 23) {
- divide(data, 1 << 23);
- j -= 23;
- }
-
- divide(data, 1 << j);
- multiply(data, 1, 1);
- divide(data, 2);
- result = dataToString(data);
- } else {
- multiply(data, 0, z);
- multiply(data, 1 << -e, 0);
- result = dataToString(data) + repeat$2('0', fractDigits);
- }
- }
-
- if (fractDigits > 0) {
- k = result.length;
- result = sign + (k <= fractDigits ? '0.' + repeat$2('0', fractDigits - k) + result : stringSlice$c(result, 0, k - fractDigits) + '.' + stringSlice$c(result, k - fractDigits));
- } else {
- result = sign + result;
- }
-
- return result;
- }
- });
-
- var $assign = Object.assign; // eslint-disable-next-line es/no-object-defineproperty -- required for testing
-
- var defineProperty$7 = Object.defineProperty;
- var concat$4 = functionUncurryThis([].concat); // `Object.assign` method
- // https://tc39.es/ecma262/#sec-object.assign
-
- var objectAssign = !$assign || fails(function () {
- // should have correct order of operations (Edge bug)
- if (descriptors && $assign({
- b: 1
- }, $assign(defineProperty$7({}, 'a', {
- enumerable: true,
- get: function () {
- defineProperty$7(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 es/no-symbol -- safe
-
- var symbol = Symbol();
- var alphabet = 'abcdefghijklmnopqrst';
- A[symbol] = 7;
- alphabet.split('').forEach(function (chr) {
- B[chr] = chr;
- });
- return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
- }) ? function assign(target, source) {
- // eslint-disable-line no-unused-vars -- required for `.length`
- var T = toObject$1(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 ? concat$4(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
- var length = keys.length;
- var j = 0;
- var key;
-
- while (length > j) {
- key = keys[j++];
- if (!descriptors || functionCall(propertyIsEnumerable, S, key)) T[key] = S[key];
- }
- }
-
- return T;
- } : $assign;
-
- // https://tc39.es/ecma262/#sec-object.assign
- // eslint-disable-next-line es/no-object-assign -- required for testing
-
- _export({
- target: 'Object',
- stat: true,
- forced: Object.assign !== objectAssign
- }, {
- assign: objectAssign
- });
-
- var objectPrototypeAccessorsForced = !fails(function () {
- // This feature detection crashes old WebKit
- // https://github.com/zloirock/core-js/issues/232
- if (engineWebkitVersion && engineWebkitVersion < 535) return;
- var key = Math.random(); // In FF throws only define methods
- // eslint-disable-next-line no-undef, no-useless-call -- required for testing
-
- __defineSetter__.call(null, key, function () {
- /* empty */
- });
-
- delete global_1[key];
- });
-
- // 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$1(this), P, {
- get: aCallable(getter),
- enumerable: true,
- configurable: true
- });
- }
- });
- }
-
- var defineProperties$1 = objectDefineProperties.f; // `Object.defineProperties` method
- // https://tc39.es/ecma262/#sec-object.defineproperties
- // eslint-disable-next-line es/no-object-defineproperties -- safe
-
- _export({
- target: 'Object',
- stat: true,
- forced: Object.defineProperties !== defineProperties$1,
- sham: !descriptors
- }, {
- defineProperties: defineProperties$1
- });
-
- var defineProperty$6 = objectDefineProperty.f; // `Object.defineProperty` method
- // https://tc39.es/ecma262/#sec-object.defineproperty
- // eslint-disable-next-line es/no-object-defineproperty -- safe
-
- _export({
- target: 'Object',
- stat: true,
- forced: Object.defineProperty !== defineProperty$6,
- sham: !descriptors
- }, {
- defineProperty: defineProperty$6
- });
-
- // 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$1(this), P, {
- set: aCallable(setter),
- enumerable: true,
- configurable: true
- });
- }
- });
- }
-
- var $propertyIsEnumerable = objectPropertyIsEnumerable.f;
- var propertyIsEnumerable$1 = functionUncurryThis($propertyIsEnumerable);
- var push$d = functionUncurryThis([].push); // `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$1(O, key)) {
- push$d(result, TO_ENTRIES ? [key, O[key]] : O[key]);
- }
- }
-
- return result;
- };
- };
-
- var objectToArray = {
- // `Object.entries` method
- // https://tc39.es/ecma262/#sec-object.entries
- entries: createMethod$2(true),
- // `Object.values` method
- // https://tc39.es/ecma262/#sec-object.values
- values: createMethod$2(false)
- };
-
- var $entries = objectToArray.entries; // `Object.entries` method
- // https://tc39.es/ecma262/#sec-object.entries
-
- _export({
- target: 'Object',
- stat: true
- }, {
- entries: function entries(O) {
- return $entries(O);
- }
- });
-
- var onFreeze$2 = internalMetadata.onFreeze; // eslint-disable-next-line es/no-object-freeze -- safe
-
- var $freeze = Object.freeze;
- var FAILS_ON_PRIMITIVES$8 = fails(function () {
- $freeze(1);
- }); // `Object.freeze` method
- // https://tc39.es/ecma262/#sec-object.freeze
-
- _export({
- target: 'Object',
- stat: true,
- forced: FAILS_ON_PRIMITIVES$8,
- sham: !freezing
- }, {
- freeze: function freeze(it) {
- return $freeze && isObject$2(it) ? $freeze(onFreeze$2(it)) : it;
- }
- });
-
- // 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;
- }
- });
-
- var nativeGetOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
- var FAILS_ON_PRIMITIVES$7 = fails(function () {
- nativeGetOwnPropertyDescriptor(1);
- });
- var FORCED$9 = !descriptors || FAILS_ON_PRIMITIVES$7; // `Object.getOwnPropertyDescriptor` method
- // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
-
- _export({
- target: 'Object',
- stat: true,
- forced: FORCED$9,
- sham: !descriptors
- }, {
- getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
- return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);
- }
- });
-
- // 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);
- }
-
- return result;
- }
- });
-
- var getOwnPropertyNames$1 = objectGetOwnPropertyNamesExternal.f; // eslint-disable-next-line es/no-object-getownpropertynames -- required for testing
-
- var FAILS_ON_PRIMITIVES$6 = 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$6
- }, {
- getOwnPropertyNames: getOwnPropertyNames$1
- });
-
- var FAILS_ON_PRIMITIVES$5 = fails(function () {
- objectGetPrototypeOf(1);
- }); // `Object.getPrototypeOf` method
- // https://tc39.es/ecma262/#sec-object.getprototypeof
-
- _export({
- target: 'Object',
- stat: true,
- forced: FAILS_ON_PRIMITIVES$5,
- sham: !correctPrototypeGetter
- }, {
- getPrototypeOf: function getPrototypeOf(it) {
- return objectGetPrototypeOf(toObject$1(it));
- }
- });
-
- // `SameValue` abstract operation
- // https://tc39.es/ecma262/#sec-samevalue
- // eslint-disable-next-line es/no-object-is -- safe
- var sameValue = Object.is || function is(x, y) {
- // eslint-disable-next-line no-self-compare -- NaN check
- return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
- };
-
- // https://tc39.es/ecma262/#sec-object.is
-
- _export({
- target: 'Object',
- stat: true
- }, {
- is: sameValue
- });
-
- // https://tc39.es/ecma262/#sec-object.isextensible
- // eslint-disable-next-line es/no-object-isextensible -- safe
-
- _export({
- target: 'Object',
- stat: true,
- forced: Object.isExtensible !== objectIsExtensible
- }, {
- isExtensible: objectIsExtensible
- });
-
- var $isFrozen = Object.isFrozen;
- var FAILS_ON_PRIMITIVES$4 = fails(function () {
- $isFrozen(1);
- }); // `Object.isFrozen` method
- // https://tc39.es/ecma262/#sec-object.isfrozen
-
- _export({
- target: 'Object',
- stat: true,
- forced: FAILS_ON_PRIMITIVES$4 || arrayBufferNonExtensible
- }, {
- isFrozen: function isFrozen(it) {
- if (!isObject$2(it)) return true;
- if (arrayBufferNonExtensible && classofRaw(it) == 'ArrayBuffer') return true;
- return $isFrozen ? $isFrozen(it) : false;
- }
- });
-
- var $isSealed = Object.isSealed;
- var FAILS_ON_PRIMITIVES$3 = fails(function () {
- $isSealed(1);
- }); // `Object.isSealed` method
- // https://tc39.es/ecma262/#sec-object.issealed
-
- _export({
- target: 'Object',
- stat: true,
- forced: FAILS_ON_PRIMITIVES$3 || arrayBufferNonExtensible
- }, {
- isSealed: function isSealed(it) {
- if (!isObject$2(it)) return true;
- if (arrayBufferNonExtensible && classofRaw(it) == 'ArrayBuffer') return true;
- return $isSealed ? $isSealed(it) : false;
- }
- });
-
- var FAILS_ON_PRIMITIVES$2 = fails(function () {
- objectKeys(1);
- }); // `Object.keys` method
- // https://tc39.es/ecma262/#sec-object.keys
-
- _export({
- target: 'Object',
- stat: true,
- forced: FAILS_ON_PRIMITIVES$2
- }, {
- keys: function keys(it) {
- return objectKeys(toObject$1(it));
- }
- });
-
- var getOwnPropertyDescriptor$5 = objectGetOwnPropertyDescriptor.f; // `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$1(this);
- var key = toPropertyKey(P);
- var desc;
-
- do {
- if (desc = getOwnPropertyDescriptor$5(O, key)) return desc.get;
- } while (O = objectGetPrototypeOf(O));
- }
- });
- }
-
- var getOwnPropertyDescriptor$4 = objectGetOwnPropertyDescriptor.f; // `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$1(this);
- var key = toPropertyKey(P);
- var desc;
-
- do {
- if (desc = getOwnPropertyDescriptor$4(O, key)) return desc.set;
- } while (O = objectGetPrototypeOf(O));
- }
- });
- }
-
- var onFreeze$1 = internalMetadata.onFreeze; // eslint-disable-next-line es/no-object-preventextensions -- safe
-
- var $preventExtensions = Object.preventExtensions;
- var FAILS_ON_PRIMITIVES$1 = fails(function () {
- $preventExtensions(1);
- }); // `Object.preventExtensions` method
- // https://tc39.es/ecma262/#sec-object.preventextensions
-
- _export({
- target: 'Object',
- stat: true,
- forced: FAILS_ON_PRIMITIVES$1,
- sham: !freezing
- }, {
- preventExtensions: function preventExtensions(it) {
- return $preventExtensions && isObject$2(it) ? $preventExtensions(onFreeze$1(it)) : it;
- }
- });
-
- var onFreeze = internalMetadata.onFreeze; // eslint-disable-next-line es/no-object-seal -- safe
-
- var $seal = Object.seal;
- var FAILS_ON_PRIMITIVES = fails(function () {
- $seal(1);
- }); // `Object.seal` method
- // https://tc39.es/ecma262/#sec-object.seal
-
- _export({
- target: 'Object',
- stat: true,
- forced: FAILS_ON_PRIMITIVES,
- sham: !freezing
- }, {
- seal: function seal(it) {
- return $seal && isObject$2(it) ? $seal(onFreeze(it)) : it;
- }
- });
-
- // https://tc39.es/ecma262/#sec-object.setprototypeof
-
- _export({
- target: 'Object',
- stat: true
- }, {
- setPrototypeOf: objectSetPrototypeOf
- });
-
- // https://tc39.es/ecma262/#sec-object.prototype.tostring
-
-
- var objectToString$1 = toStringTagSupport ? {}.toString : function toString() {
- return '[object ' + classof(this) + ']';
- };
-
- // https://tc39.es/ecma262/#sec-object.prototype.tostring
-
- if (!toStringTagSupport) {
- redefine(Object.prototype, 'toString', objectToString$1, {
- unsafe: true
- });
- }
-
- var $values = objectToArray.values; // `Object.values` method
- // https://tc39.es/ecma262/#sec-object.values
-
- _export({
- target: 'Object',
- stat: true
- }, {
- values: function values(O) {
- return $values(O);
- }
- });
-
- // https://tc39.es/ecma262/#sec-parsefloat-string
-
- _export({
- global: true,
- forced: parseFloat != numberParseFloat
- }, {
- parseFloat: numberParseFloat
- });
-
- // https://tc39.es/ecma262/#sec-parseint-string-radix
-
- _export({
- global: true,
- forced: parseInt != numberParseInt
- }, {
- parseInt: numberParseInt
- });
-
- var nativePromiseConstructor = global_1.Promise;
-
- var TypeError$g = global_1.TypeError; // `Assert: IsConstructor(argument) is true`
-
- var aConstructor = function (argument) {
- if (isConstructor(argument)) return argument;
- throw TypeError$g(tryToString(argument) + ' is not a constructor');
- };
-
- var SPECIES$2 = wellKnownSymbol('species'); // `SpeciesConstructor` abstract operation
- // https://tc39.es/ecma262/#sec-speciesconstructor
-
- var speciesConstructor = function (O, defaultConstructor) {
- var C = anObject(O).constructor;
- var S;
- return C === undefined || (S = anObject(C)[SPECIES$2]) == undefined ? defaultConstructor : aConstructor(S);
- };
-
- var TypeError$f = global_1.TypeError;
-
- var validateArgumentsLength = function (passed, required) {
- if (passed < required) throw TypeError$f('Not enough arguments');
- return passed;
- };
-
- var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(engineUserAgent);
-
- var set$2 = global_1.setImmediate;
- var clear = global_1.clearImmediate;
- var process$3 = global_1.process;
- var Dispatch = global_1.Dispatch;
- var Function$2 = global_1.Function;
- var MessageChannel = global_1.MessageChannel;
- var String$1 = global_1.String;
- var counter$1 = 0;
- var queue$2 = {};
- var ONREADYSTATECHANGE = 'onreadystatechange';
- var location, defer, channel, port;
-
- try {
- // Deno throws a ReferenceError on `location` access without `--location` flag
- location = global_1.location;
- } catch (error) {
- /* empty */
- }
-
- var run = function (id) {
- if (hasOwnProperty_1(queue$2, id)) {
- var fn = queue$2[id];
- delete queue$2[id];
- fn();
- }
- };
-
- var runner = function (id) {
- return function () {
- run(id);
- };
- };
-
- var listener = function (event) {
- run(event.data);
- };
-
- var post = function (id) {
- // old engines have not location.origin
- global_1.postMessage(String$1(id), location.protocol + '//' + location.host);
- }; // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
-
-
- if (!set$2 || !clear) {
- set$2 = function setImmediate(handler) {
- validateArgumentsLength(arguments.length, 1);
- var fn = isCallable(handler) ? handler : Function$2(handler);
- var args = arraySlice$1(arguments, 1);
-
- queue$2[++counter$1] = function () {
- functionApply(fn, undefined, args);
- };
-
- defer(counter$1);
- return counter$1;
- };
-
- clear = function clearImmediate(id) {
- delete queue$2[id];
- }; // Node.js 0.8-
-
-
- if (engineIsNode) {
- defer = function (id) {
- process$3.nextTick(runner(id));
- }; // Sphere (JS game engine) Dispatch API
-
- } else if (Dispatch && Dispatch.now) {
- defer = function (id) {
- Dispatch.now(runner(id));
- }; // Browsers with MessageChannel, includes WebWorkers
- // except iOS - https://github.com/zloirock/core-js/issues/624
-
- } else if (MessageChannel && !engineIsIos) {
- channel = new MessageChannel();
- port = channel.port2;
- channel.port1.onmessage = listener;
- defer = functionBindContext(port.postMessage, port); // Browsers with postMessage, skip WebWorkers
- // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
- } else if (global_1.addEventListener && isCallable(global_1.postMessage) && !global_1.importScripts && location && location.protocol !== 'file:' && !fails(post)) {
- defer = post;
- global_1.addEventListener('message', listener, false); // IE8-
- } else if (ONREADYSTATECHANGE in documentCreateElement('script')) {
- defer = function (id) {
- html.appendChild(documentCreateElement('script'))[ONREADYSTATECHANGE] = function () {
- html.removeChild(this);
- run(id);
- };
- }; // Rest old browsers
-
- } else {
- defer = function (id) {
- setTimeout(runner(id), 0);
- };
- }
- }
-
- var task$1 = {
- set: set$2,
- clear: clear
- };
-
- var engineIsIosPebble = /ipad|iphone|ipod/i.test(engineUserAgent) && global_1.Pebble !== undefined;
-
- var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(engineUserAgent);
-
- var getOwnPropertyDescriptor$3 = objectGetOwnPropertyDescriptor.f;
- var macrotask = task$1.set;
- var MutationObserver$1 = global_1.MutationObserver || global_1.WebKitMutationObserver;
- var document$2 = global_1.document;
- var process$2 = global_1.process;
- var Promise$1 = global_1.Promise; // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
-
- var queueMicrotaskDescriptor = getOwnPropertyDescriptor$3(global_1, 'queueMicrotask');
- var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
- var flush, head, last, notify$1, toggle, node, promise, then; // modern engines have queueMicrotask method
-
- if (!queueMicrotask) {
- flush = function () {
- var parent, fn;
- if (engineIsNode && (parent = process$2.domain)) parent.exit();
-
- while (head) {
- fn = head.fn;
- head = head.next;
-
- try {
- fn();
- } catch (error) {
- if (head) notify$1();else last = undefined;
- throw error;
- }
- }
-
- last = undefined;
- if (parent) parent.enter();
- }; // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
- // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
-
-
- if (!engineIsIos && !engineIsNode && !engineIsWebosWebkit && MutationObserver$1 && document$2) {
- toggle = true;
- node = document$2.createTextNode('');
- new MutationObserver$1(flush).observe(node, {
- characterData: true
- });
-
- notify$1 = function () {
- node.data = toggle = !toggle;
- }; // environments with maybe non-completely correct, but existent Promise
-
- } else if (!engineIsIosPebble && Promise$1 && Promise$1.resolve) {
- // Promise.resolve without an argument throws an error in LG WebOS 2
- promise = Promise$1.resolve(undefined); // workaround of WebKit ~ iOS Safari 10.1 bug
-
- promise.constructor = Promise$1;
- then = functionBindContext(promise.then, promise);
-
- notify$1 = function () {
- then(flush);
- }; // Node.js without promises
-
- } else if (engineIsNode) {
- notify$1 = function () {
- process$2.nextTick(flush);
- }; // for other environments - macrotask based on:
- // - setImmediate
- // - MessageChannel
- // - window.postMessag
- // - onreadystatechange
- // - setTimeout
-
- } else {
- // strange IE + webpack dev server bug - use .bind(global)
- macrotask = functionBindContext(macrotask, global_1);
-
- notify$1 = function () {
- macrotask(flush);
- };
- }
- }
-
- var microtask = queueMicrotask || function (fn) {
- var task = {
- fn: fn,
- next: undefined
- };
- if (last) last.next = task;
-
- if (!head) {
- head = task;
- notify$1();
- }
-
- last = task;
- };
-
- var PromiseCapability = function (C) {
- var resolve, reject;
- this.promise = new C(function ($$resolve, $$reject) {
- if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
- resolve = $$resolve;
- reject = $$reject;
- });
- this.resolve = aCallable(resolve);
- this.reject = aCallable(reject);
- }; // `NewPromiseCapability` abstract operation
- // https://tc39.es/ecma262/#sec-newpromisecapability
-
-
- var f = function (C) {
- return new PromiseCapability(C);
- };
-
- var newPromiseCapability$1 = {
- f: f
- };
-
- var promiseResolve = function (C, x) {
- anObject(C);
- if (isObject$2(x) && x.constructor === C) return x;
- var promiseCapability = newPromiseCapability$1.f(C);
- var resolve = promiseCapability.resolve;
- resolve(x);
- return promiseCapability.promise;
- };
-
- var hostReportErrors = function (a, b) {
- var console = global_1.console;
-
- if (console && console.error) {
- arguments.length == 1 ? console.error(a) : console.error(a, b);
- }
- };
-
- var perform = function (exec) {
- try {
- return {
- error: false,
- value: exec()
- };
- } catch (error) {
- return {
- error: true,
- value: error
- };
- }
- };
-
- var Queue = function () {
- this.head = null;
- this.tail = null;
- };
-
- Queue.prototype = {
- add: function (item) {
- var entry = {
- item: item,
- next: null
- };
- if (this.head) this.tail.next = entry;else this.head = entry;
- this.tail = entry;
- },
- get: function () {
- var entry = this.head;
-
- if (entry) {
- this.head = entry.next;
- if (this.tail === entry) this.tail = null;
- return entry.item;
- }
- }
- };
- var queue$1 = Queue;
-
- var engineIsBrowser = typeof window == 'object';
-
- var task = task$1.set;
- var SPECIES$1 = wellKnownSymbol('species');
- var PROMISE = 'Promise';
- var getInternalState$5 = internalState.getterFor(PROMISE);
- var setInternalState$8 = internalState.set;
- var getInternalPromiseState = internalState.getterFor(PROMISE);
- var NativePromisePrototype = nativePromiseConstructor && nativePromiseConstructor.prototype;
- var PromiseConstructor = nativePromiseConstructor;
- var PromisePrototype = NativePromisePrototype;
- var TypeError$e = global_1.TypeError;
- var document$1 = global_1.document;
- var process$1 = global_1.process;
- var newPromiseCapability = newPromiseCapability$1.f;
- var newGenericPromiseCapability = newPromiseCapability;
- var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global_1.dispatchEvent);
- var NATIVE_REJECTION_EVENT = isCallable(global_1.PromiseRejectionEvent);
- var UNHANDLED_REJECTION = 'unhandledrejection';
- var REJECTION_HANDLED = 'rejectionhandled';
- var PENDING = 0;
- var FULFILLED = 1;
- var REJECTED = 2;
- var HANDLED = 1;
- var UNHANDLED = 2;
- var SUBCLASSING = false;
- var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
- var FORCED$8 = isForced_1(PROMISE, function () {
- var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(PromiseConstructor);
- var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(PromiseConstructor); // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
- // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
- // We can't detect it synchronously, so just check versions
-
- if (!GLOBAL_CORE_JS_PROMISE && engineV8Version === 66) return true; // We need Promise#finally in the pure version for preventing prototype pollution
- // deoptimization and performance degradation
- // https://github.com/zloirock/core-js/issues/679
-
- if (engineV8Version >= 51 && /native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) return false; // Detect correctness of subclassing with @@species support
-
- var promise = new PromiseConstructor(function (resolve) {
- resolve(1);
- });
-
- var FakePromise = function (exec) {
- exec(function () {
- /* empty */
- }, function () {
- /* empty */
- });
- };
-
- var constructor = promise.constructor = {};
- constructor[SPECIES$1] = FakePromise;
- SUBCLASSING = promise.then(function () {
- /* empty */
- }) instanceof FakePromise;
- if (!SUBCLASSING) return true; // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
-
- return !GLOBAL_CORE_JS_PROMISE && engineIsBrowser && !NATIVE_REJECTION_EVENT;
- });
- var INCORRECT_ITERATION = FORCED$8 || !checkCorrectnessOfIteration(function (iterable) {
- PromiseConstructor.all(iterable)['catch'](function () {
- /* empty */
- });
- }); // helpers
-
- var isThenable = function (it) {
- var then;
- return isObject$2(it) && isCallable(then = it.then) ? then : false;
- };
-
- var callReaction = function (reaction, state) {
- var value = state.value;
- var ok = state.state == FULFILLED;
- var handler = ok ? reaction.ok : reaction.fail;
- var resolve = reaction.resolve;
- var reject = reaction.reject;
- var domain = reaction.domain;
- var result, then, exited;
-
- try {
- if (handler) {
- if (!ok) {
- if (state.rejection === UNHANDLED) onHandleUnhandled(state);
- state.rejection = HANDLED;
- }
-
- if (handler === true) result = value;else {
- if (domain) domain.enter();
- result = handler(value); // can throw
-
- if (domain) {
- domain.exit();
- exited = true;
- }
- }
-
- if (result === reaction.promise) {
- reject(TypeError$e('Promise-chain cycle'));
- } else if (then = isThenable(result)) {
- functionCall(then, result, resolve, reject);
- } else resolve(result);
- } else reject(value);
- } catch (error) {
- if (domain && !exited) domain.exit();
- reject(error);
- }
- };
-
- var notify = function (state, isReject) {
- if (state.notified) return;
- state.notified = true;
- microtask(function () {
- var reactions = state.reactions;
- var reaction;
-
- while (reaction = reactions.get()) {
- callReaction(reaction, state);
- }
-
- state.notified = false;
- if (isReject && !state.rejection) onUnhandled(state);
- });
- };
-
- var dispatchEvent = function (name, promise, reason) {
- var event, handler;
-
- if (DISPATCH_EVENT) {
- event = document$1.createEvent('Event');
- event.promise = promise;
- event.reason = reason;
- event.initEvent(name, false, true);
- global_1.dispatchEvent(event);
- } else event = {
- promise: promise,
- reason: reason
- };
-
- if (!NATIVE_REJECTION_EVENT && (handler = global_1['on' + name])) handler(event);else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
- };
-
- var onUnhandled = function (state) {
- functionCall(task, 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 (engineIsNode) {
- process$1.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 = engineIsNode || isUnhandled(state) ? UNHANDLED : HANDLED;
- if (result.error) throw result.value;
- }
- });
- };
-
- var isUnhandled = function (state) {
- return state.rejection !== HANDLED && !state.parent;
- };
-
- var onHandleUnhandled = function (state) {
- functionCall(task, global_1, function () {
- var promise = state.facade;
-
- if (engineIsNode) {
- process$1.emit('rejectionHandled', promise);
- } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
- });
- };
-
- var bind$1 = function (fn, state, unwrap) {
- return function (value) {
- fn(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(state, true);
- };
-
- var internalResolve = function (state, value, unwrap) {
- if (state.done) return;
- state.done = true;
- if (unwrap) state = unwrap;
-
- try {
- if (state.facade === value) throw TypeError$e("Promise can't be resolved itself");
- var then = isThenable(value);
-
- if (then) {
- microtask(function () {
- var wrapper = {
- done: false
- };
-
- try {
- functionCall(then, value, bind$1(internalResolve, wrapper, state), bind$1(internalReject, wrapper, state));
- } catch (error) {
- internalReject(wrapper, error, state);
- }
- });
- } else {
- state.value = value;
- state.state = FULFILLED;
- notify(state, false);
- }
- } catch (error) {
- internalReject({
- done: false
- }, error, state);
- }
- }; // constructor polyfill
-
-
- if (FORCED$8) {
- // 25.4.3.1 Promise(executor)
- PromiseConstructor = function Promise(executor) {
- anInstance(this, PromisePrototype);
- aCallable(executor);
- functionCall(Internal, this);
- var state = getInternalState$5(this);
-
- try {
- executor(bind$1(internalResolve, state), bind$1(internalReject, state));
- } catch (error) {
- internalReject(state, error);
- }
- };
-
- PromisePrototype = PromiseConstructor.prototype; // eslint-disable-next-line no-unused-vars -- required for `.length`
-
- Internal = function Promise(executor) {
- setInternalState$8(this, {
- type: PROMISE,
- done: false,
- notified: false,
- parent: false,
- reactions: new queue$1(),
- rejection: false,
- state: PENDING,
- value: undefined
- });
- };
-
- Internal.prototype = redefineAll(PromisePrototype, {
- // `Promise.prototype.then` method
- // https://tc39.es/ecma262/#sec-promise.prototype.then
- // eslint-disable-next-line unicorn/no-thenable -- safe
- then: function then(onFulfilled, onRejected) {
- var state = getInternalPromiseState(this);
- var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));
- state.parent = true;
- reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;
- reaction.fail = isCallable(onRejected) && onRejected;
- reaction.domain = engineIsNode ? process$1.domain : undefined;
- if (state.state == PENDING) state.reactions.add(reaction);else microtask(function () {
- callReaction(reaction, state);
- });
- return reaction.promise;
- },
- // `Promise.prototype.catch` method
- // https://tc39.es/ecma262/#sec-promise.prototype.catch
- 'catch': function (onRejected) {
- return this.then(undefined, onRejected);
- }
- });
-
- OwnPromiseCapability = function () {
- var promise = new Internal();
- var state = getInternalState$5(promise);
- this.promise = promise;
- this.resolve = bind$1(internalResolve, state);
- this.reject = bind$1(internalReject, state);
- };
-
- newPromiseCapability$1.f = newPromiseCapability = function (C) {
- return C === PromiseConstructor || C === PromiseWrapper ? new OwnPromiseCapability(C) : newGenericPromiseCapability(C);
- };
-
- if (isCallable(nativePromiseConstructor) && NativePromisePrototype !== Object.prototype) {
- nativeThen = NativePromisePrototype.then;
-
- if (!SUBCLASSING) {
- // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
- redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {
- var that = this;
- return new PromiseConstructor(function (resolve, reject) {
- functionCall(nativeThen, that, resolve, reject);
- }).then(onFulfilled, onRejected); // https://github.com/zloirock/core-js/issues/640
- }, {
- unsafe: true
- }); // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
-
- redefine(NativePromisePrototype, 'catch', PromisePrototype['catch'], {
- unsafe: true
- });
- } // make `.constructor === Promise` work for native promise-based APIs
-
-
- try {
- delete NativePromisePrototype.constructor;
- } catch (error) {
- /* empty */
- } // make `instanceof Promise` work for native promise-based APIs
-
-
- if (objectSetPrototypeOf) {
- objectSetPrototypeOf(NativePromisePrototype, PromisePrototype);
- }
- }
- }
-
- _export({
- global: true,
- wrap: true,
- forced: FORCED$8
- }, {
- Promise: PromiseConstructor
- });
- setToStringTag(PromiseConstructor, PROMISE, false);
- setSpecies(PROMISE);
- PromiseWrapper = getBuiltIn(PROMISE); // statics
-
- _export({
- target: PROMISE,
- stat: true,
- forced: FORCED$8
- }, {
- // `Promise.reject` method
- // https://tc39.es/ecma262/#sec-promise.reject
- reject: function reject(r) {
- var capability = newPromiseCapability(this);
- functionCall(capability.reject, undefined, r);
- return capability.promise;
- }
- });
- _export({
- target: PROMISE,
- stat: true,
- forced: FORCED$8
- }, {
- // `Promise.resolve` method
- // https://tc39.es/ecma262/#sec-promise.resolve
- resolve: function resolve(x) {
- return promiseResolve(this, x);
- }
- });
- _export({
- target: PROMISE,
- stat: true,
- forced: INCORRECT_ITERATION
- }, {
- // `Promise.all` method
- // https://tc39.es/ecma262/#sec-promise.all
- all: function all(iterable) {
- var C = this;
- var capability = newPromiseCapability(C);
- var resolve = capability.resolve;
- var reject = capability.reject;
- var result = perform(function () {
- var $promiseResolve = aCallable(C.resolve);
- var values = [];
- var counter = 0;
- var remaining = 1;
- iterate(iterable, function (promise) {
- var index = counter++;
- var alreadyCalled = false;
- remaining++;
- functionCall($promiseResolve, C, promise).then(function (value) {
- if (alreadyCalled) return;
- alreadyCalled = true;
- values[index] = value;
- --remaining || resolve(values);
- }, reject);
- });
- --remaining || resolve(values);
- });
- if (result.error) reject(result.value);
- return capability.promise;
- },
- // `Promise.race` method
- // https://tc39.es/ecma262/#sec-promise.race
- race: function race(iterable) {
- var C = this;
- var capability = newPromiseCapability(C);
- var reject = capability.reject;
- var result = perform(function () {
- var $promiseResolve = aCallable(C.resolve);
- iterate(iterable, function (promise) {
- functionCall($promiseResolve, C, promise).then(capability.resolve, reject);
- });
- });
- if (result.error) reject(result.value);
- return capability.promise;
- }
- });
-
- var NON_GENERIC = !!nativePromiseConstructor && fails(function () {
- // eslint-disable-next-line unicorn/no-thenable -- required for testing
- nativePromiseConstructor.prototype['finally'].call({
- then: function () {
- /* empty */
- }
- }, function () {
- /* empty */
- });
- }); // `Promise.prototype.finally` method
- // 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'));
- var isFunction = isCallable(onFinally);
- return this.then(isFunction ? function (x) {
- return promiseResolve(C, onFinally()).then(function () {
- return x;
- });
- } : onFinally, isFunction ? function (e) {
- return promiseResolve(C, onFinally()).then(function () {
- throw e;
- });
- } : onFinally);
- }
- }); // makes sure that native promise-based APIs `Promise#finally` properly works with patched `Promise#then`
-
- if (isCallable(nativePromiseConstructor)) {
- var method = getBuiltIn('Promise').prototype['finally'];
-
- if (nativePromiseConstructor.prototype['finally'] !== method) {
- redefine(nativePromiseConstructor.prototype, 'finally', method, {
- unsafe: true
- });
- }
- }
-
- var OPTIONAL_ARGUMENTS_LIST = !fails(function () {
- // eslint-disable-next-line es/no-reflect -- required for testing
- Reflect.apply(function () {
- /* empty */
- });
- }); // `Reflect.apply` method
- // https://tc39.es/ecma262/#sec-reflect.apply
-
- _export({
- target: 'Reflect',
- stat: true,
- forced: OPTIONAL_ARGUMENTS_LIST
- }, {
- apply: function apply(target, thisArgument, argumentsList) {
- return functionApply(aCallable(target), thisArgument, anObject(argumentsList));
- }
- });
-
- var Function$1 = global_1.Function;
- var concat$3 = functionUncurryThis([].concat);
- var join$6 = functionUncurryThis([].join);
- var factories = {};
-
- var construct = function (C, argsLength, args) {
- if (!hasOwnProperty_1(factories, argsLength)) {
- for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']';
-
- factories[argsLength] = Function$1('C,a', 'return new C(' + join$6(list, ',') + ')');
- }
-
- return factories[argsLength](C, args);
- }; // `Function.prototype.bind` method implementation
- // https://tc39.es/ecma262/#sec-function.prototype.bind
-
-
- var functionBind = functionBindNative ? Function$1.bind : function bind(that
- /* , ...args */
- ) {
- var F = aCallable(this);
- var Prototype = F.prototype;
- var partArgs = arraySlice$1(arguments, 1);
-
- var boundFunction = function
- /* args... */
- bound() {
- var args = concat$3(partArgs, arraySlice$1(arguments));
- return this instanceof boundFunction ? construct(F, args.length, args) : F.apply(that, args);
- };
-
- if (isObject$2(Prototype)) boundFunction.prototype = Prototype;
- return boundFunction;
- };
-
- var nativeConstruct = getBuiltIn('Reflect', 'construct');
- var ObjectPrototype$1 = Object.prototype;
- var push$c = [].push; // `Reflect.construct` method
- // 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 () {
- function F() {
- /* empty */
- }
-
- return !(nativeConstruct(function () {
- /* empty */
- }, [], F) instanceof F);
- });
- var ARGS_BUG = !fails(function () {
- nativeConstruct(function () {
- /* empty */
- });
- });
- var FORCED$7 = NEW_TARGET_BUG || ARGS_BUG;
- _export({
- target: 'Reflect',
- stat: true,
- forced: FORCED$7,
- sham: FORCED$7
- }, {
- construct: function construct(Target, args
- /* , newTarget */
- ) {
- aConstructor(Target);
- anObject(args);
- var newTarget = arguments.length < 3 ? Target : aConstructor(arguments[2]);
- if (ARGS_BUG && !NEW_TARGET_BUG) return nativeConstruct(Target, args, newTarget);
-
- if (Target == newTarget) {
- // w/o altered newTarget, optimization for 0-4 arguments
- switch (args.length) {
- case 0:
- return new Target();
-
- case 1:
- return new Target(args[0]);
-
- case 2:
- return new Target(args[0], args[1]);
-
- case 3:
- return new Target(args[0], args[1], args[2]);
-
- case 4:
- return new Target(args[0], args[1], args[2], args[3]);
- } // w/o altered newTarget, lot of arguments case
-
-
- var $args = [null];
- functionApply(push$c, $args, args);
- return new (functionApply(functionBind, Target, $args))();
- } // with altered newTarget, not support built-in constructors
-
-
- var proto = newTarget.prototype;
- var instance = objectCreate$1(isObject$2(proto) ? proto : ObjectPrototype$1);
- var result = functionApply(Target, instance, args);
- return isObject$2(result) ? result : instance;
- }
- });
-
- var ERROR_INSTEAD_OF_FALSE = fails(function () {
- // eslint-disable-next-line es/no-reflect -- required for testing
- Reflect.defineProperty(objectDefineProperty.f({}, 1, {
- value: 1
- }), 1, {
- value: 2
- });
- }); // `Reflect.defineProperty` method
- // 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);
- var key = toPropertyKey(propertyKey);
- anObject(attributes);
-
- try {
- objectDefineProperty.f(target, key, attributes);
- return true;
- } catch (error) {
- return false;
- }
- }
- });
-
- var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f; // `Reflect.deleteProperty` method
- // https://tc39.es/ecma262/#sec-reflect.deleteproperty
-
- _export({
- target: 'Reflect',
- stat: true
- }, {
- deleteProperty: function deleteProperty(target, propertyKey) {
- var descriptor = getOwnPropertyDescriptor$2(anObject(target), propertyKey);
- return descriptor && !descriptor.configurable ? false : delete target[propertyKey];
- }
- });
-
- var isDataDescriptor = function (descriptor) {
- return descriptor !== undefined && (hasOwnProperty_1(descriptor, 'value') || hasOwnProperty_1(descriptor, 'writable'));
- };
-
- // https://tc39.es/ecma262/#sec-reflect.get
-
- function get(target, propertyKey
- /* , receiver */
- ) {
- var receiver = arguments.length < 3 ? target : arguments[2];
- var descriptor, prototype;
- if (anObject(target) === receiver) return target[propertyKey];
- descriptor = objectGetOwnPropertyDescriptor.f(target, propertyKey);
- if (descriptor) return isDataDescriptor(descriptor) ? descriptor.value : descriptor.get === undefined ? undefined : functionCall(descriptor.get, receiver);
- if (isObject$2(prototype = objectGetPrototypeOf(target))) return get(prototype, propertyKey, receiver);
- }
-
- _export({
- target: 'Reflect',
- stat: true
- }, {
- get: get
- });
-
- // 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);
- }
- });
-
- // https://tc39.es/ecma262/#sec-reflect.getprototypeof
-
- _export({
- target: 'Reflect',
- stat: true,
- sham: !correctPrototypeGetter
- }, {
- getPrototypeOf: function getPrototypeOf(target) {
- return objectGetPrototypeOf(anObject(target));
- }
- });
-
- // https://tc39.es/ecma262/#sec-reflect.has
-
- _export({
- target: 'Reflect',
- stat: true
- }, {
- has: function has(target, propertyKey) {
- return propertyKey in target;
- }
- });
-
- // https://tc39.es/ecma262/#sec-reflect.isextensible
-
- _export({
- target: 'Reflect',
- stat: true
- }, {
- isExtensible: function isExtensible(target) {
- anObject(target);
- return objectIsExtensible(target);
- }
- });
-
- // https://tc39.es/ecma262/#sec-reflect.ownkeys
-
- _export({
- target: 'Reflect',
- stat: true
- }, {
- ownKeys: ownKeys
- });
-
- // https://tc39.es/ecma262/#sec-reflect.preventextensions
-
- _export({
- target: 'Reflect',
- stat: true,
- sham: !freezing
- }, {
- preventExtensions: function preventExtensions(target) {
- anObject(target);
-
- try {
- var objectPreventExtensions = getBuiltIn('Object', 'preventExtensions');
- if (objectPreventExtensions) objectPreventExtensions(target);
- return true;
- } catch (error) {
- return false;
- }
- }
- });
-
- // https://tc39.es/ecma262/#sec-reflect.set
-
- function set$1(target, propertyKey, V
- /* , receiver */
- ) {
- var receiver = arguments.length < 4 ? target : arguments[3];
- var ownDescriptor = objectGetOwnPropertyDescriptor.f(anObject(target), propertyKey);
- var existingDescriptor, prototype, setter;
-
- if (!ownDescriptor) {
- if (isObject$2(prototype = objectGetPrototypeOf(target))) {
- return set$1(prototype, propertyKey, V, receiver);
- }
-
- ownDescriptor = createPropertyDescriptor(0);
- }
-
- if (isDataDescriptor(ownDescriptor)) {
- if (ownDescriptor.writable === false || !isObject$2(receiver)) return false;
-
- if (existingDescriptor = objectGetOwnPropertyDescriptor.f(receiver, propertyKey)) {
- if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false;
- existingDescriptor.value = V;
- objectDefineProperty.f(receiver, propertyKey, existingDescriptor);
- } else objectDefineProperty.f(receiver, propertyKey, createPropertyDescriptor(0, V));
- } else {
- setter = ownDescriptor.set;
- if (setter === undefined) return false;
- functionCall(setter, receiver, V);
- }
-
- return true;
- } // 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 Constructor = function () {
- /* empty */
- };
-
- var object = objectDefineProperty.f(new Constructor(), 'a', {
- configurable: true
- }); // eslint-disable-next-line es/no-reflect -- required for testing
-
- return Reflect.set(Constructor.prototype, 'a', 1, object) !== false;
- });
- _export({
- target: 'Reflect',
- stat: true,
- forced: MS_EDGE_BUG
- }, {
- set: set$1
- });
-
- // https://tc39.es/ecma262/#sec-reflect.setprototypeof
-
- if (objectSetPrototypeOf) _export({
- target: 'Reflect',
- stat: true
- }, {
- setPrototypeOf: function setPrototypeOf(target, proto) {
- anObject(target);
- aPossiblePrototype(proto);
-
- try {
- objectSetPrototypeOf(target, proto);
- return true;
- } catch (error) {
- return false;
- }
- }
- });
-
- var MATCH$2 = wellKnownSymbol('match'); // `IsRegExp` abstract operation
- // https://tc39.es/ecma262/#sec-isregexp
-
- var isRegexp = function (it) {
- var isRegExp;
- return isObject$2(it) && ((isRegExp = it[MATCH$2]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
- };
-
- // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
-
-
- var regexpFlags = function () {
- var that = anObject(this);
- var result = '';
- if (that.global) result += 'g';
- if (that.ignoreCase) result += 'i';
- if (that.multiline) result += 'm';
- if (that.dotAll) result += 's';
- if (that.unicode) result += 'u';
- if (that.sticky) result += 'y';
- return result;
- };
-
- var $RegExp$2 = global_1.RegExp;
- var UNSUPPORTED_Y$3 = fails(function () {
- var re = $RegExp$2('a', 'y');
- re.lastIndex = 2;
- return re.exec('abcd') != null;
- }); // UC Browser bug
- // https://github.com/zloirock/core-js/issues/1008
-
- var MISSED_STICKY$1 = UNSUPPORTED_Y$3 || fails(function () {
- return !$RegExp$2('a', 'y').sticky;
- });
- var BROKEN_CARET = UNSUPPORTED_Y$3 || fails(function () {
- // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
- var re = $RegExp$2('^r', 'gy');
- re.lastIndex = 2;
- return re.exec('str') != null;
- });
- var regexpStickyHelpers = {
- BROKEN_CARET: BROKEN_CARET,
- MISSED_STICKY: MISSED_STICKY$1,
- UNSUPPORTED_Y: UNSUPPORTED_Y$3
- };
-
- var $RegExp$1 = global_1.RegExp;
- var regexpUnsupportedDotAll = fails(function () {
- var re = $RegExp$1('.', 's');
- return !(re.dotAll && re.exec('\n') && re.flags === 's');
- });
-
- var $RegExp = global_1.RegExp;
- var regexpUnsupportedNcg = fails(function () {
- var re = $RegExp('(?