UNPKG

@authgear/react-native

Version:

The Authgear SDK for React Native makes it ease to integrate authentication features into your React Native application. In most cases, it involves just a few lines of code to enable multiple authentication methods, such as social logins, passwordless, bi

1,491 lines (1,250 loc) 365 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var reactNative = require('react-native'); function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } function _typeof$1(o) { "@babel/helpers - typeof"; return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$1(o); } function toPrimitive$2(t, r) { if ("object" != _typeof$1(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r); if ("object" != _typeof$1(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return (String )(t); } function toPropertyKey$3(t) { var i = toPrimitive$2(t, "string"); return "symbol" == _typeof$1(i) ? i : i + ""; } function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, toPropertyKey$3(o.key), o); } } function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), Object.defineProperty(e, "prototype", { writable: false }), e; } function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } 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 regeneratorRuntime$1 = {exports: {}}; var OverloadYield = {exports: {}}; (function (module) { function _OverloadYield(e, d) { this.v = e, this.k = d; } module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports; } (OverloadYield)); var OverloadYieldExports = OverloadYield.exports; var regenerator$1 = {exports: {}}; var regeneratorDefine = {exports: {}}; (function (module) { function _regeneratorDefine(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t); } module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports; } (regeneratorDefine)); var regeneratorDefineExports = regeneratorDefine.exports; (function (module) { var regeneratorDefine = regeneratorDefineExports; function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return regeneratorDefine(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = false, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = true, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), true), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), regeneratorDefine(u), regeneratorDefine(u, o, "Generator"), regeneratorDefine(u, n, function () { return this; }), regeneratorDefine(u, "toString", function () { return "[object Generator]"; }), (module.exports = _regenerator = function _regenerator() { return { w: i, m: f }; }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); } module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; } (regenerator$1)); var regeneratorExports = regenerator$1.exports; var regeneratorAsync = {exports: {}}; var regeneratorAsyncGen = {exports: {}}; var regeneratorAsyncIterator = {exports: {}}; (function (module) { var OverloadYield = OverloadYieldExports; var regeneratorDefine = regeneratorDefineExports; function AsyncIterator(t, e) { function n(r, o, i, f) { try { var c = t[r](o), u = c.value; return u instanceof OverloadYield ? e.resolve(u.v).then(function (t) { n("next", t, i, f); }, function (t) { n("throw", t, i, f); }) : e.resolve(u).then(function (t) { c.value = t, i(c); }, function (t) { return n("throw", t, i, f); }); } catch (t) { f(t); } } var r; this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () { return this; })), regeneratorDefine(this, "_invoke", function (t, o, i) { function f() { return new e(function (e, r) { n(t, i, e, r); }); } return r = r ? r.then(f, f) : f(); }, true); } module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports; } (regeneratorAsyncIterator)); var regeneratorAsyncIteratorExports = regeneratorAsyncIterator.exports; (function (module) { var regenerator = regeneratorExports; var regeneratorAsyncIterator = regeneratorAsyncIteratorExports; function _regeneratorAsyncGen(r, e, t, o, n) { return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise); } module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports; } (regeneratorAsyncGen)); var regeneratorAsyncGenExports = regeneratorAsyncGen.exports; (function (module) { var regeneratorAsyncGen = regeneratorAsyncGenExports; function _regeneratorAsync(n, e, r, t, o) { var a = regeneratorAsyncGen(n, e, r, t, o); return a.next().then(function (n) { return n.done ? n.value : a.next(); }); } module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports; } (regeneratorAsync)); var regeneratorAsyncExports = regeneratorAsync.exports; var regeneratorKeys = {exports: {}}; (function (module) { function _regeneratorKeys(e) { var n = Object(e), r = []; for (var t in n) r.unshift(t); return function e() { for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = false, e; return e.done = true, e; }; } module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports; } (regeneratorKeys)); var regeneratorKeysExports = regeneratorKeys.exports; var regeneratorValues = {exports: {}}; var _typeof = {exports: {}}; (function (module) { function _typeof(o) { "@babel/helpers - typeof"; return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); } module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; } (_typeof)); var _typeofExports = _typeof.exports; (function (module) { var _typeof = _typeofExports["default"]; function _regeneratorValues(e) { if (null != e) { var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], r = 0; if (t) return t.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) return { next: function next() { return e && r >= e.length && (e = void 0), { value: e && e[r++], done: !e }; } }; } throw new TypeError(_typeof(e) + " is not iterable"); } module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports; } (regeneratorValues)); var regeneratorValuesExports = regeneratorValues.exports; (function (module) { var OverloadYield = OverloadYieldExports; var regenerator = regeneratorExports; var regeneratorAsync = regeneratorAsyncExports; var regeneratorAsyncGen = regeneratorAsyncGenExports; var regeneratorAsyncIterator = regeneratorAsyncIteratorExports; var regeneratorKeys = regeneratorKeysExports; var regeneratorValues = regeneratorValuesExports; function _regeneratorRuntime() { var r = regenerator(), e = r.m(_regeneratorRuntime), t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; function n(r) { var e = "function" == typeof r && r.constructor; return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); } var o = { "throw": 1, "return": 2, "break": 3, "continue": 3 }; function a(r) { var e, t; return function (n) { e || (e = { stop: function stop() { return t(n.a, 2); }, "catch": function _catch() { return n.v; }, abrupt: function abrupt(r, e) { return t(n.a, o[r], e); }, delegateYield: function delegateYield(r, o, a) { return e.resultName = o, t(n.d, regeneratorValues(r), a); }, finish: function finish(r) { return t(n.f, r); } }, t = function t(r, _t, o) { n.p = e.prev, n.n = e.next; try { return r(_t, o); } finally { e.next = n.n; } }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; try { return r.call(this, e); } finally { n.p = e.prev, n.n = e.next; } }; } return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() { return { wrap: function wrap(e, t, n, o) { return r.w(a(e), t, n, o && o.reverse()); }, isGeneratorFunction: n, mark: r.m, awrap: function awrap(r, e) { return new OverloadYield(r, e); }, AsyncIterator: regeneratorAsyncIterator, async: function async(r, e, t, o, u) { return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u); }, keys: regeneratorKeys, values: regeneratorValues }; }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); } module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; } (regeneratorRuntime$1)); var regeneratorRuntimeExports = regeneratorRuntime$1.exports; // TODO(Babel 8): Remove this file. var runtime = regeneratorRuntimeExports(); var regenerator = runtime; // Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736= try { regeneratorRuntime = runtime; } catch (accidentalStrictMode) { if (typeof globalThis === "object") { globalThis.regeneratorRuntime = runtime; } else { Function("r", "regeneratorRuntime = r")(runtime); } } var _regeneratorRuntime = /*@__PURE__*/getDefaultExportFromCjs(regenerator); var fails$d = function (exec) { try { return !!exec(); } catch (error) { return true; } }; var fails$c = fails$d; var functionBindNative = !fails$c(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$3 = functionBindNative; var FunctionPrototype$2 = Function.prototype; var call$b = FunctionPrototype$2.call; // eslint-disable-next-line es/no-function-prototype-bind -- safe var uncurryThisWithBind = NATIVE_BIND$3 && FunctionPrototype$2.bind.bind(call$b, call$b); var functionUncurryThis = NATIVE_BIND$3 ? uncurryThisWithBind : function (fn) { return function () { return call$b.apply(fn, arguments); }; }; var uncurryThis$h = functionUncurryThis; var toString$7 = uncurryThis$h({}.toString); var stringSlice$3 = uncurryThis$h(''.slice); var classofRaw$2 = function (it) { return stringSlice$3(toString$7(it), 8, -1); }; var uncurryThis$g = functionUncurryThis; var fails$b = fails$d; var classof$6 = classofRaw$2; var $Object$4 = Object; var split$3 = uncurryThis$g(''.split); // fallback for non-array-like ES3 and non-enumerable old V8 strings var indexedObject = fails$b(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$6(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$3 = function (it) { return it === null || it === undefined; }; var isNullOrUndefined$2 = isNullOrUndefined$3; var $TypeError$8 = TypeError; // `RequireObjectCoercible` abstract operation // https://tc39.es/ecma262/#sec-requireobjectcoercible var requireObjectCoercible$3 = function (it) { if (isNullOrUndefined$2(it)) throw new $TypeError$8("Can't call method on " + it); return it; }; // toObject with fallback for non-array-like ES3 strings var IndexedObject$1 = indexedObject; var requireObjectCoercible$2 = requireObjectCoercible$3; var toIndexedObject$5 = function (it) { return IndexedObject$1(requireObjectCoercible$2(it)); }; var iterators = {}; var check = function (it) { return it && it.Math === Math && it; }; // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var globalThis_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) || check(typeof commonjsGlobal == 'object' && commonjsGlobal) || // eslint-disable-next-line no-new-func -- fallback (function () { return this; })() || Function('return this')(); // 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$e = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) { return typeof argument == 'function' || argument === documentAll; } : function (argument) { return typeof argument == 'function'; }; var globalThis$f = globalThis_1; var isCallable$d = isCallable$e; var WeakMap$1 = globalThis$f.WeakMap; var weakMapBasicDetection = isCallable$d(WeakMap$1) && /native code/.test(String(WeakMap$1)); var isCallable$c = isCallable$e; var isObject$7 = function (it) { return typeof it == 'object' ? it !== null : isCallable$c(it); }; var fails$a = fails$d; // Detect IE8's incomplete defineProperty implementation var descriptors = !fails$a(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7; }); var objectDefineProperty = {}; var globalThis$e = globalThis_1; var isObject$6 = isObject$7; var document$1 = globalThis$e.document; // typeof document.createElement is 'object' in old IE var EXISTS$1 = isObject$6(document$1) && isObject$6(document$1.createElement); var documentCreateElement$1 = function (it) { return EXISTS$1 ? document$1.createElement(it) : {}; }; var DESCRIPTORS$c = descriptors; var fails$9 = fails$d; var createElement = documentCreateElement$1; // Thanks to IE8 for its funny defineProperty var ie8DomDefine = !DESCRIPTORS$c && !fails$9(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty(createElement('div'), 'a', { get: function () { return 7; } }).a !== 7; }); var DESCRIPTORS$b = descriptors; var fails$8 = fails$d; // V8 ~ Chrome 36- // https://bugs.chromium.org/p/v8/issues/detail?id=3334 var v8PrototypeDefineBug = DESCRIPTORS$b && fails$8(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$5 = isObject$7; var $String$3 = String; var $TypeError$7 = TypeError; // `Assert: Type(argument) is Object` var anObject$7 = function (argument) { if (isObject$5(argument)) return argument; throw new $TypeError$7($String$3(argument) + ' is not an object'); }; var NATIVE_BIND$2 = functionBindNative; var call$a = Function.prototype.call; // eslint-disable-next-line es/no-function-prototype-bind -- safe var functionCall = NATIVE_BIND$2 ? call$a.bind(call$a) : function () { return call$a.apply(call$a, arguments); }; var path$4 = {}; var path$3 = path$4; var globalThis$d = globalThis_1; var isCallable$b = isCallable$e; var aFunction = function (variable) { return isCallable$b(variable) ? variable : undefined; }; var getBuiltIn$6 = function (namespace, method) { return arguments.length < 2 ? aFunction(path$3[namespace]) || aFunction(globalThis$d[namespace]) : path$3[namespace] && path$3[namespace][method] || globalThis$d[namespace] && globalThis$d[namespace][method]; }; var uncurryThis$f = functionUncurryThis; var objectIsPrototypeOf = uncurryThis$f({}.isPrototypeOf); var globalThis$c = globalThis_1; var navigator = globalThis$c.navigator; var userAgent$1 = navigator && navigator.userAgent; var environmentUserAgent = userAgent$1 ? String(userAgent$1) : ''; var globalThis$b = globalThis_1; var userAgent = environmentUserAgent; var process = globalThis$b.process; var Deno = globalThis$b.Deno; var versions = process && process.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 && userAgent) { match = userAgent.match(/Edge\/(\d+)/); if (!match || match[1] >= 74) { match = userAgent.match(/Chrome\/(\d+)/); if (match) version = +match[1]; } } var environmentV8Version = version; /* eslint-disable es/no-symbol -- required for testing */ var V8_VERSION = environmentV8Version; var fails$7 = fails$d; var globalThis$a = globalThis_1; var $String$2 = globalThis$a.String; // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$7(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$2(symbol) || !(Object(symbol) instanceof Symbol) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances !Symbol.sham && V8_VERSION && V8_VERSION < 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$5 = getBuiltIn$6; var isCallable$a = isCallable$e; var isPrototypeOf$1 = 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$5('Symbol'); return isCallable$a($Symbol) && isPrototypeOf$1($Symbol.prototype, $Object$3(it)); }; var $String$1 = String; var tryToString$2 = function (argument) { try { return $String$1(argument); } catch (error) { return 'Object'; } }; var isCallable$9 = isCallable$e; var tryToString$1 = tryToString$2; var $TypeError$6 = TypeError; // `Assert: IsCallable(argument) is true` var aCallable$3 = function (argument) { if (isCallable$9(argument)) return argument; throw new $TypeError$6(tryToString$1(argument) + ' is not a function'); }; var aCallable$2 = aCallable$3; var isNullOrUndefined$1 = isNullOrUndefined$3; // `GetMethod` abstract operation // https://tc39.es/ecma262/#sec-getmethod var getMethod$3 = function (V, P) { var func = V[P]; return isNullOrUndefined$1(func) ? undefined : aCallable$2(func); }; var call$9 = functionCall; var isCallable$8 = isCallable$e; var isObject$4 = isObject$7; var $TypeError$5 = TypeError; // `OrdinaryToPrimitive` abstract operation // https://tc39.es/ecma262/#sec-ordinarytoprimitive var ordinaryToPrimitive$1 = function (input, pref) { var fn, val; if (pref === 'string' && isCallable$8(fn = input.toString) && !isObject$4(val = call$9(fn, input))) return val; if (isCallable$8(fn = input.valueOf) && !isObject$4(val = call$9(fn, input))) return val; if (pref !== 'string' && isCallable$8(fn = input.toString) && !isObject$4(val = call$9(fn, input))) return val; throw new $TypeError$5("Can't convert object to primitive value"); }; var sharedStore = {exports: {}}; var isPure = true; var globalThis$9 = globalThis_1; // eslint-disable-next-line es/no-object-defineproperty -- safe var defineProperty$3 = Object.defineProperty; var defineGlobalProperty$1 = function (key, value) { try { defineProperty$3(globalThis$9, key, { value: value, configurable: true, writable: true }); } catch (error) { globalThis$9[key] = value; } return value; }; var globalThis$8 = globalThis_1; var defineGlobalProperty = defineGlobalProperty$1; var SHARED = '__core-js_shared__'; var store$3 = sharedStore.exports = globalThis$8[SHARED] || defineGlobalProperty(SHARED, {}); (store$3.versions || (store$3.versions = [])).push({ version: '3.46.0', mode: 'pure' , copyright: '© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)', license: 'https://github.com/zloirock/core-js/blob/v3.46.0/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$1 = requireObjectCoercible$3; var $Object$2 = Object; // `ToObject` abstract operation // https://tc39.es/ecma262/#sec-toobject var toObject$4 = function (argument) { return $Object$2(requireObjectCoercible$1(argument)); }; var uncurryThis$e = functionUncurryThis; var toObject$3 = toObject$4; var hasOwnProperty = uncurryThis$e({}.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$d = functionUncurryThis; var id = 0; var postfix = Math.random(); var toString$6 = uncurryThis$d(1.1.toString); var uid$2 = function (key) { return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$6(++id + postfix, 36); }; var globalThis$7 = globalThis_1; var shared$2 = shared$3; var hasOwn$9 = hasOwnProperty_1; var uid$1 = uid$2; var NATIVE_SYMBOL = symbolConstructorDetection; var USE_SYMBOL_AS_UID = useSymbolAsUid; var Symbol$1 = globalThis$7.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$a = function (name) { if (!hasOwn$9(WellKnownSymbolsStore, name)) { WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$9(Symbol$1, name) ? Symbol$1[name] : createWellKnownSymbol('Symbol.' + name); } return WellKnownSymbolsStore[name]; }; var call$8 = functionCall; var isObject$3 = isObject$7; var isSymbol$1 = isSymbol$2; var getMethod$2 = getMethod$3; var ordinaryToPrimitive = ordinaryToPrimitive$1; var wellKnownSymbol$9 = wellKnownSymbol$a; var $TypeError$4 = TypeError; var TO_PRIMITIVE = wellKnownSymbol$9('toPrimitive'); // `ToPrimitive` abstract operation // https://tc39.es/ecma262/#sec-toprimitive var toPrimitive$1 = function (input, pref) { if (!isObject$3(input) || isSymbol$1(input)) return input; var exoticToPrim = getMethod$2(input, TO_PRIMITIVE); var result; if (exoticToPrim) { if (pref === undefined) pref = 'default'; result = call$8(exoticToPrim, input, pref); if (!isObject$3(result) || isSymbol$1(result)) return result; throw new $TypeError$4("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 DESCRIPTORS$a = descriptors; var IE8_DOM_DEFINE$1 = ie8DomDefine; var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug; var anObject$6 = anObject$7; var toPropertyKey$1 = toPropertyKey$2; var $TypeError$3 = 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$1 = 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$6(O); P = toPropertyKey$1(P); anObject$6(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(O, P, Attributes); } : $defineProperty : function defineProperty(O, P, Attributes) { anObject$6(O); P = toPropertyKey$1(P); anObject$6(Attributes); if (IE8_DOM_DEFINE$1) try { return $defineProperty(O, P, Attributes); } catch (error) { /* empty */ } if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$3('Accessors not supported'); if ('value' in Attributes) O[P] = Attributes.value; return O; }; var createPropertyDescriptor$5 = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; var DESCRIPTORS$9 = descriptors; var definePropertyModule$2 = objectDefineProperty; var createPropertyDescriptor$4 = createPropertyDescriptor$5; var createNonEnumerableProperty$4 = DESCRIPTORS$9 ? function (object, key, value) { return definePropertyModule$2.f(object, key, createPropertyDescriptor$4(1, value)); } : function (object, key, value) { object[key] = value; return object; }; 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$3 = {}; var NATIVE_WEAK_MAP = weakMapBasicDetection; var globalThis$6 = globalThis_1; var isObject$2 = isObject$7; var createNonEnumerableProperty$3 = createNonEnumerableProperty$4; var hasOwn$8 = hasOwnProperty_1; var shared = sharedStoreExports; var sharedKey$2 = sharedKey$3; var hiddenKeys$2 = hiddenKeys$3; var OBJECT_ALREADY_INITIALIZED = 'Object already initialized'; var TypeError$3 = globalThis$6.TypeError; var WeakMap = globalThis$6.WeakMap; var set, get, has; var enforce = function (it) { return has(it) ? get(it) : set(it, {}); }; var getterFor = function (TYPE) { return function (it) { var state; if (!isObject$2(it) || (state = get(it)).type !== TYPE) { throw new TypeError$3('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 = function (it, metadata) { if (store$1.has(it)) throw new TypeError$3(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$2[STATE] = true; set = function (it, metadata) { if (hasOwn$8(it, STATE)) throw new TypeError$3(OBJECT_ALREADY_INITIALIZED); metadata.facade = it; createNonEnumerableProperty$3(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, get: get, has: has, enforce: enforce, getterFor: getterFor }; var NATIVE_BIND$1 = functionBindNative; var FunctionPrototype$1 = Function.prototype; var apply$1 = FunctionPrototype$1.apply; var call$7 = FunctionPrototype$1.call; // eslint-disable-next-line es/no-function-prototype-bind, es/no-reflect -- safe var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$7.bind(apply$1) : function () { return call$7.apply(apply$1, arguments); }); var classofRaw$1 = classofRaw$2; var uncurryThis$c = 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$c(fn); }; var objectGetOwnPropertyDescriptor = {}; 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 DESCRIPTORS$8 = descriptors; var call$6 = functionCall; var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable; var createPropertyDescriptor$3 = createPropertyDescriptor$5; var toIndexedObject$4 = toIndexedObject$5; var toPropertyKey = toPropertyKey$2; var hasOwn$7 = hasOwnProperty_1; var IE8_DOM_DEFINE = ie8DomDefine; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; // `Object.getOwnPropertyDescriptor` method // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { O = toIndexedObject$4(O); P = toPropertyKey(P); if (IE8_DOM_DEFINE) try { return $getOwnPropertyDescriptor(O, P); } catch (error) { /* empty */ } if (hasOwn$7(O, P)) return createPropertyDescriptor$3(!call$6(propertyIsEnumerableModule$1.f, O, P), O[P]); }; var fails$6 = fails$d; var isCallable$7 = isCallable$e; var replacement = /#|\.prototype\./; var isForced$1 = function (feature, detection) { var value = data[normalize(feature)]; return value === POLYFILL ? true : value === NATIVE ? false : isCallable$7(detection) ? fails$6(detection) : !!detection; }; var normalize = isForced$1.normalize = function (string) { return String(string).replace(replacement, '.').toLowerCase(); }; var data = isForced$1.data = {}; var NATIVE = isForced$1.NATIVE = 'N'; var POLYFILL = isForced$1.POLYFILL = 'P'; var isForced_1 = isForced$1; var uncurryThis$b = functionUncurryThisClause; var aCallable$1 = aCallable$3; var NATIVE_BIND = functionBindNative; var bind$4 = uncurryThis$b(uncurryThis$b.bind); // optional / simple context binding var functionBindContext = function (fn, that) { aCallable$1(fn); return that === undefined ? fn : NATIVE_BIND ? bind$4(fn, that) : function (/* ...args */) { return fn.apply(that, arguments); }; }; var globalThis$5 = globalThis_1; var apply = functionApply; var uncurryThis$a = functionUncurryThisClause; var isCallable$6 = isCallable$e; var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f; var isForced = isForced_1; var path$2 = path$4; var bind$3 = functionBindContext; var createNonEnumerableProperty$2 = createNonEnumerableProperty$4; var hasOwn$6 = 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(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 ? globalThis$5 : STATIC ? globalThis$5[TARGET] : globalThis$5[TARGET] && globalThis$5[TARGET].prototype; var target = GLOBAL ? path$2 : path$2[TARGET] || createNonEnumerableProperty$2(path$2, 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(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); // contains in native USE_NATIVE = !FORCED && nativeSource && hasOwn$6(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$3(sourceProperty, globalThis$5); // 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$6(sourceProperty)) resultProperty = uncurryThis$a(sourceProperty); // default case else resultProperty = sourceProperty; // add a flag to not completely full polyfills if (options.sham || (sourceProperty && sourceProperty.sham) || (targetProperty && targetProperty.sham)) { createNonEnumerableProperty$2(resultProperty, 'sham', true); } createNonEnumerableProperty$2(target, key, resultProperty); if (PROTO) { VIRTUAL_PROTOTYPE = TARGET + 'Prototype'; if (!hasOwn$6(path$2, VIRTUAL_PROTOTYPE)) { createNonEnumerableProperty$2(path$2, VIRTUAL_PROTOTYPE, {}); } // export virtual prototype methods createNonEnumerableProperty$2(path$2[VIRTUAL_PROTOTYPE], key, sourceProperty); // export real prototype methods if (options.real && targetPrototype && (FORCED || !targetPrototype[key])) { createNonEnumerableProperty$2(targetPrototype, key, sourceProperty); } } } }; var DESCRIPTORS$7 = descriptors; var hasOwn$5 = hasOwnProperty_1; var FunctionPrototype = Function.prototype; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var getDescriptor = DESCRIPTORS$7 && Object.getOwnPropertyDescriptor; var EXISTS = hasOwn$5(FunctionPrototype, 'name'); // additional protection from minified / mangled / dropped function names var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something'; var CONFIGURABLE = EXISTS && (!DESCRIPTORS$7 || (DESCRIPTORS$7 && getDescriptor(FunctionPrototype, 'name').configurable)); var functionName = { PROPER: PROPER, CONFIGURABLE: CONFIGURABLE }; var objectDefineProperties = {}; 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$2 = 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$2 = function (obj) { return toLength(obj.length); }; var toIndexedObject$3 = toIndexedObject$5; var toAbsoluteIndex$1 = toAbsoluteIndex$2; var lengthOfArrayLike$1 = lengthOfArrayLike$2; // `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$1(O); if (length === 0) return !IS_INCLUDES && -1; var index = toAbsoluteIndex$1(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.indexOf` method // https://tc39.es/ecma262/#sec-array.prototype.indexof indexOf: createMethod$1(false) }; var uncurryThis$9 = functionUncurryThis; var hasOwn$4 = hasOwnProperty_1; var toIndexedObject$2 = toIndexedObject$5; var indexOf = arrayIncludes.indexOf; var hiddenKeys$1 = hiddenKeys$3; var push$3 = uncurryThis$9([].push); var objectKeysInternal = function (object, names) { var O = toIndexedObject$2(object); var i = 0; var result = []; var key; for (key in O) !hasOwn$4(hiddenKeys$1, key) && hasOwn$4(O, key) && push$3(result, key); // Don't enum bug & hidden keys while (names.length > i) if (hasOwn$4(O, key = names[i++])) { ~indexOf(result, key) || push$3(result, key); } return result; }; // IE8- don't enum bug keys var enumBugKeys$2 = [ 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf' ]; var internalObjectKeys = objectKeysInternal; var enumBugKeys$1 = enumBugKeys$2; // `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(O, enumBugKeys$1); }; var DESCRIPTORS$6 = descriptors; var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug; var definePropertyModule$1 = objectDefineProperty; var anObject$5 = anObject$7; 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$6 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) { anObject$5(O); var props = toIndexedObject$1(Properties); var keys = objectKeys$1(Properties); var length = keys.length; var index = 0; var key; while (length > index) definePropertyModule$1.f(O, key = keys[index++], props[key]); return O; }; var getBuiltIn$4 = getBuiltIn$6; var html$1 = getBuiltIn$4('document', 'documentElement'); /* global ActiveXObject -- old IE, WSH */ var anObject$4 = anObject$7; var definePropertiesModule = objectDefineProperties; var enumBugKeys = enumBugKeys$2; var hiddenKeys = hiddenKeys$3; var html = html$1; 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; // eslint-disable-next-line no-useless-assignment -- avoid memory leak activeXDocument = null; 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][enumBugKeys[length]]; return NullProtoObj