UNPKG

web-performance-tracer

Version:

网页性能监控 18 项数据指标,浏览器信息,错误收集上报方案,前端工程化。

1,634 lines (1,257 loc) 203 kB
(function (factory) { typeof define === 'function' && define.amd ? define(factory) : factory(); })((function () { 'use strict'; var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; function createCommonjsModule(fn, basedir, module) { return module = { path: basedir, exports: {}, require: function (path, base) { return commonjsRequire(path, (base === undefined || base === null) ? module.path : base); } }, fn(module, module.exports), module.exports; } function commonjsRequire () { throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs'); } var check = function (it) { return it && it.Math === Math && it; }; // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global_1 = // eslint-disable-next-line es/no-global-this -- safe check(typeof globalThis == 'object' && globalThis) || check(typeof window == 'object' && window) || // eslint-disable-next-line no-restricted-globals -- safe check(typeof self == 'object' && self) || check(typeof commonjsGlobal == 'object' && commonjsGlobal) || check(typeof commonjsGlobal == 'object' && commonjsGlobal) || // eslint-disable-next-line no-new-func -- fallback (function () { return this; })() || Function('return this')(); var isPure = true; var global$1 = global_1; // eslint-disable-next-line es/no-object-defineproperty -- safe var defineProperty$a = Object.defineProperty; var defineGlobalProperty$1 = function (key, value) { try { defineProperty$a(global$1, key, { value: value, configurable: true, writable: true }); } catch (error) { global$1[key] = value; } return value; }; var IS_PURE = isPure; var defineGlobalProperty = defineGlobalProperty$1; var sharedStore = createCommonjsModule(function (module) { var SHARED = '__core-js_shared__'; var store = module.exports = global$1[SHARED] || defineGlobalProperty(SHARED, {}); (store.versions || (store.versions = [])).push({ version: '3.37.0', mode: IS_PURE ? 'pure' : 'global', copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)', license: 'https://github.com/zloirock/core-js/blob/v3.37.0/LICENSE', source: 'https://github.com/zloirock/core-js' }); }); var shared$2 = sharedStore; var shared$1 = function (key, value) { return shared$2[key] || (shared$2[key] = value || {}); }; var fails$1 = function (exec) { try { return !!exec(); } catch (error) { return true; } }; var fails = fails$1; var functionBindNative = !fails(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 = functionBindNative; var FunctionPrototype$3 = Function.prototype; var call$3 = FunctionPrototype$3.call; var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype$3.bind.bind(call$3, call$3); var functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) { return function () { return call$3.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$1 = function (it) { return it === null || it === undefined; }; var isNullOrUndefined = isNullOrUndefined$1; var $TypeError$a = TypeError; // `RequireObjectCoercible` abstract operation // https://tc39.es/ecma262/#sec-requireobjectcoercible var requireObjectCoercible$1 = function (it) { if (isNullOrUndefined(it)) throw new $TypeError$a("Can't call method on " + it); return it; }; var requireObjectCoercible = requireObjectCoercible$1; var $Object$4 = Object; // `ToObject` abstract operation // https://tc39.es/ecma262/#sec-toobject var toObject$1 = function (argument) { return $Object$4(requireObjectCoercible(argument)); }; var uncurryThis$1 = functionUncurryThis; var toObject = toObject$1; var hasOwnProperty = uncurryThis$1({}.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(it), key); }; var id = 0; var postfix = Math.random(); var toString$3 = uncurryThis$1(1.0.toString); var uid$1 = function (key) { return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$3(++id + postfix, 36); }; var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || ''; var USER_AGENT = engineUserAgent; var process = global$1.process; var Deno = global$1.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 && USER_AGENT) { match = USER_AGENT.match(/Edge\/(\d+)/); if (!match || match[1] >= 74) { match = USER_AGENT.match(/Chrome\/(\d+)/); if (match) version = +match[1]; } } var engineV8Version = version; var V8_VERSION = engineV8Version; /* eslint-disable es/no-symbol -- required for testing */ var $String$5 = global$1.String; // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails(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 && V8_VERSION < 41; }); var NATIVE_SYMBOL = symbolConstructorDetection; /* eslint-disable es/no-symbol -- required for testing */ var useSymbolAsUid = NATIVE_SYMBOL && !Symbol.sham && typeof Symbol.iterator == 'symbol'; var shared = shared$1; var hasOwn = hasOwnProperty_1; var uid = uid$1; var USE_SYMBOL_AS_UID = useSymbolAsUid; var Symbol$3 = global$1.Symbol; var WellKnownSymbolsStore$2 = shared('wks'); var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$3['for'] || Symbol$3 : Symbol$3 && Symbol$3.withoutSetter || uid; var wellKnownSymbol$1 = function (name) { if (!hasOwn(WellKnownSymbolsStore$2, name)) { WellKnownSymbolsStore$2[name] = NATIVE_SYMBOL && hasOwn(Symbol$3, name) ? Symbol$3[name] : createWellKnownSymbol('Symbol.' + name); } return WellKnownSymbolsStore$2[name]; }; var wellKnownSymbol = wellKnownSymbol$1; var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag'); var test = {}; test[TO_STRING_TAG$2] = 'z'; var toStringTagSupport = String(test) === '[object z]'; // 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$1 = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) { return typeof argument == 'function' || argument === documentAll; } : function (argument) { return typeof argument == 'function'; }; var toString$2 = uncurryThis$1({}.toString); var stringSlice$2 = uncurryThis$1(''.slice); var classofRaw = function (it) { return stringSlice$2(toString$2(it), 8, -1); }; var TO_STRING_TAG_SUPPORT = toStringTagSupport; var isCallable = isCallable$1; var classof$2 = classofRaw; var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag'); var $Object$3 = Object; // ES3 wrong here var CORRECT_ARGUMENTS = classof$2(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$1 = TO_STRING_TAG_SUPPORT ? classof$2 : function (it) { var O, tag, result; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (tag = tryGet(O = $Object$3(it), TO_STRING_TAG$1)) == 'string' ? tag // builtinTag case : CORRECT_ARGUMENTS ? classof$2(O) // ES3 arguments fallback : (result = classof$2(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result; }; var objectIsPrototypeOf = uncurryThis$1({}.isPrototypeOf); var FunctionPrototype$2 = Function.prototype; var apply$1 = FunctionPrototype$2.apply; var call$2 = FunctionPrototype$2.call; // eslint-disable-next-line es/no-reflect -- safe var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$2.bind(apply$1) : function () { return call$2.apply(apply$1, arguments); }); var functionUncurryThisClause = function (fn) { // Nashorn bug: // https://github.com/zloirock/core-js/issues/1128 // https://github.com/zloirock/core-js/issues/1130 if (classof$2(fn) === 'Function') return uncurryThis$1(fn); }; // Detect IE8's incomplete defineProperty implementation var descriptors = !fails(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7; }); var call$1 = Function.prototype.call; var functionCall = NATIVE_BIND ? call$1.bind(call$1) : function () { return call$1.apply(call$1, arguments); }; var $propertyIsEnumerable$1 = {}.propertyIsEnumerable; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var getOwnPropertyDescriptor$6 = Object.getOwnPropertyDescriptor; // Nashorn ~ JDK8 bug var NASHORN_BUG = getOwnPropertyDescriptor$6 && !$propertyIsEnumerable$1.call({ 1: 2 }, 1); // `Object.prototype.propertyIsEnumerable` method implementation // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable var f$7 = NASHORN_BUG ? function propertyIsEnumerable(V) { var descriptor = getOwnPropertyDescriptor$6(this, V); return !!descriptor && descriptor.enumerable; } : $propertyIsEnumerable$1; var objectPropertyIsEnumerable = { f: f$7 }; var createPropertyDescriptor$1 = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; var $Object$2 = Object; var split = uncurryThis$1(''.split); // fallback for non-array-like ES3 and non-enumerable old V8 strings var indexedObject = fails(function () { // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 // eslint-disable-next-line no-prototype-builtins -- safe return !$Object$2('z').propertyIsEnumerable(0); }) ? function (it) { return classof$2(it) === 'String' ? split(it, '') : $Object$2(it); } : $Object$2; var IndexedObject = indexedObject; // toObject with fallback for non-array-like ES3 strings var toIndexedObject$1 = function (it) { return IndexedObject(requireObjectCoercible(it)); }; var isObject$1 = function (it) { return typeof it == 'object' ? it !== null : isCallable(it); }; var path$1 = {}; var path = path$1; var aFunction = function (variable) { return isCallable(variable) ? variable : undefined; }; var getBuiltIn$1 = function (namespace, method) { return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global$1[namespace]) : path[namespace] && path[namespace][method] || global$1[namespace] && global$1[namespace][method]; }; var getBuiltIn = getBuiltIn$1; var isPrototypeOf = objectIsPrototypeOf; var $Object$1 = Object; var isSymbol$1 = USE_SYMBOL_AS_UID ? function (it) { return typeof it == 'symbol'; } : function (it) { var $Symbol = getBuiltIn('Symbol'); return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object$1(it)); }; var $String$4 = String; var tryToString$1 = function (argument) { try { return $String$4(argument); } catch (error) { return 'Object'; } }; var tryToString = tryToString$1; var $TypeError$9 = TypeError; // `Assert: IsCallable(argument) is true` var aCallable$1 = function (argument) { if (isCallable(argument)) return argument; throw new $TypeError$9(tryToString(argument) + ' is not a function'); }; var aCallable = aCallable$1; // `GetMethod` abstract operation // https://tc39.es/ecma262/#sec-getmethod var getMethod$1 = function (V, P) { var func = V[P]; return isNullOrUndefined(func) ? undefined : aCallable(func); }; var call = functionCall; var isObject = isObject$1; var $TypeError$8 = TypeError; // `OrdinaryToPrimitive` abstract operation // https://tc39.es/ecma262/#sec-ordinarytoprimitive var ordinaryToPrimitive$1 = function (input, pref) { var fn, val; if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val; if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val; if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val; throw new $TypeError$8("Can't convert object to primitive value"); }; var isSymbol = isSymbol$1; var getMethod = getMethod$1; var ordinaryToPrimitive = ordinaryToPrimitive$1; var $TypeError$7 = TypeError; var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); // `ToPrimitive` abstract operation // https://tc39.es/ecma262/#sec-toprimitive var toPrimitive$7 = function (input, pref) { if (!isObject(input) || isSymbol(input)) return input; var exoticToPrim = getMethod(input, TO_PRIMITIVE); var result; if (exoticToPrim) { if (pref === undefined) pref = 'default'; result = call(exoticToPrim, input, pref); if (!isObject(result) || isSymbol(result)) return result; throw new $TypeError$7("Can't convert object to primitive value"); } if (pref === undefined) pref = 'number'; return ordinaryToPrimitive(input, pref); }; var toPrimitive$6 = toPrimitive$7; // `ToPropertyKey` abstract operation // https://tc39.es/ecma262/#sec-topropertykey var toPropertyKey$2 = function (argument) { var key = toPrimitive$6(argument, 'string'); return isSymbol(key) ? key : key + ''; }; var document$1 = global$1.document; // typeof document.createElement is 'object' in old IE var EXISTS$1 = isObject(document$1) && isObject(document$1.createElement); var documentCreateElement$1 = function (it) { return EXISTS$1 ? document$1.createElement(it) : {}; }; var DESCRIPTORS = descriptors; var documentCreateElement = documentCreateElement$1; // Thanks to IE8 for its funny defineProperty var ie8DomDefine = !DESCRIPTORS && !fails(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty(documentCreateElement('div'), 'a', { get: function () { return 7; } }).a !== 7; }); var propertyIsEnumerableModule = objectPropertyIsEnumerable; var createPropertyDescriptor = createPropertyDescriptor$1; var toIndexedObject = toIndexedObject$1; var toPropertyKey$1 = toPropertyKey$2; var IE8_DOM_DEFINE = ie8DomDefine; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var $getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor; // `Object.getOwnPropertyDescriptor` method // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor var f$6 = DESCRIPTORS ? $getOwnPropertyDescriptor$2 : function getOwnPropertyDescriptor(O, P) { O = toIndexedObject(O); P = toPropertyKey$1(P); if (IE8_DOM_DEFINE) try { return $getOwnPropertyDescriptor$2(O, P); } catch (error) { /* empty */ } if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]); }; var objectGetOwnPropertyDescriptor = { f: f$6 }; var replacement = /#|\.prototype\./; var isForced$1 = function (feature, detection) { var value = data[normalize(feature)]; return value === POLYFILL ? true : value === NATIVE ? false : isCallable(detection) ? fails(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 = functionUncurryThisClause; var bind$1 = uncurryThis(uncurryThis.bind); // optional / simple context binding var functionBindContext = function (fn, that) { aCallable(fn); return that === undefined ? fn : NATIVE_BIND ? bind$1(fn, that) : function (/* ...args */) { return fn.apply(that, arguments); }; }; // V8 ~ Chrome 36- // https://bugs.chromium.org/p/v8/issues/detail?id=3334 var v8PrototypeDefineBug = DESCRIPTORS && fails(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty(function () { /* empty */ }, 'prototype', { value: 42, writable: false }).prototype !== 42; }); var $String$3 = String; var $TypeError$6 = TypeError; // `Assert: Type(argument) is Object` var anObject$1 = function (argument) { if (isObject(argument)) return argument; throw new $TypeError$6($String$3(argument) + ' is not an object'); }; var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug; var anObject = anObject$1; var $TypeError$5 = TypeError; // eslint-disable-next-line es/no-object-defineproperty -- safe var $defineProperty$1 = Object.defineProperty; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor; var ENUMERABLE = 'enumerable'; var CONFIGURABLE$1 = 'configurable'; var WRITABLE = 'writable'; // `Object.defineProperty` method // https://tc39.es/ecma262/#sec-object.defineproperty var f$5 = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) { anObject(O); P = toPropertyKey$1(P); anObject(Attributes); if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) { var current = $getOwnPropertyDescriptor$1(O, P); if (current && current[WRITABLE]) { O[P] = Attributes.value; Attributes = { configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1], enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE], writable: false }; } } return $defineProperty$1(O, P, Attributes); } : $defineProperty$1 : function defineProperty(O, P, Attributes) { anObject(O); P = toPropertyKey$1(P); anObject(Attributes); if (IE8_DOM_DEFINE) try { return $defineProperty$1(O, P, Attributes); } catch (error) { /* empty */ } if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$5('Accessors not supported'); if ('value' in Attributes) O[P] = Attributes.value; return O; }; var objectDefineProperty = { f: f$5 }; var require$$0$H = objectDefineProperty; var createNonEnumerableProperty$1 = DESCRIPTORS ? function (object, key, value) { return require$$0$H.f(object, key, createPropertyDescriptor(1, value)); } : function (object, key, value) { object[key] = value; return object; }; var apply = functionApply; var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor; var isForced = isForced_1; var bind = functionBindContext; var createNonEnumerableProperty = createNonEnumerableProperty$1; var getOwnPropertyDescriptor$5 = getOwnPropertyDescriptorModule.f; // 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 ? global$1 : STATIC ? global$1[TARGET] : global$1[TARGET] && global$1[TARGET].prototype; var target = GLOBAL ? path : path[TARGET] || createNonEnumerableProperty(path, 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(nativeSource, key); targetProperty = target[key]; if (USE_NATIVE) if (options.dontCallGetSet) { descriptor = getOwnPropertyDescriptor$5(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(sourceProperty, global$1); // 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(sourceProperty)) resultProperty = uncurryThis(sourceProperty); // default case else resultProperty = sourceProperty; // add a flag to not completely full polyfills if (options.sham || (sourceProperty && sourceProperty.sham) || (targetProperty && targetProperty.sham)) { createNonEnumerableProperty(resultProperty, 'sham', true); } createNonEnumerableProperty(target, key, resultProperty); if (PROTO) { VIRTUAL_PROTOTYPE = TARGET + 'Prototype'; if (!hasOwn(path, VIRTUAL_PROTOTYPE)) { createNonEnumerableProperty(path, VIRTUAL_PROTOTYPE, {}); } // export virtual prototype methods createNonEnumerableProperty(path[VIRTUAL_PROTOTYPE], key, sourceProperty); // export real prototype methods if (options.real && targetPrototype && (FORCED || !targetPrototype[key])) { createNonEnumerableProperty(targetPrototype, key, sourceProperty); } } } }; var ceil$1 = Math.ceil; var floor = 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 : ceil$1)(n); }; var trunc = mathTrunc; // `ToIntegerOrInfinity` abstract operation // https://tc39.es/ecma262/#sec-tointegerorinfinity var toIntegerOrInfinity$1 = function (argument) { var number = +argument; // eslint-disable-next-line no-self-compare -- NaN check return number !== number || number === 0 ? 0 : trunc(number); }; var toIntegerOrInfinity = toIntegerOrInfinity$1; var min$1 = Math.min; // `ToLength` abstract operation // https://tc39.es/ecma262/#sec-tolength var toLength$1 = function (argument) { var len = toIntegerOrInfinity(argument); return len > 0 ? min$1(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 }; var toLength = toLength$1; // `LengthOfArrayLike` abstract operation // https://tc39.es/ecma262/#sec-lengthofarraylike var lengthOfArrayLike$1 = function (obj) { return toLength(obj.length); }; // `IsArray` abstract operation // https://tc39.es/ecma262/#sec-isarray // eslint-disable-next-line es/no-array-isarray -- safe var isArray$7 = Array.isArray || function isArray(argument) { return classof$2(argument) === 'Array'; }; var functionToString = uncurryThis$1(Function.toString); // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper if (!isCallable(shared$2.inspectSource)) { shared$2.inspectSource = function (it) { return functionToString(it); }; } var inspectSource$1 = shared$2.inspectSource; var classof = classof$1; var inspectSource = inspectSource$1; var noop = function () { /* empty */ }; var construct = getBuiltIn('Reflect', 'construct'); var constructorRegExp = /^\s*(?:class|function)\b/; var exec$1 = uncurryThis$1(constructorRegExp.exec); var INCORRECT_TO_STRING = !constructorRegExp.test(noop); var isConstructorModern = function isConstructor(argument) { if (!isCallable(argument)) return false; try { construct(noop, [], argument); return true; } catch (error) { return false; } }; var isConstructorLegacy = function isConstructor(argument) { if (!isCallable(argument)) return false; switch (classof(argument)) { case 'AsyncFunction': case 'GeneratorFunction': case 'AsyncGeneratorFunction': return false; } try { // we can't check .prototype since constructors produced by .bind haven't it // `Function#toString` throws on some built-it function in some legacy engines // (for example, `DOMQuad` and similar in FF41-) return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource(argument)); } catch (error) { return true; } }; isConstructorLegacy.sham = true; // `IsConstructor` abstract operation // https://tc39.es/ecma262/#sec-isconstructor var isConstructor$1 = !construct || fails(function () { var called; return isConstructorModern(isConstructorModern.call) || !isConstructorModern(Object) || !isConstructorModern(function () { called = true; }) || called; }) ? isConstructorLegacy : isConstructorModern; var isArray$6 = isArray$7; var isConstructor = isConstructor$1; var SPECIES$2 = wellKnownSymbol('species'); var $Array$2 = Array; // a part of `ArraySpeciesCreate` abstract operation // https://tc39.es/ecma262/#sec-arrayspeciescreate var arraySpeciesConstructor$1 = function (originalArray) { var C; if (isArray$6(originalArray)) { C = originalArray.constructor; // cross-realm fallback if (isConstructor(C) && (C === $Array$2 || isArray$6(C.prototype))) C = undefined; else if (isObject(C)) { C = C[SPECIES$2]; if (C === null) C = undefined; } } return C === undefined ? $Array$2 : C; }; var arraySpeciesConstructor = arraySpeciesConstructor$1; // `ArraySpeciesCreate` abstract operation // https://tc39.es/ecma262/#sec-arrayspeciescreate var arraySpeciesCreate$1 = function (originalArray, length) { return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length); }; var lengthOfArrayLike = lengthOfArrayLike$1; var arraySpeciesCreate = arraySpeciesCreate$1; var push$3 = uncurryThis$1([].push); // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation var createMethod$3 = function (TYPE) { var IS_MAP = TYPE === 1; var IS_FILTER = TYPE === 2; var IS_SOME = TYPE === 3; var IS_EVERY = TYPE === 4; var IS_FIND_INDEX = TYPE === 6; var IS_FILTER_REJECT = TYPE === 7; var NO_HOLES = TYPE === 5 || IS_FIND_INDEX; return function ($this, callbackfn, that, specificCreate) { var O = toObject($this); var self = IndexedObject(O); var length = lengthOfArrayLike(self); var boundFunction = bind(callbackfn, that); var index = 0; var create = specificCreate || arraySpeciesCreate; var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined; var value, result; for (;length > index; index++) if (NO_HOLES || index in self) { value = self[index]; result = boundFunction(value, index, O); if (TYPE) { if (IS_MAP) target[index] = result; // map else if (result) switch (TYPE) { case 3: return true; // some case 5: return value; // find case 6: return index; // findIndex case 2: push$3(target, value); // filter } else switch (TYPE) { case 4: return false; // every case 7: push$3(target, value); // filterReject } } } return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target; }; }; var arrayIteration = { // `Array.prototype.forEach` method // https://tc39.es/ecma262/#sec-array.prototype.foreach forEach: createMethod$3(0), // `Array.prototype.map` method // https://tc39.es/ecma262/#sec-array.prototype.map map: createMethod$3(1), // `Array.prototype.filter` method // https://tc39.es/ecma262/#sec-array.prototype.filter filter: createMethod$3(2), // `Array.prototype.some` method // https://tc39.es/ecma262/#sec-array.prototype.some some: createMethod$3(3), // `Array.prototype.every` method // https://tc39.es/ecma262/#sec-array.prototype.every every: createMethod$3(4), // `Array.prototype.find` method // https://tc39.es/ecma262/#sec-array.prototype.find find: createMethod$3(5), // `Array.prototype.findIndex` method // https://tc39.es/ecma262/#sec-array.prototype.findIndex findIndex: createMethod$3(6), // `Array.prototype.filterReject` method // https://github.com/tc39/proposal-array-filtering filterReject: createMethod$3(7) }; var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) { var method = [][METHOD_NAME]; return !!method && fails(function () { // eslint-disable-next-line no-useless-call -- required for testing method.call(null, argument || function () { return 1; }, 1); }); }; var require$$0$G = arrayIteration; var arrayMethodIsStrict = arrayMethodIsStrict$1; var $forEach$1 = require$$0$G.forEach; var STRICT_METHOD = arrayMethodIsStrict('forEach'); // `Array.prototype.forEach` method implementation // https://tc39.es/ecma262/#sec-array.prototype.foreach var arrayForEach = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) { return $forEach$1(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); // eslint-disable-next-line es/no-array-prototype-foreach -- safe } : [].forEach; var $ = _export; var forEach$7 = arrayForEach; // `Array.prototype.forEach` method // https://tc39.es/ecma262/#sec-array.prototype.foreach // eslint-disable-next-line es/no-array-prototype-foreach -- safe $({ target: 'Array', proto: true, forced: [].forEach !== forEach$7 }, { forEach: forEach$7 }); var getBuiltInPrototypeMethod$1 = function (CONSTRUCTOR, METHOD) { var Namespace = path[CONSTRUCTOR + 'Prototype']; var pureMethod = Namespace && Namespace[METHOD]; if (pureMethod) return pureMethod; var NativeConstructor = global$1[CONSTRUCTOR]; var NativePrototype = NativeConstructor && NativeConstructor.prototype; return NativePrototype && NativePrototype[METHOD]; }; var getBuiltInPrototypeMethod = getBuiltInPrototypeMethod$1; var forEach$6 = getBuiltInPrototypeMethod('Array', 'forEach'); var parent$Y = forEach$6; var forEach$5 = parent$Y; var method$4 = forEach$5; var ArrayPrototype$6 = Array.prototype; var DOMIterables$1 = { DOMTokenList: true, NodeList: true }; var forEach$4 = function (it) { var own = it.forEach; return it === ArrayPrototype$6 || (isPrototypeOf(ArrayPrototype$6, it) && own === ArrayPrototype$6.forEach) || hasOwn(DOMIterables$1, classof(it)) ? method$4 : own; }; var parent$X = forEach$4; var forEach$3 = parent$X; var parent$W = forEach$3; var forEach$2 = parent$W; var require$$0$F = forEach$2; var forEach$1 = require$$0$F; var require$$0$E = forEach$1; var forEach = require$$0$E; /** * 记录最后一次鼠标事件 */ function recordLastEvent() { var _context; forEach(_context = ['click', 'touchstart', 'mousedown', 'keydown', 'mouseover']).call(_context, function (eventType) { document.addEventListener(eventType, function (event) { window._lastEvent = event; }, { capture: true, // 捕获阶段 passive: true // 默认不阻止默认事件 }); }); } var $TypeError$4 = TypeError; var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991 var doesNotExceedSafeInteger$1 = function (it) { if (it > MAX_SAFE_INTEGER) throw $TypeError$4('Maximum allowed index exceeded'); return it; }; var createProperty$1 = function (object, key, value) { if (DESCRIPTORS) require$$0$H.f(object, key, createPropertyDescriptor(0, value)); else object[key] = value; }; var SPECIES$1 = wellKnownSymbol('species'); var arrayMethodHasSpeciesSupport$1 = function (METHOD_NAME) { // We can't use this feature detection in V8 since it causes // deoptimization and serious performance degradation // https://github.com/zloirock/core-js/issues/677 return V8_VERSION >= 51 || !fails(function () { var array = []; var constructor = array.constructor = {}; constructor[SPECIES$1] = function () { return { foo: 1 }; }; return array[METHOD_NAME](Boolean).foo !== 1; }); }; var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1; var createProperty = createProperty$1; var arrayMethodHasSpeciesSupport = arrayMethodHasSpeciesSupport$1; var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable'); // We can't use this feature detection in V8 since it causes // deoptimization and serious performance degradation // https://github.com/zloirock/core-js/issues/679 var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () { var array = []; array[IS_CONCAT_SPREADABLE] = false; return array.concat()[0] !== array; }); var isConcatSpreadable = function (O) { if (!isObject(O)) return false; var spreadable = O[IS_CONCAT_SPREADABLE]; return spreadable !== undefined ? !!spreadable : isArray$6(O); }; var FORCED$3 = !IS_CONCAT_SPREADABLE_SUPPORT || !arrayMethodHasSpeciesSupport('concat'); // `Array.prototype.concat` method // https://tc39.es/ecma262/#sec-array.prototype.concat // with adding support of @@isConcatSpreadable and @@species $({ target: 'Array', proto: true, arity: 1, forced: FORCED$3 }, { // eslint-disable-next-line no-unused-vars -- required for `.length` concat: function concat(arg) { var O = toObject(this); var A = arraySpeciesCreate(O, 0); var n = 0; var i, k, length, len, E; for (i = -1, length = arguments.length; i < length; i++) { E = i === -1 ? O : arguments[i]; if (isConcatSpreadable(E)) { len = lengthOfArrayLike(E); doesNotExceedSafeInteger(n + len); for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]); } else { doesNotExceedSafeInteger(n + 1); createProperty(A, n++, E); } } A.length = n; return A; } }); var concat$7 = getBuiltInPrototypeMethod('Array', 'concat'); var method$3 = concat$7; var ArrayPrototype$5 = Array.prototype; var concat$6 = function (it) { var own = it.concat; return it === ArrayPrototype$5 || (isPrototypeOf(ArrayPrototype$5, it) && own === ArrayPrototype$5.concat) ? method$3 : own; }; var parent$V = concat$6; var concat$5 = parent$V; var parent$U = concat$5; var concat$4 = parent$U; var parent$T = concat$4; var concat$3 = parent$T; var require$$0$D = concat$3; var concat$2 = require$$0$D; var require$$0$C = concat$2; var concat$1 = require$$0$C; /** * 日志上报配置 */ // 上报服务器 var __HOST__ = 'cn-guangzhou.log.aliyuncs.com'; // 上报项目 var __PROJECT__ = 'tracer-log'; // 上报存储区 var __LOG_STORE__ = 'store-name'; // indexDb verson var __version_INDEX_DB = '1'; // 上报时间(单位 s) // 当未满 __LIMIT__ 条日志时,每隔 __MAX_TIME__ 秒上报一次 var __MAX_TIME__ = 10; // 单次上报日志数 var __LIMIT__ = 10; // IndexDB存储的条数 var __MAX_LIMIT__ = 100; /** * 不同日志上报区 * 默认为均上报到 __LOG_STORE__ */ var stores = { jsSyntax: __LOG_STORE__, promise: __LOG_STORE__, resource: __LOG_STORE__, performance: __LOG_STORE__ }; /** * 不同日志上报键前缀,方便索引使用 * 默认为空 */ var pre = { jsSyntax: '', promise: '', resource: '', performance: '' }; /** * 本地 localStorage 存储 key 名 * 当页面关闭时,未上报的日志会以 __STORAGE_KEY__ 存储,以待下次访问时即刻上报 */ var __STORAGE_KEY__ = '@logger-chunk'; /** * 上报保留位数 * 默认为小数点后 3 位 */ var __RETAIN__ = 3; /** * 获取 FP FCP 指标的轮询次数 */ var __DELAY_MAX__ = 20; var max$1 = Math.max; var min = 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(index); return integer < 0 ? max$1(integer + length, 0) : min(integer, length); }; var arraySlice$1 = uncurryThis$1([].slice); var toAbsoluteIndex = toAbsoluteIndex$1; var arraySlice = arraySlice$1; var HAS_SPECIES_SUPPORT$2 = arrayMethodHasSpeciesSupport('slice'); var SPECIES = wellKnownSymbol('species'); var $Array$1 = Array; var max = Math.max; // `Array.prototype.slice` method // https://tc39.es/ecma262/#sec-array.prototype.slice // fallback for not array-like ES3 strings and DOM objects $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$2 }, { slice: function slice(start, end) { var O = toIndexedObject(this); var length = lengthOfArrayLike(O); var k = toAbsoluteIndex(start, length); var fin = toAbsoluteIndex(end === undefined ? length : end, length); // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible var Constructor, result, n; if (isArray$6(O)) { Constructor = O.constructor; // cross-realm fallback if (isConstructor(Constructor) && (Constructor === $Array$1 || isArray$6(Constructor.prototype))) { Constructor = undefined; } else if (isObject(Constructor)) { Constructor = Constructor[SPECIES]; if (Constructor === null) Constructor = undefined; } if (Constructor === $Array$1 || Constructor === undefined) { return arraySlice(O, k, fin); } } result = new (Constructor === undefined ? $Array$1 : Constructor)(max(fin - k, 0)); for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]); result.length = n; return result; } }); var slice$6 = getBuiltInPrototypeMethod('Array', 'slice'); var method$2 = slice$6; var ArrayPrototype$4 = Array.prototype; var slice$5 = function (it) { var own = it.slice; return it === ArrayPrototype$4 || (isPrototypeOf(ArrayPrototype$4, it) && own === ArrayPrototype$4.slice) ? method$2 : own; }; var parent$S = slice$5; var slice$4 = parent$S; var parent$R = slice$4; var slice$3 = parent$R; var parent$Q = slice$3; var slice$2 = parent$Q; var require$$0$B = slice$2; var slice$1 = require$$0$B; var require$$0$A = slice$1; var slice = require$$0$A; var $map = require$$0$G.map; var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('map'); // `Array.prototype.map` method // https://tc39.es/ecma262/#sec-array.prototype.map // with adding support of @@species $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 }, { map: function map(callbackfn /* , thisArg */) { return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); var map$6 = getBuiltInPrototypeMethod('Array', 'map'); var method$1 = map$6; var ArrayPrototype$3 = Array.prototype; var map$5 = function (it) { var own = it.map; return it === ArrayPrototype$3 || (isPrototypeOf(ArrayPrototype$3, it) && own === ArrayPrototype$3.map) ? method$1 : own; }; var parent$P = map$5; var map$4 = parent$P; var parent$O = map$4; var map$3 = parent$O; var parent$N = map$3; var map$2 = parent$N; var require$$0$z = map$2; var map$1 = require$$0$z; var require$$0$y = map$1; var map = require$$0$y; // `Array.isArray` method // https://tc39.es/ecma262/#sec-array.isarray $({ target: 'Array', stat: true }, { isArray: isArray$6 }); var isArray$5 = path.Array.isArray; var parent$M = isArray$5; var isArray$4 = parent$M; var parent$L = isArray$4; var isArray$3 = parent$L; var parent$K = isArray$3; var isArray$2 = parent$K; var require$$0$x = isArray$2; var isArray$1 = require$$0$x; var require$$0$w = isArray$1; var isArray = require$$0$w; var $String$2 = String; var toString_1 = function (argument) { if (classof(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string'); return $String$2(argument); }; var toString$1 = toString_1; var charAt$2 = uncurryThis$1(''.charAt); var charCodeAt$1 = uncurryThis$1(''.charCodeAt); var stringSlice$1 = uncurryThis$1(''.slice); var createMethod$2 = function (CONVERT_TO_STRING) { return function ($this, pos) { var S = toString$1(requireObjectCoercible($this)); var position = toIntegerOrInfinity(pos); var size = S.length; var first, second; if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined; first = charCodeAt$1(S, position); return first < 0xD800 || first > 0xDBFF || position + 1 === size || (second = charCodeAt$1(S, position + 1)) < 0xDC00 || second > 0xDFFF ? CONVERT_TO_STRING ? charAt$2(S, position) : first : CONVERT_TO_STRING ? stringSlice$1(S, position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000; }; }; var stringMultibyte = { // `String.prototype.codePointAt` method // https://tc39.es/ecma262/#sec-string.prototype.codepointat codeAt: createMethod$2(false), // `String.prototype.at` method // https://github.com/mathiasbynens/String.prototype.at charAt: createMethod$2(true) }; var WeakMap$1 = global$1.WeakMap; var weakMapBasicDetection = isCallable(WeakMap$1) && /native code/.test(String(WeakMap$1)); var keys$6 = shared('keys'); var sharedKey$1 = function (key) { return keys$6[key] || (keys$6[key] = uid(key)); }; var hiddenKeys$2 = {}; var NATIVE_WEAK_MAP = weakMapBasicDetection; var sharedKey = sharedKey$1; var hiddenKeys$1 = hiddenKeys$2; var OBJECT_ALREADY_INITIALIZED = 'Object already initialized'; var TypeError$2 = global$1.TypeError; var WeakMap = global$1.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(it) || (state = get(it)).type !== TYPE) { throw new TypeError$2('Incompatible receiver, ' + TYPE + ' required'); } return state; }; }; if (NATIVE_WEAK_MAP || shared$2.state) { var store = shared$2.state || (shared$2.state = new WeakMap()); /* 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 = function (it, metadata) { if (store.has(it)) throw new TypeError$2(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('state'); hiddenKeys$1[STATE] = true; set = function (it, metadata) { if (hasOwn(it, STATE)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED); metadata.facade = it; createNonEnumerableProperty(it, STATE, metadata); return metadata; }; get = function (it) { return hasOwn(it, STATE) ? it[STATE] : {}; }; has = function (it) { return hasOwn(it, STATE); }; } var internalState = { set: set, get: get, has: has, enforce: enforce, getterFor: getterFor }; var FunctionPrototype$1 = Function.prototype; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor; var EXISTS = hasOwn(FunctionPrototype$1, 'name'); // additional protection from minified / mangled / dropped function names var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something'; var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype$1, 'name').configurable)); var functionName = { EXISTS: EXISTS, PROPER: PROPER, CONFIGURABLE: CONFIGURABLE }; // `Array.prototype.{ indexOf, includes }` methods implementation var createMethod$1 = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIndexedObject($this); var length = lengthOfArrayLike(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 require$$0$v = arrayIncludes; var indexOf = require$$0$v.indexOf; var push$2 = uncurryThis$1([].push); var objectKeysInternal = function (object, names) { var O = toIndexedObject(object); var i = 0; var result = []; var key; for (key in O) !hasOwn(hiddenKeys$1, key) && hasOwn(O, key) && push$2(result, key); // Don't enum bug & hidden keys while (names.length > i) if (hasOwn(O, key = names[i++])) { ~indexOf(result, key) || push$2(result, key); } return result; }; // IE8- don't enum bug keys var enumBugKeys$1 = [ 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf' ]; var internalObjectKeys = objectKeysInternal; var enumBugKeys = enumBugKeys$1; // `Object.keys` method // https://tc39.es/ecma262/#sec-object.keys // eslint-disable-next-line es/no-object-keys -- safe var objectKeys$1 = Object.keys || function keys(O) { return internalObjectKeys(O, enumBugKeys); }; var objectKeys = objectKeys$1; // `Object.defineProperties` method // https://tc39.es/ecma262/#sec-object.defineproperties // eslint-disable-next-line es/no-object-defineproperties -- safe var f$4 = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) { anObject(O); var props = toIndexedObject(Properties); var keys = objectKeys(Properties); var length = keys.length; var index = 0; var key; while (length > index) require$$0$H.f(O, key = keys[index++], props[key]); return O; }; var objectDefineProperties = { f: f$4 }; var html$1 = getBuiltIn('document', 'documentElement'); var require$$0$u = objectDefineProperties; var html = html$1; /* global ActiveXObject -- old IE, WSH */ var GT = '>'; var LT = '<'; var PROTOTYPE$1 = 'prototype'; var SCRIPT = 'script'; var IE_P