UNPKG

string-to-react-component

Version:

Dynamically create and render React components from strings at runtime, converting strings to React components for flexible UI generation.

1,455 lines (1,181 loc) 177 kB
/** * string-to-react-component - Dynamically create and render React components from strings at runtime, converting strings to React components for flexible UI generation. * * @version v4.0.1 * @homepage https://github.com/dev-javascript/string-to-react-component/ * @author dev-javascript javascript.code.dev@gmail.com * @license MIT */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('react'), require('@babel/standalone')) : typeof define === 'function' && define.amd ? define(['react', '@babel/standalone'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.StringToReactComponent = factory(global.React, global.Babel)); })(this, (function (React, Babel) { 'use strict'; function _interopNamespaceDefault(e) { var n = Object.create(null); if (e) { Object.keys(e).forEach(function (k) { if (k !== 'default') { var d = Object.getOwnPropertyDescriptor(e, k); Object.defineProperty(n, k, d.get ? d : { enumerable: true, get: function () { return e[k]; } }); } }); } n.default = e; return Object.freeze(n); } var Babel__namespace = /*#__PURE__*/_interopNamespaceDefault(Babel); var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; function getDefaultExportFromCjs (x) { return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; } var fails$h = function (exec) { try { return !!exec(); } catch (error) { return true; } }; var fails$g = fails$h; var functionBindNative = !fails$g(function () { // eslint-disable-next-line es/no-function-prototype-bind -- safe var test = (function () { /* empty */ }).bind(); // eslint-disable-next-line no-prototype-builtins -- safe return typeof test != 'function' || test.hasOwnProperty('prototype'); }); var NATIVE_BIND$4 = functionBindNative; var FunctionPrototype$3 = Function.prototype; var call$h = FunctionPrototype$3.call; var uncurryThisWithBind = NATIVE_BIND$4 && FunctionPrototype$3.bind.bind(call$h, call$h); var functionUncurryThis = NATIVE_BIND$4 ? uncurryThisWithBind : function (fn) { return function () { return call$h.apply(fn, arguments); }; }; var uncurryThis$l = functionUncurryThis; var objectIsPrototypeOf = uncurryThis$l({}.isPrototypeOf); var check = function (it) { return it && it.Math === Math && it; }; // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global$l = // 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) || check(typeof commonjsGlobal == 'object' && commonjsGlobal) || // eslint-disable-next-line no-new-func -- fallback (function () { return this; })() || Function('return this')(); var NATIVE_BIND$3 = functionBindNative; var FunctionPrototype$2 = Function.prototype; var apply$2 = FunctionPrototype$2.apply; var call$g = FunctionPrototype$2.call; // eslint-disable-next-line es/no-reflect -- safe var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$3 ? call$g.bind(apply$2) : function () { return call$g.apply(apply$2, arguments); }); var uncurryThis$k = functionUncurryThis; var toString$7 = uncurryThis$k({}.toString); var stringSlice$3 = uncurryThis$k(''.slice); var classofRaw$2 = function (it) { return stringSlice$3(toString$7(it), 8, -1); }; var classofRaw$1 = classofRaw$2; var uncurryThis$j = functionUncurryThis; var functionUncurryThisClause = function (fn) { // Nashorn bug: // https://github.com/zloirock/core-js/issues/1128 // https://github.com/zloirock/core-js/issues/1130 if (classofRaw$1(fn) === 'Function') return uncurryThis$j(fn); }; // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot var documentAll = typeof document == 'object' && document.all; // `IsCallable` abstract operation // https://tc39.es/ecma262/#sec-iscallable // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing var isCallable$i = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) { return typeof argument == 'function' || argument === documentAll; } : function (argument) { return typeof argument == 'function'; }; var objectGetOwnPropertyDescriptor = {}; var fails$f = fails$h; // Detect IE8's incomplete defineProperty implementation var descriptors = !fails$f(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7; }); var NATIVE_BIND$2 = functionBindNative; var call$f = Function.prototype.call; var functionCall = NATIVE_BIND$2 ? call$f.bind(call$f) : function () { return call$f.apply(call$f, arguments); }; var objectPropertyIsEnumerable = {}; var $propertyIsEnumerable = {}.propertyIsEnumerable; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor; // Nashorn ~ JDK8 bug var NASHORN_BUG = getOwnPropertyDescriptor$2 && !$propertyIsEnumerable.call({ 1: 2 }, 1); // `Object.prototype.propertyIsEnumerable` method implementation // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) { var descriptor = getOwnPropertyDescriptor$2(this, V); return !!descriptor && descriptor.enumerable; } : $propertyIsEnumerable; var createPropertyDescriptor$7 = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; var uncurryThis$i = functionUncurryThis; var fails$e = fails$h; var classof$7 = classofRaw$2; var $Object$4 = Object; var split$3 = uncurryThis$i(''.split); // fallback for non-array-like ES3 and non-enumerable old V8 strings var indexedObject = fails$e(function () { // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 // eslint-disable-next-line no-prototype-builtins -- safe return !$Object$4('z').propertyIsEnumerable(0); }) ? function (it) { return classof$7(it) === 'String' ? split$3(it, '') : $Object$4(it); } : $Object$4; // we can't use just `it == null` since of `document.all` special case // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec var isNullOrUndefined$4 = function (it) { return it === null || it === undefined; }; var isNullOrUndefined$3 = isNullOrUndefined$4; var $TypeError$c = TypeError; // `RequireObjectCoercible` abstract operation // https://tc39.es/ecma262/#sec-requireobjectcoercible var requireObjectCoercible$4 = function (it) { if (isNullOrUndefined$3(it)) throw new $TypeError$c("Can't call method on " + it); return it; }; // toObject with fallback for non-array-like ES3 strings var IndexedObject$1 = indexedObject; var requireObjectCoercible$3 = requireObjectCoercible$4; var toIndexedObject$5 = function (it) { return IndexedObject$1(requireObjectCoercible$3(it)); }; var isCallable$h = isCallable$i; var isObject$d = function (it) { return typeof it == 'object' ? it !== null : isCallable$h(it); }; var path$5 = {}; var path$4 = path$5; var global$k = global$l; var isCallable$g = isCallable$i; var aFunction = function (variable) { return isCallable$g(variable) ? variable : undefined; }; var getBuiltIn$9 = function (namespace, method) { return arguments.length < 2 ? aFunction(path$4[namespace]) || aFunction(global$k[namespace]) : path$4[namespace] && path$4[namespace][method] || global$k[namespace] && global$k[namespace][method]; }; var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || ''; var global$j = global$l; var userAgent$3 = engineUserAgent; var process$3 = global$j.process; var Deno$1 = global$j.Deno; var versions = process$3 && process$3.versions || Deno$1 && Deno$1.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 && userAgent$3) { match = userAgent$3.match(/Edge\/(\d+)/); if (!match || match[1] >= 74) { match = userAgent$3.match(/Chrome\/(\d+)/); if (match) version = +match[1]; } } var engineV8Version = version; /* eslint-disable es/no-symbol -- required for testing */ var V8_VERSION$1 = engineV8Version; var fails$d = fails$h; var global$i = global$l; var $String$4 = global$i.String; // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$d(function () { var symbol = Symbol('symbol detection'); // Chrome 38 Symbol has incorrect toString conversion // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will, // of course, fail. return !$String$4(symbol) || !(Object(symbol) instanceof Symbol) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances !Symbol.sham && V8_VERSION$1 && V8_VERSION$1 < 41; }); /* eslint-disable es/no-symbol -- required for testing */ var NATIVE_SYMBOL$1 = symbolConstructorDetection; var useSymbolAsUid = NATIVE_SYMBOL$1 && !Symbol.sham && typeof Symbol.iterator == 'symbol'; var getBuiltIn$8 = getBuiltIn$9; var isCallable$f = isCallable$i; var isPrototypeOf$5 = objectIsPrototypeOf; var USE_SYMBOL_AS_UID$1 = useSymbolAsUid; var $Object$3 = Object; var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) { return typeof it == 'symbol'; } : function (it) { var $Symbol = getBuiltIn$8('Symbol'); return isCallable$f($Symbol) && isPrototypeOf$5($Symbol.prototype, $Object$3(it)); }; var $String$3 = String; var tryToString$4 = function (argument) { try { return $String$3(argument); } catch (error) { return 'Object'; } }; var isCallable$e = isCallable$i; var tryToString$3 = tryToString$4; var $TypeError$b = TypeError; // `Assert: IsCallable(argument) is true` var aCallable$b = function (argument) { if (isCallable$e(argument)) return argument; throw new $TypeError$b(tryToString$3(argument) + ' is not a function'); }; var aCallable$a = aCallable$b; var isNullOrUndefined$2 = isNullOrUndefined$4; // `GetMethod` abstract operation // https://tc39.es/ecma262/#sec-getmethod var getMethod$3 = function (V, P) { var func = V[P]; return isNullOrUndefined$2(func) ? undefined : aCallable$a(func); }; var call$e = functionCall; var isCallable$d = isCallable$i; var isObject$c = isObject$d; var $TypeError$a = TypeError; // `OrdinaryToPrimitive` abstract operation // https://tc39.es/ecma262/#sec-ordinarytoprimitive var ordinaryToPrimitive$1 = function (input, pref) { var fn, val; if (pref === 'string' && isCallable$d(fn = input.toString) && !isObject$c(val = call$e(fn, input))) return val; if (isCallable$d(fn = input.valueOf) && !isObject$c(val = call$e(fn, input))) return val; if (pref !== 'string' && isCallable$d(fn = input.toString) && !isObject$c(val = call$e(fn, input))) return val; throw new $TypeError$a("Can't convert object to primitive value"); }; var sharedStore = {exports: {}}; var isPure = true; var global$h = global$l; // eslint-disable-next-line es/no-object-defineproperty -- safe var defineProperty$3 = Object.defineProperty; var defineGlobalProperty$1 = function (key, value) { try { defineProperty$3(global$h, key, { value: value, configurable: true, writable: true }); } catch (error) { global$h[key] = value; } return value; }; var globalThis$1 = global$l; var defineGlobalProperty = defineGlobalProperty$1; var SHARED = '__core-js_shared__'; var store$3 = sharedStore.exports = globalThis$1[SHARED] || defineGlobalProperty(SHARED, {}); (store$3.versions || (store$3.versions = [])).push({ version: '3.36.1', mode: 'pure' , copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)', license: 'https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE', source: 'https://github.com/zloirock/core-js' }); var sharedStoreExports = sharedStore.exports; var store$2 = sharedStoreExports; var shared$3 = function (key, value) { return store$2[key] || (store$2[key] = value || {}); }; var requireObjectCoercible$2 = requireObjectCoercible$4; var $Object$2 = Object; // `ToObject` abstract operation // https://tc39.es/ecma262/#sec-toobject var toObject$4 = function (argument) { return $Object$2(requireObjectCoercible$2(argument)); }; var uncurryThis$h = functionUncurryThis; var toObject$3 = toObject$4; var hasOwnProperty = uncurryThis$h({}.hasOwnProperty); // `HasOwnProperty` abstract operation // https://tc39.es/ecma262/#sec-hasownproperty // eslint-disable-next-line es/no-object-hasown -- safe var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) { return hasOwnProperty(toObject$3(it), key); }; var uncurryThis$g = functionUncurryThis; var id = 0; var postfix = Math.random(); var toString$6 = uncurryThis$g(1.0.toString); var uid$2 = function (key) { return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$6(++id + postfix, 36); }; var global$g = global$l; var shared$2 = shared$3; var hasOwn$c = hasOwnProperty_1; var uid$1 = uid$2; var NATIVE_SYMBOL = symbolConstructorDetection; var USE_SYMBOL_AS_UID = useSymbolAsUid; var Symbol$1 = global$g.Symbol; var WellKnownSymbolsStore = shared$2('wks'); var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1; var wellKnownSymbol$f = function (name) { if (!hasOwn$c(WellKnownSymbolsStore, name)) { WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$c(Symbol$1, name) ? Symbol$1[name] : createWellKnownSymbol('Symbol.' + name); } return WellKnownSymbolsStore[name]; }; var call$d = functionCall; var isObject$b = isObject$d; var isSymbol$1 = isSymbol$2; var getMethod$2 = getMethod$3; var ordinaryToPrimitive = ordinaryToPrimitive$1; var wellKnownSymbol$e = wellKnownSymbol$f; var $TypeError$9 = TypeError; var TO_PRIMITIVE = wellKnownSymbol$e('toPrimitive'); // `ToPrimitive` abstract operation // https://tc39.es/ecma262/#sec-toprimitive var toPrimitive$1 = function (input, pref) { if (!isObject$b(input) || isSymbol$1(input)) return input; var exoticToPrim = getMethod$2(input, TO_PRIMITIVE); var result; if (exoticToPrim) { if (pref === undefined) pref = 'default'; result = call$d(exoticToPrim, input, pref); if (!isObject$b(result) || isSymbol$1(result)) return result; throw new $TypeError$9("Can't convert object to primitive value"); } if (pref === undefined) pref = 'number'; return ordinaryToPrimitive(input, pref); }; var toPrimitive = toPrimitive$1; var isSymbol = isSymbol$2; // `ToPropertyKey` abstract operation // https://tc39.es/ecma262/#sec-topropertykey var toPropertyKey$2 = function (argument) { var key = toPrimitive(argument, 'string'); return isSymbol(key) ? key : key + ''; }; var global$f = global$l; var isObject$a = isObject$d; var document$3 = global$f.document; // typeof document.createElement is 'object' in old IE var EXISTS$1 = isObject$a(document$3) && isObject$a(document$3.createElement); var documentCreateElement$1 = function (it) { return EXISTS$1 ? document$3.createElement(it) : {}; }; var DESCRIPTORS$d = descriptors; var fails$c = fails$h; var createElement$1 = documentCreateElement$1; // Thanks to IE8 for its funny defineProperty var ie8DomDefine = !DESCRIPTORS$d && !fails$c(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty(createElement$1('div'), 'a', { get: function () { return 7; } }).a !== 7; }); var DESCRIPTORS$c = descriptors; var call$c = functionCall; var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable; var createPropertyDescriptor$6 = createPropertyDescriptor$7; var toIndexedObject$4 = toIndexedObject$5; var toPropertyKey$1 = toPropertyKey$2; var hasOwn$b = hasOwnProperty_1; var IE8_DOM_DEFINE$1 = ie8DomDefine; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor; // `Object.getOwnPropertyDescriptor` method // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor objectGetOwnPropertyDescriptor.f = DESCRIPTORS$c ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) { O = toIndexedObject$4(O); P = toPropertyKey$1(P); if (IE8_DOM_DEFINE$1) try { return $getOwnPropertyDescriptor$1(O, P); } catch (error) { /* empty */ } if (hasOwn$b(O, P)) return createPropertyDescriptor$6(!call$c(propertyIsEnumerableModule$1.f, O, P), O[P]); }; var fails$b = fails$h; var isCallable$c = isCallable$i; var replacement = /#|\.prototype\./; var isForced$2 = function (feature, detection) { var value = data[normalize(feature)]; return value === POLYFILL ? true : value === NATIVE ? false : isCallable$c(detection) ? fails$b(detection) : !!detection; }; var normalize = isForced$2.normalize = function (string) { return String(string).replace(replacement, '.').toLowerCase(); }; var data = isForced$2.data = {}; var NATIVE = isForced$2.NATIVE = 'N'; var POLYFILL = isForced$2.POLYFILL = 'P'; var isForced_1 = isForced$2; var uncurryThis$f = functionUncurryThisClause; var aCallable$9 = aCallable$b; var NATIVE_BIND$1 = functionBindNative; var bind$d = uncurryThis$f(uncurryThis$f.bind); // optional / simple context binding var functionBindContext = function (fn, that) { aCallable$9(fn); return that === undefined ? fn : NATIVE_BIND$1 ? bind$d(fn, that) : function (/* ...args */) { return fn.apply(that, arguments); }; }; var objectDefineProperty = {}; var DESCRIPTORS$b = descriptors; var fails$a = fails$h; // V8 ~ Chrome 36- // https://bugs.chromium.org/p/v8/issues/detail?id=3334 var v8PrototypeDefineBug = DESCRIPTORS$b && fails$a(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 isObject$9 = isObject$d; var $String$2 = String; var $TypeError$8 = TypeError; // `Assert: Type(argument) is Object` var anObject$b = function (argument) { if (isObject$9(argument)) return argument; throw new $TypeError$8($String$2(argument) + ' is not an object'); }; var DESCRIPTORS$a = descriptors; var IE8_DOM_DEFINE = ie8DomDefine; var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug; var anObject$a = anObject$b; var toPropertyKey = toPropertyKey$2; var $TypeError$7 = TypeError; // eslint-disable-next-line es/no-object-defineproperty -- safe var $defineProperty = Object.defineProperty; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; var ENUMERABLE = 'enumerable'; var CONFIGURABLE$1 = 'configurable'; var WRITABLE = 'writable'; // `Object.defineProperty` method // https://tc39.es/ecma262/#sec-object.defineproperty objectDefineProperty.f = DESCRIPTORS$a ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) { anObject$a(O); P = toPropertyKey(P); anObject$a(Attributes); if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) { var current = $getOwnPropertyDescriptor(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(O, P, Attributes); } : $defineProperty : function defineProperty(O, P, Attributes) { anObject$a(O); P = toPropertyKey(P); anObject$a(Attributes); if (IE8_DOM_DEFINE) try { return $defineProperty(O, P, Attributes); } catch (error) { /* empty */ } if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$7('Accessors not supported'); if ('value' in Attributes) O[P] = Attributes.value; return O; }; var DESCRIPTORS$9 = descriptors; var definePropertyModule$3 = objectDefineProperty; var createPropertyDescriptor$5 = createPropertyDescriptor$7; var createNonEnumerableProperty$7 = DESCRIPTORS$9 ? function (object, key, value) { return definePropertyModule$3.f(object, key, createPropertyDescriptor$5(1, value)); } : function (object, key, value) { object[key] = value; return object; }; var global$e = global$l; var apply$1 = functionApply; var uncurryThis$e = functionUncurryThisClause; var isCallable$b = isCallable$i; var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f; var isForced$1 = isForced_1; var path$3 = path$5; var bind$c = functionBindContext; var createNonEnumerableProperty$6 = createNonEnumerableProperty$7; var hasOwn$a = hasOwnProperty_1; // add debugging info var wrapConstructor = function (NativeConstructor) { var Wrapper = function (a, b, c) { if (this instanceof Wrapper) { switch (arguments.length) { case 0: return new NativeConstructor(); case 1: return new NativeConstructor(a); case 2: return new NativeConstructor(a, b); } return new NativeConstructor(a, b, c); } return apply$1(NativeConstructor, this, arguments); }; Wrapper.prototype = NativeConstructor.prototype; return Wrapper; }; /* 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.dontCallGetSet - 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 PROTO = options.proto; var nativeSource = GLOBAL ? global$e : STATIC ? global$e[TARGET] : global$e[TARGET] && global$e[TARGET].prototype; var target = GLOBAL ? path$3 : path$3[TARGET] || createNonEnumerableProperty$6(path$3, TARGET, {})[TARGET]; var targetPrototype = target.prototype; var FORCED, USE_NATIVE, VIRTUAL_PROTOTYPE; var key, sourceProperty, targetProperty, nativeProperty, resultProperty, descriptor; for (key in source) { FORCED = isForced$1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); // contains in native USE_NATIVE = !FORCED && nativeSource && hasOwn$a(nativeSource, key); targetProperty = target[key]; if (USE_NATIVE) if (options.dontCallGetSet) { descriptor = getOwnPropertyDescriptor$1(nativeSource, key); nativeProperty = descriptor && descriptor.value; } else nativeProperty = nativeSource[key]; // export native or implementation sourceProperty = (USE_NATIVE && nativeProperty) ? nativeProperty : source[key]; if (!FORCED && !PROTO && typeof targetProperty == typeof sourceProperty) continue; // bind methods to global for calling from export context if (options.bind && USE_NATIVE) resultProperty = bind$c(sourceProperty, global$e); // wrap global constructors for prevent changes in this version else if (options.wrap && USE_NATIVE) resultProperty = wrapConstructor(sourceProperty); // make static versions for prototype methods else if (PROTO && isCallable$b(sourceProperty)) resultProperty = uncurryThis$e(sourceProperty); // default case else resultProperty = sourceProperty; // add a flag to not completely full polyfills if (options.sham || (sourceProperty && sourceProperty.sham) || (targetProperty && targetProperty.sham)) { createNonEnumerableProperty$6(resultProperty, 'sham', true); } createNonEnumerableProperty$6(target, key, resultProperty); if (PROTO) { VIRTUAL_PROTOTYPE = TARGET + 'Prototype'; if (!hasOwn$a(path$3, VIRTUAL_PROTOTYPE)) { createNonEnumerableProperty$6(path$3, VIRTUAL_PROTOTYPE, {}); } // export virtual prototype methods createNonEnumerableProperty$6(path$3[VIRTUAL_PROTOTYPE], key, sourceProperty); // export real prototype methods if (options.real && targetPrototype && (FORCED || !targetPrototype[key])) { createNonEnumerableProperty$6(targetPrototype, key, sourceProperty); } } } }; var uncurryThis$d = functionUncurryThis; var arraySlice$4 = uncurryThis$d([].slice); var uncurryThis$c = functionUncurryThis; var aCallable$8 = aCallable$b; var isObject$8 = isObject$d; var hasOwn$9 = hasOwnProperty_1; var arraySlice$3 = arraySlice$4; var NATIVE_BIND = functionBindNative; var $Function = Function; var concat$2 = uncurryThis$c([].concat); var join$3 = uncurryThis$c([].join); var factories = {}; var construct$1 = function (C, argsLength, args) { if (!hasOwn$9(factories, argsLength)) { var list = []; var i = 0; for (; i < argsLength; i++) list[i] = 'a[' + i + ']'; factories[argsLength] = $Function('C,a', 'return new C(' + join$3(list, ',') + ')'); } return factories[argsLength](C, args); }; // `Function.prototype.bind` method implementation // https://tc39.es/ecma262/#sec-function.prototype.bind // eslint-disable-next-line es/no-function-prototype-bind -- detection var functionBind = NATIVE_BIND ? $Function.bind : function bind(that /* , ...args */) { var F = aCallable$8(this); var Prototype = F.prototype; var partArgs = arraySlice$3(arguments, 1); var boundFunction = function bound(/* args... */) { var args = concat$2(partArgs, arraySlice$3(arguments)); return this instanceof boundFunction ? construct$1(F, args.length, args) : F.apply(that, args); }; if (isObject$8(Prototype)) boundFunction.prototype = Prototype; return boundFunction; }; // TODO: Remove from `core-js@4` var $$g = _export; var bind$b = functionBind; // `Function.prototype.bind` method // https://tc39.es/ecma262/#sec-function.prototype.bind // eslint-disable-next-line es/no-function-prototype-bind -- detection $$g({ target: 'Function', proto: true, forced: Function.bind !== bind$b }, { bind: bind$b }); var global$d = global$l; var path$2 = path$5; var getBuiltInPrototypeMethod$2 = function (CONSTRUCTOR, METHOD) { var Namespace = path$2[CONSTRUCTOR + 'Prototype']; var pureMethod = Namespace && Namespace[METHOD]; if (pureMethod) return pureMethod; var NativeConstructor = global$d[CONSTRUCTOR]; var NativePrototype = NativeConstructor && NativeConstructor.prototype; return NativePrototype && NativePrototype[METHOD]; }; var getBuiltInPrototypeMethod$1 = getBuiltInPrototypeMethod$2; var bind$a = getBuiltInPrototypeMethod$1('Function', 'bind'); var isPrototypeOf$4 = objectIsPrototypeOf; var method$1 = bind$a; var FunctionPrototype$1 = Function.prototype; var bind$9 = function (it) { var own = it.bind; return it === FunctionPrototype$1 || (isPrototypeOf$4(FunctionPrototype$1, it) && own === FunctionPrototype$1.bind) ? method$1 : own; }; var parent$3 = bind$9; var bind$8 = parent$3; var bind$7 = bind$8; var _bindInstanceProperty = /*@__PURE__*/getDefaultExportFromCjs(bind$7); var ceil = Math.ceil; var floor$3 = Math.floor; // `Math.trunc` method // https://tc39.es/ecma262/#sec-math.trunc // eslint-disable-next-line es/no-math-trunc -- safe var mathTrunc = Math.trunc || function trunc(x) { var n = +x; return (n > 0 ? floor$3 : ceil)(n); }; var trunc = mathTrunc; // `ToIntegerOrInfinity` abstract operation // https://tc39.es/ecma262/#sec-tointegerorinfinity var toIntegerOrInfinity$3 = function (argument) { var number = +argument; // eslint-disable-next-line no-self-compare -- NaN check return number !== number || number === 0 ? 0 : trunc(number); }; var toIntegerOrInfinity$2 = toIntegerOrInfinity$3; var max = Math.max; var min$1 = 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$1 = function (index, length) { var integer = toIntegerOrInfinity$2(index); return integer < 0 ? max(integer + length, 0) : min$1(integer, length); }; var toIntegerOrInfinity$1 = toIntegerOrInfinity$3; var min = Math.min; // `ToLength` abstract operation // https://tc39.es/ecma262/#sec-tolength var toLength$1 = function (argument) { var len = toIntegerOrInfinity$1(argument); return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 }; var toLength = toLength$1; // `LengthOfArrayLike` abstract operation // https://tc39.es/ecma262/#sec-lengthofarraylike var lengthOfArrayLike$3 = function (obj) { return toLength(obj.length); }; var toIndexedObject$3 = toIndexedObject$5; var toAbsoluteIndex = toAbsoluteIndex$1; var lengthOfArrayLike$2 = lengthOfArrayLike$3; // `Array.prototype.{ indexOf, includes }` methods implementation var createMethod$1 = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIndexedObject$3($this); var length = lengthOfArrayLike$2(O); if (length === 0) return !IS_INCLUDES && -1; 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$1(true), // `Array.prototype.indexOf` method // https://tc39.es/ecma262/#sec-array.prototype.indexof indexOf: createMethod$1(false) }; var fails$9 = fails$h; var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) { var method = [][METHOD_NAME]; return !!method && fails$9(function () { // eslint-disable-next-line no-useless-call -- required for testing method.call(null, argument || function () { return 1; }, 1); }); }; /* eslint-disable es/no-array-prototype-indexof -- required for testing */ var $$f = _export; var uncurryThis$b = functionUncurryThisClause; var $indexOf = arrayIncludes.indexOf; var arrayMethodIsStrict = arrayMethodIsStrict$1; var nativeIndexOf = uncurryThis$b([].indexOf); var NEGATIVE_ZERO = !!nativeIndexOf && 1 / nativeIndexOf([1], 1, -0) < 0; var FORCED = NEGATIVE_ZERO || !arrayMethodIsStrict('indexOf'); // `Array.prototype.indexOf` method // https://tc39.es/ecma262/#sec-array.prototype.indexof $$f({ target: 'Array', proto: true, forced: FORCED }, { indexOf: function indexOf(searchElement /* , fromIndex = 0 */) { var fromIndex = arguments.length > 1 ? arguments[1] : undefined; return NEGATIVE_ZERO // convert -0 to +0 ? nativeIndexOf(this, searchElement, fromIndex) || 0 : $indexOf(this, searchElement, fromIndex); } }); var getBuiltInPrototypeMethod = getBuiltInPrototypeMethod$2; var indexOf$4 = getBuiltInPrototypeMethod('Array', 'indexOf'); var isPrototypeOf$3 = objectIsPrototypeOf; var method = indexOf$4; var ArrayPrototype$1 = Array.prototype; var indexOf$3 = function (it) { var own = it.indexOf; return it === ArrayPrototype$1 || (isPrototypeOf$3(ArrayPrototype$1, it) && own === ArrayPrototype$1.indexOf) ? method : own; }; var parent$2 = indexOf$3; var indexOf$2 = parent$2; var indexOf$1 = indexOf$2; var _indexOfInstanceProperty = /*@__PURE__*/getDefaultExportFromCjs(indexOf$1); var iterators = {}; var global$c = global$l; var isCallable$a = isCallable$i; var WeakMap$1 = global$c.WeakMap; var weakMapBasicDetection = isCallable$a(WeakMap$1) && /native code/.test(String(WeakMap$1)); var shared$1 = shared$3; var uid = uid$2; var keys = shared$1('keys'); var sharedKey$3 = function (key) { return keys[key] || (keys[key] = uid(key)); }; var hiddenKeys$4 = {}; var NATIVE_WEAK_MAP = weakMapBasicDetection; var global$b = global$l; var isObject$7 = isObject$d; var createNonEnumerableProperty$5 = createNonEnumerableProperty$7; var hasOwn$8 = hasOwnProperty_1; var shared = sharedStoreExports; var sharedKey$2 = sharedKey$3; var hiddenKeys$3 = hiddenKeys$4; var OBJECT_ALREADY_INITIALIZED = 'Object already initialized'; var TypeError$4 = global$b.TypeError; var WeakMap = global$b.WeakMap; var set$1, get, has; var enforce = function (it) { return has(it) ? get(it) : set$1(it, {}); }; var getterFor = function (TYPE) { return function (it) { var state; if (!isObject$7(it) || (state = get(it)).type !== TYPE) { throw new TypeError$4('Incompatible receiver, ' + TYPE + ' required'); } return state; }; }; if (NATIVE_WEAK_MAP || shared.state) { var store$1 = shared.state || (shared.state = new WeakMap()); /* eslint-disable no-self-assign -- prototype methods protection */ store$1.get = store$1.get; store$1.has = store$1.has; store$1.set = store$1.set; /* eslint-enable no-self-assign -- prototype methods protection */ set$1 = function (it, metadata) { if (store$1.has(it)) throw new TypeError$4(OBJECT_ALREADY_INITIALIZED); metadata.facade = it; store$1.set(it, metadata); return metadata; }; get = function (it) { return store$1.get(it) || {}; }; has = function (it) { return store$1.has(it); }; } else { var STATE = sharedKey$2('state'); hiddenKeys$3[STATE] = true; set$1 = function (it, metadata) { if (hasOwn$8(it, STATE)) throw new TypeError$4(OBJECT_ALREADY_INITIALIZED); metadata.facade = it; createNonEnumerableProperty$5(it, STATE, metadata); return metadata; }; get = function (it) { return hasOwn$8(it, STATE) ? it[STATE] : {}; }; has = function (it) { return hasOwn$8(it, STATE); }; } var internalState = { set: set$1, get: get, has: has, enforce: enforce, getterFor: getterFor }; var DESCRIPTORS$8 = descriptors; var hasOwn$7 = hasOwnProperty_1; var FunctionPrototype = Function.prototype; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var getDescriptor = DESCRIPTORS$8 && Object.getOwnPropertyDescriptor; var EXISTS = hasOwn$7(FunctionPrototype, 'name'); // additional protection from minified / mangled / dropped function names var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something'; var CONFIGURABLE = EXISTS && (!DESCRIPTORS$8 || (DESCRIPTORS$8 && getDescriptor(FunctionPrototype, 'name').configurable)); var functionName = { EXISTS: EXISTS, PROPER: PROPER, CONFIGURABLE: CONFIGURABLE }; var objectDefineProperties = {}; var uncurryThis$a = functionUncurryThis; var hasOwn$6 = hasOwnProperty_1; var toIndexedObject$2 = toIndexedObject$5; var indexOf = arrayIncludes.indexOf; var hiddenKeys$2 = hiddenKeys$4; var push$4 = uncurryThis$a([].push); var objectKeysInternal = function (object, names) { var O = toIndexedObject$2(object); var i = 0; var result = []; var key; for (key in O) !hasOwn$6(hiddenKeys$2, key) && hasOwn$6(O, key) && push$4(result, key); // Don't enum bug & hidden keys while (names.length > i) if (hasOwn$6(O, key = names[i++])) { ~indexOf(result, key) || push$4(result, key); } return result; }; // IE8- don't enum bug keys var enumBugKeys$3 = [ 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf' ]; var internalObjectKeys$1 = objectKeysInternal; var enumBugKeys$2 = enumBugKeys$3; // `Object.keys` method // https://tc39.es/ecma262/#sec-object.keys // eslint-disable-next-line es/no-object-keys -- safe var objectKeys$2 = Object.keys || function keys(O) { return internalObjectKeys$1(O, enumBugKeys$2); }; var DESCRIPTORS$7 = descriptors; var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug; var definePropertyModule$2 = objectDefineProperty; var anObject$9 = anObject$b; var toIndexedObject$1 = toIndexedObject$5; var objectKeys$1 = objectKeys$2; // `Object.defineProperties` method // https://tc39.es/ecma262/#sec-object.defineproperties // eslint-disable-next-line es/no-object-defineproperties -- safe objectDefineProperties.f = DESCRIPTORS$7 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) { anObject$9(O); var props = toIndexedObject$1(Properties); var keys = objectKeys$1(Properties); var length = keys.length; var index = 0; var key; while (length > index) definePropertyModule$2.f(O, key = keys[index++], props[key]); return O; }; var getBuiltIn$7 = getBuiltIn$9; var html$2 = getBuiltIn$7('document', 'documentElement'); /* global ActiveXObject -- old IE, WSH */ var anObject$8 = anObject$b; var definePropertiesModule = objectDefineProperties; var enumBugKeys$1 = enumBugKeys$3; var hiddenKeys$1 = hiddenKeys$4; var html$1 = html$2; var documentCreateElement = documentCreateElement$1; var sharedKey$1 = sharedKey$3; var GT = '>'; var LT = '<'; var PROTOTYPE = 'prototype'; var SCRIPT = 'script'; var IE_PROTO$1 = sharedKey$1('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$1.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$1.length; while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys$1[length]]; return NullProtoObject(); }; hiddenKeys$1[IE_PROTO$1] = true; // `Object.create` method // https://tc39.es/ecma262/#sec-object.create // eslint-disable-next-line es/no-object-create -- safe var objectCreate = Object.create || function create(O, Properties) { var result; if (O !== null) { EmptyConstructor[PROTOTYPE] = anObject$8(O); result = new EmptyConstructor(); EmptyConstructor[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO$1] = O; } else result = NullProtoObject(); return Properties === undefined ? result : definePropertiesModule.f(result, Properties); }; var fails$8 = fails$h; var correctPrototypeGetter = !fails$8(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 hasOwn$5 = hasOwnProperty_1; var isCallable$9 = isCallable$i; var toObject$2 = toObject$4; var sharedKey = sharedKey$3; var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter; var IE_PROTO = sharedKey('IE_PROTO'); var $Object$1 = Object; var ObjectPrototype = $Object$1.prototype; // `Object.getPrototypeOf` method // https://tc39.es/ecma262/#sec-object.getprototypeof // eslint-disable-next-line es/no-object-getprototypeof -- safe var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) { var object = toObject$2(O); if (hasOwn$5(object, IE_PROTO)) return object[IE_PROTO]; var constructor = object.constructor; if (isCallable$9(constructor) && object instanceof constructor) { return constructor.prototype; } return object instanceof $Object$1 ? ObjectPrototype : null; }; var createNonEnumerableProperty$4 = createNonEnumerableProperty$7; var defineBuiltIn$6 = function (target, key, value, options) { if (options && options.enumerable) target[key] = value; else createNonEnumerableProperty$4(target, key, value); return target; }; var fails$7 = fails$h; var isCallable$8 = isCallable$i; var isObject$6 = isObject$d; var create$3 = objectCreate; var getPrototypeOf$2 = objectGetPrototypeOf; var defineBuiltIn$5 = defineBuiltIn$6; var wellKnownSymbol$d = wellKnownSymbol$f; var ITERATOR$6 = wellKnownSymbol$d('iterator'); var BUGGY_SAFARI_ITERATORS$1 = false; // `%IteratorPrototype%` object // https://tc39.es/ecma262/#sec-%iteratorprototype%-object var IteratorPrototype$1, 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 = getPrototypeOf$2(getPrototypeOf$2(arrayIterator)); if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$1 = PrototypeOfArrayIteratorPrototype; } } var NEW_ITERATOR_PROTOTYPE = !isObject$6(IteratorPrototype$1) || fails$7(function () { var test = {}; // FF44- legacy iterators case return IteratorPrototype$1[ITERATOR$6].call(test) !== test; }); if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$1 = {}; else IteratorPrototype$1 = create$3(IteratorPrototype$1); // `%IteratorPrototype%[@@iterator]()` method // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator if (!isCallable$8(IteratorPrototype$1[ITERATOR$6])) { defineBuiltIn$5(IteratorPrototype$1, ITERATOR$6, function () { return this; }); } var iteratorsCore = { IteratorPrototype: IteratorPrototype$1, BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1 }; var wellKnownSymbol$c = wellKnownSymbol$f; var TO_STRING_TAG$3 = wellKnownSymbol$c('toStringTag'); var test = {}; test[TO_STRING_TAG$3] = 'z'; var toStringTagSupport = String(test) === '[object z]'; var TO_STRING_TAG_SUPPORT$2 = toStringTagSupport; var isCallable$7 = isCallable$i; var classofRaw = classofRaw$2; var wellKnownSymbol$b = wellKnownSymbol$f; var TO_STRING_TAG$2 = wellKnownSymbol$b('toStringTag'); var $Object = 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$6 = TO_STRING_TAG_SUPPORT$2 ? classofRaw : function (it) { var O, tag, result; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG$2)) == 'string' ? tag // builtinTag case : CORRECT_ARGUMENTS ? classofRaw(O) // ES3 arguments fallback : (result = classofRaw(O)) === 'Object' && isCallable$7(O.callee) ? 'Arguments' : result; }; var TO_STRING_TAG_SUPPORT$1 = toStringTagSupport; var classof$5 = classof$6; // `Object.prototype.toString` method implementation // https://tc39.es/ecma262/#sec-object.prototype.tostring var objectToString = TO_STRING_TAG_SUPPORT$1 ? {}.toString : function toString() { return '[object ' + classof$5(this) + ']'; }; var TO_STRING_TAG_SUPPORT = toStringTagSupport; var defineProperty$2 = objectDefineProperty.f; var createNonEnumerableProperty$3 = createNonEnumerableProperty$7; var hasOwn$4 = hasOwnProperty_1; var toString$5 = objectToString; var wellKnownSymbol$a = wellKnownSymbol$f; var TO_STRING_TAG$1 = wellKnownSymbol$a('toStringTag'); var setToStringTag$6 = function (it, TAG, STATIC, SET_METHOD) { var target = STATIC ? it : it && it.prototype; if (target) { if (!hasOwn$4(target, TO_STRING_TAG$1)) { defineProperty$2(target, TO_STRING_TAG$1, { configurable: true, value: TAG }); } if (SET_METHOD && !TO_STRING_TAG_SUPPORT) { createNonEnumerableProperty$3(target, 'toString', toString$5); } } }; var IteratorPrototype = iteratorsCore.IteratorPrototype; var create$2 = objectCreate; var createPropertyDescriptor$4 = createPropertyDescriptor$7; var setToStringTag$5 = setToStringTag$6; var Iterators$5 = iterators; var returnThis$1 = function () { return this; }; var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) { var TO_STRING_TAG = NAME + ' Iterator'; IteratorConstructor.prototype = create$2(IteratorPrototype, { next: createPropertyDescriptor$4(+!ENUMERABLE_NEXT, next) }); setToStringTag$5(IteratorConstructor, TO_STRING_TAG, false, true); Iterators$5[TO_STRING_TAG] = returnThis$1; return IteratorConstructor; }; var uncurryThis$9 = functionUncurryThis; var aCallable$7 = aCallable$b; var functionUncurryThisAccessor = function (object, key, method) { try { // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe return uncurryThis$9(aCallable$7(Object.getOwnPropertyDescriptor(object, key)[method])); } catch (error) { /* empty */ } }; var isObject$5 = isObject$d; var isPossiblePrototype$1 = function (argument) { return isObject$5(argument) || argument === null; }; var isPossiblePrototype = isPossiblePrototype$1; var $String$1 = String; var $TypeError$6 = TypeError; var aPossiblePrototype$1 = function (argument) { if (isPossiblePrototype(argument)) return argument; throw new $TypeError$6("Can't set " + $String$1(argument) + ' as a prototype'); }; /* eslint-disable no-proto -- safe */ var uncurryThisAccessor = functionUncurryThisAccessor; var isObject$4 = isObject$d; var requireObjectCoercible$1 = requireObjectCoercible$4; var aPossiblePrototype = aPossiblePrototype$1; // `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 { setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set'); setter(test, []); CORRECT_SETTER = test instanceof Array; } catch (error) { /* empty */ } return function setPrototypeOf(O, proto) { requireObjectCoercible$1(O); aPo