UNPKG

@ace-fetch/graphql

Version:

Fetch Provider.

1,356 lines (1,150 loc) 282 kB
/** * @ace-fetch/graphql@0.11.0 */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define('index', ['exports'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.AceFetch = global.AceFetch || {}, global.AceFetch.Graphql = {}))); })(this, (function (exports) { 'use strict'; (function(){ var global = this || self; global.globalThis = global; })(); (function() { const env = {"NODE_ENV":"development"}; try { if (process) { process.env = Object.assign({}, process.env); Object.assign(process.env, env); return; } } catch (e) {} // avoid ReferenceError: process is not defined globalThis.process = { env:env }; })(); function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; } function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); } function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } function _construct(t, e, r) { if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); var o = [null]; o.push.apply(o, e); var p = new (t.bind.apply(t, o))(); return r && _setPrototypeOf(p, r.prototype), p; } function _createClass(e, r, t) { return Object.defineProperty(e, "prototype", { writable: !1 }), e; } function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) { t && (r = t); var n = 0, F = function () {}; return { s: F, n: function () { return n >= r.length ? { done: !0 } : { done: !1, value: r[n++] }; }, e: function (r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function () { t = t.call(r); }, n: function () { var r = t.next(); return a = r.done, r; }, e: function (r) { u = !0, o = r; }, f: function () { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; } function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); } function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); } function _isNativeFunction(t) { try { return -1 !== Function.toString.call(t).indexOf("[native code]"); } catch (n) { return "function" == typeof t; } } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); } function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } function _objectSpread2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; } function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; } function _possibleConstructorReturn(t, e) { if (e && ("object" == typeof e || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); } function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); } function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } function _typeof(o) { "@babel/helpers - typeof"; return _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; }, _typeof(o); } function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } function _wrapNativeSuper(t) { var r = "function" == typeof Map ? new Map() : void 0; return _wrapNativeSuper = function (t) { if (null === t || !_isNativeFunction(t)) return t; if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); if (void 0 !== r) { if (r.has(t)) return r.get(t); r.set(t, Wrapper); } function Wrapper() { return _construct(t, arguments, _getPrototypeOf(this).constructor); } return Wrapper.prototype = Object.create(t.prototype, { constructor: { value: Wrapper, enumerable: !1, writable: !0, configurable: !0 } }), _setPrototypeOf(Wrapper, t); }, _wrapNativeSuper(t); } var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; var fails$B = function (exec) { try { return !!exec(); } catch (error) { return true; } }; var fails$A = fails$B; // 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 fails$z = fails$B; var functionBindNative = !fails$z(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$3 = Function.prototype; var call$o = FunctionPrototype$3.call; var uncurryThisWithBind = NATIVE_BIND$3 && FunctionPrototype$3.bind.bind(call$o, call$o); var functionUncurryThis = NATIVE_BIND$3 ? uncurryThisWithBind : function (fn) { return function () { return call$o.apply(fn, arguments); }; }; // we can't use just `it == null` since of `document.all` special case // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec var isNullOrUndefined$b = function (it) { return it === null || it === undefined; }; var isNullOrUndefined$a = isNullOrUndefined$b; var $TypeError$h = TypeError; // `RequireObjectCoercible` abstract operation // https://tc39.es/ecma262/#sec-requireobjectcoercible var requireObjectCoercible$a = function (it) { if (isNullOrUndefined$a(it)) throw new $TypeError$h("Can't call method on " + it); return it; }; var requireObjectCoercible$9 = requireObjectCoercible$a; var $Object$5 = Object; // `ToObject` abstract operation // https://tc39.es/ecma262/#sec-toobject var toObject$a = function (argument) { return $Object$5(requireObjectCoercible$9(argument)); }; var uncurryThis$y = functionUncurryThis; var toObject$9 = toObject$a; var hasOwnProperty$1 = uncurryThis$y({}.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$1(toObject$9(it), key); }; var DESCRIPTORS$k = descriptors; var hasOwn$i = hasOwnProperty_1; var FunctionPrototype$2 = Function.prototype; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var getDescriptor = DESCRIPTORS$k && Object.getOwnPropertyDescriptor; var EXISTS$1 = hasOwn$i(FunctionPrototype$2, 'name'); // additional protection from minified / mangled / dropped function names var PROPER = EXISTS$1 && (function something() { /* empty */ }).name === 'something'; var CONFIGURABLE$1 = EXISTS$1 && (!DESCRIPTORS$k || (DESCRIPTORS$k && getDescriptor(FunctionPrototype$2, 'name').configurable)); var functionName = { EXISTS: EXISTS$1, PROPER: PROPER, CONFIGURABLE: CONFIGURABLE$1 }; var makeBuiltIn$3 = {exports: {}}; // 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$q = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) { return typeof argument == 'function' || argument === documentAll; } : function (argument) { return typeof argument == 'function'; }; var sharedStore = {exports: {}}; 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')(); var globalThis$t = globalThis_1; // eslint-disable-next-line es/no-object-defineproperty -- safe var defineProperty$9 = Object.defineProperty; var defineGlobalProperty$3 = function (key, value) { try { defineProperty$9(globalThis$t, key, { value: value, configurable: true, writable: true }); } catch (error) { globalThis$t[key] = value; } return value; }; var globalThis$s = globalThis_1; var defineGlobalProperty$2 = defineGlobalProperty$3; var SHARED = '__core-js_shared__'; var store$3 = sharedStore.exports = globalThis$s[SHARED] || defineGlobalProperty$2(SHARED, {}); (store$3.versions || (store$3.versions = [])).push({ version: '3.38.1', mode: 'global', copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)', license: 'https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE', source: 'https://github.com/zloirock/core-js' }); var sharedStoreExports = sharedStore.exports; var uncurryThis$x = functionUncurryThis; var isCallable$p = isCallable$q; var store$2 = sharedStoreExports; var functionToString$1 = uncurryThis$x(Function.toString); // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper if (!isCallable$p(store$2.inspectSource)) { store$2.inspectSource = function (it) { return functionToString$1(it); }; } var inspectSource$3 = store$2.inspectSource; var globalThis$r = globalThis_1; var isCallable$o = isCallable$q; var WeakMap$2 = globalThis$r.WeakMap; var weakMapBasicDetection = isCallable$o(WeakMap$2) && /native code/.test(String(WeakMap$2)); var isCallable$n = isCallable$q; var isObject$m = function (it) { return typeof it == 'object' ? it !== null : isCallable$n(it); }; var objectDefineProperty = {}; var globalThis$q = globalThis_1; var isObject$l = isObject$m; var document$3 = globalThis$q.document; // typeof document.createElement is 'object' in old IE var EXISTS = isObject$l(document$3) && isObject$l(document$3.createElement); var documentCreateElement$2 = function (it) { return EXISTS ? document$3.createElement(it) : {}; }; var DESCRIPTORS$j = descriptors; var fails$y = fails$B; var createElement$1 = documentCreateElement$2; // Thanks to IE8 for its funny defineProperty var ie8DomDefine = !DESCRIPTORS$j && !fails$y(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$i = descriptors; var fails$x = fails$B; // V8 ~ Chrome 36- // https://bugs.chromium.org/p/v8/issues/detail?id=3334 var v8PrototypeDefineBug = DESCRIPTORS$i && fails$x(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$k = isObject$m; var $String$6 = String; var $TypeError$g = TypeError; // `Assert: Type(argument) is Object` var anObject$i = function (argument) { if (isObject$k(argument)) return argument; throw new $TypeError$g($String$6(argument) + ' is not an object'); }; var NATIVE_BIND$2 = functionBindNative; var call$n = Function.prototype.call; var functionCall = NATIVE_BIND$2 ? call$n.bind(call$n) : function () { return call$n.apply(call$n, arguments); }; var globalThis$p = globalThis_1; var isCallable$m = isCallable$q; var aFunction = function (argument) { return isCallable$m(argument) ? argument : undefined; }; var getBuiltIn$a = function (namespace, method) { return arguments.length < 2 ? aFunction(globalThis$p[namespace]) : globalThis$p[namespace] && globalThis$p[namespace][method]; }; var uncurryThis$w = functionUncurryThis; var objectIsPrototypeOf = uncurryThis$w({}.isPrototypeOf); var globalThis$o = globalThis_1; var navigator = globalThis$o.navigator; var userAgent$5 = navigator && navigator.userAgent; var environmentUserAgent = userAgent$5 ? String(userAgent$5) : ''; var globalThis$n = globalThis_1; var userAgent$4 = environmentUserAgent; var process$4 = globalThis$n.process; var Deno$1 = globalThis$n.Deno; var versions = process$4 && process$4.versions || Deno$1 && Deno$1.version; var v8 = versions && versions.v8; var match, version$1; 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$1 = 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$1 && userAgent$4) { match = userAgent$4.match(/Edge\/(\d+)/); if (!match || match[1] >= 74) { match = userAgent$4.match(/Chrome\/(\d+)/); if (match) version$1 = +match[1]; } } var environmentV8Version = version$1; /* eslint-disable es/no-symbol -- required for testing */ var V8_VERSION$3 = environmentV8Version; var fails$w = fails$B; var globalThis$m = globalThis_1; var $String$5 = globalThis$m.String; // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$w(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$5(symbol) || !(Object(symbol) instanceof Symbol) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances !Symbol.sham && V8_VERSION$3 && V8_VERSION$3 < 41; }); /* eslint-disable es/no-symbol -- required for testing */ var NATIVE_SYMBOL$6 = symbolConstructorDetection; var useSymbolAsUid = NATIVE_SYMBOL$6 && !Symbol.sham && typeof Symbol.iterator == 'symbol'; var getBuiltIn$9 = getBuiltIn$a; var isCallable$l = isCallable$q; var isPrototypeOf$6 = objectIsPrototypeOf; var USE_SYMBOL_AS_UID$1 = useSymbolAsUid; var $Object$4 = Object; var isSymbol$5 = USE_SYMBOL_AS_UID$1 ? function (it) { return typeof it == 'symbol'; } : function (it) { var $Symbol = getBuiltIn$9('Symbol'); return isCallable$l($Symbol) && isPrototypeOf$6($Symbol.prototype, $Object$4(it)); }; var $String$4 = String; var tryToString$6 = function (argument) { try { return $String$4(argument); } catch (error) { return 'Object'; } }; var isCallable$k = isCallable$q; var tryToString$5 = tryToString$6; var $TypeError$f = TypeError; // `Assert: IsCallable(argument) is true` var aCallable$8 = function (argument) { if (isCallable$k(argument)) return argument; throw new $TypeError$f(tryToString$5(argument) + ' is not a function'); }; var aCallable$7 = aCallable$8; var isNullOrUndefined$9 = isNullOrUndefined$b; // `GetMethod` abstract operation // https://tc39.es/ecma262/#sec-getmethod var getMethod$7 = function (V, P) { var func = V[P]; return isNullOrUndefined$9(func) ? undefined : aCallable$7(func); }; var call$m = functionCall; var isCallable$j = isCallable$q; var isObject$j = isObject$m; var $TypeError$e = TypeError; // `OrdinaryToPrimitive` abstract operation // https://tc39.es/ecma262/#sec-ordinarytoprimitive var ordinaryToPrimitive$1 = function (input, pref) { var fn, val; if (pref === 'string' && isCallable$j(fn = input.toString) && !isObject$j(val = call$m(fn, input))) return val; if (isCallable$j(fn = input.valueOf) && !isObject$j(val = call$m(fn, input))) return val; if (pref !== 'string' && isCallable$j(fn = input.toString) && !isObject$j(val = call$m(fn, input))) return val; throw new $TypeError$e("Can't convert object to primitive value"); }; var store$1 = sharedStoreExports; var shared$7 = function (key, value) { return store$1[key] || (store$1[key] = value || {}); }; var uncurryThis$v = functionUncurryThis; var id$2 = 0; var postfix = Math.random(); var toString$h = uncurryThis$v(1.0.toString); var uid$4 = function (key) { return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$h(++id$2 + postfix, 36); }; var globalThis$l = globalThis_1; var shared$6 = shared$7; var hasOwn$h = hasOwnProperty_1; var uid$3 = uid$4; var NATIVE_SYMBOL$5 = symbolConstructorDetection; var USE_SYMBOL_AS_UID = useSymbolAsUid; var Symbol$1 = globalThis$l.Symbol; var WellKnownSymbolsStore$1 = shared$6('wks'); var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$3; var wellKnownSymbol$q = function (name) { if (!hasOwn$h(WellKnownSymbolsStore$1, name)) { WellKnownSymbolsStore$1[name] = NATIVE_SYMBOL$5 && hasOwn$h(Symbol$1, name) ? Symbol$1[name] : createWellKnownSymbol('Symbol.' + name); } return WellKnownSymbolsStore$1[name]; }; var call$l = functionCall; var isObject$i = isObject$m; var isSymbol$4 = isSymbol$5; var getMethod$6 = getMethod$7; var ordinaryToPrimitive = ordinaryToPrimitive$1; var wellKnownSymbol$p = wellKnownSymbol$q; var $TypeError$d = TypeError; var TO_PRIMITIVE = wellKnownSymbol$p('toPrimitive'); // `ToPrimitive` abstract operation // https://tc39.es/ecma262/#sec-toprimitive var toPrimitive$1 = function (input, pref) { if (!isObject$i(input) || isSymbol$4(input)) return input; var exoticToPrim = getMethod$6(input, TO_PRIMITIVE); var result; if (exoticToPrim) { if (pref === undefined) pref = 'default'; result = call$l(exoticToPrim, input, pref); if (!isObject$i(result) || isSymbol$4(result)) return result; throw new $TypeError$d("Can't convert object to primitive value"); } if (pref === undefined) pref = 'number'; return ordinaryToPrimitive(input, pref); }; var toPrimitive = toPrimitive$1; var isSymbol$3 = isSymbol$5; // `ToPropertyKey` abstract operation // https://tc39.es/ecma262/#sec-topropertykey var toPropertyKey$3 = function (argument) { var key = toPrimitive(argument, 'string'); return isSymbol$3(key) ? key : key + ''; }; var DESCRIPTORS$h = descriptors; var IE8_DOM_DEFINE$1 = ie8DomDefine; var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug; var anObject$h = anObject$i; var toPropertyKey$2 = toPropertyKey$3; var $TypeError$c = TypeError; // eslint-disable-next-line es/no-object-defineproperty -- safe var $defineProperty$1 = Object.defineProperty; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var $getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor; var ENUMERABLE = 'enumerable'; var CONFIGURABLE = 'configurable'; var WRITABLE = 'writable'; // `Object.defineProperty` method // https://tc39.es/ecma262/#sec-object.defineproperty objectDefineProperty.f = DESCRIPTORS$h ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) { anObject$h(O); P = toPropertyKey$2(P); anObject$h(Attributes); if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) { var current = $getOwnPropertyDescriptor$2(O, P); if (current && current[WRITABLE]) { O[P] = Attributes.value; Attributes = { configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE], enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE], writable: false }; } } return $defineProperty$1(O, P, Attributes); } : $defineProperty$1 : function defineProperty(O, P, Attributes) { anObject$h(O); P = toPropertyKey$2(P); anObject$h(Attributes); if (IE8_DOM_DEFINE$1) try { return $defineProperty$1(O, P, Attributes); } catch (error) { /* empty */ } if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$c('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$g = descriptors; var definePropertyModule$5 = objectDefineProperty; var createPropertyDescriptor$4 = createPropertyDescriptor$5; var createNonEnumerableProperty$7 = DESCRIPTORS$g ? function (object, key, value) { return definePropertyModule$5.f(object, key, createPropertyDescriptor$4(1, value)); } : function (object, key, value) { object[key] = value; return object; }; var shared$5 = shared$7; var uid$2 = uid$4; var keys$1 = shared$5('keys'); var sharedKey$4 = function (key) { return keys$1[key] || (keys$1[key] = uid$2(key)); }; var hiddenKeys$6 = {}; var NATIVE_WEAK_MAP$1 = weakMapBasicDetection; var globalThis$k = globalThis_1; var isObject$h = isObject$m; var createNonEnumerableProperty$6 = createNonEnumerableProperty$7; var hasOwn$g = hasOwnProperty_1; var shared$4 = sharedStoreExports; var sharedKey$3 = sharedKey$4; var hiddenKeys$5 = hiddenKeys$6; var OBJECT_ALREADY_INITIALIZED = 'Object already initialized'; var TypeError$3 = globalThis$k.TypeError; var WeakMap$1 = globalThis$k.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$h(it) || (state = get(it)).type !== TYPE) { throw new TypeError$3('Incompatible receiver, ' + TYPE + ' required'); } return state; }; }; if (NATIVE_WEAK_MAP$1 || shared$4.state) { var store = shared$4.state || (shared$4.state = new WeakMap$1()); /* eslint-disable no-self-assign -- prototype methods protection */ store.get = store.get; store.has = store.has; store.set = store.set; /* eslint-enable no-self-assign -- prototype methods protection */ set$1 = function (it, metadata) { if (store.has(it)) throw new TypeError$3(OBJECT_ALREADY_INITIALIZED); metadata.facade = it; store.set(it, metadata); return metadata; }; get = function (it) { return store.get(it) || {}; }; has = function (it) { return store.has(it); }; } else { var STATE = sharedKey$3('state'); hiddenKeys$5[STATE] = true; set$1 = function (it, metadata) { if (hasOwn$g(it, STATE)) throw new TypeError$3(OBJECT_ALREADY_INITIALIZED); metadata.facade = it; createNonEnumerableProperty$6(it, STATE, metadata); return metadata; }; get = function (it) { return hasOwn$g(it, STATE) ? it[STATE] : {}; }; has = function (it) { return hasOwn$g(it, STATE); }; } var internalState = { set: set$1, get: get, has: has, enforce: enforce, getterFor: getterFor }; var uncurryThis$u = functionUncurryThis; var fails$v = fails$B; var isCallable$i = isCallable$q; var hasOwn$f = hasOwnProperty_1; var DESCRIPTORS$f = descriptors; var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE; var inspectSource$2 = inspectSource$3; var InternalStateModule$6 = internalState; var enforceInternalState$2 = InternalStateModule$6.enforce; var getInternalState$4 = InternalStateModule$6.get; var $String$3 = String; // eslint-disable-next-line es/no-object-defineproperty -- safe var defineProperty$8 = Object.defineProperty; var stringSlice$8 = uncurryThis$u(''.slice); var replace$6 = uncurryThis$u(''.replace); var join = uncurryThis$u([].join); var CONFIGURABLE_LENGTH = DESCRIPTORS$f && !fails$v(function () { return defineProperty$8(function () { /* empty */ }, 'length', { value: 8 }).length !== 8; }); var TEMPLATE = String(String).split('String'); var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) { if (stringSlice$8($String$3(name), 0, 7) === 'Symbol(') { name = '[' + replace$6($String$3(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']'; } if (options && options.getter) name = 'get ' + name; if (options && options.setter) name = 'set ' + name; if (!hasOwn$f(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) { if (DESCRIPTORS$f) defineProperty$8(value, 'name', { value: name, configurable: true }); else value.name = name; } if (CONFIGURABLE_LENGTH && options && hasOwn$f(options, 'arity') && value.length !== options.arity) { defineProperty$8(value, 'length', { value: options.arity }); } try { if (options && hasOwn$f(options, 'constructor') && options.constructor) { if (DESCRIPTORS$f) defineProperty$8(value, 'prototype', { writable: false }); // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable } else if (value.prototype) value.prototype = undefined; } catch (error) { /* empty */ } var state = enforceInternalState$2(value); if (!hasOwn$f(state, 'source')) { state.source = join(TEMPLATE, typeof name == 'string' ? name : ''); } return value; }; // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative // eslint-disable-next-line no-extend-native -- required Function.prototype.toString = makeBuiltIn$2(function toString() { return isCallable$i(this) && getInternalState$4(this).source || inspectSource$2(this); }, 'toString'); var makeBuiltInExports = makeBuiltIn$3.exports; var makeBuiltIn$1 = makeBuiltInExports; var defineProperty$7 = objectDefineProperty; var defineBuiltInAccessor$5 = function (target, name, descriptor) { if (descriptor.get) makeBuiltIn$1(descriptor.get, name, { getter: true }); if (descriptor.set) makeBuiltIn$1(descriptor.set, name, { setter: true }); return defineProperty$7.f(target, name, descriptor); }; var DESCRIPTORS$e = descriptors; var FUNCTION_NAME_EXISTS = functionName.EXISTS; var uncurryThis$t = functionUncurryThis; var defineBuiltInAccessor$4 = defineBuiltInAccessor$5; var FunctionPrototype$1 = Function.prototype; var functionToString = uncurryThis$t(FunctionPrototype$1.toString); var nameRE = /function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/; var regExpExec$4 = uncurryThis$t(nameRE.exec); var NAME = 'name'; // Function instances `.name` property // https://tc39.es/ecma262/#sec-function-instances-name if (DESCRIPTORS$e && !FUNCTION_NAME_EXISTS) { defineBuiltInAccessor$4(FunctionPrototype$1, NAME, { configurable: true, get: function () { try { return regExpExec$4(nameRE, functionToString(this))[1]; } catch (error) { return ''; } } }); } var objectGetOwnPropertyDescriptor = {}; var objectPropertyIsEnumerable = {}; var $propertyIsEnumerable$2 = {}.propertyIsEnumerable; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var getOwnPropertyDescriptor$4 = Object.getOwnPropertyDescriptor; // Nashorn ~ JDK8 bug var NASHORN_BUG = getOwnPropertyDescriptor$4 && !$propertyIsEnumerable$2.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$4(this, V); return !!descriptor && descriptor.enumerable; } : $propertyIsEnumerable$2; var uncurryThis$s = functionUncurryThis; var toString$g = uncurryThis$s({}.toString); var stringSlice$7 = uncurryThis$s(''.slice); var classofRaw$2 = function (it) { return stringSlice$7(toString$g(it), 8, -1); }; var uncurryThis$r = functionUncurryThis; var fails$u = fails$B; var classof$c = classofRaw$2; var $Object$3 = Object; var split = uncurryThis$r(''.split); // fallback for non-array-like ES3 and non-enumerable old V8 strings var indexedObject = fails$u(function () { // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 // eslint-disable-next-line no-prototype-builtins -- safe return !$Object$3('z').propertyIsEnumerable(0); }) ? function (it) { return classof$c(it) === 'String' ? split(it, '') : $Object$3(it); } : $Object$3; // toObject with fallback for non-array-like ES3 strings var IndexedObject$3 = indexedObject; var requireObjectCoercible$8 = requireObjectCoercible$a; var toIndexedObject$b = function (it) { return IndexedObject$3(requireObjectCoercible$8(it)); }; var DESCRIPTORS$d = descriptors; var call$k = functionCall; var propertyIsEnumerableModule$2 = objectPropertyIsEnumerable; var createPropertyDescriptor$3 = createPropertyDescriptor$5; var toIndexedObject$a = toIndexedObject$b; var toPropertyKey$1 = toPropertyKey$3; var hasOwn$e = hasOwnProperty_1; var IE8_DOM_DEFINE = 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$d ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) { O = toIndexedObject$a(O); P = toPropertyKey$1(P); if (IE8_DOM_DEFINE) try { return $getOwnPropertyDescriptor$1(O, P); } catch (error) { /* empty */ } if (hasOwn$e(O, P)) return createPropertyDescriptor$3(!call$k(propertyIsEnumerableModule$2.f, O, P), O[P]); }; var isCallable$h = isCallable$q; var definePropertyModule$4 = objectDefineProperty; var makeBuiltIn = makeBuiltInExports; var defineGlobalProperty$1 = defineGlobalProperty$3; var defineBuiltIn$d = function (O, key, value, options) { if (!options) options = {}; var simple = options.enumerable; var name = options.name !== undefined ? options.name : key; if (isCallable$h(value)) makeBuiltIn(value, name, options); if (options.global) { if (simple) O[key] = value; else defineGlobalProperty$1(key, value); } else { try { if (!options.unsafe) delete O[key]; else if (O[key]) simple = true; } catch (error) { /* empty */ } if (simple) O[key] = value; else definePropertyModule$4.f(O, key, { value: value, enumerable: false, configurable: !options.nonConfigurable, writable: !options.nonWritable }); } return O; }; var objectGetOwnPropertyNames = {}; var ceil = Math.ceil; var floor$1 = 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$1 : ceil)(n); }; var trunc = mathTrunc; // `ToIntegerOrInfinity` abstract operation // https://tc39.es/ecma262/#sec-tointegerorinfinity var toIntegerOrInfinity$6 = function (argument) { var number = +argument; // eslint-disable-next-line no-self-compare -- NaN check return number !== number || number === 0 ? 0 : trunc(number); }; var toIntegerOrInfinity$5 = toIntegerOrInfinity$6; var max$3 = Math.max; var min$5 = 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$3 = function (index, length) { var integer = toIntegerOrInfinity$5(index); return integer < 0 ? max$3(integer + length, 0) : min$5(integer, length); }; var toIntegerOrInfinity$4 = toIntegerOrInfinity$6; var min$4 = Math.min; // `ToLength` abstract operation // https://tc39.es/ecma262/#sec-tolength var toLength$5 = function (argument) { var len = toIntegerOrInfinity$4(argument); return len > 0 ? min$4(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 }; var toLength$4 = toLength$5; // `LengthOfArrayLike` abstract operation // https://tc39.es/ecma262/#sec-lengthofarraylike var lengthOfArrayLike$8 = function (obj) { return toLength$4(obj.length); }; var toIndexedObject$9 = toIndexedObject$b; var toAbsoluteIndex$2 = toAbsoluteIndex$3; var lengthOfArrayLike$7 = lengthOfArrayLike$8; // `Array.prototype.{ indexOf, includes }` methods implementation var createMethod$4 = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIndexedObject$9($this); var length = lengthOfArrayLike$7(O); if (length === 0) return !IS_INCLUDES && -1; var index = toAbsoluteIndex$2(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$4(true), // `Array.prototype.indexOf` method // https://tc39.es/ecma262/#sec-array.prototype.indexof indexOf: createMethod$4(false) }; var uncurryThis$q = functionUncurryThis; var hasOwn$d = hasOwnProperty_1; var toIndexedObject$8 = toIndexedObject$b; var indexOf$1 = arrayIncludes.indexOf; var hiddenKeys$4 = hiddenKeys$6; var push$6 = uncurryThis$q([].push); var objectKeysInternal = function (object, names) { var O = toIndexedObject$8(object); var i = 0; var result = []; var key; for (key in O) !hasOwn$d(hiddenKeys$4, key) && hasOwn$d(O, key) && push$6(result, key); // Don't enum bug & hidden keys while (names.length > i) if (hasOwn$d(O, key = names[i++])) { ~indexOf$1(result, key) || push$6(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; var hiddenKeys$3 = enumBugKeys$2.concat('length', 'prototype'); // `Object.getOwnPropertyNames` method // https://tc39.es/ecma262/#sec-object.getownpropertynames // eslint-disable-next-line es/no-object-getownpropertynames -- safe objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { return internalObjectKeys$1(O, hiddenKeys$3); }; var objectGetOwnPropertySymbols = {}; // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols; var getBuiltIn$8 = getBuiltIn$a; var uncurryThis$p = functionUncurryThis; var getOwnPropertyNamesModule$2 = objectGetOwnPropertyNames; var getOwnPropertySymbolsModule$3 = objectGetOwnPropertySymbols; var anObject$g = anObject$i; var concat$2 = uncurryThis$p([].concat); // all object keys, includes non-enumerable and symbols var ownKeys$1 = getBuiltIn$8('Reflect', 'ownKeys') || function ownKeys(it) { var keys = getOwnPropertyNamesModule$2.f(anObject$g(it)); var getOwnPropertySymbols = getOwnPropertySymbolsModule$3.f; return getOwnPropertySymbols ? concat$2(keys, getOwnPropertySymbols(it)) : keys; }; var hasOwn$c = hasOwnProperty_1; var ownKeys = ownKeys$1; var getOwnPropertyDescriptorModule$1 = objectGetOwnPropertyDescriptor; var definePropertyModule$3 = objectDefineProperty; var copyConstructorProperties$2 = function (target, source, exceptions) { var keys = ownKeys(source); var defineProperty = definePropertyModule$3.f; var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule$1.f; for (var i = 0; i < keys.length; i++) { var key = keys[i]; if (!hasOwn$c(target, key) && !(exceptions && hasOwn$c(exceptions, key))) { defineProperty(target, key, getOwnPropertyDescriptor(source, key)); } } }; var fails$t = fails$B; var isCallable$g = isCallable$q; var replacement = /#|\.prototype\./; var isForced$4 = function (feature, detection) { var value = data[normalize(feature)]; return value === POLYFILL ? true : value === NATIVE ? false : isCallable$g(detection) ? fails$t(detection) : !!detection; }; var normalize = isForced$4.normalize = function (string) { return String(string).replace(replacement, '.').toLowerCase(); }; var data = isForced$4.data = {}; var NATIVE = isForced$4.NATIVE = 'N'; var POLYFILL = isForced$4.POLYFILL = 'P'; var isForced_1 = isForced$4; var globalThis$j = globalThis_1; var getOwnPropertyDescriptor$3 = objectGetOwnPropertyDescriptor.f; var createNonEnumerableProperty$5 = createNonEnumerableProperty$7; var defineBuiltIn$c = defineBuiltIn$d; var defineGlobalProperty = defineGlobalProperty$3; var copyConstructorProperties$1 = copyConstructorProperties$2; var isForced$3 = isForced_1; /* 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 FORCED, target, key, targetProperty, sourceProperty, descriptor; if (GLOBAL) { target = globalThis$j; } else if (STATIC) { target = globalThis$j[TARGET] || defineGlobalProperty(TARGET, {}); } else { target = globalThis$j[TARGET] && globalThis$j[TARGET].prototype; } if (target) for (key in source) { sourceProperty = source[key]; if (options.dontCallGetSet) { descriptor = getOwnPropertyDescriptor$3(target, key); targetProperty = descriptor && descriptor.value; } else targetProperty = target[key]; FORCED = isForced$3(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); // contained in target if (!FORCED && targetProperty !== undefined) { if (typeof sourceProperty == typeof targetProperty) continue; copyConstructorProperties$1(sourceProperty, targetProperty); } // add a flag to not completely full polyfills if (options.sham || (targetProperty && targetProperty.sham)) { createNonEnumerableProperty$5(sourceProperty, 'sham', true); } defineBuiltIn$c(target, key, sourceProperty, options); } }; var internalObjectKeys = objectKeysInternal; var enumBugKeys$1 = enumBugKeys$3; // `Object.keys` method // https://tc39.es/ecma262/#sec-object.keys // eslint-disable-next-line es/no-object-keys -- safe var objectKeys$4 = Object.keys || function keys(O) { return internalObjectKeys(O, enumBugKeys$1); }; var $$u = _export; var toObject$8 = toObject$a; var nativeKeys = objectKeys$4; var fails$s = fails$B; var FAILS_ON_PRIMITIVES$2 = fails$s(function () { nativeKeys(1); }); // `Object.keys` method // https://tc39.es/ecma262/#sec-object.keys $$u({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$2 }, { keys: function keys(it) { return nativeKeys(toObject$8(it)); } }); var uncurryThis$o = functionUncurryThis; var aCallable$6 = aCallable$8; var functionUncurryThisAccessor = function (object, key, method) { try { // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe return uncurryThis$o(aCallable$6(Object.getOwnPropertyDescriptor(object, key)[method])); } catch (error) { /* empty */ } }; var isObject$g = isObject$m; var isPossiblePrototype$1 = function (argument) { return isObject$g(argument) || argument === null; }; var isPossiblePrototype = isPossiblePrototype$1; var $String$2 = String; var $TypeError$b = TypeError; var aPossiblePrototype$1 = function (argument) { if (isPossiblePrototype(argument)) return argument; throw new $TypeError$b("Can't set " + $String$2(argument) + ' as a prototype'); }; /* eslint-disable no-proto -- safe */ var uncurryThisAccessor = functionUncurryThisAccessor; var isObject$f = isObject$m; var requireObjectCoercible$7 = requireObjectCoercible$a; 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) { r