"use strict"; var _excluded = ["data", "rowHeight", "renderRow", "overscanCount"], _excluded2 = ["childFactory", "transitionLeave", "transitionName", "transitionAppear", "transitionEnter", "transitionLeaveTimeout", "transitionEnterTimeout", "transitionAppearTimeout", "component"]; function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function _wrapNativeSuper2(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper2 = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction2(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct2(Class, arguments, _getPrototypeOf2(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf2(Wrapper, Class); }; return _wrapNativeSuper2(Class); } function _construct2(Parent, args, Class) { if (_isNativeReflectConstruct2()) { _construct2 = Reflect.construct; } else { _construct2 = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf2(instance, Class.prototype); return instance; }; } return _construct2.apply(null, arguments); } function _isNativeReflectConstruct2() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } function _isNativeFunction2(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; } function _getPrototypeOf2(o) { _getPrototypeOf2 = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf2(o); } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray2(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray2(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray2(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray2(o, minLen); } function _arrayLikeToArray2(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass2(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _assertThisInitialized2(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf2(subClass, superClass); } function _setPrototypeOf2(o, p) { _setPrototypeOf2 = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf2(o, p); } (function (f) { if (typeof exports === "object" && typeof module !== "undefined") { module.exports = f(); } else if (typeof define === "function" && define.amd) { define([], f); } else { var g; if (typeof window !== "undefined") { g = window; } else if (typeof global !== "undefined") { g = global; } else if (typeof self !== "undefined") { g = self; } else { g = this; } g.Uppywithpolyfills = f(); } })(function () { var define, module, exports; return function () { function r(e, n, t) { function o(i, f) { if (!n[i]) { if (!e[i]) { var c = "function" == typeof require && require; if (!f && c) return c(i, !0); if (u) return u(i, !0); var a = new Error("Cannot find module '" + i + "'"); throw a.code = "MODULE_NOT_FOUND", a; } var p = n[i] = { exports: {} }; e[i][0].call(p.exports, function (r) { var n = e[i][1][r]; return o(n || r); }, p, p.exports, r, e, n, t); } return n[i].exports; } for (var u = "function" == typeof require && require, i = 0; i < t.length; i++) { o(t[i]); } return o; } return r; }()({ 1: [function (require, module, exports) { // Adapted from https://github.com/Flet/prettier-bytes/ // Changing 1000 bytes to 1024, so we can keep uppercase KB vs kB // ISC License (c) Dan Flettre https://github.com/Flet/prettier-bytes/blob/master/LICENSE module.exports = function prettierBytes(num) { if (typeof num !== 'number' || isNaN(num)) { throw new TypeError('Expected a number, got ' + typeof num); } var neg = num < 0; var units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; if (neg) { num = -num; } if (num < 1) { return (neg ? '-' : '') + num + ' B'; } var exponent = Math.min(Math.floor(Math.log(num) / Math.log(1024)), units.length - 1); num = Number(num / Math.pow(1024, exponent)); var unit = units[exponent]; if (num >= 10 || num % 1 === 0) { // Do not show decimals when the number is two-digit, or if the number has no // decimal component. return (neg ? '-' : '') + num.toFixed(0) + ' ' + unit; } else { return (neg ? '-' : '') + num.toFixed(1) + ' ' + unit; } }; }, {}], 2: [function (require, module, exports) { (function (global) { (function () { (function (factory) { typeof define === 'function' && define.amd ? define(factory) : factory(); })(function () { 'use strict'; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; } function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); } var Emitter = /*#__PURE__*/function () { function Emitter() { _classCallCheck(this, Emitter); Object.defineProperty(this, 'listeners', { value: {}, writable: true, configurable: true }); } _createClass(Emitter, [{ key: "addEventListener", value: function addEventListener(type, callback, options) { if (!(type in this.listeners)) { this.listeners[type] = []; } this.listeners[type].push({ callback: callback, options: options }); } }, { key: "removeEventListener", value: function removeEventListener(type, callback) { if (!(type in this.listeners)) { return; } var stack = this.listeners[type]; for (var i = 0, l = stack.length; i < l; i++) { if (stack[i].callback === callback) { stack.splice(i, 1); return; } } } }, { key: "dispatchEvent", value: function dispatchEvent(event) { if (!(event.type in this.listeners)) { return; } var stack = this.listeners[event.type]; var stackToCall = stack.slice(); for (var i = 0, l = stackToCall.length; i < l; i++) { var listener = stackToCall[i]; try { listener.callback.call(this, event); } catch (e) { Promise.resolve().then(function () { throw e; }); } if (listener.options && listener.options.once) { this.removeEventListener(event.type, listener.callback); } } return !event.defaultPrevented; } }]); return Emitter; }(); var AbortSignal = /*#__PURE__*/function (_Emitter) { _inherits(AbortSignal, _Emitter); var _super = _createSuper(AbortSignal); function AbortSignal() { var _this; _classCallCheck(this, AbortSignal); _this = _super.call(this); // Some versions of babel does not transpile super() correctly for IE <= 10, if the parent // constructor has failed to run, then "this.listeners" will still be undefined and then we call // the parent constructor directly instead as a workaround. For general details, see babel bug: // https://github.com/babel/babel/issues/3041 // This hack was added as a fix for the issue described here: // https://github.com/Financial-Times/polyfill-library/pull/59#issuecomment-477558042 if (!_this.listeners) { Emitter.call(_assertThisInitialized(_this)); } // Compared to assignment, Object.defineProperty makes properties non-enumerable by default and // we want Object.keys(new AbortController().signal) to be [] for compat with the native impl Object.defineProperty(_assertThisInitialized(_this), 'aborted', { value: false, writable: true, configurable: true }); Object.defineProperty(_assertThisInitialized(_this), 'onabort', { value: null, writable: true, configurable: true }); return _this; } _createClass(AbortSignal, [{ key: "toString", value: function toString() { return '[object AbortSignal]'; } }, { key: "dispatchEvent", value: function dispatchEvent(event) { if (event.type === 'abort') { this.aborted = true; if (typeof this.onabort === 'function') { this.onabort.call(this, event); } } _get(_getPrototypeOf(AbortSignal.prototype), "dispatchEvent", this).call(this, event); } }]); return AbortSignal; }(Emitter); var AbortController = /*#__PURE__*/function () { function AbortController() { _classCallCheck(this, AbortController); // Compared to assignment, Object.defineProperty makes properties non-enumerable by default and // we want Object.keys(new AbortController()) to be [] for compat with the native impl Object.defineProperty(this, 'signal', { value: new AbortSignal(), writable: true, configurable: true }); } _createClass(AbortController, [{ key: "abort", value: function abort() { var event; try { event = new Event('abort'); } catch (e) { if (typeof document !== 'undefined') { if (!document.createEvent) { // For Internet Explorer 8: event = document.createEventObject(); event.type = 'abort'; } else { // For Internet Explorer 11: event = document.createEvent('Event'); event.initEvent('abort', false, false); } } else { // Fallback where document isn't available: event = { type: 'abort', bubbles: false, cancelable: false }; } } this.signal.dispatchEvent(event); } }, { key: "toString", value: function toString() { return '[object AbortController]'; } }]); return AbortController; }(); if (typeof Symbol !== 'undefined' && Symbol.toStringTag) { // These are necessary to make sure that we get correct output for: // Object.prototype.toString.call(new AbortController()) AbortController.prototype[Symbol.toStringTag] = 'AbortController'; AbortSignal.prototype[Symbol.toStringTag] = 'AbortSignal'; } function polyfillNeeded(self) { if (self.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL) { console.log('__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill'); return true; } // Note that the "unfetch" minimal fetch polyfill defines fetch() without // defining window.Request, and this polyfill need to work on top of unfetch // so the below feature detection needs the !self.AbortController part. // The Request.prototype check is also needed because Safari versions 11.1.2 // up to and including 12.1.x has a window.AbortController present but still // does NOT correctly implement abortable fetch: // https://bugs.webkit.org/show_bug.cgi?id=174980#c2 return typeof self.Request === 'function' && !self.Request.prototype.hasOwnProperty('signal') || !self.AbortController; } /** * Note: the "fetch.Request" default value is available for fetch imported from * the "node-fetch" package and not in browsers. This is OK since browsers * will be importing umd-polyfill.js from that path "self" is passed the * decorator so the default value will not be used (because browsers that define * fetch also has Request). One quirky setup where self.fetch exists but * self.Request does not is when the "unfetch" minimal fetch polyfill is used * on top of IE11; for this case the browser will try to use the fetch.Request * default value which in turn will be undefined but then then "if (Request)" * will ensure that you get a patched fetch but still no Request (as expected). * @param {fetch, Request = fetch.Request} * @returns {fetch: abortableFetch, Request: AbortableRequest} */ function abortableFetchDecorator(patchTargets) { if ('function' === typeof patchTargets) { patchTargets = { fetch: patchTargets }; } var _patchTargets = patchTargets, fetch = _patchTargets.fetch, _patchTargets$Request = _patchTargets.Request, NativeRequest = _patchTargets$Request === void 0 ? fetch.Request : _patchTargets$Request, NativeAbortController = _patchTargets.AbortController, _patchTargets$__FORCE = _patchTargets.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL, __FORCE_INSTALL_ABORTCONTROLLER_POLYFILL = _patchTargets$__FORCE === void 0 ? false : _patchTargets$__FORCE; if (!polyfillNeeded({ fetch: fetch, Request: NativeRequest, AbortController: NativeAbortController, __FORCE_INSTALL_ABORTCONTROLLER_POLYFILL: __FORCE_INSTALL_ABORTCONTROLLER_POLYFILL })) { return { fetch: fetch, Request: Request }; } var Request = NativeRequest; // Note that the "unfetch" minimal fetch polyfill defines fetch() without // defining window.Request, and this polyfill need to work on top of unfetch // hence we only patch it if it's available. Also we don't patch it if signal // is already available on the Request prototype because in this case support // is present and the patching below can cause a crash since it assigns to // request.signal which is technically a read-only property. This latter error // happens when you run the main5.js node-fetch example in the repo // "abortcontroller-polyfill-examples". The exact error is: // request.signal = init.signal; // ^ // TypeError: Cannot set property signal of # which has only a getter if (Request && !Request.prototype.hasOwnProperty('signal') || __FORCE_INSTALL_ABORTCONTROLLER_POLYFILL) { Request = function Request(input, init) { var signal; if (init && init.signal) { signal = init.signal; // Never pass init.signal to the native Request implementation when the polyfill has // been installed because if we're running on top of a browser with a // working native AbortController (i.e. the polyfill was installed due to // __FORCE_INSTALL_ABORTCONTROLLER_POLYFILL being set), then passing our // fake AbortSignal to the native fetch will trigger: // TypeError: Failed to construct 'Request': member signal is not of type AbortSignal. delete init.signal; } var request = new NativeRequest(input, init); if (signal) { Object.defineProperty(request, 'signal', { writable: false, enumerable: false, configurable: true, value: signal }); } return request; }; Request.prototype = NativeRequest.prototype; } var realFetch = fetch; var abortableFetch = function abortableFetch(input, init) { var signal = Request && Request.prototype.isPrototypeOf(input) ? input.signal : init ? init.signal : undefined; if (signal) { var abortError; try { abortError = new DOMException('Aborted', 'AbortError'); } catch (err) { // IE 11 does not support calling the DOMException constructor, use a // regular error object on it instead. abortError = new Error('Aborted'); abortError.name = 'AbortError'; } // Return early if already aborted, thus avoiding making an HTTP request if (signal.aborted) { return Promise.reject(abortError); } // Turn an event into a promise, reject it once `abort` is dispatched var cancellation = new Promise(function (_, reject) { signal.addEventListener('abort', function () { return reject(abortError); }, { once: true }); }); if (init && init.signal) { // Never pass .signal to the native implementation when the polyfill has // been installed because if we're running on top of a browser with a // working native AbortController (i.e. the polyfill was installed due to // __FORCE_INSTALL_ABORTCONTROLLER_POLYFILL being set), then passing our // fake AbortSignal to the native fetch will trigger: // TypeError: Failed to execute 'fetch' on 'Window': member signal is not of type AbortSignal. delete init.signal; } // Return the fastest promise (don't need to wait for request to finish) return Promise.race([cancellation, realFetch(input, init)]); } return realFetch(input, init); }; return { fetch: abortableFetch, Request: Request }; } (function (self) { if (!polyfillNeeded(self)) { return; } if (!self.fetch) { console.warn('fetch() is not available, cannot install abortcontroller-polyfill'); return; } var _abortableFetch = abortableFetchDecorator(self), fetch = _abortableFetch.fetch, Request = _abortableFetch.Request; self.fetch = fetch; self.Request = Request; Object.defineProperty(self, 'AbortController', { writable: true, enumerable: false, configurable: true, value: AbortController }); Object.defineProperty(self, 'AbortSignal', { writable: true, enumerable: false, configurable: true, value: AbortSignal }); })(typeof self !== 'undefined' ? self : global); }); }).call(this); }).call(this, typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}); }, {}], 3: [function (require, module, exports) { /** * Expose `Backoff`. */ module.exports = Backoff; /** * Initialize backoff timer with `opts`. * * - `min` initial timeout in milliseconds [100] * - `max` max timeout [10000] * - `jitter` [0] * - `factor` [2] * * @param {Object} opts * @api public */ function Backoff(opts) { opts = opts || {}; this.ms = opts.min || 100; this.max = opts.max || 10000; this.factor = opts.factor || 2; this.jitter = opts.jitter > 0 && opts.jitter <= 1 ? opts.jitter : 0; this.attempts = 0; } /** * Return the backoff duration. * * @return {Number} * @api public */ Backoff.prototype.duration = function () { var ms = this.ms * Math.pow(this.factor, this.attempts++); if (this.jitter) { var rand = Math.random(); var deviation = Math.floor(rand * this.jitter * ms); ms = (Math.floor(rand * 10) & 1) == 0 ? ms - deviation : ms + deviation; } return Math.min(ms, this.max) | 0; }; /** * Reset the number of attempts. * * @api public */ Backoff.prototype.reset = function () { this.attempts = 0; }; /** * Set the minimum duration * * @api public */ Backoff.prototype.setMin = function (min) { this.ms = min; }; /** * Set the maximum duration * * @api public */ Backoff.prototype.setMax = function (max) { this.max = max; }; /** * Set the jitter * * @api public */ Backoff.prototype.setJitter = function (jitter) { this.jitter = jitter; }; }, {}], 4: [function (require, module, exports) { /* * base64-arraybuffer * https://github.com/niklasvh/base64-arraybuffer * * Copyright (c) 2012 Niklas von Hertzen * Licensed under the MIT license. */ (function (chars) { "use strict"; exports.encode = function (arraybuffer) { var bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = ""; for (i = 0; i < len; i += 3) { base64 += chars[bytes[i] >> 2]; base64 += chars[(bytes[i] & 3) << 4 | bytes[i + 1] >> 4]; base64 += chars[(bytes[i + 1] & 15) << 2 | bytes[i + 2] >> 6]; base64 += chars[bytes[i + 2] & 63]; } if (len % 3 === 2) { base64 = base64.substring(0, base64.length - 1) + "="; } else if (len % 3 === 1) { base64 = base64.substring(0, base64.length - 2) + "=="; } return base64; }; exports.decode = function (base64) { var bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4; if (base64[base64.length - 1] === "=") { bufferLength--; if (base64[base64.length - 2] === "=") { bufferLength--; } } var arraybuffer = new ArrayBuffer(bufferLength), bytes = new Uint8Array(arraybuffer); for (i = 0; i < len; i += 4) { encoded1 = chars.indexOf(base64[i]); encoded2 = chars.indexOf(base64[i + 1]); encoded3 = chars.indexOf(base64[i + 2]); encoded4 = chars.indexOf(base64[i + 3]); bytes[p++] = encoded1 << 2 | encoded2 >> 4; bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2; bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63; } return arraybuffer; }; })("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"); }, {}], 5: [function (require, module, exports) { 'use strict'; exports.byteLength = byteLength; exports.toByteArray = toByteArray; exports.fromByteArray = fromByteArray; var lookup = []; var revLookup = []; var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array; var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; for (var i = 0, len = code.length; i < len; ++i) { lookup[i] = code[i]; revLookup[code.charCodeAt(i)] = i; } // Support decoding URL-safe base64 strings, as Node.js does. // See: https://en.wikipedia.org/wiki/Base64#URL_applications revLookup['-'.charCodeAt(0)] = 62; revLookup['_'.charCodeAt(0)] = 63; function getLens(b64) { var len = b64.length; if (len % 4 > 0) { throw new Error('Invalid string. Length must be a multiple of 4'); } // Trim off extra bytes after placeholder bytes are found // See: https://github.com/beatgammit/base64-js/issues/42 var validLen = b64.indexOf('='); if (validLen === -1) validLen = len; var placeHoldersLen = validLen === len ? 0 : 4 - validLen % 4; return [validLen, placeHoldersLen]; } // base64 is 4/3 + up to two characters of the original data function byteLength(b64) { var lens = getLens(b64); var validLen = lens[0]; var placeHoldersLen = lens[1]; return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen; } function _byteLength(b64, validLen, placeHoldersLen) { return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen; } function toByteArray(b64) { var tmp; var lens = getLens(b64); var validLen = lens[0]; var placeHoldersLen = lens[1]; var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)); var curByte = 0; // if there are placeholders, only get up to the last complete 4 chars var len = placeHoldersLen > 0 ? validLen - 4 : validLen; var i; for (i = 0; i < len; i += 4) { tmp = revLookup[b64.charCodeAt(i)] << 18 | revLookup[b64.charCodeAt(i + 1)] << 12 | revLookup[b64.charCodeAt(i + 2)] << 6 | revLookup[b64.charCodeAt(i + 3)]; arr[curByte++] = tmp >> 16 & 0xFF; arr[curByte++] = tmp >> 8 & 0xFF; arr[curByte++] = tmp & 0xFF; } if (placeHoldersLen === 2) { tmp = revLookup[b64.charCodeAt(i)] << 2 | revLookup[b64.charCodeAt(i + 1)] >> 4; arr[curByte++] = tmp & 0xFF; } if (placeHoldersLen === 1) { tmp = revLookup[b64.charCodeAt(i)] << 10 | revLookup[b64.charCodeAt(i + 1)] << 4 | revLookup[b64.charCodeAt(i + 2)] >> 2; arr[curByte++] = tmp >> 8 & 0xFF; arr[curByte++] = tmp & 0xFF; } return arr; } function tripletToBase64(num) { return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]; } function encodeChunk(uint8, start, end) { var tmp; var output = []; for (var i = start; i < end; i += 3) { tmp = (uint8[i] << 16 & 0xFF0000) + (uint8[i + 1] << 8 & 0xFF00) + (uint8[i + 2] & 0xFF); output.push(tripletToBase64(tmp)); } return output.join(''); } function fromByteArray(uint8) { var tmp; var len = uint8.length; var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes var parts = []; var maxChunkLength = 16383; // must be multiple of 3 // go through the array every three bytes, we'll deal with trailing stuff later for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { parts.push(encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength)); } // pad the end with zeros, but make sure to not forget the extra bytes if (extraBytes === 1) { tmp = uint8[len - 1]; parts.push(lookup[tmp >> 2] + lookup[tmp << 4 & 0x3F] + '=='); } else if (extraBytes === 2) { tmp = (uint8[len - 2] << 8) + uint8[len - 1]; parts.push(lookup[tmp >> 10] + lookup[tmp >> 4 & 0x3F] + lookup[tmp << 2 & 0x3F] + '='); } return parts.join(''); } }, {}], 6: [function (require, module, exports) { (function (Buffer) { (function () { /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ /* eslint-disable no-proto */ 'use strict'; var base64 = require('base64-js'); var ieee754 = require('ieee754'); exports.Buffer = Buffer; exports.SlowBuffer = SlowBuffer; exports.INSPECT_MAX_BYTES = 50; var K_MAX_LENGTH = 0x7fffffff; exports.kMaxLength = K_MAX_LENGTH; /** * If `Buffer.TYPED_ARRAY_SUPPORT`: * === true Use Uint8Array implementation (fastest) * === false Print warning and recommend using `buffer` v4.x which has an Object * implementation (most compatible, even IE6) * * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, * Opera 11.6+, iOS 4.2+. * * We report that the browser does not support typed arrays if the are not subclassable * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array` * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support * for __proto__ and has a buggy typed array implementation. */ Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport(); if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && typeof console.error === 'function') { console.error('This browser lacks typed array (Uint8Array) support which is required by ' + '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'); } function typedArraySupport() { // Can typed array instances can be augmented? try { var arr = new Uint8Array(1); arr.__proto__ = { __proto__: Uint8Array.prototype, foo: function foo() { return 42; } }; return arr.foo() === 42; } catch (e) { return false; } } Object.defineProperty(Buffer.prototype, 'parent', { enumerable: true, get: function get() { if (!Buffer.isBuffer(this)) return undefined; return this.buffer; } }); Object.defineProperty(Buffer.prototype, 'offset', { enumerable: true, get: function get() { if (!Buffer.isBuffer(this)) return undefined; return this.byteOffset; } }); function createBuffer(length) { if (length > K_MAX_LENGTH) { throw new RangeError('The value "' + length + '" is invalid for option "size"'); } // Return an augmented `Uint8Array` instance var buf = new Uint8Array(length); buf.__proto__ = Buffer.prototype; return buf; } /** * The Buffer constructor returns instances of `Uint8Array` that have their * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of * `Uint8Array`, so the returned instances will have all the node `Buffer` methods * and the `Uint8Array` methods. Square bracket notation works as expected -- it * returns a single octet. * * The `Uint8Array` prototype remains unmodified. */ function Buffer(arg, encodingOrOffset, length) { // Common case. if (typeof arg === 'number') { if (typeof encodingOrOffset === 'string') { throw new TypeError('The "string" argument must be of type string. Received type number'); } return allocUnsafe(arg); } return from(arg, encodingOrOffset, length); } // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 if (typeof Symbol !== 'undefined' && Symbol.species != null && Buffer[Symbol.species] === Buffer) { Object.defineProperty(Buffer, Symbol.species, { value: null, configurable: true, enumerable: false, writable: false }); } Buffer.poolSize = 8192; // not used by this implementation function from(value, encodingOrOffset, length) { if (typeof value === 'string') { return fromString(value, encodingOrOffset); } if (ArrayBuffer.isView(value)) { return fromArrayLike(value); } if (value == null) { throw TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + 'or Array-like Object. Received type ' + typeof value); } if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) { return fromArrayBuffer(value, encodingOrOffset, length); } if (typeof value === 'number') { throw new TypeError('The "value" argument must not be of type number. Received type number'); } var valueOf = value.valueOf && value.valueOf(); if (valueOf != null && valueOf !== value) { return Buffer.from(valueOf, encodingOrOffset, length); } var b = fromObject(value); if (b) return b; if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === 'function') { return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length); } throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + 'or Array-like Object. Received type ' + typeof value); } /** * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError * if value is a number. * Buffer.from(str[, encoding]) * Buffer.from(array) * Buffer.from(buffer) * Buffer.from(arrayBuffer[, byteOffset[, length]]) **/ Buffer.from = function (value, encodingOrOffset, length) { return from(value, encodingOrOffset, length); }; // Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug: // https://github.com/feross/buffer/pull/148 Buffer.prototype.__proto__ = Uint8Array.prototype; Buffer.__proto__ = Uint8Array; function assertSize(size) { if (typeof size !== 'number') { throw new TypeError('"size" argument must be of type number'); } else if (size < 0) { throw new RangeError('The value "' + size + '" is invalid for option "size"'); } } function alloc(size, fill, encoding) { assertSize(size); if (size <= 0) { return createBuffer(size); } if (fill !== undefined) { // Only pay attention to encoding if it's a string. This // prevents accidentally sending in a number that would // be interpretted as a start offset. return typeof encoding === 'string' ? createBuffer(size).fill(fill, encoding) : createBuffer(size).fill(fill); } return createBuffer(size); } /** * Creates a new filled Buffer instance. * alloc(size[, fill[, encoding]]) **/ Buffer.alloc = function (size, fill, encoding) { return alloc(size, fill, encoding); }; function allocUnsafe(size) { assertSize(size); return createBuffer(size < 0 ? 0 : checked(size) | 0); } /** * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. * */ Buffer.allocUnsafe = function (size) { return allocUnsafe(size); }; /** * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. */ Buffer.allocUnsafeSlow = function (size) { return allocUnsafe(size); }; function fromString(string, encoding) { if (typeof encoding !== 'string' || encoding === '') { encoding = 'utf8'; } if (!Buffer.isEncoding(encoding)) { throw new TypeError('Unknown encoding: ' + encoding); } var length = byteLength(string, encoding) | 0; var buf = createBuffer(length); var actual = buf.write(string, encoding); if (actual !== length) { // Writing a hex string, for example, that contains invalid characters will // cause everything after the first invalid character to be ignored. (e.g. // 'abxxcd' will be treated as 'ab') buf = buf.slice(0, actual); } return buf; } function fromArrayLike(array) { var length = array.length < 0 ? 0 : checked(array.length) | 0; var buf = createBuffer(length); for (var i = 0; i < length; i += 1) { buf[i] = array[i] & 255; } return buf; } function fromArrayBuffer(array, byteOffset, length) { if (byteOffset < 0 || array.byteLength < byteOffset) { throw new RangeError('"offset" is outside of buffer bounds'); } if (array.byteLength < byteOffset + (length || 0)) { throw new RangeError('"length" is outside of buffer bounds'); } var buf; if (byteOffset === undefined && length === undefined) { buf = new Uint8Array(array); } else if (length === undefined) { buf = new Uint8Array(array, byteOffset); } else { buf = new Uint8Array(array, byteOffset, length); } // Return an augmented `Uint8Array` instance buf.__proto__ = Buffer.prototype; return buf; } function fromObject(obj) { if (Buffer.isBuffer(obj)) { var len = checked(obj.length) | 0; var buf = createBuffer(len); if (buf.length === 0) { return buf; } obj.copy(buf, 0, 0, len); return buf; } if (obj.length !== undefined) { if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) { return createBuffer(0); } return fromArrayLike(obj); } if (obj.type === 'Buffer' && Array.isArray(obj.data)) { return fromArrayLike(obj.data); } } function checked(length) { // Note: cannot use `length < K_MAX_LENGTH` here because that fails when // length is NaN (which is otherwise coerced to zero.) if (length >= K_MAX_LENGTH) { throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes'); } return length | 0; } function SlowBuffer(length) { if (+length != length) { // eslint-disable-line eqeqeq length = 0; } return Buffer.alloc(+length); } Buffer.isBuffer = function isBuffer(b) { return b != null && b._isBuffer === true && b !== Buffer.prototype; // so Buffer.isBuffer(Buffer.prototype) will be false }; Buffer.compare = function compare(a, b) { if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength); if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength); if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'); } if (a === b) return 0; var x = a.length; var y = b.length; for (var i = 0, len = Math.min(x, y); i < len; ++i) { if (a[i] !== b[i]) { x = a[i]; y = b[i]; break; } } if (x < y) return -1; if (y < x) return 1; return 0; }; Buffer.isEncoding = function isEncoding(encoding) { switch (String(encoding).toLowerCase()) { case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'latin1': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': return true; default: return false; } }; Buffer.concat = function concat(list, length) { if (!Array.isArray(list)) { throw new TypeError('"list" argument must be an Array of Buffers'); } if (list.length === 0) { return Buffer.alloc(0); } var i; if (length === undefined) { length = 0; for (i = 0; i < list.length; ++i) { length += list[i].length; } } var buffer = Buffer.allocUnsafe(length); var pos = 0; for (i = 0; i < list.length; ++i) { var buf = list[i]; if (isInstance(buf, Uint8Array)) { buf = Buffer.from(buf); } if (!Buffer.isBuffer(buf)) { throw new TypeError('"list" argument must be an Array of Buffers'); } buf.copy(buffer, pos); pos += buf.length; } return buffer; }; function byteLength(string, encoding) { if (Buffer.isBuffer(string)) { return string.length; } if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) { return string.byteLength; } if (typeof string !== 'string') { throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' + 'Received type ' + typeof string); } var len = string.length; var mustMatch = arguments.length > 2 && arguments[2] === true; if (!mustMatch && len === 0) return 0; // Use a for loop to avoid recursion var loweredCase = false; for (;;) { switch (encoding) { case 'ascii': case 'latin1': case 'binary': return len; case 'utf8': case 'utf-8': return utf8ToBytes(string).length; case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': return len * 2; case 'hex': return len >>> 1; case 'base64': return base64ToBytes(string).length; default: if (loweredCase) { return mustMatch ? -1 : utf8ToBytes(string).length; // assume utf8 } encoding = ('' + encoding).toLowerCase(); loweredCase = true; } } } Buffer.byteLength = byteLength; function slowToString(encoding, start, end) { var loweredCase = false; // No need to verify that "this.length <= MAX_UINT32" since it's a read-only // property of a typed array. // This behaves neither like String nor Uint8Array in that we set start/end // to their upper/lower bounds if the value passed is out of range. // undefined is handled specially as per ECMA-262 6th Edition, // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. if (start === undefined || start < 0) { start = 0; } // Return early if start > this.length. Done here to prevent potential uint32 // coercion fail below. if (start > this.length) { return ''; } if (end === undefined || end > this.length) { end = this.length; } if (end <= 0) { return ''; } // Force coersion to uint32. This will also coerce falsey/NaN values to 0. end >>>= 0; start >>>= 0; if (end <= start) { return ''; } if (!encoding) encoding = 'utf8'; while (true) { switch (encoding) { case 'hex': return hexSlice(this, start, end); case 'utf8': case 'utf-8': return utf8Slice(this, start, end); case 'ascii': return asciiSlice(this, start, end); case 'latin1': case 'binary': return latin1Slice(this, start, end); case 'base64': return base64Slice(this, start, end); case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': return utf16leSlice(this, start, end); default: if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding); encoding = (encoding + '').toLowerCase(); loweredCase = true; } } } // This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package) // to detect a Buffer instance. It's not possible to use `instanceof Buffer` // reliably in a browserify context because there could be multiple different // copies of the 'buffer' package in use. This method works even for Buffer // instances that were created from another copy of the `buffer` package. // See: https://github.com/feross/buffer/issues/154 Buffer.prototype._isBuffer = true; function swap(b, n, m) { var i = b[n]; b[n] = b[m]; b[m] = i; } Buffer.prototype.swap16 = function swap16() { var len = this.length; if (len % 2 !== 0) { throw new RangeError('Buffer size must be a multiple of 16-bits'); } for (var i = 0; i < len; i += 2) { swap(this, i, i + 1); } return this; }; Buffer.prototype.swap32 = function swap32() { var len = this.length; if (len % 4 !== 0) { throw new RangeError('Buffer size must be a multiple of 32-bits'); } for (var i = 0; i < len; i += 4) { swap(this, i, i + 3); swap(this, i + 1, i + 2); } return this; }; Buffer.prototype.swap64 = function swap64() { var len = this.length; if (len % 8 !== 0) { throw new RangeError('Buffer size must be a multiple of 64-bits'); } for (var i = 0; i < len; i += 8) { swap(this, i, i + 7); swap(this, i + 1, i + 6); swap(this, i + 2, i + 5); swap(this, i + 3, i + 4); } return this; }; Buffer.prototype.toString = function toString() { var length = this.length; if (length === 0) return ''; if (arguments.length === 0) return utf8Slice(this, 0, length); return slowToString.apply(this, arguments); }; Buffer.prototype.toLocaleString = Buffer.prototype.toString; Buffer.prototype.equals = function equals(b) { if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer'); if (this === b) return true; return Buffer.compare(this, b) === 0; }; Buffer.prototype.inspect = function inspect() { var str = ''; var max = exports.INSPECT_MAX_BYTES; str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim(); if (this.length > max) str += ' ... '; return ''; }; Buffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) { if (isInstance(target, Uint8Array)) { target = Buffer.from(target, target.offset, target.byteLength); } if (!Buffer.isBuffer(target)) { throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. ' + 'Received type ' + typeof target); } if (start === undefined) { start = 0; } if (end === undefined) { end = target ? target.length : 0; } if (thisStart === undefined) { thisStart = 0; } if (thisEnd === undefined) { thisEnd = this.length; } if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { throw new RangeError('out of range index'); } if (thisStart >= thisEnd && start >= end) { return 0; } if (thisStart >= thisEnd) { return -1; } if (start >= end) { return 1; } start >>>= 0; end >>>= 0; thisStart >>>= 0; thisEnd >>>= 0; if (this === target) return 0; var x = thisEnd - thisStart; var y = end - start; var len = Math.min(x, y); var thisCopy = this.slice(thisStart, thisEnd); var targetCopy = target.slice(start, end); for (var i = 0; i < len; ++i) { if (thisCopy[i] !== targetCopy[i]) { x = thisCopy[i]; y = targetCopy[i]; break; } } if (x < y) return -1; if (y < x) return 1; return 0; }; // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, // OR the last index of `val` in `buffer` at offset <= `byteOffset`. // // Arguments: // - buffer - a Buffer to search // - val - a string, Buffer, or number // - byteOffset - an index into `buffer`; will be clamped to an int32 // - encoding - an optional encoding, relevant is val is a string // - dir - true for indexOf, false for lastIndexOf function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) { // Empty buffer means no match if (buffer.length === 0) return -1; // Normalize byteOffset if (typeof byteOffset === 'string') { encoding = byteOffset; byteOffset = 0; } else if (byteOffset > 0x7fffffff) { byteOffset = 0x7fffffff; } else if (byteOffset < -0x80000000) { byteOffset = -0x80000000; } byteOffset = +byteOffset; // Coerce to Number. if (numberIsNaN(byteOffset)) { // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer byteOffset = dir ? 0 : buffer.length - 1; } // Normalize byteOffset: negative offsets start from the end of the buffer if (byteOffset < 0) byteOffset = buffer.length + byteOffset; if (byteOffset >= buffer.length) { if (dir) return -1;else byteOffset = buffer.length - 1; } else if (byteOffset < 0) { if (dir) byteOffset = 0;else return -1; } // Normalize val if (typeof val === 'string') { val = Buffer.from(val, encoding); } // Finally, search either indexOf (if dir is true) or lastIndexOf if (Buffer.isBuffer(val)) { // Special case: looking for empty string/buffer always fails if (val.length === 0) { return -1; } return arrayIndexOf(buffer, val, byteOffset, encoding, dir); } else if (typeof val === 'number') { val = val & 0xFF; // Search for a byte value [0-255] if (typeof Uint8Array.prototype.indexOf === 'function') { if (dir) { return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset); } else { return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset); } } return arrayIndexOf(buffer, [val], byteOffset, encoding, dir); } throw new TypeError('val must be string, number or Buffer'); } function arrayIndexOf(arr, val, byteOffset, encoding, dir) { var indexSize = 1; var arrLength = arr.length; var valLength = val.length; if (encoding !== undefined) { encoding = String(encoding).toLowerCase(); if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') { if (arr.length < 2 || val.length < 2) { return -1; } indexSize = 2; arrLength /= 2; valLength /= 2; byteOffset /= 2; } } function read(buf, i) { if (indexSize === 1) { return buf[i]; } else { return buf.readUInt16BE(i * indexSize); } } var i; if (dir) { var foundIndex = -1; for (i = byteOffset; i < arrLength; i++) { if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { if (foundIndex === -1) foundIndex = i; if (i - foundIndex + 1 === valLength) return foundIndex * indexSize; } else { if (foundIndex !== -1) i -= i - foundIndex; foundIndex = -1; } } } else { if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength; for (i = byteOffset; i >= 0; i--) { var found = true; for (var j = 0; j < valLength; j++) { if (read(arr, i + j) !== read(val, j)) { found = false; break; } } if (found) return i; } } return -1; } Buffer.prototype.includes = function includes(val, byteOffset, encoding) { return this.indexOf(val, byteOffset, encoding) !== -1; }; Buffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) { return bidirectionalIndexOf(this, val, byteOffset, encoding, true); }; Buffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) { return bidirectionalIndexOf(this, val, byteOffset, encoding, false); }; function hexWrite(buf, string, offset, length) { offset = Number(offset) || 0; var remaining = buf.length - offset; if (!length) { length = remaining; } else { length = Number(length); if (length > remaining) { length = remaining; } } var strLen = string.length; if (length > strLen / 2) { length = strLen / 2; } for (var i = 0; i < length; ++i) { var parsed = parseInt(string.substr(i * 2, 2), 16); if (numberIsNaN(parsed)) return i; buf[offset + i] = parsed; } return i; } function utf8Write(buf, string, offset, length) { return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length); } function asciiWrite(buf, string, offset, length) { return blitBuffer(asciiToBytes(string), buf, offset, length); } function latin1Write(buf, string, offset, length) { return asciiWrite(buf, string, offset, length); } function base64Write(buf, string, offset, length) { return blitBuffer(base64ToBytes(string), buf, offset, length); } function ucs2Write(buf, string, offset, length) { return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length); } Buffer.prototype.write = function write(string, offset, length, encoding) { // Buffer#write(string) if (offset === undefined) { encoding = 'utf8'; length = this.length; offset = 0; // Buffer#write(string, encoding) } else if (length === undefined && typeof offset === 'string') { encoding = offset; length = this.length; offset = 0; // Buffer#write(string, offset[, length][, encoding]) } else if (isFinite(offset)) { offset = offset >>> 0; if (isFinite(length)) { length = length >>> 0; if (encoding === undefined) encoding = 'utf8'; } else { encoding = length; length = undefined; } } else { throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported'); } var remaining = this.length - offset; if (length === undefined || length > remaining) length = remaining; if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) { throw new RangeError('Attempt to write outside buffer bounds'); } if (!encoding) encoding = 'utf8'; var loweredCase = false; for (;;) { switch (encoding) { case 'hex': return hexWrite(this, string, offset, length); case 'utf8': case 'utf-8': return utf8Write(this, string, offset, length); case 'ascii': return asciiWrite(this, string, offset, length); case 'latin1': case 'binary': return latin1Write(this, string, offset, length); case 'base64': // Warning: maxLength not taken into account in base64Write return base64Write(this, string, offset, length); case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': return ucs2Write(this, string, offset, length); default: if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding); encoding = ('' + encoding).toLowerCase(); loweredCase = true; } } }; Buffer.prototype.toJSON = function toJSON() { return { type: 'Buffer', data: Array.prototype.slice.call(this._arr || this, 0) }; }; function base64Slice(buf, start, end) { if (start === 0 && end === buf.length) { return base64.fromByteArray(buf); } else { return base64.fromByteArray(buf.slice(start, end)); } } function utf8Slice(buf, start, end) { end = Math.min(buf.length, end); var res = []; var i = start; while (i < end) { var firstByte = buf[i]; var codePoint = null; var bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1; if (i + bytesPerSequence <= end) { var secondByte, thirdByte, fourthByte, tempCodePoint; switch (bytesPerSequence) { case 1: if (firstByte < 0x80) { codePoint = firstByte; } break; case 2: secondByte = buf[i + 1]; if ((secondByte & 0xC0) === 0x80) { tempCodePoint = (firstByte & 0x1F) << 0x6 | secondByte & 0x3F; if (tempCodePoint > 0x7F) { codePoint = tempCodePoint; } } break; case 3: secondByte = buf[i + 1]; thirdByte = buf[i + 2]; if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | thirdByte & 0x3F; if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { codePoint = tempCodePoint; } } break; case 4: secondByte = buf[i + 1]; thirdByte = buf[i + 2]; fourthByte = buf[i + 3]; if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | fourthByte & 0x3F; if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { codePoint = tempCodePoint; } } } } if (codePoint === null) { // we did not generate a valid codePoint so insert a // replacement char (U+FFFD) and advance only 1 byte codePoint = 0xFFFD; bytesPerSequence = 1; } else if (codePoint > 0xFFFF) { // encode to utf16 (surrogate pair dance) codePoint -= 0x10000; res.push(codePoint >>> 10 & 0x3FF | 0xD800); codePoint = 0xDC00 | codePoint & 0x3FF; } res.push(codePoint); i += bytesPerSequence; } return decodeCodePointsArray(res); } // Based on http://stackoverflow.com/a/22747272/680742, the browser with // the lowest limit is Chrome, with 0x10000 args. // We go 1 magnitude less, for safety var MAX_ARGUMENTS_LENGTH = 0x1000; function decodeCodePointsArray(codePoints) { var len = codePoints.length; if (len <= MAX_ARGUMENTS_LENGTH) { return String.fromCharCode.apply(String, codePoints); // avoid extra slice() } // Decode in chunks to avoid "call stack size exceeded". var res = ''; var i = 0; while (i < len) { res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)); } return res; } function asciiSlice(buf, start, end) { var ret = ''; end = Math.min(buf.length, end); for (var i = start; i < end; ++i) { ret += String.fromCharCode(buf[i] & 0x7F); } return ret; } function latin1Slice(buf, start, end) { var ret = ''; end = Math.min(buf.length, end); for (var i = start; i < end; ++i) { ret += String.fromCharCode(buf[i]); } return ret; } function hexSlice(buf, start, end) { var len = buf.length; if (!start || start < 0) start = 0; if (!end || end < 0 || end > len) end = len; var out = ''; for (var i = start; i < end; ++i) { out += toHex(buf[i]); } return out; } function utf16leSlice(buf, start, end) { var bytes = buf.slice(start, end); var res = ''; for (var i = 0; i < bytes.length; i += 2) { res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256); } return res; } Buffer.prototype.slice = function slice(start, end) { var len = this.length; start = ~~start; end = end === undefined ? len : ~~end; if (start < 0) { start += len; if (start < 0) start = 0; } else if (start > len) { start = len; } if (end < 0) { end += len; if (end < 0) end = 0; } else if (end > len) { end = len; } if (end < start) end = start; var newBuf = this.subarray(start, end); // Return an augmented `Uint8Array` instance newBuf.__proto__ = Buffer.prototype; return newBuf; }; /* * Need to make sure that buffer isn't trying to write out of bounds. */ function checkOffset(offset, ext, length) { if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint'); if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length'); } Buffer.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) { offset = offset >>> 0; byteLength = byteLength >>> 0; if (!noAssert) checkOffset(offset, byteLength, this.length); var val = this[offset]; var mul = 1; var i = 0; while (++i < byteLength && (mul *= 0x100)) { val += this[offset + i] * mul; } return val; }; Buffer.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) { offset = offset >>> 0; byteLength = byteLength >>> 0; if (!noAssert) { checkOffset(offset, byteLength, this.length); } var val = this[offset + --byteLength]; var mul = 1; while (byteLength > 0 && (mul *= 0x100)) { val += this[offset + --byteLength] * mul; } return val; }; Buffer.prototype.readUInt8 = function readUInt8(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 1, this.length); return this[offset]; }; Buffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 2, this.length); return this[offset] | this[offset + 1] << 8; }; Buffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 2, this.length); return this[offset] << 8 | this[offset + 1]; }; Buffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 4, this.length); return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 0x1000000; }; Buffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 4, this.length); return this[offset] * 0x1000000 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]); }; Buffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) { offset = offset >>> 0; byteLength = byteLength >>> 0; if (!noAssert) checkOffset(offset, byteLength, this.length); var val = this[offset]; var mul = 1; var i = 0; while (++i < byteLength && (mul *= 0x100)) { val += this[offset + i] * mul; } mul *= 0x80; if (val >= mul) val -= Math.pow(2, 8 * byteLength); return val; }; Buffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) { offset = offset >>> 0; byteLength = byteLength >>> 0; if (!noAssert) checkOffset(offset, byteLength, this.length); var i = byteLength; var mul = 1; var val = this[offset + --i]; while (i > 0 && (mul *= 0x100)) { val += this[offset + --i] * mul; } mul *= 0x80; if (val >= mul) val -= Math.pow(2, 8 * byteLength); return val; }; Buffer.prototype.readInt8 = function readInt8(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 1, this.length); if (!(this[offset] & 0x80)) return this[offset]; return (0xff - this[offset] + 1) * -1; }; Buffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 2, this.length); var val = this[offset] | this[offset + 1] << 8; return val & 0x8000 ? val | 0xFFFF0000 : val; }; Buffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 2, this.length); var val = this[offset + 1] | this[offset] << 8; return val & 0x8000 ? val | 0xFFFF0000 : val; }; Buffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 4, this.length); return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24; }; Buffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 4, this.length); return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]; }; Buffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 4, this.length); return ieee754.read(this, offset, true, 23, 4); }; Buffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 4, this.length); return ieee754.read(this, offset, false, 23, 4); }; Buffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 8, this.length); return ieee754.read(this, offset, true, 52, 8); }; Buffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 8, this.length); return ieee754.read(this, offset, false, 52, 8); }; function checkInt(buf, value, offset, ext, max, min) { if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance'); if (value > max || value < min) throw new RangeError('"value" argument is out of bounds'); if (offset + ext > buf.length) throw new RangeError('Index out of range'); } Buffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) { value = +value; offset = offset >>> 0; byteLength = byteLength >>> 0; if (!noAssert) { var maxBytes = Math.pow(2, 8 * byteLength) - 1; checkInt(this, value, offset, byteLength, maxBytes, 0); } var mul = 1; var i = 0; this[offset] = value & 0xFF; while (++i < byteLength && (mul *= 0x100)) { this[offset + i] = value / mul & 0xFF; } return offset + byteLength; }; Buffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) { value = +value; offset = offset >>> 0; byteLength = byteLength >>> 0; if (!noAssert) { var maxBytes = Math.pow(2, 8 * byteLength) - 1; checkInt(this, value, offset, byteLength, maxBytes, 0); } var i = byteLength - 1; var mul = 1; this[offset + i] = value & 0xFF; while (--i >= 0 && (mul *= 0x100)) { this[offset + i] = value / mul & 0xFF; } return offset + byteLength; }; Buffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0); this[offset] = value & 0xff; return offset + 1; }; Buffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); this[offset] = value & 0xff; this[offset + 1] = value >>> 8; return offset + 2; }; Buffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); this[offset] = value >>> 8; this[offset + 1] = value & 0xff; return offset + 2; }; Buffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); this[offset + 3] = value >>> 24; this[offset + 2] = value >>> 16; this[offset + 1] = value >>> 8; this[offset] = value & 0xff; return offset + 4; }; Buffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); this[offset] = value >>> 24; this[offset + 1] = value >>> 16; this[offset + 2] = value >>> 8; this[offset + 3] = value & 0xff; return offset + 4; }; Buffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) { var limit = Math.pow(2, 8 * byteLength - 1); checkInt(this, value, offset, byteLength, limit - 1, -limit); } var i = 0; var mul = 1; var sub = 0; this[offset] = value & 0xFF; while (++i < byteLength && (mul *= 0x100)) { if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { sub = 1; } this[offset + i] = (value / mul >> 0) - sub & 0xFF; } return offset + byteLength; }; Buffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) { var limit = Math.pow(2, 8 * byteLength - 1); checkInt(this, value, offset, byteLength, limit - 1, -limit); } var i = byteLength - 1; var mul = 1; var sub = 0; this[offset + i] = value & 0xFF; while (--i >= 0 && (mul *= 0x100)) { if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { sub = 1; } this[offset + i] = (value / mul >> 0) - sub & 0xFF; } return offset + byteLength; }; Buffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80); if (value < 0) value = 0xff + value + 1; this[offset] = value & 0xff; return offset + 1; }; Buffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); this[offset] = value & 0xff; this[offset + 1] = value >>> 8; return offset + 2; }; Buffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); this[offset] = value >>> 8; this[offset + 1] = value & 0xff; return offset + 2; }; Buffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); this[offset] = value & 0xff; this[offset + 1] = value >>> 8; this[offset + 2] = value >>> 16; this[offset + 3] = value >>> 24; return offset + 4; }; Buffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); if (value < 0) value = 0xffffffff + value + 1; this[offset] = value >>> 24; this[offset + 1] = value >>> 16; this[offset + 2] = value >>> 8; this[offset + 3] = value & 0xff; return offset + 4; }; function checkIEEE754(buf, value, offset, ext, max, min) { if (offset + ext > buf.length) throw new RangeError('Index out of range'); if (offset < 0) throw new RangeError('Index out of range'); } function writeFloat(buf, value, offset, littleEndian, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) { checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38); } ieee754.write(buf, value, offset, littleEndian, 23, 4); return offset + 4; } Buffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) { return writeFloat(this, value, offset, true, noAssert); }; Buffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) { return writeFloat(this, value, offset, false, noAssert); }; function writeDouble(buf, value, offset, littleEndian, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) { checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308); } ieee754.write(buf, value, offset, littleEndian, 52, 8); return offset + 8; } Buffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) { return writeDouble(this, value, offset, true, noAssert); }; Buffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) { return writeDouble(this, value, offset, false, noAssert); }; // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) Buffer.prototype.copy = function copy(target, targetStart, start, end) { if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer'); if (!start) start = 0; if (!end && end !== 0) end = this.length; if (targetStart >= target.length) targetStart = target.length; if (!targetStart) targetStart = 0; if (end > 0 && end < start) end = start; // Copy 0 bytes; we're done if (end === start) return 0; if (target.length === 0 || this.length === 0) return 0; // Fatal error conditions if (targetStart < 0) { throw new RangeError('targetStart out of bounds'); } if (start < 0 || start >= this.length) throw new RangeError('Index out of range'); if (end < 0) throw new RangeError('sourceEnd out of bounds'); // Are we oob? if (end > this.length) end = this.length; if (target.length - targetStart < end - start) { end = target.length - targetStart + start; } var len = end - start; if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') { // Use built-in when available, missing from IE11 this.copyWithin(targetStart, start, end); } else if (this === target && start < targetStart && targetStart < end) { // descending copy from end for (var i = len - 1; i >= 0; --i) { target[i + targetStart] = this[i + start]; } } else { Uint8Array.prototype.set.call(target, this.subarray(start, end), targetStart); } return len; }; // Usage: // buffer.fill(number[, offset[, end]]) // buffer.fill(buffer[, offset[, end]]) // buffer.fill(string[, offset[, end]][, encoding]) Buffer.prototype.fill = function fill(val, start, end, encoding) { // Handle string cases: if (typeof val === 'string') { if (typeof start === 'string') { encoding = start; start = 0; end = this.length; } else if (typeof end === 'string') { encoding = end; end = this.length; } if (encoding !== undefined && typeof encoding !== 'string') { throw new TypeError('encoding must be a string'); } if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { throw new TypeError('Unknown encoding: ' + encoding); } if (val.length === 1) { var code = val.charCodeAt(0); if (encoding === 'utf8' && code < 128 || encoding === 'latin1') { // Fast path: If `val` fits into a single byte, use that numeric value. val = code; } } } else if (typeof val === 'number') { val = val & 255; } // Invalid ranges are not set to a default, so can range check early. if (start < 0 || this.length < start || this.length < end) { throw new RangeError('Out of range index'); } if (end <= start) { return this; } start = start >>> 0; end = end === undefined ? this.length : end >>> 0; if (!val) val = 0; var i; if (typeof val === 'number') { for (i = start; i < end; ++i) { this[i] = val; } } else { var bytes = Buffer.isBuffer(val) ? val : Buffer.from(val, encoding); var len = bytes.length; if (len === 0) { throw new TypeError('The value "' + val + '" is invalid for argument "value"'); } for (i = 0; i < end - start; ++i) { this[i + start] = bytes[i % len]; } } return this; }; // HELPER FUNCTIONS // ================ var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g; function base64clean(str) { // Node takes equal signs as end of the Base64 encoding str = str.split('=')[0]; // Node strips out invalid characters like \n and \t from the string, base64-js does not str = str.trim().replace(INVALID_BASE64_RE, ''); // Node converts strings with length < 2 to '' if (str.length < 2) return ''; // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not while (str.length % 4 !== 0) { str = str + '='; } return str; } function toHex(n) { if (n < 16) return '0' + n.toString(16); return n.toString(16); } function utf8ToBytes(string, units) { units = units || Infinity; var codePoint; var length = string.length; var leadSurrogate = null; var bytes = []; for (var i = 0; i < length; ++i) { codePoint = string.charCodeAt(i); // is surrogate component if (codePoint > 0xD7FF && codePoint < 0xE000) { // last char was a lead if (!leadSurrogate) { // no lead yet if (codePoint > 0xDBFF) { // unexpected trail if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); continue; } else if (i + 1 === length) { // unpaired lead if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); continue; } // valid lead leadSurrogate = codePoint; continue; } // 2 leads in a row if (codePoint < 0xDC00) { if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); leadSurrogate = codePoint; continue; } // valid surrogate pair codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000; } else if (leadSurrogate) { // valid bmp char, but last char was a lead if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); } leadSurrogate = null; // encode utf8 if (codePoint < 0x80) { if ((units -= 1) < 0) break; bytes.push(codePoint); } else if (codePoint < 0x800) { if ((units -= 2) < 0) break; bytes.push(codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80); } else if (codePoint < 0x10000) { if ((units -= 3) < 0) break; bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80); } else if (codePoint < 0x110000) { if ((units -= 4) < 0) break; bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80); } else { throw new Error('Invalid code point'); } } return bytes; } function asciiToBytes(str) { var byteArray = []; for (var i = 0; i < str.length; ++i) { // Node's code seems to be doing this and not & 0x7F.. byteArray.push(str.charCodeAt(i) & 0xFF); } return byteArray; } function utf16leToBytes(str, units) { var c, hi, lo; var byteArray = []; for (var i = 0; i < str.length; ++i) { if ((units -= 2) < 0) break; c = str.charCodeAt(i); hi = c >> 8; lo = c % 256; byteArray.push(lo); byteArray.push(hi); } return byteArray; } function base64ToBytes(str) { return base64.toByteArray(base64clean(str)); } function blitBuffer(src, dst, offset, length) { for (var i = 0; i < length; ++i) { if (i + offset >= dst.length || i >= src.length) break; dst[i + offset] = src[i]; } return i; } // ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass // the `instanceof` check but they should be treated as of that type. // See: https://github.com/feross/buffer/issues/166 function isInstance(obj, type) { return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name; } function numberIsNaN(obj) { // For IE11 support return obj !== obj; // eslint-disable-line no-self-compare } }).call(this); }).call(this, require("buffer").Buffer); }, { "base64-js": 5, "buffer": 6, "ieee754": 583 }], 7: [function (require, module, exports) { /*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ /* global define */ (function () { 'use strict'; var hasOwn = {}.hasOwnProperty; function classNames() { var classes = []; for (var i = 0; i < arguments.length; i++) { var arg = arguments[i]; if (!arg) continue; var argType = typeof arg; if (argType === 'string' || argType === 'number') { classes.push(arg); } else if (Array.isArray(arg)) { if (arg.length) { var inner = classNames.apply(null, arg); if (inner) { classes.push(inner); } } } else if (argType === 'object') { if (arg.toString === Object.prototype.toString) { for (var key in arg) { if (hasOwn.call(arg, key) && arg[key]) { classes.push(key); } } } else { classes.push(arg.toString()); } } } return classes.join(' '); } if (typeof module !== 'undefined' && module.exports) { classNames.default = classNames; module.exports = classNames; } else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) { // register as 'classnames', consistent with npm package name define('classnames', [], function () { return classNames; }); } else { window.classNames = classNames; } })(); }, {}], 8: [function (require, module, exports) { /** * Expose `Emitter`. */ if (typeof module !== 'undefined') { module.exports = Emitter; } /** * Initialize a new `Emitter`. * * @api public */ function Emitter(obj) { if (obj) return mixin(obj); } ; /** * Mixin the emitter properties. * * @param {Object} obj * @return {Object} * @api private */ function mixin(obj) { for (var key in Emitter.prototype) { obj[key] = Emitter.prototype[key]; } return obj; } /** * Listen on the given `event` with `fn`. * * @param {String} event * @param {Function} fn * @return {Emitter} * @api public */ Emitter.prototype.on = Emitter.prototype.addEventListener = function (event, fn) { this._callbacks = this._callbacks || {}; (this._callbacks['$' + event] = this._callbacks['$' + event] || []).push(fn); return this; }; /** * Adds an `event` listener that will be invoked a single * time then automatically removed. * * @param {String} event * @param {Function} fn * @return {Emitter} * @api public */ Emitter.prototype.once = function (event, fn) { function on() { this.off(event, on); fn.apply(this, arguments); } on.fn = fn; this.on(event, on); return this; }; /** * Remove the given callback for `event` or all * registered callbacks. * * @param {String} event * @param {Function} fn * @return {Emitter} * @api public */ Emitter.prototype.off = Emitter.prototype.removeListener = Emitter.prototype.removeAllListeners = Emitter.prototype.removeEventListener = function (event, fn) { this._callbacks = this._callbacks || {}; // all if (0 == arguments.length) { this._callbacks = {}; return this; } // specific event var callbacks = this._callbacks['$' + event]; if (!callbacks) return this; // remove all handlers if (1 == arguments.length) { delete this._callbacks['$' + event]; return this; } // remove specific handler var cb; for (var i = 0; i < callbacks.length; i++) { cb = callbacks[i]; if (cb === fn || cb.fn === fn) { callbacks.splice(i, 1); break; } } // Remove event specific arrays for event types that no // one is subscribed for to avoid memory leak. if (callbacks.length === 0) { delete this._callbacks['$' + event]; } return this; }; /** * Emit `event` with the given args. * * @param {String} event * @param {Mixed} ... * @return {Emitter} */ Emitter.prototype.emit = function (event) { this._callbacks = this._callbacks || {}; var args = new Array(arguments.length - 1), callbacks = this._callbacks['$' + event]; for (var i = 1; i < arguments.length; i++) { args[i - 1] = arguments[i]; } if (callbacks) { callbacks = callbacks.slice(0); for (var i = 0, len = callbacks.length; i < len; ++i) { callbacks[i].apply(this, args); } } return this; }; /** * Return array of callbacks for `event`. * * @param {String} event * @return {Array} * @api public */ Emitter.prototype.listeners = function (event) { this._callbacks = this._callbacks || {}; return this._callbacks['$' + event] || []; }; /** * Check if this emitter has `event` handlers. * * @param {String} event * @return {Boolean} * @api public */ Emitter.prototype.hasListeners = function (event) { return !!this.listeners(event).length; }; }, {}], 9: [function (require, module, exports) { require('../modules/es.symbol'); require('../modules/es.symbol.description'); require('../modules/es.symbol.async-iterator'); require('../modules/es.symbol.has-instance'); require('../modules/es.symbol.is-concat-spreadable'); require('../modules/es.symbol.iterator'); require('../modules/es.symbol.match'); require('../modules/es.symbol.match-all'); require('../modules/es.symbol.replace'); require('../modules/es.symbol.search'); require('../modules/es.symbol.species'); require('../modules/es.symbol.split'); require('../modules/es.symbol.to-primitive'); require('../modules/es.symbol.to-string-tag'); require('../modules/es.symbol.unscopables'); require('../modules/es.aggregate-error'); require('../modules/es.array.concat'); require('../modules/es.array.copy-within'); require('../modules/es.array.every'); require('../modules/es.array.fill'); require('../modules/es.array.filter'); require('../modules/es.array.find'); require('../modules/es.array.find-index'); require('../modules/es.array.flat'); require('../modules/es.array.flat-map'); require('../modules/es.array.for-each'); require('../modules/es.array.from'); require('../modules/es.array.includes'); require('../modules/es.array.index-of'); require('../modules/es.array.is-array'); require('../modules/es.array.iterator'); require('../modules/es.array.join'); require('../modules/es.array.last-index-of'); require('../modules/es.array.map'); require('../modules/es.array.of'); require('../modules/es.array.reduce'); require('../modules/es.array.reduce-right'); require('../modules/es.array.reverse'); require('../modules/es.array.slice'); require('../modules/es.array.some'); require('../modules/es.array.sort'); require('../modules/es.array.species'); require('../modules/es.array.splice'); require('../modules/es.array.unscopables.flat'); require('../modules/es.array.unscopables.flat-map'); require('../modules/es.array-buffer.constructor'); require('../modules/es.array-buffer.is-view'); require('../modules/es.array-buffer.slice'); require('../modules/es.data-view'); require('../modules/es.date.get-year'); require('../modules/es.date.now'); require('../modules/es.date.set-year'); require('../modules/es.date.to-gmt-string'); require('../modules/es.date.to-iso-string'); require('../modules/es.date.to-json'); require('../modules/es.date.to-primitive'); require('../modules/es.date.to-string'); require('../modules/es.escape'); require('../modules/es.function.bind'); require('../modules/es.function.has-instance'); require('../modules/es.function.name'); require('../modules/es.global-this'); require('../modules/es.json.stringify'); require('../modules/es.json.to-string-tag'); require('../modules/es.map'); require('../modules/es.math.acosh'); require('../modules/es.math.asinh'); require('../modules/es.math.atanh'); require('../modules/es.math.cbrt'); require('../modules/es.math.clz32'); require('../modules/es.math.cosh'); require('../modules/es.math.expm1'); require('../modules/es.math.fround'); require('../modules/es.math.hypot'); require('../modules/es.math.imul'); require('../modules/es.math.log10'); require('../modules/es.math.log1p'); require('../modules/es.math.log2'); require('../modules/es.math.sign'); require('../modules/es.math.sinh'); require('../modules/es.math.tanh'); require('../modules/es.math.to-string-tag'); require('../modules/es.math.trunc'); require('../modules/es.number.constructor'); require('../modules/es.number.epsilon'); require('../modules/es.number.is-finite'); require('../modules/es.number.is-integer'); require('../modules/es.number.is-nan'); require('../modules/es.number.is-safe-integer'); require('../modules/es.number.max-safe-integer'); require('../modules/es.number.min-safe-integer'); require('../modules/es.number.parse-float'); require('../modules/es.number.parse-int'); require('../modules/es.number.to-fixed'); require('../modules/es.number.to-precision'); require('../modules/es.object.assign'); require('../modules/es.object.create'); require('../modules/es.object.define-getter'); require('../modules/es.object.define-properties'); require('../modules/es.object.define-property'); require('../modules/es.object.define-setter'); require('../modules/es.object.entries'); require('../modules/es.object.freeze'); require('../modules/es.object.from-entries'); require('../modules/es.object.get-own-property-descriptor'); require('../modules/es.object.get-own-property-descriptors'); require('../modules/es.object.get-own-property-names'); require('../modules/es.object.get-prototype-of'); require('../modules/es.object.is'); require('../modules/es.object.is-extensible'); require('../modules/es.object.is-frozen'); require('../modules/es.object.is-sealed'); require('../modules/es.object.keys'); require('../modules/es.object.lookup-getter'); require('../modules/es.object.lookup-setter'); require('../modules/es.object.prevent-extensions'); require('../modules/es.object.seal'); require('../modules/es.object.set-prototype-of'); require('../modules/es.object.to-string'); require('../modules/es.object.values'); require('../modules/es.parse-float'); require('../modules/es.parse-int'); require('../modules/es.promise'); require('../modules/es.promise.all-settled'); require('../modules/es.promise.any'); require('../modules/es.promise.finally'); require('../modules/es.reflect.apply'); require('../modules/es.reflect.construct'); require('../modules/es.reflect.define-property'); require('../modules/es.reflect.delete-property'); require('../modules/es.reflect.get'); require('../modules/es.reflect.get-own-property-descriptor'); require('../modules/es.reflect.get-prototype-of'); require('../modules/es.reflect.has'); require('../modules/es.reflect.is-extensible'); require('../modules/es.reflect.own-keys'); require('../modules/es.reflect.prevent-extensions'); require('../modules/es.reflect.set'); require('../modules/es.reflect.set-prototype-of'); require('../modules/es.reflect.to-string-tag'); require('../modules/es.regexp.constructor'); require('../modules/es.regexp.dot-all'); require('../modules/es.regexp.exec'); require('../modules/es.regexp.flags'); require('../modules/es.regexp.sticky'); require('../modules/es.regexp.test'); require('../modules/es.regexp.to-string'); require('../modules/es.set'); require('../modules/es.string.code-point-at'); require('../modules/es.string.ends-with'); require('../modules/es.string.from-code-point'); require('../modules/es.string.includes'); require('../modules/es.string.iterator'); require('../modules/es.string.match'); require('../modules/es.string.match-all'); require('../modules/es.string.pad-end'); require('../modules/es.string.pad-start'); require('../modules/es.string.raw'); require('../modules/es.string.repeat'); require('../modules/es.string.replace'); require('../modules/es.string.replace-all'); require('../modules/es.string.search'); require('../modules/es.string.split'); require('../modules/es.string.starts-with'); require('../modules/es.string.substr'); require('../modules/es.string.trim'); require('../modules/es.string.trim-end'); require('../modules/es.string.trim-start'); require('../modules/es.string.anchor'); require('../modules/es.string.big'); require('../modules/es.string.blink'); require('../modules/es.string.bold'); require('../modules/es.string.fixed'); require('../modules/es.string.fontcolor'); require('../modules/es.string.fontsize'); require('../modules/es.string.italics'); require('../modules/es.string.link'); require('../modules/es.string.small'); require('../modules/es.string.strike'); require('../modules/es.string.sub'); require('../modules/es.string.sup'); require('../modules/es.typed-array.float32-array'); require('../modules/es.typed-array.float64-array'); require('../modules/es.typed-array.int8-array'); require('../modules/es.typed-array.int16-array'); require('../modules/es.typed-array.int32-array'); require('../modules/es.typed-array.uint8-array'); require('../modules/es.typed-array.uint8-clamped-array'); require('../modules/es.typed-array.uint16-array'); require('../modules/es.typed-array.uint32-array'); require('../modules/es.typed-array.copy-within'); require('../modules/es.typed-array.every'); require('../modules/es.typed-array.fill'); require('../modules/es.typed-array.filter'); require('../modules/es.typed-array.find'); require('../modules/es.typed-array.find-index'); require('../modules/es.typed-array.for-each'); require('../modules/es.typed-array.from'); require('../modules/es.typed-array.includes'); require('../modules/es.typed-array.index-of'); require('../modules/es.typed-array.iterator'); require('../modules/es.typed-array.join'); require('../modules/es.typed-array.last-index-of'); require('../modules/es.typed-array.map'); require('../modules/es.typed-array.of'); require('../modules/es.typed-array.reduce'); require('../modules/es.typed-array.reduce-right'); require('../modules/es.typed-array.reverse'); require('../modules/es.typed-array.set'); require('../modules/es.typed-array.slice'); require('../modules/es.typed-array.some'); require('../modules/es.typed-array.sort'); require('../modules/es.typed-array.subarray'); require('../modules/es.typed-array.to-locale-string'); require('../modules/es.typed-array.to-string'); require('../modules/es.unescape'); require('../modules/es.weak-map'); require('../modules/es.weak-set'); require('../modules/esnext.aggregate-error'); require('../modules/esnext.array.at'); require('../modules/esnext.array.filter-out'); require('../modules/esnext.array.find-last'); require('../modules/esnext.array.find-last-index'); require('../modules/esnext.array.is-template-object'); require('../modules/esnext.array.last-index'); require('../modules/esnext.array.last-item'); require('../modules/esnext.array.unique-by'); require('../modules/esnext.async-iterator.constructor'); require('../modules/esnext.async-iterator.as-indexed-pairs'); require('../modules/esnext.async-iterator.drop'); require('../modules/esnext.async-iterator.every'); require('../modules/esnext.async-iterator.filter'); require('../modules/esnext.async-iterator.find'); require('../modules/esnext.async-iterator.flat-map'); require('../modules/esnext.async-iterator.for-each'); require('../modules/esnext.async-iterator.from'); require('../modules/esnext.async-iterator.map'); require('../modules/esnext.async-iterator.reduce'); require('../modules/esnext.async-iterator.some'); require('../modules/esnext.async-iterator.take'); require('../modules/esnext.async-iterator.to-array'); require('../modules/esnext.bigint.range'); require('../modules/esnext.composite-key'); require('../modules/esnext.composite-symbol'); require('../modules/esnext.global-this'); require('../modules/esnext.iterator.constructor'); require('../modules/esnext.iterator.as-indexed-pairs'); require('../modules/esnext.iterator.drop'); require('../modules/esnext.iterator.every'); require('../modules/esnext.iterator.filter'); require('../modules/esnext.iterator.find'); require('../modules/esnext.iterator.flat-map'); require('../modules/esnext.iterator.for-each'); require('../modules/esnext.iterator.from'); require('../modules/esnext.iterator.map'); require('../modules/esnext.iterator.reduce'); require('../modules/esnext.iterator.some'); require('../modules/esnext.iterator.take'); require('../modules/esnext.iterator.to-array'); require('../modules/esnext.map.delete-all'); require('../modules/esnext.map.emplace'); require('../modules/esnext.map.every'); require('../modules/esnext.map.filter'); require('../modules/esnext.map.find'); require('../modules/esnext.map.find-key'); require('../modules/esnext.map.from'); require('../modules/esnext.map.group-by'); require('../modules/esnext.map.includes'); require('../modules/esnext.map.key-by'); require('../modules/esnext.map.key-of'); require('../modules/esnext.map.map-keys'); require('../modules/esnext.map.map-values'); require('../modules/esnext.map.merge'); require('../modules/esnext.map.of'); require('../modules/esnext.map.reduce'); require('../modules/esnext.map.some'); require('../modules/esnext.map.update'); require('../modules/esnext.map.update-or-insert'); require('../modules/esnext.map.upsert'); require('../modules/esnext.math.clamp'); require('../modules/esnext.math.deg-per-rad'); require('../modules/esnext.math.degrees'); require('../modules/esnext.math.fscale'); require('../modules/esnext.math.iaddh'); require('../modules/esnext.math.imulh'); require('../modules/esnext.math.isubh'); require('../modules/esnext.math.rad-per-deg'); require('../modules/esnext.math.radians'); require('../modules/esnext.math.scale'); require('../modules/esnext.math.seeded-prng'); require('../modules/esnext.math.signbit'); require('../modules/esnext.math.umulh'); require('../modules/esnext.number.from-string'); require('../modules/esnext.number.range'); require('../modules/esnext.object.has-own'); require('../modules/esnext.object.iterate-entries'); require('../modules/esnext.object.iterate-keys'); require('../modules/esnext.object.iterate-values'); require('../modules/esnext.observable'); require('../modules/esnext.promise.all-settled'); require('../modules/esnext.promise.any'); require('../modules/esnext.promise.try'); require('../modules/esnext.reflect.define-metadata'); require('../modules/esnext.reflect.delete-metadata'); require('../modules/esnext.reflect.get-metadata'); require('../modules/esnext.reflect.get-metadata-keys'); require('../modules/esnext.reflect.get-own-metadata'); require('../modules/esnext.reflect.get-own-metadata-keys'); require('../modules/esnext.reflect.has-metadata'); require('../modules/esnext.reflect.has-own-metadata'); require('../modules/esnext.reflect.metadata'); require('../modules/esnext.set.add-all'); require('../modules/esnext.set.delete-all'); require('../modules/esnext.set.difference'); require('../modules/esnext.set.every'); require('../modules/esnext.set.filter'); require('../modules/esnext.set.find'); require('../modules/esnext.set.from'); require('../modules/esnext.set.intersection'); require('../modules/esnext.set.is-disjoint-from'); require('../modules/esnext.set.is-subset-of'); require('../modules/esnext.set.is-superset-of'); require('../modules/esnext.set.join'); require('../modules/esnext.set.map'); require('../modules/esnext.set.of'); require('../modules/esnext.set.reduce'); require('../modules/esnext.set.some'); require('../modules/esnext.set.symmetric-difference'); require('../modules/esnext.set.union'); require('../modules/esnext.string.at'); require('../modules/esnext.string.code-points'); require('../modules/esnext.string.match-all'); require('../modules/esnext.string.replace-all'); require('../modules/esnext.symbol.async-dispose'); require('../modules/esnext.symbol.dispose'); require('../modules/esnext.symbol.matcher'); require('../modules/esnext.symbol.metadata'); require('../modules/esnext.symbol.observable'); require('../modules/esnext.symbol.pattern-match'); require('../modules/esnext.symbol.replace-all'); require('../modules/esnext.typed-array.at'); require('../modules/esnext.typed-array.filter-out'); require('../modules/esnext.typed-array.find-last'); require('../modules/esnext.typed-array.find-last-index'); require('../modules/esnext.typed-array.unique-by'); require('../modules/esnext.weak-map.delete-all'); require('../modules/esnext.weak-map.from'); require('../modules/esnext.weak-map.of'); require('../modules/esnext.weak-map.emplace'); require('../modules/esnext.weak-map.upsert'); require('../modules/esnext.weak-set.add-all'); require('../modules/esnext.weak-set.delete-all'); require('../modules/esnext.weak-set.from'); require('../modules/esnext.weak-set.of'); require('../modules/web.dom-collections.for-each'); require('../modules/web.dom-collections.iterator'); require('../modules/web.immediate'); require('../modules/web.queue-microtask'); require('../modules/web.timers'); require('../modules/web.url'); require('../modules/web.url.to-json'); require('../modules/web.url-search-params'); module.exports = require('../internals/path'); }, { "../internals/path": 148, "../modules/es.aggregate-error": 199, "../modules/es.array-buffer.constructor": 200, "../modules/es.array-buffer.is-view": 201, "../modules/es.array-buffer.slice": 202, "../modules/es.array.concat": 203, "../modules/es.array.copy-within": 204, "../modules/es.array.every": 205, "../modules/es.array.fill": 206, "../modules/es.array.filter": 207, "../modules/es.array.find": 209, "../modules/es.array.find-index": 208, "../modules/es.array.flat": 211, "../modules/es.array.flat-map": 210, "../modules/es.array.for-each": 212, "../modules/es.array.from": 213, "../modules/es.array.includes": 214, "../modules/es.array.index-of": 215, "../modules/es.array.is-array": 216, "../modules/es.array.iterator": 217, "../modules/es.array.join": 218, "../modules/es.array.last-index-of": 219, "../modules/es.array.map": 220, "../modules/es.array.of": 221, "../modules/es.array.reduce": 223, "../modules/es.array.reduce-right": 222, "../modules/es.array.reverse": 224, "../modules/es.array.slice": 225, "../modules/es.array.some": 226, "../modules/es.array.sort": 227, "../modules/es.array.species": 228, "../modules/es.array.splice": 229, "../modules/es.array.unscopables.flat": 231, "../modules/es.array.unscopables.flat-map": 230, "../modules/es.data-view": 232, "../modules/es.date.get-year": 233, "../modules/es.date.now": 234, "../modules/es.date.set-year": 235, "../modules/es.date.to-gmt-string": 236, "../modules/es.date.to-iso-string": 237, "../modules/es.date.to-json": 238, "../modules/es.date.to-primitive": 239, "../modules/es.date.to-string": 240, "../modules/es.escape": 241, "../modules/es.function.bind": 242, "../modules/es.function.has-instance": 243, "../modules/es.function.name": 244, "../modules/es.global-this": 245, "../modules/es.json.stringify": 246, "../modules/es.json.to-string-tag": 247, "../modules/es.map": 248, "../modules/es.math.acosh": 249, "../modules/es.math.asinh": 250, "../modules/es.math.atanh": 251, "../modules/es.math.cbrt": 252, "../modules/es.math.clz32": 253, "../modules/es.math.cosh": 254, "../modules/es.math.expm1": 255, "../modules/es.math.fround": 256, "../modules/es.math.hypot": 257, "../modules/es.math.imul": 258, "../modules/es.math.log10": 259, "../modules/es.math.log1p": 260, "../modules/es.math.log2": 261, "../modules/es.math.sign": 262, "../modules/es.math.sinh": 263, "../modules/es.math.tanh": 264, "../modules/es.math.to-string-tag": 265, "../modules/es.math.trunc": 266, "../modules/es.number.constructor": 267, "../modules/es.number.epsilon": 268, "../modules/es.number.is-finite": 269, "../modules/es.number.is-integer": 270, "../modules/es.number.is-nan": 271, "../modules/es.number.is-safe-integer": 272, "../modules/es.number.max-safe-integer": 273, "../modules/es.number.min-safe-integer": 274, "../modules/es.number.parse-float": 275, "../modules/es.number.parse-int": 276, "../modules/es.number.to-fixed": 277, "../modules/es.number.to-precision": 278, "../modules/es.object.assign": 279, "../modules/es.object.create": 280, "../modules/es.object.define-getter": 281, "../modules/es.object.define-properties": 282, "../modules/es.object.define-property": 283, "../modules/es.object.define-setter": 284, "../modules/es.object.entries": 285, "../modules/es.object.freeze": 286, "../modules/es.object.from-entries": 287, "../modules/es.object.get-own-property-descriptor": 288, "../modules/es.object.get-own-property-descriptors": 289, "../modules/es.object.get-own-property-names": 290, "../modules/es.object.get-prototype-of": 291, "../modules/es.object.is": 295, "../modules/es.object.is-extensible": 292, "../modules/es.object.is-frozen": 293, "../modules/es.object.is-sealed": 294, "../modules/es.object.keys": 296, "../modules/es.object.lookup-getter": 297, "../modules/es.object.lookup-setter": 298, "../modules/es.object.prevent-extensions": 299, "../modules/es.object.seal": 300, "../modules/es.object.set-prototype-of": 301, "../modules/es.object.to-string": 302, "../modules/es.object.values": 303, "../modules/es.parse-float": 304, "../modules/es.parse-int": 305, "../modules/es.promise": 309, "../modules/es.promise.all-settled": 306, "../modules/es.promise.any": 307, "../modules/es.promise.finally": 308, "../modules/es.reflect.apply": 310, "../modules/es.reflect.construct": 311, "../modules/es.reflect.define-property": 312, "../modules/es.reflect.delete-property": 313, "../modules/es.reflect.get": 316, "../modules/es.reflect.get-own-property-descriptor": 314, "../modules/es.reflect.get-prototype-of": 315, "../modules/es.reflect.has": 317, "../modules/es.reflect.is-extensible": 318, "../modules/es.reflect.own-keys": 319, "../modules/es.reflect.prevent-extensions": 320, "../modules/es.reflect.set": 322, "../modules/es.reflect.set-prototype-of": 321, "../modules/es.reflect.to-string-tag": 323, "../modules/es.regexp.constructor": 324, "../modules/es.regexp.dot-all": 325, "../modules/es.regexp.exec": 326, "../modules/es.regexp.flags": 327, "../modules/es.regexp.sticky": 328, "../modules/es.regexp.test": 329, "../modules/es.regexp.to-string": 330, "../modules/es.set": 331, "../modules/es.string.anchor": 332, "../modules/es.string.big": 333, "../modules/es.string.blink": 334, "../modules/es.string.bold": 335, "../modules/es.string.code-point-at": 336, "../modules/es.string.ends-with": 337, "../modules/es.string.fixed": 338, "../modules/es.string.fontcolor": 339, "../modules/es.string.fontsize": 340, "../modules/es.string.from-code-point": 341, "../modules/es.string.includes": 342, "../modules/es.string.italics": 343, "../modules/es.string.iterator": 344, "../modules/es.string.link": 345, "../modules/es.string.match": 347, "../modules/es.string.match-all": 346, "../modules/es.string.pad-end": 348, "../modules/es.string.pad-start": 349, "../modules/es.string.raw": 350, "../modules/es.string.repeat": 351, "../modules/es.string.replace": 353, "../modules/es.string.replace-all": 352, "../modules/es.string.search": 354, "../modules/es.string.small": 355, "../modules/es.string.split": 356, "../modules/es.string.starts-with": 357, "../modules/es.string.strike": 358, "../modules/es.string.sub": 359, "../modules/es.string.substr": 360, "../modules/es.string.sup": 361, "../modules/es.string.trim": 364, "../modules/es.string.trim-end": 362, "../modules/es.string.trim-start": 363, "../modules/es.symbol": 370, "../modules/es.symbol.async-iterator": 365, "../modules/es.symbol.description": 366, "../modules/es.symbol.has-instance": 367, "../modules/es.symbol.is-concat-spreadable": 368, "../modules/es.symbol.iterator": 369, "../modules/es.symbol.match": 372, "../modules/es.symbol.match-all": 371, "../modules/es.symbol.replace": 373, "../modules/es.symbol.search": 374, "../modules/es.symbol.species": 375, "../modules/es.symbol.split": 376, "../modules/es.symbol.to-primitive": 377, "../modules/es.symbol.to-string-tag": 378, "../modules/es.symbol.unscopables": 379, "../modules/es.typed-array.copy-within": 380, "../modules/es.typed-array.every": 381, "../modules/es.typed-array.fill": 382, "../modules/es.typed-array.filter": 383, "../modules/es.typed-array.find": 385, "../modules/es.typed-array.find-index": 384, "../modules/es.typed-array.float32-array": 386, "../modules/es.typed-array.float64-array": 387, "../modules/es.typed-array.for-each": 388, "../modules/es.typed-array.from": 389, "../modules/es.typed-array.includes": 390, "../modules/es.typed-array.index-of": 391, "../modules/es.typed-array.int16-array": 392, "../modules/es.typed-array.int32-array": 393, "../modules/es.typed-array.int8-array": 394, "../modules/es.typed-array.iterator": 395, "../modules/es.typed-array.join": 396, "../modules/es.typed-array.last-index-of": 397, "../modules/es.typed-array.map": 398, "../modules/es.typed-array.of": 399, "../modules/es.typed-array.reduce": 401, "../modules/es.typed-array.reduce-right": 400, "../modules/es.typed-array.reverse": 402, "../modules/es.typed-array.set": 403, "../modules/es.typed-array.slice": 404, "../modules/es.typed-array.some": 405, "../modules/es.typed-array.sort": 406, "../modules/es.typed-array.subarray": 407, "../modules/es.typed-array.to-locale-string": 408, "../modules/es.typed-array.to-string": 409, "../modules/es.typed-array.uint16-array": 410, "../modules/es.typed-array.uint32-array": 411, "../modules/es.typed-array.uint8-array": 412, "../modules/es.typed-array.uint8-clamped-array": 413, "../modules/es.unescape": 414, "../modules/es.weak-map": 415, "../modules/es.weak-set": 416, "../modules/esnext.aggregate-error": 417, "../modules/esnext.array.at": 418, "../modules/esnext.array.filter-out": 419, "../modules/esnext.array.find-last": 421, "../modules/esnext.array.find-last-index": 420, "../modules/esnext.array.is-template-object": 422, "../modules/esnext.array.last-index": 423, "../modules/esnext.array.last-item": 424, "../modules/esnext.array.unique-by": 425, "../modules/esnext.async-iterator.as-indexed-pairs": 426, "../modules/esnext.async-iterator.constructor": 427, "../modules/esnext.async-iterator.drop": 428, "../modules/esnext.async-iterator.every": 429, "../modules/esnext.async-iterator.filter": 430, "../modules/esnext.async-iterator.find": 431, "../modules/esnext.async-iterator.flat-map": 432, "../modules/esnext.async-iterator.for-each": 433, "../modules/esnext.async-iterator.from": 434, "../modules/esnext.async-iterator.map": 435, "../modules/esnext.async-iterator.reduce": 436, "../modules/esnext.async-iterator.some": 437, "../modules/esnext.async-iterator.take": 438, "../modules/esnext.async-iterator.to-array": 439, "../modules/esnext.bigint.range": 440, "../modules/esnext.composite-key": 441, "../modules/esnext.composite-symbol": 442, "../modules/esnext.global-this": 443, "../modules/esnext.iterator.as-indexed-pairs": 444, "../modules/esnext.iterator.constructor": 445, "../modules/esnext.iterator.drop": 446, "../modules/esnext.iterator.every": 447, "../modules/esnext.iterator.filter": 448, "../modules/esnext.iterator.find": 449, "../modules/esnext.iterator.flat-map": 450, "../modules/esnext.iterator.for-each": 451, "../modules/esnext.iterator.from": 452, "../modules/esnext.iterator.map": 453, "../modules/esnext.iterator.reduce": 454, "../modules/esnext.iterator.some": 455, "../modules/esnext.iterator.take": 456, "../modules/esnext.iterator.to-array": 457, "../modules/esnext.map.delete-all": 458, "../modules/esnext.map.emplace": 459, "../modules/esnext.map.every": 460, "../modules/esnext.map.filter": 461, "../modules/esnext.map.find": 463, "../modules/esnext.map.find-key": 462, "../modules/esnext.map.from": 464, "../modules/esnext.map.group-by": 465, "../modules/esnext.map.includes": 466, "../modules/esnext.map.key-by": 467, "../modules/esnext.map.key-of": 468, "../modules/esnext.map.map-keys": 469, "../modules/esnext.map.map-values": 470, "../modules/esnext.map.merge": 471, "../modules/esnext.map.of": 472, "../modules/esnext.map.reduce": 473, "../modules/esnext.map.some": 474, "../modules/esnext.map.update": 476, "../modules/esnext.map.update-or-insert": 475, "../modules/esnext.map.upsert": 477, "../modules/esnext.math.clamp": 478, "../modules/esnext.math.deg-per-rad": 479, "../modules/esnext.math.degrees": 480, "../modules/esnext.math.fscale": 481, "../modules/esnext.math.iaddh": 482, "../modules/esnext.math.imulh": 483, "../modules/esnext.math.isubh": 484, "../modules/esnext.math.rad-per-deg": 485, "../modules/esnext.math.radians": 486, "../modules/esnext.math.scale": 487, "../modules/esnext.math.seeded-prng": 488, "../modules/esnext.math.signbit": 489, "../modules/esnext.math.umulh": 490, "../modules/esnext.number.from-string": 491, "../modules/esnext.number.range": 492, "../modules/esnext.object.has-own": 493, "../modules/esnext.object.iterate-entries": 494, "../modules/esnext.object.iterate-keys": 495, "../modules/esnext.object.iterate-values": 496, "../modules/esnext.observable": 497, "../modules/esnext.promise.all-settled": 498, "../modules/esnext.promise.any": 499, "../modules/esnext.promise.try": 500, "../modules/esnext.reflect.define-metadata": 501, "../modules/esnext.reflect.delete-metadata": 502, "../modules/esnext.reflect.get-metadata": 504, "../modules/esnext.reflect.get-metadata-keys": 503, "../modules/esnext.reflect.get-own-metadata": 506, "../modules/esnext.reflect.get-own-metadata-keys": 505, "../modules/esnext.reflect.has-metadata": 507, "../modules/esnext.reflect.has-own-metadata": 508, "../modules/esnext.reflect.metadata": 509, "../modules/esnext.set.add-all": 510, "../modules/esnext.set.delete-all": 511, "../modules/esnext.set.difference": 512, "../modules/esnext.set.every": 513, "../modules/esnext.set.filter": 514, "../modules/esnext.set.find": 515, "../modules/esnext.set.from": 516, "../modules/esnext.set.intersection": 517, "../modules/esnext.set.is-disjoint-from": 518, "../modules/esnext.set.is-subset-of": 519, "../modules/esnext.set.is-superset-of": 520, "../modules/esnext.set.join": 521, "../modules/esnext.set.map": 522, "../modules/esnext.set.of": 523, "../modules/esnext.set.reduce": 524, "../modules/esnext.set.some": 525, "../modules/esnext.set.symmetric-difference": 526, "../modules/esnext.set.union": 527, "../modules/esnext.string.at": 528, "../modules/esnext.string.code-points": 529, "../modules/esnext.string.match-all": 530, "../modules/esnext.string.replace-all": 531, "../modules/esnext.symbol.async-dispose": 532, "../modules/esnext.symbol.dispose": 533, "../modules/esnext.symbol.matcher": 534, "../modules/esnext.symbol.metadata": 535, "../modules/esnext.symbol.observable": 536, "../modules/esnext.symbol.pattern-match": 537, "../modules/esnext.symbol.replace-all": 538, "../modules/esnext.typed-array.at": 539, "../modules/esnext.typed-array.filter-out": 540, "../modules/esnext.typed-array.find-last": 542, "../modules/esnext.typed-array.find-last-index": 541, "../modules/esnext.typed-array.unique-by": 543, "../modules/esnext.weak-map.delete-all": 544, "../modules/esnext.weak-map.emplace": 545, "../modules/esnext.weak-map.from": 546, "../modules/esnext.weak-map.of": 547, "../modules/esnext.weak-map.upsert": 548, "../modules/esnext.weak-set.add-all": 549, "../modules/esnext.weak-set.delete-all": 550, "../modules/esnext.weak-set.from": 551, "../modules/esnext.weak-set.of": 552, "../modules/web.dom-collections.for-each": 553, "../modules/web.dom-collections.iterator": 554, "../modules/web.immediate": 555, "../modules/web.queue-microtask": 556, "../modules/web.timers": 557, "../modules/web.url": 559, "../modules/web.url-search-params": 558, "../modules/web.url.to-json": 560 }], 10: [function (require, module, exports) { module.exports = require('./features'); }, { "./features": 9 }], 11: [function (require, module, exports) { module.exports = function (it) { if (typeof it != 'function') { throw TypeError(String(it) + ' is not a function'); } return it; }; }, {}], 12: [function (require, module, exports) { var isObject = require('../internals/is-object'); module.exports = function (it) { if (!isObject(it) && it !== null) { throw TypeError("Can't set " + String(it) + ' as a prototype'); } return it; }; }, { "../internals/is-object": 104 }], 13: [function (require, module, exports) { var wellKnownSymbol = require('../internals/well-known-symbol'); var create = require('../internals/object-create'); var definePropertyModule = require('../internals/object-define-property'); var UNSCOPABLES = wellKnownSymbol('unscopables'); var ArrayPrototype = Array.prototype; // Array.prototype[@@unscopables] // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables if (ArrayPrototype[UNSCOPABLES] == undefined) { definePropertyModule.f(ArrayPrototype, UNSCOPABLES, { configurable: true, value: create(null) }); } // add a key to Array.prototype[@@unscopables] module.exports = function (key) { ArrayPrototype[UNSCOPABLES][key] = true; }; }, { "../internals/object-create": 131, "../internals/object-define-property": 133, "../internals/well-known-symbol": 197 }], 14: [function (require, module, exports) { 'use strict'; var charAt = require('../internals/string-multibyte').charAt; // `AdvanceStringIndex` abstract operation // https://tc39.es/ecma262/#sec-advancestringindex module.exports = function (S, index, unicode) { return index + (unicode ? charAt(S, index).length : 1); }; }, { "../internals/string-multibyte": 171 }], 15: [function (require, module, exports) { module.exports = function (it, Constructor, name) { if (!(it instanceof Constructor)) { throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation'); } return it; }; }, {}], 16: [function (require, module, exports) { var isObject = require('../internals/is-object'); module.exports = function (it) { if (!isObject(it)) { throw TypeError(String(it) + ' is not an object'); } return it; }; }, { "../internals/is-object": 104 }], 17: [function (require, module, exports) { // eslint-disable-next-line es/no-typed-arrays -- safe module.exports = typeof ArrayBuffer !== 'undefined' && typeof DataView !== 'undefined'; }, {}], 18: [function (require, module, exports) { 'use strict'; var NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-native'); var DESCRIPTORS = require('../internals/descriptors'); var global = require('../internals/global'); var isObject = require('../internals/is-object'); var has = require('../internals/has'); var classof = require('../internals/classof'); var createNonEnumerableProperty = require('../internals/create-non-enumerable-property'); var redefine = require('../internals/redefine'); var defineProperty = require('../internals/object-define-property').f; var getPrototypeOf = require('../internals/object-get-prototype-of'); var setPrototypeOf = require('../internals/object-set-prototype-of'); var wellKnownSymbol = require('../internals/well-known-symbol'); var uid = require('../internals/uid'); var Int8Array = global.Int8Array; var Int8ArrayPrototype = Int8Array && Int8Array.prototype; var Uint8ClampedArray = global.Uint8ClampedArray; var Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype; var TypedArray = Int8Array && getPrototypeOf(Int8Array); var TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf(Int8ArrayPrototype); var ObjectPrototype = Object.prototype; var isPrototypeOf = ObjectPrototype.isPrototypeOf; var TO_STRING_TAG = wellKnownSymbol('toStringTag'); var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG'); // Fixing native typed arrays in Opera Presto crashes the browser, see #595 var NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(global.opera) !== 'Opera'; var TYPED_ARRAY_TAG_REQIRED = false; var NAME; var TypedArrayConstructorsList = { Int8Array: 1, Uint8Array: 1, Uint8ClampedArray: 1, Int16Array: 2, Uint16Array: 2, Int32Array: 4, Uint32Array: 4, Float32Array: 4, Float64Array: 8 }; var BigIntArrayConstructorsList = { BigInt64Array: 8, BigUint64Array: 8 }; var isView = function isView(it) { if (!isObject(it)) return false; var klass = classof(it); return klass === 'DataView' || has(TypedArrayConstructorsList, klass) || has(BigIntArrayConstructorsList, klass); }; var isTypedArray = function isTypedArray(it) { if (!isObject(it)) return false; var klass = classof(it); return has(TypedArrayConstructorsList, klass) || has(BigIntArrayConstructorsList, klass); }; var aTypedArray = function aTypedArray(it) { if (isTypedArray(it)) return it; throw TypeError('Target is not a typed array'); }; var aTypedArrayConstructor = function aTypedArrayConstructor(C) { if (setPrototypeOf) { if (isPrototypeOf.call(TypedArray, C)) return C; } else for (var ARRAY in TypedArrayConstructorsList) { if (has(TypedArrayConstructorsList, NAME)) { var TypedArrayConstructor = global[ARRAY]; if (TypedArrayConstructor && (C === TypedArrayConstructor || isPrototypeOf.call(TypedArrayConstructor, C))) { return C; } } } throw TypeError('Target is not a typed array constructor'); }; var exportTypedArrayMethod = function exportTypedArrayMethod(KEY, property, forced) { if (!DESCRIPTORS) return; if (forced) for (var ARRAY in TypedArrayConstructorsList) { var TypedArrayConstructor = global[ARRAY]; if (TypedArrayConstructor && has(TypedArrayConstructor.prototype, KEY)) try { delete TypedArrayConstructor.prototype[KEY]; } catch (error) { /* empty */ } } if (!TypedArrayPrototype[KEY] || forced) { redefine(TypedArrayPrototype, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property); } }; var exportTypedArrayStaticMethod = function exportTypedArrayStaticMethod(KEY, property, forced) { var ARRAY, TypedArrayConstructor; if (!DESCRIPTORS) return; if (setPrototypeOf) { if (forced) for (ARRAY in TypedArrayConstructorsList) { TypedArrayConstructor = global[ARRAY]; if (TypedArrayConstructor && has(TypedArrayConstructor, KEY)) try { delete TypedArrayConstructor[KEY]; } catch (error) { /* empty */ } } if (!TypedArray[KEY] || forced) { // V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable try { return redefine(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && TypedArray[KEY] || property); } catch (error) { /* empty */ } } else return; } for (ARRAY in TypedArrayConstructorsList) { TypedArrayConstructor = global[ARRAY]; if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) { redefine(TypedArrayConstructor, KEY, property); } } }; for (NAME in TypedArrayConstructorsList) { if (!global[NAME]) NATIVE_ARRAY_BUFFER_VIEWS = false; } // WebKit bug - typed arrays constructors prototype is Object.prototype if (!NATIVE_ARRAY_BUFFER_VIEWS || typeof TypedArray != 'function' || TypedArray === Function.prototype) { // eslint-disable-next-line no-shadow -- safe TypedArray = function TypedArray() { throw TypeError('Incorrect invocation'); }; if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) { if (global[NAME]) setPrototypeOf(global[NAME], TypedArray); } } if (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) { TypedArrayPrototype = TypedArray.prototype; if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) { if (global[NAME]) setPrototypeOf(global[NAME].prototype, TypedArrayPrototype); } } // WebKit bug - one more object in Uint8ClampedArray prototype chain if (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) { setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype); } if (DESCRIPTORS && !has(TypedArrayPrototype, TO_STRING_TAG)) { TYPED_ARRAY_TAG_REQIRED = true; defineProperty(TypedArrayPrototype, TO_STRING_TAG, { get: function get() { return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined; } }); for (NAME in TypedArrayConstructorsList) { if (global[NAME]) { createNonEnumerableProperty(global[NAME], TYPED_ARRAY_TAG, NAME); } } } module.exports = { NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS, TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQIRED && TYPED_ARRAY_TAG, aTypedArray: aTypedArray, aTypedArrayConstructor: aTypedArrayConstructor, exportTypedArrayMethod: exportTypedArrayMethod, exportTypedArrayStaticMethod: exportTypedArrayStaticMethod, isView: isView, isTypedArray: isTypedArray, TypedArray: TypedArray, TypedArrayPrototype: TypedArrayPrototype }; }, { "../internals/array-buffer-native": 17, "../internals/classof": 40, "../internals/create-non-enumerable-property": 54, "../internals/descriptors": 61, "../internals/global": 88, "../internals/has": 89, "../internals/is-object": 104, "../internals/object-define-property": 133, "../internals/object-get-prototype-of": 138, "../internals/object-set-prototype-of": 144, "../internals/redefine": 152, "../internals/uid": 194, "../internals/well-known-symbol": 197 }], 19: [function (require, module, exports) { 'use strict'; var global = require('../internals/global'); var DESCRIPTORS = require('../internals/descriptors'); var NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-native'); var createNonEnumerableProperty = require('../internals/create-non-enumerable-property'); var redefineAll = require('../internals/redefine-all'); var fails = require('../internals/fails'); var anInstance = require('../internals/an-instance'); var toInteger = require('../internals/to-integer'); var toLength = require('../internals/to-length'); var toIndex = require('../internals/to-index'); var IEEE754 = require('../internals/ieee754'); var getPrototypeOf = require('../internals/object-get-prototype-of'); var setPrototypeOf = require('../internals/object-set-prototype-of'); var getOwnPropertyNames = require('../internals/object-get-own-property-names').f; var defineProperty = require('../internals/object-define-property').f; var arrayFill = require('../internals/array-fill'); var setToStringTag = require('../internals/set-to-string-tag'); var InternalStateModule = require('../internals/internal-state'); var getInternalState = InternalStateModule.get; var setInternalState = InternalStateModule.set; var ARRAY_BUFFER = 'ArrayBuffer'; var DATA_VIEW = 'DataView'; var PROTOTYPE = 'prototype'; var WRONG_LENGTH = 'Wrong length'; var WRONG_INDEX = 'Wrong index'; var NativeArrayBuffer = global[ARRAY_BUFFER]; var $ArrayBuffer = NativeArrayBuffer; var $DataView = global[DATA_VIEW]; var $DataViewPrototype = $DataView && $DataView[PROTOTYPE]; var ObjectPrototype = Object.prototype; var RangeError = global.RangeError; var packIEEE754 = IEEE754.pack; var unpackIEEE754 = IEEE754.unpack; var packInt8 = function packInt8(number) { return [number & 0xFF]; }; var packInt16 = function packInt16(number) { return [number & 0xFF, number >> 8 & 0xFF]; }; var packInt32 = function packInt32(number) { return [number & 0xFF, number >> 8 & 0xFF, number >> 16 & 0xFF, number >> 24 & 0xFF]; }; var unpackInt32 = function unpackInt32(buffer) { return buffer[3] << 24 | buffer[2] << 16 | buffer[1] << 8 | buffer[0]; }; var packFloat32 = function packFloat32(number) { return packIEEE754(number, 23, 4); }; var packFloat64 = function packFloat64(number) { return packIEEE754(number, 52, 8); }; var addGetter = function addGetter(Constructor, key) { defineProperty(Constructor[PROTOTYPE], key, { get: function get() { return getInternalState(this)[key]; } }); }; var get = function get(view, count, index, isLittleEndian) { var intIndex = toIndex(index); var store = getInternalState(view); if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX); var bytes = getInternalState(store.buffer).bytes; var start = intIndex + store.byteOffset; var pack = bytes.slice(start, start + count); return isLittleEndian ? pack : pack.reverse(); }; var set = function set(view, count, index, conversion, value, isLittleEndian) { var intIndex = toIndex(index); var store = getInternalState(view); if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX); var bytes = getInternalState(store.buffer).bytes; var start = intIndex + store.byteOffset; var pack = conversion(+value); for (var i = 0; i < count; i++) { bytes[start + i] = pack[isLittleEndian ? i : count - i - 1]; } }; if (!NATIVE_ARRAY_BUFFER) { $ArrayBuffer = function ArrayBuffer(length) { anInstance(this, $ArrayBuffer, ARRAY_BUFFER); var byteLength = toIndex(length); setInternalState(this, { bytes: arrayFill.call(new Array(byteLength), 0), byteLength: byteLength }); if (!DESCRIPTORS) this.byteLength = byteLength; }; $DataView = function DataView(buffer, byteOffset, byteLength) { anInstance(this, $DataView, DATA_VIEW); anInstance(buffer, $ArrayBuffer, DATA_VIEW); var bufferLength = getInternalState(buffer).byteLength; var offset = toInteger(byteOffset); if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset'); byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH); setInternalState(this, { buffer: buffer, byteLength: byteLength, byteOffset: offset }); if (!DESCRIPTORS) { this.buffer = buffer; this.byteLength = byteLength; this.byteOffset = offset; } }; if (DESCRIPTORS) { addGetter($ArrayBuffer, 'byteLength'); addGetter($DataView, 'buffer'); addGetter($DataView, 'byteLength'); addGetter($DataView, 'byteOffset'); } redefineAll($DataView[PROTOTYPE], { getInt8: function getInt8(byteOffset) { return get(this, 1, byteOffset)[0] << 24 >> 24; }, getUint8: function getUint8(byteOffset) { return get(this, 1, byteOffset)[0]; }, getInt16: function getInt16(byteOffset /* , littleEndian */ ) { var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined); return (bytes[1] << 8 | bytes[0]) << 16 >> 16; }, getUint16: function getUint16(byteOffset /* , littleEndian */ ) { var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined); return bytes[1] << 8 | bytes[0]; }, getInt32: function getInt32(byteOffset /* , littleEndian */ ) { return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)); }, getUint32: function getUint32(byteOffset /* , littleEndian */ ) { return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)) >>> 0; }, getFloat32: function getFloat32(byteOffset /* , littleEndian */ ) { return unpackIEEE754(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 23); }, getFloat64: function getFloat64(byteOffset /* , littleEndian */ ) { return unpackIEEE754(get(this, 8, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 52); }, setInt8: function setInt8(byteOffset, value) { set(this, 1, byteOffset, packInt8, value); }, setUint8: function setUint8(byteOffset, value) { set(this, 1, byteOffset, packInt8, value); }, setInt16: function setInt16(byteOffset, value /* , littleEndian */ ) { set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined); }, setUint16: function setUint16(byteOffset, value /* , littleEndian */ ) { set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined); }, setInt32: function setInt32(byteOffset, value /* , littleEndian */ ) { set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined); }, setUint32: function setUint32(byteOffset, value /* , littleEndian */ ) { set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined); }, setFloat32: function setFloat32(byteOffset, value /* , littleEndian */ ) { set(this, 4, byteOffset, packFloat32, value, arguments.length > 2 ? arguments[2] : undefined); }, setFloat64: function setFloat64(byteOffset, value /* , littleEndian */ ) { set(this, 8, byteOffset, packFloat64, value, arguments.length > 2 ? arguments[2] : undefined); } }); } else { /* eslint-disable no-new -- required for testing */ if (!fails(function () { NativeArrayBuffer(1); }) || !fails(function () { new NativeArrayBuffer(-1); }) || fails(function () { new NativeArrayBuffer(); new NativeArrayBuffer(1.5); new NativeArrayBuffer(NaN); return NativeArrayBuffer.name != ARRAY_BUFFER; })) { /* eslint-enable no-new -- required for testing */ $ArrayBuffer = function ArrayBuffer(length) { anInstance(this, $ArrayBuffer); return new NativeArrayBuffer(toIndex(length)); }; var ArrayBufferPrototype = $ArrayBuffer[PROTOTYPE] = NativeArrayBuffer[PROTOTYPE]; for (var keys = getOwnPropertyNames(NativeArrayBuffer), j = 0, key; keys.length > j;) { if (!((key = keys[j++]) in $ArrayBuffer)) { createNonEnumerableProperty($ArrayBuffer, key, NativeArrayBuffer[key]); } } ArrayBufferPrototype.constructor = $ArrayBuffer; } // WebKit bug - the same parent prototype for typed arrays and data view if (setPrototypeOf && getPrototypeOf($DataViewPrototype) !== ObjectPrototype) { setPrototypeOf($DataViewPrototype, ObjectPrototype); } // iOS Safari 7.x bug var testView = new $DataView(new $ArrayBuffer(2)); var $setInt8 = $DataViewPrototype.setInt8; testView.setInt8(0, 2147483648); testView.setInt8(1, 2147483649); if (testView.getInt8(0) || !testView.getInt8(1)) redefineAll($DataViewPrototype, { setInt8: function setInt8(byteOffset, value) { $setInt8.call(this, byteOffset, value << 24 >> 24); }, setUint8: function setUint8(byteOffset, value) { $setInt8.call(this, byteOffset, value << 24 >> 24); } }, { unsafe: true }); } setToStringTag($ArrayBuffer, ARRAY_BUFFER); setToStringTag($DataView, DATA_VIEW); module.exports = { ArrayBuffer: $ArrayBuffer, DataView: $DataView }; }, { "../internals/an-instance": 15, "../internals/array-buffer-native": 17, "../internals/array-fill": 21, "../internals/create-non-enumerable-property": 54, "../internals/descriptors": 61, "../internals/fails": 75, "../internals/global": 88, "../internals/ieee754": 94, "../internals/internal-state": 99, "../internals/object-define-property": 133, "../internals/object-get-own-property-names": 136, "../internals/object-get-prototype-of": 138, "../internals/object-set-prototype-of": 144, "../internals/redefine-all": 151, "../internals/set-to-string-tag": 165, "../internals/to-index": 181, "../internals/to-integer": 183, "../internals/to-length": 184 }], 20: [function (require, module, exports) { 'use strict'; var toObject = require('../internals/to-object'); var toAbsoluteIndex = require('../internals/to-absolute-index'); var toLength = require('../internals/to-length'); var min = Math.min; // `Array.prototype.copyWithin` method implementation // https://tc39.es/ecma262/#sec-array.prototype.copywithin // eslint-disable-next-line es/no-array-prototype-copywithin -- safe module.exports = [].copyWithin || function copyWithin(target /* = 0 */ , start /* = 0, end = @length */ ) { var O = toObject(this); var len = toLength(O.length); var to = toAbsoluteIndex(target, len); var from = toAbsoluteIndex(start, len); var end = arguments.length > 2 ? arguments[2] : undefined; var count = min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to); var inc = 1; if (from < to && to < from + count) { inc = -1; from += count - 1; to += count - 1; } while (count-- > 0) { if (from in O) O[to] = O[from];else delete O[to]; to += inc; from += inc; } return O; }; }, { "../internals/to-absolute-index": 180, "../internals/to-length": 184, "../internals/to-object": 185 }], 21: [function (require, module, exports) { 'use strict'; var toObject = require('../internals/to-object'); var toAbsoluteIndex = require('../internals/to-absolute-index'); var toLength = require('../internals/to-length'); // `Array.prototype.fill` method implementation // https://tc39.es/ecma262/#sec-array.prototype.fill module.exports = function fill(value /* , start = 0, end = @length */ ) { var O = toObject(this); var length = toLength(O.length); var argumentsLength = arguments.length; var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length); var end = argumentsLength > 2 ? arguments[2] : undefined; var endPos = end === undefined ? length : toAbsoluteIndex(end, length); while (endPos > index) { O[index++] = value; } return O; }; }, { "../internals/to-absolute-index": 180, "../internals/to-length": 184, "../internals/to-object": 185 }], 22: [function (require, module, exports) { 'use strict'; var $forEach = require('../internals/array-iteration').forEach; var arrayMethodIsStrict = require('../internals/array-method-is-strict'); var STRICT_METHOD = arrayMethodIsStrict('forEach'); // `Array.prototype.forEach` method implementation // https://tc39.es/ecma262/#sec-array.prototype.foreach module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */ ) { return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); // eslint-disable-next-line es/no-array-prototype-foreach -- safe } : [].forEach; }, { "../internals/array-iteration": 26, "../internals/array-method-is-strict": 29 }], 23: [function (require, module, exports) { 'use strict'; var bind = require('../internals/function-bind-context'); var toObject = require('../internals/to-object'); var callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing'); var isArrayIteratorMethod = require('../internals/is-array-iterator-method'); var toLength = require('../internals/to-length'); var createProperty = require('../internals/create-property'); var getIteratorMethod = require('../internals/get-iterator-method'); // `Array.from` method implementation // https://tc39.es/ecma262/#sec-array.from module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */ ) { var O = toObject(arrayLike); var C = typeof this == 'function' ? this : Array; var argumentsLength = arguments.length; var mapfn = argumentsLength > 1 ? arguments[1] : undefined; var mapping = mapfn !== undefined; var iteratorMethod = getIteratorMethod(O); var index = 0; var length, result, step, iterator, next, value; if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2); // if the target is not iterable or it's an array with the default iterator - use a simple case if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) { iterator = iteratorMethod.call(O); next = iterator.next; result = new C(); for (; !(step = next.call(iterator)).done; index++) { value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value; createProperty(result, index, value); } } else { length = toLength(O.length); result = new C(length); for (; length > index; index++) { value = mapping ? mapfn(O[index], index) : O[index]; createProperty(result, index, value); } } result.length = index; return result; }; }, { "../internals/call-with-safe-iteration-closing": 37, "../internals/create-property": 56, "../internals/function-bind-context": 79, "../internals/get-iterator-method": 83, "../internals/is-array-iterator-method": 100, "../internals/to-length": 184, "../internals/to-object": 185 }], 24: [function (require, module, exports) { var toIndexedObject = require('../internals/to-indexed-object'); var toLength = require('../internals/to-length'); var toAbsoluteIndex = require('../internals/to-absolute-index'); // `Array.prototype.{ indexOf, includes }` methods implementation var createMethod = function createMethod(IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIndexedObject($this); var length = toLength(O.length); 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; }; }; module.exports = { // `Array.prototype.includes` method // https://tc39.es/ecma262/#sec-array.prototype.includes includes: createMethod(true), // `Array.prototype.indexOf` method // https://tc39.es/ecma262/#sec-array.prototype.indexof indexOf: createMethod(false) }; }, { "../internals/to-absolute-index": 180, "../internals/to-indexed-object": 182, "../internals/to-length": 184 }], 25: [function (require, module, exports) { var bind = require('../internals/function-bind-context'); var IndexedObject = require('../internals/indexed-object'); var toObject = require('../internals/to-object'); var toLength = require('../internals/to-length'); // `Array.prototype.{ findLast, findLastIndex }` methods implementation var createMethod = function createMethod(TYPE) { var IS_FIND_INDEX = TYPE == 6; return function ($this, callbackfn, that) { var O = toObject($this); var self = IndexedObject(O); var boundFunction = bind(callbackfn, that, 3); var index = toLength(self.length); var value, result; while (index-- > 0) { value = self[index]; result = boundFunction(value, index, O); if (result) switch (TYPE) { case 5: return value; // find case 6: return index; // findIndex } } return IS_FIND_INDEX ? -1 : undefined; }; }; module.exports = { // `Array.prototype.findLast` method // https://github.com/tc39/proposal-array-find-from-last findLast: createMethod(5), // `Array.prototype.findLastIndex` method // https://github.com/tc39/proposal-array-find-from-last findLastIndex: createMethod(6) }; }, { "../internals/function-bind-context": 79, "../internals/indexed-object": 95, "../internals/to-length": 184, "../internals/to-object": 185 }], 26: [function (require, module, exports) { var bind = require('../internals/function-bind-context'); var IndexedObject = require('../internals/indexed-object'); var toObject = require('../internals/to-object'); var toLength = require('../internals/to-length'); var arraySpeciesCreate = require('../internals/array-species-create'); var push = [].push; // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation var createMethod = function createMethod(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_OUT = 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 boundFunction = bind(callbackfn, that, 3); var length = toLength(self.length); var index = 0; var create = specificCreate || arraySpeciesCreate; var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? 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.call(target, value); // filter } else switch (TYPE) { case 4: return false; // every case 7: push.call(target, value); // filterOut } } } } return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target; }; }; module.exports = { // `Array.prototype.forEach` method // https://tc39.es/ecma262/#sec-array.prototype.foreach forEach: createMethod(0), // `Array.prototype.map` method // https://tc39.es/ecma262/#sec-array.prototype.map map: createMethod(1), // `Array.prototype.filter` method // https://tc39.es/ecma262/#sec-array.prototype.filter filter: createMethod(2), // `Array.prototype.some` method // https://tc39.es/ecma262/#sec-array.prototype.some some: createMethod(3), // `Array.prototype.every` method // https://tc39.es/ecma262/#sec-array.prototype.every every: createMethod(4), // `Array.prototype.find` method // https://tc39.es/ecma262/#sec-array.prototype.find find: createMethod(5), // `Array.prototype.findIndex` method // https://tc39.es/ecma262/#sec-array.prototype.findIndex findIndex: createMethod(6), // `Array.prototype.filterOut` method // https://github.com/tc39/proposal-array-filtering filterOut: createMethod(7) }; }, { "../internals/array-species-create": 32, "../internals/function-bind-context": 79, "../internals/indexed-object": 95, "../internals/to-length": 184, "../internals/to-object": 185 }], 27: [function (require, module, exports) { 'use strict'; /* eslint-disable es/no-array-prototype-lastindexof -- safe */ var toIndexedObject = require('../internals/to-indexed-object'); var toInteger = require('../internals/to-integer'); var toLength = require('../internals/to-length'); var arrayMethodIsStrict = require('../internals/array-method-is-strict'); var min = Math.min; var $lastIndexOf = [].lastIndexOf; var NEGATIVE_ZERO = !!$lastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0; var STRICT_METHOD = arrayMethodIsStrict('lastIndexOf'); var FORCED = NEGATIVE_ZERO || !STRICT_METHOD; // `Array.prototype.lastIndexOf` method implementation // https://tc39.es/ecma262/#sec-array.prototype.lastindexof module.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */ ) { // convert -0 to +0 if (NEGATIVE_ZERO) return $lastIndexOf.apply(this, arguments) || 0; var O = toIndexedObject(this); var length = toLength(O.length); var index = length - 1; if (arguments.length > 1) index = min(index, toInteger(arguments[1])); if (index < 0) index = length + index; for (; index >= 0; index--) { if (index in O && O[index] === searchElement) return index || 0; } return -1; } : $lastIndexOf; }, { "../internals/array-method-is-strict": 29, "../internals/to-indexed-object": 182, "../internals/to-integer": 183, "../internals/to-length": 184 }], 28: [function (require, module, exports) { var fails = require('../internals/fails'); var wellKnownSymbol = require('../internals/well-known-symbol'); var V8_VERSION = require('../internals/engine-v8-version'); var SPECIES = wellKnownSymbol('species'); module.exports = 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] = function () { return { foo: 1 }; }; return array[METHOD_NAME](Boolean).foo !== 1; }); }; }, { "../internals/engine-v8-version": 71, "../internals/fails": 75, "../internals/well-known-symbol": 197 }], 29: [function (require, module, exports) { 'use strict'; var fails = require('../internals/fails'); module.exports = function (METHOD_NAME, argument) { var method = [][METHOD_NAME]; return !!method && fails(function () { // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing method.call(null, argument || function () { throw 1; }, 1); }); }; }, { "../internals/fails": 75 }], 30: [function (require, module, exports) { var aFunction = require('../internals/a-function'); var toObject = require('../internals/to-object'); var IndexedObject = require('../internals/indexed-object'); var toLength = require('../internals/to-length'); // `Array.prototype.{ reduce, reduceRight }` methods implementation var createMethod = function createMethod(IS_RIGHT) { return function (that, callbackfn, argumentsLength, memo) { aFunction(callbackfn); var O = toObject(that); var self = IndexedObject(O); var length = toLength(O.length); var index = IS_RIGHT ? length - 1 : 0; var i = IS_RIGHT ? -1 : 1; if (argumentsLength < 2) while (true) { if (index in self) { memo = self[index]; index += i; break; } index += i; if (IS_RIGHT ? index < 0 : length <= index) { throw TypeError('Reduce of empty array with no initial value'); } } for (; IS_RIGHT ? index >= 0 : length > index; index += i) { if (index in self) { memo = callbackfn(memo, self[index], index, O); } } return memo; }; }; module.exports = { // `Array.prototype.reduce` method // https://tc39.es/ecma262/#sec-array.prototype.reduce left: createMethod(false), // `Array.prototype.reduceRight` method // https://tc39.es/ecma262/#sec-array.prototype.reduceright right: createMethod(true) }; }, { "../internals/a-function": 11, "../internals/indexed-object": 95, "../internals/to-length": 184, "../internals/to-object": 185 }], 31: [function (require, module, exports) { // TODO: use something more complex like timsort? var floor = Math.floor; var mergeSort = function mergeSort(array, comparefn) { var length = array.length; var middle = floor(length / 2); return length < 8 ? insertionSort(array, comparefn) : merge(mergeSort(array.slice(0, middle), comparefn), mergeSort(array.slice(middle), comparefn), comparefn); }; var insertionSort = function insertionSort(array, comparefn) { var length = array.length; var i = 1; var element, j; while (i < length) { j = i; element = array[i]; while (j && comparefn(array[j - 1], element) > 0) { array[j] = array[--j]; } if (j !== i++) array[j] = element; } return array; }; var merge = function merge(left, right, comparefn) { var llength = left.length; var rlength = right.length; var lindex = 0; var rindex = 0; var result = []; while (lindex < llength || rindex < rlength) { if (lindex < llength && rindex < rlength) { result.push(comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]); } else { result.push(lindex < llength ? left[lindex++] : right[rindex++]); } } return result; }; module.exports = mergeSort; }, {}], 32: [function (require, module, exports) { var isObject = require('../internals/is-object'); var isArray = require('../internals/is-array'); var wellKnownSymbol = require('../internals/well-known-symbol'); var SPECIES = wellKnownSymbol('species'); // `ArraySpeciesCreate` abstract operation // https://tc39.es/ecma262/#sec-arrayspeciescreate module.exports = function (originalArray, length) { var C; if (isArray(originalArray)) { C = originalArray.constructor; // cross-realm fallback if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;else if (isObject(C)) { C = C[SPECIES]; if (C === null) C = undefined; } } return new (C === undefined ? Array : C)(length === 0 ? 0 : length); }; }, { "../internals/is-array": 101, "../internals/is-object": 104, "../internals/well-known-symbol": 197 }], 33: [function (require, module, exports) { 'use strict'; var toLength = require('../internals/to-length'); var toObject = require('../internals/to-object'); var getBuiltIn = require('../internals/get-built-in'); var arraySpeciesCreate = require('../internals/array-species-create'); var push = [].push; // `Array.prototype.uniqueBy` method // https://github.com/tc39/proposal-array-unique module.exports = function uniqueBy(resolver) { var that = toObject(this); var length = toLength(that.length); var result = arraySpeciesCreate(that, 0); var Map = getBuiltIn('Map'); var map = new Map(); var resolverFunction, index, item, key; if (typeof resolver == 'function') resolverFunction = resolver;else if (resolver == null) resolverFunction = function resolverFunction(value) { return value; };else throw new TypeError('Incorrect resolver!'); for (index = 0; index < length; index++) { item = that[index]; key = resolverFunction(item); if (!map.has(key)) map.set(key, item); } map.forEach(function (value) { push.call(result, value); }); return result; }; }, { "../internals/array-species-create": 32, "../internals/get-built-in": 82, "../internals/to-length": 184, "../internals/to-object": 185 }], 34: [function (require, module, exports) { 'use strict'; var path = require('../internals/path'); var aFunction = require('../internals/a-function'); var anObject = require('../internals/an-object'); var create = require('../internals/object-create'); var createNonEnumerableProperty = require('../internals/create-non-enumerable-property'); var redefineAll = require('../internals/redefine-all'); var wellKnownSymbol = require('../internals/well-known-symbol'); var InternalStateModule = require('../internals/internal-state'); var getBuiltIn = require('../internals/get-built-in'); var Promise = getBuiltIn('Promise'); var setInternalState = InternalStateModule.set; var getInternalState = InternalStateModule.get; var TO_STRING_TAG = wellKnownSymbol('toStringTag'); var $return = function $return(value) { var iterator = getInternalState(this).iterator; var $$return = iterator['return']; return $$return === undefined ? Promise.resolve({ done: true, value: value }) : anObject($$return.call(iterator, value)); }; var $throw = function $throw(value) { var iterator = getInternalState(this).iterator; var $$throw = iterator['throw']; return $$throw === undefined ? Promise.reject(value) : $$throw.call(iterator, value); }; module.exports = function (nextHandler, IS_ITERATOR) { var AsyncIteratorProxy = function AsyncIterator(state) { state.next = aFunction(state.iterator.next); state.done = false; setInternalState(this, state); }; AsyncIteratorProxy.prototype = redefineAll(create(path.AsyncIterator.prototype), { next: function next(arg) { var state = getInternalState(this); if (state.done) return Promise.resolve({ done: true, value: undefined }); try { return Promise.resolve(anObject(nextHandler.call(state, arg, Promise))); } catch (error) { return Promise.reject(error); } }, 'return': $return, 'throw': $throw }); if (!IS_ITERATOR) { createNonEnumerableProperty(AsyncIteratorProxy.prototype, TO_STRING_TAG, 'Generator'); } return AsyncIteratorProxy; }; }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/create-non-enumerable-property": 54, "../internals/get-built-in": 82, "../internals/internal-state": 99, "../internals/object-create": 131, "../internals/path": 148, "../internals/redefine-all": 151, "../internals/well-known-symbol": 197 }], 35: [function (require, module, exports) { 'use strict'; // https://github.com/tc39/proposal-iterator-helpers var aFunction = require('../internals/a-function'); var anObject = require('../internals/an-object'); var getBuiltIn = require('../internals/get-built-in'); var Promise = getBuiltIn('Promise'); var push = [].push; var createMethod = function createMethod(TYPE) { var IS_TO_ARRAY = TYPE == 0; var IS_FOR_EACH = TYPE == 1; var IS_EVERY = TYPE == 2; var IS_SOME = TYPE == 3; return function (iterator, fn) { anObject(iterator); var next = aFunction(iterator.next); var array = IS_TO_ARRAY ? [] : undefined; if (!IS_TO_ARRAY) aFunction(fn); return new Promise(function (resolve, reject) { var closeIteration = function closeIteration(method, argument) { try { var returnMethod = iterator['return']; if (returnMethod !== undefined) { return Promise.resolve(returnMethod.call(iterator)).then(function () { method(argument); }, function (error) { reject(error); }); } } catch (error2) { return reject(error2); } method(argument); }; var onError = function onError(error) { closeIteration(reject, error); }; var loop = function loop() { try { Promise.resolve(anObject(next.call(iterator))).then(function (step) { try { if (anObject(step).done) { resolve(IS_TO_ARRAY ? array : IS_SOME ? false : IS_EVERY || undefined); } else { var value = step.value; if (IS_TO_ARRAY) { push.call(array, value); loop(); } else { Promise.resolve(fn(value)).then(function (result) { if (IS_FOR_EACH) { loop(); } else if (IS_EVERY) { result ? loop() : closeIteration(resolve, false); } else { result ? closeIteration(resolve, IS_SOME || value) : loop(); } }, onError); } } } catch (error) { onError(error); } }, onError); } catch (error2) { onError(error2); } }; loop(); }); }; }; module.exports = { toArray: createMethod(0), forEach: createMethod(1), every: createMethod(2), some: createMethod(3), find: createMethod(4) }; }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/get-built-in": 82 }], 36: [function (require, module, exports) { var global = require('../internals/global'); var shared = require('../internals/shared-store'); var getPrototypeOf = require('../internals/object-get-prototype-of'); var has = require('../internals/has'); var createNonEnumerableProperty = require('../internals/create-non-enumerable-property'); var wellKnownSymbol = require('../internals/well-known-symbol'); var IS_PURE = require('../internals/is-pure'); var USE_FUNCTION_CONSTRUCTOR = 'USE_FUNCTION_CONSTRUCTOR'; var ASYNC_ITERATOR = wellKnownSymbol('asyncIterator'); var AsyncIterator = global.AsyncIterator; var PassedAsyncIteratorPrototype = shared.AsyncIteratorPrototype; var AsyncIteratorPrototype, prototype; if (!IS_PURE) { if (PassedAsyncIteratorPrototype) { AsyncIteratorPrototype = PassedAsyncIteratorPrototype; } else if (typeof AsyncIterator == 'function') { AsyncIteratorPrototype = AsyncIterator.prototype; } else if (shared[USE_FUNCTION_CONSTRUCTOR] || global[USE_FUNCTION_CONSTRUCTOR]) { try { // eslint-disable-next-line no-new-func -- we have no alternatives without usage of modern syntax prototype = getPrototypeOf(getPrototypeOf(getPrototypeOf(Function('return async function*(){}()')()))); if (getPrototypeOf(prototype) === Object.prototype) AsyncIteratorPrototype = prototype; } catch (error) { /* empty */ } } } if (!AsyncIteratorPrototype) AsyncIteratorPrototype = {}; if (!has(AsyncIteratorPrototype, ASYNC_ITERATOR)) { createNonEnumerableProperty(AsyncIteratorPrototype, ASYNC_ITERATOR, function () { return this; }); } module.exports = AsyncIteratorPrototype; }, { "../internals/create-non-enumerable-property": 54, "../internals/global": 88, "../internals/has": 89, "../internals/is-pure": 105, "../internals/object-get-prototype-of": 138, "../internals/shared-store": 167, "../internals/well-known-symbol": 197 }], 37: [function (require, module, exports) { var anObject = require('../internals/an-object'); var iteratorClose = require('../internals/iterator-close'); // call something on iterator step with safe closing on error module.exports = function (iterator, fn, value, ENTRIES) { try { return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value); } catch (error) { iteratorClose(iterator); throw error; } }; }, { "../internals/an-object": 16, "../internals/iterator-close": 108 }], 38: [function (require, module, exports) { var wellKnownSymbol = require('../internals/well-known-symbol'); var ITERATOR = wellKnownSymbol('iterator'); var SAFE_CLOSING = false; try { var called = 0; var iteratorWithReturn = { next: function next() { return { done: !!called++ }; }, 'return': function _return() { SAFE_CLOSING = true; } }; iteratorWithReturn[ITERATOR] = function () { return this; }; // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing Array.from(iteratorWithReturn, function () { throw 2; }); } catch (error) { /* empty */ } module.exports = function (exec, SKIP_CLOSING) { if (!SKIP_CLOSING && !SAFE_CLOSING) return false; var ITERATION_SUPPORT = false; try { var object = {}; object[ITERATOR] = function () { return { next: function next() { return { done: ITERATION_SUPPORT = true }; } }; }; exec(object); } catch (error) { /* empty */ } return ITERATION_SUPPORT; }; }, { "../internals/well-known-symbol": 197 }], 39: [function (require, module, exports) { var toString = {}.toString; module.exports = function (it) { return toString.call(it).slice(8, -1); }; }, {}], 40: [function (require, module, exports) { var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support'); var classofRaw = require('../internals/classof-raw'); var wellKnownSymbol = require('../internals/well-known-symbol'); var TO_STRING_TAG = wellKnownSymbol('toStringTag'); // ES3 wrong here var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function tryGet(it, key) { try { return it[key]; } catch (error) { /* empty */ } }; // getting tag from ES6+ `Object.prototype.toString` module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) { var O, tag, result; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag // builtinTag case : CORRECT_ARGUMENTS ? classofRaw(O) // ES3 arguments fallback : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result; }; }, { "../internals/classof-raw": 39, "../internals/to-string-tag-support": 189, "../internals/well-known-symbol": 197 }], 41: [function (require, module, exports) { 'use strict'; var anObject = require('../internals/an-object'); var aFunction = require('../internals/a-function'); // https://github.com/tc39/collection-methods module.exports = function () /* ...elements */ { var set = anObject(this); var adder = aFunction(set.add); for (var k = 0, len = arguments.length; k < len; k++) { adder.call(set, arguments[k]); } return set; }; }, { "../internals/a-function": 11, "../internals/an-object": 16 }], 42: [function (require, module, exports) { 'use strict'; var anObject = require('../internals/an-object'); var aFunction = require('../internals/a-function'); // https://github.com/tc39/collection-methods module.exports = function () /* ...elements */ { var collection = anObject(this); var remover = aFunction(collection['delete']); var allDeleted = true; var wasDeleted; for (var k = 0, len = arguments.length; k < len; k++) { wasDeleted = remover.call(collection, arguments[k]); allDeleted = allDeleted && wasDeleted; } return !!allDeleted; }; }, { "../internals/a-function": 11, "../internals/an-object": 16 }], 43: [function (require, module, exports) { 'use strict'; // https://tc39.github.io/proposal-setmap-offrom/ var aFunction = require('../internals/a-function'); var bind = require('../internals/function-bind-context'); var iterate = require('../internals/iterate'); module.exports = function from(source /* , mapFn, thisArg */ ) { var length = arguments.length; var mapFn = length > 1 ? arguments[1] : undefined; var mapping, array, n, boundFunction; aFunction(this); mapping = mapFn !== undefined; if (mapping) aFunction(mapFn); if (source == undefined) return new this(); array = []; if (mapping) { n = 0; boundFunction = bind(mapFn, length > 2 ? arguments[2] : undefined, 2); iterate(source, function (nextItem) { array.push(boundFunction(nextItem, n++)); }); } else { iterate(source, array.push, { that: array }); } return new this(array); }; }, { "../internals/a-function": 11, "../internals/function-bind-context": 79, "../internals/iterate": 107 }], 44: [function (require, module, exports) { 'use strict'; // https://tc39.github.io/proposal-setmap-offrom/ module.exports = function of() { var length = arguments.length; var A = new Array(length); while (length--) { A[length] = arguments[length]; } return new this(A); }; }, {}], 45: [function (require, module, exports) { 'use strict'; var defineProperty = require('../internals/object-define-property').f; var create = require('../internals/object-create'); var redefineAll = require('../internals/redefine-all'); var bind = require('../internals/function-bind-context'); var anInstance = require('../internals/an-instance'); var iterate = require('../internals/iterate'); var defineIterator = require('../internals/define-iterator'); var setSpecies = require('../internals/set-species'); var DESCRIPTORS = require('../internals/descriptors'); var fastKey = require('../internals/internal-metadata').fastKey; var InternalStateModule = require('../internals/internal-state'); var setInternalState = InternalStateModule.set; var internalStateGetterFor = InternalStateModule.getterFor; module.exports = { getConstructor: function getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) { var C = wrapper(function (that, iterable) { anInstance(that, C, CONSTRUCTOR_NAME); setInternalState(that, { type: CONSTRUCTOR_NAME, index: create(null), first: undefined, last: undefined, size: 0 }); if (!DESCRIPTORS) that.size = 0; if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP }); }); var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME); var define = function define(that, key, value) { var state = getInternalState(that); var entry = getEntry(that, key); var previous, index; // change existing entry if (entry) { entry.value = value; // create new entry } else { state.last = entry = { index: index = fastKey(key, true), key: key, value: value, previous: previous = state.last, next: undefined, removed: false }; if (!state.first) state.first = entry; if (previous) previous.next = entry; if (DESCRIPTORS) state.size++;else that.size++; // add to index if (index !== 'F') state.index[index] = entry; } return that; }; var getEntry = function getEntry(that, key) { var state = getInternalState(that); // fast case var index = fastKey(key); var entry; if (index !== 'F') return state.index[index]; // frozen object case for (entry = state.first; entry; entry = entry.next) { if (entry.key == key) return entry; } }; redefineAll(C.prototype, { // `{ Map, Set }.prototype.clear()` methods // https://tc39.es/ecma262/#sec-map.prototype.clear // https://tc39.es/ecma262/#sec-set.prototype.clear clear: function clear() { var that = this; var state = getInternalState(that); var data = state.index; var entry = state.first; while (entry) { entry.removed = true; if (entry.previous) entry.previous = entry.previous.next = undefined; delete data[entry.index]; entry = entry.next; } state.first = state.last = undefined; if (DESCRIPTORS) state.size = 0;else that.size = 0; }, // `{ Map, Set }.prototype.delete(key)` methods // https://tc39.es/ecma262/#sec-map.prototype.delete // https://tc39.es/ecma262/#sec-set.prototype.delete 'delete': function _delete(key) { var that = this; var state = getInternalState(that); var entry = getEntry(that, key); if (entry) { var next = entry.next; var prev = entry.previous; delete state.index[entry.index]; entry.removed = true; if (prev) prev.next = next; if (next) next.previous = prev; if (state.first == entry) state.first = next; if (state.last == entry) state.last = prev; if (DESCRIPTORS) state.size--;else that.size--; } return !!entry; }, // `{ Map, Set }.prototype.forEach(callbackfn, thisArg = undefined)` methods // https://tc39.es/ecma262/#sec-map.prototype.foreach // https://tc39.es/ecma262/#sec-set.prototype.foreach forEach: function forEach(callbackfn /* , that = undefined */ ) { var state = getInternalState(this); var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); var entry; while (entry = entry ? entry.next : state.first) { boundFunction(entry.value, entry.key, this); // revert to the last existing entry while (entry && entry.removed) { entry = entry.previous; } } }, // `{ Map, Set}.prototype.has(key)` methods // https://tc39.es/ecma262/#sec-map.prototype.has // https://tc39.es/ecma262/#sec-set.prototype.has has: function has(key) { return !!getEntry(this, key); } }); redefineAll(C.prototype, IS_MAP ? { // `Map.prototype.get(key)` method // https://tc39.es/ecma262/#sec-map.prototype.get get: function get(key) { var entry = getEntry(this, key); return entry && entry.value; }, // `Map.prototype.set(key, value)` method // https://tc39.es/ecma262/#sec-map.prototype.set set: function set(key, value) { return define(this, key === 0 ? 0 : key, value); } } : { // `Set.prototype.add(value)` method // https://tc39.es/ecma262/#sec-set.prototype.add add: function add(value) { return define(this, value = value === 0 ? 0 : value, value); } }); if (DESCRIPTORS) defineProperty(C.prototype, 'size', { get: function get() { return getInternalState(this).size; } }); return C; }, setStrong: function setStrong(C, CONSTRUCTOR_NAME, IS_MAP) { var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator'; var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME); var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME); // `{ Map, Set }.prototype.{ keys, values, entries, @@iterator }()` methods // https://tc39.es/ecma262/#sec-map.prototype.entries // https://tc39.es/ecma262/#sec-map.prototype.keys // https://tc39.es/ecma262/#sec-map.prototype.values // https://tc39.es/ecma262/#sec-map.prototype-@@iterator // https://tc39.es/ecma262/#sec-set.prototype.entries // https://tc39.es/ecma262/#sec-set.prototype.keys // https://tc39.es/ecma262/#sec-set.prototype.values // https://tc39.es/ecma262/#sec-set.prototype-@@iterator defineIterator(C, CONSTRUCTOR_NAME, function (iterated, kind) { setInternalState(this, { type: ITERATOR_NAME, target: iterated, state: getInternalCollectionState(iterated), kind: kind, last: undefined }); }, function () { var state = getInternalIteratorState(this); var kind = state.kind; var entry = state.last; // revert to the last existing entry while (entry && entry.removed) { entry = entry.previous; } // get next entry if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) { // or finish the iteration state.target = undefined; return { value: undefined, done: true }; } // return step by kind if (kind == 'keys') return { value: entry.key, done: false }; if (kind == 'values') return { value: entry.value, done: false }; return { value: [entry.key, entry.value], done: false }; }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); // `{ Map, Set }.prototype[@@species]` accessors // https://tc39.es/ecma262/#sec-get-map-@@species // https://tc39.es/ecma262/#sec-get-set-@@species setSpecies(CONSTRUCTOR_NAME); } }; }, { "../internals/an-instance": 15, "../internals/define-iterator": 59, "../internals/descriptors": 61, "../internals/function-bind-context": 79, "../internals/internal-metadata": 98, "../internals/internal-state": 99, "../internals/iterate": 107, "../internals/object-create": 131, "../internals/object-define-property": 133, "../internals/redefine-all": 151, "../internals/set-species": 164 }], 46: [function (require, module, exports) { 'use strict'; var redefineAll = require('../internals/redefine-all'); var getWeakData = require('../internals/internal-metadata').getWeakData; var anObject = require('../internals/an-object'); var isObject = require('../internals/is-object'); var anInstance = require('../internals/an-instance'); var iterate = require('../internals/iterate'); var ArrayIterationModule = require('../internals/array-iteration'); var $has = require('../internals/has'); var InternalStateModule = require('../internals/internal-state'); var setInternalState = InternalStateModule.set; var internalStateGetterFor = InternalStateModule.getterFor; var find = ArrayIterationModule.find; var findIndex = ArrayIterationModule.findIndex; var id = 0; // fallback for uncaught frozen keys var uncaughtFrozenStore = function uncaughtFrozenStore(store) { return store.frozen || (store.frozen = new UncaughtFrozenStore()); }; var UncaughtFrozenStore = function UncaughtFrozenStore() { this.entries = []; }; var findUncaughtFrozen = function findUncaughtFrozen(store, key) { return find(store.entries, function (it) { return it[0] === key; }); }; UncaughtFrozenStore.prototype = { get: function get(key) { var entry = findUncaughtFrozen(this, key); if (entry) return entry[1]; }, has: function has(key) { return !!findUncaughtFrozen(this, key); }, set: function set(key, value) { var entry = findUncaughtFrozen(this, key); if (entry) entry[1] = value;else this.entries.push([key, value]); }, 'delete': function _delete(key) { var index = findIndex(this.entries, function (it) { return it[0] === key; }); if (~index) this.entries.splice(index, 1); return !!~index; } }; module.exports = { getConstructor: function getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) { var C = wrapper(function (that, iterable) { anInstance(that, C, CONSTRUCTOR_NAME); setInternalState(that, { type: CONSTRUCTOR_NAME, id: id++, frozen: undefined }); if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP }); }); var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME); var define = function define(that, key, value) { var state = getInternalState(that); var data = getWeakData(anObject(key), true); if (data === true) uncaughtFrozenStore(state).set(key, value);else data[state.id] = value; return that; }; redefineAll(C.prototype, { // `{ WeakMap, WeakSet }.prototype.delete(key)` methods // https://tc39.es/ecma262/#sec-weakmap.prototype.delete // https://tc39.es/ecma262/#sec-weakset.prototype.delete 'delete': function _delete(key) { var state = getInternalState(this); if (!isObject(key)) return false; var data = getWeakData(key); if (data === true) return uncaughtFrozenStore(state)['delete'](key); return data && $has(data, state.id) && delete data[state.id]; }, // `{ WeakMap, WeakSet }.prototype.has(key)` methods // https://tc39.es/ecma262/#sec-weakmap.prototype.has // https://tc39.es/ecma262/#sec-weakset.prototype.has has: function has(key) { var state = getInternalState(this); if (!isObject(key)) return false; var data = getWeakData(key); if (data === true) return uncaughtFrozenStore(state).has(key); return data && $has(data, state.id); } }); redefineAll(C.prototype, IS_MAP ? { // `WeakMap.prototype.get(key)` method // https://tc39.es/ecma262/#sec-weakmap.prototype.get get: function get(key) { var state = getInternalState(this); if (isObject(key)) { var data = getWeakData(key); if (data === true) return uncaughtFrozenStore(state).get(key); return data ? data[state.id] : undefined; } }, // `WeakMap.prototype.set(key, value)` method // https://tc39.es/ecma262/#sec-weakmap.prototype.set set: function set(key, value) { return define(this, key, value); } } : { // `WeakSet.prototype.add(value)` method // https://tc39.es/ecma262/#sec-weakset.prototype.add add: function add(value) { return define(this, value, true); } }); return C; } }; }, { "../internals/an-instance": 15, "../internals/an-object": 16, "../internals/array-iteration": 26, "../internals/has": 89, "../internals/internal-metadata": 98, "../internals/internal-state": 99, "../internals/is-object": 104, "../internals/iterate": 107, "../internals/redefine-all": 151 }], 47: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var global = require('../internals/global'); var isForced = require('../internals/is-forced'); var redefine = require('../internals/redefine'); var InternalMetadataModule = require('../internals/internal-metadata'); var iterate = require('../internals/iterate'); var anInstance = require('../internals/an-instance'); var isObject = require('../internals/is-object'); var fails = require('../internals/fails'); var checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration'); var setToStringTag = require('../internals/set-to-string-tag'); var inheritIfRequired = require('../internals/inherit-if-required'); module.exports = function (CONSTRUCTOR_NAME, wrapper, common) { var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1; var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1; var ADDER = IS_MAP ? 'set' : 'add'; var NativeConstructor = global[CONSTRUCTOR_NAME]; var NativePrototype = NativeConstructor && NativeConstructor.prototype; var Constructor = NativeConstructor; var exported = {}; var fixMethod = function fixMethod(KEY) { var nativeMethod = NativePrototype[KEY]; redefine(NativePrototype, KEY, KEY == 'add' ? function add(value) { nativeMethod.call(this, value === 0 ? 0 : value); return this; } : KEY == 'delete' ? function (key) { return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key); } : KEY == 'get' ? function get(key) { return IS_WEAK && !isObject(key) ? undefined : nativeMethod.call(this, key === 0 ? 0 : key); } : KEY == 'has' ? function has(key) { return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key); } : function set(key, value) { nativeMethod.call(this, key === 0 ? 0 : key, value); return this; }); }; var REPLACE = isForced(CONSTRUCTOR_NAME, typeof NativeConstructor != 'function' || !(IS_WEAK || NativePrototype.forEach && !fails(function () { new NativeConstructor().entries().next(); }))); if (REPLACE) { // create collection constructor Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER); InternalMetadataModule.REQUIRED = true; } else if (isForced(CONSTRUCTOR_NAME, true)) { var instance = new Constructor(); // early implementations not supports chaining var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance; // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); }); // most early implementations doesn't supports iterables, most modern - not close it correctly // eslint-disable-next-line no-new -- required for testing var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); }); // for early implementations -0 and +0 not the same var BUGGY_ZERO = !IS_WEAK && fails(function () { // V8 ~ Chromium 42- fails only with 5+ elements var $instance = new NativeConstructor(); var index = 5; while (index--) { $instance[ADDER](index, index); } return !$instance.has(-0); }); if (!ACCEPT_ITERABLES) { Constructor = wrapper(function (dummy, iterable) { anInstance(dummy, Constructor, CONSTRUCTOR_NAME); var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor); if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP }); return that; }); Constructor.prototype = NativePrototype; NativePrototype.constructor = Constructor; } if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) { fixMethod('delete'); fixMethod('has'); IS_MAP && fixMethod('get'); } if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); // weak collections should not contains .clear method if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear; } exported[CONSTRUCTOR_NAME] = Constructor; $({ global: true, forced: Constructor != NativeConstructor }, exported); setToStringTag(Constructor, CONSTRUCTOR_NAME); if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP); return Constructor; }; }, { "../internals/an-instance": 15, "../internals/check-correctness-of-iteration": 38, "../internals/export": 74, "../internals/fails": 75, "../internals/global": 88, "../internals/inherit-if-required": 96, "../internals/internal-metadata": 98, "../internals/is-forced": 102, "../internals/is-object": 104, "../internals/iterate": 107, "../internals/redefine": 152, "../internals/set-to-string-tag": 165 }], 48: [function (require, module, exports) { // TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env` var Map = require('../modules/es.map'); var WeakMap = require('../modules/es.weak-map'); var create = require('../internals/object-create'); var isObject = require('../internals/is-object'); var Node = function Node() { // keys this.object = null; this.symbol = null; // child nodes this.primitives = null; this.objectsByIndex = create(null); }; Node.prototype.get = function (key, initializer) { return this[key] || (this[key] = initializer()); }; Node.prototype.next = function (i, it, IS_OBJECT) { var store = IS_OBJECT ? this.objectsByIndex[i] || (this.objectsByIndex[i] = new WeakMap()) : this.primitives || (this.primitives = new Map()); var entry = store.get(it); if (!entry) store.set(it, entry = new Node()); return entry; }; var root = new Node(); module.exports = function () { var active = root; var length = arguments.length; var i, it; // for prevent leaking, start from objects for (i = 0; i < length; i++) { if (isObject(it = arguments[i])) active = active.next(i, it, true); } if (this === Object && active === root) throw TypeError('Composite keys must contain a non-primitive component'); for (i = 0; i < length; i++) { if (!isObject(it = arguments[i])) active = active.next(i, it, false); } return active; }; }, { "../internals/is-object": 104, "../internals/object-create": 131, "../modules/es.map": 248, "../modules/es.weak-map": 415 }], 49: [function (require, module, exports) { var has = require('../internals/has'); var ownKeys = require('../internals/own-keys'); var getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor'); var definePropertyModule = require('../internals/object-define-property'); module.exports = function (target, source) { var keys = ownKeys(source); var defineProperty = definePropertyModule.f; var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; for (var i = 0; i < keys.length; i++) { var key = keys[i]; if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key)); } }; }, { "../internals/has": 89, "../internals/object-define-property": 133, "../internals/object-get-own-property-descriptor": 134, "../internals/own-keys": 147 }], 50: [function (require, module, exports) { var wellKnownSymbol = require('../internals/well-known-symbol'); var MATCH = wellKnownSymbol('match'); module.exports = function (METHOD_NAME) { var regexp = /./; try { '/./'[METHOD_NAME](regexp); } catch (error1) { try { regexp[MATCH] = false; return '/./'[METHOD_NAME](regexp); } catch (error2) { /* empty */ } } return false; }; }, { "../internals/well-known-symbol": 197 }], 51: [function (require, module, exports) { var fails = require('../internals/fails'); module.exports = !fails(function () { function F() { /* empty */ } F.prototype.constructor = null; // eslint-disable-next-line es/no-object-getprototypeof -- required for testing return Object.getPrototypeOf(new F()) !== F.prototype; }); }, { "../internals/fails": 75 }], 52: [function (require, module, exports) { var requireObjectCoercible = require('../internals/require-object-coercible'); var quot = /"/g; // `CreateHTML` abstract operation // https://tc39.es/ecma262/#sec-createhtml module.exports = function (string, tag, attribute, value) { var S = String(requireObjectCoercible(string)); var p1 = '<' + tag; if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; return p1 + '>' + S + ''; }; }, { "../internals/require-object-coercible": 160 }], 53: [function (require, module, exports) { 'use strict'; var IteratorPrototype = require('../internals/iterators-core').IteratorPrototype; var create = require('../internals/object-create'); var createPropertyDescriptor = require('../internals/create-property-descriptor'); var setToStringTag = require('../internals/set-to-string-tag'); var Iterators = require('../internals/iterators'); var returnThis = function returnThis() { return this; }; module.exports = function (IteratorConstructor, NAME, next) { var TO_STRING_TAG = NAME + ' Iterator'; IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) }); setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true); Iterators[TO_STRING_TAG] = returnThis; return IteratorConstructor; }; }, { "../internals/create-property-descriptor": 55, "../internals/iterators": 111, "../internals/iterators-core": 110, "../internals/object-create": 131, "../internals/set-to-string-tag": 165 }], 54: [function (require, module, exports) { var DESCRIPTORS = require('../internals/descriptors'); var definePropertyModule = require('../internals/object-define-property'); var createPropertyDescriptor = require('../internals/create-property-descriptor'); module.exports = DESCRIPTORS ? function (object, key, value) { return definePropertyModule.f(object, key, createPropertyDescriptor(1, value)); } : function (object, key, value) { object[key] = value; return object; }; }, { "../internals/create-property-descriptor": 55, "../internals/descriptors": 61, "../internals/object-define-property": 133 }], 55: [function (require, module, exports) { module.exports = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; }, {}], 56: [function (require, module, exports) { 'use strict'; var toPrimitive = require('../internals/to-primitive'); var definePropertyModule = require('../internals/object-define-property'); var createPropertyDescriptor = require('../internals/create-property-descriptor'); module.exports = function (object, key, value) { var propertyKey = toPrimitive(key); if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));else object[propertyKey] = value; }; }, { "../internals/create-property-descriptor": 55, "../internals/object-define-property": 133, "../internals/to-primitive": 188 }], 57: [function (require, module, exports) { 'use strict'; var fails = require('../internals/fails'); var padStart = require('../internals/string-pad').start; var abs = Math.abs; var DatePrototype = Date.prototype; var getTime = DatePrototype.getTime; var nativeDateToISOString = DatePrototype.toISOString; // `Date.prototype.toISOString` method implementation // https://tc39.es/ecma262/#sec-date.prototype.toisostring // PhantomJS / old WebKit fails here: module.exports = fails(function () { return nativeDateToISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z'; }) || !fails(function () { nativeDateToISOString.call(new Date(NaN)); }) ? function toISOString() { if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value'); var date = this; var year = date.getUTCFullYear(); var milliseconds = date.getUTCMilliseconds(); var sign = year < 0 ? '-' : year > 9999 ? '+' : ''; return sign + padStart(abs(year), sign ? 6 : 4, 0) + '-' + padStart(date.getUTCMonth() + 1, 2, 0) + '-' + padStart(date.getUTCDate(), 2, 0) + 'T' + padStart(date.getUTCHours(), 2, 0) + ':' + padStart(date.getUTCMinutes(), 2, 0) + ':' + padStart(date.getUTCSeconds(), 2, 0) + '.' + padStart(milliseconds, 3, 0) + 'Z'; } : nativeDateToISOString; }, { "../internals/fails": 75, "../internals/string-pad": 173 }], 58: [function (require, module, exports) { 'use strict'; var anObject = require('../internals/an-object'); var toPrimitive = require('../internals/to-primitive'); // `Date.prototype[@@toPrimitive](hint)` method implementation // https://tc39.es/ecma262/#sec-date.prototype-@@toprimitive module.exports = function (hint) { if (hint !== 'string' && hint !== 'number' && hint !== 'default') { throw TypeError('Incorrect hint'); } return toPrimitive(anObject(this), hint !== 'number'); }; }, { "../internals/an-object": 16, "../internals/to-primitive": 188 }], 59: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var createIteratorConstructor = require('../internals/create-iterator-constructor'); var getPrototypeOf = require('../internals/object-get-prototype-of'); var setPrototypeOf = require('../internals/object-set-prototype-of'); var setToStringTag = require('../internals/set-to-string-tag'); var createNonEnumerableProperty = require('../internals/create-non-enumerable-property'); var redefine = require('../internals/redefine'); var wellKnownSymbol = require('../internals/well-known-symbol'); var IS_PURE = require('../internals/is-pure'); var Iterators = require('../internals/iterators'); var IteratorsCore = require('../internals/iterators-core'); var IteratorPrototype = IteratorsCore.IteratorPrototype; var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS; var ITERATOR = wellKnownSymbol('iterator'); var KEYS = 'keys'; var VALUES = 'values'; var ENTRIES = 'entries'; var returnThis = function returnThis() { return this; }; module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) { createIteratorConstructor(IteratorConstructor, NAME, next); var getIterationMethod = function getIterationMethod(KIND) { if (KIND === DEFAULT && defaultIterator) return defaultIterator; if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND]; switch (KIND) { case KEYS: return function keys() { return new IteratorConstructor(this, KIND); }; case VALUES: return function values() { return new IteratorConstructor(this, KIND); }; case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); }; } return function () { return new IteratorConstructor(this); }; }; var TO_STRING_TAG = NAME + ' Iterator'; var INCORRECT_VALUES_NAME = false; var IterablePrototype = Iterable.prototype; var nativeIterator = IterablePrototype[ITERATOR] || IterablePrototype['@@iterator'] || DEFAULT && IterablePrototype[DEFAULT]; var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT); var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator; var CurrentIteratorPrototype, methods, KEY; // fix native if (anyNativeIterator) { CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable())); if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) { if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) { if (setPrototypeOf) { setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype); } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') { createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis); } } // Set @@toStringTag to native iterators setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true); if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis; } } // fix Array.prototype.{ values, @@iterator }.name in V8 / FF if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) { INCORRECT_VALUES_NAME = true; defaultIterator = function values() { return nativeIterator.call(this); }; } // define iterator if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) { createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator); } Iterators[NAME] = defaultIterator; // export additional methods if (DEFAULT) { methods = { values: getIterationMethod(VALUES), keys: IS_SET ? defaultIterator : getIterationMethod(KEYS), entries: getIterationMethod(ENTRIES) }; if (FORCED) for (KEY in methods) { if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) { redefine(IterablePrototype, KEY, methods[KEY]); } } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods); } return methods; }; }, { "../internals/create-iterator-constructor": 53, "../internals/create-non-enumerable-property": 54, "../internals/export": 74, "../internals/is-pure": 105, "../internals/iterators": 111, "../internals/iterators-core": 110, "../internals/object-get-prototype-of": 138, "../internals/object-set-prototype-of": 144, "../internals/redefine": 152, "../internals/set-to-string-tag": 165, "../internals/well-known-symbol": 197 }], 60: [function (require, module, exports) { var path = require('../internals/path'); var has = require('../internals/has'); var wrappedWellKnownSymbolModule = require('../internals/well-known-symbol-wrapped'); var defineProperty = require('../internals/object-define-property').f; module.exports = function (NAME) { var Symbol = path.Symbol || (path.Symbol = {}); if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, { value: wrappedWellKnownSymbolModule.f(NAME) }); }; }, { "../internals/has": 89, "../internals/object-define-property": 133, "../internals/path": 148, "../internals/well-known-symbol-wrapped": 196 }], 61: [function (require, module, exports) { var fails = require('../internals/fails'); // Detect IE8's incomplete defineProperty implementation module.exports = !fails(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty({}, 1, { get: function get() { return 7; } })[1] != 7; }); }, { "../internals/fails": 75 }], 62: [function (require, module, exports) { var global = require('../internals/global'); var isObject = require('../internals/is-object'); var document = global.document; // typeof document.createElement is 'object' in old IE var EXISTS = isObject(document) && isObject(document.createElement); module.exports = function (it) { return EXISTS ? document.createElement(it) : {}; }; }, { "../internals/global": 88, "../internals/is-object": 104 }], 63: [function (require, module, exports) { // iterable DOM collections // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods module.exports = { CSSRuleList: 0, CSSStyleDeclaration: 0, CSSValueList: 0, ClientRectList: 0, DOMRectList: 0, DOMStringList: 0, DOMTokenList: 1, DataTransferItemList: 0, FileList: 0, HTMLAllCollection: 0, HTMLCollection: 0, HTMLFormElement: 0, HTMLSelectElement: 0, MediaList: 0, MimeTypeArray: 0, NamedNodeMap: 0, NodeList: 1, PaintRequestList: 0, Plugin: 0, PluginArray: 0, SVGLengthList: 0, SVGNumberList: 0, SVGPathSegList: 0, SVGPointList: 0, SVGStringList: 0, SVGTransformList: 0, SourceBufferList: 0, StyleSheetList: 0, TextTrackCueList: 0, TextTrackList: 0, TouchList: 0 }; }, {}], 64: [function (require, module, exports) { var userAgent = require('../internals/engine-user-agent'); var firefox = userAgent.match(/firefox\/(\d+)/i); module.exports = !!firefox && +firefox[1]; }, { "../internals/engine-user-agent": 70 }], 65: [function (require, module, exports) { module.exports = typeof window == 'object'; }, {}], 66: [function (require, module, exports) { var UA = require('../internals/engine-user-agent'); module.exports = /MSIE|Trident/.test(UA); }, { "../internals/engine-user-agent": 70 }], 67: [function (require, module, exports) { var userAgent = require('../internals/engine-user-agent'); module.exports = /(?:iphone|ipod|ipad).*applewebkit/i.test(userAgent); }, { "../internals/engine-user-agent": 70 }], 68: [function (require, module, exports) { var classof = require('../internals/classof-raw'); var global = require('../internals/global'); module.exports = classof(global.process) == 'process'; }, { "../internals/classof-raw": 39, "../internals/global": 88 }], 69: [function (require, module, exports) { var userAgent = require('../internals/engine-user-agent'); module.exports = /web0s(?!.*chrome)/i.test(userAgent); }, { "../internals/engine-user-agent": 70 }], 70: [function (require, module, exports) { var getBuiltIn = require('../internals/get-built-in'); module.exports = getBuiltIn('navigator', 'userAgent') || ''; }, { "../internals/get-built-in": 82 }], 71: [function (require, module, exports) { var global = require('../internals/global'); var userAgent = require('../internals/engine-user-agent'); var process = global.process; var versions = process && process.versions; var v8 = versions && versions.v8; var match, version; if (v8) { match = v8.split('.'); version = match[0] < 4 ? 1 : match[0] + match[1]; } else if (userAgent) { match = userAgent.match(/Edge\/(\d+)/); if (!match || match[1] >= 74) { match = userAgent.match(/Chrome\/(\d+)/); if (match) version = match[1]; } } module.exports = version && +version; }, { "../internals/engine-user-agent": 70, "../internals/global": 88 }], 72: [function (require, module, exports) { var userAgent = require('../internals/engine-user-agent'); var webkit = userAgent.match(/AppleWebKit\/(\d+)\./); module.exports = !!webkit && +webkit[1]; }, { "../internals/engine-user-agent": 70 }], 73: [function (require, module, exports) { // IE8- don't enum bug keys module.exports = ['constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf']; }, {}], 74: [function (require, module, exports) { var global = require('../internals/global'); var getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f; var createNonEnumerableProperty = require('../internals/create-non-enumerable-property'); var redefine = require('../internals/redefine'); var setGlobal = require('../internals/set-global'); var copyConstructorProperties = require('../internals/copy-constructor-properties'); var isForced = require('../internals/is-forced'); /* options.target - name of the target object options.global - target is the global object options.stat - export as static methods of target options.proto - export as prototype methods of target options.real - real prototype method for the `pure` version options.forced - export even if the native feature is available options.bind - bind methods to the target, required for the `pure` version options.wrap - wrap constructors to preventing global pollution, required for the `pure` version options.unsafe - use the simple assignment of property instead of delete + defineProperty options.sham - add a flag to not completely full polyfills options.enumerable - export as enumerable property options.noTargetGet - prevent calling a getter on target */ module.exports = function (options, source) { var TARGET = options.target; var GLOBAL = options.global; var STATIC = options.stat; var FORCED, target, key, targetProperty, sourceProperty, descriptor; if (GLOBAL) { target = global; } else if (STATIC) { target = global[TARGET] || setGlobal(TARGET, {}); } else { target = (global[TARGET] || {}).prototype; } if (target) for (key in source) { sourceProperty = source[key]; if (options.noTargetGet) { descriptor = getOwnPropertyDescriptor(target, key); targetProperty = descriptor && descriptor.value; } else targetProperty = target[key]; FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); // contained in target if (!FORCED && targetProperty !== undefined) { if (typeof sourceProperty === typeof targetProperty) continue; copyConstructorProperties(sourceProperty, targetProperty); } // add a flag to not completely full polyfills if (options.sham || targetProperty && targetProperty.sham) { createNonEnumerableProperty(sourceProperty, 'sham', true); } // extend global redefine(target, key, sourceProperty, options); } }; }, { "../internals/copy-constructor-properties": 49, "../internals/create-non-enumerable-property": 54, "../internals/global": 88, "../internals/is-forced": 102, "../internals/object-get-own-property-descriptor": 134, "../internals/redefine": 152, "../internals/set-global": 163 }], 75: [function (require, module, exports) { module.exports = function (exec) { try { return !!exec(); } catch (error) { return true; } }; }, {}], 76: [function (require, module, exports) { 'use strict'; // TODO: Remove from `core-js@4` since it's moved to entry points require('../modules/es.regexp.exec'); var redefine = require('../internals/redefine'); var regexpExec = require('../internals/regexp-exec'); var fails = require('../internals/fails'); var wellKnownSymbol = require('../internals/well-known-symbol'); var createNonEnumerableProperty = require('../internals/create-non-enumerable-property'); var SPECIES = wellKnownSymbol('species'); var RegExpPrototype = RegExp.prototype; module.exports = function (KEY, exec, FORCED, SHAM) { var SYMBOL = wellKnownSymbol(KEY); var DELEGATES_TO_SYMBOL = !fails(function () { // String methods call symbol-named RegEp methods var O = {}; O[SYMBOL] = function () { return 7; }; return ''[KEY](O) != 7; }); var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () { // Symbol-named RegExp methods call .exec var execCalled = false; var re = /a/; if (KEY === 'split') { // We can't use real regex here since it causes deoptimization // and serious performance degradation in V8 // https://github.com/zloirock/core-js/issues/306 re = {}; // RegExp[@@split] doesn't call the regex's exec method, but first creates // a new one. We need to return the patched regex when creating the new one. re.constructor = {}; re.constructor[SPECIES] = function () { return re; }; re.flags = ''; re[SYMBOL] = /./[SYMBOL]; } re.exec = function () { execCalled = true; return null; }; re[SYMBOL](''); return !execCalled; }); if (!DELEGATES_TO_SYMBOL || !DELEGATES_TO_EXEC || FORCED) { var nativeRegExpMethod = /./[SYMBOL]; var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) { var $exec = regexp.exec; if ($exec === regexpExec || $exec === RegExpPrototype.exec) { if (DELEGATES_TO_SYMBOL && !forceStringMethod) { // The native String method already delegates to @@method (this // polyfilled function), leasing to infinite recursion. // We avoid it by directly calling the native @@method method. return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; } return { done: true, value: nativeMethod.call(str, regexp, arg2) }; } return { done: false }; }); redefine(String.prototype, KEY, methods[0]); redefine(RegExpPrototype, SYMBOL, methods[1]); } if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true); }; }, { "../internals/create-non-enumerable-property": 54, "../internals/fails": 75, "../internals/redefine": 152, "../internals/regexp-exec": 155, "../internals/well-known-symbol": 197, "../modules/es.regexp.exec": 326 }], 77: [function (require, module, exports) { 'use strict'; var isArray = require('../internals/is-array'); var toLength = require('../internals/to-length'); var bind = require('../internals/function-bind-context'); // `FlattenIntoArray` abstract operation // https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray var flattenIntoArray = function flattenIntoArray(target, original, source, sourceLen, start, depth, mapper, thisArg) { var targetIndex = start; var sourceIndex = 0; var mapFn = mapper ? bind(mapper, thisArg, 3) : false; var element; while (sourceIndex < sourceLen) { if (sourceIndex in source) { element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex]; if (depth > 0 && isArray(element)) { targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1; } else { if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length'); target[targetIndex] = element; } targetIndex++; } sourceIndex++; } return targetIndex; }; module.exports = flattenIntoArray; }, { "../internals/function-bind-context": 79, "../internals/is-array": 101, "../internals/to-length": 184 }], 78: [function (require, module, exports) { var fails = require('../internals/fails'); module.exports = !fails(function () { // eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing return Object.isExtensible(Object.preventExtensions({})); }); }, { "../internals/fails": 75 }], 79: [function (require, module, exports) { var aFunction = require('../internals/a-function'); // optional / simple context binding module.exports = function (fn, that, length) { aFunction(fn); if (that === undefined) return fn; switch (length) { case 0: return function () { return fn.call(that); }; case 1: return function (a) { return fn.call(that, a); }; case 2: return function (a, b) { return fn.call(that, a, b); }; case 3: return function (a, b, c) { return fn.call(that, a, b, c); }; } return function () /* ...args */ { return fn.apply(that, arguments); }; }; }, { "../internals/a-function": 11 }], 80: [function (require, module, exports) { 'use strict'; var aFunction = require('../internals/a-function'); var isObject = require('../internals/is-object'); var slice = [].slice; var factories = {}; var construct = function construct(C, argsLength, args) { if (!(argsLength in factories)) { for (var list = [], i = 0; i < argsLength; i++) { list[i] = 'a[' + i + ']'; } // eslint-disable-next-line no-new-func -- we have no proper alternatives, IE8- only factories[argsLength] = Function('C,a', 'return new C(' + list.join(',') + ')'); } return factories[argsLength](C, args); }; // `Function.prototype.bind` method implementation // https://tc39.es/ecma262/#sec-function.prototype.bind module.exports = Function.bind || function bind(that /* , ...args */ ) { var fn = aFunction(this); var partArgs = slice.call(arguments, 1); var boundFunction = function bound() /* args... */ { var args = partArgs.concat(slice.call(arguments)); return this instanceof boundFunction ? construct(fn, args.length, args) : fn.apply(that, args); }; if (isObject(fn.prototype)) boundFunction.prototype = fn.prototype; return boundFunction; }; }, { "../internals/a-function": 11, "../internals/is-object": 104 }], 81: [function (require, module, exports) { var getIteratorMethod = require('../internals/get-iterator-method'); var wellKnownSymbol = require('../internals/well-known-symbol'); var ASYNC_ITERATOR = wellKnownSymbol('asyncIterator'); module.exports = function (it) { var method = it[ASYNC_ITERATOR]; return method === undefined ? getIteratorMethod(it) : method; }; }, { "../internals/get-iterator-method": 83, "../internals/well-known-symbol": 197 }], 82: [function (require, module, exports) { var path = require('../internals/path'); var global = require('../internals/global'); var aFunction = function aFunction(variable) { return typeof variable == 'function' ? variable : undefined; }; module.exports = function (namespace, method) { return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace]) : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method]; }; }, { "../internals/global": 88, "../internals/path": 148 }], 83: [function (require, module, exports) { var classof = require('../internals/classof'); var Iterators = require('../internals/iterators'); var wellKnownSymbol = require('../internals/well-known-symbol'); var ITERATOR = wellKnownSymbol('iterator'); module.exports = function (it) { if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; }; }, { "../internals/classof": 40, "../internals/iterators": 111, "../internals/well-known-symbol": 197 }], 84: [function (require, module, exports) { var anObject = require('../internals/an-object'); var getIteratorMethod = require('../internals/get-iterator-method'); module.exports = function (it) { var iteratorMethod = getIteratorMethod(it); if (typeof iteratorMethod != 'function') { throw TypeError(String(it) + ' is not iterable'); } return anObject(iteratorMethod.call(it)); }; }, { "../internals/an-object": 16, "../internals/get-iterator-method": 83 }], 85: [function (require, module, exports) { var IS_PURE = require('../internals/is-pure'); var getIterator = require('../internals/get-iterator'); module.exports = IS_PURE ? getIterator : function (it) { // eslint-disable-next-line es/no-map -- safe return Map.prototype.entries.call(it); }; }, { "../internals/get-iterator": 84, "../internals/is-pure": 105 }], 86: [function (require, module, exports) { var IS_PURE = require('../internals/is-pure'); var getIterator = require('../internals/get-iterator'); module.exports = IS_PURE ? getIterator : function (it) { // eslint-disable-next-line es/no-set -- safe return Set.prototype.values.call(it); }; }, { "../internals/get-iterator": 84, "../internals/is-pure": 105 }], 87: [function (require, module, exports) { var toObject = require('../internals/to-object'); var floor = Math.floor; var replace = ''.replace; var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g; var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g; // `GetSubstitution` abstract operation // https://tc39.es/ecma262/#sec-getsubstitution module.exports = function (matched, str, position, captures, namedCaptures, replacement) { var tailPos = position + matched.length; var m = captures.length; var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; if (namedCaptures !== undefined) { namedCaptures = toObject(namedCaptures); symbols = SUBSTITUTION_SYMBOLS; } return replace.call(replacement, symbols, function (match, ch) { var capture; switch (ch.charAt(0)) { case '$': return '$'; case '&': return matched; case '`': return str.slice(0, position); case "'": return str.slice(tailPos); case '<': capture = namedCaptures[ch.slice(1, -1)]; break; default: // \d\d? var n = +ch; if (n === 0) return match; if (n > m) { var f = floor(n / 10); if (f === 0) return match; if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); return match; } capture = captures[n - 1]; } return capture === undefined ? '' : capture; }); }; }, { "../internals/to-object": 185 }], 88: [function (require, module, exports) { (function (global) { (function () { var check = function check(it) { return it && it.Math == Math && it; }; // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 module.exports = // 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 global == 'object' && global) || // eslint-disable-next-line no-new-func -- fallback function () { return this; }() || Function('return this')(); }).call(this); }).call(this, typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}); }, {}], 89: [function (require, module, exports) { var toObject = require('../internals/to-object'); var hasOwnProperty = {}.hasOwnProperty; module.exports = Object.hasOwn || function hasOwn(it, key) { return hasOwnProperty.call(toObject(it), key); }; }, { "../internals/to-object": 185 }], 90: [function (require, module, exports) { module.exports = {}; }, {}], 91: [function (require, module, exports) { var global = require('../internals/global'); module.exports = function (a, b) { var console = global.console; if (console && console.error) { arguments.length === 1 ? console.error(a) : console.error(a, b); } }; }, { "../internals/global": 88 }], 92: [function (require, module, exports) { var getBuiltIn = require('../internals/get-built-in'); module.exports = getBuiltIn('document', 'documentElement'); }, { "../internals/get-built-in": 82 }], 93: [function (require, module, exports) { var DESCRIPTORS = require('../internals/descriptors'); var fails = require('../internals/fails'); var createElement = require('../internals/document-create-element'); // Thank's IE8 for his funny defineProperty module.exports = !DESCRIPTORS && !fails(function () { // eslint-disable-next-line es/no-object-defineproperty -- requied for testing return Object.defineProperty(createElement('div'), 'a', { get: function get() { return 7; } }).a != 7; }); }, { "../internals/descriptors": 61, "../internals/document-create-element": 62, "../internals/fails": 75 }], 94: [function (require, module, exports) { // IEEE754 conversions based on https://github.com/feross/ieee754 var abs = Math.abs; var pow = Math.pow; var floor = Math.floor; var log = Math.log; var LN2 = Math.LN2; var pack = function pack(number, mantissaLength, bytes) { var buffer = new Array(bytes); var exponentLength = bytes * 8 - mantissaLength - 1; var eMax = (1 << exponentLength) - 1; var eBias = eMax >> 1; var rt = mantissaLength === 23 ? pow(2, -24) - pow(2, -77) : 0; var sign = number < 0 || number === 0 && 1 / number < 0 ? 1 : 0; var index = 0; var exponent, mantissa, c; number = abs(number); // eslint-disable-next-line no-self-compare -- NaN check if (number != number || number === Infinity) { // eslint-disable-next-line no-self-compare -- NaN check mantissa = number != number ? 1 : 0; exponent = eMax; } else { exponent = floor(log(number) / LN2); if (number * (c = pow(2, -exponent)) < 1) { exponent--; c *= 2; } if (exponent + eBias >= 1) { number += rt / c; } else { number += rt * pow(2, 1 - eBias); } if (number * c >= 2) { exponent++; c /= 2; } if (exponent + eBias >= eMax) { mantissa = 0; exponent = eMax; } else if (exponent + eBias >= 1) { mantissa = (number * c - 1) * pow(2, mantissaLength); exponent = exponent + eBias; } else { mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength); exponent = 0; } } for (; mantissaLength >= 8; buffer[index++] = mantissa & 255, mantissa /= 256, mantissaLength -= 8) { ; } exponent = exponent << mantissaLength | mantissa; exponentLength += mantissaLength; for (; exponentLength > 0; buffer[index++] = exponent & 255, exponent /= 256, exponentLength -= 8) { ; } buffer[--index] |= sign * 128; return buffer; }; var unpack = function unpack(buffer, mantissaLength) { var bytes = buffer.length; var exponentLength = bytes * 8 - mantissaLength - 1; var eMax = (1 << exponentLength) - 1; var eBias = eMax >> 1; var nBits = exponentLength - 7; var index = bytes - 1; var sign = buffer[index--]; var exponent = sign & 127; var mantissa; sign >>= 7; for (; nBits > 0; exponent = exponent * 256 + buffer[index], index--, nBits -= 8) { ; } mantissa = exponent & (1 << -nBits) - 1; exponent >>= -nBits; nBits += mantissaLength; for (; nBits > 0; mantissa = mantissa * 256 + buffer[index], index--, nBits -= 8) { ; } if (exponent === 0) { exponent = 1 - eBias; } else if (exponent === eMax) { return mantissa ? NaN : sign ? -Infinity : Infinity; } else { mantissa = mantissa + pow(2, mantissaLength); exponent = exponent - eBias; } return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength); }; module.exports = { pack: pack, unpack: unpack }; }, {}], 95: [function (require, module, exports) { var fails = require('../internals/fails'); var classof = require('../internals/classof-raw'); var split = ''.split; // fallback for non-array-like ES3 and non-enumerable old V8 strings module.exports = 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('z').propertyIsEnumerable(0); }) ? function (it) { return classof(it) == 'String' ? split.call(it, '') : Object(it); } : Object; }, { "../internals/classof-raw": 39, "../internals/fails": 75 }], 96: [function (require, module, exports) { var isObject = require('../internals/is-object'); var setPrototypeOf = require('../internals/object-set-prototype-of'); // makes subclassing work correct for wrapped built-ins module.exports = function ($this, dummy, Wrapper) { var NewTarget, NewTargetPrototype; if ( // it can work only with native `setPrototypeOf` setPrototypeOf && // we haven't completely correct pre-ES6 way for getting `new.target`, so use this typeof (NewTarget = dummy.constructor) == 'function' && NewTarget !== Wrapper && isObject(NewTargetPrototype = NewTarget.prototype) && NewTargetPrototype !== Wrapper.prototype) setPrototypeOf($this, NewTargetPrototype); return $this; }; }, { "../internals/is-object": 104, "../internals/object-set-prototype-of": 144 }], 97: [function (require, module, exports) { var store = require('../internals/shared-store'); var functionToString = Function.toString; // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper if (typeof store.inspectSource != 'function') { store.inspectSource = function (it) { return functionToString.call(it); }; } module.exports = store.inspectSource; }, { "../internals/shared-store": 167 }], 98: [function (require, module, exports) { var hiddenKeys = require('../internals/hidden-keys'); var isObject = require('../internals/is-object'); var has = require('../internals/has'); var defineProperty = require('../internals/object-define-property').f; var uid = require('../internals/uid'); var FREEZING = require('../internals/freezing'); var METADATA = uid('meta'); var id = 0; // eslint-disable-next-line es/no-object-isextensible -- safe var isExtensible = Object.isExtensible || function () { return true; }; var setMetadata = function setMetadata(it) { defineProperty(it, METADATA, { value: { objectID: 'O' + id++, // object ID weakData: {} // weak collections IDs } }); }; var fastKey = function fastKey(it, create) { // return a primitive with prefix if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; if (!has(it, METADATA)) { // can't set metadata to uncaught frozen object if (!isExtensible(it)) return 'F'; // not necessary to add metadata if (!create) return 'E'; // add missing metadata setMetadata(it); // return object ID } return it[METADATA].objectID; }; var getWeakData = function getWeakData(it, create) { if (!has(it, METADATA)) { // can't set metadata to uncaught frozen object if (!isExtensible(it)) return true; // not necessary to add metadata if (!create) return false; // add missing metadata setMetadata(it); // return the store of weak collections IDs } return it[METADATA].weakData; }; // add metadata on freeze-family methods calling var onFreeze = function onFreeze(it) { if (FREEZING && meta.REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it); return it; }; var meta = module.exports = { REQUIRED: false, fastKey: fastKey, getWeakData: getWeakData, onFreeze: onFreeze }; hiddenKeys[METADATA] = true; }, { "../internals/freezing": 78, "../internals/has": 89, "../internals/hidden-keys": 90, "../internals/is-object": 104, "../internals/object-define-property": 133, "../internals/uid": 194 }], 99: [function (require, module, exports) { var NATIVE_WEAK_MAP = require('../internals/native-weak-map'); var global = require('../internals/global'); var isObject = require('../internals/is-object'); var createNonEnumerableProperty = require('../internals/create-non-enumerable-property'); var objectHas = require('../internals/has'); var shared = require('../internals/shared-store'); var sharedKey = require('../internals/shared-key'); var hiddenKeys = require('../internals/hidden-keys'); var OBJECT_ALREADY_INITIALIZED = 'Object already initialized'; var WeakMap = global.WeakMap; var set, get, has; var enforce = function enforce(it) { return has(it) ? get(it) : set(it, {}); }; var getterFor = function getterFor(TYPE) { return function (it) { var state; if (!isObject(it) || (state = get(it)).type !== TYPE) { throw TypeError('Incompatible receiver, ' + TYPE + ' required'); } return state; }; }; if (NATIVE_WEAK_MAP || shared.state) { var store = shared.state || (shared.state = new WeakMap()); var wmget = store.get; var wmhas = store.has; var wmset = store.set; set = function set(it, metadata) { if (wmhas.call(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED); metadata.facade = it; wmset.call(store, it, metadata); return metadata; }; get = function get(it) { return wmget.call(store, it) || {}; }; has = function has(it) { return wmhas.call(store, it); }; } else { var STATE = sharedKey('state'); hiddenKeys[STATE] = true; set = function set(it, metadata) { if (objectHas(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED); metadata.facade = it; createNonEnumerableProperty(it, STATE, metadata); return metadata; }; get = function get(it) { return objectHas(it, STATE) ? it[STATE] : {}; }; has = function has(it) { return objectHas(it, STATE); }; } module.exports = { set: set, get: get, has: has, enforce: enforce, getterFor: getterFor }; }, { "../internals/create-non-enumerable-property": 54, "../internals/global": 88, "../internals/has": 89, "../internals/hidden-keys": 90, "../internals/is-object": 104, "../internals/native-weak-map": 123, "../internals/shared-key": 166, "../internals/shared-store": 167 }], 100: [function (require, module, exports) { var wellKnownSymbol = require('../internals/well-known-symbol'); var Iterators = require('../internals/iterators'); var ITERATOR = wellKnownSymbol('iterator'); var ArrayPrototype = Array.prototype; // check on default Array iterator module.exports = function (it) { return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it); }; }, { "../internals/iterators": 111, "../internals/well-known-symbol": 197 }], 101: [function (require, module, exports) { var classof = require('../internals/classof-raw'); // `IsArray` abstract operation // https://tc39.es/ecma262/#sec-isarray // eslint-disable-next-line es/no-array-isarray -- safe module.exports = Array.isArray || function isArray(arg) { return classof(arg) == 'Array'; }; }, { "../internals/classof-raw": 39 }], 102: [function (require, module, exports) { var fails = require('../internals/fails'); var replacement = /#|\.prototype\./; var isForced = function isForced(feature, detection) { var value = data[normalize(feature)]; return value == POLYFILL ? true : value == NATIVE ? false : typeof detection == 'function' ? fails(detection) : !!detection; }; var normalize = isForced.normalize = function (string) { return String(string).replace(replacement, '.').toLowerCase(); }; var data = isForced.data = {}; var NATIVE = isForced.NATIVE = 'N'; var POLYFILL = isForced.POLYFILL = 'P'; module.exports = isForced; }, { "../internals/fails": 75 }], 103: [function (require, module, exports) { var isObject = require('../internals/is-object'); var floor = Math.floor; // `Number.isInteger` method implementation // https://tc39.es/ecma262/#sec-number.isinteger module.exports = function isInteger(it) { return !isObject(it) && isFinite(it) && floor(it) === it; }; }, { "../internals/is-object": 104 }], 104: [function (require, module, exports) { module.exports = function (it) { return typeof it === 'object' ? it !== null : typeof it === 'function'; }; }, {}], 105: [function (require, module, exports) { module.exports = false; }, {}], 106: [function (require, module, exports) { var isObject = require('../internals/is-object'); var classof = require('../internals/classof-raw'); var wellKnownSymbol = require('../internals/well-known-symbol'); var MATCH = wellKnownSymbol('match'); // `IsRegExp` abstract operation // https://tc39.es/ecma262/#sec-isregexp module.exports = function (it) { var isRegExp; return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp'); }; }, { "../internals/classof-raw": 39, "../internals/is-object": 104, "../internals/well-known-symbol": 197 }], 107: [function (require, module, exports) { var anObject = require('../internals/an-object'); var isArrayIteratorMethod = require('../internals/is-array-iterator-method'); var toLength = require('../internals/to-length'); var bind = require('../internals/function-bind-context'); var getIteratorMethod = require('../internals/get-iterator-method'); var iteratorClose = require('../internals/iterator-close'); var Result = function Result(stopped, result) { this.stopped = stopped; this.result = result; }; module.exports = function (iterable, unboundFunction, options) { var that = options && options.that; var AS_ENTRIES = !!(options && options.AS_ENTRIES); var IS_ITERATOR = !!(options && options.IS_ITERATOR); var INTERRUPTED = !!(options && options.INTERRUPTED); var fn = bind(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED); var iterator, iterFn, index, length, result, next, step; var stop = function stop(condition) { if (iterator) iteratorClose(iterator); return new Result(true, condition); }; var callFn = function callFn(value) { if (AS_ENTRIES) { anObject(value); return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]); } return INTERRUPTED ? fn(value, stop) : fn(value); }; if (IS_ITERATOR) { iterator = iterable; } else { iterFn = getIteratorMethod(iterable); if (typeof iterFn != 'function') throw TypeError('Target is not iterable'); // optimisation for array iterators if (isArrayIteratorMethod(iterFn)) { for (index = 0, length = toLength(iterable.length); length > index; index++) { result = callFn(iterable[index]); if (result && result instanceof Result) return result; } return new Result(false); } iterator = iterFn.call(iterable); } next = iterator.next; while (!(step = next.call(iterator)).done) { try { result = callFn(step.value); } catch (error) { iteratorClose(iterator); throw error; } if (typeof result == 'object' && result && result instanceof Result) return result; } return new Result(false); }; }, { "../internals/an-object": 16, "../internals/function-bind-context": 79, "../internals/get-iterator-method": 83, "../internals/is-array-iterator-method": 100, "../internals/iterator-close": 108, "../internals/to-length": 184 }], 108: [function (require, module, exports) { var anObject = require('../internals/an-object'); module.exports = function (iterator) { var returnMethod = iterator['return']; if (returnMethod !== undefined) { return anObject(returnMethod.call(iterator)).value; } }; }, { "../internals/an-object": 16 }], 109: [function (require, module, exports) { 'use strict'; var path = require('../internals/path'); var aFunction = require('../internals/a-function'); var anObject = require('../internals/an-object'); var create = require('../internals/object-create'); var createNonEnumerableProperty = require('../internals/create-non-enumerable-property'); var redefineAll = require('../internals/redefine-all'); var wellKnownSymbol = require('../internals/well-known-symbol'); var InternalStateModule = require('../internals/internal-state'); var setInternalState = InternalStateModule.set; var getInternalState = InternalStateModule.get; var TO_STRING_TAG = wellKnownSymbol('toStringTag'); var $return = function $return(value) { var iterator = getInternalState(this).iterator; var $$return = iterator['return']; return $$return === undefined ? { done: true, value: value } : anObject($$return.call(iterator, value)); }; var $throw = function $throw(value) { var iterator = getInternalState(this).iterator; var $$throw = iterator['throw']; if ($$throw === undefined) throw value; return $$throw.call(iterator, value); }; module.exports = function (nextHandler, IS_ITERATOR) { var IteratorProxy = function Iterator(state) { state.next = aFunction(state.iterator.next); state.done = false; setInternalState(this, state); }; IteratorProxy.prototype = redefineAll(create(path.Iterator.prototype), { next: function next() { var state = getInternalState(this); var result = state.done ? undefined : nextHandler.apply(state, arguments); return { done: state.done, value: result }; }, 'return': $return, 'throw': $throw }); if (!IS_ITERATOR) { createNonEnumerableProperty(IteratorProxy.prototype, TO_STRING_TAG, 'Generator'); } return IteratorProxy; }; }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/create-non-enumerable-property": 54, "../internals/internal-state": 99, "../internals/object-create": 131, "../internals/path": 148, "../internals/redefine-all": 151, "../internals/well-known-symbol": 197 }], 110: [function (require, module, exports) { 'use strict'; var fails = require('../internals/fails'); var getPrototypeOf = require('../internals/object-get-prototype-of'); var createNonEnumerableProperty = require('../internals/create-non-enumerable-property'); var has = require('../internals/has'); var wellKnownSymbol = require('../internals/well-known-symbol'); var IS_PURE = require('../internals/is-pure'); var ITERATOR = wellKnownSymbol('iterator'); var BUGGY_SAFARI_ITERATORS = false; var returnThis = function returnThis() { return this; }; // `%IteratorPrototype%` object // https://tc39.es/ecma262/#sec-%iteratorprototype%-object var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator; /* eslint-disable es/no-array-prototype-keys -- safe */ if ([].keys) { arrayIterator = [].keys(); // Safari 8 has buggy iterators w/o `next` if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;else { PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator)); if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype; } } var NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () { var test = {}; // FF44- legacy iterators case return IteratorPrototype[ITERATOR].call(test) !== test; }); if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {}; // `%IteratorPrototype%[@@iterator]()` method // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator if ((!IS_PURE || NEW_ITERATOR_PROTOTYPE) && !has(IteratorPrototype, ITERATOR)) { createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis); } module.exports = { IteratorPrototype: IteratorPrototype, BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS }; }, { "../internals/create-non-enumerable-property": 54, "../internals/fails": 75, "../internals/has": 89, "../internals/is-pure": 105, "../internals/object-get-prototype-of": 138, "../internals/well-known-symbol": 197 }], 111: [function (require, module, exports) { arguments[4][90][0].apply(exports, arguments); }, { "dup": 90 }], 112: [function (require, module, exports) { 'use strict'; var anObject = require('../internals/an-object'); // `Map.prototype.emplace` method // https://github.com/thumbsupep/proposal-upsert module.exports = function emplace(key, handler) { var map = anObject(this); var value = map.has(key) && 'update' in handler ? handler.update(map.get(key), key, map) : handler.insert(key, map); map.set(key, value); return value; }; }, { "../internals/an-object": 16 }], 113: [function (require, module, exports) { 'use strict'; var anObject = require('../internals/an-object'); // `Map.prototype.upsert` method // https://github.com/thumbsupep/proposal-upsert module.exports = function upsert(key, updateFn /* , insertFn */ ) { var map = anObject(this); var insertFn = arguments.length > 2 ? arguments[2] : undefined; var value; if (typeof updateFn != 'function' && typeof insertFn != 'function') { throw TypeError('At least one callback required'); } if (map.has(key)) { value = map.get(key); if (typeof updateFn == 'function') { value = updateFn(value); map.set(key, value); } } else if (typeof insertFn == 'function') { value = insertFn(); map.set(key, value); } return value; }; }, { "../internals/an-object": 16 }], 114: [function (require, module, exports) { // eslint-disable-next-line es/no-math-expm1 -- safe var $expm1 = Math.expm1; var exp = Math.exp; // `Math.expm1` method implementation // https://tc39.es/ecma262/#sec-math.expm1 module.exports = !$expm1 // Old FF bug || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 // Tor Browser bug || $expm1(-2e-17) != -2e-17 ? function expm1(x) { return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : exp(x) - 1; } : $expm1; }, {}], 115: [function (require, module, exports) { var sign = require('../internals/math-sign'); var abs = Math.abs; var pow = Math.pow; var EPSILON = pow(2, -52); var EPSILON32 = pow(2, -23); var MAX32 = pow(2, 127) * (2 - EPSILON32); var MIN32 = pow(2, -126); var roundTiesToEven = function roundTiesToEven(n) { return n + 1 / EPSILON - 1 / EPSILON; }; // `Math.fround` method implementation // https://tc39.es/ecma262/#sec-math.fround // eslint-disable-next-line es/no-math-fround -- safe module.exports = Math.fround || function fround(x) { var $abs = abs(x); var $sign = sign(x); var a, result; if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; a = (1 + EPSILON32 / EPSILON) * $abs; result = a - (a - $abs); // eslint-disable-next-line no-self-compare -- NaN check if (result > MAX32 || result != result) return $sign * Infinity; return $sign * result; }; }, { "../internals/math-sign": 118 }], 116: [function (require, module, exports) { var log = Math.log; // `Math.log1p` method implementation // https://tc39.es/ecma262/#sec-math.log1p // eslint-disable-next-line es/no-math-log1p -- safe module.exports = Math.log1p || function log1p(x) { return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : log(1 + x); }; }, {}], 117: [function (require, module, exports) { // `Math.scale` method implementation // https://rwaldron.github.io/proposal-math-extensions/ module.exports = Math.scale || function scale(x, inLow, inHigh, outLow, outHigh) { if (arguments.length === 0 /* eslint-disable no-self-compare -- NaN check */ || x != x || inLow != inLow || inHigh != inHigh || outLow != outLow || outHigh != outHigh /* eslint-enable no-self-compare -- NaN check */ ) return NaN; if (x === Infinity || x === -Infinity) return x; return (x - inLow) * (outHigh - outLow) / (inHigh - inLow) + outLow; }; }, {}], 118: [function (require, module, exports) { // `Math.sign` method implementation // https://tc39.es/ecma262/#sec-math.sign // eslint-disable-next-line es/no-math-sign -- safe module.exports = Math.sign || function sign(x) { // eslint-disable-next-line no-self-compare -- NaN check return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; }; }, {}], 119: [function (require, module, exports) { var global = require('../internals/global'); var getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f; var macrotask = require('../internals/task').set; var IS_IOS = require('../internals/engine-is-ios'); var IS_WEBOS_WEBKIT = require('../internals/engine-is-webos-webkit'); var IS_NODE = require('../internals/engine-is-node'); var MutationObserver = global.MutationObserver || global.WebKitMutationObserver; var document = global.document; var process = global.process; var Promise = global.Promise; // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask` var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask'); var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value; var flush, head, last, notify, toggle, node, promise, then; // modern engines have queueMicrotask method if (!queueMicrotask) { flush = function flush() { var parent, fn; if (IS_NODE && (parent = process.domain)) parent.exit(); while (head) { fn = head.fn; head = head.next; try { fn(); } catch (error) { if (head) notify();else last = undefined; throw error; } } last = undefined; if (parent) parent.enter(); }; // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339 // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898 if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) { toggle = true; node = document.createTextNode(''); new MutationObserver(flush).observe(node, { characterData: true }); notify = function notify() { node.data = toggle = !toggle; }; // environments with maybe non-completely correct, but existent Promise } else if (Promise && Promise.resolve) { // Promise.resolve without an argument throws an error in LG WebOS 2 promise = Promise.resolve(undefined); // workaround of WebKit ~ iOS Safari 10.1 bug promise.constructor = Promise; then = promise.then; notify = function notify() { then.call(promise, flush); }; // Node.js without promises } else if (IS_NODE) { notify = function notify() { process.nextTick(flush); }; // for other environments - macrotask based on: // - setImmediate // - MessageChannel // - window.postMessag // - onreadystatechange // - setTimeout } else { notify = function notify() { // strange IE + webpack dev server bug - use .call(global) macrotask.call(global, flush); }; } } module.exports = queueMicrotask || function (fn) { var task = { fn: fn, next: undefined }; if (last) last.next = task; if (!head) { head = task; notify(); } last = task; }; }, { "../internals/engine-is-ios": 67, "../internals/engine-is-node": 68, "../internals/engine-is-webos-webkit": 69, "../internals/global": 88, "../internals/object-get-own-property-descriptor": 134, "../internals/task": 178 }], 120: [function (require, module, exports) { var global = require('../internals/global'); module.exports = global.Promise; }, { "../internals/global": 88 }], 121: [function (require, module, exports) { /* eslint-disable es/no-symbol -- required for testing */ var V8_VERSION = require('../internals/engine-v8-version'); var fails = require('../internals/fails'); // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing module.exports = !!Object.getOwnPropertySymbols && !fails(function () { var symbol = Symbol(); // Chrome 38 Symbol has incorrect toString conversion // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances return !String(symbol) || !(Object(symbol) instanceof Symbol) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances !Symbol.sham && V8_VERSION && V8_VERSION < 41; }); }, { "../internals/engine-v8-version": 71, "../internals/fails": 75 }], 122: [function (require, module, exports) { var fails = require('../internals/fails'); var wellKnownSymbol = require('../internals/well-known-symbol'); var IS_PURE = require('../internals/is-pure'); var ITERATOR = wellKnownSymbol('iterator'); module.exports = !fails(function () { var url = new URL('b?a=1&b=2&c=3', 'http://a'); var searchParams = url.searchParams; var result = ''; url.pathname = 'c%20d'; searchParams.forEach(function (value, key) { searchParams['delete']('b'); result += key + value; }); return IS_PURE && !url.toJSON || !searchParams.sort || url.href !== 'http://a/c%20d?a=1&c=3' || searchParams.get('c') !== '3' || String(new URLSearchParams('?a=1')) !== 'a=1' || !searchParams[ITERATOR] // throws in Edge || new URL('https://a@b').username !== 'a' || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b' // not punycoded in Edge || new URL('http://тест').host !== 'xn--e1aybc' // not escaped in Chrome 62- || new URL('http://a#б').hash !== '#%D0%B1' // fails in Chrome 66- || result !== 'a1c3' // throws in Safari || new URL('http://x', undefined).host !== 'x'; }); }, { "../internals/fails": 75, "../internals/is-pure": 105, "../internals/well-known-symbol": 197 }], 123: [function (require, module, exports) { var global = require('../internals/global'); var inspectSource = require('../internals/inspect-source'); var WeakMap = global.WeakMap; module.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap)); }, { "../internals/global": 88, "../internals/inspect-source": 97 }], 124: [function (require, module, exports) { 'use strict'; var aFunction = require('../internals/a-function'); var PromiseCapability = function PromiseCapability(C) { var resolve, reject; this.promise = new C(function ($$resolve, $$reject) { if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); resolve = $$resolve; reject = $$reject; }); this.resolve = aFunction(resolve); this.reject = aFunction(reject); }; // `NewPromiseCapability` abstract operation // https://tc39.es/ecma262/#sec-newpromisecapability module.exports.f = function (C) { return new PromiseCapability(C); }; }, { "../internals/a-function": 11 }], 125: [function (require, module, exports) { var isRegExp = require('../internals/is-regexp'); module.exports = function (it) { if (isRegExp(it)) { throw TypeError("The method doesn't accept regular expressions"); } return it; }; }, { "../internals/is-regexp": 106 }], 126: [function (require, module, exports) { var global = require('../internals/global'); var globalIsFinite = global.isFinite; // `Number.isFinite` method // https://tc39.es/ecma262/#sec-number.isfinite // eslint-disable-next-line es/no-number-isfinite -- safe module.exports = Number.isFinite || function isFinite(it) { return typeof it == 'number' && globalIsFinite(it); }; }, { "../internals/global": 88 }], 127: [function (require, module, exports) { var global = require('../internals/global'); var trim = require('../internals/string-trim').trim; var whitespaces = require('../internals/whitespaces'); var $parseFloat = global.parseFloat; var FORCED = 1 / $parseFloat(whitespaces + '-0') !== -Infinity; // `parseFloat` method // https://tc39.es/ecma262/#sec-parsefloat-string module.exports = FORCED ? function parseFloat(string) { var trimmedString = trim(String(string)); var result = $parseFloat(trimmedString); return result === 0 && trimmedString.charAt(0) == '-' ? -0 : result; } : $parseFloat; }, { "../internals/global": 88, "../internals/string-trim": 177, "../internals/whitespaces": 198 }], 128: [function (require, module, exports) { var global = require('../internals/global'); var trim = require('../internals/string-trim').trim; var whitespaces = require('../internals/whitespaces'); var $parseInt = global.parseInt; var hex = /^[+-]?0[Xx]/; var FORCED = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22; // `parseInt` method // https://tc39.es/ecma262/#sec-parseint-string-radix module.exports = FORCED ? function parseInt(string, radix) { var S = trim(String(string)); return $parseInt(S, radix >>> 0 || (hex.test(S) ? 16 : 10)); } : $parseInt; }, { "../internals/global": 88, "../internals/string-trim": 177, "../internals/whitespaces": 198 }], 129: [function (require, module, exports) { 'use strict'; var InternalStateModule = require('../internals/internal-state'); var createIteratorConstructor = require('../internals/create-iterator-constructor'); var isObject = require('../internals/is-object'); var defineProperties = require('../internals/object-define-properties'); var DESCRIPTORS = require('../internals/descriptors'); var INCORRECT_RANGE = 'Incorrect Number.range arguments'; var NUMERIC_RANGE_ITERATOR = 'NumericRangeIterator'; var setInternalState = InternalStateModule.set; var getInternalState = InternalStateModule.getterFor(NUMERIC_RANGE_ITERATOR); var $RangeIterator = createIteratorConstructor(function NumericRangeIterator(start, end, option, type, zero, one) { if (typeof start != type || end !== Infinity && end !== -Infinity && typeof end != type) { throw new TypeError(INCORRECT_RANGE); } if (start === Infinity || start === -Infinity) { throw new RangeError(INCORRECT_RANGE); } var ifIncrease = end > start; var inclusiveEnd = false; var step; if (option === undefined) { step = undefined; } else if (isObject(option)) { step = option.step; inclusiveEnd = !!option.inclusive; } else if (typeof option == type) { step = option; } else { throw new TypeError(INCORRECT_RANGE); } if (step == null) { step = ifIncrease ? one : -one; } if (typeof step != type) { throw new TypeError(INCORRECT_RANGE); } if (step === Infinity || step === -Infinity || step === zero && start !== end) { throw new RangeError(INCORRECT_RANGE); } // eslint-disable-next-line no-self-compare -- NaN check var hitsEnd = start != start || end != end || step != step || end > start !== step > zero; setInternalState(this, { type: NUMERIC_RANGE_ITERATOR, start: start, end: end, step: step, inclusiveEnd: inclusiveEnd, hitsEnd: hitsEnd, currentCount: zero, zero: zero }); if (!DESCRIPTORS) { this.start = start; this.end = end; this.step = step; this.inclusive = inclusiveEnd; } }, NUMERIC_RANGE_ITERATOR, function next() { var state = getInternalState(this); if (state.hitsEnd) return { value: undefined, done: true }; var start = state.start; var end = state.end; var step = state.step; var currentYieldingValue = start + step * state.currentCount++; if (currentYieldingValue === end) state.hitsEnd = true; var inclusiveEnd = state.inclusiveEnd; var endCondition; if (end > start) { endCondition = inclusiveEnd ? currentYieldingValue > end : currentYieldingValue >= end; } else { endCondition = inclusiveEnd ? end > currentYieldingValue : end >= currentYieldingValue; } if (endCondition) { return { value: undefined, done: state.hitsEnd = true }; } return { value: currentYieldingValue, done: false }; }); var getter = function getter(fn) { return { get: fn, set: function set() { /* empty */ }, configurable: true, enumerable: false }; }; if (DESCRIPTORS) { defineProperties($RangeIterator.prototype, { start: getter(function () { return getInternalState(this).start; }), end: getter(function () { return getInternalState(this).end; }), inclusive: getter(function () { return getInternalState(this).inclusiveEnd; }), step: getter(function () { return getInternalState(this).step; }) }); } module.exports = $RangeIterator; }, { "../internals/create-iterator-constructor": 53, "../internals/descriptors": 61, "../internals/internal-state": 99, "../internals/is-object": 104, "../internals/object-define-properties": 132 }], 130: [function (require, module, exports) { 'use strict'; var DESCRIPTORS = require('../internals/descriptors'); var fails = require('../internals/fails'); var objectKeys = require('../internals/object-keys'); var getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols'); var propertyIsEnumerableModule = require('../internals/object-property-is-enumerable'); var toObject = require('../internals/to-object'); var IndexedObject = require('../internals/indexed-object'); // eslint-disable-next-line es/no-object-assign -- safe var $assign = Object.assign; // eslint-disable-next-line es/no-object-defineproperty -- required for testing var defineProperty = Object.defineProperty; // `Object.assign` method // https://tc39.es/ecma262/#sec-object.assign module.exports = !$assign || fails(function () { // should have correct order of operations (Edge bug) if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', { enumerable: true, get: function get() { defineProperty(this, 'b', { value: 3, enumerable: false }); } }), { b: 2 })).b !== 1) return true; // should work with symbols and should have deterministic property order (V8 bug) var A = {}; var B = {}; // eslint-disable-next-line es/no-symbol -- safe var symbol = Symbol(); var alphabet = 'abcdefghijklmnopqrst'; A[symbol] = 7; alphabet.split('').forEach(function (chr) { B[chr] = chr; }); return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet; }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length` var T = toObject(target); var argumentsLength = arguments.length; var index = 1; var getOwnPropertySymbols = getOwnPropertySymbolsModule.f; var propertyIsEnumerable = propertyIsEnumerableModule.f; while (argumentsLength > index) { var S = IndexedObject(arguments[index++]); var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S); var length = keys.length; var j = 0; var key; while (length > j) { key = keys[j++]; if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key]; } } return T; } : $assign; }, { "../internals/descriptors": 61, "../internals/fails": 75, "../internals/indexed-object": 95, "../internals/object-get-own-property-symbols": 137, "../internals/object-keys": 141, "../internals/object-property-is-enumerable": 142, "../internals/to-object": 185 }], 131: [function (require, module, exports) { var anObject = require('../internals/an-object'); var defineProperties = require('../internals/object-define-properties'); var enumBugKeys = require('../internals/enum-bug-keys'); var hiddenKeys = require('../internals/hidden-keys'); var html = require('../internals/html'); var documentCreateElement = require('../internals/document-create-element'); var sharedKey = require('../internals/shared-key'); var GT = '>'; var LT = '<'; var PROTOTYPE = 'prototype'; var SCRIPT = 'script'; var IE_PROTO = sharedKey('IE_PROTO'); var EmptyConstructor = function EmptyConstructor() { /* empty */ }; var scriptTag = function scriptTag(content) { return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT; }; // Create object with fake `null` prototype: use ActiveX Object with cleared prototype var NullProtoObjectViaActiveX = function NullProtoObjectViaActiveX(activeXDocument) { activeXDocument.write(scriptTag('')); activeXDocument.close(); var temp = activeXDocument.parentWindow.Object; activeXDocument = null; // avoid memory leak return temp; }; // Create object with fake `null` prototype: use iframe Object with cleared prototype var NullProtoObjectViaIFrame = function NullProtoObjectViaIFrame() { // 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 NullProtoObject() { try { /* global ActiveXObject -- old IE */ activeXDocument = document.domain && new ActiveXObject('htmlfile'); } catch (error) { /* ignore */ } _NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame(); var length = enumBugKeys.length; while (length--) { delete _NullProtoObject[PROTOTYPE][enumBugKeys[length]]; } return _NullProtoObject(); }; hiddenKeys[IE_PROTO] = true; // `Object.create` method // https://tc39.es/ecma262/#sec-object.create module.exports = Object.create || function create(O, Properties) { var result; if (O !== null) { EmptyConstructor[PROTOTYPE] = anObject(O); result = new EmptyConstructor(); EmptyConstructor[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO] = O; } else result = _NullProtoObject(); return Properties === undefined ? result : defineProperties(result, Properties); }; }, { "../internals/an-object": 16, "../internals/document-create-element": 62, "../internals/enum-bug-keys": 73, "../internals/hidden-keys": 90, "../internals/html": 92, "../internals/object-define-properties": 132, "../internals/shared-key": 166 }], 132: [function (require, module, exports) { var DESCRIPTORS = require('../internals/descriptors'); var definePropertyModule = require('../internals/object-define-property'); var anObject = require('../internals/an-object'); var objectKeys = require('../internals/object-keys'); // `Object.defineProperties` method // https://tc39.es/ecma262/#sec-object.defineproperties // eslint-disable-next-line es/no-object-defineproperties -- safe module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) { anObject(O); var keys = objectKeys(Properties); var length = keys.length; var index = 0; var key; while (length > index) { definePropertyModule.f(O, key = keys[index++], Properties[key]); } return O; }; }, { "../internals/an-object": 16, "../internals/descriptors": 61, "../internals/object-define-property": 133, "../internals/object-keys": 141 }], 133: [function (require, module, exports) { var DESCRIPTORS = require('../internals/descriptors'); var IE8_DOM_DEFINE = require('../internals/ie8-dom-define'); var anObject = require('../internals/an-object'); var toPrimitive = require('../internals/to-primitive'); // eslint-disable-next-line es/no-object-defineproperty -- safe var $defineProperty = Object.defineProperty; // `Object.defineProperty` method // https://tc39.es/ecma262/#sec-object.defineproperty exports.f = DESCRIPTORS ? $defineProperty : function defineProperty(O, P, Attributes) { anObject(O); P = toPrimitive(P, true); anObject(Attributes); if (IE8_DOM_DEFINE) try { return $defineProperty(O, P, Attributes); } catch (error) { /* empty */ } if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported'); if ('value' in Attributes) O[P] = Attributes.value; return O; }; }, { "../internals/an-object": 16, "../internals/descriptors": 61, "../internals/ie8-dom-define": 93, "../internals/to-primitive": 188 }], 134: [function (require, module, exports) { var DESCRIPTORS = require('../internals/descriptors'); var propertyIsEnumerableModule = require('../internals/object-property-is-enumerable'); var createPropertyDescriptor = require('../internals/create-property-descriptor'); var toIndexedObject = require('../internals/to-indexed-object'); var toPrimitive = require('../internals/to-primitive'); var has = require('../internals/has'); var IE8_DOM_DEFINE = require('../internals/ie8-dom-define'); // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; // `Object.getOwnPropertyDescriptor` method // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { O = toIndexedObject(O); P = toPrimitive(P, true); if (IE8_DOM_DEFINE) try { return $getOwnPropertyDescriptor(O, P); } catch (error) { /* empty */ } if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]); }; }, { "../internals/create-property-descriptor": 55, "../internals/descriptors": 61, "../internals/has": 89, "../internals/ie8-dom-define": 93, "../internals/object-property-is-enumerable": 142, "../internals/to-indexed-object": 182, "../internals/to-primitive": 188 }], 135: [function (require, module, exports) { /* eslint-disable es/no-object-getownpropertynames -- safe */ var toIndexedObject = require('../internals/to-indexed-object'); var $getOwnPropertyNames = require('../internals/object-get-own-property-names').f; var toString = {}.toString; var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; var getWindowNames = function getWindowNames(it) { try { return $getOwnPropertyNames(it); } catch (error) { return windowNames.slice(); } }; // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window module.exports.f = function getOwnPropertyNames(it) { return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : $getOwnPropertyNames(toIndexedObject(it)); }; }, { "../internals/object-get-own-property-names": 136, "../internals/to-indexed-object": 182 }], 136: [function (require, module, exports) { var internalObjectKeys = require('../internals/object-keys-internal'); var enumBugKeys = require('../internals/enum-bug-keys'); var hiddenKeys = enumBugKeys.concat('length', 'prototype'); // `Object.getOwnPropertyNames` method // https://tc39.es/ecma262/#sec-object.getownpropertynames // eslint-disable-next-line es/no-object-getownpropertynames -- safe exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { return internalObjectKeys(O, hiddenKeys); }; }, { "../internals/enum-bug-keys": 73, "../internals/object-keys-internal": 140 }], 137: [function (require, module, exports) { // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe exports.f = Object.getOwnPropertySymbols; }, {}], 138: [function (require, module, exports) { var has = require('../internals/has'); var toObject = require('../internals/to-object'); var sharedKey = require('../internals/shared-key'); var CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter'); var IE_PROTO = sharedKey('IE_PROTO'); var ObjectPrototype = Object.prototype; // `Object.getPrototypeOf` method // https://tc39.es/ecma262/#sec-object.getprototypeof // eslint-disable-next-line es/no-object-getprototypeof -- safe module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) { O = toObject(O); if (has(O, IE_PROTO)) return O[IE_PROTO]; if (typeof O.constructor == 'function' && O instanceof O.constructor) { return O.constructor.prototype; } return O instanceof Object ? ObjectPrototype : null; }; }, { "../internals/correct-prototype-getter": 51, "../internals/has": 89, "../internals/shared-key": 166, "../internals/to-object": 185 }], 139: [function (require, module, exports) { 'use strict'; var InternalStateModule = require('../internals/internal-state'); var createIteratorConstructor = require('../internals/create-iterator-constructor'); var has = require('../internals/has'); var objectKeys = require('../internals/object-keys'); var toObject = require('../internals/to-object'); var OBJECT_ITERATOR = 'Object Iterator'; var setInternalState = InternalStateModule.set; var getInternalState = InternalStateModule.getterFor(OBJECT_ITERATOR); module.exports = createIteratorConstructor(function ObjectIterator(source, mode) { var object = toObject(source); setInternalState(this, { type: OBJECT_ITERATOR, mode: mode, object: object, keys: objectKeys(object), index: 0 }); }, 'Object', function next() { var state = getInternalState(this); var keys = state.keys; while (true) { if (keys === null || state.index >= keys.length) { state.object = state.keys = null; return { value: undefined, done: true }; } var key = keys[state.index++]; var object = state.object; if (!has(object, key)) continue; switch (state.mode) { case 'keys': return { value: key, done: false }; case 'values': return { value: object[key], done: false }; } /* entries */ return { value: [key, object[key]], done: false }; } }); }, { "../internals/create-iterator-constructor": 53, "../internals/has": 89, "../internals/internal-state": 99, "../internals/object-keys": 141, "../internals/to-object": 185 }], 140: [function (require, module, exports) { var has = require('../internals/has'); var toIndexedObject = require('../internals/to-indexed-object'); var indexOf = require('../internals/array-includes').indexOf; var hiddenKeys = require('../internals/hidden-keys'); module.exports = function (object, names) { var O = toIndexedObject(object); var i = 0; var result = []; var key; for (key in O) { !has(hiddenKeys, key) && has(O, key) && result.push(key); } // Don't enum bug & hidden keys while (names.length > i) { if (has(O, key = names[i++])) { ~indexOf(result, key) || result.push(key); } } return result; }; }, { "../internals/array-includes": 24, "../internals/has": 89, "../internals/hidden-keys": 90, "../internals/to-indexed-object": 182 }], 141: [function (require, module, exports) { var internalObjectKeys = require('../internals/object-keys-internal'); var enumBugKeys = require('../internals/enum-bug-keys'); // `Object.keys` method // https://tc39.es/ecma262/#sec-object.keys // eslint-disable-next-line es/no-object-keys -- safe module.exports = Object.keys || function keys(O) { return internalObjectKeys(O, enumBugKeys); }; }, { "../internals/enum-bug-keys": 73, "../internals/object-keys-internal": 140 }], 142: [function (require, module, exports) { 'use strict'; var $propertyIsEnumerable = {}.propertyIsEnumerable; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; // Nashorn ~ JDK8 bug var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1); // `Object.prototype.propertyIsEnumerable` method implementation // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) { var descriptor = getOwnPropertyDescriptor(this, V); return !!descriptor && descriptor.enumerable; } : $propertyIsEnumerable; }, {}], 143: [function (require, module, exports) { 'use strict'; var IS_PURE = require('../internals/is-pure'); var global = require('../internals/global'); var fails = require('../internals/fails'); var WEBKIT = require('../internals/engine-webkit-version'); // Forced replacement object prototype accessors methods module.exports = IS_PURE || !fails(function () { // This feature detection crashes old WebKit // https://github.com/zloirock/core-js/issues/232 if (WEBKIT && WEBKIT < 535) return; var key = Math.random(); // In FF throws only define methods // eslint-disable-next-line no-undef, no-useless-call -- required for testing __defineSetter__.call(null, key, function () { /* empty */ }); delete global[key]; }); }, { "../internals/engine-webkit-version": 72, "../internals/fails": 75, "../internals/global": 88, "../internals/is-pure": 105 }], 144: [function (require, module, exports) { /* eslint-disable no-proto -- safe */ var anObject = require('../internals/an-object'); var aPossiblePrototype = require('../internals/a-possible-prototype'); // `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 module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () { var CORRECT_SETTER = false; var test = {}; var setter; try { // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set; setter.call(test, []); CORRECT_SETTER = test instanceof Array; } catch (error) { /* empty */ } return function setPrototypeOf(O, proto) { anObject(O); aPossiblePrototype(proto); if (CORRECT_SETTER) setter.call(O, proto);else O.__proto__ = proto; return O; }; }() : undefined); }, { "../internals/a-possible-prototype": 12, "../internals/an-object": 16 }], 145: [function (require, module, exports) { var DESCRIPTORS = require('../internals/descriptors'); var objectKeys = require('../internals/object-keys'); var toIndexedObject = require('../internals/to-indexed-object'); var propertyIsEnumerable = require('../internals/object-property-is-enumerable').f; // `Object.{ entries, values }` methods implementation var createMethod = function createMethod(TO_ENTRIES) { return function (it) { var O = toIndexedObject(it); var keys = objectKeys(O); var length = keys.length; var i = 0; var result = []; var key; while (length > i) { key = keys[i++]; if (!DESCRIPTORS || propertyIsEnumerable.call(O, key)) { result.push(TO_ENTRIES ? [key, O[key]] : O[key]); } } return result; }; }; module.exports = { // `Object.entries` method // https://tc39.es/ecma262/#sec-object.entries entries: createMethod(true), // `Object.values` method // https://tc39.es/ecma262/#sec-object.values values: createMethod(false) }; }, { "../internals/descriptors": 61, "../internals/object-keys": 141, "../internals/object-property-is-enumerable": 142, "../internals/to-indexed-object": 182 }], 146: [function (require, module, exports) { 'use strict'; var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support'); var classof = require('../internals/classof'); // `Object.prototype.toString` method implementation // https://tc39.es/ecma262/#sec-object.prototype.tostring module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() { return '[object ' + classof(this) + ']'; }; }, { "../internals/classof": 40, "../internals/to-string-tag-support": 189 }], 147: [function (require, module, exports) { var getBuiltIn = require('../internals/get-built-in'); var getOwnPropertyNamesModule = require('../internals/object-get-own-property-names'); var getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols'); var anObject = require('../internals/an-object'); // all object keys, includes non-enumerable and symbols module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { var keys = getOwnPropertyNamesModule.f(anObject(it)); var getOwnPropertySymbols = getOwnPropertySymbolsModule.f; return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys; }; }, { "../internals/an-object": 16, "../internals/get-built-in": 82, "../internals/object-get-own-property-names": 136, "../internals/object-get-own-property-symbols": 137 }], 148: [function (require, module, exports) { var global = require('../internals/global'); module.exports = global; }, { "../internals/global": 88 }], 149: [function (require, module, exports) { module.exports = function (exec) { try { return { error: false, value: exec() }; } catch (error) { return { error: true, value: error }; } }; }, {}], 150: [function (require, module, exports) { var anObject = require('../internals/an-object'); var isObject = require('../internals/is-object'); var newPromiseCapability = require('../internals/new-promise-capability'); module.exports = function (C, x) { anObject(C); if (isObject(x) && x.constructor === C) return x; var promiseCapability = newPromiseCapability.f(C); var resolve = promiseCapability.resolve; resolve(x); return promiseCapability.promise; }; }, { "../internals/an-object": 16, "../internals/is-object": 104, "../internals/new-promise-capability": 124 }], 151: [function (require, module, exports) { var redefine = require('../internals/redefine'); module.exports = function (target, src, options) { for (var key in src) { redefine(target, key, src[key], options); } return target; }; }, { "../internals/redefine": 152 }], 152: [function (require, module, exports) { var global = require('../internals/global'); var createNonEnumerableProperty = require('../internals/create-non-enumerable-property'); var has = require('../internals/has'); var setGlobal = require('../internals/set-global'); var inspectSource = require('../internals/inspect-source'); var InternalStateModule = require('../internals/internal-state'); var getInternalState = InternalStateModule.get; var enforceInternalState = InternalStateModule.enforce; var TEMPLATE = String(String).split('String'); (module.exports = function (O, key, value, options) { var unsafe = options ? !!options.unsafe : false; var simple = options ? !!options.enumerable : false; var noTargetGet = options ? !!options.noTargetGet : false; var state; if (typeof value == 'function') { if (typeof key == 'string' && !has(value, 'name')) { createNonEnumerableProperty(value, 'name', key); } state = enforceInternalState(value); if (!state.source) { state.source = TEMPLATE.join(typeof key == 'string' ? key : ''); } } if (O === global) { if (simple) O[key] = value;else setGlobal(key, value); return; } else if (!unsafe) { delete O[key]; } else if (!noTargetGet && O[key]) { simple = true; } if (simple) O[key] = value;else createNonEnumerableProperty(O, key, value); // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative })(Function.prototype, 'toString', function toString() { return typeof this == 'function' && getInternalState(this).source || inspectSource(this); }); }, { "../internals/create-non-enumerable-property": 54, "../internals/global": 88, "../internals/has": 89, "../internals/inspect-source": 97, "../internals/internal-state": 99, "../internals/set-global": 163 }], 153: [function (require, module, exports) { // TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env` var Map = require('../modules/es.map'); var WeakMap = require('../modules/es.weak-map'); var shared = require('../internals/shared'); var metadata = shared('metadata'); var store = metadata.store || (metadata.store = new WeakMap()); var getOrCreateMetadataMap = function getOrCreateMetadataMap(target, targetKey, create) { var targetMetadata = store.get(target); if (!targetMetadata) { if (!create) return; store.set(target, targetMetadata = new Map()); } var keyMetadata = targetMetadata.get(targetKey); if (!keyMetadata) { if (!create) return; targetMetadata.set(targetKey, keyMetadata = new Map()); } return keyMetadata; }; var ordinaryHasOwnMetadata = function ordinaryHasOwnMetadata(MetadataKey, O, P) { var metadataMap = getOrCreateMetadataMap(O, P, false); return metadataMap === undefined ? false : metadataMap.has(MetadataKey); }; var ordinaryGetOwnMetadata = function ordinaryGetOwnMetadata(MetadataKey, O, P) { var metadataMap = getOrCreateMetadataMap(O, P, false); return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); }; var ordinaryDefineOwnMetadata = function ordinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) { getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); }; var ordinaryOwnMetadataKeys = function ordinaryOwnMetadataKeys(target, targetKey) { var metadataMap = getOrCreateMetadataMap(target, targetKey, false); var keys = []; if (metadataMap) metadataMap.forEach(function (_, key) { keys.push(key); }); return keys; }; var toMetadataKey = function toMetadataKey(it) { return it === undefined || typeof it == 'symbol' ? it : String(it); }; module.exports = { store: store, getMap: getOrCreateMetadataMap, has: ordinaryHasOwnMetadata, get: ordinaryGetOwnMetadata, set: ordinaryDefineOwnMetadata, keys: ordinaryOwnMetadataKeys, toKey: toMetadataKey }; }, { "../internals/shared": 168, "../modules/es.map": 248, "../modules/es.weak-map": 415 }], 154: [function (require, module, exports) { var classof = require('./classof-raw'); var regexpExec = require('./regexp-exec'); // `RegExpExec` abstract operation // https://tc39.es/ecma262/#sec-regexpexec module.exports = function (R, S) { var exec = R.exec; if (typeof exec === 'function') { var result = exec.call(R, S); if (typeof result !== 'object') { throw TypeError('RegExp exec method returned something other than an Object or null'); } return result; } if (classof(R) !== 'RegExp') { throw TypeError('RegExp#exec called on incompatible receiver'); } return regexpExec.call(R, S); }; }, { "./classof-raw": 39, "./regexp-exec": 155 }], 155: [function (require, module, exports) { 'use strict'; /* eslint-disable regexp/no-assertion-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */ /* eslint-disable regexp/no-useless-quantifier -- testing */ var regexpFlags = require('../internals/regexp-flags'); var stickyHelpers = require('../internals/regexp-sticky-helpers'); var shared = require('../internals/shared'); var create = require('../internals/object-create'); var getInternalState = require('../internals/internal-state').get; var UNSUPPORTED_DOT_ALL = require('../internals/regexp-unsupported-dot-all'); var UNSUPPORTED_NCG = require('../internals/regexp-unsupported-ncg'); var nativeExec = RegExp.prototype.exec; var nativeReplace = shared('native-string-replace', String.prototype.replace); var patchedExec = nativeExec; var UPDATES_LAST_INDEX_WRONG = function () { var re1 = /a/; var re2 = /b*/g; nativeExec.call(re1, 'a'); nativeExec.call(re2, 'a'); return re1.lastIndex !== 0 || re2.lastIndex !== 0; }(); var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET; // nonparticipating capturing group, copied from es5-shim's String#split patch. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG; if (PATCH) { // eslint-disable-next-line max-statements -- TODO patchedExec = function exec(str) { var re = this; var state = getInternalState(re); var raw = state.raw; var result, reCopy, lastIndex, match, i, object, group; if (raw) { raw.lastIndex = re.lastIndex; result = patchedExec.call(raw, str); re.lastIndex = raw.lastIndex; return result; } var groups = state.groups; var sticky = UNSUPPORTED_Y && re.sticky; var flags = regexpFlags.call(re); var source = re.source; var charsAdded = 0; var strCopy = str; if (sticky) { flags = flags.replace('y', ''); if (flags.indexOf('g') === -1) { flags += 'g'; } strCopy = String(str).slice(re.lastIndex); // Support anchored sticky behavior. if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) { source = '(?: ' + source + ')'; strCopy = ' ' + strCopy; charsAdded++; } // ^(? + rx + ) is needed, in combination with some str slicing, to // simulate the 'y' flag. reCopy = new RegExp('^(?:' + source + ')', flags); } if (NPCG_INCLUDED) { reCopy = new RegExp('^' + source + '$(?!\\s)', flags); } if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex; match = nativeExec.call(sticky ? reCopy : re, strCopy); if (sticky) { if (match) { match.input = match.input.slice(charsAdded); match[0] = match[0].slice(charsAdded); match.index = re.lastIndex; re.lastIndex += match[0].length; } else re.lastIndex = 0; } else if (UPDATES_LAST_INDEX_WRONG && match) { re.lastIndex = re.global ? match.index + match[0].length : lastIndex; } if (NPCG_INCLUDED && match && match.length > 1) { // Fix browsers whose `exec` methods don't consistently return `undefined` // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ nativeReplace.call(match[0], reCopy, function () { for (i = 1; i < arguments.length - 2; i++) { if (arguments[i] === undefined) match[i] = undefined; } }); } if (match && groups) { match.groups = object = create(null); for (i = 0; i < groups.length; i++) { group = groups[i]; object[group[0]] = match[group[1]]; } } return match; }; } module.exports = patchedExec; }, { "../internals/internal-state": 99, "../internals/object-create": 131, "../internals/regexp-flags": 156, "../internals/regexp-sticky-helpers": 157, "../internals/regexp-unsupported-dot-all": 158, "../internals/regexp-unsupported-ncg": 159, "../internals/shared": 168 }], 156: [function (require, module, exports) { 'use strict'; var anObject = require('../internals/an-object'); // `RegExp.prototype.flags` getter implementation // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags module.exports = function () { var that = anObject(this); var result = ''; if (that.global) result += 'g'; if (that.ignoreCase) result += 'i'; if (that.multiline) result += 'm'; if (that.dotAll) result += 's'; if (that.unicode) result += 'u'; if (that.sticky) result += 'y'; return result; }; }, { "../internals/an-object": 16 }], 157: [function (require, module, exports) { var fails = require('../internals/fails'); // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError, var RE = function RE(s, f) { return RegExp(s, f); }; exports.UNSUPPORTED_Y = fails(function () { var re = RE('a', 'y'); re.lastIndex = 2; return re.exec('abcd') != null; }); exports.BROKEN_CARET = fails(function () { // https://bugzilla.mozilla.org/show_bug.cgi?id=773687 var re = RE('^r', 'gy'); re.lastIndex = 2; return re.exec('str') != null; }); }, { "../internals/fails": 75 }], 158: [function (require, module, exports) { var fails = require('./fails'); module.exports = fails(function () { // babel-minify transpiles RegExp('.', 's') -> /./s and it causes SyntaxError var re = RegExp('.', (typeof '').charAt(0)); return !(re.dotAll && re.exec('\n') && re.flags === 's'); }); }, { "./fails": 75 }], 159: [function (require, module, exports) { var fails = require('./fails'); module.exports = fails(function () { // babel-minify transpiles RegExp('.', 'g') -> /./g and it causes SyntaxError var re = RegExp('(?b)', (typeof '').charAt(5)); return re.exec('b').groups.a !== 'b' || 'b'.replace(re, '$c') !== 'bc'; }); }, { "./fails": 75 }], 160: [function (require, module, exports) { // `RequireObjectCoercible` abstract operation // https://tc39.es/ecma262/#sec-requireobjectcoercible module.exports = function (it) { if (it == undefined) throw TypeError("Can't call method on " + it); return it; }; }, {}], 161: [function (require, module, exports) { // `SameValueZero` abstract operation // https://tc39.es/ecma262/#sec-samevaluezero module.exports = function (x, y) { // eslint-disable-next-line no-self-compare -- NaN check return x === y || x != x && y != y; }; }, {}], 162: [function (require, module, exports) { // `SameValue` abstract operation // https://tc39.es/ecma262/#sec-samevalue // eslint-disable-next-line es/no-object-is -- safe module.exports = Object.is || function is(x, y) { // eslint-disable-next-line no-self-compare -- NaN check return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; }; }, {}], 163: [function (require, module, exports) { var global = require('../internals/global'); var createNonEnumerableProperty = require('../internals/create-non-enumerable-property'); module.exports = function (key, value) { try { createNonEnumerableProperty(global, key, value); } catch (error) { global[key] = value; } return value; }; }, { "../internals/create-non-enumerable-property": 54, "../internals/global": 88 }], 164: [function (require, module, exports) { 'use strict'; var getBuiltIn = require('../internals/get-built-in'); var definePropertyModule = require('../internals/object-define-property'); var wellKnownSymbol = require('../internals/well-known-symbol'); var DESCRIPTORS = require('../internals/descriptors'); var SPECIES = wellKnownSymbol('species'); module.exports = function (CONSTRUCTOR_NAME) { var Constructor = getBuiltIn(CONSTRUCTOR_NAME); var defineProperty = definePropertyModule.f; if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) { defineProperty(Constructor, SPECIES, { configurable: true, get: function get() { return this; } }); } }; }, { "../internals/descriptors": 61, "../internals/get-built-in": 82, "../internals/object-define-property": 133, "../internals/well-known-symbol": 197 }], 165: [function (require, module, exports) { var defineProperty = require('../internals/object-define-property').f; var has = require('../internals/has'); var wellKnownSymbol = require('../internals/well-known-symbol'); var TO_STRING_TAG = wellKnownSymbol('toStringTag'); module.exports = function (it, TAG, STATIC) { if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) { defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG }); } }; }, { "../internals/has": 89, "../internals/object-define-property": 133, "../internals/well-known-symbol": 197 }], 166: [function (require, module, exports) { var shared = require('../internals/shared'); var uid = require('../internals/uid'); var keys = shared('keys'); module.exports = function (key) { return keys[key] || (keys[key] = uid(key)); }; }, { "../internals/shared": 168, "../internals/uid": 194 }], 167: [function (require, module, exports) { var global = require('../internals/global'); var setGlobal = require('../internals/set-global'); var SHARED = '__core-js_shared__'; var store = global[SHARED] || setGlobal(SHARED, {}); module.exports = store; }, { "../internals/global": 88, "../internals/set-global": 163 }], 168: [function (require, module, exports) { var IS_PURE = require('../internals/is-pure'); var store = require('../internals/shared-store'); (module.exports = function (key, value) { return store[key] || (store[key] = value !== undefined ? value : {}); })('versions', []).push({ version: '3.15.2', mode: IS_PURE ? 'pure' : 'global', copyright: '© 2021 Denis Pushkarev (zloirock.ru)' }); }, { "../internals/is-pure": 105, "../internals/shared-store": 167 }], 169: [function (require, module, exports) { var anObject = require('../internals/an-object'); var aFunction = require('../internals/a-function'); var wellKnownSymbol = require('../internals/well-known-symbol'); var SPECIES = wellKnownSymbol('species'); // `SpeciesConstructor` abstract operation // https://tc39.es/ecma262/#sec-speciesconstructor module.exports = function (O, defaultConstructor) { var C = anObject(O).constructor; var S; return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S); }; }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/well-known-symbol": 197 }], 170: [function (require, module, exports) { var fails = require('../internals/fails'); // check the existence of a method, lowercase // of a tag and escaping quotes in arguments module.exports = function (METHOD_NAME) { return fails(function () { var test = ''[METHOD_NAME]('"'); return test !== test.toLowerCase() || test.split('"').length > 3; }); }; }, { "../internals/fails": 75 }], 171: [function (require, module, exports) { var toInteger = require('../internals/to-integer'); var requireObjectCoercible = require('../internals/require-object-coercible'); // `String.prototype.{ codePointAt, at }` methods implementation var createMethod = function createMethod(CONVERT_TO_STRING) { return function ($this, pos) { var S = String(requireObjectCoercible($this)); var position = toInteger(pos); var size = S.length; var first, second; if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined; first = S.charCodeAt(position); return first < 0xD800 || first > 0xDBFF || position + 1 === size || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF ? CONVERT_TO_STRING ? S.charAt(position) : first : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000; }; }; module.exports = { // `String.prototype.codePointAt` method // https://tc39.es/ecma262/#sec-string.prototype.codepointat codeAt: createMethod(false), // `String.prototype.at` method // https://github.com/mathiasbynens/String.prototype.at charAt: createMethod(true) }; }, { "../internals/require-object-coercible": 160, "../internals/to-integer": 183 }], 172: [function (require, module, exports) { // https://github.com/zloirock/core-js/issues/280 var userAgent = require('../internals/engine-user-agent'); // eslint-disable-next-line unicorn/no-unsafe-regex -- safe module.exports = /Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(userAgent); }, { "../internals/engine-user-agent": 70 }], 173: [function (require, module, exports) { // https://github.com/tc39/proposal-string-pad-start-end var toLength = require('../internals/to-length'); var repeat = require('../internals/string-repeat'); var requireObjectCoercible = require('../internals/require-object-coercible'); var ceil = Math.ceil; // `String.prototype.{ padStart, padEnd }` methods implementation var createMethod = function createMethod(IS_END) { return function ($this, maxLength, fillString) { var S = String(requireObjectCoercible($this)); var stringLength = S.length; var fillStr = fillString === undefined ? ' ' : String(fillString); var intMaxLength = toLength(maxLength); var fillLen, stringFiller; if (intMaxLength <= stringLength || fillStr == '') return S; fillLen = intMaxLength - stringLength; stringFiller = repeat.call(fillStr, ceil(fillLen / fillStr.length)); if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen); return IS_END ? S + stringFiller : stringFiller + S; }; }; module.exports = { // `String.prototype.padStart` method // https://tc39.es/ecma262/#sec-string.prototype.padstart start: createMethod(false), // `String.prototype.padEnd` method // https://tc39.es/ecma262/#sec-string.prototype.padend end: createMethod(true) }; }, { "../internals/require-object-coercible": 160, "../internals/string-repeat": 175, "../internals/to-length": 184 }], 174: [function (require, module, exports) { 'use strict'; // based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 var base = 36; var tMin = 1; var tMax = 26; var skew = 38; var damp = 700; var initialBias = 72; var initialN = 128; // 0x80 var delimiter = '-'; // '\x2D' var regexNonASCII = /[^\0-\u007E]/; // non-ASCII chars var regexSeparators = /[.\u3002\uFF0E\uFF61]/g; // RFC 3490 separators var OVERFLOW_ERROR = 'Overflow: input needs wider integers to process'; var baseMinusTMin = base - tMin; var floor = Math.floor; var stringFromCharCode = String.fromCharCode; /** * Creates an array containing the numeric code points of each Unicode * character in the string. While JavaScript uses UCS-2 internally, * this function will convert a pair of surrogate halves (each of which * UCS-2 exposes as separate characters) into a single code point, * matching UTF-16. */ var ucs2decode = function ucs2decode(string) { var output = []; var counter = 0; var length = string.length; while (counter < length) { var value = string.charCodeAt(counter++); if (value >= 0xD800 && value <= 0xDBFF && counter < length) { // It's a high surrogate, and there is a next character. var extra = string.charCodeAt(counter++); if ((extra & 0xFC00) == 0xDC00) { // Low surrogate. output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); } else { // It's an unmatched surrogate; only append this code unit, in case the // next code unit is the high surrogate of a surrogate pair. output.push(value); counter--; } } else { output.push(value); } } return output; }; /** * Converts a digit/integer into a basic code point. */ var digitToBasic = function digitToBasic(digit) { // 0..25 map to ASCII a..z or A..Z // 26..35 map to ASCII 0..9 return digit + 22 + 75 * (digit < 26); }; /** * Bias adaptation function as per section 3.4 of RFC 3492. * https://tools.ietf.org/html/rfc3492#section-3.4 */ var adapt = function adapt(delta, numPoints, firstTime) { var k = 0; delta = firstTime ? floor(delta / damp) : delta >> 1; delta += floor(delta / numPoints); for (; delta > baseMinusTMin * tMax >> 1; k += base) { delta = floor(delta / baseMinusTMin); } return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); }; /** * Converts a string of Unicode symbols (e.g. a domain name label) to a * Punycode string of ASCII-only symbols. */ // eslint-disable-next-line max-statements -- TODO var encode = function encode(input) { var output = []; // Convert the input in UCS-2 to an array of Unicode code points. input = ucs2decode(input); // Cache the length. var inputLength = input.length; // Initialize the state. var n = initialN; var delta = 0; var bias = initialBias; var i, currentValue; // Handle the basic code points. for (i = 0; i < input.length; i++) { currentValue = input[i]; if (currentValue < 0x80) { output.push(stringFromCharCode(currentValue)); } } var basicLength = output.length; // number of basic code points. var handledCPCount = basicLength; // number of code points that have been handled; // Finish the basic string with a delimiter unless it's empty. if (basicLength) { output.push(delimiter); } // Main encoding loop: while (handledCPCount < inputLength) { // All non-basic code points < n have been handled already. Find the next larger one: var m = maxInt; for (i = 0; i < input.length; i++) { currentValue = input[i]; if (currentValue >= n && currentValue < m) { m = currentValue; } } // Increase `delta` enough to advance the decoder's state to , but guard against overflow. var handledCPCountPlusOne = handledCPCount + 1; if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { throw RangeError(OVERFLOW_ERROR); } delta += (m - n) * handledCPCountPlusOne; n = m; for (i = 0; i < input.length; i++) { currentValue = input[i]; if (currentValue < n && ++delta > maxInt) { throw RangeError(OVERFLOW_ERROR); } if (currentValue == n) { // Represent delta as a generalized variable-length integer. var q = delta; for (var k = base;; /* no condition */ k += base) { var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; if (q < t) break; var qMinusT = q - t; var baseMinusT = base - t; output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT))); q = floor(qMinusT / baseMinusT); } output.push(stringFromCharCode(digitToBasic(q))); bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); delta = 0; ++handledCPCount; } } ++delta; ++n; } return output.join(''); }; module.exports = function (input) { var encoded = []; var labels = input.toLowerCase().replace(regexSeparators, ".").split('.'); var i, label; for (i = 0; i < labels.length; i++) { label = labels[i]; encoded.push(regexNonASCII.test(label) ? 'xn--' + encode(label) : label); } return encoded.join('.'); }; }, {}], 175: [function (require, module, exports) { 'use strict'; var toInteger = require('../internals/to-integer'); var requireObjectCoercible = require('../internals/require-object-coercible'); // `String.prototype.repeat` method implementation // https://tc39.es/ecma262/#sec-string.prototype.repeat module.exports = function repeat(count) { var str = String(requireObjectCoercible(this)); var result = ''; var n = toInteger(count); if (n < 0 || n == Infinity) throw RangeError('Wrong number of repetitions'); for (; n > 0; (n >>>= 1) && (str += str)) { if (n & 1) result += str; } return result; }; }, { "../internals/require-object-coercible": 160, "../internals/to-integer": 183 }], 176: [function (require, module, exports) { var fails = require('../internals/fails'); var whitespaces = require('../internals/whitespaces'); var non = "\u200B\x85\u180E"; // check that a method works with the correct list // of whitespaces and has a correct name module.exports = function (METHOD_NAME) { return fails(function () { return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME; }); }; }, { "../internals/fails": 75, "../internals/whitespaces": 198 }], 177: [function (require, module, exports) { var requireObjectCoercible = require('../internals/require-object-coercible'); var whitespaces = require('../internals/whitespaces'); var whitespace = '[' + whitespaces + ']'; var ltrim = RegExp('^' + whitespace + whitespace + '*'); var rtrim = RegExp(whitespace + whitespace + '*$'); // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation var createMethod = function createMethod(TYPE) { return function ($this) { var string = String(requireObjectCoercible($this)); if (TYPE & 1) string = string.replace(ltrim, ''); if (TYPE & 2) string = string.replace(rtrim, ''); return string; }; }; module.exports = { // `String.prototype.{ trimLeft, trimStart }` methods // https://tc39.es/ecma262/#sec-string.prototype.trimstart start: createMethod(1), // `String.prototype.{ trimRight, trimEnd }` methods // https://tc39.es/ecma262/#sec-string.prototype.trimend end: createMethod(2), // `String.prototype.trim` method // https://tc39.es/ecma262/#sec-string.prototype.trim trim: createMethod(3) }; }, { "../internals/require-object-coercible": 160, "../internals/whitespaces": 198 }], 178: [function (require, module, exports) { var global = require('../internals/global'); var fails = require('../internals/fails'); var bind = require('../internals/function-bind-context'); var html = require('../internals/html'); var createElement = require('../internals/document-create-element'); var IS_IOS = require('../internals/engine-is-ios'); var IS_NODE = require('../internals/engine-is-node'); var location = global.location; var set = global.setImmediate; var clear = global.clearImmediate; var process = global.process; var MessageChannel = global.MessageChannel; var Dispatch = global.Dispatch; var counter = 0; var queue = {}; var ONREADYSTATECHANGE = 'onreadystatechange'; var defer, channel, port; var run = function run(id) { // eslint-disable-next-line no-prototype-builtins -- safe if (queue.hasOwnProperty(id)) { var fn = queue[id]; delete queue[id]; fn(); } }; var runner = function runner(id) { return function () { run(id); }; }; var listener = function listener(event) { run(event.data); }; var post = function post(id) { // old engines have not location.origin global.postMessage(id + '', location.protocol + '//' + location.host); }; // Node.js 0.9+ & IE10+ has setImmediate, otherwise: if (!set || !clear) { set = function setImmediate(fn) { var args = []; var i = 1; while (arguments.length > i) { args.push(arguments[i++]); } queue[++counter] = function () { // eslint-disable-next-line no-new-func -- spec requirement (typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args); }; defer(counter); return counter; }; clear = function clearImmediate(id) { delete queue[id]; }; // Node.js 0.8- if (IS_NODE) { defer = function defer(id) { process.nextTick(runner(id)); }; // Sphere (JS game engine) Dispatch API } else if (Dispatch && Dispatch.now) { defer = function defer(id) { Dispatch.now(runner(id)); }; // Browsers with MessageChannel, includes WebWorkers // except iOS - https://github.com/zloirock/core-js/issues/624 } else if (MessageChannel && !IS_IOS) { channel = new MessageChannel(); port = channel.port2; channel.port1.onmessage = listener; defer = bind(port.postMessage, port, 1); // Browsers with postMessage, skip WebWorkers // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts && location && location.protocol !== 'file:' && !fails(post)) { defer = post; global.addEventListener('message', listener, false); // IE8- } else if (ONREADYSTATECHANGE in createElement('script')) { defer = function defer(id) { html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () { html.removeChild(this); run(id); }; }; // Rest old browsers } else { defer = function defer(id) { setTimeout(runner(id), 0); }; } } module.exports = { set: set, clear: clear }; }, { "../internals/document-create-element": 62, "../internals/engine-is-ios": 67, "../internals/engine-is-node": 68, "../internals/fails": 75, "../internals/function-bind-context": 79, "../internals/global": 88, "../internals/html": 92 }], 179: [function (require, module, exports) { var classof = require('../internals/classof-raw'); // `thisNumberValue` abstract operation // https://tc39.es/ecma262/#sec-thisnumbervalue module.exports = function (value) { if (typeof value != 'number' && classof(value) != 'Number') { throw TypeError('Incorrect invocation'); } return +value; }; }, { "../internals/classof-raw": 39 }], 180: [function (require, module, exports) { var toInteger = require('../internals/to-integer'); var max = 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). module.exports = function (index, length) { var integer = toInteger(index); return integer < 0 ? max(integer + length, 0) : min(integer, length); }; }, { "../internals/to-integer": 183 }], 181: [function (require, module, exports) { var toInteger = require('../internals/to-integer'); var toLength = require('../internals/to-length'); // `ToIndex` abstract operation // https://tc39.es/ecma262/#sec-toindex module.exports = function (it) { if (it === undefined) return 0; var number = toInteger(it); var length = toLength(number); if (number !== length) throw RangeError('Wrong length or index'); return length; }; }, { "../internals/to-integer": 183, "../internals/to-length": 184 }], 182: [function (require, module, exports) { // toObject with fallback for non-array-like ES3 strings var IndexedObject = require('../internals/indexed-object'); var requireObjectCoercible = require('../internals/require-object-coercible'); module.exports = function (it) { return IndexedObject(requireObjectCoercible(it)); }; }, { "../internals/indexed-object": 95, "../internals/require-object-coercible": 160 }], 183: [function (require, module, exports) { var ceil = Math.ceil; var floor = Math.floor; // `ToInteger` abstract operation // https://tc39.es/ecma262/#sec-tointeger module.exports = function (argument) { return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument); }; }, {}], 184: [function (require, module, exports) { var toInteger = require('../internals/to-integer'); var min = Math.min; // `ToLength` abstract operation // https://tc39.es/ecma262/#sec-tolength module.exports = function (argument) { return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 }; }, { "../internals/to-integer": 183 }], 185: [function (require, module, exports) { var requireObjectCoercible = require('../internals/require-object-coercible'); // `ToObject` abstract operation // https://tc39.es/ecma262/#sec-toobject module.exports = function (argument) { return Object(requireObjectCoercible(argument)); }; }, { "../internals/require-object-coercible": 160 }], 186: [function (require, module, exports) { var toPositiveInteger = require('../internals/to-positive-integer'); module.exports = function (it, BYTES) { var offset = toPositiveInteger(it); if (offset % BYTES) throw RangeError('Wrong offset'); return offset; }; }, { "../internals/to-positive-integer": 187 }], 187: [function (require, module, exports) { var toInteger = require('../internals/to-integer'); module.exports = function (it) { var result = toInteger(it); if (result < 0) throw RangeError("The argument can't be less than 0"); return result; }; }, { "../internals/to-integer": 183 }], 188: [function (require, module, exports) { var isObject = require('../internals/is-object'); // `ToPrimitive` abstract operation // https://tc39.es/ecma262/#sec-toprimitive // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string module.exports = function (input, PREFERRED_STRING) { if (!isObject(input)) return input; var fn, val; if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val; if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; throw TypeError("Can't convert object to primitive value"); }; }, { "../internals/is-object": 104 }], 189: [function (require, module, exports) { var wellKnownSymbol = require('../internals/well-known-symbol'); var TO_STRING_TAG = wellKnownSymbol('toStringTag'); var test = {}; test[TO_STRING_TAG] = 'z'; module.exports = String(test) === '[object z]'; }, { "../internals/well-known-symbol": 197 }], 190: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var global = require('../internals/global'); var DESCRIPTORS = require('../internals/descriptors'); var TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = require('../internals/typed-array-constructors-require-wrappers'); var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var ArrayBufferModule = require('../internals/array-buffer'); var anInstance = require('../internals/an-instance'); var createPropertyDescriptor = require('../internals/create-property-descriptor'); var createNonEnumerableProperty = require('../internals/create-non-enumerable-property'); var toLength = require('../internals/to-length'); var toIndex = require('../internals/to-index'); var toOffset = require('../internals/to-offset'); var toPrimitive = require('../internals/to-primitive'); var has = require('../internals/has'); var classof = require('../internals/classof'); var isObject = require('../internals/is-object'); var create = require('../internals/object-create'); var setPrototypeOf = require('../internals/object-set-prototype-of'); var getOwnPropertyNames = require('../internals/object-get-own-property-names').f; var typedArrayFrom = require('../internals/typed-array-from'); var forEach = require('../internals/array-iteration').forEach; var setSpecies = require('../internals/set-species'); var definePropertyModule = require('../internals/object-define-property'); var getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor'); var InternalStateModule = require('../internals/internal-state'); var inheritIfRequired = require('../internals/inherit-if-required'); var getInternalState = InternalStateModule.get; var setInternalState = InternalStateModule.set; var nativeDefineProperty = definePropertyModule.f; var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; var round = Math.round; var RangeError = global.RangeError; var ArrayBuffer = ArrayBufferModule.ArrayBuffer; var DataView = ArrayBufferModule.DataView; var NATIVE_ARRAY_BUFFER_VIEWS = ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS; var TYPED_ARRAY_TAG = ArrayBufferViewCore.TYPED_ARRAY_TAG; var TypedArray = ArrayBufferViewCore.TypedArray; var TypedArrayPrototype = ArrayBufferViewCore.TypedArrayPrototype; var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor; var isTypedArray = ArrayBufferViewCore.isTypedArray; var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'; var WRONG_LENGTH = 'Wrong length'; var fromList = function fromList(C, list) { var index = 0; var length = list.length; var result = new (aTypedArrayConstructor(C))(length); while (length > index) { result[index] = list[index++]; } return result; }; var addGetter = function addGetter(it, key) { nativeDefineProperty(it, key, { get: function get() { return getInternalState(this)[key]; } }); }; var isArrayBuffer = function isArrayBuffer(it) { var klass; return it instanceof ArrayBuffer || (klass = classof(it)) == 'ArrayBuffer' || klass == 'SharedArrayBuffer'; }; var isTypedArrayIndex = function isTypedArrayIndex(target, key) { return isTypedArray(target) && typeof key != 'symbol' && key in target && String(+key) == String(key); }; var wrappedGetOwnPropertyDescriptor = function getOwnPropertyDescriptor(target, key) { return isTypedArrayIndex(target, key = toPrimitive(key, true)) ? createPropertyDescriptor(2, target[key]) : nativeGetOwnPropertyDescriptor(target, key); }; var wrappedDefineProperty = function defineProperty(target, key, descriptor) { if (isTypedArrayIndex(target, key = toPrimitive(key, true)) && isObject(descriptor) && has(descriptor, 'value') && !has(descriptor, 'get') && !has(descriptor, 'set') // TODO: add validation descriptor w/o calling accessors && !descriptor.configurable && (!has(descriptor, 'writable') || descriptor.writable) && (!has(descriptor, 'enumerable') || descriptor.enumerable)) { target[key] = descriptor.value; return target; } return nativeDefineProperty(target, key, descriptor); }; if (DESCRIPTORS) { if (!NATIVE_ARRAY_BUFFER_VIEWS) { getOwnPropertyDescriptorModule.f = wrappedGetOwnPropertyDescriptor; definePropertyModule.f = wrappedDefineProperty; addGetter(TypedArrayPrototype, 'buffer'); addGetter(TypedArrayPrototype, 'byteOffset'); addGetter(TypedArrayPrototype, 'byteLength'); addGetter(TypedArrayPrototype, 'length'); } $({ target: 'Object', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, { getOwnPropertyDescriptor: wrappedGetOwnPropertyDescriptor, defineProperty: wrappedDefineProperty }); module.exports = function (TYPE, wrapper, CLAMPED) { var BYTES = TYPE.match(/\d+$/)[0] / 8; var CONSTRUCTOR_NAME = TYPE + (CLAMPED ? 'Clamped' : '') + 'Array'; var GETTER = 'get' + TYPE; var SETTER = 'set' + TYPE; var NativeTypedArrayConstructor = global[CONSTRUCTOR_NAME]; var TypedArrayConstructor = NativeTypedArrayConstructor; var TypedArrayConstructorPrototype = TypedArrayConstructor && TypedArrayConstructor.prototype; var exported = {}; var getter = function getter(that, index) { var data = getInternalState(that); return data.view[GETTER](index * BYTES + data.byteOffset, true); }; var setter = function setter(that, index, value) { var data = getInternalState(that); if (CLAMPED) value = (value = round(value)) < 0 ? 0 : value > 0xFF ? 0xFF : value & 0xFF; data.view[SETTER](index * BYTES + data.byteOffset, value, true); }; var addElement = function addElement(that, index) { nativeDefineProperty(that, index, { get: function get() { return getter(this, index); }, set: function set(value) { return setter(this, index, value); }, enumerable: true }); }; if (!NATIVE_ARRAY_BUFFER_VIEWS) { TypedArrayConstructor = wrapper(function (that, data, offset, $length) { anInstance(that, TypedArrayConstructor, CONSTRUCTOR_NAME); var index = 0; var byteOffset = 0; var buffer, byteLength, length; if (!isObject(data)) { length = toIndex(data); byteLength = length * BYTES; buffer = new ArrayBuffer(byteLength); } else if (isArrayBuffer(data)) { buffer = data; byteOffset = toOffset(offset, BYTES); var $len = data.byteLength; if ($length === undefined) { if ($len % BYTES) throw RangeError(WRONG_LENGTH); byteLength = $len - byteOffset; if (byteLength < 0) throw RangeError(WRONG_LENGTH); } else { byteLength = toLength($length) * BYTES; if (byteLength + byteOffset > $len) throw RangeError(WRONG_LENGTH); } length = byteLength / BYTES; } else if (isTypedArray(data)) { return fromList(TypedArrayConstructor, data); } else { return typedArrayFrom.call(TypedArrayConstructor, data); } setInternalState(that, { buffer: buffer, byteOffset: byteOffset, byteLength: byteLength, length: length, view: new DataView(buffer) }); while (index < length) { addElement(that, index++); } }); if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray); TypedArrayConstructorPrototype = TypedArrayConstructor.prototype = create(TypedArrayPrototype); } else if (TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS) { TypedArrayConstructor = wrapper(function (dummy, data, typedArrayOffset, $length) { anInstance(dummy, TypedArrayConstructor, CONSTRUCTOR_NAME); return inheritIfRequired(function () { if (!isObject(data)) return new NativeTypedArrayConstructor(toIndex(data)); if (isArrayBuffer(data)) return $length !== undefined ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES), $length) : typedArrayOffset !== undefined ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES)) : new NativeTypedArrayConstructor(data); if (isTypedArray(data)) return fromList(TypedArrayConstructor, data); return typedArrayFrom.call(TypedArrayConstructor, data); }(), dummy, TypedArrayConstructor); }); if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray); forEach(getOwnPropertyNames(NativeTypedArrayConstructor), function (key) { if (!(key in TypedArrayConstructor)) { createNonEnumerableProperty(TypedArrayConstructor, key, NativeTypedArrayConstructor[key]); } }); TypedArrayConstructor.prototype = TypedArrayConstructorPrototype; } if (TypedArrayConstructorPrototype.constructor !== TypedArrayConstructor) { createNonEnumerableProperty(TypedArrayConstructorPrototype, 'constructor', TypedArrayConstructor); } if (TYPED_ARRAY_TAG) { createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_TAG, CONSTRUCTOR_NAME); } exported[CONSTRUCTOR_NAME] = TypedArrayConstructor; $({ global: true, forced: TypedArrayConstructor != NativeTypedArrayConstructor, sham: !NATIVE_ARRAY_BUFFER_VIEWS }, exported); if (!(BYTES_PER_ELEMENT in TypedArrayConstructor)) { createNonEnumerableProperty(TypedArrayConstructor, BYTES_PER_ELEMENT, BYTES); } if (!(BYTES_PER_ELEMENT in TypedArrayConstructorPrototype)) { createNonEnumerableProperty(TypedArrayConstructorPrototype, BYTES_PER_ELEMENT, BYTES); } setSpecies(CONSTRUCTOR_NAME); }; } else module.exports = function () { /* empty */ }; }, { "../internals/an-instance": 15, "../internals/array-buffer": 19, "../internals/array-buffer-view-core": 18, "../internals/array-iteration": 26, "../internals/classof": 40, "../internals/create-non-enumerable-property": 54, "../internals/create-property-descriptor": 55, "../internals/descriptors": 61, "../internals/export": 74, "../internals/global": 88, "../internals/has": 89, "../internals/inherit-if-required": 96, "../internals/internal-state": 99, "../internals/is-object": 104, "../internals/object-create": 131, "../internals/object-define-property": 133, "../internals/object-get-own-property-descriptor": 134, "../internals/object-get-own-property-names": 136, "../internals/object-set-prototype-of": 144, "../internals/set-species": 164, "../internals/to-index": 181, "../internals/to-length": 184, "../internals/to-offset": 186, "../internals/to-primitive": 188, "../internals/typed-array-constructors-require-wrappers": 191, "../internals/typed-array-from": 193 }], 191: [function (require, module, exports) { /* eslint-disable no-new -- required for testing */ var global = require('../internals/global'); var fails = require('../internals/fails'); var checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration'); var NATIVE_ARRAY_BUFFER_VIEWS = require('../internals/array-buffer-view-core').NATIVE_ARRAY_BUFFER_VIEWS; var ArrayBuffer = global.ArrayBuffer; var Int8Array = global.Int8Array; module.exports = !NATIVE_ARRAY_BUFFER_VIEWS || !fails(function () { Int8Array(1); }) || !fails(function () { new Int8Array(-1); }) || !checkCorrectnessOfIteration(function (iterable) { new Int8Array(); new Int8Array(null); new Int8Array(1.5); new Int8Array(iterable); }, true) || fails(function () { // Safari (11+) bug - a reason why even Safari 13 should load a typed array polyfill return new Int8Array(new ArrayBuffer(2), 1, undefined).length !== 1; }); }, { "../internals/array-buffer-view-core": 18, "../internals/check-correctness-of-iteration": 38, "../internals/fails": 75, "../internals/global": 88 }], 192: [function (require, module, exports) { var aTypedArrayConstructor = require('../internals/array-buffer-view-core').aTypedArrayConstructor; var speciesConstructor = require('../internals/species-constructor'); module.exports = function (instance, list) { var C = speciesConstructor(instance, instance.constructor); var index = 0; var length = list.length; var result = new (aTypedArrayConstructor(C))(length); while (length > index) { result[index] = list[index++]; } return result; }; }, { "../internals/array-buffer-view-core": 18, "../internals/species-constructor": 169 }], 193: [function (require, module, exports) { var toObject = require('../internals/to-object'); var toLength = require('../internals/to-length'); var getIteratorMethod = require('../internals/get-iterator-method'); var isArrayIteratorMethod = require('../internals/is-array-iterator-method'); var bind = require('../internals/function-bind-context'); var aTypedArrayConstructor = require('../internals/array-buffer-view-core').aTypedArrayConstructor; module.exports = function from(source /* , mapfn, thisArg */ ) { var O = toObject(source); var argumentsLength = arguments.length; var mapfn = argumentsLength > 1 ? arguments[1] : undefined; var mapping = mapfn !== undefined; var iteratorMethod = getIteratorMethod(O); var i, length, result, step, iterator, next; if (iteratorMethod != undefined && !isArrayIteratorMethod(iteratorMethod)) { iterator = iteratorMethod.call(O); next = iterator.next; O = []; while (!(step = next.call(iterator)).done) { O.push(step.value); } } if (mapping && argumentsLength > 2) { mapfn = bind(mapfn, arguments[2], 2); } length = toLength(O.length); result = new (aTypedArrayConstructor(this))(length); for (i = 0; length > i; i++) { result[i] = mapping ? mapfn(O[i], i) : O[i]; } return result; }; }, { "../internals/array-buffer-view-core": 18, "../internals/function-bind-context": 79, "../internals/get-iterator-method": 83, "../internals/is-array-iterator-method": 100, "../internals/to-length": 184, "../internals/to-object": 185 }], 194: [function (require, module, exports) { var id = 0; var postfix = Math.random(); module.exports = function (key) { return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36); }; }, {}], 195: [function (require, module, exports) { /* eslint-disable es/no-symbol -- required for testing */ var NATIVE_SYMBOL = require('../internals/native-symbol'); module.exports = NATIVE_SYMBOL && !Symbol.sham && typeof Symbol.iterator == 'symbol'; }, { "../internals/native-symbol": 121 }], 196: [function (require, module, exports) { var wellKnownSymbol = require('../internals/well-known-symbol'); exports.f = wellKnownSymbol; }, { "../internals/well-known-symbol": 197 }], 197: [function (require, module, exports) { var global = require('../internals/global'); var shared = require('../internals/shared'); var has = require('../internals/has'); var uid = require('../internals/uid'); var NATIVE_SYMBOL = require('../internals/native-symbol'); var USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid'); var WellKnownSymbolsStore = shared('wks'); var Symbol = global.Symbol; var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid; module.exports = function (name) { if (!has(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) { if (NATIVE_SYMBOL && has(Symbol, name)) { WellKnownSymbolsStore[name] = Symbol[name]; } else { WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name); } } return WellKnownSymbolsStore[name]; }; }, { "../internals/global": 88, "../internals/has": 89, "../internals/native-symbol": 121, "../internals/shared": 168, "../internals/uid": 194, "../internals/use-symbol-as-uid": 195 }], 198: [function (require, module, exports) { // a string of all valid unicode whitespaces module.exports = "\t\n\x0B\f\r \xA0\u1680\u2000\u2001\u2002" + "\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF"; }, {}], 199: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var getPrototypeOf = require('../internals/object-get-prototype-of'); var setPrototypeOf = require('../internals/object-set-prototype-of'); var create = require('../internals/object-create'); var createNonEnumerableProperty = require('../internals/create-non-enumerable-property'); var createPropertyDescriptor = require('../internals/create-property-descriptor'); var iterate = require('../internals/iterate'); var $AggregateError = function AggregateError(errors, message) { var that = this; if (!(that instanceof $AggregateError)) return new $AggregateError(errors, message); if (setPrototypeOf) { // eslint-disable-next-line unicorn/error-message -- expected that = setPrototypeOf(new Error(undefined), getPrototypeOf(that)); } if (message !== undefined) createNonEnumerableProperty(that, 'message', String(message)); var errorsArray = []; iterate(errors, errorsArray.push, { that: errorsArray }); createNonEnumerableProperty(that, 'errors', errorsArray); return that; }; $AggregateError.prototype = create(Error.prototype, { constructor: createPropertyDescriptor(5, $AggregateError), message: createPropertyDescriptor(5, ''), name: createPropertyDescriptor(5, 'AggregateError') }); // `AggregateError` constructor // https://tc39.es/ecma262/#sec-aggregate-error-constructor $({ global: true }, { AggregateError: $AggregateError }); }, { "../internals/create-non-enumerable-property": 54, "../internals/create-property-descriptor": 55, "../internals/export": 74, "../internals/iterate": 107, "../internals/object-create": 131, "../internals/object-get-prototype-of": 138, "../internals/object-set-prototype-of": 144 }], 200: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var global = require('../internals/global'); var arrayBufferModule = require('../internals/array-buffer'); var setSpecies = require('../internals/set-species'); var ARRAY_BUFFER = 'ArrayBuffer'; var ArrayBuffer = arrayBufferModule[ARRAY_BUFFER]; var NativeArrayBuffer = global[ARRAY_BUFFER]; // `ArrayBuffer` constructor // https://tc39.es/ecma262/#sec-arraybuffer-constructor $({ global: true, forced: NativeArrayBuffer !== ArrayBuffer }, { ArrayBuffer: ArrayBuffer }); setSpecies(ARRAY_BUFFER); }, { "../internals/array-buffer": 19, "../internals/export": 74, "../internals/global": 88, "../internals/set-species": 164 }], 201: [function (require, module, exports) { var $ = require('../internals/export'); var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var NATIVE_ARRAY_BUFFER_VIEWS = ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS; // `ArrayBuffer.isView` method // https://tc39.es/ecma262/#sec-arraybuffer.isview $({ target: 'ArrayBuffer', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, { isView: ArrayBufferViewCore.isView }); }, { "../internals/array-buffer-view-core": 18, "../internals/export": 74 }], 202: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var fails = require('../internals/fails'); var ArrayBufferModule = require('../internals/array-buffer'); var anObject = require('../internals/an-object'); var toAbsoluteIndex = require('../internals/to-absolute-index'); var toLength = require('../internals/to-length'); var speciesConstructor = require('../internals/species-constructor'); var ArrayBuffer = ArrayBufferModule.ArrayBuffer; var DataView = ArrayBufferModule.DataView; var nativeArrayBufferSlice = ArrayBuffer.prototype.slice; var INCORRECT_SLICE = fails(function () { return !new ArrayBuffer(2).slice(1, undefined).byteLength; }); // `ArrayBuffer.prototype.slice` method // https://tc39.es/ecma262/#sec-arraybuffer.prototype.slice $({ target: 'ArrayBuffer', proto: true, unsafe: true, forced: INCORRECT_SLICE }, { slice: function slice(start, end) { if (nativeArrayBufferSlice !== undefined && end === undefined) { return nativeArrayBufferSlice.call(anObject(this), start); // FF fix } var length = anObject(this).byteLength; var first = toAbsoluteIndex(start, length); var fin = toAbsoluteIndex(end === undefined ? length : end, length); var result = new (speciesConstructor(this, ArrayBuffer))(toLength(fin - first)); var viewSource = new DataView(this); var viewTarget = new DataView(result); var index = 0; while (first < fin) { viewTarget.setUint8(index++, viewSource.getUint8(first++)); } return result; } }); }, { "../internals/an-object": 16, "../internals/array-buffer": 19, "../internals/export": 74, "../internals/fails": 75, "../internals/species-constructor": 169, "../internals/to-absolute-index": 180, "../internals/to-length": 184 }], 203: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var fails = require('../internals/fails'); var isArray = require('../internals/is-array'); var isObject = require('../internals/is-object'); var toObject = require('../internals/to-object'); var toLength = require('../internals/to-length'); var createProperty = require('../internals/create-property'); var arraySpeciesCreate = require('../internals/array-species-create'); var arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support'); var wellKnownSymbol = require('../internals/well-known-symbol'); var V8_VERSION = require('../internals/engine-v8-version'); var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable'); var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded'; // 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 SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat'); var isConcatSpreadable = function isConcatSpreadable(O) { if (!isObject(O)) return false; var spreadable = O[IS_CONCAT_SPREADABLE]; return spreadable !== undefined ? !!spreadable : isArray(O); }; var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT; // `Array.prototype.concat` method // https://tc39.es/ecma262/#sec-array.prototype.concat // with adding support of @@isConcatSpreadable and @@species $({ target: 'Array', proto: true, forced: FORCED }, { // 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 = toLength(E.length); if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); for (k = 0; k < len; k++, n++) { if (k in E) createProperty(A, n, E[k]); } } else { if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); createProperty(A, n++, E); } } A.length = n; return A; } }); }, { "../internals/array-method-has-species-support": 28, "../internals/array-species-create": 32, "../internals/create-property": 56, "../internals/engine-v8-version": 71, "../internals/export": 74, "../internals/fails": 75, "../internals/is-array": 101, "../internals/is-object": 104, "../internals/to-length": 184, "../internals/to-object": 185, "../internals/well-known-symbol": 197 }], 204: [function (require, module, exports) { var $ = require('../internals/export'); var copyWithin = require('../internals/array-copy-within'); var addToUnscopables = require('../internals/add-to-unscopables'); // `Array.prototype.copyWithin` method // https://tc39.es/ecma262/#sec-array.prototype.copywithin $({ target: 'Array', proto: true }, { copyWithin: copyWithin }); // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables addToUnscopables('copyWithin'); }, { "../internals/add-to-unscopables": 13, "../internals/array-copy-within": 20, "../internals/export": 74 }], 205: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var $every = require('../internals/array-iteration').every; var arrayMethodIsStrict = require('../internals/array-method-is-strict'); var STRICT_METHOD = arrayMethodIsStrict('every'); // `Array.prototype.every` method // https://tc39.es/ecma262/#sec-array.prototype.every $({ target: 'Array', proto: true, forced: !STRICT_METHOD }, { every: function every(callbackfn /* , thisArg */ ) { return $every(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); }, { "../internals/array-iteration": 26, "../internals/array-method-is-strict": 29, "../internals/export": 74 }], 206: [function (require, module, exports) { var $ = require('../internals/export'); var fill = require('../internals/array-fill'); var addToUnscopables = require('../internals/add-to-unscopables'); // `Array.prototype.fill` method // https://tc39.es/ecma262/#sec-array.prototype.fill $({ target: 'Array', proto: true }, { fill: fill }); // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables addToUnscopables('fill'); }, { "../internals/add-to-unscopables": 13, "../internals/array-fill": 21, "../internals/export": 74 }], 207: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var $filter = require('../internals/array-iteration').filter; var arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support'); var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter'); // `Array.prototype.filter` method // https://tc39.es/ecma262/#sec-array.prototype.filter // with adding support of @@species $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, { filter: function filter(callbackfn /* , thisArg */ ) { return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); }, { "../internals/array-iteration": 26, "../internals/array-method-has-species-support": 28, "../internals/export": 74 }], 208: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var $findIndex = require('../internals/array-iteration').findIndex; var addToUnscopables = require('../internals/add-to-unscopables'); var FIND_INDEX = 'findIndex'; var SKIPS_HOLES = true; // Shouldn't skip holes if (FIND_INDEX in []) Array(1)[FIND_INDEX](function () { SKIPS_HOLES = false; }); // `Array.prototype.findIndex` method // https://tc39.es/ecma262/#sec-array.prototype.findindex $({ target: 'Array', proto: true, forced: SKIPS_HOLES }, { findIndex: function findIndex(callbackfn /* , that = undefined */ ) { return $findIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables addToUnscopables(FIND_INDEX); }, { "../internals/add-to-unscopables": 13, "../internals/array-iteration": 26, "../internals/export": 74 }], 209: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var $find = require('../internals/array-iteration').find; var addToUnscopables = require('../internals/add-to-unscopables'); var FIND = 'find'; var SKIPS_HOLES = true; // Shouldn't skip holes if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; }); // `Array.prototype.find` method // https://tc39.es/ecma262/#sec-array.prototype.find $({ target: 'Array', proto: true, forced: SKIPS_HOLES }, { find: function find(callbackfn /* , that = undefined */ ) { return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables addToUnscopables(FIND); }, { "../internals/add-to-unscopables": 13, "../internals/array-iteration": 26, "../internals/export": 74 }], 210: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var flattenIntoArray = require('../internals/flatten-into-array'); var toObject = require('../internals/to-object'); var toLength = require('../internals/to-length'); var aFunction = require('../internals/a-function'); var arraySpeciesCreate = require('../internals/array-species-create'); // `Array.prototype.flatMap` method // https://tc39.es/ecma262/#sec-array.prototype.flatmap $({ target: 'Array', proto: true }, { flatMap: function flatMap(callbackfn /* , thisArg */ ) { var O = toObject(this); var sourceLen = toLength(O.length); var A; aFunction(callbackfn); A = arraySpeciesCreate(O, 0); A.length = flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined); return A; } }); }, { "../internals/a-function": 11, "../internals/array-species-create": 32, "../internals/export": 74, "../internals/flatten-into-array": 77, "../internals/to-length": 184, "../internals/to-object": 185 }], 211: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var flattenIntoArray = require('../internals/flatten-into-array'); var toObject = require('../internals/to-object'); var toLength = require('../internals/to-length'); var toInteger = require('../internals/to-integer'); var arraySpeciesCreate = require('../internals/array-species-create'); // `Array.prototype.flat` method // https://tc39.es/ecma262/#sec-array.prototype.flat $({ target: 'Array', proto: true }, { flat: function flat() /* depthArg = 1 */ { var depthArg = arguments.length ? arguments[0] : undefined; var O = toObject(this); var sourceLen = toLength(O.length); var A = arraySpeciesCreate(O, 0); A.length = flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg)); return A; } }); }, { "../internals/array-species-create": 32, "../internals/export": 74, "../internals/flatten-into-array": 77, "../internals/to-integer": 183, "../internals/to-length": 184, "../internals/to-object": 185 }], 212: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var forEach = require('../internals/array-for-each'); // `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 }, { forEach: forEach }); }, { "../internals/array-for-each": 22, "../internals/export": 74 }], 213: [function (require, module, exports) { var $ = require('../internals/export'); var from = require('../internals/array-from'); var checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration'); var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) { // eslint-disable-next-line es/no-array-from -- required for testing Array.from(iterable); }); // `Array.from` method // https://tc39.es/ecma262/#sec-array.from $({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, { from: from }); }, { "../internals/array-from": 23, "../internals/check-correctness-of-iteration": 38, "../internals/export": 74 }], 214: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var $includes = require('../internals/array-includes').includes; var addToUnscopables = require('../internals/add-to-unscopables'); // `Array.prototype.includes` method // https://tc39.es/ecma262/#sec-array.prototype.includes $({ target: 'Array', proto: true }, { includes: function includes(el /* , fromIndex = 0 */ ) { return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); } }); // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables addToUnscopables('includes'); }, { "../internals/add-to-unscopables": 13, "../internals/array-includes": 24, "../internals/export": 74 }], 215: [function (require, module, exports) { 'use strict'; /* eslint-disable es/no-array-prototype-indexof -- required for testing */ var $ = require('../internals/export'); var $indexOf = require('../internals/array-includes').indexOf; var arrayMethodIsStrict = require('../internals/array-method-is-strict'); var nativeIndexOf = [].indexOf; var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0; var STRICT_METHOD = arrayMethodIsStrict('indexOf'); // `Array.prototype.indexOf` method // https://tc39.es/ecma262/#sec-array.prototype.indexof $({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD }, { indexOf: function indexOf(searchElement /* , fromIndex = 0 */ ) { return NEGATIVE_ZERO // convert -0 to +0 ? nativeIndexOf.apply(this, arguments) || 0 : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined); } }); }, { "../internals/array-includes": 24, "../internals/array-method-is-strict": 29, "../internals/export": 74 }], 216: [function (require, module, exports) { var $ = require('../internals/export'); var isArray = require('../internals/is-array'); // `Array.isArray` method // https://tc39.es/ecma262/#sec-array.isarray $({ target: 'Array', stat: true }, { isArray: isArray }); }, { "../internals/export": 74, "../internals/is-array": 101 }], 217: [function (require, module, exports) { 'use strict'; var toIndexedObject = require('../internals/to-indexed-object'); var addToUnscopables = require('../internals/add-to-unscopables'); var Iterators = require('../internals/iterators'); var InternalStateModule = require('../internals/internal-state'); var defineIterator = require('../internals/define-iterator'); var ARRAY_ITERATOR = 'Array Iterator'; var setInternalState = InternalStateModule.set; var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR); // `Array.prototype.entries` method // https://tc39.es/ecma262/#sec-array.prototype.entries // `Array.prototype.keys` method // https://tc39.es/ecma262/#sec-array.prototype.keys // `Array.prototype.values` method // https://tc39.es/ecma262/#sec-array.prototype.values // `Array.prototype[@@iterator]` method // https://tc39.es/ecma262/#sec-array.prototype-@@iterator // `CreateArrayIterator` internal method // https://tc39.es/ecma262/#sec-createarrayiterator module.exports = defineIterator(Array, 'Array', function (iterated, kind) { setInternalState(this, { type: ARRAY_ITERATOR, target: toIndexedObject(iterated), // target index: 0, // next index kind: kind // kind }); // `%ArrayIteratorPrototype%.next` method // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next }, function () { var state = getInternalState(this); var target = state.target; var kind = state.kind; var index = state.index++; if (!target || index >= target.length) { state.target = undefined; return { value: undefined, done: true }; } if (kind == 'keys') return { value: index, done: false }; if (kind == 'values') return { value: target[index], done: false }; return { value: [index, target[index]], done: false }; }, 'values'); // argumentsList[@@iterator] is %ArrayProto_values% // https://tc39.es/ecma262/#sec-createunmappedargumentsobject // https://tc39.es/ecma262/#sec-createmappedargumentsobject Iterators.Arguments = Iterators.Array; // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables addToUnscopables('keys'); addToUnscopables('values'); addToUnscopables('entries'); }, { "../internals/add-to-unscopables": 13, "../internals/define-iterator": 59, "../internals/internal-state": 99, "../internals/iterators": 111, "../internals/to-indexed-object": 182 }], 218: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IndexedObject = require('../internals/indexed-object'); var toIndexedObject = require('../internals/to-indexed-object'); var arrayMethodIsStrict = require('../internals/array-method-is-strict'); var nativeJoin = [].join; var ES3_STRINGS = IndexedObject != Object; var STRICT_METHOD = arrayMethodIsStrict('join', ','); // `Array.prototype.join` method // https://tc39.es/ecma262/#sec-array.prototype.join $({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, { join: function join(separator) { return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator); } }); }, { "../internals/array-method-is-strict": 29, "../internals/export": 74, "../internals/indexed-object": 95, "../internals/to-indexed-object": 182 }], 219: [function (require, module, exports) { var $ = require('../internals/export'); var lastIndexOf = require('../internals/array-last-index-of'); // `Array.prototype.lastIndexOf` method // https://tc39.es/ecma262/#sec-array.prototype.lastindexof // eslint-disable-next-line es/no-array-prototype-lastindexof -- required for testing $({ target: 'Array', proto: true, forced: lastIndexOf !== [].lastIndexOf }, { lastIndexOf: lastIndexOf }); }, { "../internals/array-last-index-of": 27, "../internals/export": 74 }], 220: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var $map = require('../internals/array-iteration').map; var arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support'); var HAS_SPECIES_SUPPORT = 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 }, { map: function map(callbackfn /* , thisArg */ ) { return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); }, { "../internals/array-iteration": 26, "../internals/array-method-has-species-support": 28, "../internals/export": 74 }], 221: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var fails = require('../internals/fails'); var createProperty = require('../internals/create-property'); var ISNT_GENERIC = fails(function () { function F() { /* empty */ } // eslint-disable-next-line es/no-array-of -- required for testing return !(Array.of.call(F) instanceof F); }); // `Array.of` method // https://tc39.es/ecma262/#sec-array.of // WebKit Array.of isn't generic $({ target: 'Array', stat: true, forced: ISNT_GENERIC }, { of: function of() /* ...args */ { var index = 0; var argumentsLength = arguments.length; var result = new (typeof this == 'function' ? this : Array)(argumentsLength); while (argumentsLength > index) { createProperty(result, index, arguments[index++]); } result.length = argumentsLength; return result; } }); }, { "../internals/create-property": 56, "../internals/export": 74, "../internals/fails": 75 }], 222: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var $reduceRight = require('../internals/array-reduce').right; var arrayMethodIsStrict = require('../internals/array-method-is-strict'); var CHROME_VERSION = require('../internals/engine-v8-version'); var IS_NODE = require('../internals/engine-is-node'); var STRICT_METHOD = arrayMethodIsStrict('reduceRight'); // Chrome 80-82 has a critical bug // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982 var CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83; // `Array.prototype.reduceRight` method // https://tc39.es/ecma262/#sec-array.prototype.reduceright $({ target: 'Array', proto: true, forced: !STRICT_METHOD || CHROME_BUG }, { reduceRight: function reduceRight(callbackfn /* , initialValue */ ) { return $reduceRight(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined); } }); }, { "../internals/array-method-is-strict": 29, "../internals/array-reduce": 30, "../internals/engine-is-node": 68, "../internals/engine-v8-version": 71, "../internals/export": 74 }], 223: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var $reduce = require('../internals/array-reduce').left; var arrayMethodIsStrict = require('../internals/array-method-is-strict'); var CHROME_VERSION = require('../internals/engine-v8-version'); var IS_NODE = require('../internals/engine-is-node'); var STRICT_METHOD = arrayMethodIsStrict('reduce'); // Chrome 80-82 has a critical bug // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982 var CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83; // `Array.prototype.reduce` method // https://tc39.es/ecma262/#sec-array.prototype.reduce $({ target: 'Array', proto: true, forced: !STRICT_METHOD || CHROME_BUG }, { reduce: function reduce(callbackfn /* , initialValue */ ) { return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined); } }); }, { "../internals/array-method-is-strict": 29, "../internals/array-reduce": 30, "../internals/engine-is-node": 68, "../internals/engine-v8-version": 71, "../internals/export": 74 }], 224: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var isArray = require('../internals/is-array'); var nativeReverse = [].reverse; var test = [1, 2]; // `Array.prototype.reverse` method // https://tc39.es/ecma262/#sec-array.prototype.reverse // fix for Safari 12.0 bug // https://bugs.webkit.org/show_bug.cgi?id=188794 $({ target: 'Array', proto: true, forced: String(test) === String(test.reverse()) }, { reverse: function reverse() { // eslint-disable-next-line no-self-assign -- dirty hack if (isArray(this)) this.length = this.length; return nativeReverse.call(this); } }); }, { "../internals/export": 74, "../internals/is-array": 101 }], 225: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var isObject = require('../internals/is-object'); var isArray = require('../internals/is-array'); var toAbsoluteIndex = require('../internals/to-absolute-index'); var toLength = require('../internals/to-length'); var toIndexedObject = require('../internals/to-indexed-object'); var createProperty = require('../internals/create-property'); var wellKnownSymbol = require('../internals/well-known-symbol'); var arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support'); var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice'); var SPECIES = wellKnownSymbol('species'); var nativeSlice = [].slice; 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 }, { slice: function slice(start, end) { var O = toIndexedObject(this); var length = toLength(O.length); 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(O)) { Constructor = O.constructor; // cross-realm fallback if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) { Constructor = undefined; } else if (isObject(Constructor)) { Constructor = Constructor[SPECIES]; if (Constructor === null) Constructor = undefined; } if (Constructor === Array || Constructor === undefined) { return nativeSlice.call(O, k, fin); } } result = new (Constructor === undefined ? Array : 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; } }); }, { "../internals/array-method-has-species-support": 28, "../internals/create-property": 56, "../internals/export": 74, "../internals/is-array": 101, "../internals/is-object": 104, "../internals/to-absolute-index": 180, "../internals/to-indexed-object": 182, "../internals/to-length": 184, "../internals/well-known-symbol": 197 }], 226: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var $some = require('../internals/array-iteration').some; var arrayMethodIsStrict = require('../internals/array-method-is-strict'); var STRICT_METHOD = arrayMethodIsStrict('some'); // `Array.prototype.some` method // https://tc39.es/ecma262/#sec-array.prototype.some $({ target: 'Array', proto: true, forced: !STRICT_METHOD }, { some: function some(callbackfn /* , thisArg */ ) { return $some(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); }, { "../internals/array-iteration": 26, "../internals/array-method-is-strict": 29, "../internals/export": 74 }], 227: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var aFunction = require('../internals/a-function'); var toObject = require('../internals/to-object'); var toLength = require('../internals/to-length'); var fails = require('../internals/fails'); var internalSort = require('../internals/array-sort'); var arrayMethodIsStrict = require('../internals/array-method-is-strict'); var FF = require('../internals/engine-ff-version'); var IE_OR_EDGE = require('../internals/engine-is-ie-or-edge'); var V8 = require('../internals/engine-v8-version'); var WEBKIT = require('../internals/engine-webkit-version'); var test = []; var nativeSort = test.sort; // IE8- var FAILS_ON_UNDEFINED = fails(function () { test.sort(undefined); }); // V8 bug var FAILS_ON_NULL = fails(function () { test.sort(null); }); // Old WebKit var STRICT_METHOD = arrayMethodIsStrict('sort'); var STABLE_SORT = !fails(function () { // feature detection can be too slow, so check engines versions if (V8) return V8 < 70; if (FF && FF > 3) return; if (IE_OR_EDGE) return true; if (WEBKIT) return WEBKIT < 603; var result = ''; var code, chr, value, index; // generate an array with more 512 elements (Chakra and old V8 fails only in this case) for (code = 65; code < 76; code++) { chr = String.fromCharCode(code); switch (code) { case 66: case 69: case 70: case 72: value = 3; break; case 68: case 71: value = 4; break; default: value = 2; } for (index = 0; index < 47; index++) { test.push({ k: chr + index, v: value }); } } test.sort(function (a, b) { return b.v - a.v; }); for (index = 0; index < test.length; index++) { chr = test[index].k.charAt(0); if (result.charAt(result.length - 1) !== chr) result += chr; } return result !== 'DGBEFHACIJK'; }); var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT; var getSortCompare = function getSortCompare(comparefn) { return function (x, y) { if (y === undefined) return -1; if (x === undefined) return 1; if (comparefn !== undefined) return +comparefn(x, y) || 0; return String(x) > String(y) ? 1 : -1; }; }; // `Array.prototype.sort` method // https://tc39.es/ecma262/#sec-array.prototype.sort $({ target: 'Array', proto: true, forced: FORCED }, { sort: function sort(comparefn) { if (comparefn !== undefined) aFunction(comparefn); var array = toObject(this); if (STABLE_SORT) return comparefn === undefined ? nativeSort.call(array) : nativeSort.call(array, comparefn); var items = []; var arrayLength = toLength(array.length); var itemsLength, index; for (index = 0; index < arrayLength; index++) { if (index in array) items.push(array[index]); } items = internalSort(items, getSortCompare(comparefn)); itemsLength = items.length; index = 0; while (index < itemsLength) { array[index] = items[index++]; } while (index < arrayLength) { delete array[index++]; } return array; } }); }, { "../internals/a-function": 11, "../internals/array-method-is-strict": 29, "../internals/array-sort": 31, "../internals/engine-ff-version": 64, "../internals/engine-is-ie-or-edge": 66, "../internals/engine-v8-version": 71, "../internals/engine-webkit-version": 72, "../internals/export": 74, "../internals/fails": 75, "../internals/to-length": 184, "../internals/to-object": 185 }], 228: [function (require, module, exports) { var setSpecies = require('../internals/set-species'); // `Array[@@species]` getter // https://tc39.es/ecma262/#sec-get-array-@@species setSpecies('Array'); }, { "../internals/set-species": 164 }], 229: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var toAbsoluteIndex = require('../internals/to-absolute-index'); var toInteger = require('../internals/to-integer'); var toLength = require('../internals/to-length'); var toObject = require('../internals/to-object'); var arraySpeciesCreate = require('../internals/array-species-create'); var createProperty = require('../internals/create-property'); var arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support'); var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice'); var max = Math.max; var min = Math.min; var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded'; // `Array.prototype.splice` method // https://tc39.es/ecma262/#sec-array.prototype.splice // with adding support of @@species $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, { splice: function splice(start, deleteCount /* , ...items */ ) { var O = toObject(this); var len = toLength(O.length); var actualStart = toAbsoluteIndex(start, len); var argumentsLength = arguments.length; var insertCount, actualDeleteCount, A, k, from, to; if (argumentsLength === 0) { insertCount = actualDeleteCount = 0; } else if (argumentsLength === 1) { insertCount = 0; actualDeleteCount = len - actualStart; } else { insertCount = argumentsLength - 2; actualDeleteCount = min(max(toInteger(deleteCount), 0), len - actualStart); } if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) { throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED); } A = arraySpeciesCreate(O, actualDeleteCount); for (k = 0; k < actualDeleteCount; k++) { from = actualStart + k; if (from in O) createProperty(A, k, O[from]); } A.length = actualDeleteCount; if (insertCount < actualDeleteCount) { for (k = actualStart; k < len - actualDeleteCount; k++) { from = k + actualDeleteCount; to = k + insertCount; if (from in O) O[to] = O[from];else delete O[to]; } for (k = len; k > len - actualDeleteCount + insertCount; k--) { delete O[k - 1]; } } else if (insertCount > actualDeleteCount) { for (k = len - actualDeleteCount; k > actualStart; k--) { from = k + actualDeleteCount - 1; to = k + insertCount - 1; if (from in O) O[to] = O[from];else delete O[to]; } } for (k = 0; k < insertCount; k++) { O[k + actualStart] = arguments[k + 2]; } O.length = len - actualDeleteCount + insertCount; return A; } }); }, { "../internals/array-method-has-species-support": 28, "../internals/array-species-create": 32, "../internals/create-property": 56, "../internals/export": 74, "../internals/to-absolute-index": 180, "../internals/to-integer": 183, "../internals/to-length": 184, "../internals/to-object": 185 }], 230: [function (require, module, exports) { // this method was added to unscopables after implementation // in popular engines, so it's moved to a separate module var addToUnscopables = require('../internals/add-to-unscopables'); // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables addToUnscopables('flatMap'); }, { "../internals/add-to-unscopables": 13 }], 231: [function (require, module, exports) { // this method was added to unscopables after implementation // in popular engines, so it's moved to a separate module var addToUnscopables = require('../internals/add-to-unscopables'); // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables addToUnscopables('flat'); }, { "../internals/add-to-unscopables": 13 }], 232: [function (require, module, exports) { var $ = require('../internals/export'); var ArrayBufferModule = require('../internals/array-buffer'); var NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-native'); // `DataView` constructor // https://tc39.es/ecma262/#sec-dataview-constructor $({ global: true, forced: !NATIVE_ARRAY_BUFFER }, { DataView: ArrayBufferModule.DataView }); }, { "../internals/array-buffer": 19, "../internals/array-buffer-native": 17, "../internals/export": 74 }], 233: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var getFullYear = Date.prototype.getFullYear; // `Date.prototype.getYear` method // https://tc39.es/ecma262/#sec-date.prototype.getyear $({ target: 'Date', proto: true }, { getYear: function getYear() { return getFullYear.call(this) - 1900; } }); }, { "../internals/export": 74 }], 234: [function (require, module, exports) { var $ = require('../internals/export'); // `Date.now` method // https://tc39.es/ecma262/#sec-date.now $({ target: 'Date', stat: true }, { now: function now() { return new Date().getTime(); } }); }, { "../internals/export": 74 }], 235: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var toInteger = require('../internals/to-integer'); var getTime = Date.prototype.getTime; var setFullYear = Date.prototype.setFullYear; // `Date.prototype.setYear` method // https://tc39.es/ecma262/#sec-date.prototype.setyear $({ target: 'Date', proto: true }, { setYear: function setYear(year) { // validate getTime.call(this); var yi = toInteger(year); var yyyy = 0 <= yi && yi <= 99 ? yi + 1900 : yi; return setFullYear.call(this, yyyy); } }); }, { "../internals/export": 74, "../internals/to-integer": 183 }], 236: [function (require, module, exports) { var $ = require('../internals/export'); // `Date.prototype.toGMTString` method // https://tc39.es/ecma262/#sec-date.prototype.togmtstring $({ target: 'Date', proto: true }, { toGMTString: Date.prototype.toUTCString }); }, { "../internals/export": 74 }], 237: [function (require, module, exports) { var $ = require('../internals/export'); var toISOString = require('../internals/date-to-iso-string'); // `Date.prototype.toISOString` method // https://tc39.es/ecma262/#sec-date.prototype.toisostring // PhantomJS / old WebKit has a broken implementations $({ target: 'Date', proto: true, forced: Date.prototype.toISOString !== toISOString }, { toISOString: toISOString }); }, { "../internals/date-to-iso-string": 57, "../internals/export": 74 }], 238: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var fails = require('../internals/fails'); var toObject = require('../internals/to-object'); var toPrimitive = require('../internals/to-primitive'); var FORCED = fails(function () { return new Date(NaN).toJSON() !== null || Date.prototype.toJSON.call({ toISOString: function toISOString() { return 1; } }) !== 1; }); // `Date.prototype.toJSON` method // https://tc39.es/ecma262/#sec-date.prototype.tojson $({ target: 'Date', proto: true, forced: FORCED }, { // eslint-disable-next-line no-unused-vars -- required for `.length` toJSON: function toJSON(key) { var O = toObject(this); var pv = toPrimitive(O); return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString(); } }); }, { "../internals/export": 74, "../internals/fails": 75, "../internals/to-object": 185, "../internals/to-primitive": 188 }], 239: [function (require, module, exports) { var createNonEnumerableProperty = require('../internals/create-non-enumerable-property'); var dateToPrimitive = require('../internals/date-to-primitive'); var wellKnownSymbol = require('../internals/well-known-symbol'); var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); var DatePrototype = Date.prototype; // `Date.prototype[@@toPrimitive]` method // https://tc39.es/ecma262/#sec-date.prototype-@@toprimitive if (!(TO_PRIMITIVE in DatePrototype)) { createNonEnumerableProperty(DatePrototype, TO_PRIMITIVE, dateToPrimitive); } }, { "../internals/create-non-enumerable-property": 54, "../internals/date-to-primitive": 58, "../internals/well-known-symbol": 197 }], 240: [function (require, module, exports) { var redefine = require('../internals/redefine'); var DatePrototype = Date.prototype; var INVALID_DATE = 'Invalid Date'; var TO_STRING = 'toString'; var nativeDateToString = DatePrototype[TO_STRING]; var getTime = DatePrototype.getTime; // `Date.prototype.toString` method // https://tc39.es/ecma262/#sec-date.prototype.tostring if (new Date(NaN) + '' != INVALID_DATE) { redefine(DatePrototype, TO_STRING, function toString() { var value = getTime.call(this); // eslint-disable-next-line no-self-compare -- NaN check return value === value ? nativeDateToString.call(this) : INVALID_DATE; }); } }, { "../internals/redefine": 152 }], 241: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var raw = /[\w*+\-./@]/; var hex = function hex(code, length) { var result = code.toString(16); while (result.length < length) { result = '0' + result; } return result; }; // `escape` method // https://tc39.es/ecma262/#sec-escape-string $({ global: true }, { escape: function escape(string) { var str = String(string); var result = ''; var length = str.length; var index = 0; var chr, code; while (index < length) { chr = str.charAt(index++); if (raw.test(chr)) { result += chr; } else { code = chr.charCodeAt(0); if (code < 256) { result += '%' + hex(code, 2); } else { result += '%u' + hex(code, 4).toUpperCase(); } } } return result; } }); }, { "../internals/export": 74 }], 242: [function (require, module, exports) { var $ = require('../internals/export'); var bind = require('../internals/function-bind'); // `Function.prototype.bind` method // https://tc39.es/ecma262/#sec-function.prototype.bind $({ target: 'Function', proto: true }, { bind: bind }); }, { "../internals/export": 74, "../internals/function-bind": 80 }], 243: [function (require, module, exports) { 'use strict'; var isObject = require('../internals/is-object'); var definePropertyModule = require('../internals/object-define-property'); var getPrototypeOf = require('../internals/object-get-prototype-of'); var wellKnownSymbol = require('../internals/well-known-symbol'); var HAS_INSTANCE = wellKnownSymbol('hasInstance'); var FunctionPrototype = Function.prototype; // `Function.prototype[@@hasInstance]` method // https://tc39.es/ecma262/#sec-function.prototype-@@hasinstance if (!(HAS_INSTANCE in FunctionPrototype)) { definePropertyModule.f(FunctionPrototype, HAS_INSTANCE, { value: function value(O) { if (typeof this != 'function' || !isObject(O)) return false; if (!isObject(this.prototype)) return O instanceof this; // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: while (O = getPrototypeOf(O)) { if (this.prototype === O) return true; } return false; } }); } }, { "../internals/is-object": 104, "../internals/object-define-property": 133, "../internals/object-get-prototype-of": 138, "../internals/well-known-symbol": 197 }], 244: [function (require, module, exports) { var DESCRIPTORS = require('../internals/descriptors'); var defineProperty = require('../internals/object-define-property').f; var FunctionPrototype = Function.prototype; var FunctionPrototypeToString = FunctionPrototype.toString; var nameRE = /^\s*function ([^ (]*)/; var NAME = 'name'; // Function instances `.name` property // https://tc39.es/ecma262/#sec-function-instances-name if (DESCRIPTORS && !(NAME in FunctionPrototype)) { defineProperty(FunctionPrototype, NAME, { configurable: true, get: function get() { try { return FunctionPrototypeToString.call(this).match(nameRE)[1]; } catch (error) { return ''; } } }); } }, { "../internals/descriptors": 61, "../internals/object-define-property": 133 }], 245: [function (require, module, exports) { var $ = require('../internals/export'); var global = require('../internals/global'); // `globalThis` object // https://tc39.es/ecma262/#sec-globalthis $({ global: true }, { globalThis: global }); }, { "../internals/export": 74, "../internals/global": 88 }], 246: [function (require, module, exports) { var $ = require('../internals/export'); var getBuiltIn = require('../internals/get-built-in'); var fails = require('../internals/fails'); var $stringify = getBuiltIn('JSON', 'stringify'); var re = /[\uD800-\uDFFF]/g; var low = /^[\uD800-\uDBFF]$/; var hi = /^[\uDC00-\uDFFF]$/; var fix = function fix(match, offset, string) { var prev = string.charAt(offset - 1); var next = string.charAt(offset + 1); if (low.test(match) && !hi.test(next) || hi.test(match) && !low.test(prev)) { return "\\u" + match.charCodeAt(0).toString(16); } return match; }; var FORCED = fails(function () { return $stringify("\uDF06\uD834") !== "\"\\udf06\\ud834\"" || $stringify("\uDEAD") !== "\"\\udead\""; }); if ($stringify) { // `JSON.stringify` method // https://tc39.es/ecma262/#sec-json.stringify // https://github.com/tc39/proposal-well-formed-stringify $({ target: 'JSON', stat: true, forced: FORCED }, { // eslint-disable-next-line no-unused-vars -- required for `.length` stringify: function stringify(it, replacer, space) { var result = $stringify.apply(null, arguments); return typeof result == 'string' ? result.replace(re, fix) : result; } }); } }, { "../internals/export": 74, "../internals/fails": 75, "../internals/get-built-in": 82 }], 247: [function (require, module, exports) { var global = require('../internals/global'); var setToStringTag = require('../internals/set-to-string-tag'); // JSON[@@toStringTag] property // https://tc39.es/ecma262/#sec-json-@@tostringtag setToStringTag(global.JSON, 'JSON', true); }, { "../internals/global": 88, "../internals/set-to-string-tag": 165 }], 248: [function (require, module, exports) { 'use strict'; var collection = require('../internals/collection'); var collectionStrong = require('../internals/collection-strong'); // `Map` constructor // https://tc39.es/ecma262/#sec-map-objects module.exports = collection('Map', function (init) { return function Map() { return init(this, arguments.length ? arguments[0] : undefined); }; }, collectionStrong); }, { "../internals/collection": 47, "../internals/collection-strong": 45 }], 249: [function (require, module, exports) { var $ = require('../internals/export'); var log1p = require('../internals/math-log1p'); // eslint-disable-next-line es/no-math-acosh -- required for testing var $acosh = Math.acosh; var log = Math.log; var sqrt = Math.sqrt; var LN2 = Math.LN2; var FORCED = !$acosh // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 || Math.floor($acosh(Number.MAX_VALUE)) != 710 // Tor Browser bug: Math.acosh(Infinity) -> NaN || $acosh(Infinity) != Infinity; // `Math.acosh` method // https://tc39.es/ecma262/#sec-math.acosh $({ target: 'Math', stat: true, forced: FORCED }, { acosh: function acosh(x) { return (x = +x) < 1 ? NaN : x > 94906265.62425156 ? log(x) + LN2 : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1)); } }); }, { "../internals/export": 74, "../internals/math-log1p": 116 }], 250: [function (require, module, exports) { var $ = require('../internals/export'); // eslint-disable-next-line es/no-math-asinh -- required for testing var $asinh = Math.asinh; var log = Math.log; var sqrt = Math.sqrt; function asinh(x) { return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : log(x + sqrt(x * x + 1)); } // `Math.asinh` method // https://tc39.es/ecma262/#sec-math.asinh // Tor Browser bug: Math.asinh(0) -> -0 $({ target: 'Math', stat: true, forced: !($asinh && 1 / $asinh(0) > 0) }, { asinh: asinh }); }, { "../internals/export": 74 }], 251: [function (require, module, exports) { var $ = require('../internals/export'); // eslint-disable-next-line es/no-math-atanh -- required for testing var $atanh = Math.atanh; var log = Math.log; // `Math.atanh` method // https://tc39.es/ecma262/#sec-math.atanh // Tor Browser bug: Math.atanh(-0) -> 0 $({ target: 'Math', stat: true, forced: !($atanh && 1 / $atanh(-0) < 0) }, { atanh: function atanh(x) { return (x = +x) == 0 ? x : log((1 + x) / (1 - x)) / 2; } }); }, { "../internals/export": 74 }], 252: [function (require, module, exports) { var $ = require('../internals/export'); var sign = require('../internals/math-sign'); var abs = Math.abs; var pow = Math.pow; // `Math.cbrt` method // https://tc39.es/ecma262/#sec-math.cbrt $({ target: 'Math', stat: true }, { cbrt: function cbrt(x) { return sign(x = +x) * pow(abs(x), 1 / 3); } }); }, { "../internals/export": 74, "../internals/math-sign": 118 }], 253: [function (require, module, exports) { var $ = require('../internals/export'); var floor = Math.floor; var log = Math.log; var LOG2E = Math.LOG2E; // `Math.clz32` method // https://tc39.es/ecma262/#sec-math.clz32 $({ target: 'Math', stat: true }, { clz32: function clz32(x) { return (x >>>= 0) ? 31 - floor(log(x + 0.5) * LOG2E) : 32; } }); }, { "../internals/export": 74 }], 254: [function (require, module, exports) { var $ = require('../internals/export'); var expm1 = require('../internals/math-expm1'); // eslint-disable-next-line es/no-math-cosh -- required for testing var $cosh = Math.cosh; var abs = Math.abs; var E = Math.E; // `Math.cosh` method // https://tc39.es/ecma262/#sec-math.cosh $({ target: 'Math', stat: true, forced: !$cosh || $cosh(710) === Infinity }, { cosh: function cosh(x) { var t = expm1(abs(x) - 1) + 1; return (t + 1 / (t * E * E)) * (E / 2); } }); }, { "../internals/export": 74, "../internals/math-expm1": 114 }], 255: [function (require, module, exports) { var $ = require('../internals/export'); var expm1 = require('../internals/math-expm1'); // `Math.expm1` method // https://tc39.es/ecma262/#sec-math.expm1 // eslint-disable-next-line es/no-math-expm1 -- required for testing $({ target: 'Math', stat: true, forced: expm1 != Math.expm1 }, { expm1: expm1 }); }, { "../internals/export": 74, "../internals/math-expm1": 114 }], 256: [function (require, module, exports) { var $ = require('../internals/export'); var fround = require('../internals/math-fround'); // `Math.fround` method // https://tc39.es/ecma262/#sec-math.fround $({ target: 'Math', stat: true }, { fround: fround }); }, { "../internals/export": 74, "../internals/math-fround": 115 }], 257: [function (require, module, exports) { var $ = require('../internals/export'); // eslint-disable-next-line es/no-math-hypot -- required for testing var $hypot = Math.hypot; var abs = Math.abs; var sqrt = Math.sqrt; // Chrome 77 bug // https://bugs.chromium.org/p/v8/issues/detail?id=9546 var BUGGY = !!$hypot && $hypot(Infinity, NaN) !== Infinity; // `Math.hypot` method // https://tc39.es/ecma262/#sec-math.hypot $({ target: 'Math', stat: true, forced: BUGGY }, { // eslint-disable-next-line no-unused-vars -- required for `.length` hypot: function hypot(value1, value2) { var sum = 0; var i = 0; var aLen = arguments.length; var larg = 0; var arg, div; while (i < aLen) { arg = abs(arguments[i++]); if (larg < arg) { div = larg / arg; sum = sum * div * div + 1; larg = arg; } else if (arg > 0) { div = arg / larg; sum += div * div; } else sum += arg; } return larg === Infinity ? Infinity : larg * sqrt(sum); } }); }, { "../internals/export": 74 }], 258: [function (require, module, exports) { var $ = require('../internals/export'); var fails = require('../internals/fails'); // eslint-disable-next-line es/no-math-imul -- required for testing var $imul = Math.imul; var FORCED = fails(function () { return $imul(0xFFFFFFFF, 5) != -5 || $imul.length != 2; }); // `Math.imul` method // https://tc39.es/ecma262/#sec-math.imul // some WebKit versions fails with big numbers, some has wrong arity $({ target: 'Math', stat: true, forced: FORCED }, { imul: function imul(x, y) { var UINT16 = 0xFFFF; var xn = +x; var yn = +y; var xl = UINT16 & xn; var yl = UINT16 & yn; return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0); } }); }, { "../internals/export": 74, "../internals/fails": 75 }], 259: [function (require, module, exports) { var $ = require('../internals/export'); var log = Math.log; var LOG10E = Math.LOG10E; // `Math.log10` method // https://tc39.es/ecma262/#sec-math.log10 $({ target: 'Math', stat: true }, { log10: function log10(x) { return log(x) * LOG10E; } }); }, { "../internals/export": 74 }], 260: [function (require, module, exports) { var $ = require('../internals/export'); var log1p = require('../internals/math-log1p'); // `Math.log1p` method // https://tc39.es/ecma262/#sec-math.log1p $({ target: 'Math', stat: true }, { log1p: log1p }); }, { "../internals/export": 74, "../internals/math-log1p": 116 }], 261: [function (require, module, exports) { var $ = require('../internals/export'); var log = Math.log; var LN2 = Math.LN2; // `Math.log2` method // https://tc39.es/ecma262/#sec-math.log2 $({ target: 'Math', stat: true }, { log2: function log2(x) { return log(x) / LN2; } }); }, { "../internals/export": 74 }], 262: [function (require, module, exports) { var $ = require('../internals/export'); var sign = require('../internals/math-sign'); // `Math.sign` method // https://tc39.es/ecma262/#sec-math.sign $({ target: 'Math', stat: true }, { sign: sign }); }, { "../internals/export": 74, "../internals/math-sign": 118 }], 263: [function (require, module, exports) { var $ = require('../internals/export'); var fails = require('../internals/fails'); var expm1 = require('../internals/math-expm1'); var abs = Math.abs; var exp = Math.exp; var E = Math.E; var FORCED = fails(function () { // eslint-disable-next-line es/no-math-sinh -- required for testing return Math.sinh(-2e-17) != -2e-17; }); // `Math.sinh` method // https://tc39.es/ecma262/#sec-math.sinh // V8 near Chromium 38 has a problem with very small numbers $({ target: 'Math', stat: true, forced: FORCED }, { sinh: function sinh(x) { return abs(x = +x) < 1 ? (expm1(x) - expm1(-x)) / 2 : (exp(x - 1) - exp(-x - 1)) * (E / 2); } }); }, { "../internals/export": 74, "../internals/fails": 75, "../internals/math-expm1": 114 }], 264: [function (require, module, exports) { var $ = require('../internals/export'); var expm1 = require('../internals/math-expm1'); var exp = Math.exp; // `Math.tanh` method // https://tc39.es/ecma262/#sec-math.tanh $({ target: 'Math', stat: true }, { tanh: function tanh(x) { var a = expm1(x = +x); var b = expm1(-x); return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); } }); }, { "../internals/export": 74, "../internals/math-expm1": 114 }], 265: [function (require, module, exports) { var setToStringTag = require('../internals/set-to-string-tag'); // Math[@@toStringTag] property // https://tc39.es/ecma262/#sec-math-@@tostringtag setToStringTag(Math, 'Math', true); }, { "../internals/set-to-string-tag": 165 }], 266: [function (require, module, exports) { var $ = require('../internals/export'); var ceil = Math.ceil; var floor = Math.floor; // `Math.trunc` method // https://tc39.es/ecma262/#sec-math.trunc $({ target: 'Math', stat: true }, { trunc: function trunc(it) { return (it > 0 ? floor : ceil)(it); } }); }, { "../internals/export": 74 }], 267: [function (require, module, exports) { 'use strict'; var DESCRIPTORS = require('../internals/descriptors'); var global = require('../internals/global'); var isForced = require('../internals/is-forced'); var redefine = require('../internals/redefine'); var has = require('../internals/has'); var classof = require('../internals/classof-raw'); var inheritIfRequired = require('../internals/inherit-if-required'); var toPrimitive = require('../internals/to-primitive'); var fails = require('../internals/fails'); var create = require('../internals/object-create'); var getOwnPropertyNames = require('../internals/object-get-own-property-names').f; var getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f; var defineProperty = require('../internals/object-define-property').f; var trim = require('../internals/string-trim').trim; var NUMBER = 'Number'; var NativeNumber = global[NUMBER]; var NumberPrototype = NativeNumber.prototype; // Opera ~12 has broken Object#toString var BROKEN_CLASSOF = classof(create(NumberPrototype)) == NUMBER; // `ToNumber` abstract operation // https://tc39.es/ecma262/#sec-tonumber var toNumber = function toNumber(argument) { var it = toPrimitive(argument, false); var first, third, radix, maxCode, digits, length, index, code; if (typeof it == 'string' && it.length > 2) { it = trim(it); first = it.charCodeAt(0); if (first === 43 || first === 45) { third = it.charCodeAt(2); if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix } else if (first === 48) { switch (it.charCodeAt(1)) { case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i default: return +it; } digits = it.slice(2); length = digits.length; for (index = 0; index < length; index++) { code = digits.charCodeAt(index); // parseInt parses a string to a first unavailable symbol // but ToNumber should return NaN if a string contains unavailable symbols if (code < 48 || code > maxCode) return NaN; } return parseInt(digits, radix); } } return +it; }; // `Number` constructor // https://tc39.es/ecma262/#sec-number-constructor if (isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) { var NumberWrapper = function Number(value) { var it = arguments.length < 1 ? 0 : value; var dummy = this; return dummy instanceof NumberWrapper // check on 1..constructor(foo) case && (BROKEN_CLASSOF ? fails(function () { NumberPrototype.valueOf.call(dummy); }) : classof(dummy) != NUMBER) ? inheritIfRequired(new NativeNumber(toNumber(it)), dummy, NumberWrapper) : toNumber(it); }; for (var keys = DESCRIPTORS ? getOwnPropertyNames(NativeNumber) : ( // ES3: 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + // ES2015 (in case, if modules with ES2015 Number statics required before): 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,' + // ESNext 'fromString,range').split(','), j = 0, key; keys.length > j; j++) { if (has(NativeNumber, key = keys[j]) && !has(NumberWrapper, key)) { defineProperty(NumberWrapper, key, getOwnPropertyDescriptor(NativeNumber, key)); } } NumberWrapper.prototype = NumberPrototype; NumberPrototype.constructor = NumberWrapper; redefine(global, NUMBER, NumberWrapper); } }, { "../internals/classof-raw": 39, "../internals/descriptors": 61, "../internals/fails": 75, "../internals/global": 88, "../internals/has": 89, "../internals/inherit-if-required": 96, "../internals/is-forced": 102, "../internals/object-create": 131, "../internals/object-define-property": 133, "../internals/object-get-own-property-descriptor": 134, "../internals/object-get-own-property-names": 136, "../internals/redefine": 152, "../internals/string-trim": 177, "../internals/to-primitive": 188 }], 268: [function (require, module, exports) { var $ = require('../internals/export'); // `Number.EPSILON` constant // https://tc39.es/ecma262/#sec-number.epsilon $({ target: 'Number', stat: true }, { EPSILON: Math.pow(2, -52) }); }, { "../internals/export": 74 }], 269: [function (require, module, exports) { var $ = require('../internals/export'); var numberIsFinite = require('../internals/number-is-finite'); // `Number.isFinite` method // https://tc39.es/ecma262/#sec-number.isfinite $({ target: 'Number', stat: true }, { isFinite: numberIsFinite }); }, { "../internals/export": 74, "../internals/number-is-finite": 126 }], 270: [function (require, module, exports) { var $ = require('../internals/export'); var isInteger = require('../internals/is-integer'); // `Number.isInteger` method // https://tc39.es/ecma262/#sec-number.isinteger $({ target: 'Number', stat: true }, { isInteger: isInteger }); }, { "../internals/export": 74, "../internals/is-integer": 103 }], 271: [function (require, module, exports) { var $ = require('../internals/export'); // `Number.isNaN` method // https://tc39.es/ecma262/#sec-number.isnan $({ target: 'Number', stat: true }, { isNaN: function isNaN(number) { // eslint-disable-next-line no-self-compare -- NaN check return number != number; } }); }, { "../internals/export": 74 }], 272: [function (require, module, exports) { var $ = require('../internals/export'); var isInteger = require('../internals/is-integer'); var abs = Math.abs; // `Number.isSafeInteger` method // https://tc39.es/ecma262/#sec-number.issafeinteger $({ target: 'Number', stat: true }, { isSafeInteger: function isSafeInteger(number) { return isInteger(number) && abs(number) <= 0x1FFFFFFFFFFFFF; } }); }, { "../internals/export": 74, "../internals/is-integer": 103 }], 273: [function (require, module, exports) { var $ = require('../internals/export'); // `Number.MAX_SAFE_INTEGER` constant // https://tc39.es/ecma262/#sec-number.max_safe_integer $({ target: 'Number', stat: true }, { MAX_SAFE_INTEGER: 0x1FFFFFFFFFFFFF }); }, { "../internals/export": 74 }], 274: [function (require, module, exports) { var $ = require('../internals/export'); // `Number.MIN_SAFE_INTEGER` constant // https://tc39.es/ecma262/#sec-number.min_safe_integer $({ target: 'Number', stat: true }, { MIN_SAFE_INTEGER: -0x1FFFFFFFFFFFFF }); }, { "../internals/export": 74 }], 275: [function (require, module, exports) { var $ = require('../internals/export'); var parseFloat = require('../internals/number-parse-float'); // `Number.parseFloat` method // https://tc39.es/ecma262/#sec-number.parseFloat // eslint-disable-next-line es/no-number-parsefloat -- required for testing $({ target: 'Number', stat: true, forced: Number.parseFloat != parseFloat }, { parseFloat: parseFloat }); }, { "../internals/export": 74, "../internals/number-parse-float": 127 }], 276: [function (require, module, exports) { var $ = require('../internals/export'); var parseInt = require('../internals/number-parse-int'); // `Number.parseInt` method // https://tc39.es/ecma262/#sec-number.parseint // eslint-disable-next-line es/no-number-parseint -- required for testing $({ target: 'Number', stat: true, forced: Number.parseInt != parseInt }, { parseInt: parseInt }); }, { "../internals/export": 74, "../internals/number-parse-int": 128 }], 277: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var toInteger = require('../internals/to-integer'); var thisNumberValue = require('../internals/this-number-value'); var repeat = require('../internals/string-repeat'); var fails = require('../internals/fails'); var nativeToFixed = 1.0.toFixed; var floor = Math.floor; var pow = function pow(x, n, acc) { return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); }; var log = function log(x) { var n = 0; var x2 = x; while (x2 >= 4096) { n += 12; x2 /= 4096; } while (x2 >= 2) { n += 1; x2 /= 2; } return n; }; var multiply = function multiply(data, n, c) { var index = -1; var c2 = c; while (++index < 6) { c2 += n * data[index]; data[index] = c2 % 1e7; c2 = floor(c2 / 1e7); } }; var divide = function divide(data, n) { var index = 6; var c = 0; while (--index >= 0) { c += data[index]; data[index] = floor(c / n); c = c % n * 1e7; } }; var dataToString = function dataToString(data) { var index = 6; var s = ''; while (--index >= 0) { if (s !== '' || index === 0 || data[index] !== 0) { var t = String(data[index]); s = s === '' ? t : s + repeat.call('0', 7 - t.length) + t; } } return s; }; var FORCED = nativeToFixed && (0.00008.toFixed(3) !== '0.000' || 0.9.toFixed(0) !== '1' || 1.255.toFixed(2) !== '1.25' || 1000000000000000128.0.toFixed(0) !== '1000000000000000128') || !fails(function () { // V8 ~ Android 4.3- nativeToFixed.call({}); }); // `Number.prototype.toFixed` method // https://tc39.es/ecma262/#sec-number.prototype.tofixed $({ target: 'Number', proto: true, forced: FORCED }, { toFixed: function toFixed(fractionDigits) { var number = thisNumberValue(this); var fractDigits = toInteger(fractionDigits); var data = [0, 0, 0, 0, 0, 0]; var sign = ''; var result = '0'; var e, z, j, k; if (fractDigits < 0 || fractDigits > 20) throw RangeError('Incorrect fraction digits'); // eslint-disable-next-line no-self-compare -- NaN check if (number != number) return 'NaN'; if (number <= -1e21 || number >= 1e21) return String(number); if (number < 0) { sign = '-'; number = -number; } if (number > 1e-21) { e = log(number * pow(2, 69, 1)) - 69; z = e < 0 ? number * pow(2, -e, 1) : number / pow(2, e, 1); z *= 0x10000000000000; e = 52 - e; if (e > 0) { multiply(data, 0, z); j = fractDigits; while (j >= 7) { multiply(data, 1e7, 0); j -= 7; } multiply(data, pow(10, j, 1), 0); j = e - 1; while (j >= 23) { divide(data, 1 << 23); j -= 23; } divide(data, 1 << j); multiply(data, 1, 1); divide(data, 2); result = dataToString(data); } else { multiply(data, 0, z); multiply(data, 1 << -e, 0); result = dataToString(data) + repeat.call('0', fractDigits); } } if (fractDigits > 0) { k = result.length; result = sign + (k <= fractDigits ? '0.' + repeat.call('0', fractDigits - k) + result : result.slice(0, k - fractDigits) + '.' + result.slice(k - fractDigits)); } else { result = sign + result; } return result; } }); }, { "../internals/export": 74, "../internals/fails": 75, "../internals/string-repeat": 175, "../internals/this-number-value": 179, "../internals/to-integer": 183 }], 278: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var fails = require('../internals/fails'); var thisNumberValue = require('../internals/this-number-value'); var nativeToPrecision = 1.0.toPrecision; var FORCED = fails(function () { // IE7- return nativeToPrecision.call(1, undefined) !== '1'; }) || !fails(function () { // V8 ~ Android 4.3- nativeToPrecision.call({}); }); // `Number.prototype.toPrecision` method // https://tc39.es/ecma262/#sec-number.prototype.toprecision $({ target: 'Number', proto: true, forced: FORCED }, { toPrecision: function toPrecision(precision) { return precision === undefined ? nativeToPrecision.call(thisNumberValue(this)) : nativeToPrecision.call(thisNumberValue(this), precision); } }); }, { "../internals/export": 74, "../internals/fails": 75, "../internals/this-number-value": 179 }], 279: [function (require, module, exports) { var $ = require('../internals/export'); var assign = require('../internals/object-assign'); // `Object.assign` method // https://tc39.es/ecma262/#sec-object.assign // eslint-disable-next-line es/no-object-assign -- required for testing $({ target: 'Object', stat: true, forced: Object.assign !== assign }, { assign: assign }); }, { "../internals/export": 74, "../internals/object-assign": 130 }], 280: [function (require, module, exports) { var $ = require('../internals/export'); var DESCRIPTORS = require('../internals/descriptors'); var create = require('../internals/object-create'); // `Object.create` method // https://tc39.es/ecma262/#sec-object.create $({ target: 'Object', stat: true, sham: !DESCRIPTORS }, { create: create }); }, { "../internals/descriptors": 61, "../internals/export": 74, "../internals/object-create": 131 }], 281: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var DESCRIPTORS = require('../internals/descriptors'); var FORCED = require('../internals/object-prototype-accessors-forced'); var toObject = require('../internals/to-object'); var aFunction = require('../internals/a-function'); var definePropertyModule = require('../internals/object-define-property'); // `Object.prototype.__defineGetter__` method // https://tc39.es/ecma262/#sec-object.prototype.__defineGetter__ if (DESCRIPTORS) { $({ target: 'Object', proto: true, forced: FORCED }, { __defineGetter__: function __defineGetter__(P, getter) { definePropertyModule.f(toObject(this), P, { get: aFunction(getter), enumerable: true, configurable: true }); } }); } }, { "../internals/a-function": 11, "../internals/descriptors": 61, "../internals/export": 74, "../internals/object-define-property": 133, "../internals/object-prototype-accessors-forced": 143, "../internals/to-object": 185 }], 282: [function (require, module, exports) { var $ = require('../internals/export'); var DESCRIPTORS = require('../internals/descriptors'); var defineProperties = require('../internals/object-define-properties'); // `Object.defineProperties` method // https://tc39.es/ecma262/#sec-object.defineproperties $({ target: 'Object', stat: true, forced: !DESCRIPTORS, sham: !DESCRIPTORS }, { defineProperties: defineProperties }); }, { "../internals/descriptors": 61, "../internals/export": 74, "../internals/object-define-properties": 132 }], 283: [function (require, module, exports) { var $ = require('../internals/export'); var DESCRIPTORS = require('../internals/descriptors'); var objectDefinePropertyModile = require('../internals/object-define-property'); // `Object.defineProperty` method // https://tc39.es/ecma262/#sec-object.defineproperty $({ target: 'Object', stat: true, forced: !DESCRIPTORS, sham: !DESCRIPTORS }, { defineProperty: objectDefinePropertyModile.f }); }, { "../internals/descriptors": 61, "../internals/export": 74, "../internals/object-define-property": 133 }], 284: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var DESCRIPTORS = require('../internals/descriptors'); var FORCED = require('../internals/object-prototype-accessors-forced'); var toObject = require('../internals/to-object'); var aFunction = require('../internals/a-function'); var definePropertyModule = require('../internals/object-define-property'); // `Object.prototype.__defineSetter__` method // https://tc39.es/ecma262/#sec-object.prototype.__defineSetter__ if (DESCRIPTORS) { $({ target: 'Object', proto: true, forced: FORCED }, { __defineSetter__: function __defineSetter__(P, setter) { definePropertyModule.f(toObject(this), P, { set: aFunction(setter), enumerable: true, configurable: true }); } }); } }, { "../internals/a-function": 11, "../internals/descriptors": 61, "../internals/export": 74, "../internals/object-define-property": 133, "../internals/object-prototype-accessors-forced": 143, "../internals/to-object": 185 }], 285: [function (require, module, exports) { var $ = require('../internals/export'); var $entries = require('../internals/object-to-array').entries; // `Object.entries` method // https://tc39.es/ecma262/#sec-object.entries $({ target: 'Object', stat: true }, { entries: function entries(O) { return $entries(O); } }); }, { "../internals/export": 74, "../internals/object-to-array": 145 }], 286: [function (require, module, exports) { var $ = require('../internals/export'); var FREEZING = require('../internals/freezing'); var fails = require('../internals/fails'); var isObject = require('../internals/is-object'); var onFreeze = require('../internals/internal-metadata').onFreeze; // eslint-disable-next-line es/no-object-freeze -- safe var $freeze = Object.freeze; var FAILS_ON_PRIMITIVES = fails(function () { $freeze(1); }); // `Object.freeze` method // https://tc39.es/ecma262/#sec-object.freeze $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, { freeze: function freeze(it) { return $freeze && isObject(it) ? $freeze(onFreeze(it)) : it; } }); }, { "../internals/export": 74, "../internals/fails": 75, "../internals/freezing": 78, "../internals/internal-metadata": 98, "../internals/is-object": 104 }], 287: [function (require, module, exports) { var $ = require('../internals/export'); var iterate = require('../internals/iterate'); var createProperty = require('../internals/create-property'); // `Object.fromEntries` method // https://github.com/tc39/proposal-object-from-entries $({ target: 'Object', stat: true }, { fromEntries: function fromEntries(iterable) { var obj = {}; iterate(iterable, function (k, v) { createProperty(obj, k, v); }, { AS_ENTRIES: true }); return obj; } }); }, { "../internals/create-property": 56, "../internals/export": 74, "../internals/iterate": 107 }], 288: [function (require, module, exports) { var $ = require('../internals/export'); var fails = require('../internals/fails'); var toIndexedObject = require('../internals/to-indexed-object'); var nativeGetOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f; var DESCRIPTORS = require('../internals/descriptors'); var FAILS_ON_PRIMITIVES = fails(function () { nativeGetOwnPropertyDescriptor(1); }); var FORCED = !DESCRIPTORS || FAILS_ON_PRIMITIVES; // `Object.getOwnPropertyDescriptor` method // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor $({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, { getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) { return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key); } }); }, { "../internals/descriptors": 61, "../internals/export": 74, "../internals/fails": 75, "../internals/object-get-own-property-descriptor": 134, "../internals/to-indexed-object": 182 }], 289: [function (require, module, exports) { var $ = require('../internals/export'); var DESCRIPTORS = require('../internals/descriptors'); var ownKeys = require('../internals/own-keys'); var toIndexedObject = require('../internals/to-indexed-object'); var getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor'); var createProperty = require('../internals/create-property'); // `Object.getOwnPropertyDescriptors` method // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors $({ target: 'Object', stat: true, sham: !DESCRIPTORS }, { getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { var O = toIndexedObject(object); var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; var keys = ownKeys(O); var result = {}; var index = 0; var key, descriptor; while (keys.length > index) { descriptor = getOwnPropertyDescriptor(O, key = keys[index++]); if (descriptor !== undefined) createProperty(result, key, descriptor); } return result; } }); }, { "../internals/create-property": 56, "../internals/descriptors": 61, "../internals/export": 74, "../internals/object-get-own-property-descriptor": 134, "../internals/own-keys": 147, "../internals/to-indexed-object": 182 }], 290: [function (require, module, exports) { var $ = require('../internals/export'); var fails = require('../internals/fails'); var getOwnPropertyNames = require('../internals/object-get-own-property-names-external').f; // eslint-disable-next-line es/no-object-getownpropertynames -- required for testing var FAILS_ON_PRIMITIVES = fails(function () { return !Object.getOwnPropertyNames(1); }); // `Object.getOwnPropertyNames` method // https://tc39.es/ecma262/#sec-object.getownpropertynames $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, { getOwnPropertyNames: getOwnPropertyNames }); }, { "../internals/export": 74, "../internals/fails": 75, "../internals/object-get-own-property-names-external": 135 }], 291: [function (require, module, exports) { var $ = require('../internals/export'); var fails = require('../internals/fails'); var toObject = require('../internals/to-object'); var nativeGetPrototypeOf = require('../internals/object-get-prototype-of'); var CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter'); var FAILS_ON_PRIMITIVES = fails(function () { nativeGetPrototypeOf(1); }); // `Object.getPrototypeOf` method // https://tc39.es/ecma262/#sec-object.getprototypeof $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PROTOTYPE_GETTER }, { getPrototypeOf: function getPrototypeOf(it) { return nativeGetPrototypeOf(toObject(it)); } }); }, { "../internals/correct-prototype-getter": 51, "../internals/export": 74, "../internals/fails": 75, "../internals/object-get-prototype-of": 138, "../internals/to-object": 185 }], 292: [function (require, module, exports) { var $ = require('../internals/export'); var fails = require('../internals/fails'); var isObject = require('../internals/is-object'); // eslint-disable-next-line es/no-object-isextensible -- safe var $isExtensible = Object.isExtensible; var FAILS_ON_PRIMITIVES = fails(function () { $isExtensible(1); }); // `Object.isExtensible` method // https://tc39.es/ecma262/#sec-object.isextensible $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, { isExtensible: function isExtensible(it) { return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false; } }); }, { "../internals/export": 74, "../internals/fails": 75, "../internals/is-object": 104 }], 293: [function (require, module, exports) { var $ = require('../internals/export'); var fails = require('../internals/fails'); var isObject = require('../internals/is-object'); // eslint-disable-next-line es/no-object-isfrozen -- safe var $isFrozen = Object.isFrozen; var FAILS_ON_PRIMITIVES = fails(function () { $isFrozen(1); }); // `Object.isFrozen` method // https://tc39.es/ecma262/#sec-object.isfrozen $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, { isFrozen: function isFrozen(it) { return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true; } }); }, { "../internals/export": 74, "../internals/fails": 75, "../internals/is-object": 104 }], 294: [function (require, module, exports) { var $ = require('../internals/export'); var fails = require('../internals/fails'); var isObject = require('../internals/is-object'); // eslint-disable-next-line es/no-object-issealed -- safe var $isSealed = Object.isSealed; var FAILS_ON_PRIMITIVES = fails(function () { $isSealed(1); }); // `Object.isSealed` method // https://tc39.es/ecma262/#sec-object.issealed $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, { isSealed: function isSealed(it) { return isObject(it) ? $isSealed ? $isSealed(it) : false : true; } }); }, { "../internals/export": 74, "../internals/fails": 75, "../internals/is-object": 104 }], 295: [function (require, module, exports) { var $ = require('../internals/export'); var is = require('../internals/same-value'); // `Object.is` method // https://tc39.es/ecma262/#sec-object.is $({ target: 'Object', stat: true }, { is: is }); }, { "../internals/export": 74, "../internals/same-value": 162 }], 296: [function (require, module, exports) { var $ = require('../internals/export'); var toObject = require('../internals/to-object'); var nativeKeys = require('../internals/object-keys'); var fails = require('../internals/fails'); var FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); }); // `Object.keys` method // https://tc39.es/ecma262/#sec-object.keys $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, { keys: function keys(it) { return nativeKeys(toObject(it)); } }); }, { "../internals/export": 74, "../internals/fails": 75, "../internals/object-keys": 141, "../internals/to-object": 185 }], 297: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var DESCRIPTORS = require('../internals/descriptors'); var FORCED = require('../internals/object-prototype-accessors-forced'); var toObject = require('../internals/to-object'); var toPrimitive = require('../internals/to-primitive'); var getPrototypeOf = require('../internals/object-get-prototype-of'); var getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f; // `Object.prototype.__lookupGetter__` method // https://tc39.es/ecma262/#sec-object.prototype.__lookupGetter__ if (DESCRIPTORS) { $({ target: 'Object', proto: true, forced: FORCED }, { __lookupGetter__: function __lookupGetter__(P) { var O = toObject(this); var key = toPrimitive(P, true); var desc; do { if (desc = getOwnPropertyDescriptor(O, key)) return desc.get; } while (O = getPrototypeOf(O)); } }); } }, { "../internals/descriptors": 61, "../internals/export": 74, "../internals/object-get-own-property-descriptor": 134, "../internals/object-get-prototype-of": 138, "../internals/object-prototype-accessors-forced": 143, "../internals/to-object": 185, "../internals/to-primitive": 188 }], 298: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var DESCRIPTORS = require('../internals/descriptors'); var FORCED = require('../internals/object-prototype-accessors-forced'); var toObject = require('../internals/to-object'); var toPrimitive = require('../internals/to-primitive'); var getPrototypeOf = require('../internals/object-get-prototype-of'); var getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f; // `Object.prototype.__lookupSetter__` method // https://tc39.es/ecma262/#sec-object.prototype.__lookupSetter__ if (DESCRIPTORS) { $({ target: 'Object', proto: true, forced: FORCED }, { __lookupSetter__: function __lookupSetter__(P) { var O = toObject(this); var key = toPrimitive(P, true); var desc; do { if (desc = getOwnPropertyDescriptor(O, key)) return desc.set; } while (O = getPrototypeOf(O)); } }); } }, { "../internals/descriptors": 61, "../internals/export": 74, "../internals/object-get-own-property-descriptor": 134, "../internals/object-get-prototype-of": 138, "../internals/object-prototype-accessors-forced": 143, "../internals/to-object": 185, "../internals/to-primitive": 188 }], 299: [function (require, module, exports) { var $ = require('../internals/export'); var isObject = require('../internals/is-object'); var onFreeze = require('../internals/internal-metadata').onFreeze; var FREEZING = require('../internals/freezing'); var fails = require('../internals/fails'); // eslint-disable-next-line es/no-object-preventextensions -- safe var $preventExtensions = Object.preventExtensions; var FAILS_ON_PRIMITIVES = fails(function () { $preventExtensions(1); }); // `Object.preventExtensions` method // https://tc39.es/ecma262/#sec-object.preventextensions $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, { preventExtensions: function preventExtensions(it) { return $preventExtensions && isObject(it) ? $preventExtensions(onFreeze(it)) : it; } }); }, { "../internals/export": 74, "../internals/fails": 75, "../internals/freezing": 78, "../internals/internal-metadata": 98, "../internals/is-object": 104 }], 300: [function (require, module, exports) { var $ = require('../internals/export'); var isObject = require('../internals/is-object'); var onFreeze = require('../internals/internal-metadata').onFreeze; var FREEZING = require('../internals/freezing'); var fails = require('../internals/fails'); // eslint-disable-next-line es/no-object-seal -- safe var $seal = Object.seal; var FAILS_ON_PRIMITIVES = fails(function () { $seal(1); }); // `Object.seal` method // https://tc39.es/ecma262/#sec-object.seal $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, { seal: function seal(it) { return $seal && isObject(it) ? $seal(onFreeze(it)) : it; } }); }, { "../internals/export": 74, "../internals/fails": 75, "../internals/freezing": 78, "../internals/internal-metadata": 98, "../internals/is-object": 104 }], 301: [function (require, module, exports) { var $ = require('../internals/export'); var setPrototypeOf = require('../internals/object-set-prototype-of'); // `Object.setPrototypeOf` method // https://tc39.es/ecma262/#sec-object.setprototypeof $({ target: 'Object', stat: true }, { setPrototypeOf: setPrototypeOf }); }, { "../internals/export": 74, "../internals/object-set-prototype-of": 144 }], 302: [function (require, module, exports) { var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support'); var redefine = require('../internals/redefine'); var toString = require('../internals/object-to-string'); // `Object.prototype.toString` method // https://tc39.es/ecma262/#sec-object.prototype.tostring if (!TO_STRING_TAG_SUPPORT) { redefine(Object.prototype, 'toString', toString, { unsafe: true }); } }, { "../internals/object-to-string": 146, "../internals/redefine": 152, "../internals/to-string-tag-support": 189 }], 303: [function (require, module, exports) { var $ = require('../internals/export'); var $values = require('../internals/object-to-array').values; // `Object.values` method // https://tc39.es/ecma262/#sec-object.values $({ target: 'Object', stat: true }, { values: function values(O) { return $values(O); } }); }, { "../internals/export": 74, "../internals/object-to-array": 145 }], 304: [function (require, module, exports) { var $ = require('../internals/export'); var parseFloatImplementation = require('../internals/number-parse-float'); // `parseFloat` method // https://tc39.es/ecma262/#sec-parsefloat-string $({ global: true, forced: parseFloat != parseFloatImplementation }, { parseFloat: parseFloatImplementation }); }, { "../internals/export": 74, "../internals/number-parse-float": 127 }], 305: [function (require, module, exports) { var $ = require('../internals/export'); var parseIntImplementation = require('../internals/number-parse-int'); // `parseInt` method // https://tc39.es/ecma262/#sec-parseint-string-radix $({ global: true, forced: parseInt != parseIntImplementation }, { parseInt: parseIntImplementation }); }, { "../internals/export": 74, "../internals/number-parse-int": 128 }], 306: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var aFunction = require('../internals/a-function'); var newPromiseCapabilityModule = require('../internals/new-promise-capability'); var perform = require('../internals/perform'); var iterate = require('../internals/iterate'); // `Promise.allSettled` method // https://tc39.es/ecma262/#sec-promise.allsettled $({ target: 'Promise', stat: true }, { allSettled: function allSettled(iterable) { var C = this; var capability = newPromiseCapabilityModule.f(C); var resolve = capability.resolve; var reject = capability.reject; var result = perform(function () { var promiseResolve = aFunction(C.resolve); var values = []; var counter = 0; var remaining = 1; iterate(iterable, function (promise) { var index = counter++; var alreadyCalled = false; values.push(undefined); remaining++; promiseResolve.call(C, promise).then(function (value) { if (alreadyCalled) return; alreadyCalled = true; values[index] = { status: 'fulfilled', value: value }; --remaining || resolve(values); }, function (error) { if (alreadyCalled) return; alreadyCalled = true; values[index] = { status: 'rejected', reason: error }; --remaining || resolve(values); }); }); --remaining || resolve(values); }); if (result.error) reject(result.value); return capability.promise; } }); }, { "../internals/a-function": 11, "../internals/export": 74, "../internals/iterate": 107, "../internals/new-promise-capability": 124, "../internals/perform": 149 }], 307: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var aFunction = require('../internals/a-function'); var getBuiltIn = require('../internals/get-built-in'); var newPromiseCapabilityModule = require('../internals/new-promise-capability'); var perform = require('../internals/perform'); var iterate = require('../internals/iterate'); var PROMISE_ANY_ERROR = 'No one promise resolved'; // `Promise.any` method // https://tc39.es/ecma262/#sec-promise.any $({ target: 'Promise', stat: true }, { any: function any(iterable) { var C = this; var capability = newPromiseCapabilityModule.f(C); var resolve = capability.resolve; var reject = capability.reject; var result = perform(function () { var promiseResolve = aFunction(C.resolve); var errors = []; var counter = 0; var remaining = 1; var alreadyResolved = false; iterate(iterable, function (promise) { var index = counter++; var alreadyRejected = false; errors.push(undefined); remaining++; promiseResolve.call(C, promise).then(function (value) { if (alreadyRejected || alreadyResolved) return; alreadyResolved = true; resolve(value); }, function (error) { if (alreadyRejected || alreadyResolved) return; alreadyRejected = true; errors[index] = error; --remaining || reject(new (getBuiltIn('AggregateError'))(errors, PROMISE_ANY_ERROR)); }); }); --remaining || reject(new (getBuiltIn('AggregateError'))(errors, PROMISE_ANY_ERROR)); }); if (result.error) reject(result.value); return capability.promise; } }); }, { "../internals/a-function": 11, "../internals/export": 74, "../internals/get-built-in": 82, "../internals/iterate": 107, "../internals/new-promise-capability": 124, "../internals/perform": 149 }], 308: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var NativePromise = require('../internals/native-promise-constructor'); var fails = require('../internals/fails'); var getBuiltIn = require('../internals/get-built-in'); var speciesConstructor = require('../internals/species-constructor'); var promiseResolve = require('../internals/promise-resolve'); var redefine = require('../internals/redefine'); // Safari bug https://bugs.webkit.org/show_bug.cgi?id=200829 var NON_GENERIC = !!NativePromise && fails(function () { NativePromise.prototype['finally'].call({ then: function then() { /* empty */ } }, function () { /* empty */ }); }); // `Promise.prototype.finally` method // https://tc39.es/ecma262/#sec-promise.prototype.finally $({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, { 'finally': function _finally(onFinally) { var C = speciesConstructor(this, getBuiltIn('Promise')); var isFunction = typeof onFinally == 'function'; return this.then(isFunction ? function (x) { return promiseResolve(C, onFinally()).then(function () { return x; }); } : onFinally, isFunction ? function (e) { return promiseResolve(C, onFinally()).then(function () { throw e; }); } : onFinally); } }); // makes sure that native promise-based APIs `Promise#finally` properly works with patched `Promise#then` if (!IS_PURE && typeof NativePromise == 'function') { var method = getBuiltIn('Promise').prototype['finally']; if (NativePromise.prototype['finally'] !== method) { redefine(NativePromise.prototype, 'finally', method, { unsafe: true }); } } }, { "../internals/export": 74, "../internals/fails": 75, "../internals/get-built-in": 82, "../internals/is-pure": 105, "../internals/native-promise-constructor": 120, "../internals/promise-resolve": 150, "../internals/redefine": 152, "../internals/species-constructor": 169 }], 309: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var global = require('../internals/global'); var getBuiltIn = require('../internals/get-built-in'); var NativePromise = require('../internals/native-promise-constructor'); var redefine = require('../internals/redefine'); var redefineAll = require('../internals/redefine-all'); var setPrototypeOf = require('../internals/object-set-prototype-of'); var setToStringTag = require('../internals/set-to-string-tag'); var setSpecies = require('../internals/set-species'); var isObject = require('../internals/is-object'); var aFunction = require('../internals/a-function'); var anInstance = require('../internals/an-instance'); var inspectSource = require('../internals/inspect-source'); var iterate = require('../internals/iterate'); var checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration'); var speciesConstructor = require('../internals/species-constructor'); var task = require('../internals/task').set; var microtask = require('../internals/microtask'); var promiseResolve = require('../internals/promise-resolve'); var hostReportErrors = require('../internals/host-report-errors'); var newPromiseCapabilityModule = require('../internals/new-promise-capability'); var perform = require('../internals/perform'); var InternalStateModule = require('../internals/internal-state'); var isForced = require('../internals/is-forced'); var wellKnownSymbol = require('../internals/well-known-symbol'); var IS_BROWSER = require('../internals/engine-is-browser'); var IS_NODE = require('../internals/engine-is-node'); var V8_VERSION = require('../internals/engine-v8-version'); var SPECIES = wellKnownSymbol('species'); var PROMISE = 'Promise'; var getInternalState = InternalStateModule.get; var setInternalState = InternalStateModule.set; var getInternalPromiseState = InternalStateModule.getterFor(PROMISE); var NativePromisePrototype = NativePromise && NativePromise.prototype; var PromiseConstructor = NativePromise; var PromiseConstructorPrototype = NativePromisePrototype; var TypeError = global.TypeError; var document = global.document; var process = global.process; var newPromiseCapability = newPromiseCapabilityModule.f; var newGenericPromiseCapability = newPromiseCapability; var DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent); var NATIVE_REJECTION_EVENT = typeof PromiseRejectionEvent == 'function'; var UNHANDLED_REJECTION = 'unhandledrejection'; var REJECTION_HANDLED = 'rejectionhandled'; var PENDING = 0; var FULFILLED = 1; var REJECTED = 2; var HANDLED = 1; var UNHANDLED = 2; var SUBCLASSING = false; var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen; var FORCED = isForced(PROMISE, function () { var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(PromiseConstructor); var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(PromiseConstructor); // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 // We can't detect it synchronously, so just check versions if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true; // We need Promise#finally in the pure version for preventing prototype pollution if (IS_PURE && !PromiseConstructorPrototype['finally']) return true; // We can't use @@species feature detection in V8 since it causes // deoptimization and performance degradation // https://github.com/zloirock/core-js/issues/679 if (V8_VERSION >= 51 && /native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) return false; // Detect correctness of subclassing with @@species support var promise = new PromiseConstructor(function (resolve) { resolve(1); }); var FakePromise = function FakePromise(exec) { exec(function () { /* empty */ }, function () { /* empty */ }); }; var constructor = promise.constructor = {}; constructor[SPECIES] = FakePromise; SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise; if (!SUBCLASSING) return true; // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_REJECTION_EVENT; }); var INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) { PromiseConstructor.all(iterable)['catch'](function () { /* empty */ }); }); // helpers var isThenable = function isThenable(it) { var then; return isObject(it) && typeof (then = it.then) == 'function' ? then : false; }; var notify = function notify(state, isReject) { if (state.notified) return; state.notified = true; var chain = state.reactions; microtask(function () { var value = state.value; var ok = state.state == FULFILLED; var index = 0; // variable length - can't use forEach while (chain.length > index) { var reaction = chain[index++]; var handler = ok ? reaction.ok : reaction.fail; var resolve = reaction.resolve; var reject = reaction.reject; var domain = reaction.domain; var result, then, exited; try { if (handler) { if (!ok) { if (state.rejection === UNHANDLED) onHandleUnhandled(state); state.rejection = HANDLED; } if (handler === true) result = value;else { if (domain) domain.enter(); result = handler(value); // can throw if (domain) { domain.exit(); exited = true; } } if (result === reaction.promise) { reject(TypeError('Promise-chain cycle')); } else if (then = isThenable(result)) { then.call(result, resolve, reject); } else resolve(result); } else reject(value); } catch (error) { if (domain && !exited) domain.exit(); reject(error); } } state.reactions = []; state.notified = false; if (isReject && !state.rejection) onUnhandled(state); }); }; var dispatchEvent = function dispatchEvent(name, promise, reason) { var event, handler; if (DISPATCH_EVENT) { event = document.createEvent('Event'); event.promise = promise; event.reason = reason; event.initEvent(name, false, true); global.dispatchEvent(event); } else event = { promise: promise, reason: reason }; if (!NATIVE_REJECTION_EVENT && (handler = global['on' + name])) handler(event);else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason); }; var onUnhandled = function onUnhandled(state) { task.call(global, function () { var promise = state.facade; var value = state.value; var IS_UNHANDLED = isUnhandled(state); var result; if (IS_UNHANDLED) { result = perform(function () { if (IS_NODE) { process.emit('unhandledRejection', value, promise); } else dispatchEvent(UNHANDLED_REJECTION, promise, value); }); // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED; if (result.error) throw result.value; } }); }; var isUnhandled = function isUnhandled(state) { return state.rejection !== HANDLED && !state.parent; }; var onHandleUnhandled = function onHandleUnhandled(state) { task.call(global, function () { var promise = state.facade; if (IS_NODE) { process.emit('rejectionHandled', promise); } else dispatchEvent(REJECTION_HANDLED, promise, state.value); }); }; var bind = function bind(fn, state, unwrap) { return function (value) { fn(state, value, unwrap); }; }; var internalReject = function internalReject(state, value, unwrap) { if (state.done) return; state.done = true; if (unwrap) state = unwrap; state.value = value; state.state = REJECTED; notify(state, true); }; var internalResolve = function internalResolve(state, value, unwrap) { if (state.done) return; state.done = true; if (unwrap) state = unwrap; try { if (state.facade === value) throw TypeError("Promise can't be resolved itself"); var then = isThenable(value); if (then) { microtask(function () { var wrapper = { done: false }; try { then.call(value, bind(internalResolve, wrapper, state), bind(internalReject, wrapper, state)); } catch (error) { internalReject(wrapper, error, state); } }); } else { state.value = value; state.state = FULFILLED; notify(state, false); } } catch (error) { internalReject({ done: false }, error, state); } }; // constructor polyfill if (FORCED) { // 25.4.3.1 Promise(executor) PromiseConstructor = function Promise(executor) { anInstance(this, PromiseConstructor, PROMISE); aFunction(executor); Internal.call(this); var state = getInternalState(this); try { executor(bind(internalResolve, state), bind(internalReject, state)); } catch (error) { internalReject(state, error); } }; PromiseConstructorPrototype = PromiseConstructor.prototype; // eslint-disable-next-line no-unused-vars -- required for `.length` Internal = function Promise(executor) { setInternalState(this, { type: PROMISE, done: false, notified: false, parent: false, reactions: [], rejection: false, state: PENDING, value: undefined }); }; Internal.prototype = redefineAll(PromiseConstructorPrototype, { // `Promise.prototype.then` method // https://tc39.es/ecma262/#sec-promise.prototype.then then: function then(onFulfilled, onRejected) { var state = getInternalPromiseState(this); var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor)); reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; reaction.fail = typeof onRejected == 'function' && onRejected; reaction.domain = IS_NODE ? process.domain : undefined; state.parent = true; state.reactions.push(reaction); if (state.state != PENDING) notify(state, false); return reaction.promise; }, // `Promise.prototype.catch` method // https://tc39.es/ecma262/#sec-promise.prototype.catch 'catch': function _catch(onRejected) { return this.then(undefined, onRejected); } }); OwnPromiseCapability = function OwnPromiseCapability() { var promise = new Internal(); var state = getInternalState(promise); this.promise = promise; this.resolve = bind(internalResolve, state); this.reject = bind(internalReject, state); }; newPromiseCapabilityModule.f = newPromiseCapability = function newPromiseCapability(C) { return C === PromiseConstructor || C === PromiseWrapper ? new OwnPromiseCapability(C) : newGenericPromiseCapability(C); }; if (!IS_PURE && typeof NativePromise == 'function' && NativePromisePrototype !== Object.prototype) { nativeThen = NativePromisePrototype.then; if (!SUBCLASSING) { // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) { var that = this; return new PromiseConstructor(function (resolve, reject) { nativeThen.call(that, resolve, reject); }).then(onFulfilled, onRejected); // https://github.com/zloirock/core-js/issues/640 }, { unsafe: true }); // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then` redefine(NativePromisePrototype, 'catch', PromiseConstructorPrototype['catch'], { unsafe: true }); } // make `.constructor === Promise` work for native promise-based APIs try { delete NativePromisePrototype.constructor; } catch (error) { /* empty */ } // make `instanceof Promise` work for native promise-based APIs if (setPrototypeOf) { setPrototypeOf(NativePromisePrototype, PromiseConstructorPrototype); } } } $({ global: true, wrap: true, forced: FORCED }, { Promise: PromiseConstructor }); setToStringTag(PromiseConstructor, PROMISE, false, true); setSpecies(PROMISE); PromiseWrapper = getBuiltIn(PROMISE); // statics $({ target: PROMISE, stat: true, forced: FORCED }, { // `Promise.reject` method // https://tc39.es/ecma262/#sec-promise.reject reject: function reject(r) { var capability = newPromiseCapability(this); capability.reject.call(undefined, r); return capability.promise; } }); $({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, { // `Promise.resolve` method // https://tc39.es/ecma262/#sec-promise.resolve resolve: function resolve(x) { return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x); } }); $({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, { // `Promise.all` method // https://tc39.es/ecma262/#sec-promise.all all: function all(iterable) { var C = this; var capability = newPromiseCapability(C); var resolve = capability.resolve; var reject = capability.reject; var result = perform(function () { var $promiseResolve = aFunction(C.resolve); var values = []; var counter = 0; var remaining = 1; iterate(iterable, function (promise) { var index = counter++; var alreadyCalled = false; values.push(undefined); remaining++; $promiseResolve.call(C, promise).then(function (value) { if (alreadyCalled) return; alreadyCalled = true; values[index] = value; --remaining || resolve(values); }, reject); }); --remaining || resolve(values); }); if (result.error) reject(result.value); return capability.promise; }, // `Promise.race` method // https://tc39.es/ecma262/#sec-promise.race race: function race(iterable) { var C = this; var capability = newPromiseCapability(C); var reject = capability.reject; var result = perform(function () { var $promiseResolve = aFunction(C.resolve); iterate(iterable, function (promise) { $promiseResolve.call(C, promise).then(capability.resolve, reject); }); }); if (result.error) reject(result.value); return capability.promise; } }); }, { "../internals/a-function": 11, "../internals/an-instance": 15, "../internals/check-correctness-of-iteration": 38, "../internals/engine-is-browser": 65, "../internals/engine-is-node": 68, "../internals/engine-v8-version": 71, "../internals/export": 74, "../internals/get-built-in": 82, "../internals/global": 88, "../internals/host-report-errors": 91, "../internals/inspect-source": 97, "../internals/internal-state": 99, "../internals/is-forced": 102, "../internals/is-object": 104, "../internals/is-pure": 105, "../internals/iterate": 107, "../internals/microtask": 119, "../internals/native-promise-constructor": 120, "../internals/new-promise-capability": 124, "../internals/object-set-prototype-of": 144, "../internals/perform": 149, "../internals/promise-resolve": 150, "../internals/redefine": 152, "../internals/redefine-all": 151, "../internals/set-species": 164, "../internals/set-to-string-tag": 165, "../internals/species-constructor": 169, "../internals/task": 178, "../internals/well-known-symbol": 197 }], 310: [function (require, module, exports) { var $ = require('../internals/export'); var getBuiltIn = require('../internals/get-built-in'); var aFunction = require('../internals/a-function'); var anObject = require('../internals/an-object'); var fails = require('../internals/fails'); var nativeApply = getBuiltIn('Reflect', 'apply'); var functionApply = Function.apply; // MS Edge argumentsList argument is optional var OPTIONAL_ARGUMENTS_LIST = !fails(function () { nativeApply(function () { /* empty */ }); }); // `Reflect.apply` method // https://tc39.es/ecma262/#sec-reflect.apply $({ target: 'Reflect', stat: true, forced: OPTIONAL_ARGUMENTS_LIST }, { apply: function apply(target, thisArgument, argumentsList) { aFunction(target); anObject(argumentsList); return nativeApply ? nativeApply(target, thisArgument, argumentsList) : functionApply.call(target, thisArgument, argumentsList); } }); }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/export": 74, "../internals/fails": 75, "../internals/get-built-in": 82 }], 311: [function (require, module, exports) { var $ = require('../internals/export'); var getBuiltIn = require('../internals/get-built-in'); var aFunction = require('../internals/a-function'); var anObject = require('../internals/an-object'); var isObject = require('../internals/is-object'); var create = require('../internals/object-create'); var bind = require('../internals/function-bind'); var fails = require('../internals/fails'); var nativeConstruct = getBuiltIn('Reflect', 'construct'); // `Reflect.construct` method // https://tc39.es/ecma262/#sec-reflect.construct // MS Edge supports only 2 arguments and argumentsList argument is optional // FF Nightly sets third argument as `new.target`, but does not create `this` from it var NEW_TARGET_BUG = fails(function () { function F() { /* empty */ } return !(nativeConstruct(function () { /* empty */ }, [], F) instanceof F); }); var ARGS_BUG = !fails(function () { nativeConstruct(function () { /* empty */ }); }); var FORCED = NEW_TARGET_BUG || ARGS_BUG; $({ target: 'Reflect', stat: true, forced: FORCED, sham: FORCED }, { construct: function construct(Target, args /* , newTarget */ ) { aFunction(Target); anObject(args); var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); if (ARGS_BUG && !NEW_TARGET_BUG) return nativeConstruct(Target, args, newTarget); if (Target == newTarget) { // w/o altered newTarget, optimization for 0-4 arguments switch (args.length) { case 0: return new Target(); case 1: return new Target(args[0]); case 2: return new Target(args[0], args[1]); case 3: return new Target(args[0], args[1], args[2]); case 4: return new Target(args[0], args[1], args[2], args[3]); } // w/o altered newTarget, lot of arguments case var $args = [null]; $args.push.apply($args, args); return new (bind.apply(Target, $args))(); } // with altered newTarget, not support built-in constructors var proto = newTarget.prototype; var instance = create(isObject(proto) ? proto : Object.prototype); var result = Function.apply.call(Target, instance, args); return isObject(result) ? result : instance; } }); }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/export": 74, "../internals/fails": 75, "../internals/function-bind": 80, "../internals/get-built-in": 82, "../internals/is-object": 104, "../internals/object-create": 131 }], 312: [function (require, module, exports) { var $ = require('../internals/export'); var DESCRIPTORS = require('../internals/descriptors'); var anObject = require('../internals/an-object'); var toPrimitive = require('../internals/to-primitive'); var definePropertyModule = require('../internals/object-define-property'); var fails = require('../internals/fails'); // MS Edge has broken Reflect.defineProperty - throwing instead of returning false var ERROR_INSTEAD_OF_FALSE = fails(function () { // eslint-disable-next-line es/no-reflect -- required for testing Reflect.defineProperty(definePropertyModule.f({}, 1, { value: 1 }), 1, { value: 2 }); }); // `Reflect.defineProperty` method // https://tc39.es/ecma262/#sec-reflect.defineproperty $({ target: 'Reflect', stat: true, forced: ERROR_INSTEAD_OF_FALSE, sham: !DESCRIPTORS }, { defineProperty: function defineProperty(target, propertyKey, attributes) { anObject(target); var key = toPrimitive(propertyKey, true); anObject(attributes); try { definePropertyModule.f(target, key, attributes); return true; } catch (error) { return false; } } }); }, { "../internals/an-object": 16, "../internals/descriptors": 61, "../internals/export": 74, "../internals/fails": 75, "../internals/object-define-property": 133, "../internals/to-primitive": 188 }], 313: [function (require, module, exports) { var $ = require('../internals/export'); var anObject = require('../internals/an-object'); var getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f; // `Reflect.deleteProperty` method // https://tc39.es/ecma262/#sec-reflect.deleteproperty $({ target: 'Reflect', stat: true }, { deleteProperty: function deleteProperty(target, propertyKey) { var descriptor = getOwnPropertyDescriptor(anObject(target), propertyKey); return descriptor && !descriptor.configurable ? false : delete target[propertyKey]; } }); }, { "../internals/an-object": 16, "../internals/export": 74, "../internals/object-get-own-property-descriptor": 134 }], 314: [function (require, module, exports) { var $ = require('../internals/export'); var DESCRIPTORS = require('../internals/descriptors'); var anObject = require('../internals/an-object'); var getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor'); // `Reflect.getOwnPropertyDescriptor` method // https://tc39.es/ecma262/#sec-reflect.getownpropertydescriptor $({ target: 'Reflect', stat: true, sham: !DESCRIPTORS }, { getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) { return getOwnPropertyDescriptorModule.f(anObject(target), propertyKey); } }); }, { "../internals/an-object": 16, "../internals/descriptors": 61, "../internals/export": 74, "../internals/object-get-own-property-descriptor": 134 }], 315: [function (require, module, exports) { var $ = require('../internals/export'); var anObject = require('../internals/an-object'); var objectGetPrototypeOf = require('../internals/object-get-prototype-of'); var CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter'); // `Reflect.getPrototypeOf` method // https://tc39.es/ecma262/#sec-reflect.getprototypeof $({ target: 'Reflect', stat: true, sham: !CORRECT_PROTOTYPE_GETTER }, { getPrototypeOf: function getPrototypeOf(target) { return objectGetPrototypeOf(anObject(target)); } }); }, { "../internals/an-object": 16, "../internals/correct-prototype-getter": 51, "../internals/export": 74, "../internals/object-get-prototype-of": 138 }], 316: [function (require, module, exports) { var $ = require('../internals/export'); var isObject = require('../internals/is-object'); var anObject = require('../internals/an-object'); var has = require('../internals/has'); var getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor'); var getPrototypeOf = require('../internals/object-get-prototype-of'); // `Reflect.get` method // https://tc39.es/ecma262/#sec-reflect.get function get(target, propertyKey /* , receiver */ ) { var receiver = arguments.length < 3 ? target : arguments[2]; var descriptor, prototype; if (anObject(target) === receiver) return target[propertyKey]; if (descriptor = getOwnPropertyDescriptorModule.f(target, propertyKey)) return has(descriptor, 'value') ? descriptor.value : descriptor.get === undefined ? undefined : descriptor.get.call(receiver); if (isObject(prototype = getPrototypeOf(target))) return get(prototype, propertyKey, receiver); } $({ target: 'Reflect', stat: true }, { get: get }); }, { "../internals/an-object": 16, "../internals/export": 74, "../internals/has": 89, "../internals/is-object": 104, "../internals/object-get-own-property-descriptor": 134, "../internals/object-get-prototype-of": 138 }], 317: [function (require, module, exports) { var $ = require('../internals/export'); // `Reflect.has` method // https://tc39.es/ecma262/#sec-reflect.has $({ target: 'Reflect', stat: true }, { has: function has(target, propertyKey) { return propertyKey in target; } }); }, { "../internals/export": 74 }], 318: [function (require, module, exports) { var $ = require('../internals/export'); var anObject = require('../internals/an-object'); // eslint-disable-next-line es/no-object-isextensible -- safe var objectIsExtensible = Object.isExtensible; // `Reflect.isExtensible` method // https://tc39.es/ecma262/#sec-reflect.isextensible $({ target: 'Reflect', stat: true }, { isExtensible: function isExtensible(target) { anObject(target); return objectIsExtensible ? objectIsExtensible(target) : true; } }); }, { "../internals/an-object": 16, "../internals/export": 74 }], 319: [function (require, module, exports) { var $ = require('../internals/export'); var ownKeys = require('../internals/own-keys'); // `Reflect.ownKeys` method // https://tc39.es/ecma262/#sec-reflect.ownkeys $({ target: 'Reflect', stat: true }, { ownKeys: ownKeys }); }, { "../internals/export": 74, "../internals/own-keys": 147 }], 320: [function (require, module, exports) { var $ = require('../internals/export'); var getBuiltIn = require('../internals/get-built-in'); var anObject = require('../internals/an-object'); var FREEZING = require('../internals/freezing'); // `Reflect.preventExtensions` method // https://tc39.es/ecma262/#sec-reflect.preventextensions $({ target: 'Reflect', stat: true, sham: !FREEZING }, { preventExtensions: function preventExtensions(target) { anObject(target); try { var objectPreventExtensions = getBuiltIn('Object', 'preventExtensions'); if (objectPreventExtensions) objectPreventExtensions(target); return true; } catch (error) { return false; } } }); }, { "../internals/an-object": 16, "../internals/export": 74, "../internals/freezing": 78, "../internals/get-built-in": 82 }], 321: [function (require, module, exports) { var $ = require('../internals/export'); var anObject = require('../internals/an-object'); var aPossiblePrototype = require('../internals/a-possible-prototype'); var objectSetPrototypeOf = require('../internals/object-set-prototype-of'); // `Reflect.setPrototypeOf` method // https://tc39.es/ecma262/#sec-reflect.setprototypeof if (objectSetPrototypeOf) $({ target: 'Reflect', stat: true }, { setPrototypeOf: function setPrototypeOf(target, proto) { anObject(target); aPossiblePrototype(proto); try { objectSetPrototypeOf(target, proto); return true; } catch (error) { return false; } } }); }, { "../internals/a-possible-prototype": 12, "../internals/an-object": 16, "../internals/export": 74, "../internals/object-set-prototype-of": 144 }], 322: [function (require, module, exports) { var $ = require('../internals/export'); var anObject = require('../internals/an-object'); var isObject = require('../internals/is-object'); var has = require('../internals/has'); var fails = require('../internals/fails'); var definePropertyModule = require('../internals/object-define-property'); var getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor'); var getPrototypeOf = require('../internals/object-get-prototype-of'); var createPropertyDescriptor = require('../internals/create-property-descriptor'); // `Reflect.set` method // https://tc39.es/ecma262/#sec-reflect.set function set(target, propertyKey, V /* , receiver */ ) { var receiver = arguments.length < 4 ? target : arguments[3]; var ownDescriptor = getOwnPropertyDescriptorModule.f(anObject(target), propertyKey); var existingDescriptor, prototype; if (!ownDescriptor) { if (isObject(prototype = getPrototypeOf(target))) { return set(prototype, propertyKey, V, receiver); } ownDescriptor = createPropertyDescriptor(0); } if (has(ownDescriptor, 'value')) { if (ownDescriptor.writable === false || !isObject(receiver)) return false; if (existingDescriptor = getOwnPropertyDescriptorModule.f(receiver, propertyKey)) { if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false; existingDescriptor.value = V; definePropertyModule.f(receiver, propertyKey, existingDescriptor); } else definePropertyModule.f(receiver, propertyKey, createPropertyDescriptor(0, V)); return true; } return ownDescriptor.set === undefined ? false : (ownDescriptor.set.call(receiver, V), true); } // MS Edge 17-18 Reflect.set allows setting the property to object // with non-writable property on the prototype var MS_EDGE_BUG = fails(function () { var Constructor = function Constructor() { /* empty */ }; var object = definePropertyModule.f(new Constructor(), 'a', { configurable: true }); // eslint-disable-next-line es/no-reflect -- required for testing return Reflect.set(Constructor.prototype, 'a', 1, object) !== false; }); $({ target: 'Reflect', stat: true, forced: MS_EDGE_BUG }, { set: set }); }, { "../internals/an-object": 16, "../internals/create-property-descriptor": 55, "../internals/export": 74, "../internals/fails": 75, "../internals/has": 89, "../internals/is-object": 104, "../internals/object-define-property": 133, "../internals/object-get-own-property-descriptor": 134, "../internals/object-get-prototype-of": 138 }], 323: [function (require, module, exports) { var $ = require('../internals/export'); var global = require('../internals/global'); var setToStringTag = require('../internals/set-to-string-tag'); $({ global: true }, { Reflect: {} }); // Reflect[@@toStringTag] property // https://tc39.es/ecma262/#sec-reflect-@@tostringtag setToStringTag(global.Reflect, 'Reflect', true); }, { "../internals/export": 74, "../internals/global": 88, "../internals/set-to-string-tag": 165 }], 324: [function (require, module, exports) { var DESCRIPTORS = require('../internals/descriptors'); var global = require('../internals/global'); var isForced = require('../internals/is-forced'); var inheritIfRequired = require('../internals/inherit-if-required'); var createNonEnumerableProperty = require('../internals/create-non-enumerable-property'); var defineProperty = require('../internals/object-define-property').f; var getOwnPropertyNames = require('../internals/object-get-own-property-names').f; var isRegExp = require('../internals/is-regexp'); var getFlags = require('../internals/regexp-flags'); var stickyHelpers = require('../internals/regexp-sticky-helpers'); var redefine = require('../internals/redefine'); var fails = require('../internals/fails'); var has = require('../internals/has'); var enforceInternalState = require('../internals/internal-state').enforce; var setSpecies = require('../internals/set-species'); var wellKnownSymbol = require('../internals/well-known-symbol'); var UNSUPPORTED_DOT_ALL = require('../internals/regexp-unsupported-dot-all'); var UNSUPPORTED_NCG = require('../internals/regexp-unsupported-ncg'); var MATCH = wellKnownSymbol('match'); var NativeRegExp = global.RegExp; var RegExpPrototype = NativeRegExp.prototype; // TODO: Use only propper RegExpIdentifierName var IS_NCG = /^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/; var re1 = /a/g; var re2 = /a/g; // "new" should create a new object, old webkit bug var CORRECT_NEW = new NativeRegExp(re1) !== re1; var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y; var BASE_FORCED = DESCRIPTORS && (!CORRECT_NEW || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG || fails(function () { re2[MATCH] = false; // RegExp constructor can alter flags and IsRegExp works correct with @@match return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i'; })); var handleDotAll = function handleDotAll(string) { var length = string.length; var index = 0; var result = ''; var brackets = false; var chr; for (; index <= length; index++) { chr = string.charAt(index); if (chr === '\\') { result += chr + string.charAt(++index); continue; } if (!brackets && chr === '.') { result += '[\\s\\S]'; } else { if (chr === '[') { brackets = true; } else if (chr === ']') { brackets = false; } result += chr; } } return result; }; var handleNCG = function handleNCG(string) { var length = string.length; var index = 0; var result = ''; var named = []; var names = {}; var brackets = false; var ncg = false; var groupid = 0; var groupname = ''; var chr; for (; index <= length; index++) { chr = string.charAt(index); if (chr === '\\') { chr = chr + string.charAt(++index); } else if (chr === ']') { brackets = false; } else if (!brackets) switch (true) { case chr === '[': brackets = true; break; case chr === '(': if (IS_NCG.test(string.slice(index + 1))) { index += 2; ncg = true; } result += chr; groupid++; continue; case chr === '>' && ncg: if (groupname === '' || has(names, groupname)) { throw new SyntaxError('Invalid capture group name'); } names[groupname] = true; named.push([groupname, groupid]); ncg = false; groupname = ''; continue; } if (ncg) groupname += chr;else result += chr; } return [result, named]; }; // `RegExp` constructor // https://tc39.es/ecma262/#sec-regexp-constructor if (isForced('RegExp', BASE_FORCED)) { var RegExpWrapper = function RegExp(pattern, flags) { var thisIsRegExp = this instanceof RegExpWrapper; var patternIsRegExp = isRegExp(pattern); var flagsAreUndefined = flags === undefined; var groups = []; var rawPattern = pattern; var rawFlags, dotAll, sticky, handled, result, state; if (!thisIsRegExp && patternIsRegExp && flagsAreUndefined && pattern.constructor === RegExpWrapper) { return pattern; } if (patternIsRegExp || pattern instanceof RegExpWrapper) { pattern = pattern.source; if (flagsAreUndefined) flags = 'flags' in rawPattern ? rawPattern.flags : getFlags.call(rawPattern); } pattern = pattern === undefined ? '' : String(pattern); flags = flags === undefined ? '' : String(flags); rawPattern = pattern; if (UNSUPPORTED_DOT_ALL && 'dotAll' in re1) { dotAll = !!flags && flags.indexOf('s') > -1; if (dotAll) flags = flags.replace(/s/g, ''); } rawFlags = flags; if (UNSUPPORTED_Y && 'sticky' in re1) { sticky = !!flags && flags.indexOf('y') > -1; if (sticky) flags = flags.replace(/y/g, ''); } if (UNSUPPORTED_NCG) { handled = handleNCG(pattern); pattern = handled[0]; groups = handled[1]; } result = inheritIfRequired(NativeRegExp(pattern, flags), thisIsRegExp ? this : RegExpPrototype, RegExpWrapper); if (dotAll || sticky || groups.length) { state = enforceInternalState(result); if (dotAll) { state.dotAll = true; state.raw = RegExpWrapper(handleDotAll(pattern), rawFlags); } if (sticky) state.sticky = true; if (groups.length) state.groups = groups; } if (pattern !== rawPattern) try { // fails in old engines, but we have no alternatives for unsupported regex syntax createNonEnumerableProperty(result, 'source', rawPattern === '' ? '(?:)' : rawPattern); } catch (error) { /* empty */ } return result; }; var proxy = function proxy(key) { key in RegExpWrapper || defineProperty(RegExpWrapper, key, { configurable: true, get: function get() { return NativeRegExp[key]; }, set: function set(it) { NativeRegExp[key] = it; } }); }; for (var keys = getOwnPropertyNames(NativeRegExp), index = 0; keys.length > index;) { proxy(keys[index++]); } RegExpPrototype.constructor = RegExpWrapper; RegExpWrapper.prototype = RegExpPrototype; redefine(global, 'RegExp', RegExpWrapper); } // https://tc39.es/ecma262/#sec-get-regexp-@@species setSpecies('RegExp'); }, { "../internals/create-non-enumerable-property": 54, "../internals/descriptors": 61, "../internals/fails": 75, "../internals/global": 88, "../internals/has": 89, "../internals/inherit-if-required": 96, "../internals/internal-state": 99, "../internals/is-forced": 102, "../internals/is-regexp": 106, "../internals/object-define-property": 133, "../internals/object-get-own-property-names": 136, "../internals/redefine": 152, "../internals/regexp-flags": 156, "../internals/regexp-sticky-helpers": 157, "../internals/regexp-unsupported-dot-all": 158, "../internals/regexp-unsupported-ncg": 159, "../internals/set-species": 164, "../internals/well-known-symbol": 197 }], 325: [function (require, module, exports) { var DESCRIPTORS = require('../internals/descriptors'); var UNSUPPORTED_DOT_ALL = require('../internals/regexp-unsupported-dot-all'); var defineProperty = require('../internals/object-define-property').f; var getInternalState = require('../internals/internal-state').get; var RegExpPrototype = RegExp.prototype; // `RegExp.prototype.dotAll` getter // https://tc39.es/ecma262/#sec-get-regexp.prototype.dotall if (DESCRIPTORS && UNSUPPORTED_DOT_ALL) { defineProperty(RegExpPrototype, 'dotAll', { configurable: true, get: function get() { if (this === RegExpPrototype) return undefined; // We can't use InternalStateModule.getterFor because // we don't add metadata for regexps created by a literal. if (this instanceof RegExp) { return !!getInternalState(this).dotAll; } throw TypeError('Incompatible receiver, RegExp required'); } }); } }, { "../internals/descriptors": 61, "../internals/internal-state": 99, "../internals/object-define-property": 133, "../internals/regexp-unsupported-dot-all": 158 }], 326: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var exec = require('../internals/regexp-exec'); // `RegExp.prototype.exec` method // https://tc39.es/ecma262/#sec-regexp.prototype.exec $({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, { exec: exec }); }, { "../internals/export": 74, "../internals/regexp-exec": 155 }], 327: [function (require, module, exports) { var DESCRIPTORS = require('../internals/descriptors'); var objectDefinePropertyModule = require('../internals/object-define-property'); var regExpFlags = require('../internals/regexp-flags'); var fails = require('../internals/fails'); var FORCED = DESCRIPTORS && fails(function () { // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe return Object.getOwnPropertyDescriptor(RegExp.prototype, 'flags').get.call({ dotAll: true, sticky: true }) !== 'sy'; }); // `RegExp.prototype.flags` getter // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags if (FORCED) objectDefinePropertyModule.f(RegExp.prototype, 'flags', { configurable: true, get: regExpFlags }); }, { "../internals/descriptors": 61, "../internals/fails": 75, "../internals/object-define-property": 133, "../internals/regexp-flags": 156 }], 328: [function (require, module, exports) { var DESCRIPTORS = require('../internals/descriptors'); var UNSUPPORTED_Y = require('../internals/regexp-sticky-helpers').UNSUPPORTED_Y; var defineProperty = require('../internals/object-define-property').f; var getInternalState = require('../internals/internal-state').get; var RegExpPrototype = RegExp.prototype; // `RegExp.prototype.sticky` getter // https://tc39.es/ecma262/#sec-get-regexp.prototype.sticky if (DESCRIPTORS && UNSUPPORTED_Y) { defineProperty(RegExpPrototype, 'sticky', { configurable: true, get: function get() { if (this === RegExpPrototype) return undefined; // We can't use InternalStateModule.getterFor because // we don't add metadata for regexps created by a literal. if (this instanceof RegExp) { return !!getInternalState(this).sticky; } throw TypeError('Incompatible receiver, RegExp required'); } }); } }, { "../internals/descriptors": 61, "../internals/internal-state": 99, "../internals/object-define-property": 133, "../internals/regexp-sticky-helpers": 157 }], 329: [function (require, module, exports) { 'use strict'; // TODO: Remove from `core-js@4` since it's moved to entry points require('../modules/es.regexp.exec'); var $ = require('../internals/export'); var isObject = require('../internals/is-object'); var DELEGATES_TO_EXEC = function () { var execCalled = false; var re = /[ac]/; re.exec = function () { execCalled = true; return /./.exec.apply(this, arguments); }; return re.test('abc') === true && execCalled; }(); var nativeTest = /./.test; // `RegExp.prototype.test` method // https://tc39.es/ecma262/#sec-regexp.prototype.test $({ target: 'RegExp', proto: true, forced: !DELEGATES_TO_EXEC }, { test: function test(str) { if (typeof this.exec !== 'function') { return nativeTest.call(this, str); } var result = this.exec(str); if (result !== null && !isObject(result)) { throw new Error('RegExp exec method returned something other than an Object or null'); } return !!result; } }); }, { "../internals/export": 74, "../internals/is-object": 104, "../modules/es.regexp.exec": 326 }], 330: [function (require, module, exports) { 'use strict'; var redefine = require('../internals/redefine'); var anObject = require('../internals/an-object'); var fails = require('../internals/fails'); var flags = require('../internals/regexp-flags'); var TO_STRING = 'toString'; var RegExpPrototype = RegExp.prototype; var nativeToString = RegExpPrototype[TO_STRING]; var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; }); // FF44- RegExp#toString has a wrong name var INCORRECT_NAME = nativeToString.name != TO_STRING; // `RegExp.prototype.toString` method // https://tc39.es/ecma262/#sec-regexp.prototype.tostring if (NOT_GENERIC || INCORRECT_NAME) { redefine(RegExp.prototype, TO_STRING, function toString() { var R = anObject(this); var p = String(R.source); var rf = R.flags; var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf); return '/' + p + '/' + f; }, { unsafe: true }); } }, { "../internals/an-object": 16, "../internals/fails": 75, "../internals/redefine": 152, "../internals/regexp-flags": 156 }], 331: [function (require, module, exports) { 'use strict'; var collection = require('../internals/collection'); var collectionStrong = require('../internals/collection-strong'); // `Set` constructor // https://tc39.es/ecma262/#sec-set-objects module.exports = collection('Set', function (init) { return function Set() { return init(this, arguments.length ? arguments[0] : undefined); }; }, collectionStrong); }, { "../internals/collection": 47, "../internals/collection-strong": 45 }], 332: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var createHTML = require('../internals/create-html'); var forcedStringHTMLMethod = require('../internals/string-html-forced'); // `String.prototype.anchor` method // https://tc39.es/ecma262/#sec-string.prototype.anchor $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('anchor') }, { anchor: function anchor(name) { return createHTML(this, 'a', 'name', name); } }); }, { "../internals/create-html": 52, "../internals/export": 74, "../internals/string-html-forced": 170 }], 333: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var createHTML = require('../internals/create-html'); var forcedStringHTMLMethod = require('../internals/string-html-forced'); // `String.prototype.big` method // https://tc39.es/ecma262/#sec-string.prototype.big $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('big') }, { big: function big() { return createHTML(this, 'big', '', ''); } }); }, { "../internals/create-html": 52, "../internals/export": 74, "../internals/string-html-forced": 170 }], 334: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var createHTML = require('../internals/create-html'); var forcedStringHTMLMethod = require('../internals/string-html-forced'); // `String.prototype.blink` method // https://tc39.es/ecma262/#sec-string.prototype.blink $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('blink') }, { blink: function blink() { return createHTML(this, 'blink', '', ''); } }); }, { "../internals/create-html": 52, "../internals/export": 74, "../internals/string-html-forced": 170 }], 335: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var createHTML = require('../internals/create-html'); var forcedStringHTMLMethod = require('../internals/string-html-forced'); // `String.prototype.bold` method // https://tc39.es/ecma262/#sec-string.prototype.bold $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('bold') }, { bold: function bold() { return createHTML(this, 'b', '', ''); } }); }, { "../internals/create-html": 52, "../internals/export": 74, "../internals/string-html-forced": 170 }], 336: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var codeAt = require('../internals/string-multibyte').codeAt; // `String.prototype.codePointAt` method // https://tc39.es/ecma262/#sec-string.prototype.codepointat $({ target: 'String', proto: true }, { codePointAt: function codePointAt(pos) { return codeAt(this, pos); } }); }, { "../internals/export": 74, "../internals/string-multibyte": 171 }], 337: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f; var toLength = require('../internals/to-length'); var notARegExp = require('../internals/not-a-regexp'); var requireObjectCoercible = require('../internals/require-object-coercible'); var correctIsRegExpLogic = require('../internals/correct-is-regexp-logic'); var IS_PURE = require('../internals/is-pure'); // eslint-disable-next-line es/no-string-prototype-endswith -- safe var $endsWith = ''.endsWith; var min = Math.min; var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('endsWith'); // https://github.com/zloirock/core-js/pull/702 var MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () { var descriptor = getOwnPropertyDescriptor(String.prototype, 'endsWith'); return descriptor && !descriptor.writable; }(); // `String.prototype.endsWith` method // https://tc39.es/ecma262/#sec-string.prototype.endswith $({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, { endsWith: function endsWith(searchString /* , endPosition = @length */ ) { var that = String(requireObjectCoercible(this)); notARegExp(searchString); var endPosition = arguments.length > 1 ? arguments[1] : undefined; var len = toLength(that.length); var end = endPosition === undefined ? len : min(toLength(endPosition), len); var search = String(searchString); return $endsWith ? $endsWith.call(that, search, end) : that.slice(end - search.length, end) === search; } }); }, { "../internals/correct-is-regexp-logic": 50, "../internals/export": 74, "../internals/is-pure": 105, "../internals/not-a-regexp": 125, "../internals/object-get-own-property-descriptor": 134, "../internals/require-object-coercible": 160, "../internals/to-length": 184 }], 338: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var createHTML = require('../internals/create-html'); var forcedStringHTMLMethod = require('../internals/string-html-forced'); // `String.prototype.fixed` method // https://tc39.es/ecma262/#sec-string.prototype.fixed $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('fixed') }, { fixed: function fixed() { return createHTML(this, 'tt', '', ''); } }); }, { "../internals/create-html": 52, "../internals/export": 74, "../internals/string-html-forced": 170 }], 339: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var createHTML = require('../internals/create-html'); var forcedStringHTMLMethod = require('../internals/string-html-forced'); // `String.prototype.fontcolor` method // https://tc39.es/ecma262/#sec-string.prototype.fontcolor $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('fontcolor') }, { fontcolor: function fontcolor(color) { return createHTML(this, 'font', 'color', color); } }); }, { "../internals/create-html": 52, "../internals/export": 74, "../internals/string-html-forced": 170 }], 340: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var createHTML = require('../internals/create-html'); var forcedStringHTMLMethod = require('../internals/string-html-forced'); // `String.prototype.fontsize` method // https://tc39.es/ecma262/#sec-string.prototype.fontsize $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('fontsize') }, { fontsize: function fontsize(size) { return createHTML(this, 'font', 'size', size); } }); }, { "../internals/create-html": 52, "../internals/export": 74, "../internals/string-html-forced": 170 }], 341: [function (require, module, exports) { var $ = require('../internals/export'); var toAbsoluteIndex = require('../internals/to-absolute-index'); var fromCharCode = String.fromCharCode; // eslint-disable-next-line es/no-string-fromcodepoint -- required for testing var $fromCodePoint = String.fromCodePoint; // length should be 1, old FF problem var INCORRECT_LENGTH = !!$fromCodePoint && $fromCodePoint.length != 1; // `String.fromCodePoint` method // https://tc39.es/ecma262/#sec-string.fromcodepoint $({ target: 'String', stat: true, forced: INCORRECT_LENGTH }, { // eslint-disable-next-line no-unused-vars -- required for `.length` fromCodePoint: function fromCodePoint(x) { var elements = []; var length = arguments.length; var i = 0; var code; while (length > i) { code = +arguments[i++]; if (toAbsoluteIndex(code, 0x10FFFF) !== code) throw RangeError(code + ' is not a valid code point'); elements.push(code < 0x10000 ? fromCharCode(code) : fromCharCode(((code -= 0x10000) >> 10) + 0xD800, code % 0x400 + 0xDC00)); } return elements.join(''); } }); }, { "../internals/export": 74, "../internals/to-absolute-index": 180 }], 342: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var notARegExp = require('../internals/not-a-regexp'); var requireObjectCoercible = require('../internals/require-object-coercible'); var correctIsRegExpLogic = require('../internals/correct-is-regexp-logic'); // `String.prototype.includes` method // https://tc39.es/ecma262/#sec-string.prototype.includes $({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, { includes: function includes(searchString /* , position = 0 */ ) { return !!~String(requireObjectCoercible(this)).indexOf(notARegExp(searchString), arguments.length > 1 ? arguments[1] : undefined); } }); }, { "../internals/correct-is-regexp-logic": 50, "../internals/export": 74, "../internals/not-a-regexp": 125, "../internals/require-object-coercible": 160 }], 343: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var createHTML = require('../internals/create-html'); var forcedStringHTMLMethod = require('../internals/string-html-forced'); // `String.prototype.italics` method // https://tc39.es/ecma262/#sec-string.prototype.italics $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('italics') }, { italics: function italics() { return createHTML(this, 'i', '', ''); } }); }, { "../internals/create-html": 52, "../internals/export": 74, "../internals/string-html-forced": 170 }], 344: [function (require, module, exports) { 'use strict'; var charAt = require('../internals/string-multibyte').charAt; var InternalStateModule = require('../internals/internal-state'); var defineIterator = require('../internals/define-iterator'); var STRING_ITERATOR = 'String Iterator'; var setInternalState = InternalStateModule.set; var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR); // `String.prototype[@@iterator]` method // https://tc39.es/ecma262/#sec-string.prototype-@@iterator defineIterator(String, 'String', function (iterated) { setInternalState(this, { type: STRING_ITERATOR, string: String(iterated), index: 0 }); // `%StringIteratorPrototype%.next` method // https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next }, function next() { var state = getInternalState(this); var string = state.string; var index = state.index; var point; if (index >= string.length) return { value: undefined, done: true }; point = charAt(string, index); state.index += point.length; return { value: point, done: false }; }); }, { "../internals/define-iterator": 59, "../internals/internal-state": 99, "../internals/string-multibyte": 171 }], 345: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var createHTML = require('../internals/create-html'); var forcedStringHTMLMethod = require('../internals/string-html-forced'); // `String.prototype.link` method // https://tc39.es/ecma262/#sec-string.prototype.link $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('link') }, { link: function link(url) { return createHTML(this, 'a', 'href', url); } }); }, { "../internals/create-html": 52, "../internals/export": 74, "../internals/string-html-forced": 170 }], 346: [function (require, module, exports) { 'use strict'; /* eslint-disable es/no-string-prototype-matchall -- safe */ var $ = require('../internals/export'); var createIteratorConstructor = require('../internals/create-iterator-constructor'); var requireObjectCoercible = require('../internals/require-object-coercible'); var toLength = require('../internals/to-length'); var aFunction = require('../internals/a-function'); var anObject = require('../internals/an-object'); var classof = require('../internals/classof-raw'); var isRegExp = require('../internals/is-regexp'); var getRegExpFlags = require('../internals/regexp-flags'); var createNonEnumerableProperty = require('../internals/create-non-enumerable-property'); var fails = require('../internals/fails'); var wellKnownSymbol = require('../internals/well-known-symbol'); var speciesConstructor = require('../internals/species-constructor'); var advanceStringIndex = require('../internals/advance-string-index'); var InternalStateModule = require('../internals/internal-state'); var IS_PURE = require('../internals/is-pure'); var MATCH_ALL = wellKnownSymbol('matchAll'); var REGEXP_STRING = 'RegExp String'; var REGEXP_STRING_ITERATOR = REGEXP_STRING + ' Iterator'; var setInternalState = InternalStateModule.set; var getInternalState = InternalStateModule.getterFor(REGEXP_STRING_ITERATOR); var RegExpPrototype = RegExp.prototype; var regExpBuiltinExec = RegExpPrototype.exec; var nativeMatchAll = ''.matchAll; var WORKS_WITH_NON_GLOBAL_REGEX = !!nativeMatchAll && !fails(function () { 'a'.matchAll(/./); }); var regExpExec = function regExpExec(R, S) { var exec = R.exec; var result; if (typeof exec == 'function') { result = exec.call(R, S); if (typeof result != 'object') throw TypeError('Incorrect exec result'); return result; } return regExpBuiltinExec.call(R, S); }; // eslint-disable-next-line max-len -- ignore var $RegExpStringIterator = createIteratorConstructor(function RegExpStringIterator(regexp, string, global, fullUnicode) { setInternalState(this, { type: REGEXP_STRING_ITERATOR, regexp: regexp, string: string, global: global, unicode: fullUnicode, done: false }); }, REGEXP_STRING, function next() { var state = getInternalState(this); if (state.done) return { value: undefined, done: true }; var R = state.regexp; var S = state.string; var match = regExpExec(R, S); if (match === null) return { value: undefined, done: state.done = true }; if (state.global) { if (String(match[0]) == '') R.lastIndex = advanceStringIndex(S, toLength(R.lastIndex), state.unicode); return { value: match, done: false }; } state.done = true; return { value: match, done: false }; }); var $matchAll = function $matchAll(string) { var R = anObject(this); var S = String(string); var C, flagsValue, flags, matcher, global, fullUnicode; C = speciesConstructor(R, RegExp); flagsValue = R.flags; if (flagsValue === undefined && R instanceof RegExp && !('flags' in RegExpPrototype)) { flagsValue = getRegExpFlags.call(R); } flags = flagsValue === undefined ? '' : String(flagsValue); matcher = new C(C === RegExp ? R.source : R, flags); global = !!~flags.indexOf('g'); fullUnicode = !!~flags.indexOf('u'); matcher.lastIndex = toLength(R.lastIndex); return new $RegExpStringIterator(matcher, S, global, fullUnicode); }; // `String.prototype.matchAll` method // https://tc39.es/ecma262/#sec-string.prototype.matchall $({ target: 'String', proto: true, forced: WORKS_WITH_NON_GLOBAL_REGEX }, { matchAll: function matchAll(regexp) { var O = requireObjectCoercible(this); var flags, S, matcher, rx; if (regexp != null) { if (isRegExp(regexp)) { flags = String(requireObjectCoercible('flags' in RegExpPrototype ? regexp.flags : getRegExpFlags.call(regexp))); if (!~flags.indexOf('g')) throw TypeError('`.matchAll` does not allow non-global regexes'); } if (WORKS_WITH_NON_GLOBAL_REGEX) return nativeMatchAll.apply(O, arguments); matcher = regexp[MATCH_ALL]; if (matcher === undefined && IS_PURE && classof(regexp) == 'RegExp') matcher = $matchAll; if (matcher != null) return aFunction(matcher).call(regexp, O); } else if (WORKS_WITH_NON_GLOBAL_REGEX) return nativeMatchAll.apply(O, arguments); S = String(O); rx = new RegExp(regexp, 'g'); return IS_PURE ? $matchAll.call(rx, S) : rx[MATCH_ALL](S); } }); IS_PURE || MATCH_ALL in RegExpPrototype || createNonEnumerableProperty(RegExpPrototype, MATCH_ALL, $matchAll); }, { "../internals/a-function": 11, "../internals/advance-string-index": 14, "../internals/an-object": 16, "../internals/classof-raw": 39, "../internals/create-iterator-constructor": 53, "../internals/create-non-enumerable-property": 54, "../internals/export": 74, "../internals/fails": 75, "../internals/internal-state": 99, "../internals/is-pure": 105, "../internals/is-regexp": 106, "../internals/regexp-flags": 156, "../internals/require-object-coercible": 160, "../internals/species-constructor": 169, "../internals/to-length": 184, "../internals/well-known-symbol": 197 }], 347: [function (require, module, exports) { 'use strict'; var fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic'); var anObject = require('../internals/an-object'); var toLength = require('../internals/to-length'); var requireObjectCoercible = require('../internals/require-object-coercible'); var advanceStringIndex = require('../internals/advance-string-index'); var regExpExec = require('../internals/regexp-exec-abstract'); // @@match logic fixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNative) { return [// `String.prototype.match` method // https://tc39.es/ecma262/#sec-string.prototype.match function match(regexp) { var O = requireObjectCoercible(this); var matcher = regexp == undefined ? undefined : regexp[MATCH]; return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); }, // `RegExp.prototype[@@match]` method // https://tc39.es/ecma262/#sec-regexp.prototype-@@match function (string) { var res = maybeCallNative(nativeMatch, this, string); if (res.done) return res.value; var rx = anObject(this); var S = String(string); if (!rx.global) return regExpExec(rx, S); var fullUnicode = rx.unicode; rx.lastIndex = 0; var A = []; var n = 0; var result; while ((result = regExpExec(rx, S)) !== null) { var matchStr = String(result[0]); A[n] = matchStr; if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); n++; } return n === 0 ? null : A; }]; }); }, { "../internals/advance-string-index": 14, "../internals/an-object": 16, "../internals/fix-regexp-well-known-symbol-logic": 76, "../internals/regexp-exec-abstract": 154, "../internals/require-object-coercible": 160, "../internals/to-length": 184 }], 348: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var $padEnd = require('../internals/string-pad').end; var WEBKIT_BUG = require('../internals/string-pad-webkit-bug'); // `String.prototype.padEnd` method // https://tc39.es/ecma262/#sec-string.prototype.padend $({ target: 'String', proto: true, forced: WEBKIT_BUG }, { padEnd: function padEnd(maxLength /* , fillString = ' ' */ ) { return $padEnd(this, maxLength, arguments.length > 1 ? arguments[1] : undefined); } }); }, { "../internals/export": 74, "../internals/string-pad": 173, "../internals/string-pad-webkit-bug": 172 }], 349: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var $padStart = require('../internals/string-pad').start; var WEBKIT_BUG = require('../internals/string-pad-webkit-bug'); // `String.prototype.padStart` method // https://tc39.es/ecma262/#sec-string.prototype.padstart $({ target: 'String', proto: true, forced: WEBKIT_BUG }, { padStart: function padStart(maxLength /* , fillString = ' ' */ ) { return $padStart(this, maxLength, arguments.length > 1 ? arguments[1] : undefined); } }); }, { "../internals/export": 74, "../internals/string-pad": 173, "../internals/string-pad-webkit-bug": 172 }], 350: [function (require, module, exports) { var $ = require('../internals/export'); var toIndexedObject = require('../internals/to-indexed-object'); var toLength = require('../internals/to-length'); // `String.raw` method // https://tc39.es/ecma262/#sec-string.raw $({ target: 'String', stat: true }, { raw: function raw(template) { var rawTemplate = toIndexedObject(template.raw); var literalSegments = toLength(rawTemplate.length); var argumentsLength = arguments.length; var elements = []; var i = 0; while (literalSegments > i) { elements.push(String(rawTemplate[i++])); if (i < argumentsLength) elements.push(String(arguments[i])); } return elements.join(''); } }); }, { "../internals/export": 74, "../internals/to-indexed-object": 182, "../internals/to-length": 184 }], 351: [function (require, module, exports) { var $ = require('../internals/export'); var repeat = require('../internals/string-repeat'); // `String.prototype.repeat` method // https://tc39.es/ecma262/#sec-string.prototype.repeat $({ target: 'String', proto: true }, { repeat: repeat }); }, { "../internals/export": 74, "../internals/string-repeat": 175 }], 352: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var requireObjectCoercible = require('../internals/require-object-coercible'); var isRegExp = require('../internals/is-regexp'); var getRegExpFlags = require('../internals/regexp-flags'); var getSubstitution = require('../internals/get-substitution'); var wellKnownSymbol = require('../internals/well-known-symbol'); var IS_PURE = require('../internals/is-pure'); var REPLACE = wellKnownSymbol('replace'); var RegExpPrototype = RegExp.prototype; var max = Math.max; var stringIndexOf = function stringIndexOf(string, searchValue, fromIndex) { if (fromIndex > string.length) return -1; if (searchValue === '') return fromIndex; return string.indexOf(searchValue, fromIndex); }; // `String.prototype.replaceAll` method // https://tc39.es/ecma262/#sec-string.prototype.replaceall $({ target: 'String', proto: true }, { replaceAll: function replaceAll(searchValue, replaceValue) { var O = requireObjectCoercible(this); var IS_REG_EXP, flags, replacer, string, searchString, functionalReplace, searchLength, advanceBy, replacement; var position = 0; var endOfLastMatch = 0; var result = ''; if (searchValue != null) { IS_REG_EXP = isRegExp(searchValue); if (IS_REG_EXP) { flags = String(requireObjectCoercible('flags' in RegExpPrototype ? searchValue.flags : getRegExpFlags.call(searchValue))); if (!~flags.indexOf('g')) throw TypeError('`.replaceAll` does not allow non-global regexes'); } replacer = searchValue[REPLACE]; if (replacer !== undefined) { return replacer.call(searchValue, O, replaceValue); } else if (IS_PURE && IS_REG_EXP) { return String(O).replace(searchValue, replaceValue); } } string = String(O); searchString = String(searchValue); functionalReplace = typeof replaceValue === 'function'; if (!functionalReplace) replaceValue = String(replaceValue); searchLength = searchString.length; advanceBy = max(1, searchLength); position = stringIndexOf(string, searchString, 0); while (position !== -1) { if (functionalReplace) { replacement = String(replaceValue(searchString, position, string)); } else { replacement = getSubstitution(searchString, string, position, [], undefined, replaceValue); } result += string.slice(endOfLastMatch, position) + replacement; endOfLastMatch = position + searchLength; position = stringIndexOf(string, searchString, position + advanceBy); } if (endOfLastMatch < string.length) { result += string.slice(endOfLastMatch); } return result; } }); }, { "../internals/export": 74, "../internals/get-substitution": 87, "../internals/is-pure": 105, "../internals/is-regexp": 106, "../internals/regexp-flags": 156, "../internals/require-object-coercible": 160, "../internals/well-known-symbol": 197 }], 353: [function (require, module, exports) { 'use strict'; var fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic'); var fails = require('../internals/fails'); var anObject = require('../internals/an-object'); var toLength = require('../internals/to-length'); var toInteger = require('../internals/to-integer'); var requireObjectCoercible = require('../internals/require-object-coercible'); var advanceStringIndex = require('../internals/advance-string-index'); var getSubstitution = require('../internals/get-substitution'); var regExpExec = require('../internals/regexp-exec-abstract'); var wellKnownSymbol = require('../internals/well-known-symbol'); var REPLACE = wellKnownSymbol('replace'); var max = Math.max; var min = Math.min; var maybeToString = function maybeToString(it) { return it === undefined ? it : String(it); }; // IE <= 11 replaces $0 with the whole match, as if it was $& // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0 var REPLACE_KEEPS_$0 = function () { // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing return 'a'.replace(/./, '$0') === '$0'; }(); // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = function () { if (/./[REPLACE]) { return /./[REPLACE]('a', '$0') === ''; } return false; }(); var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { var re = /./; re.exec = function () { var result = []; result.groups = { a: '7' }; return result; }; return ''.replace(re, '$') !== '7'; }); // @@replace logic fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) { var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0'; return [// `String.prototype.replace` method // https://tc39.es/ecma262/#sec-string.prototype.replace function replace(searchValue, replaceValue) { var O = requireObjectCoercible(this); var replacer = searchValue == undefined ? undefined : searchValue[REPLACE]; return replacer !== undefined ? replacer.call(searchValue, O, replaceValue) : nativeReplace.call(String(O), searchValue, replaceValue); }, // `RegExp.prototype[@@replace]` method // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace function (string, replaceValue) { if (typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1 && replaceValue.indexOf('$<') === -1) { var res = maybeCallNative(nativeReplace, this, string, replaceValue); if (res.done) return res.value; } var rx = anObject(this); var S = String(string); var functionalReplace = typeof replaceValue === 'function'; if (!functionalReplace) replaceValue = String(replaceValue); var global = rx.global; if (global) { var fullUnicode = rx.unicode; rx.lastIndex = 0; } var results = []; while (true) { var result = regExpExec(rx, S); if (result === null) break; results.push(result); if (!global) break; var matchStr = String(result[0]); if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); } var accumulatedResult = ''; var nextSourcePosition = 0; for (var i = 0; i < results.length; i++) { result = results[i]; var matched = String(result[0]); var position = max(min(toInteger(result.index), S.length), 0); var captures = []; // NOTE: This is equivalent to // captures = result.slice(1).map(maybeToString) // but for some reason `nativeSlice.call(result, 1, result.length)` (called in // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. for (var j = 1; j < result.length; j++) { captures.push(maybeToString(result[j])); } var namedCaptures = result.groups; if (functionalReplace) { var replacerArgs = [matched].concat(captures, position, S); if (namedCaptures !== undefined) replacerArgs.push(namedCaptures); var replacement = String(replaceValue.apply(undefined, replacerArgs)); } else { replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); } if (position >= nextSourcePosition) { accumulatedResult += S.slice(nextSourcePosition, position) + replacement; nextSourcePosition = position + matched.length; } } return accumulatedResult + S.slice(nextSourcePosition); }]; }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE); }, { "../internals/advance-string-index": 14, "../internals/an-object": 16, "../internals/fails": 75, "../internals/fix-regexp-well-known-symbol-logic": 76, "../internals/get-substitution": 87, "../internals/regexp-exec-abstract": 154, "../internals/require-object-coercible": 160, "../internals/to-integer": 183, "../internals/to-length": 184, "../internals/well-known-symbol": 197 }], 354: [function (require, module, exports) { 'use strict'; var fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic'); var anObject = require('../internals/an-object'); var requireObjectCoercible = require('../internals/require-object-coercible'); var sameValue = require('../internals/same-value'); var regExpExec = require('../internals/regexp-exec-abstract'); // @@search logic fixRegExpWellKnownSymbolLogic('search', function (SEARCH, nativeSearch, maybeCallNative) { return [// `String.prototype.search` method // https://tc39.es/ecma262/#sec-string.prototype.search function search(regexp) { var O = requireObjectCoercible(this); var searcher = regexp == undefined ? undefined : regexp[SEARCH]; return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); }, // `RegExp.prototype[@@search]` method // https://tc39.es/ecma262/#sec-regexp.prototype-@@search function (string) { var res = maybeCallNative(nativeSearch, this, string); if (res.done) return res.value; var rx = anObject(this); var S = String(string); var previousLastIndex = rx.lastIndex; if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0; var result = regExpExec(rx, S); if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex; return result === null ? -1 : result.index; }]; }); }, { "../internals/an-object": 16, "../internals/fix-regexp-well-known-symbol-logic": 76, "../internals/regexp-exec-abstract": 154, "../internals/require-object-coercible": 160, "../internals/same-value": 162 }], 355: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var createHTML = require('../internals/create-html'); var forcedStringHTMLMethod = require('../internals/string-html-forced'); // `String.prototype.small` method // https://tc39.es/ecma262/#sec-string.prototype.small $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('small') }, { small: function small() { return createHTML(this, 'small', '', ''); } }); }, { "../internals/create-html": 52, "../internals/export": 74, "../internals/string-html-forced": 170 }], 356: [function (require, module, exports) { 'use strict'; var fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic'); var isRegExp = require('../internals/is-regexp'); var anObject = require('../internals/an-object'); var requireObjectCoercible = require('../internals/require-object-coercible'); var speciesConstructor = require('../internals/species-constructor'); var advanceStringIndex = require('../internals/advance-string-index'); var toLength = require('../internals/to-length'); var callRegExpExec = require('../internals/regexp-exec-abstract'); var regexpExec = require('../internals/regexp-exec'); var stickyHelpers = require('../internals/regexp-sticky-helpers'); var fails = require('../internals/fails'); var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y; var arrayPush = [].push; var min = Math.min; var MAX_UINT32 = 0xFFFFFFFF; // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec // Weex JS has frozen built-in prototypes, so use try / catch wrapper var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () { // eslint-disable-next-line regexp/no-empty-group -- required for testing var re = /(?:)/; var originalExec = re.exec; re.exec = function () { return originalExec.apply(this, arguments); }; var result = 'ab'.split(re); return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b'; }); // @@split logic fixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNative) { var internalSplit; if ('abbc'.split(/(b)*/)[1] == 'c' || // eslint-disable-next-line regexp/no-empty-group -- required for testing 'test'.split(/(?:)/, -1).length != 4 || 'ab'.split(/(?:ab)*/).length != 2 || '.'.split(/(.?)(.?)/).length != 4 || // eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing '.'.split(/()()/).length > 1 || ''.split(/.?/).length) { // based on es5-shim implementation, need to rework it internalSplit = function internalSplit(separator, limit) { var string = String(requireObjectCoercible(this)); var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; if (lim === 0) return []; if (separator === undefined) return [string]; // If `separator` is not a regex, use native split if (!isRegExp(separator)) { return nativeSplit.call(string, separator, lim); } var output = []; var flags = (separator.ignoreCase ? 'i' : '') + (separator.multiline ? 'm' : '') + (separator.unicode ? 'u' : '') + (separator.sticky ? 'y' : ''); var lastLastIndex = 0; // Make `global` and avoid `lastIndex` issues by working with a copy var separatorCopy = new RegExp(separator.source, flags + 'g'); var match, lastIndex, lastLength; while (match = regexpExec.call(separatorCopy, string)) { lastIndex = separatorCopy.lastIndex; if (lastIndex > lastLastIndex) { output.push(string.slice(lastLastIndex, match.index)); if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1)); lastLength = match[0].length; lastLastIndex = lastIndex; if (output.length >= lim) break; } if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop } if (lastLastIndex === string.length) { if (lastLength || !separatorCopy.test('')) output.push(''); } else output.push(string.slice(lastLastIndex)); return output.length > lim ? output.slice(0, lim) : output; }; // Chakra, V8 } else if ('0'.split(undefined, 0).length) { internalSplit = function internalSplit(separator, limit) { return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit); }; } else internalSplit = nativeSplit; return [// `String.prototype.split` method // https://tc39.es/ecma262/#sec-string.prototype.split function split(separator, limit) { var O = requireObjectCoercible(this); var splitter = separator == undefined ? undefined : separator[SPLIT]; return splitter !== undefined ? splitter.call(separator, O, limit) : internalSplit.call(String(O), separator, limit); }, // `RegExp.prototype[@@split]` method // https://tc39.es/ecma262/#sec-regexp.prototype-@@split // // NOTE: This cannot be properly polyfilled in engines that don't support // the 'y' flag. function (string, limit) { var res = maybeCallNative(internalSplit, this, string, limit, internalSplit !== nativeSplit); if (res.done) return res.value; var rx = anObject(this); var S = String(string); var C = speciesConstructor(rx, RegExp); var unicodeMatching = rx.unicode; var flags = (rx.ignoreCase ? 'i' : '') + (rx.multiline ? 'm' : '') + (rx.unicode ? 'u' : '') + (UNSUPPORTED_Y ? 'g' : 'y'); // ^(? + rx + ) is needed, in combination with some S slicing, to // simulate the 'y' flag. var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags); var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; if (lim === 0) return []; if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : []; var p = 0; var q = 0; var A = []; while (q < S.length) { splitter.lastIndex = UNSUPPORTED_Y ? 0 : q; var z = callRegExpExec(splitter, UNSUPPORTED_Y ? S.slice(q) : S); var e; if (z === null || (e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p) { q = advanceStringIndex(S, q, unicodeMatching); } else { A.push(S.slice(p, q)); if (A.length === lim) return A; for (var i = 1; i <= z.length - 1; i++) { A.push(z[i]); if (A.length === lim) return A; } q = p = e; } } A.push(S.slice(p)); return A; }]; }, !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y); }, { "../internals/advance-string-index": 14, "../internals/an-object": 16, "../internals/fails": 75, "../internals/fix-regexp-well-known-symbol-logic": 76, "../internals/is-regexp": 106, "../internals/regexp-exec": 155, "../internals/regexp-exec-abstract": 154, "../internals/regexp-sticky-helpers": 157, "../internals/require-object-coercible": 160, "../internals/species-constructor": 169, "../internals/to-length": 184 }], 357: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f; var toLength = require('../internals/to-length'); var notARegExp = require('../internals/not-a-regexp'); var requireObjectCoercible = require('../internals/require-object-coercible'); var correctIsRegExpLogic = require('../internals/correct-is-regexp-logic'); var IS_PURE = require('../internals/is-pure'); // eslint-disable-next-line es/no-string-prototype-startswith -- safe var $startsWith = ''.startsWith; var min = Math.min; var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith'); // https://github.com/zloirock/core-js/pull/702 var MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () { var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith'); return descriptor && !descriptor.writable; }(); // `String.prototype.startsWith` method // https://tc39.es/ecma262/#sec-string.prototype.startswith $({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, { startsWith: function startsWith(searchString /* , position = 0 */ ) { var that = String(requireObjectCoercible(this)); notARegExp(searchString); var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length)); var search = String(searchString); return $startsWith ? $startsWith.call(that, search, index) : that.slice(index, index + search.length) === search; } }); }, { "../internals/correct-is-regexp-logic": 50, "../internals/export": 74, "../internals/is-pure": 105, "../internals/not-a-regexp": 125, "../internals/object-get-own-property-descriptor": 134, "../internals/require-object-coercible": 160, "../internals/to-length": 184 }], 358: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var createHTML = require('../internals/create-html'); var forcedStringHTMLMethod = require('../internals/string-html-forced'); // `String.prototype.strike` method // https://tc39.es/ecma262/#sec-string.prototype.strike $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('strike') }, { strike: function strike() { return createHTML(this, 'strike', '', ''); } }); }, { "../internals/create-html": 52, "../internals/export": 74, "../internals/string-html-forced": 170 }], 359: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var createHTML = require('../internals/create-html'); var forcedStringHTMLMethod = require('../internals/string-html-forced'); // `String.prototype.sub` method // https://tc39.es/ecma262/#sec-string.prototype.sub $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('sub') }, { sub: function sub() { return createHTML(this, 'sub', '', ''); } }); }, { "../internals/create-html": 52, "../internals/export": 74, "../internals/string-html-forced": 170 }], 360: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var requireObjectCoercible = require('../internals/require-object-coercible'); var toInteger = require('../internals/to-integer'); var slice = ''.slice; var max = Math.max; var min = Math.min; // `String.prototype.substr` method // https://tc39.es/ecma262/#sec-string.prototype.substr $({ target: 'String', proto: true }, { substr: function substr(start, length) { var that = String(requireObjectCoercible(this)); var size = that.length; var intStart = toInteger(start); var intLength, intEnd; if (intStart === Infinity) intStart = 0; if (intStart < 0) intStart = max(size + intStart, 0); intLength = length === undefined ? size : toInteger(length); if (intLength <= 0 || intLength === Infinity) return ''; intEnd = min(intStart + intLength, size); return intStart >= intEnd ? '' : slice.call(that, intStart, intEnd); } }); }, { "../internals/export": 74, "../internals/require-object-coercible": 160, "../internals/to-integer": 183 }], 361: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var createHTML = require('../internals/create-html'); var forcedStringHTMLMethod = require('../internals/string-html-forced'); // `String.prototype.sup` method // https://tc39.es/ecma262/#sec-string.prototype.sup $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('sup') }, { sup: function sup() { return createHTML(this, 'sup', '', ''); } }); }, { "../internals/create-html": 52, "../internals/export": 74, "../internals/string-html-forced": 170 }], 362: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var $trimEnd = require('../internals/string-trim').end; var forcedStringTrimMethod = require('../internals/string-trim-forced'); var FORCED = forcedStringTrimMethod('trimEnd'); var trimEnd = FORCED ? function trimEnd() { return $trimEnd(this); // eslint-disable-next-line es/no-string-prototype-trimstart-trimend -- safe } : ''.trimEnd; // `String.prototype.{ trimEnd, trimRight }` methods // https://tc39.es/ecma262/#sec-string.prototype.trimend // https://tc39.es/ecma262/#String.prototype.trimright $({ target: 'String', proto: true, forced: FORCED }, { trimEnd: trimEnd, trimRight: trimEnd }); }, { "../internals/export": 74, "../internals/string-trim": 177, "../internals/string-trim-forced": 176 }], 363: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var $trimStart = require('../internals/string-trim').start; var forcedStringTrimMethod = require('../internals/string-trim-forced'); var FORCED = forcedStringTrimMethod('trimStart'); var trimStart = FORCED ? function trimStart() { return $trimStart(this); // eslint-disable-next-line es/no-string-prototype-trimstart-trimend -- safe } : ''.trimStart; // `String.prototype.{ trimStart, trimLeft }` methods // https://tc39.es/ecma262/#sec-string.prototype.trimstart // https://tc39.es/ecma262/#String.prototype.trimleft $({ target: 'String', proto: true, forced: FORCED }, { trimStart: trimStart, trimLeft: trimStart }); }, { "../internals/export": 74, "../internals/string-trim": 177, "../internals/string-trim-forced": 176 }], 364: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var $trim = require('../internals/string-trim').trim; var forcedStringTrimMethod = require('../internals/string-trim-forced'); // `String.prototype.trim` method // https://tc39.es/ecma262/#sec-string.prototype.trim $({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, { trim: function trim() { return $trim(this); } }); }, { "../internals/export": 74, "../internals/string-trim": 177, "../internals/string-trim-forced": 176 }], 365: [function (require, module, exports) { var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); // `Symbol.asyncIterator` well-known symbol // https://tc39.es/ecma262/#sec-symbol.asynciterator defineWellKnownSymbol('asyncIterator'); }, { "../internals/define-well-known-symbol": 60 }], 366: [function (require, module, exports) { // `Symbol.prototype.description` getter // https://tc39.es/ecma262/#sec-symbol.prototype.description 'use strict'; var $ = require('../internals/export'); var DESCRIPTORS = require('../internals/descriptors'); var global = require('../internals/global'); var has = require('../internals/has'); var isObject = require('../internals/is-object'); var defineProperty = require('../internals/object-define-property').f; var copyConstructorProperties = require('../internals/copy-constructor-properties'); var NativeSymbol = global.Symbol; if (DESCRIPTORS && typeof NativeSymbol == 'function' && (!('description' in NativeSymbol.prototype) || // Safari 12 bug NativeSymbol().description !== undefined)) { var EmptyStringDescriptionStore = {}; // wrap Symbol constructor for correct work with undefined description var SymbolWrapper = function Symbol() { var description = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]); var result = this instanceof SymbolWrapper ? new NativeSymbol(description) // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)' : description === undefined ? NativeSymbol() : NativeSymbol(description); if (description === '') EmptyStringDescriptionStore[result] = true; return result; }; copyConstructorProperties(SymbolWrapper, NativeSymbol); var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype; symbolPrototype.constructor = SymbolWrapper; var symbolToString = symbolPrototype.toString; var native = String(NativeSymbol('test')) == 'Symbol(test)'; var regexp = /^Symbol\((.*)\)[^)]+$/; defineProperty(symbolPrototype, 'description', { configurable: true, get: function description() { var symbol = isObject(this) ? this.valueOf() : this; var string = symbolToString.call(symbol); if (has(EmptyStringDescriptionStore, symbol)) return ''; var desc = native ? string.slice(7, -1) : string.replace(regexp, '$1'); return desc === '' ? undefined : desc; } }); $({ global: true, forced: true }, { Symbol: SymbolWrapper }); } }, { "../internals/copy-constructor-properties": 49, "../internals/descriptors": 61, "../internals/export": 74, "../internals/global": 88, "../internals/has": 89, "../internals/is-object": 104, "../internals/object-define-property": 133 }], 367: [function (require, module, exports) { var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); // `Symbol.hasInstance` well-known symbol // https://tc39.es/ecma262/#sec-symbol.hasinstance defineWellKnownSymbol('hasInstance'); }, { "../internals/define-well-known-symbol": 60 }], 368: [function (require, module, exports) { var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); // `Symbol.isConcatSpreadable` well-known symbol // https://tc39.es/ecma262/#sec-symbol.isconcatspreadable defineWellKnownSymbol('isConcatSpreadable'); }, { "../internals/define-well-known-symbol": 60 }], 369: [function (require, module, exports) { var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); // `Symbol.iterator` well-known symbol // https://tc39.es/ecma262/#sec-symbol.iterator defineWellKnownSymbol('iterator'); }, { "../internals/define-well-known-symbol": 60 }], 370: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var global = require('../internals/global'); var getBuiltIn = require('../internals/get-built-in'); var IS_PURE = require('../internals/is-pure'); var DESCRIPTORS = require('../internals/descriptors'); var NATIVE_SYMBOL = require('../internals/native-symbol'); var USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid'); var fails = require('../internals/fails'); var has = require('../internals/has'); var isArray = require('../internals/is-array'); var isObject = require('../internals/is-object'); var anObject = require('../internals/an-object'); var toObject = require('../internals/to-object'); var toIndexedObject = require('../internals/to-indexed-object'); var toPrimitive = require('../internals/to-primitive'); var createPropertyDescriptor = require('../internals/create-property-descriptor'); var nativeObjectCreate = require('../internals/object-create'); var objectKeys = require('../internals/object-keys'); var getOwnPropertyNamesModule = require('../internals/object-get-own-property-names'); var getOwnPropertyNamesExternal = require('../internals/object-get-own-property-names-external'); var getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols'); var getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor'); var definePropertyModule = require('../internals/object-define-property'); var propertyIsEnumerableModule = require('../internals/object-property-is-enumerable'); var createNonEnumerableProperty = require('../internals/create-non-enumerable-property'); var redefine = require('../internals/redefine'); var shared = require('../internals/shared'); var sharedKey = require('../internals/shared-key'); var hiddenKeys = require('../internals/hidden-keys'); var uid = require('../internals/uid'); var wellKnownSymbol = require('../internals/well-known-symbol'); var wrappedWellKnownSymbolModule = require('../internals/well-known-symbol-wrapped'); var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); var setToStringTag = require('../internals/set-to-string-tag'); var InternalStateModule = require('../internals/internal-state'); var $forEach = require('../internals/array-iteration').forEach; var HIDDEN = sharedKey('hidden'); var SYMBOL = 'Symbol'; var PROTOTYPE = 'prototype'; var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); var setInternalState = InternalStateModule.set; var getInternalState = InternalStateModule.getterFor(SYMBOL); var ObjectPrototype = Object[PROTOTYPE]; var $Symbol = global.Symbol; var $stringify = getBuiltIn('JSON', 'stringify'); var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; var nativeDefineProperty = definePropertyModule.f; var nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f; var nativePropertyIsEnumerable = propertyIsEnumerableModule.f; var AllSymbols = shared('symbols'); var ObjectPrototypeSymbols = shared('op-symbols'); var StringToSymbolRegistry = shared('string-to-symbol-registry'); var SymbolToStringRegistry = shared('symbol-to-string-registry'); var WellKnownSymbolsStore = shared('wks'); var QObject = global.QObject; // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 var USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 var setSymbolDescriptor = DESCRIPTORS && fails(function () { return nativeObjectCreate(nativeDefineProperty({}, 'a', { get: function get() { return nativeDefineProperty(this, 'a', { value: 7 }).a; } })).a != 7; }) ? function (O, P, Attributes) { var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P); if (ObjectPrototypeDescriptor) delete ObjectPrototype[P]; nativeDefineProperty(O, P, Attributes); if (ObjectPrototypeDescriptor && O !== ObjectPrototype) { nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor); } } : nativeDefineProperty; var wrap = function wrap(tag, description) { var symbol = AllSymbols[tag] = nativeObjectCreate($Symbol[PROTOTYPE]); setInternalState(symbol, { type: SYMBOL, tag: tag, description: description }); if (!DESCRIPTORS) symbol.description = description; return symbol; }; var isSymbol = USE_SYMBOL_AS_UID ? function (it) { return typeof it == 'symbol'; } : function (it) { return Object(it) instanceof $Symbol; }; var $defineProperty = function defineProperty(O, P, Attributes) { if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes); anObject(O); var key = toPrimitive(P, true); anObject(Attributes); if (has(AllSymbols, key)) { if (!Attributes.enumerable) { if (!has(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {})); O[HIDDEN][key] = true; } else { if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false; Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) }); } return setSymbolDescriptor(O, key, Attributes); } return nativeDefineProperty(O, key, Attributes); }; var $defineProperties = function defineProperties(O, Properties) { anObject(O); var properties = toIndexedObject(Properties); var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties)); $forEach(keys, function (key) { if (!DESCRIPTORS || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]); }); return O; }; var $create = function create(O, Properties) { return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties); }; var $propertyIsEnumerable = function propertyIsEnumerable(V) { var P = toPrimitive(V, true); var enumerable = nativePropertyIsEnumerable.call(this, P); if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false; return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true; }; var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) { var it = toIndexedObject(O); var key = toPrimitive(P, true); if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return; var descriptor = nativeGetOwnPropertyDescriptor(it, key); if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) { descriptor.enumerable = true; } return descriptor; }; var $getOwnPropertyNames = function getOwnPropertyNames(O) { var names = nativeGetOwnPropertyNames(toIndexedObject(O)); var result = []; $forEach(names, function (key) { if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key); }); return result; }; var $getOwnPropertySymbols = function getOwnPropertySymbols(O) { var IS_OBJECT_PROTOTYPE = O === ObjectPrototype; var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O)); var result = []; $forEach(names, function (key) { if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) { result.push(AllSymbols[key]); } }); return result; }; // `Symbol` constructor // https://tc39.es/ecma262/#sec-symbol-constructor if (!NATIVE_SYMBOL) { $Symbol = function Symbol() { if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor'); var description = !arguments.length || arguments[0] === undefined ? undefined : String(arguments[0]); var tag = uid(description); var setter = function setter(value) { if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value); if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value)); }; if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter }); return wrap(tag, description); }; redefine($Symbol[PROTOTYPE], 'toString', function toString() { return getInternalState(this).tag; }); redefine($Symbol, 'withoutSetter', function (description) { return wrap(uid(description), description); }); propertyIsEnumerableModule.f = $propertyIsEnumerable; definePropertyModule.f = $defineProperty; getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor; getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames; getOwnPropertySymbolsModule.f = $getOwnPropertySymbols; wrappedWellKnownSymbolModule.f = function (name) { return wrap(wellKnownSymbol(name), name); }; if (DESCRIPTORS) { // https://github.com/tc39/proposal-Symbol-description nativeDefineProperty($Symbol[PROTOTYPE], 'description', { configurable: true, get: function description() { return getInternalState(this).description; } }); if (!IS_PURE) { redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true }); } } } $({ global: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, { Symbol: $Symbol }); $forEach(objectKeys(WellKnownSymbolsStore), function (name) { defineWellKnownSymbol(name); }); $({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, { // `Symbol.for` method // https://tc39.es/ecma262/#sec-symbol.for 'for': function _for(key) { var string = String(key); if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string]; var symbol = $Symbol(string); StringToSymbolRegistry[string] = symbol; SymbolToStringRegistry[symbol] = string; return symbol; }, // `Symbol.keyFor` method // https://tc39.es/ecma262/#sec-symbol.keyfor keyFor: function keyFor(sym) { if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol'); if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym]; }, useSetter: function useSetter() { USE_SETTER = true; }, useSimple: function useSimple() { USE_SETTER = false; } }); $({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, { // `Object.create` method // https://tc39.es/ecma262/#sec-object.create create: $create, // `Object.defineProperty` method // https://tc39.es/ecma262/#sec-object.defineproperty defineProperty: $defineProperty, // `Object.defineProperties` method // https://tc39.es/ecma262/#sec-object.defineproperties defineProperties: $defineProperties, // `Object.getOwnPropertyDescriptor` method // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors getOwnPropertyDescriptor: $getOwnPropertyDescriptor }); $({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, { // `Object.getOwnPropertyNames` method // https://tc39.es/ecma262/#sec-object.getownpropertynames getOwnPropertyNames: $getOwnPropertyNames, // `Object.getOwnPropertySymbols` method // https://tc39.es/ecma262/#sec-object.getownpropertysymbols getOwnPropertySymbols: $getOwnPropertySymbols }); // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives // https://bugs.chromium.org/p/v8/issues/detail?id=3443 $({ target: 'Object', stat: true, forced: fails(function () { getOwnPropertySymbolsModule.f(1); }) }, { getOwnPropertySymbols: function getOwnPropertySymbols(it) { return getOwnPropertySymbolsModule.f(toObject(it)); } }); // `JSON.stringify` method behavior with symbols // https://tc39.es/ecma262/#sec-json.stringify if ($stringify) { var FORCED_JSON_STRINGIFY = !NATIVE_SYMBOL || fails(function () { var symbol = $Symbol(); // MS Edge converts symbol values to JSON as {} return $stringify([symbol]) != '[null]' // WebKit converts symbol values to JSON as null || $stringify({ a: symbol }) != '{}' // V8 throws on boxed symbols || $stringify(Object(symbol)) != '{}'; }); $({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, { // eslint-disable-next-line no-unused-vars -- required for `.length` stringify: function stringify(it, replacer, space) { var args = [it]; var index = 1; var $replacer; while (arguments.length > index) { args.push(arguments[index++]); } $replacer = replacer; if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined if (!isArray(replacer)) replacer = function replacer(key, value) { if (typeof $replacer == 'function') value = $replacer.call(this, key, value); if (!isSymbol(value)) return value; }; args[1] = replacer; return $stringify.apply(null, args); } }); } // `Symbol.prototype[@@toPrimitive]` method // https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive if (!$Symbol[PROTOTYPE][TO_PRIMITIVE]) { createNonEnumerableProperty($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); } // `Symbol.prototype[@@toStringTag]` property // https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag setToStringTag($Symbol, SYMBOL); hiddenKeys[HIDDEN] = true; }, { "../internals/an-object": 16, "../internals/array-iteration": 26, "../internals/create-non-enumerable-property": 54, "../internals/create-property-descriptor": 55, "../internals/define-well-known-symbol": 60, "../internals/descriptors": 61, "../internals/export": 74, "../internals/fails": 75, "../internals/get-built-in": 82, "../internals/global": 88, "../internals/has": 89, "../internals/hidden-keys": 90, "../internals/internal-state": 99, "../internals/is-array": 101, "../internals/is-object": 104, "../internals/is-pure": 105, "../internals/native-symbol": 121, "../internals/object-create": 131, "../internals/object-define-property": 133, "../internals/object-get-own-property-descriptor": 134, "../internals/object-get-own-property-names": 136, "../internals/object-get-own-property-names-external": 135, "../internals/object-get-own-property-symbols": 137, "../internals/object-keys": 141, "../internals/object-property-is-enumerable": 142, "../internals/redefine": 152, "../internals/set-to-string-tag": 165, "../internals/shared": 168, "../internals/shared-key": 166, "../internals/to-indexed-object": 182, "../internals/to-object": 185, "../internals/to-primitive": 188, "../internals/uid": 194, "../internals/use-symbol-as-uid": 195, "../internals/well-known-symbol": 197, "../internals/well-known-symbol-wrapped": 196 }], 371: [function (require, module, exports) { var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); // `Symbol.matchAll` well-known symbol // https://tc39.es/ecma262/#sec-symbol.matchall defineWellKnownSymbol('matchAll'); }, { "../internals/define-well-known-symbol": 60 }], 372: [function (require, module, exports) { var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); // `Symbol.match` well-known symbol // https://tc39.es/ecma262/#sec-symbol.match defineWellKnownSymbol('match'); }, { "../internals/define-well-known-symbol": 60 }], 373: [function (require, module, exports) { var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); // `Symbol.replace` well-known symbol // https://tc39.es/ecma262/#sec-symbol.replace defineWellKnownSymbol('replace'); }, { "../internals/define-well-known-symbol": 60 }], 374: [function (require, module, exports) { var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); // `Symbol.search` well-known symbol // https://tc39.es/ecma262/#sec-symbol.search defineWellKnownSymbol('search'); }, { "../internals/define-well-known-symbol": 60 }], 375: [function (require, module, exports) { var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); // `Symbol.species` well-known symbol // https://tc39.es/ecma262/#sec-symbol.species defineWellKnownSymbol('species'); }, { "../internals/define-well-known-symbol": 60 }], 376: [function (require, module, exports) { var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); // `Symbol.split` well-known symbol // https://tc39.es/ecma262/#sec-symbol.split defineWellKnownSymbol('split'); }, { "../internals/define-well-known-symbol": 60 }], 377: [function (require, module, exports) { var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); // `Symbol.toPrimitive` well-known symbol // https://tc39.es/ecma262/#sec-symbol.toprimitive defineWellKnownSymbol('toPrimitive'); }, { "../internals/define-well-known-symbol": 60 }], 378: [function (require, module, exports) { var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); // `Symbol.toStringTag` well-known symbol // https://tc39.es/ecma262/#sec-symbol.tostringtag defineWellKnownSymbol('toStringTag'); }, { "../internals/define-well-known-symbol": 60 }], 379: [function (require, module, exports) { var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); // `Symbol.unscopables` well-known symbol // https://tc39.es/ecma262/#sec-symbol.unscopables defineWellKnownSymbol('unscopables'); }, { "../internals/define-well-known-symbol": 60 }], 380: [function (require, module, exports) { 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var $copyWithin = require('../internals/array-copy-within'); var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.copyWithin` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.copywithin exportTypedArrayMethod('copyWithin', function copyWithin(target, start /* , end */ ) { return $copyWithin.call(aTypedArray(this), target, start, arguments.length > 2 ? arguments[2] : undefined); }); }, { "../internals/array-buffer-view-core": 18, "../internals/array-copy-within": 20 }], 381: [function (require, module, exports) { 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var $every = require('../internals/array-iteration').every; var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.every` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.every exportTypedArrayMethod('every', function every(callbackfn /* , thisArg */ ) { return $every(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }); }, { "../internals/array-buffer-view-core": 18, "../internals/array-iteration": 26 }], 382: [function (require, module, exports) { 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var $fill = require('../internals/array-fill'); var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.fill` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill // eslint-disable-next-line no-unused-vars -- required for `.length` exportTypedArrayMethod('fill', function fill(value /* , start, end */ ) { return $fill.apply(aTypedArray(this), arguments); }); }, { "../internals/array-buffer-view-core": 18, "../internals/array-fill": 21 }], 383: [function (require, module, exports) { 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var $filter = require('../internals/array-iteration').filter; var fromSpeciesAndList = require('../internals/typed-array-from-species-and-list'); var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.filter` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.filter exportTypedArrayMethod('filter', function filter(callbackfn /* , thisArg */ ) { var list = $filter(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); return fromSpeciesAndList(this, list); }); }, { "../internals/array-buffer-view-core": 18, "../internals/array-iteration": 26, "../internals/typed-array-from-species-and-list": 192 }], 384: [function (require, module, exports) { 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var $findIndex = require('../internals/array-iteration').findIndex; var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.findIndex` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.findindex exportTypedArrayMethod('findIndex', function findIndex(predicate /* , thisArg */ ) { return $findIndex(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined); }); }, { "../internals/array-buffer-view-core": 18, "../internals/array-iteration": 26 }], 385: [function (require, module, exports) { 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var $find = require('../internals/array-iteration').find; var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.find` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.find exportTypedArrayMethod('find', function find(predicate /* , thisArg */ ) { return $find(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined); }); }, { "../internals/array-buffer-view-core": 18, "../internals/array-iteration": 26 }], 386: [function (require, module, exports) { var createTypedArrayConstructor = require('../internals/typed-array-constructor'); // `Float32Array` constructor // https://tc39.es/ecma262/#sec-typedarray-objects createTypedArrayConstructor('Float32', function (init) { return function Float32Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); }, { "../internals/typed-array-constructor": 190 }], 387: [function (require, module, exports) { var createTypedArrayConstructor = require('../internals/typed-array-constructor'); // `Float64Array` constructor // https://tc39.es/ecma262/#sec-typedarray-objects createTypedArrayConstructor('Float64', function (init) { return function Float64Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); }, { "../internals/typed-array-constructor": 190 }], 388: [function (require, module, exports) { 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var $forEach = require('../internals/array-iteration').forEach; var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.forEach` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.foreach exportTypedArrayMethod('forEach', function forEach(callbackfn /* , thisArg */ ) { $forEach(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }); }, { "../internals/array-buffer-view-core": 18, "../internals/array-iteration": 26 }], 389: [function (require, module, exports) { 'use strict'; var TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = require('../internals/typed-array-constructors-require-wrappers'); var exportTypedArrayStaticMethod = require('../internals/array-buffer-view-core').exportTypedArrayStaticMethod; var typedArrayFrom = require('../internals/typed-array-from'); // `%TypedArray%.from` method // https://tc39.es/ecma262/#sec-%typedarray%.from exportTypedArrayStaticMethod('from', typedArrayFrom, TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS); }, { "../internals/array-buffer-view-core": 18, "../internals/typed-array-constructors-require-wrappers": 191, "../internals/typed-array-from": 193 }], 390: [function (require, module, exports) { 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var $includes = require('../internals/array-includes').includes; var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.includes` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.includes exportTypedArrayMethod('includes', function includes(searchElement /* , fromIndex */ ) { return $includes(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); }); }, { "../internals/array-buffer-view-core": 18, "../internals/array-includes": 24 }], 391: [function (require, module, exports) { 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var $indexOf = require('../internals/array-includes').indexOf; var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.indexOf` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.indexof exportTypedArrayMethod('indexOf', function indexOf(searchElement /* , fromIndex */ ) { return $indexOf(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); }); }, { "../internals/array-buffer-view-core": 18, "../internals/array-includes": 24 }], 392: [function (require, module, exports) { var createTypedArrayConstructor = require('../internals/typed-array-constructor'); // `Int16Array` constructor // https://tc39.es/ecma262/#sec-typedarray-objects createTypedArrayConstructor('Int16', function (init) { return function Int16Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); }, { "../internals/typed-array-constructor": 190 }], 393: [function (require, module, exports) { var createTypedArrayConstructor = require('../internals/typed-array-constructor'); // `Int32Array` constructor // https://tc39.es/ecma262/#sec-typedarray-objects createTypedArrayConstructor('Int32', function (init) { return function Int32Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); }, { "../internals/typed-array-constructor": 190 }], 394: [function (require, module, exports) { var createTypedArrayConstructor = require('../internals/typed-array-constructor'); // `Int8Array` constructor // https://tc39.es/ecma262/#sec-typedarray-objects createTypedArrayConstructor('Int8', function (init) { return function Int8Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); }, { "../internals/typed-array-constructor": 190 }], 395: [function (require, module, exports) { 'use strict'; var global = require('../internals/global'); var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var ArrayIterators = require('../modules/es.array.iterator'); var wellKnownSymbol = require('../internals/well-known-symbol'); var ITERATOR = wellKnownSymbol('iterator'); var Uint8Array = global.Uint8Array; var arrayValues = ArrayIterators.values; var arrayKeys = ArrayIterators.keys; var arrayEntries = ArrayIterators.entries; var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; var nativeTypedArrayIterator = Uint8Array && Uint8Array.prototype[ITERATOR]; var CORRECT_ITER_NAME = !!nativeTypedArrayIterator && (nativeTypedArrayIterator.name == 'values' || nativeTypedArrayIterator.name == undefined); var typedArrayValues = function values() { return arrayValues.call(aTypedArray(this)); }; // `%TypedArray%.prototype.entries` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.entries exportTypedArrayMethod('entries', function entries() { return arrayEntries.call(aTypedArray(this)); }); // `%TypedArray%.prototype.keys` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys exportTypedArrayMethod('keys', function keys() { return arrayKeys.call(aTypedArray(this)); }); // `%TypedArray%.prototype.values` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.values exportTypedArrayMethod('values', typedArrayValues, !CORRECT_ITER_NAME); // `%TypedArray%.prototype[@@iterator]` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype-@@iterator exportTypedArrayMethod(ITERATOR, typedArrayValues, !CORRECT_ITER_NAME); }, { "../internals/array-buffer-view-core": 18, "../internals/global": 88, "../internals/well-known-symbol": 197, "../modules/es.array.iterator": 217 }], 396: [function (require, module, exports) { 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; var $join = [].join; // `%TypedArray%.prototype.join` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.join // eslint-disable-next-line no-unused-vars -- required for `.length` exportTypedArrayMethod('join', function join(separator) { return $join.apply(aTypedArray(this), arguments); }); }, { "../internals/array-buffer-view-core": 18 }], 397: [function (require, module, exports) { 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var $lastIndexOf = require('../internals/array-last-index-of'); var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.lastIndexOf` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.lastindexof // eslint-disable-next-line no-unused-vars -- required for `.length` exportTypedArrayMethod('lastIndexOf', function lastIndexOf(searchElement /* , fromIndex */ ) { return $lastIndexOf.apply(aTypedArray(this), arguments); }); }, { "../internals/array-buffer-view-core": 18, "../internals/array-last-index-of": 27 }], 398: [function (require, module, exports) { 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var $map = require('../internals/array-iteration').map; var speciesConstructor = require('../internals/species-constructor'); var aTypedArray = ArrayBufferViewCore.aTypedArray; var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.map` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.map exportTypedArrayMethod('map', function map(mapfn /* , thisArg */ ) { return $map(aTypedArray(this), mapfn, arguments.length > 1 ? arguments[1] : undefined, function (O, length) { return new (aTypedArrayConstructor(speciesConstructor(O, O.constructor)))(length); }); }); }, { "../internals/array-buffer-view-core": 18, "../internals/array-iteration": 26, "../internals/species-constructor": 169 }], 399: [function (require, module, exports) { 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = require('../internals/typed-array-constructors-require-wrappers'); var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor; var exportTypedArrayStaticMethod = ArrayBufferViewCore.exportTypedArrayStaticMethod; // `%TypedArray%.of` method // https://tc39.es/ecma262/#sec-%typedarray%.of exportTypedArrayStaticMethod('of', function of() /* ...items */ { var index = 0; var length = arguments.length; var result = new (aTypedArrayConstructor(this))(length); while (length > index) { result[index] = arguments[index++]; } return result; }, TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS); }, { "../internals/array-buffer-view-core": 18, "../internals/typed-array-constructors-require-wrappers": 191 }], 400: [function (require, module, exports) { 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var $reduceRight = require('../internals/array-reduce').right; var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.reduceRicht` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduceright exportTypedArrayMethod('reduceRight', function reduceRight(callbackfn /* , initialValue */ ) { return $reduceRight(aTypedArray(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined); }); }, { "../internals/array-buffer-view-core": 18, "../internals/array-reduce": 30 }], 401: [function (require, module, exports) { 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var $reduce = require('../internals/array-reduce').left; var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.reduce` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduce exportTypedArrayMethod('reduce', function reduce(callbackfn /* , initialValue */ ) { return $reduce(aTypedArray(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined); }); }, { "../internals/array-buffer-view-core": 18, "../internals/array-reduce": 30 }], 402: [function (require, module, exports) { 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; var floor = Math.floor; // `%TypedArray%.prototype.reverse` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.reverse exportTypedArrayMethod('reverse', function reverse() { var that = this; var length = aTypedArray(that).length; var middle = floor(length / 2); var index = 0; var value; while (index < middle) { value = that[index]; that[index++] = that[--length]; that[length] = value; } return that; }); }, { "../internals/array-buffer-view-core": 18 }], 403: [function (require, module, exports) { 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var toLength = require('../internals/to-length'); var toOffset = require('../internals/to-offset'); var toObject = require('../internals/to-object'); var fails = require('../internals/fails'); var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; var FORCED = fails(function () { // eslint-disable-next-line es/no-typed-arrays -- required for testing new Int8Array(1).set({}); }); // `%TypedArray%.prototype.set` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.set exportTypedArrayMethod('set', function set(arrayLike /* , offset */ ) { aTypedArray(this); var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1); var length = this.length; var src = toObject(arrayLike); var len = toLength(src.length); var index = 0; if (len + offset > length) throw RangeError('Wrong length'); while (index < len) { this[offset + index] = src[index++]; } }, FORCED); }, { "../internals/array-buffer-view-core": 18, "../internals/fails": 75, "../internals/to-length": 184, "../internals/to-object": 185, "../internals/to-offset": 186 }], 404: [function (require, module, exports) { 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var speciesConstructor = require('../internals/species-constructor'); var fails = require('../internals/fails'); var aTypedArray = ArrayBufferViewCore.aTypedArray; var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; var $slice = [].slice; var FORCED = fails(function () { // eslint-disable-next-line es/no-typed-arrays -- required for testing new Int8Array(1).slice(); }); // `%TypedArray%.prototype.slice` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice exportTypedArrayMethod('slice', function slice(start, end) { var list = $slice.call(aTypedArray(this), start, end); var C = speciesConstructor(this, this.constructor); var index = 0; var length = list.length; var result = new (aTypedArrayConstructor(C))(length); while (length > index) { result[index] = list[index++]; } return result; }, FORCED); }, { "../internals/array-buffer-view-core": 18, "../internals/fails": 75, "../internals/species-constructor": 169 }], 405: [function (require, module, exports) { 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var $some = require('../internals/array-iteration').some; var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.some` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.some exportTypedArrayMethod('some', function some(callbackfn /* , thisArg */ ) { return $some(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }); }, { "../internals/array-buffer-view-core": 18, "../internals/array-iteration": 26 }], 406: [function (require, module, exports) { 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var global = require('../internals/global'); var fails = require('../internals/fails'); var aFunction = require('../internals/a-function'); var toLength = require('../internals/to-length'); var internalSort = require('../internals/array-sort'); var FF = require('../internals/engine-ff-version'); var IE_OR_EDGE = require('../internals/engine-is-ie-or-edge'); var V8 = require('../internals/engine-v8-version'); var WEBKIT = require('../internals/engine-webkit-version'); var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; var Uint16Array = global.Uint16Array; var nativeSort = Uint16Array && Uint16Array.prototype.sort; // WebKit var ACCEPT_INCORRECT_ARGUMENTS = !!nativeSort && !fails(function () { var array = new Uint16Array(2); array.sort(null); array.sort({}); }); var STABLE_SORT = !!nativeSort && !fails(function () { // feature detection can be too slow, so check engines versions if (V8) return V8 < 74; if (FF) return FF < 67; if (IE_OR_EDGE) return true; if (WEBKIT) return WEBKIT < 602; var array = new Uint16Array(516); var expected = Array(516); var index, mod; for (index = 0; index < 516; index++) { mod = index % 4; array[index] = 515 - index; expected[index] = index - 2 * mod + 3; } array.sort(function (a, b) { return (a / 4 | 0) - (b / 4 | 0); }); for (index = 0; index < 516; index++) { if (array[index] !== expected[index]) return true; } }); var getSortCompare = function getSortCompare(comparefn) { return function (x, y) { if (comparefn !== undefined) return +comparefn(x, y) || 0; // eslint-disable-next-line no-self-compare -- NaN check if (y !== y) return -1; // eslint-disable-next-line no-self-compare -- NaN check if (x !== x) return 1; if (x === 0 && y === 0) return 1 / x > 0 && 1 / y < 0 ? 1 : -1; return x > y; }; }; // `%TypedArray%.prototype.sort` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort exportTypedArrayMethod('sort', function sort(comparefn) { var array = this; if (comparefn !== undefined) aFunction(comparefn); if (STABLE_SORT) return nativeSort.call(array, comparefn); aTypedArray(array); var arrayLength = toLength(array.length); var items = Array(arrayLength); var index; for (index = 0; index < arrayLength; index++) { items[index] = array[index]; } items = internalSort(array, getSortCompare(comparefn)); for (index = 0; index < arrayLength; index++) { array[index] = items[index]; } return array; }, !STABLE_SORT || ACCEPT_INCORRECT_ARGUMENTS); }, { "../internals/a-function": 11, "../internals/array-buffer-view-core": 18, "../internals/array-sort": 31, "../internals/engine-ff-version": 64, "../internals/engine-is-ie-or-edge": 66, "../internals/engine-v8-version": 71, "../internals/engine-webkit-version": 72, "../internals/fails": 75, "../internals/global": 88, "../internals/to-length": 184 }], 407: [function (require, module, exports) { 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var toLength = require('../internals/to-length'); var toAbsoluteIndex = require('../internals/to-absolute-index'); var speciesConstructor = require('../internals/species-constructor'); var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.subarray` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.subarray exportTypedArrayMethod('subarray', function subarray(begin, end) { var O = aTypedArray(this); var length = O.length; var beginIndex = toAbsoluteIndex(begin, length); return new (speciesConstructor(O, O.constructor))(O.buffer, O.byteOffset + beginIndex * O.BYTES_PER_ELEMENT, toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - beginIndex)); }); }, { "../internals/array-buffer-view-core": 18, "../internals/species-constructor": 169, "../internals/to-absolute-index": 180, "../internals/to-length": 184 }], 408: [function (require, module, exports) { 'use strict'; var global = require('../internals/global'); var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var fails = require('../internals/fails'); var Int8Array = global.Int8Array; var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; var $toLocaleString = [].toLocaleString; var $slice = [].slice; // iOS Safari 6.x fails here var TO_LOCALE_STRING_BUG = !!Int8Array && fails(function () { $toLocaleString.call(new Int8Array(1)); }); var FORCED = fails(function () { return [1, 2].toLocaleString() != new Int8Array([1, 2]).toLocaleString(); }) || !fails(function () { Int8Array.prototype.toLocaleString.call([1, 2]); }); // `%TypedArray%.prototype.toLocaleString` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring exportTypedArrayMethod('toLocaleString', function toLocaleString() { return $toLocaleString.apply(TO_LOCALE_STRING_BUG ? $slice.call(aTypedArray(this)) : aTypedArray(this), arguments); }, FORCED); }, { "../internals/array-buffer-view-core": 18, "../internals/fails": 75, "../internals/global": 88 }], 409: [function (require, module, exports) { 'use strict'; var exportTypedArrayMethod = require('../internals/array-buffer-view-core').exportTypedArrayMethod; var fails = require('../internals/fails'); var global = require('../internals/global'); var Uint8Array = global.Uint8Array; var Uint8ArrayPrototype = Uint8Array && Uint8Array.prototype || {}; var arrayToString = [].toString; var arrayJoin = [].join; if (fails(function () { arrayToString.call({}); })) { arrayToString = function toString() { return arrayJoin.call(this); }; } var IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString != arrayToString; // `%TypedArray%.prototype.toString` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.tostring exportTypedArrayMethod('toString', arrayToString, IS_NOT_ARRAY_METHOD); }, { "../internals/array-buffer-view-core": 18, "../internals/fails": 75, "../internals/global": 88 }], 410: [function (require, module, exports) { var createTypedArrayConstructor = require('../internals/typed-array-constructor'); // `Uint16Array` constructor // https://tc39.es/ecma262/#sec-typedarray-objects createTypedArrayConstructor('Uint16', function (init) { return function Uint16Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); }, { "../internals/typed-array-constructor": 190 }], 411: [function (require, module, exports) { var createTypedArrayConstructor = require('../internals/typed-array-constructor'); // `Uint32Array` constructor // https://tc39.es/ecma262/#sec-typedarray-objects createTypedArrayConstructor('Uint32', function (init) { return function Uint32Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); }, { "../internals/typed-array-constructor": 190 }], 412: [function (require, module, exports) { var createTypedArrayConstructor = require('../internals/typed-array-constructor'); // `Uint8Array` constructor // https://tc39.es/ecma262/#sec-typedarray-objects createTypedArrayConstructor('Uint8', function (init) { return function Uint8Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); }, { "../internals/typed-array-constructor": 190 }], 413: [function (require, module, exports) { var createTypedArrayConstructor = require('../internals/typed-array-constructor'); // `Uint8ClampedArray` constructor // https://tc39.es/ecma262/#sec-typedarray-objects createTypedArrayConstructor('Uint8', function (init) { return function Uint8ClampedArray(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }, true); }, { "../internals/typed-array-constructor": 190 }], 414: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var fromCharCode = String.fromCharCode; var hex2 = /^[\da-f]{2}$/i; var hex4 = /^[\da-f]{4}$/i; // `unescape` method // https://tc39.es/ecma262/#sec-unescape-string $({ global: true }, { unescape: function unescape(string) { var str = String(string); var result = ''; var length = str.length; var index = 0; var chr, slice; while (index < length) { chr = str.charAt(index++); if (chr === '%') { if (str.charAt(index) === 'u') { slice = str.slice(index + 1, index + 5); if (hex4.test(slice)) { result += fromCharCode(parseInt(slice, 16)); index += 5; continue; } } else { slice = str.slice(index, index + 2); if (hex2.test(slice)) { result += fromCharCode(parseInt(slice, 16)); index += 2; continue; } } } result += chr; } return result; } }); }, { "../internals/export": 74 }], 415: [function (require, module, exports) { 'use strict'; var global = require('../internals/global'); var redefineAll = require('../internals/redefine-all'); var InternalMetadataModule = require('../internals/internal-metadata'); var collection = require('../internals/collection'); var collectionWeak = require('../internals/collection-weak'); var isObject = require('../internals/is-object'); var enforceIternalState = require('../internals/internal-state').enforce; var NATIVE_WEAK_MAP = require('../internals/native-weak-map'); var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global; // eslint-disable-next-line es/no-object-isextensible -- safe var isExtensible = Object.isExtensible; var InternalWeakMap; var wrapper = function wrapper(init) { return function WeakMap() { return init(this, arguments.length ? arguments[0] : undefined); }; }; // `WeakMap` constructor // https://tc39.es/ecma262/#sec-weakmap-constructor var $WeakMap = module.exports = collection('WeakMap', wrapper, collectionWeak); // IE11 WeakMap frozen keys fix // We can't use feature detection because it crash some old IE builds // https://github.com/zloirock/core-js/issues/485 if (NATIVE_WEAK_MAP && IS_IE11) { InternalWeakMap = collectionWeak.getConstructor(wrapper, 'WeakMap', true); InternalMetadataModule.REQUIRED = true; var WeakMapPrototype = $WeakMap.prototype; var nativeDelete = WeakMapPrototype['delete']; var nativeHas = WeakMapPrototype.has; var nativeGet = WeakMapPrototype.get; var nativeSet = WeakMapPrototype.set; redefineAll(WeakMapPrototype, { 'delete': function _delete(key) { if (isObject(key) && !isExtensible(key)) { var state = enforceIternalState(this); if (!state.frozen) state.frozen = new InternalWeakMap(); return nativeDelete.call(this, key) || state.frozen['delete'](key); } return nativeDelete.call(this, key); }, has: function has(key) { if (isObject(key) && !isExtensible(key)) { var state = enforceIternalState(this); if (!state.frozen) state.frozen = new InternalWeakMap(); return nativeHas.call(this, key) || state.frozen.has(key); } return nativeHas.call(this, key); }, get: function get(key) { if (isObject(key) && !isExtensible(key)) { var state = enforceIternalState(this); if (!state.frozen) state.frozen = new InternalWeakMap(); return nativeHas.call(this, key) ? nativeGet.call(this, key) : state.frozen.get(key); } return nativeGet.call(this, key); }, set: function set(key, value) { if (isObject(key) && !isExtensible(key)) { var state = enforceIternalState(this); if (!state.frozen) state.frozen = new InternalWeakMap(); nativeHas.call(this, key) ? nativeSet.call(this, key, value) : state.frozen.set(key, value); } else nativeSet.call(this, key, value); return this; } }); } }, { "../internals/collection": 47, "../internals/collection-weak": 46, "../internals/global": 88, "../internals/internal-metadata": 98, "../internals/internal-state": 99, "../internals/is-object": 104, "../internals/native-weak-map": 123, "../internals/redefine-all": 151 }], 416: [function (require, module, exports) { 'use strict'; var collection = require('../internals/collection'); var collectionWeak = require('../internals/collection-weak'); // `WeakSet` constructor // https://tc39.es/ecma262/#sec-weakset-constructor collection('WeakSet', function (init) { return function WeakSet() { return init(this, arguments.length ? arguments[0] : undefined); }; }, collectionWeak); }, { "../internals/collection": 47, "../internals/collection-weak": 46 }], 417: [function (require, module, exports) { // TODO: Remove from `core-js@4` require('./es.aggregate-error'); }, { "./es.aggregate-error": 199 }], 418: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var toObject = require('../internals/to-object'); var toLength = require('../internals/to-length'); var toInteger = require('../internals/to-integer'); var addToUnscopables = require('../internals/add-to-unscopables'); // `Array.prototype.at` method // https://github.com/tc39/proposal-relative-indexing-method $({ target: 'Array', proto: true }, { at: function at(index) { var O = toObject(this); var len = toLength(O.length); var relativeIndex = toInteger(index); var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex; return k < 0 || k >= len ? undefined : O[k]; } }); addToUnscopables('at'); }, { "../internals/add-to-unscopables": 13, "../internals/export": 74, "../internals/to-integer": 183, "../internals/to-length": 184, "../internals/to-object": 185 }], 419: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var $filterOut = require('../internals/array-iteration').filterOut; var addToUnscopables = require('../internals/add-to-unscopables'); // `Array.prototype.filterOut` method // https://github.com/tc39/proposal-array-filtering $({ target: 'Array', proto: true }, { filterOut: function filterOut(callbackfn /* , thisArg */ ) { return $filterOut(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); addToUnscopables('filterOut'); }, { "../internals/add-to-unscopables": 13, "../internals/array-iteration": 26, "../internals/export": 74 }], 420: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var $findLastIndex = require('../internals/array-iteration-from-last').findLastIndex; var addToUnscopables = require('../internals/add-to-unscopables'); // `Array.prototype.findLastIndex` method // https://github.com/tc39/proposal-array-find-from-last $({ target: 'Array', proto: true }, { findLastIndex: function findLastIndex(callbackfn /* , that = undefined */ ) { return $findLastIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); addToUnscopables('findLastIndex'); }, { "../internals/add-to-unscopables": 13, "../internals/array-iteration-from-last": 25, "../internals/export": 74 }], 421: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var $findLast = require('../internals/array-iteration-from-last').findLast; var addToUnscopables = require('../internals/add-to-unscopables'); // `Array.prototype.findLast` method // https://github.com/tc39/proposal-array-find-from-last $({ target: 'Array', proto: true }, { findLast: function findLast(callbackfn /* , that = undefined */ ) { return $findLast(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); addToUnscopables('findLast'); }, { "../internals/add-to-unscopables": 13, "../internals/array-iteration-from-last": 25, "../internals/export": 74 }], 422: [function (require, module, exports) { var $ = require('../internals/export'); var isArray = require('../internals/is-array'); // eslint-disable-next-line es/no-object-isfrozen -- safe var isFrozen = Object.isFrozen; var isFrozenStringArray = function isFrozenStringArray(array, allowUndefined) { if (!isFrozen || !isArray(array) || !isFrozen(array)) return false; var index = 0; var length = array.length; var element; while (index < length) { element = array[index++]; if (!(typeof element === 'string' || allowUndefined && typeof element === 'undefined')) { return false; } } return length !== 0; }; // `Array.isTemplateObject` method // https://github.com/tc39/proposal-array-is-template-object $({ target: 'Array', stat: true }, { isTemplateObject: function isTemplateObject(value) { if (!isFrozenStringArray(value, true)) return false; var raw = value.raw; if (raw.length !== value.length || !isFrozenStringArray(raw, false)) return false; return true; } }); }, { "../internals/export": 74, "../internals/is-array": 101 }], 423: [function (require, module, exports) { 'use strict'; var DESCRIPTORS = require('../internals/descriptors'); var addToUnscopables = require('../internals/add-to-unscopables'); var toObject = require('../internals/to-object'); var toLength = require('../internals/to-length'); var defineProperty = require('../internals/object-define-property').f; // `Array.prototype.lastIndex` getter // https://github.com/keithamus/proposal-array-last if (DESCRIPTORS && !('lastIndex' in [])) { defineProperty(Array.prototype, 'lastIndex', { configurable: true, get: function lastIndex() { var O = toObject(this); var len = toLength(O.length); return len == 0 ? 0 : len - 1; } }); addToUnscopables('lastIndex'); } }, { "../internals/add-to-unscopables": 13, "../internals/descriptors": 61, "../internals/object-define-property": 133, "../internals/to-length": 184, "../internals/to-object": 185 }], 424: [function (require, module, exports) { 'use strict'; var DESCRIPTORS = require('../internals/descriptors'); var addToUnscopables = require('../internals/add-to-unscopables'); var toObject = require('../internals/to-object'); var toLength = require('../internals/to-length'); var defineProperty = require('../internals/object-define-property').f; // `Array.prototype.lastIndex` accessor // https://github.com/keithamus/proposal-array-last if (DESCRIPTORS && !('lastItem' in [])) { defineProperty(Array.prototype, 'lastItem', { configurable: true, get: function lastItem() { var O = toObject(this); var len = toLength(O.length); return len == 0 ? undefined : O[len - 1]; }, set: function lastItem(value) { var O = toObject(this); var len = toLength(O.length); return O[len == 0 ? 0 : len - 1] = value; } }); addToUnscopables('lastItem'); } }, { "../internals/add-to-unscopables": 13, "../internals/descriptors": 61, "../internals/object-define-property": 133, "../internals/to-length": 184, "../internals/to-object": 185 }], 425: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var addToUnscopables = require('../internals/add-to-unscopables'); var uniqueBy = require('../internals/array-unique-by'); // `Array.prototype.uniqueBy` method // https://github.com/tc39/proposal-array-unique $({ target: 'Array', proto: true }, { uniqueBy: uniqueBy }); addToUnscopables('uniqueBy'); }, { "../internals/add-to-unscopables": 13, "../internals/array-unique-by": 33, "../internals/export": 74 }], 426: [function (require, module, exports) { 'use strict'; // https://github.com/tc39/proposal-iterator-helpers var $ = require('../internals/export'); var anObject = require('../internals/an-object'); var createAsyncIteratorProxy = require('../internals/async-iterator-create-proxy'); var AsyncIteratorProxy = createAsyncIteratorProxy(function (arg, Promise) { var state = this; var iterator = state.iterator; return Promise.resolve(anObject(state.next.call(iterator, arg))).then(function (step) { if (anObject(step).done) { state.done = true; return { done: true, value: undefined }; } return { done: false, value: [state.index++, step.value] }; }); }); $({ target: 'AsyncIterator', proto: true, real: true }, { asIndexedPairs: function asIndexedPairs() { return new AsyncIteratorProxy({ iterator: anObject(this), index: 0 }); } }); }, { "../internals/an-object": 16, "../internals/async-iterator-create-proxy": 34, "../internals/export": 74 }], 427: [function (require, module, exports) { 'use strict'; // https://github.com/tc39/proposal-iterator-helpers var $ = require('../internals/export'); var anInstance = require('../internals/an-instance'); var createNonEnumerableProperty = require('../internals/create-non-enumerable-property'); var has = require('../internals/has'); var wellKnownSymbol = require('../internals/well-known-symbol'); var AsyncIteratorPrototype = require('../internals/async-iterator-prototype'); var IS_PURE = require('../internals/is-pure'); var TO_STRING_TAG = wellKnownSymbol('toStringTag'); var AsyncIteratorConstructor = function AsyncIterator() { anInstance(this, AsyncIteratorConstructor); }; AsyncIteratorConstructor.prototype = AsyncIteratorPrototype; if (!has(AsyncIteratorPrototype, TO_STRING_TAG)) { createNonEnumerableProperty(AsyncIteratorPrototype, TO_STRING_TAG, 'AsyncIterator'); } if (!has(AsyncIteratorPrototype, 'constructor') || AsyncIteratorPrototype.constructor === Object) { createNonEnumerableProperty(AsyncIteratorPrototype, 'constructor', AsyncIteratorConstructor); } $({ global: true, forced: IS_PURE }, { AsyncIterator: AsyncIteratorConstructor }); }, { "../internals/an-instance": 15, "../internals/async-iterator-prototype": 36, "../internals/create-non-enumerable-property": 54, "../internals/export": 74, "../internals/has": 89, "../internals/is-pure": 105, "../internals/well-known-symbol": 197 }], 428: [function (require, module, exports) { 'use strict'; // https://github.com/tc39/proposal-iterator-helpers var $ = require('../internals/export'); var anObject = require('../internals/an-object'); var toPositiveInteger = require('../internals/to-positive-integer'); var createAsyncIteratorProxy = require('../internals/async-iterator-create-proxy'); var AsyncIteratorProxy = createAsyncIteratorProxy(function (arg, Promise) { var state = this; return new Promise(function (resolve, reject) { var loop = function loop() { try { Promise.resolve(anObject(state.next.call(state.iterator, state.remaining ? undefined : arg))).then(function (step) { try { if (anObject(step).done) { state.done = true; resolve({ done: true, value: undefined }); } else if (state.remaining) { state.remaining--; loop(); } else resolve({ done: false, value: step.value }); } catch (err) { reject(err); } }, reject); } catch (error) { reject(error); } }; loop(); }); }); $({ target: 'AsyncIterator', proto: true, real: true }, { drop: function drop(limit) { return new AsyncIteratorProxy({ iterator: anObject(this), remaining: toPositiveInteger(limit) }); } }); }, { "../internals/an-object": 16, "../internals/async-iterator-create-proxy": 34, "../internals/export": 74, "../internals/to-positive-integer": 187 }], 429: [function (require, module, exports) { 'use strict'; // https://github.com/tc39/proposal-iterator-helpers var $ = require('../internals/export'); var $every = require('../internals/async-iterator-iteration').every; $({ target: 'AsyncIterator', proto: true, real: true }, { every: function every(fn) { return $every(this, fn); } }); }, { "../internals/async-iterator-iteration": 35, "../internals/export": 74 }], 430: [function (require, module, exports) { 'use strict'; // https://github.com/tc39/proposal-iterator-helpers var $ = require('../internals/export'); var aFunction = require('../internals/a-function'); var anObject = require('../internals/an-object'); var createAsyncIteratorProxy = require('../internals/async-iterator-create-proxy'); var AsyncIteratorProxy = createAsyncIteratorProxy(function (arg, Promise) { var state = this; var filterer = state.filterer; return new Promise(function (resolve, reject) { var loop = function loop() { try { Promise.resolve(anObject(state.next.call(state.iterator, arg))).then(function (step) { try { if (anObject(step).done) { state.done = true; resolve({ done: true, value: undefined }); } else { var value = step.value; Promise.resolve(filterer(value)).then(function (selected) { selected ? resolve({ done: false, value: value }) : loop(); }, reject); } } catch (err) { reject(err); } }, reject); } catch (error) { reject(error); } }; loop(); }); }); $({ target: 'AsyncIterator', proto: true, real: true }, { filter: function filter(filterer) { return new AsyncIteratorProxy({ iterator: anObject(this), filterer: aFunction(filterer) }); } }); }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/async-iterator-create-proxy": 34, "../internals/export": 74 }], 431: [function (require, module, exports) { 'use strict'; // https://github.com/tc39/proposal-iterator-helpers var $ = require('../internals/export'); var $find = require('../internals/async-iterator-iteration').find; $({ target: 'AsyncIterator', proto: true, real: true }, { find: function find(fn) { return $find(this, fn); } }); }, { "../internals/async-iterator-iteration": 35, "../internals/export": 74 }], 432: [function (require, module, exports) { 'use strict'; // https://github.com/tc39/proposal-iterator-helpers var $ = require('../internals/export'); var aFunction = require('../internals/a-function'); var anObject = require('../internals/an-object'); var createAsyncIteratorProxy = require('../internals/async-iterator-create-proxy'); var getAsyncIteratorMethod = require('../internals/get-async-iterator-method'); var AsyncIteratorProxy = createAsyncIteratorProxy(function (arg, Promise) { var state = this; var mapper = state.mapper; var innerIterator, iteratorMethod; return new Promise(function (resolve, reject) { var outerLoop = function outerLoop() { try { Promise.resolve(anObject(state.next.call(state.iterator, arg))).then(function (step) { try { if (anObject(step).done) { state.done = true; resolve({ done: true, value: undefined }); } else { Promise.resolve(mapper(step.value)).then(function (mapped) { try { iteratorMethod = getAsyncIteratorMethod(mapped); if (iteratorMethod !== undefined) { state.innerIterator = innerIterator = anObject(iteratorMethod.call(mapped)); state.innerNext = aFunction(innerIterator.next); return innerLoop(); } reject(TypeError('.flatMap callback should return an iterable object')); } catch (error2) { reject(error2); } }, reject); } } catch (error1) { reject(error1); } }, reject); } catch (error) { reject(error); } }; var innerLoop = function innerLoop() { if (innerIterator = state.innerIterator) { try { Promise.resolve(anObject(state.innerNext.call(innerIterator))).then(function (result) { try { if (anObject(result).done) { state.innerIterator = state.innerNext = null; outerLoop(); } else resolve({ done: false, value: result.value }); } catch (error1) { reject(error1); } }, reject); } catch (error) { reject(error); } } else outerLoop(); }; innerLoop(); }); }); $({ target: 'AsyncIterator', proto: true, real: true }, { flatMap: function flatMap(mapper) { return new AsyncIteratorProxy({ iterator: anObject(this), mapper: aFunction(mapper), innerIterator: null, innerNext: null }); } }); }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/async-iterator-create-proxy": 34, "../internals/export": 74, "../internals/get-async-iterator-method": 81 }], 433: [function (require, module, exports) { 'use strict'; // https://github.com/tc39/proposal-iterator-helpers var $ = require('../internals/export'); var $forEach = require('../internals/async-iterator-iteration').forEach; $({ target: 'AsyncIterator', proto: true, real: true }, { forEach: function forEach(fn) { return $forEach(this, fn); } }); }, { "../internals/async-iterator-iteration": 35, "../internals/export": 74 }], 434: [function (require, module, exports) { // https://github.com/tc39/proposal-iterator-helpers var $ = require('../internals/export'); var path = require('../internals/path'); var aFunction = require('../internals/a-function'); var anObject = require('../internals/an-object'); var toObject = require('../internals/to-object'); var createAsyncIteratorProxy = require('../internals/async-iterator-create-proxy'); var getAsyncIteratorMethod = require('../internals/get-async-iterator-method'); var AsyncIterator = path.AsyncIterator; var AsyncIteratorProxy = createAsyncIteratorProxy(function (arg) { return anObject(this.next.call(this.iterator, arg)); }, true); $({ target: 'AsyncIterator', stat: true }, { from: function from(O) { var object = toObject(O); var usingIterator = getAsyncIteratorMethod(object); var iterator; if (usingIterator != null) { iterator = aFunction(usingIterator).call(object); if (iterator instanceof AsyncIterator) return iterator; } else { iterator = object; } return new AsyncIteratorProxy({ iterator: iterator }); } }); }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/async-iterator-create-proxy": 34, "../internals/export": 74, "../internals/get-async-iterator-method": 81, "../internals/path": 148, "../internals/to-object": 185 }], 435: [function (require, module, exports) { 'use strict'; // https://github.com/tc39/proposal-iterator-helpers var $ = require('../internals/export'); var aFunction = require('../internals/a-function'); var anObject = require('../internals/an-object'); var createAsyncIteratorProxy = require('../internals/async-iterator-create-proxy'); var AsyncIteratorProxy = createAsyncIteratorProxy(function (arg, Promise) { var state = this; var mapper = state.mapper; return Promise.resolve(anObject(state.next.call(state.iterator, arg))).then(function (step) { if (anObject(step).done) { state.done = true; return { done: true, value: undefined }; } return Promise.resolve(mapper(step.value)).then(function (value) { return { done: false, value: value }; }); }); }); $({ target: 'AsyncIterator', proto: true, real: true }, { map: function map(mapper) { return new AsyncIteratorProxy({ iterator: anObject(this), mapper: aFunction(mapper) }); } }); }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/async-iterator-create-proxy": 34, "../internals/export": 74 }], 436: [function (require, module, exports) { 'use strict'; // https://github.com/tc39/proposal-iterator-helpers var $ = require('../internals/export'); var aFunction = require('../internals/a-function'); var anObject = require('../internals/an-object'); var getBuiltIn = require('../internals/get-built-in'); var Promise = getBuiltIn('Promise'); $({ target: 'AsyncIterator', proto: true, real: true }, { reduce: function reduce(reducer /* , initialValue */ ) { var iterator = anObject(this); var next = aFunction(iterator.next); var noInitial = arguments.length < 2; var accumulator = noInitial ? undefined : arguments[1]; aFunction(reducer); return new Promise(function (resolve, reject) { var loop = function loop() { try { Promise.resolve(anObject(next.call(iterator))).then(function (step) { try { if (anObject(step).done) { noInitial ? reject(TypeError('Reduce of empty iterator with no initial value')) : resolve(accumulator); } else { var value = step.value; if (noInitial) { noInitial = false; accumulator = value; loop(); } else { Promise.resolve(reducer(accumulator, value)).then(function (result) { accumulator = result; loop(); }, reject); } } } catch (err) { reject(err); } }, reject); } catch (error) { reject(error); } }; loop(); }); } }); }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/export": 74, "../internals/get-built-in": 82 }], 437: [function (require, module, exports) { 'use strict'; // https://github.com/tc39/proposal-iterator-helpers var $ = require('../internals/export'); var $some = require('../internals/async-iterator-iteration').some; $({ target: 'AsyncIterator', proto: true, real: true }, { some: function some(fn) { return $some(this, fn); } }); }, { "../internals/async-iterator-iteration": 35, "../internals/export": 74 }], 438: [function (require, module, exports) { 'use strict'; // https://github.com/tc39/proposal-iterator-helpers var $ = require('../internals/export'); var anObject = require('../internals/an-object'); var toPositiveInteger = require('../internals/to-positive-integer'); var createAsyncIteratorProxy = require('../internals/async-iterator-create-proxy'); var AsyncIteratorProxy = createAsyncIteratorProxy(function (arg, Promise) { var iterator = this.iterator; var returnMethod, result; if (!this.remaining--) { result = { done: true, value: undefined }; this.done = true; returnMethod = iterator['return']; if (returnMethod !== undefined) { return Promise.resolve(returnMethod.call(iterator)).then(function () { return result; }); } return result; } return this.next.call(iterator, arg); }); $({ target: 'AsyncIterator', proto: true, real: true }, { take: function take(limit) { return new AsyncIteratorProxy({ iterator: anObject(this), remaining: toPositiveInteger(limit) }); } }); }, { "../internals/an-object": 16, "../internals/async-iterator-create-proxy": 34, "../internals/export": 74, "../internals/to-positive-integer": 187 }], 439: [function (require, module, exports) { 'use strict'; // https://github.com/tc39/proposal-iterator-helpers var $ = require('../internals/export'); var $toArray = require('../internals/async-iterator-iteration').toArray; $({ target: 'AsyncIterator', proto: true, real: true }, { toArray: function toArray() { return $toArray(this); } }); }, { "../internals/async-iterator-iteration": 35, "../internals/export": 74 }], 440: [function (require, module, exports) { 'use strict'; /* eslint-disable es/no-bigint -- safe */ var $ = require('../internals/export'); var NumericRangeIterator = require('../internals/numeric-range-iterator'); // `BigInt.range` method // https://github.com/tc39/proposal-Number.range if (typeof BigInt == 'function') { $({ target: 'BigInt', stat: true }, { range: function range(start, end, option) { return new NumericRangeIterator(start, end, option, 'bigint', BigInt(0), BigInt(1)); } }); } }, { "../internals/export": 74, "../internals/numeric-range-iterator": 129 }], 441: [function (require, module, exports) { var $ = require('../internals/export'); var getCompositeKeyNode = require('../internals/composite-key'); var getBuiltIn = require('../internals/get-built-in'); var create = require('../internals/object-create'); var initializer = function initializer() { var freeze = getBuiltIn('Object', 'freeze'); return freeze ? freeze(create(null)) : create(null); }; // https://github.com/tc39/proposal-richer-keys/tree/master/compositeKey $({ global: true }, { compositeKey: function compositeKey() { return getCompositeKeyNode.apply(Object, arguments).get('object', initializer); } }); }, { "../internals/composite-key": 48, "../internals/export": 74, "../internals/get-built-in": 82, "../internals/object-create": 131 }], 442: [function (require, module, exports) { var $ = require('../internals/export'); var getCompositeKeyNode = require('../internals/composite-key'); var getBuiltIn = require('../internals/get-built-in'); // https://github.com/tc39/proposal-richer-keys/tree/master/compositeKey $({ global: true }, { compositeSymbol: function compositeSymbol() { if (arguments.length === 1 && typeof arguments[0] === 'string') return getBuiltIn('Symbol')['for'](arguments[0]); return getCompositeKeyNode.apply(null, arguments).get('symbol', getBuiltIn('Symbol')); } }); }, { "../internals/composite-key": 48, "../internals/export": 74, "../internals/get-built-in": 82 }], 443: [function (require, module, exports) { // TODO: Remove from `core-js@4` require('./es.global-this'); }, { "./es.global-this": 245 }], 444: [function (require, module, exports) { 'use strict'; // https://github.com/tc39/proposal-iterator-helpers var $ = require('../internals/export'); var anObject = require('../internals/an-object'); var createIteratorProxy = require('../internals/iterator-create-proxy'); var IteratorProxy = createIteratorProxy(function (arg) { var result = anObject(this.next.call(this.iterator, arg)); var done = this.done = !!result.done; if (!done) return [this.index++, result.value]; }); $({ target: 'Iterator', proto: true, real: true }, { asIndexedPairs: function asIndexedPairs() { return new IteratorProxy({ iterator: anObject(this), index: 0 }); } }); }, { "../internals/an-object": 16, "../internals/export": 74, "../internals/iterator-create-proxy": 109 }], 445: [function (require, module, exports) { 'use strict'; // https://github.com/tc39/proposal-iterator-helpers var $ = require('../internals/export'); var global = require('../internals/global'); var anInstance = require('../internals/an-instance'); var createNonEnumerableProperty = require('../internals/create-non-enumerable-property'); var fails = require('../internals/fails'); var has = require('../internals/has'); var wellKnownSymbol = require('../internals/well-known-symbol'); var IteratorPrototype = require('../internals/iterators-core').IteratorPrototype; var IS_PURE = require('../internals/is-pure'); var ITERATOR = wellKnownSymbol('iterator'); var TO_STRING_TAG = wellKnownSymbol('toStringTag'); var NativeIterator = global.Iterator; // FF56- have non-standard global helper `Iterator` var FORCED = IS_PURE || typeof NativeIterator != 'function' || NativeIterator.prototype !== IteratorPrototype // FF44- non-standard `Iterator` passes previous tests || !fails(function () { NativeIterator({}); }); var IteratorConstructor = function Iterator() { anInstance(this, IteratorConstructor); }; if (IS_PURE) { IteratorPrototype = {}; createNonEnumerableProperty(IteratorPrototype, ITERATOR, function () { return this; }); } if (!has(IteratorPrototype, TO_STRING_TAG)) { createNonEnumerableProperty(IteratorPrototype, TO_STRING_TAG, 'Iterator'); } if (FORCED || !has(IteratorPrototype, 'constructor') || IteratorPrototype.constructor === Object) { createNonEnumerableProperty(IteratorPrototype, 'constructor', IteratorConstructor); } IteratorConstructor.prototype = IteratorPrototype; $({ global: true, forced: FORCED }, { Iterator: IteratorConstructor }); }, { "../internals/an-instance": 15, "../internals/create-non-enumerable-property": 54, "../internals/export": 74, "../internals/fails": 75, "../internals/global": 88, "../internals/has": 89, "../internals/is-pure": 105, "../internals/iterators-core": 110, "../internals/well-known-symbol": 197 }], 446: [function (require, module, exports) { 'use strict'; // https://github.com/tc39/proposal-iterator-helpers var $ = require('../internals/export'); var anObject = require('../internals/an-object'); var toPositiveInteger = require('../internals/to-positive-integer'); var createIteratorProxy = require('../internals/iterator-create-proxy'); var IteratorProxy = createIteratorProxy(function (arg) { var iterator = this.iterator; var next = this.next; var result, done; while (this.remaining) { this.remaining--; result = anObject(next.call(iterator)); done = this.done = !!result.done; if (done) return; } result = anObject(next.call(iterator, arg)); done = this.done = !!result.done; if (!done) return result.value; }); $({ target: 'Iterator', proto: true, real: true }, { drop: function drop(limit) { return new IteratorProxy({ iterator: anObject(this), remaining: toPositiveInteger(limit) }); } }); }, { "../internals/an-object": 16, "../internals/export": 74, "../internals/iterator-create-proxy": 109, "../internals/to-positive-integer": 187 }], 447: [function (require, module, exports) { 'use strict'; // https://github.com/tc39/proposal-iterator-helpers var $ = require('../internals/export'); var iterate = require('../internals/iterate'); var aFunction = require('../internals/a-function'); var anObject = require('../internals/an-object'); $({ target: 'Iterator', proto: true, real: true }, { every: function every(fn) { anObject(this); aFunction(fn); return !iterate(this, function (value, stop) { if (!fn(value)) return stop(); }, { IS_ITERATOR: true, INTERRUPTED: true }).stopped; } }); }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/export": 74, "../internals/iterate": 107 }], 448: [function (require, module, exports) { 'use strict'; // https://github.com/tc39/proposal-iterator-helpers var $ = require('../internals/export'); var aFunction = require('../internals/a-function'); var anObject = require('../internals/an-object'); var createIteratorProxy = require('../internals/iterator-create-proxy'); var callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing'); var IteratorProxy = createIteratorProxy(function (arg) { var iterator = this.iterator; var filterer = this.filterer; var next = this.next; var result, done, value; while (true) { result = anObject(next.call(iterator, arg)); done = this.done = !!result.done; if (done) return; value = result.value; if (callWithSafeIterationClosing(iterator, filterer, value)) return value; } }); $({ target: 'Iterator', proto: true, real: true }, { filter: function filter(filterer) { return new IteratorProxy({ iterator: anObject(this), filterer: aFunction(filterer) }); } }); }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/call-with-safe-iteration-closing": 37, "../internals/export": 74, "../internals/iterator-create-proxy": 109 }], 449: [function (require, module, exports) { 'use strict'; // https://github.com/tc39/proposal-iterator-helpers var $ = require('../internals/export'); var iterate = require('../internals/iterate'); var aFunction = require('../internals/a-function'); var anObject = require('../internals/an-object'); $({ target: 'Iterator', proto: true, real: true }, { find: function find(fn) { anObject(this); aFunction(fn); return iterate(this, function (value, stop) { if (fn(value)) return stop(value); }, { IS_ITERATOR: true, INTERRUPTED: true }).result; } }); }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/export": 74, "../internals/iterate": 107 }], 450: [function (require, module, exports) { 'use strict'; // https://github.com/tc39/proposal-iterator-helpers var $ = require('../internals/export'); var aFunction = require('../internals/a-function'); var anObject = require('../internals/an-object'); var getIteratorMethod = require('../internals/get-iterator-method'); var createIteratorProxy = require('../internals/iterator-create-proxy'); var iteratorClose = require('../internals/iterator-close'); var IteratorProxy = createIteratorProxy(function (arg) { var iterator = this.iterator; var mapper = this.mapper; var result, mapped, iteratorMethod, innerIterator; while (true) { try { if (innerIterator = this.innerIterator) { result = anObject(this.innerNext.call(innerIterator)); if (!result.done) return result.value; this.innerIterator = this.innerNext = null; } result = anObject(this.next.call(iterator, arg)); if (this.done = !!result.done) return; mapped = mapper(result.value); iteratorMethod = getIteratorMethod(mapped); if (iteratorMethod === undefined) { throw TypeError('.flatMap callback should return an iterable object'); } this.innerIterator = innerIterator = anObject(iteratorMethod.call(mapped)); this.innerNext = aFunction(innerIterator.next); } catch (error) { iteratorClose(iterator); throw error; } } }); $({ target: 'Iterator', proto: true, real: true }, { flatMap: function flatMap(mapper) { return new IteratorProxy({ iterator: anObject(this), mapper: aFunction(mapper), innerIterator: null, innerNext: null }); } }); }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/export": 74, "../internals/get-iterator-method": 83, "../internals/iterator-close": 108, "../internals/iterator-create-proxy": 109 }], 451: [function (require, module, exports) { 'use strict'; // https://github.com/tc39/proposal-iterator-helpers var $ = require('../internals/export'); var iterate = require('../internals/iterate'); var anObject = require('../internals/an-object'); $({ target: 'Iterator', proto: true, real: true }, { forEach: function forEach(fn) { iterate(anObject(this), fn, { IS_ITERATOR: true }); } }); }, { "../internals/an-object": 16, "../internals/export": 74, "../internals/iterate": 107 }], 452: [function (require, module, exports) { // https://github.com/tc39/proposal-iterator-helpers var $ = require('../internals/export'); var path = require('../internals/path'); var aFunction = require('../internals/a-function'); var anObject = require('../internals/an-object'); var toObject = require('../internals/to-object'); var createIteratorProxy = require('../internals/iterator-create-proxy'); var getIteratorMethod = require('../internals/get-iterator-method'); var Iterator = path.Iterator; var IteratorProxy = createIteratorProxy(function (arg) { var result = anObject(this.next.call(this.iterator, arg)); var done = this.done = !!result.done; if (!done) return result.value; }, true); $({ target: 'Iterator', stat: true }, { from: function from(O) { var object = toObject(O); var usingIterator = getIteratorMethod(object); var iterator; if (usingIterator != null) { iterator = aFunction(usingIterator).call(object); if (iterator instanceof Iterator) return iterator; } else { iterator = object; } return new IteratorProxy({ iterator: iterator }); } }); }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/export": 74, "../internals/get-iterator-method": 83, "../internals/iterator-create-proxy": 109, "../internals/path": 148, "../internals/to-object": 185 }], 453: [function (require, module, exports) { 'use strict'; // https://github.com/tc39/proposal-iterator-helpers var $ = require('../internals/export'); var aFunction = require('../internals/a-function'); var anObject = require('../internals/an-object'); var createIteratorProxy = require('../internals/iterator-create-proxy'); var callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing'); var IteratorProxy = createIteratorProxy(function (arg) { var iterator = this.iterator; var result = anObject(this.next.call(iterator, arg)); var done = this.done = !!result.done; if (!done) return callWithSafeIterationClosing(iterator, this.mapper, result.value); }); $({ target: 'Iterator', proto: true, real: true }, { map: function map(mapper) { return new IteratorProxy({ iterator: anObject(this), mapper: aFunction(mapper) }); } }); }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/call-with-safe-iteration-closing": 37, "../internals/export": 74, "../internals/iterator-create-proxy": 109 }], 454: [function (require, module, exports) { 'use strict'; // https://github.com/tc39/proposal-iterator-helpers var $ = require('../internals/export'); var iterate = require('../internals/iterate'); var aFunction = require('../internals/a-function'); var anObject = require('../internals/an-object'); $({ target: 'Iterator', proto: true, real: true }, { reduce: function reduce(reducer /* , initialValue */ ) { anObject(this); aFunction(reducer); var noInitial = arguments.length < 2; var accumulator = noInitial ? undefined : arguments[1]; iterate(this, function (value) { if (noInitial) { noInitial = false; accumulator = value; } else { accumulator = reducer(accumulator, value); } }, { IS_ITERATOR: true }); if (noInitial) throw TypeError('Reduce of empty iterator with no initial value'); return accumulator; } }); }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/export": 74, "../internals/iterate": 107 }], 455: [function (require, module, exports) { 'use strict'; // https://github.com/tc39/proposal-iterator-helpers var $ = require('../internals/export'); var iterate = require('../internals/iterate'); var aFunction = require('../internals/a-function'); var anObject = require('../internals/an-object'); $({ target: 'Iterator', proto: true, real: true }, { some: function some(fn) { anObject(this); aFunction(fn); return iterate(this, function (value, stop) { if (fn(value)) return stop(); }, { IS_ITERATOR: true, INTERRUPTED: true }).stopped; } }); }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/export": 74, "../internals/iterate": 107 }], 456: [function (require, module, exports) { 'use strict'; // https://github.com/tc39/proposal-iterator-helpers var $ = require('../internals/export'); var anObject = require('../internals/an-object'); var toPositiveInteger = require('../internals/to-positive-integer'); var createIteratorProxy = require('../internals/iterator-create-proxy'); var iteratorClose = require('../internals/iterator-close'); var IteratorProxy = createIteratorProxy(function (arg) { var iterator = this.iterator; if (!this.remaining--) { this.done = true; return iteratorClose(iterator); } var result = anObject(this.next.call(iterator, arg)); var done = this.done = !!result.done; if (!done) return result.value; }); $({ target: 'Iterator', proto: true, real: true }, { take: function take(limit) { return new IteratorProxy({ iterator: anObject(this), remaining: toPositiveInteger(limit) }); } }); }, { "../internals/an-object": 16, "../internals/export": 74, "../internals/iterator-close": 108, "../internals/iterator-create-proxy": 109, "../internals/to-positive-integer": 187 }], 457: [function (require, module, exports) { 'use strict'; // https://github.com/tc39/proposal-iterator-helpers var $ = require('../internals/export'); var iterate = require('../internals/iterate'); var anObject = require('../internals/an-object'); var push = [].push; $({ target: 'Iterator', proto: true, real: true }, { toArray: function toArray() { var result = []; iterate(anObject(this), push, { that: result, IS_ITERATOR: true }); return result; } }); }, { "../internals/an-object": 16, "../internals/export": 74, "../internals/iterate": 107 }], 458: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var collectionDeleteAll = require('../internals/collection-delete-all'); // `Map.prototype.deleteAll` method // https://github.com/tc39/proposal-collection-methods $({ target: 'Map', proto: true, real: true, forced: IS_PURE }, { deleteAll: function deleteAll() /* ...elements */ { return collectionDeleteAll.apply(this, arguments); } }); }, { "../internals/collection-delete-all": 42, "../internals/export": 74, "../internals/is-pure": 105 }], 459: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var $emplace = require('../internals/map-emplace'); // `Map.prototype.emplace` method // https://github.com/thumbsupep/proposal-upsert $({ target: 'Map', proto: true, real: true, forced: IS_PURE }, { emplace: $emplace }); }, { "../internals/export": 74, "../internals/is-pure": 105, "../internals/map-emplace": 112 }], 460: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var anObject = require('../internals/an-object'); var bind = require('../internals/function-bind-context'); var getMapIterator = require('../internals/get-map-iterator'); var iterate = require('../internals/iterate'); // `Map.prototype.every` method // https://github.com/tc39/proposal-collection-methods $({ target: 'Map', proto: true, real: true, forced: IS_PURE }, { every: function every(callbackfn /* , thisArg */ ) { var map = anObject(this); var iterator = getMapIterator(map); var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); return !iterate(iterator, function (key, value, stop) { if (!boundFunction(value, key, map)) return stop(); }, { AS_ENTRIES: true, IS_ITERATOR: true, INTERRUPTED: true }).stopped; } }); }, { "../internals/an-object": 16, "../internals/export": 74, "../internals/function-bind-context": 79, "../internals/get-map-iterator": 85, "../internals/is-pure": 105, "../internals/iterate": 107 }], 461: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var getBuiltIn = require('../internals/get-built-in'); var anObject = require('../internals/an-object'); var aFunction = require('../internals/a-function'); var bind = require('../internals/function-bind-context'); var speciesConstructor = require('../internals/species-constructor'); var getMapIterator = require('../internals/get-map-iterator'); var iterate = require('../internals/iterate'); // `Map.prototype.filter` method // https://github.com/tc39/proposal-collection-methods $({ target: 'Map', proto: true, real: true, forced: IS_PURE }, { filter: function filter(callbackfn /* , thisArg */ ) { var map = anObject(this); var iterator = getMapIterator(map); var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); var newMap = new (speciesConstructor(map, getBuiltIn('Map')))(); var setter = aFunction(newMap.set); iterate(iterator, function (key, value) { if (boundFunction(value, key, map)) setter.call(newMap, key, value); }, { AS_ENTRIES: true, IS_ITERATOR: true }); return newMap; } }); }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/export": 74, "../internals/function-bind-context": 79, "../internals/get-built-in": 82, "../internals/get-map-iterator": 85, "../internals/is-pure": 105, "../internals/iterate": 107, "../internals/species-constructor": 169 }], 462: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var anObject = require('../internals/an-object'); var bind = require('../internals/function-bind-context'); var getMapIterator = require('../internals/get-map-iterator'); var iterate = require('../internals/iterate'); // `Map.prototype.findKey` method // https://github.com/tc39/proposal-collection-methods $({ target: 'Map', proto: true, real: true, forced: IS_PURE }, { findKey: function findKey(callbackfn /* , thisArg */ ) { var map = anObject(this); var iterator = getMapIterator(map); var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); return iterate(iterator, function (key, value, stop) { if (boundFunction(value, key, map)) return stop(key); }, { AS_ENTRIES: true, IS_ITERATOR: true, INTERRUPTED: true }).result; } }); }, { "../internals/an-object": 16, "../internals/export": 74, "../internals/function-bind-context": 79, "../internals/get-map-iterator": 85, "../internals/is-pure": 105, "../internals/iterate": 107 }], 463: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var anObject = require('../internals/an-object'); var bind = require('../internals/function-bind-context'); var getMapIterator = require('../internals/get-map-iterator'); var iterate = require('../internals/iterate'); // `Map.prototype.find` method // https://github.com/tc39/proposal-collection-methods $({ target: 'Map', proto: true, real: true, forced: IS_PURE }, { find: function find(callbackfn /* , thisArg */ ) { var map = anObject(this); var iterator = getMapIterator(map); var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); return iterate(iterator, function (key, value, stop) { if (boundFunction(value, key, map)) return stop(value); }, { AS_ENTRIES: true, IS_ITERATOR: true, INTERRUPTED: true }).result; } }); }, { "../internals/an-object": 16, "../internals/export": 74, "../internals/function-bind-context": 79, "../internals/get-map-iterator": 85, "../internals/is-pure": 105, "../internals/iterate": 107 }], 464: [function (require, module, exports) { var $ = require('../internals/export'); var from = require('../internals/collection-from'); // `Map.from` method // https://tc39.github.io/proposal-setmap-offrom/#sec-map.from $({ target: 'Map', stat: true }, { from: from }); }, { "../internals/collection-from": 43, "../internals/export": 74 }], 465: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var iterate = require('../internals/iterate'); var aFunction = require('../internals/a-function'); // `Map.groupBy` method // https://github.com/tc39/proposal-collection-methods $({ target: 'Map', stat: true }, { groupBy: function groupBy(iterable, keyDerivative) { var newMap = new this(); aFunction(keyDerivative); var has = aFunction(newMap.has); var get = aFunction(newMap.get); var set = aFunction(newMap.set); iterate(iterable, function (element) { var derivedKey = keyDerivative(element); if (!has.call(newMap, derivedKey)) set.call(newMap, derivedKey, [element]);else get.call(newMap, derivedKey).push(element); }); return newMap; } }); }, { "../internals/a-function": 11, "../internals/export": 74, "../internals/iterate": 107 }], 466: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var anObject = require('../internals/an-object'); var getMapIterator = require('../internals/get-map-iterator'); var sameValueZero = require('../internals/same-value-zero'); var iterate = require('../internals/iterate'); // `Map.prototype.includes` method // https://github.com/tc39/proposal-collection-methods $({ target: 'Map', proto: true, real: true, forced: IS_PURE }, { includes: function includes(searchElement) { return iterate(getMapIterator(anObject(this)), function (key, value, stop) { if (sameValueZero(value, searchElement)) return stop(); }, { AS_ENTRIES: true, IS_ITERATOR: true, INTERRUPTED: true }).stopped; } }); }, { "../internals/an-object": 16, "../internals/export": 74, "../internals/get-map-iterator": 85, "../internals/is-pure": 105, "../internals/iterate": 107, "../internals/same-value-zero": 161 }], 467: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var iterate = require('../internals/iterate'); var aFunction = require('../internals/a-function'); // `Map.keyBy` method // https://github.com/tc39/proposal-collection-methods $({ target: 'Map', stat: true }, { keyBy: function keyBy(iterable, keyDerivative) { var newMap = new this(); aFunction(keyDerivative); var setter = aFunction(newMap.set); iterate(iterable, function (element) { setter.call(newMap, keyDerivative(element), element); }); return newMap; } }); }, { "../internals/a-function": 11, "../internals/export": 74, "../internals/iterate": 107 }], 468: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var anObject = require('../internals/an-object'); var getMapIterator = require('../internals/get-map-iterator'); var iterate = require('../internals/iterate'); // `Map.prototype.includes` method // https://github.com/tc39/proposal-collection-methods $({ target: 'Map', proto: true, real: true, forced: IS_PURE }, { keyOf: function keyOf(searchElement) { return iterate(getMapIterator(anObject(this)), function (key, value, stop) { if (value === searchElement) return stop(key); }, { AS_ENTRIES: true, IS_ITERATOR: true, INTERRUPTED: true }).result; } }); }, { "../internals/an-object": 16, "../internals/export": 74, "../internals/get-map-iterator": 85, "../internals/is-pure": 105, "../internals/iterate": 107 }], 469: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var getBuiltIn = require('../internals/get-built-in'); var anObject = require('../internals/an-object'); var aFunction = require('../internals/a-function'); var bind = require('../internals/function-bind-context'); var speciesConstructor = require('../internals/species-constructor'); var getMapIterator = require('../internals/get-map-iterator'); var iterate = require('../internals/iterate'); // `Map.prototype.mapKeys` method // https://github.com/tc39/proposal-collection-methods $({ target: 'Map', proto: true, real: true, forced: IS_PURE }, { mapKeys: function mapKeys(callbackfn /* , thisArg */ ) { var map = anObject(this); var iterator = getMapIterator(map); var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); var newMap = new (speciesConstructor(map, getBuiltIn('Map')))(); var setter = aFunction(newMap.set); iterate(iterator, function (key, value) { setter.call(newMap, boundFunction(value, key, map), value); }, { AS_ENTRIES: true, IS_ITERATOR: true }); return newMap; } }); }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/export": 74, "../internals/function-bind-context": 79, "../internals/get-built-in": 82, "../internals/get-map-iterator": 85, "../internals/is-pure": 105, "../internals/iterate": 107, "../internals/species-constructor": 169 }], 470: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var getBuiltIn = require('../internals/get-built-in'); var anObject = require('../internals/an-object'); var aFunction = require('../internals/a-function'); var bind = require('../internals/function-bind-context'); var speciesConstructor = require('../internals/species-constructor'); var getMapIterator = require('../internals/get-map-iterator'); var iterate = require('../internals/iterate'); // `Map.prototype.mapValues` method // https://github.com/tc39/proposal-collection-methods $({ target: 'Map', proto: true, real: true, forced: IS_PURE }, { mapValues: function mapValues(callbackfn /* , thisArg */ ) { var map = anObject(this); var iterator = getMapIterator(map); var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); var newMap = new (speciesConstructor(map, getBuiltIn('Map')))(); var setter = aFunction(newMap.set); iterate(iterator, function (key, value) { setter.call(newMap, key, boundFunction(value, key, map)); }, { AS_ENTRIES: true, IS_ITERATOR: true }); return newMap; } }); }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/export": 74, "../internals/function-bind-context": 79, "../internals/get-built-in": 82, "../internals/get-map-iterator": 85, "../internals/is-pure": 105, "../internals/iterate": 107, "../internals/species-constructor": 169 }], 471: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var anObject = require('../internals/an-object'); var aFunction = require('../internals/a-function'); var iterate = require('../internals/iterate'); // `Map.prototype.merge` method // https://github.com/tc39/proposal-collection-methods $({ target: 'Map', proto: true, real: true, forced: IS_PURE }, { // eslint-disable-next-line no-unused-vars -- required for `.length` merge: function merge(iterable /* ...iterbles */ ) { var map = anObject(this); var setter = aFunction(map.set); var i = 0; while (i < arguments.length) { iterate(arguments[i++], setter, { that: map, AS_ENTRIES: true }); } return map; } }); }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/export": 74, "../internals/is-pure": 105, "../internals/iterate": 107 }], 472: [function (require, module, exports) { var $ = require('../internals/export'); var of = require('../internals/collection-of'); // `Map.of` method // https://tc39.github.io/proposal-setmap-offrom/#sec-map.of $({ target: 'Map', stat: true }, { of: of }); }, { "../internals/collection-of": 44, "../internals/export": 74 }], 473: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var anObject = require('../internals/an-object'); var aFunction = require('../internals/a-function'); var getMapIterator = require('../internals/get-map-iterator'); var iterate = require('../internals/iterate'); // `Map.prototype.reduce` method // https://github.com/tc39/proposal-collection-methods $({ target: 'Map', proto: true, real: true, forced: IS_PURE }, { reduce: function reduce(callbackfn /* , initialValue */ ) { var map = anObject(this); var iterator = getMapIterator(map); var noInitial = arguments.length < 2; var accumulator = noInitial ? undefined : arguments[1]; aFunction(callbackfn); iterate(iterator, function (key, value) { if (noInitial) { noInitial = false; accumulator = value; } else { accumulator = callbackfn(accumulator, value, key, map); } }, { AS_ENTRIES: true, IS_ITERATOR: true }); if (noInitial) throw TypeError('Reduce of empty map with no initial value'); return accumulator; } }); }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/export": 74, "../internals/get-map-iterator": 85, "../internals/is-pure": 105, "../internals/iterate": 107 }], 474: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var anObject = require('../internals/an-object'); var bind = require('../internals/function-bind-context'); var getMapIterator = require('../internals/get-map-iterator'); var iterate = require('../internals/iterate'); // `Set.prototype.some` method // https://github.com/tc39/proposal-collection-methods $({ target: 'Map', proto: true, real: true, forced: IS_PURE }, { some: function some(callbackfn /* , thisArg */ ) { var map = anObject(this); var iterator = getMapIterator(map); var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); return iterate(iterator, function (key, value, stop) { if (boundFunction(value, key, map)) return stop(); }, { AS_ENTRIES: true, IS_ITERATOR: true, INTERRUPTED: true }).stopped; } }); }, { "../internals/an-object": 16, "../internals/export": 74, "../internals/function-bind-context": 79, "../internals/get-map-iterator": 85, "../internals/is-pure": 105, "../internals/iterate": 107 }], 475: [function (require, module, exports) { 'use strict'; // TODO: remove from `core-js@4` var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var $upsert = require('../internals/map-upsert'); // `Map.prototype.updateOrInsert` method (replaced by `Map.prototype.emplace`) // https://github.com/thumbsupep/proposal-upsert $({ target: 'Map', proto: true, real: true, forced: IS_PURE }, { updateOrInsert: $upsert }); }, { "../internals/export": 74, "../internals/is-pure": 105, "../internals/map-upsert": 113 }], 476: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var anObject = require('../internals/an-object'); var aFunction = require('../internals/a-function'); // `Set.prototype.update` method // https://github.com/tc39/proposal-collection-methods $({ target: 'Map', proto: true, real: true, forced: IS_PURE }, { update: function update(key, callback /* , thunk */ ) { var map = anObject(this); var length = arguments.length; aFunction(callback); var isPresentInMap = map.has(key); if (!isPresentInMap && length < 3) { throw TypeError('Updating absent value'); } var value = isPresentInMap ? map.get(key) : aFunction(length > 2 ? arguments[2] : undefined)(key, map); map.set(key, callback(value, key, map)); return map; } }); }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/export": 74, "../internals/is-pure": 105 }], 477: [function (require, module, exports) { 'use strict'; // TODO: remove from `core-js@4` var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var $upsert = require('../internals/map-upsert'); // `Map.prototype.upsert` method (replaced by `Map.prototype.emplace`) // https://github.com/thumbsupep/proposal-upsert $({ target: 'Map', proto: true, real: true, forced: IS_PURE }, { upsert: $upsert }); }, { "../internals/export": 74, "../internals/is-pure": 105, "../internals/map-upsert": 113 }], 478: [function (require, module, exports) { var $ = require('../internals/export'); var min = Math.min; var max = Math.max; // `Math.clamp` method // https://rwaldron.github.io/proposal-math-extensions/ $({ target: 'Math', stat: true }, { clamp: function clamp(x, lower, upper) { return min(upper, max(lower, x)); } }); }, { "../internals/export": 74 }], 479: [function (require, module, exports) { var $ = require('../internals/export'); // `Math.DEG_PER_RAD` constant // https://rwaldron.github.io/proposal-math-extensions/ $({ target: 'Math', stat: true }, { DEG_PER_RAD: Math.PI / 180 }); }, { "../internals/export": 74 }], 480: [function (require, module, exports) { var $ = require('../internals/export'); var RAD_PER_DEG = 180 / Math.PI; // `Math.degrees` method // https://rwaldron.github.io/proposal-math-extensions/ $({ target: 'Math', stat: true }, { degrees: function degrees(radians) { return radians * RAD_PER_DEG; } }); }, { "../internals/export": 74 }], 481: [function (require, module, exports) { var $ = require('../internals/export'); var scale = require('../internals/math-scale'); var fround = require('../internals/math-fround'); // `Math.fscale` method // https://rwaldron.github.io/proposal-math-extensions/ $({ target: 'Math', stat: true }, { fscale: function fscale(x, inLow, inHigh, outLow, outHigh) { return fround(scale(x, inLow, inHigh, outLow, outHigh)); } }); }, { "../internals/export": 74, "../internals/math-fround": 115, "../internals/math-scale": 117 }], 482: [function (require, module, exports) { var $ = require('../internals/export'); // `Math.iaddh` method // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 // TODO: Remove from `core-js@4` $({ target: 'Math', stat: true }, { iaddh: function iaddh(x0, x1, y0, y1) { var $x0 = x0 >>> 0; var $x1 = x1 >>> 0; var $y0 = y0 >>> 0; return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0; } }); }, { "../internals/export": 74 }], 483: [function (require, module, exports) { var $ = require('../internals/export'); // `Math.imulh` method // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 // TODO: Remove from `core-js@4` $({ target: 'Math', stat: true }, { imulh: function imulh(u, v) { var UINT16 = 0xFFFF; var $u = +u; var $v = +v; var u0 = $u & UINT16; var v0 = $v & UINT16; var u1 = $u >> 16; var v1 = $v >> 16; var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16); } }); }, { "../internals/export": 74 }], 484: [function (require, module, exports) { var $ = require('../internals/export'); // `Math.isubh` method // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 // TODO: Remove from `core-js@4` $({ target: 'Math', stat: true }, { isubh: function isubh(x0, x1, y0, y1) { var $x0 = x0 >>> 0; var $x1 = x1 >>> 0; var $y0 = y0 >>> 0; return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0; } }); }, { "../internals/export": 74 }], 485: [function (require, module, exports) { var $ = require('../internals/export'); // `Math.RAD_PER_DEG` constant // https://rwaldron.github.io/proposal-math-extensions/ $({ target: 'Math', stat: true }, { RAD_PER_DEG: 180 / Math.PI }); }, { "../internals/export": 74 }], 486: [function (require, module, exports) { var $ = require('../internals/export'); var DEG_PER_RAD = Math.PI / 180; // `Math.radians` method // https://rwaldron.github.io/proposal-math-extensions/ $({ target: 'Math', stat: true }, { radians: function radians(degrees) { return degrees * DEG_PER_RAD; } }); }, { "../internals/export": 74 }], 487: [function (require, module, exports) { var $ = require('../internals/export'); var scale = require('../internals/math-scale'); // `Math.scale` method // https://rwaldron.github.io/proposal-math-extensions/ $({ target: 'Math', stat: true }, { scale: scale }); }, { "../internals/export": 74, "../internals/math-scale": 117 }], 488: [function (require, module, exports) { var $ = require('../internals/export'); var anObject = require('../internals/an-object'); var numberIsFinite = require('../internals/number-is-finite'); var createIteratorConstructor = require('../internals/create-iterator-constructor'); var InternalStateModule = require('../internals/internal-state'); var SEEDED_RANDOM = 'Seeded Random'; var SEEDED_RANDOM_GENERATOR = SEEDED_RANDOM + ' Generator'; var setInternalState = InternalStateModule.set; var getInternalState = InternalStateModule.getterFor(SEEDED_RANDOM_GENERATOR); var SEED_TYPE_ERROR = 'Math.seededPRNG() argument should have a "seed" field with a finite value.'; var $SeededRandomGenerator = createIteratorConstructor(function SeededRandomGenerator(seed) { setInternalState(this, { type: SEEDED_RANDOM_GENERATOR, seed: seed % 2147483647 }); }, SEEDED_RANDOM, function next() { var state = getInternalState(this); var seed = state.seed = (state.seed * 1103515245 + 12345) % 2147483647; return { value: (seed & 1073741823) / 1073741823, done: false }; }); // `Math.seededPRNG` method // https://github.com/tc39/proposal-seeded-random // based on https://github.com/tc39/proposal-seeded-random/blob/78b8258835b57fc2100d076151ab506bc3202ae6/demo.html $({ target: 'Math', stat: true, forced: true }, { seededPRNG: function seededPRNG(it) { var seed = anObject(it).seed; if (!numberIsFinite(seed)) throw TypeError(SEED_TYPE_ERROR); return new $SeededRandomGenerator(seed); } }); }, { "../internals/an-object": 16, "../internals/create-iterator-constructor": 53, "../internals/export": 74, "../internals/internal-state": 99, "../internals/number-is-finite": 126 }], 489: [function (require, module, exports) { var $ = require('../internals/export'); // `Math.signbit` method // https://github.com/tc39/proposal-Math.signbit $({ target: 'Math', stat: true }, { signbit: function signbit(x) { return (x = +x) == x && x == 0 ? 1 / x == -Infinity : x < 0; } }); }, { "../internals/export": 74 }], 490: [function (require, module, exports) { var $ = require('../internals/export'); // `Math.umulh` method // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 // TODO: Remove from `core-js@4` $({ target: 'Math', stat: true }, { umulh: function umulh(u, v) { var UINT16 = 0xFFFF; var $u = +u; var $v = +v; var u0 = $u & UINT16; var v0 = $v & UINT16; var u1 = $u >>> 16; var v1 = $v >>> 16; var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16); } }); }, { "../internals/export": 74 }], 491: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var toInteger = require('../internals/to-integer'); var parseInt = require('../internals/number-parse-int'); var INVALID_NUMBER_REPRESENTATION = 'Invalid number representation'; var INVALID_RADIX = 'Invalid radix'; var valid = /^[\da-z]+$/; // `Number.fromString` method // https://github.com/tc39/proposal-number-fromstring $({ target: 'Number', stat: true }, { fromString: function fromString(string, radix) { var sign = 1; var R, mathNum; if (typeof string != 'string') throw TypeError(INVALID_NUMBER_REPRESENTATION); if (!string.length) throw SyntaxError(INVALID_NUMBER_REPRESENTATION); if (string.charAt(0) == '-') { sign = -1; string = string.slice(1); if (!string.length) throw SyntaxError(INVALID_NUMBER_REPRESENTATION); } R = radix === undefined ? 10 : toInteger(radix); if (R < 2 || R > 36) throw RangeError(INVALID_RADIX); if (!valid.test(string) || (mathNum = parseInt(string, R)).toString(R) !== string) { throw SyntaxError(INVALID_NUMBER_REPRESENTATION); } return sign * mathNum; } }); }, { "../internals/export": 74, "../internals/number-parse-int": 128, "../internals/to-integer": 183 }], 492: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var NumericRangeIterator = require('../internals/numeric-range-iterator'); // `Number.range` method // https://github.com/tc39/proposal-Number.range $({ target: 'Number', stat: true }, { range: function range(start, end, option) { return new NumericRangeIterator(start, end, option, 'number', 0, 1); } }); }, { "../internals/export": 74, "../internals/numeric-range-iterator": 129 }], 493: [function (require, module, exports) { var $ = require('../internals/export'); var hasOwn = require('../internals/has'); // `Object.hasOwn` method // https://github.com/tc39/proposal-accessible-object-hasownproperty $({ target: 'Object', stat: true }, { hasOwn: hasOwn }); }, { "../internals/export": 74, "../internals/has": 89 }], 494: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var ObjectIterator = require('../internals/object-iterator'); // `Object.iterateEntries` method // https://github.com/tc39/proposal-object-iteration $({ target: 'Object', stat: true }, { iterateEntries: function iterateEntries(object) { return new ObjectIterator(object, 'entries'); } }); }, { "../internals/export": 74, "../internals/object-iterator": 139 }], 495: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var ObjectIterator = require('../internals/object-iterator'); // `Object.iterateKeys` method // https://github.com/tc39/proposal-object-iteration $({ target: 'Object', stat: true }, { iterateKeys: function iterateKeys(object) { return new ObjectIterator(object, 'keys'); } }); }, { "../internals/export": 74, "../internals/object-iterator": 139 }], 496: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var ObjectIterator = require('../internals/object-iterator'); // `Object.iterateValues` method // https://github.com/tc39/proposal-object-iteration $({ target: 'Object', stat: true }, { iterateValues: function iterateValues(object) { return new ObjectIterator(object, 'values'); } }); }, { "../internals/export": 74, "../internals/object-iterator": 139 }], 497: [function (require, module, exports) { 'use strict'; // https://github.com/tc39/proposal-observable var $ = require('../internals/export'); var DESCRIPTORS = require('../internals/descriptors'); var setSpecies = require('../internals/set-species'); var aFunction = require('../internals/a-function'); var anObject = require('../internals/an-object'); var isObject = require('../internals/is-object'); var anInstance = require('../internals/an-instance'); var defineProperty = require('../internals/object-define-property').f; var createNonEnumerableProperty = require('../internals/create-non-enumerable-property'); var redefineAll = require('../internals/redefine-all'); var getIterator = require('../internals/get-iterator'); var iterate = require('../internals/iterate'); var hostReportErrors = require('../internals/host-report-errors'); var wellKnownSymbol = require('../internals/well-known-symbol'); var InternalStateModule = require('../internals/internal-state'); var OBSERVABLE = wellKnownSymbol('observable'); var getInternalState = InternalStateModule.get; var setInternalState = InternalStateModule.set; var getMethod = function getMethod(fn) { return fn == null ? undefined : aFunction(fn); }; var cleanupSubscription = function cleanupSubscription(subscriptionState) { var cleanup = subscriptionState.cleanup; if (cleanup) { subscriptionState.cleanup = undefined; try { cleanup(); } catch (error) { hostReportErrors(error); } } }; var subscriptionClosed = function subscriptionClosed(subscriptionState) { return subscriptionState.observer === undefined; }; var close = function close(subscriptionState) { var subscription = subscriptionState.facade; if (!DESCRIPTORS) { subscription.closed = true; var subscriptionObserver = subscriptionState.subscriptionObserver; if (subscriptionObserver) subscriptionObserver.closed = true; } subscriptionState.observer = undefined; }; var Subscription = function Subscription(observer, subscriber) { var subscriptionState = setInternalState(this, { cleanup: undefined, observer: anObject(observer), subscriptionObserver: undefined }); var start; if (!DESCRIPTORS) this.closed = false; try { if (start = getMethod(observer.start)) start.call(observer, this); } catch (error) { hostReportErrors(error); } if (subscriptionClosed(subscriptionState)) return; var subscriptionObserver = subscriptionState.subscriptionObserver = new SubscriptionObserver(this); try { var cleanup = subscriber(subscriptionObserver); var subscription = cleanup; if (cleanup != null) subscriptionState.cleanup = typeof cleanup.unsubscribe === 'function' ? function () { subscription.unsubscribe(); } : aFunction(cleanup); } catch (error) { subscriptionObserver.error(error); return; } if (subscriptionClosed(subscriptionState)) cleanupSubscription(subscriptionState); }; Subscription.prototype = redefineAll({}, { unsubscribe: function unsubscribe() { var subscriptionState = getInternalState(this); if (!subscriptionClosed(subscriptionState)) { close(subscriptionState); cleanupSubscription(subscriptionState); } } }); if (DESCRIPTORS) defineProperty(Subscription.prototype, 'closed', { configurable: true, get: function get() { return subscriptionClosed(getInternalState(this)); } }); var SubscriptionObserver = function SubscriptionObserver(subscription) { setInternalState(this, { subscription: subscription }); if (!DESCRIPTORS) this.closed = false; }; SubscriptionObserver.prototype = redefineAll({}, { next: function next(value) { var subscriptionState = getInternalState(getInternalState(this).subscription); if (!subscriptionClosed(subscriptionState)) { var observer = subscriptionState.observer; try { var nextMethod = getMethod(observer.next); if (nextMethod) nextMethod.call(observer, value); } catch (error) { hostReportErrors(error); } } }, error: function error(value) { var subscriptionState = getInternalState(getInternalState(this).subscription); if (!subscriptionClosed(subscriptionState)) { var observer = subscriptionState.observer; close(subscriptionState); try { var errorMethod = getMethod(observer.error); if (errorMethod) errorMethod.call(observer, value);else hostReportErrors(value); } catch (err) { hostReportErrors(err); } cleanupSubscription(subscriptionState); } }, complete: function complete() { var subscriptionState = getInternalState(getInternalState(this).subscription); if (!subscriptionClosed(subscriptionState)) { var observer = subscriptionState.observer; close(subscriptionState); try { var completeMethod = getMethod(observer.complete); if (completeMethod) completeMethod.call(observer); } catch (error) { hostReportErrors(error); } cleanupSubscription(subscriptionState); } } }); if (DESCRIPTORS) defineProperty(SubscriptionObserver.prototype, 'closed', { configurable: true, get: function get() { return subscriptionClosed(getInternalState(getInternalState(this).subscription)); } }); var $Observable = function Observable(subscriber) { anInstance(this, $Observable, 'Observable'); setInternalState(this, { subscriber: aFunction(subscriber) }); }; redefineAll($Observable.prototype, { subscribe: function subscribe(observer) { var length = arguments.length; return new Subscription(typeof observer === 'function' ? { next: observer, error: length > 1 ? arguments[1] : undefined, complete: length > 2 ? arguments[2] : undefined } : isObject(observer) ? observer : {}, getInternalState(this).subscriber); } }); redefineAll($Observable, { from: function from(x) { var C = typeof this === 'function' ? this : $Observable; var observableMethod = getMethod(anObject(x)[OBSERVABLE]); if (observableMethod) { var observable = anObject(observableMethod.call(x)); return observable.constructor === C ? observable : new C(function (observer) { return observable.subscribe(observer); }); } var iterator = getIterator(x); return new C(function (observer) { iterate(iterator, function (it, stop) { observer.next(it); if (observer.closed) return stop(); }, { IS_ITERATOR: true, INTERRUPTED: true }); observer.complete(); }); }, of: function of() { var C = typeof this === 'function' ? this : $Observable; var length = arguments.length; var items = new Array(length); var index = 0; while (index < length) { items[index] = arguments[index++]; } return new C(function (observer) { for (var i = 0; i < length; i++) { observer.next(items[i]); if (observer.closed) return; } observer.complete(); }); } }); createNonEnumerableProperty($Observable.prototype, OBSERVABLE, function () { return this; }); $({ global: true }, { Observable: $Observable }); setSpecies('Observable'); }, { "../internals/a-function": 11, "../internals/an-instance": 15, "../internals/an-object": 16, "../internals/create-non-enumerable-property": 54, "../internals/descriptors": 61, "../internals/export": 74, "../internals/get-iterator": 84, "../internals/host-report-errors": 91, "../internals/internal-state": 99, "../internals/is-object": 104, "../internals/iterate": 107, "../internals/object-define-property": 133, "../internals/redefine-all": 151, "../internals/set-species": 164, "../internals/well-known-symbol": 197 }], 498: [function (require, module, exports) { // TODO: Remove from `core-js@4` require('./es.promise.all-settled.js'); }, { "./es.promise.all-settled.js": 306 }], 499: [function (require, module, exports) { // TODO: Remove from `core-js@4` require('./es.promise.any'); }, { "./es.promise.any": 307 }], 500: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var newPromiseCapabilityModule = require('../internals/new-promise-capability'); var perform = require('../internals/perform'); // `Promise.try` method // https://github.com/tc39/proposal-promise-try $({ target: 'Promise', stat: true }, { 'try': function _try(callbackfn) { var promiseCapability = newPromiseCapabilityModule.f(this); var result = perform(callbackfn); (result.error ? promiseCapability.reject : promiseCapability.resolve)(result.value); return promiseCapability.promise; } }); }, { "../internals/export": 74, "../internals/new-promise-capability": 124, "../internals/perform": 149 }], 501: [function (require, module, exports) { var $ = require('../internals/export'); var ReflectMetadataModule = require('../internals/reflect-metadata'); var anObject = require('../internals/an-object'); var toMetadataKey = ReflectMetadataModule.toKey; var ordinaryDefineOwnMetadata = ReflectMetadataModule.set; // `Reflect.defineMetadata` method // https://github.com/rbuckton/reflect-metadata $({ target: 'Reflect', stat: true }, { defineMetadata: function defineMetadata(metadataKey, metadataValue, target /* , targetKey */ ) { var targetKey = arguments.length < 4 ? undefined : toMetadataKey(arguments[3]); ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), targetKey); } }); }, { "../internals/an-object": 16, "../internals/export": 74, "../internals/reflect-metadata": 153 }], 502: [function (require, module, exports) { var $ = require('../internals/export'); var ReflectMetadataModule = require('../internals/reflect-metadata'); var anObject = require('../internals/an-object'); var toMetadataKey = ReflectMetadataModule.toKey; var getOrCreateMetadataMap = ReflectMetadataModule.getMap; var store = ReflectMetadataModule.store; // `Reflect.deleteMetadata` method // https://github.com/rbuckton/reflect-metadata $({ target: 'Reflect', stat: true }, { deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */ ) { var targetKey = arguments.length < 3 ? undefined : toMetadataKey(arguments[2]); var metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false); if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false; if (metadataMap.size) return true; var targetMetadata = store.get(target); targetMetadata['delete'](targetKey); return !!targetMetadata.size || store['delete'](target); } }); }, { "../internals/an-object": 16, "../internals/export": 74, "../internals/reflect-metadata": 153 }], 503: [function (require, module, exports) { var $ = require('../internals/export'); // TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env` var Set = require('../modules/es.set'); var ReflectMetadataModule = require('../internals/reflect-metadata'); var anObject = require('../internals/an-object'); var getPrototypeOf = require('../internals/object-get-prototype-of'); var iterate = require('../internals/iterate'); var ordinaryOwnMetadataKeys = ReflectMetadataModule.keys; var toMetadataKey = ReflectMetadataModule.toKey; var from = function from(iter) { var result = []; iterate(iter, result.push, { that: result }); return result; }; var ordinaryMetadataKeys = function ordinaryMetadataKeys(O, P) { var oKeys = ordinaryOwnMetadataKeys(O, P); var parent = getPrototypeOf(O); if (parent === null) return oKeys; var pKeys = ordinaryMetadataKeys(parent, P); return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys; }; // `Reflect.getMetadataKeys` method // https://github.com/rbuckton/reflect-metadata $({ target: 'Reflect', stat: true }, { getMetadataKeys: function getMetadataKeys(target /* , targetKey */ ) { var targetKey = arguments.length < 2 ? undefined : toMetadataKey(arguments[1]); return ordinaryMetadataKeys(anObject(target), targetKey); } }); }, { "../internals/an-object": 16, "../internals/export": 74, "../internals/iterate": 107, "../internals/object-get-prototype-of": 138, "../internals/reflect-metadata": 153, "../modules/es.set": 331 }], 504: [function (require, module, exports) { var $ = require('../internals/export'); var ReflectMetadataModule = require('../internals/reflect-metadata'); var anObject = require('../internals/an-object'); var getPrototypeOf = require('../internals/object-get-prototype-of'); var ordinaryHasOwnMetadata = ReflectMetadataModule.has; var ordinaryGetOwnMetadata = ReflectMetadataModule.get; var toMetadataKey = ReflectMetadataModule.toKey; var ordinaryGetMetadata = function ordinaryGetMetadata(MetadataKey, O, P) { var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P); var parent = getPrototypeOf(O); return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined; }; // `Reflect.getMetadata` method // https://github.com/rbuckton/reflect-metadata $({ target: 'Reflect', stat: true }, { getMetadata: function getMetadata(metadataKey, target /* , targetKey */ ) { var targetKey = arguments.length < 3 ? undefined : toMetadataKey(arguments[2]); return ordinaryGetMetadata(metadataKey, anObject(target), targetKey); } }); }, { "../internals/an-object": 16, "../internals/export": 74, "../internals/object-get-prototype-of": 138, "../internals/reflect-metadata": 153 }], 505: [function (require, module, exports) { var $ = require('../internals/export'); var ReflectMetadataModule = require('../internals/reflect-metadata'); var anObject = require('../internals/an-object'); var ordinaryOwnMetadataKeys = ReflectMetadataModule.keys; var toMetadataKey = ReflectMetadataModule.toKey; // `Reflect.getOwnMetadataKeys` method // https://github.com/rbuckton/reflect-metadata $({ target: 'Reflect', stat: true }, { getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */ ) { var targetKey = arguments.length < 2 ? undefined : toMetadataKey(arguments[1]); return ordinaryOwnMetadataKeys(anObject(target), targetKey); } }); }, { "../internals/an-object": 16, "../internals/export": 74, "../internals/reflect-metadata": 153 }], 506: [function (require, module, exports) { var $ = require('../internals/export'); var ReflectMetadataModule = require('../internals/reflect-metadata'); var anObject = require('../internals/an-object'); var ordinaryGetOwnMetadata = ReflectMetadataModule.get; var toMetadataKey = ReflectMetadataModule.toKey; // `Reflect.getOwnMetadata` method // https://github.com/rbuckton/reflect-metadata $({ target: 'Reflect', stat: true }, { getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */ ) { var targetKey = arguments.length < 3 ? undefined : toMetadataKey(arguments[2]); return ordinaryGetOwnMetadata(metadataKey, anObject(target), targetKey); } }); }, { "../internals/an-object": 16, "../internals/export": 74, "../internals/reflect-metadata": 153 }], 507: [function (require, module, exports) { var $ = require('../internals/export'); var ReflectMetadataModule = require('../internals/reflect-metadata'); var anObject = require('../internals/an-object'); var getPrototypeOf = require('../internals/object-get-prototype-of'); var ordinaryHasOwnMetadata = ReflectMetadataModule.has; var toMetadataKey = ReflectMetadataModule.toKey; var ordinaryHasMetadata = function ordinaryHasMetadata(MetadataKey, O, P) { var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); if (hasOwn) return true; var parent = getPrototypeOf(O); return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false; }; // `Reflect.hasMetadata` method // https://github.com/rbuckton/reflect-metadata $({ target: 'Reflect', stat: true }, { hasMetadata: function hasMetadata(metadataKey, target /* , targetKey */ ) { var targetKey = arguments.length < 3 ? undefined : toMetadataKey(arguments[2]); return ordinaryHasMetadata(metadataKey, anObject(target), targetKey); } }); }, { "../internals/an-object": 16, "../internals/export": 74, "../internals/object-get-prototype-of": 138, "../internals/reflect-metadata": 153 }], 508: [function (require, module, exports) { var $ = require('../internals/export'); var ReflectMetadataModule = require('../internals/reflect-metadata'); var anObject = require('../internals/an-object'); var ordinaryHasOwnMetadata = ReflectMetadataModule.has; var toMetadataKey = ReflectMetadataModule.toKey; // `Reflect.hasOwnMetadata` method // https://github.com/rbuckton/reflect-metadata $({ target: 'Reflect', stat: true }, { hasOwnMetadata: function hasOwnMetadata(metadataKey, target /* , targetKey */ ) { var targetKey = arguments.length < 3 ? undefined : toMetadataKey(arguments[2]); return ordinaryHasOwnMetadata(metadataKey, anObject(target), targetKey); } }); }, { "../internals/an-object": 16, "../internals/export": 74, "../internals/reflect-metadata": 153 }], 509: [function (require, module, exports) { var $ = require('../internals/export'); var ReflectMetadataModule = require('../internals/reflect-metadata'); var anObject = require('../internals/an-object'); var toMetadataKey = ReflectMetadataModule.toKey; var ordinaryDefineOwnMetadata = ReflectMetadataModule.set; // `Reflect.metadata` method // https://github.com/rbuckton/reflect-metadata $({ target: 'Reflect', stat: true }, { metadata: function metadata(metadataKey, metadataValue) { return function decorator(target, key) { ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetadataKey(key)); }; } }); }, { "../internals/an-object": 16, "../internals/export": 74, "../internals/reflect-metadata": 153 }], 510: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var collectionAddAll = require('../internals/collection-add-all'); // `Set.prototype.addAll` method // https://github.com/tc39/proposal-collection-methods $({ target: 'Set', proto: true, real: true, forced: IS_PURE }, { addAll: function addAll() /* ...elements */ { return collectionAddAll.apply(this, arguments); } }); }, { "../internals/collection-add-all": 41, "../internals/export": 74, "../internals/is-pure": 105 }], 511: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var collectionDeleteAll = require('../internals/collection-delete-all'); // `Set.prototype.deleteAll` method // https://github.com/tc39/proposal-collection-methods $({ target: 'Set', proto: true, real: true, forced: IS_PURE }, { deleteAll: function deleteAll() /* ...elements */ { return collectionDeleteAll.apply(this, arguments); } }); }, { "../internals/collection-delete-all": 42, "../internals/export": 74, "../internals/is-pure": 105 }], 512: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var getBuiltIn = require('../internals/get-built-in'); var anObject = require('../internals/an-object'); var aFunction = require('../internals/a-function'); var speciesConstructor = require('../internals/species-constructor'); var iterate = require('../internals/iterate'); // `Set.prototype.difference` method // https://github.com/tc39/proposal-set-methods $({ target: 'Set', proto: true, real: true, forced: IS_PURE }, { difference: function difference(iterable) { var set = anObject(this); var newSet = new (speciesConstructor(set, getBuiltIn('Set')))(set); var remover = aFunction(newSet['delete']); iterate(iterable, function (value) { remover.call(newSet, value); }); return newSet; } }); }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/export": 74, "../internals/get-built-in": 82, "../internals/is-pure": 105, "../internals/iterate": 107, "../internals/species-constructor": 169 }], 513: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var anObject = require('../internals/an-object'); var bind = require('../internals/function-bind-context'); var getSetIterator = require('../internals/get-set-iterator'); var iterate = require('../internals/iterate'); // `Set.prototype.every` method // https://github.com/tc39/proposal-collection-methods $({ target: 'Set', proto: true, real: true, forced: IS_PURE }, { every: function every(callbackfn /* , thisArg */ ) { var set = anObject(this); var iterator = getSetIterator(set); var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); return !iterate(iterator, function (value, stop) { if (!boundFunction(value, value, set)) return stop(); }, { IS_ITERATOR: true, INTERRUPTED: true }).stopped; } }); }, { "../internals/an-object": 16, "../internals/export": 74, "../internals/function-bind-context": 79, "../internals/get-set-iterator": 86, "../internals/is-pure": 105, "../internals/iterate": 107 }], 514: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var getBuiltIn = require('../internals/get-built-in'); var anObject = require('../internals/an-object'); var aFunction = require('../internals/a-function'); var bind = require('../internals/function-bind-context'); var speciesConstructor = require('../internals/species-constructor'); var getSetIterator = require('../internals/get-set-iterator'); var iterate = require('../internals/iterate'); // `Set.prototype.filter` method // https://github.com/tc39/proposal-collection-methods $({ target: 'Set', proto: true, real: true, forced: IS_PURE }, { filter: function filter(callbackfn /* , thisArg */ ) { var set = anObject(this); var iterator = getSetIterator(set); var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); var newSet = new (speciesConstructor(set, getBuiltIn('Set')))(); var adder = aFunction(newSet.add); iterate(iterator, function (value) { if (boundFunction(value, value, set)) adder.call(newSet, value); }, { IS_ITERATOR: true }); return newSet; } }); }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/export": 74, "../internals/function-bind-context": 79, "../internals/get-built-in": 82, "../internals/get-set-iterator": 86, "../internals/is-pure": 105, "../internals/iterate": 107, "../internals/species-constructor": 169 }], 515: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var anObject = require('../internals/an-object'); var bind = require('../internals/function-bind-context'); var getSetIterator = require('../internals/get-set-iterator'); var iterate = require('../internals/iterate'); // `Set.prototype.find` method // https://github.com/tc39/proposal-collection-methods $({ target: 'Set', proto: true, real: true, forced: IS_PURE }, { find: function find(callbackfn /* , thisArg */ ) { var set = anObject(this); var iterator = getSetIterator(set); var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); return iterate(iterator, function (value, stop) { if (boundFunction(value, value, set)) return stop(value); }, { IS_ITERATOR: true, INTERRUPTED: true }).result; } }); }, { "../internals/an-object": 16, "../internals/export": 74, "../internals/function-bind-context": 79, "../internals/get-set-iterator": 86, "../internals/is-pure": 105, "../internals/iterate": 107 }], 516: [function (require, module, exports) { var $ = require('../internals/export'); var from = require('../internals/collection-from'); // `Set.from` method // https://tc39.github.io/proposal-setmap-offrom/#sec-set.from $({ target: 'Set', stat: true }, { from: from }); }, { "../internals/collection-from": 43, "../internals/export": 74 }], 517: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var getBuiltIn = require('../internals/get-built-in'); var anObject = require('../internals/an-object'); var aFunction = require('../internals/a-function'); var speciesConstructor = require('../internals/species-constructor'); var iterate = require('../internals/iterate'); // `Set.prototype.intersection` method // https://github.com/tc39/proposal-set-methods $({ target: 'Set', proto: true, real: true, forced: IS_PURE }, { intersection: function intersection(iterable) { var set = anObject(this); var newSet = new (speciesConstructor(set, getBuiltIn('Set')))(); var hasCheck = aFunction(set.has); var adder = aFunction(newSet.add); iterate(iterable, function (value) { if (hasCheck.call(set, value)) adder.call(newSet, value); }); return newSet; } }); }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/export": 74, "../internals/get-built-in": 82, "../internals/is-pure": 105, "../internals/iterate": 107, "../internals/species-constructor": 169 }], 518: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var anObject = require('../internals/an-object'); var aFunction = require('../internals/a-function'); var iterate = require('../internals/iterate'); // `Set.prototype.isDisjointFrom` method // https://tc39.github.io/proposal-set-methods/#Set.prototype.isDisjointFrom $({ target: 'Set', proto: true, real: true, forced: IS_PURE }, { isDisjointFrom: function isDisjointFrom(iterable) { var set = anObject(this); var hasCheck = aFunction(set.has); return !iterate(iterable, function (value, stop) { if (hasCheck.call(set, value) === true) return stop(); }, { INTERRUPTED: true }).stopped; } }); }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/export": 74, "../internals/is-pure": 105, "../internals/iterate": 107 }], 519: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var getBuiltIn = require('../internals/get-built-in'); var anObject = require('../internals/an-object'); var aFunction = require('../internals/a-function'); var getIterator = require('../internals/get-iterator'); var iterate = require('../internals/iterate'); // `Set.prototype.isSubsetOf` method // https://tc39.github.io/proposal-set-methods/#Set.prototype.isSubsetOf $({ target: 'Set', proto: true, real: true, forced: IS_PURE }, { isSubsetOf: function isSubsetOf(iterable) { var iterator = getIterator(this); var otherSet = anObject(iterable); var hasCheck = otherSet.has; if (typeof hasCheck != 'function') { otherSet = new (getBuiltIn('Set'))(iterable); hasCheck = aFunction(otherSet.has); } return !iterate(iterator, function (value, stop) { if (hasCheck.call(otherSet, value) === false) return stop(); }, { IS_ITERATOR: true, INTERRUPTED: true }).stopped; } }); }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/export": 74, "../internals/get-built-in": 82, "../internals/get-iterator": 84, "../internals/is-pure": 105, "../internals/iterate": 107 }], 520: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var anObject = require('../internals/an-object'); var aFunction = require('../internals/a-function'); var iterate = require('../internals/iterate'); // `Set.prototype.isSupersetOf` method // https://tc39.github.io/proposal-set-methods/#Set.prototype.isSupersetOf $({ target: 'Set', proto: true, real: true, forced: IS_PURE }, { isSupersetOf: function isSupersetOf(iterable) { var set = anObject(this); var hasCheck = aFunction(set.has); return !iterate(iterable, function (value, stop) { if (hasCheck.call(set, value) === false) return stop(); }, { INTERRUPTED: true }).stopped; } }); }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/export": 74, "../internals/is-pure": 105, "../internals/iterate": 107 }], 521: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var anObject = require('../internals/an-object'); var getSetIterator = require('../internals/get-set-iterator'); var iterate = require('../internals/iterate'); // `Set.prototype.join` method // https://github.com/tc39/proposal-collection-methods $({ target: 'Set', proto: true, real: true, forced: IS_PURE }, { join: function join(separator) { var set = anObject(this); var iterator = getSetIterator(set); var sep = separator === undefined ? ',' : String(separator); var result = []; iterate(iterator, result.push, { that: result, IS_ITERATOR: true }); return result.join(sep); } }); }, { "../internals/an-object": 16, "../internals/export": 74, "../internals/get-set-iterator": 86, "../internals/is-pure": 105, "../internals/iterate": 107 }], 522: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var getBuiltIn = require('../internals/get-built-in'); var anObject = require('../internals/an-object'); var aFunction = require('../internals/a-function'); var bind = require('../internals/function-bind-context'); var speciesConstructor = require('../internals/species-constructor'); var getSetIterator = require('../internals/get-set-iterator'); var iterate = require('../internals/iterate'); // `Set.prototype.map` method // https://github.com/tc39/proposal-collection-methods $({ target: 'Set', proto: true, real: true, forced: IS_PURE }, { map: function map(callbackfn /* , thisArg */ ) { var set = anObject(this); var iterator = getSetIterator(set); var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); var newSet = new (speciesConstructor(set, getBuiltIn('Set')))(); var adder = aFunction(newSet.add); iterate(iterator, function (value) { adder.call(newSet, boundFunction(value, value, set)); }, { IS_ITERATOR: true }); return newSet; } }); }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/export": 74, "../internals/function-bind-context": 79, "../internals/get-built-in": 82, "../internals/get-set-iterator": 86, "../internals/is-pure": 105, "../internals/iterate": 107, "../internals/species-constructor": 169 }], 523: [function (require, module, exports) { var $ = require('../internals/export'); var of = require('../internals/collection-of'); // `Set.of` method // https://tc39.github.io/proposal-setmap-offrom/#sec-set.of $({ target: 'Set', stat: true }, { of: of }); }, { "../internals/collection-of": 44, "../internals/export": 74 }], 524: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var anObject = require('../internals/an-object'); var aFunction = require('../internals/a-function'); var getSetIterator = require('../internals/get-set-iterator'); var iterate = require('../internals/iterate'); // `Set.prototype.reduce` method // https://github.com/tc39/proposal-collection-methods $({ target: 'Set', proto: true, real: true, forced: IS_PURE }, { reduce: function reduce(callbackfn /* , initialValue */ ) { var set = anObject(this); var iterator = getSetIterator(set); var noInitial = arguments.length < 2; var accumulator = noInitial ? undefined : arguments[1]; aFunction(callbackfn); iterate(iterator, function (value) { if (noInitial) { noInitial = false; accumulator = value; } else { accumulator = callbackfn(accumulator, value, value, set); } }, { IS_ITERATOR: true }); if (noInitial) throw TypeError('Reduce of empty set with no initial value'); return accumulator; } }); }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/export": 74, "../internals/get-set-iterator": 86, "../internals/is-pure": 105, "../internals/iterate": 107 }], 525: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var anObject = require('../internals/an-object'); var bind = require('../internals/function-bind-context'); var getSetIterator = require('../internals/get-set-iterator'); var iterate = require('../internals/iterate'); // `Set.prototype.some` method // https://github.com/tc39/proposal-collection-methods $({ target: 'Set', proto: true, real: true, forced: IS_PURE }, { some: function some(callbackfn /* , thisArg */ ) { var set = anObject(this); var iterator = getSetIterator(set); var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); return iterate(iterator, function (value, stop) { if (boundFunction(value, value, set)) return stop(); }, { IS_ITERATOR: true, INTERRUPTED: true }).stopped; } }); }, { "../internals/an-object": 16, "../internals/export": 74, "../internals/function-bind-context": 79, "../internals/get-set-iterator": 86, "../internals/is-pure": 105, "../internals/iterate": 107 }], 526: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var getBuiltIn = require('../internals/get-built-in'); var anObject = require('../internals/an-object'); var aFunction = require('../internals/a-function'); var speciesConstructor = require('../internals/species-constructor'); var iterate = require('../internals/iterate'); // `Set.prototype.symmetricDifference` method // https://github.com/tc39/proposal-set-methods $({ target: 'Set', proto: true, real: true, forced: IS_PURE }, { symmetricDifference: function symmetricDifference(iterable) { var set = anObject(this); var newSet = new (speciesConstructor(set, getBuiltIn('Set')))(set); var remover = aFunction(newSet['delete']); var adder = aFunction(newSet.add); iterate(iterable, function (value) { remover.call(newSet, value) || adder.call(newSet, value); }); return newSet; } }); }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/export": 74, "../internals/get-built-in": 82, "../internals/is-pure": 105, "../internals/iterate": 107, "../internals/species-constructor": 169 }], 527: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var getBuiltIn = require('../internals/get-built-in'); var anObject = require('../internals/an-object'); var aFunction = require('../internals/a-function'); var speciesConstructor = require('../internals/species-constructor'); var iterate = require('../internals/iterate'); // `Set.prototype.union` method // https://github.com/tc39/proposal-set-methods $({ target: 'Set', proto: true, real: true, forced: IS_PURE }, { union: function union(iterable) { var set = anObject(this); var newSet = new (speciesConstructor(set, getBuiltIn('Set')))(set); iterate(iterable, aFunction(newSet.add), { that: newSet }); return newSet; } }); }, { "../internals/a-function": 11, "../internals/an-object": 16, "../internals/export": 74, "../internals/get-built-in": 82, "../internals/is-pure": 105, "../internals/iterate": 107, "../internals/species-constructor": 169 }], 528: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var charAt = require('../internals/string-multibyte').charAt; var fails = require('../internals/fails'); var FORCED = fails(function () { return '𠮷'.at(0) !== '𠮷'; }); // `String.prototype.at` method // https://github.com/mathiasbynens/String.prototype.at $({ target: 'String', proto: true, forced: FORCED }, { at: function at(pos) { return charAt(this, pos); } }); }, { "../internals/export": 74, "../internals/fails": 75, "../internals/string-multibyte": 171 }], 529: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var createIteratorConstructor = require('../internals/create-iterator-constructor'); var requireObjectCoercible = require('../internals/require-object-coercible'); var InternalStateModule = require('../internals/internal-state'); var StringMultibyteModule = require('../internals/string-multibyte'); var codeAt = StringMultibyteModule.codeAt; var charAt = StringMultibyteModule.charAt; var STRING_ITERATOR = 'String Iterator'; var setInternalState = InternalStateModule.set; var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR); // TODO: unify with String#@@iterator var $StringIterator = createIteratorConstructor(function StringIterator(string) { setInternalState(this, { type: STRING_ITERATOR, string: string, index: 0 }); }, 'String', function next() { var state = getInternalState(this); var string = state.string; var index = state.index; var point; if (index >= string.length) return { value: undefined, done: true }; point = charAt(string, index); state.index += point.length; return { value: { codePoint: codeAt(point, 0), position: index }, done: false }; }); // `String.prototype.codePoints` method // https://github.com/tc39/proposal-string-prototype-codepoints $({ target: 'String', proto: true }, { codePoints: function codePoints() { return new $StringIterator(String(requireObjectCoercible(this))); } }); }, { "../internals/create-iterator-constructor": 53, "../internals/export": 74, "../internals/internal-state": 99, "../internals/require-object-coercible": 160, "../internals/string-multibyte": 171 }], 530: [function (require, module, exports) { // TODO: Remove from `core-js@4` require('./es.string.match-all'); }, { "./es.string.match-all": 346 }], 531: [function (require, module, exports) { // TODO: Remove from `core-js@4` require('./es.string.replace-all'); }, { "./es.string.replace-all": 352 }], 532: [function (require, module, exports) { var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); // `Symbol.asyncDispose` well-known symbol // https://github.com/tc39/proposal-using-statement defineWellKnownSymbol('asyncDispose'); }, { "../internals/define-well-known-symbol": 60 }], 533: [function (require, module, exports) { var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); // `Symbol.dispose` well-known symbol // https://github.com/tc39/proposal-using-statement defineWellKnownSymbol('dispose'); }, { "../internals/define-well-known-symbol": 60 }], 534: [function (require, module, exports) { var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); // `Symbol.matcher` well-known symbol // https://github.com/tc39/proposal-pattern-matching defineWellKnownSymbol('matcher'); }, { "../internals/define-well-known-symbol": 60 }], 535: [function (require, module, exports) { var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); // `Symbol.metadata` well-known symbol // https://github.com/tc39/proposal-decorators defineWellKnownSymbol('metadata'); }, { "../internals/define-well-known-symbol": 60 }], 536: [function (require, module, exports) { var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); // `Symbol.observable` well-known symbol // https://github.com/tc39/proposal-observable defineWellKnownSymbol('observable'); }, { "../internals/define-well-known-symbol": 60 }], 537: [function (require, module, exports) { // TODO: remove from `core-js@4` var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); // `Symbol.patternMatch` well-known symbol // https://github.com/tc39/proposal-pattern-matching defineWellKnownSymbol('patternMatch'); }, { "../internals/define-well-known-symbol": 60 }], 538: [function (require, module, exports) { // TODO: remove from `core-js@4` var defineWellKnownSymbol = require('../internals/define-well-known-symbol'); defineWellKnownSymbol('replaceAll'); }, { "../internals/define-well-known-symbol": 60 }], 539: [function (require, module, exports) { 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var toLength = require('../internals/to-length'); var toInteger = require('../internals/to-integer'); var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.at` method // https://github.com/tc39/proposal-relative-indexing-method exportTypedArrayMethod('at', function at(index) { var O = aTypedArray(this); var len = toLength(O.length); var relativeIndex = toInteger(index); var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex; return k < 0 || k >= len ? undefined : O[k]; }); }, { "../internals/array-buffer-view-core": 18, "../internals/to-integer": 183, "../internals/to-length": 184 }], 540: [function (require, module, exports) { 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var $filterOut = require('../internals/array-iteration').filterOut; var fromSpeciesAndList = require('../internals/typed-array-from-species-and-list'); var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.filterOut` method // https://github.com/tc39/proposal-array-filtering exportTypedArrayMethod('filterOut', function filterOut(callbackfn /* , thisArg */ ) { var list = $filterOut(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); return fromSpeciesAndList(this, list); }); }, { "../internals/array-buffer-view-core": 18, "../internals/array-iteration": 26, "../internals/typed-array-from-species-and-list": 192 }], 541: [function (require, module, exports) { 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var $findLastIndex = require('../internals/array-iteration-from-last').findLastIndex; var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.findLastIndex` method // https://github.com/tc39/proposal-array-find-from-last exportTypedArrayMethod('findLastIndex', function findLastIndex(predicate /* , thisArg */ ) { return $findLastIndex(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined); }); }, { "../internals/array-buffer-view-core": 18, "../internals/array-iteration-from-last": 25 }], 542: [function (require, module, exports) { 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var $findLast = require('../internals/array-iteration-from-last').findLast; var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.findLast` method // https://github.com/tc39/proposal-array-find-from-last exportTypedArrayMethod('findLast', function findLast(predicate /* , thisArg */ ) { return $findLast(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined); }); }, { "../internals/array-buffer-view-core": 18, "../internals/array-iteration-from-last": 25 }], 543: [function (require, module, exports) { 'use strict'; var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); var arrayUniqueBy = require('../internals/array-unique-by'); var fromSpeciesAndList = require('../internals/typed-array-from-species-and-list'); var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.uniqueBy` method // https://github.com/tc39/proposal-array-unique exportTypedArrayMethod('uniqueBy', function uniqueBy(resolver) { return fromSpeciesAndList(this, arrayUniqueBy.call(aTypedArray(this), resolver)); }); }, { "../internals/array-buffer-view-core": 18, "../internals/array-unique-by": 33, "../internals/typed-array-from-species-and-list": 192 }], 544: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var collectionDeleteAll = require('../internals/collection-delete-all'); // `WeakMap.prototype.deleteAll` method // https://github.com/tc39/proposal-collection-methods $({ target: 'WeakMap', proto: true, real: true, forced: IS_PURE }, { deleteAll: function deleteAll() /* ...elements */ { return collectionDeleteAll.apply(this, arguments); } }); }, { "../internals/collection-delete-all": 42, "../internals/export": 74, "../internals/is-pure": 105 }], 545: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var $emplace = require('../internals/map-emplace'); // `WeakMap.prototype.emplace` method // https://github.com/tc39/proposal-upsert $({ target: 'WeakMap', proto: true, real: true, forced: IS_PURE }, { emplace: $emplace }); }, { "../internals/export": 74, "../internals/is-pure": 105, "../internals/map-emplace": 112 }], 546: [function (require, module, exports) { var $ = require('../internals/export'); var from = require('../internals/collection-from'); // `WeakMap.from` method // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from $({ target: 'WeakMap', stat: true }, { from: from }); }, { "../internals/collection-from": 43, "../internals/export": 74 }], 547: [function (require, module, exports) { var $ = require('../internals/export'); var of = require('../internals/collection-of'); // `WeakMap.of` method // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of $({ target: 'WeakMap', stat: true }, { of: of }); }, { "../internals/collection-of": 44, "../internals/export": 74 }], 548: [function (require, module, exports) { 'use strict'; // TODO: remove from `core-js@4` var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var $upsert = require('../internals/map-upsert'); // `WeakMap.prototype.upsert` method (replaced by `WeakMap.prototype.emplace`) // https://github.com/tc39/proposal-upsert $({ target: 'WeakMap', proto: true, real: true, forced: IS_PURE }, { upsert: $upsert }); }, { "../internals/export": 74, "../internals/is-pure": 105, "../internals/map-upsert": 113 }], 549: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var collectionAddAll = require('../internals/collection-add-all'); // `WeakSet.prototype.addAll` method // https://github.com/tc39/proposal-collection-methods $({ target: 'WeakSet', proto: true, real: true, forced: IS_PURE }, { addAll: function addAll() /* ...elements */ { return collectionAddAll.apply(this, arguments); } }); }, { "../internals/collection-add-all": 41, "../internals/export": 74, "../internals/is-pure": 105 }], 550: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); var IS_PURE = require('../internals/is-pure'); var collectionDeleteAll = require('../internals/collection-delete-all'); // `WeakSet.prototype.deleteAll` method // https://github.com/tc39/proposal-collection-methods $({ target: 'WeakSet', proto: true, real: true, forced: IS_PURE }, { deleteAll: function deleteAll() /* ...elements */ { return collectionDeleteAll.apply(this, arguments); } }); }, { "../internals/collection-delete-all": 42, "../internals/export": 74, "../internals/is-pure": 105 }], 551: [function (require, module, exports) { var $ = require('../internals/export'); var from = require('../internals/collection-from'); // `WeakSet.from` method // https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from $({ target: 'WeakSet', stat: true }, { from: from }); }, { "../internals/collection-from": 43, "../internals/export": 74 }], 552: [function (require, module, exports) { var $ = require('../internals/export'); var of = require('../internals/collection-of'); // `WeakSet.of` method // https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of $({ target: 'WeakSet', stat: true }, { of: of }); }, { "../internals/collection-of": 44, "../internals/export": 74 }], 553: [function (require, module, exports) { var global = require('../internals/global'); var DOMIterables = require('../internals/dom-iterables'); var forEach = require('../internals/array-for-each'); var createNonEnumerableProperty = require('../internals/create-non-enumerable-property'); for (var COLLECTION_NAME in DOMIterables) { var Collection = global[COLLECTION_NAME]; var CollectionPrototype = Collection && Collection.prototype; // some Chrome versions have non-configurable methods on DOMTokenList if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try { createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach); } catch (error) { CollectionPrototype.forEach = forEach; } } }, { "../internals/array-for-each": 22, "../internals/create-non-enumerable-property": 54, "../internals/dom-iterables": 63, "../internals/global": 88 }], 554: [function (require, module, exports) { var global = require('../internals/global'); var DOMIterables = require('../internals/dom-iterables'); var ArrayIteratorMethods = require('../modules/es.array.iterator'); var createNonEnumerableProperty = require('../internals/create-non-enumerable-property'); var wellKnownSymbol = require('../internals/well-known-symbol'); var ITERATOR = wellKnownSymbol('iterator'); var TO_STRING_TAG = wellKnownSymbol('toStringTag'); var ArrayValues = ArrayIteratorMethods.values; for (var COLLECTION_NAME in DOMIterables) { var Collection = global[COLLECTION_NAME]; var CollectionPrototype = Collection && Collection.prototype; if (CollectionPrototype) { // some Chrome versions have non-configurable methods on DOMTokenList if (CollectionPrototype[ITERATOR] !== ArrayValues) try { createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues); } catch (error) { CollectionPrototype[ITERATOR] = ArrayValues; } if (!CollectionPrototype[TO_STRING_TAG]) { createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME); } if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) { // some Chrome versions have non-configurable methods on DOMTokenList if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try { createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]); } catch (error) { CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME]; } } } } }, { "../internals/create-non-enumerable-property": 54, "../internals/dom-iterables": 63, "../internals/global": 88, "../internals/well-known-symbol": 197, "../modules/es.array.iterator": 217 }], 555: [function (require, module, exports) { var $ = require('../internals/export'); var global = require('../internals/global'); var task = require('../internals/task'); var FORCED = !global.setImmediate || !global.clearImmediate; // http://w3c.github.io/setImmediate/ $({ global: true, bind: true, enumerable: true, forced: FORCED }, { // `setImmediate` method // http://w3c.github.io/setImmediate/#si-setImmediate setImmediate: task.set, // `clearImmediate` method // http://w3c.github.io/setImmediate/#si-clearImmediate clearImmediate: task.clear }); }, { "../internals/export": 74, "../internals/global": 88, "../internals/task": 178 }], 556: [function (require, module, exports) { var $ = require('../internals/export'); var global = require('../internals/global'); var microtask = require('../internals/microtask'); var IS_NODE = require('../internals/engine-is-node'); var process = global.process; // `queueMicrotask` method // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-queuemicrotask $({ global: true, enumerable: true, noTargetGet: true }, { queueMicrotask: function queueMicrotask(fn) { var domain = IS_NODE && process.domain; microtask(domain ? domain.bind(fn) : fn); } }); }, { "../internals/engine-is-node": 68, "../internals/export": 74, "../internals/global": 88, "../internals/microtask": 119 }], 557: [function (require, module, exports) { var $ = require('../internals/export'); var global = require('../internals/global'); var userAgent = require('../internals/engine-user-agent'); var slice = [].slice; var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check var wrap = function wrap(scheduler) { return function (handler, timeout /* , ...arguments */ ) { var boundArgs = arguments.length > 2; var args = boundArgs ? slice.call(arguments, 2) : undefined; return scheduler(boundArgs ? function () { // eslint-disable-next-line no-new-func -- spec requirement (typeof handler == 'function' ? handler : Function(handler)).apply(this, args); } : handler, timeout); }; }; // ie9- setTimeout & setInterval additional parameters fix // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#timers $({ global: true, bind: true, forced: MSIE }, { // `setTimeout` method // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-settimeout setTimeout: wrap(global.setTimeout), // `setInterval` method // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-setinterval setInterval: wrap(global.setInterval) }); }, { "../internals/engine-user-agent": 70, "../internals/export": 74, "../internals/global": 88 }], 558: [function (require, module, exports) { 'use strict'; // TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env` require('../modules/es.array.iterator'); var $ = require('../internals/export'); var getBuiltIn = require('../internals/get-built-in'); var USE_NATIVE_URL = require('../internals/native-url'); var redefine = require('../internals/redefine'); var redefineAll = require('../internals/redefine-all'); var setToStringTag = require('../internals/set-to-string-tag'); var createIteratorConstructor = require('../internals/create-iterator-constructor'); var InternalStateModule = require('../internals/internal-state'); var anInstance = require('../internals/an-instance'); var hasOwn = require('../internals/has'); var bind = require('../internals/function-bind-context'); var classof = require('../internals/classof'); var anObject = require('../internals/an-object'); var isObject = require('../internals/is-object'); var create = require('../internals/object-create'); var createPropertyDescriptor = require('../internals/create-property-descriptor'); var getIterator = require('../internals/get-iterator'); var getIteratorMethod = require('../internals/get-iterator-method'); var wellKnownSymbol = require('../internals/well-known-symbol'); var $fetch = getBuiltIn('fetch'); var Headers = getBuiltIn('Headers'); var ITERATOR = wellKnownSymbol('iterator'); var URL_SEARCH_PARAMS = 'URLSearchParams'; var URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator'; var setInternalState = InternalStateModule.set; var getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS); var getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR); var plus = /\+/g; var sequences = Array(4); var percentSequence = function percentSequence(bytes) { return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\da-f]{2}){' + bytes + '})', 'gi')); }; var percentDecode = function percentDecode(sequence) { try { return decodeURIComponent(sequence); } catch (error) { return sequence; } }; var deserialize = function deserialize(it) { var result = it.replace(plus, ' '); var bytes = 4; try { return decodeURIComponent(result); } catch (error) { while (bytes) { result = result.replace(percentSequence(bytes--), percentDecode); } return result; } }; var find = /[!'()~]|%20/g; var replace = { '!': '%21', "'": '%27', '(': '%28', ')': '%29', '~': '%7E', '%20': '+' }; var replacer = function replacer(match) { return replace[match]; }; var serialize = function serialize(it) { return encodeURIComponent(it).replace(find, replacer); }; var parseSearchParams = function parseSearchParams(result, query) { if (query) { var attributes = query.split('&'); var index = 0; var attribute, entry; while (index < attributes.length) { attribute = attributes[index++]; if (attribute.length) { entry = attribute.split('='); result.push({ key: deserialize(entry.shift()), value: deserialize(entry.join('=')) }); } } } }; var updateSearchParams = function updateSearchParams(query) { this.entries.length = 0; parseSearchParams(this.entries, query); }; var validateArgumentsLength = function validateArgumentsLength(passed, required) { if (passed < required) throw TypeError('Not enough arguments'); }; var URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) { setInternalState(this, { type: URL_SEARCH_PARAMS_ITERATOR, iterator: getIterator(getInternalParamsState(params).entries), kind: kind }); }, 'Iterator', function next() { var state = getInternalIteratorState(this); var kind = state.kind; var step = state.iterator.next(); var entry = step.value; if (!step.done) { step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value]; } return step; }); // `URLSearchParams` constructor // https://url.spec.whatwg.org/#interface-urlsearchparams var URLSearchParamsConstructor = function URLSearchParams() /* init */ { anInstance(this, URLSearchParamsConstructor, URL_SEARCH_PARAMS); var init = arguments.length > 0 ? arguments[0] : undefined; var that = this; var entries = []; var iteratorMethod, iterator, next, step, entryIterator, entryNext, first, second, key; setInternalState(that, { type: URL_SEARCH_PARAMS, entries: entries, updateURL: function updateURL() { /* empty */ }, updateSearchParams: updateSearchParams }); if (init !== undefined) { if (isObject(init)) { iteratorMethod = getIteratorMethod(init); if (typeof iteratorMethod === 'function') { iterator = iteratorMethod.call(init); next = iterator.next; while (!(step = next.call(iterator)).done) { entryIterator = getIterator(anObject(step.value)); entryNext = entryIterator.next; if ((first = entryNext.call(entryIterator)).done || (second = entryNext.call(entryIterator)).done || !entryNext.call(entryIterator).done) throw TypeError('Expected sequence with length 2'); entries.push({ key: first.value + '', value: second.value + '' }); } } else for (key in init) { if (hasOwn(init, key)) entries.push({ key: key, value: init[key] + '' }); } } else { parseSearchParams(entries, typeof init === 'string' ? init.charAt(0) === '?' ? init.slice(1) : init : init + ''); } } }; var URLSearchParamsPrototype = URLSearchParamsConstructor.prototype; redefineAll(URLSearchParamsPrototype, { // `URLSearchParams.prototype.append` method // https://url.spec.whatwg.org/#dom-urlsearchparams-append append: function append(name, value) { validateArgumentsLength(arguments.length, 2); var state = getInternalParamsState(this); state.entries.push({ key: name + '', value: value + '' }); state.updateURL(); }, // `URLSearchParams.prototype.delete` method // https://url.spec.whatwg.org/#dom-urlsearchparams-delete 'delete': function _delete(name) { validateArgumentsLength(arguments.length, 1); var state = getInternalParamsState(this); var entries = state.entries; var key = name + ''; var index = 0; while (index < entries.length) { if (entries[index].key === key) entries.splice(index, 1);else index++; } state.updateURL(); }, // `URLSearchParams.prototype.get` method // https://url.spec.whatwg.org/#dom-urlsearchparams-get get: function get(name) { validateArgumentsLength(arguments.length, 1); var entries = getInternalParamsState(this).entries; var key = name + ''; var index = 0; for (; index < entries.length; index++) { if (entries[index].key === key) return entries[index].value; } return null; }, // `URLSearchParams.prototype.getAll` method // https://url.spec.whatwg.org/#dom-urlsearchparams-getall getAll: function getAll(name) { validateArgumentsLength(arguments.length, 1); var entries = getInternalParamsState(this).entries; var key = name + ''; var result = []; var index = 0; for (; index < entries.length; index++) { if (entries[index].key === key) result.push(entries[index].value); } return result; }, // `URLSearchParams.prototype.has` method // https://url.spec.whatwg.org/#dom-urlsearchparams-has has: function has(name) { validateArgumentsLength(arguments.length, 1); var entries = getInternalParamsState(this).entries; var key = name + ''; var index = 0; while (index < entries.length) { if (entries[index++].key === key) return true; } return false; }, // `URLSearchParams.prototype.set` method // https://url.spec.whatwg.org/#dom-urlsearchparams-set set: function set(name, value) { validateArgumentsLength(arguments.length, 1); var state = getInternalParamsState(this); var entries = state.entries; var found = false; var key = name + ''; var val = value + ''; var index = 0; var entry; for (; index < entries.length; index++) { entry = entries[index]; if (entry.key === key) { if (found) entries.splice(index--, 1);else { found = true; entry.value = val; } } } if (!found) entries.push({ key: key, value: val }); state.updateURL(); }, // `URLSearchParams.prototype.sort` method // https://url.spec.whatwg.org/#dom-urlsearchparams-sort sort: function sort() { var state = getInternalParamsState(this); var entries = state.entries; // Array#sort is not stable in some engines var slice = entries.slice(); var entry, entriesIndex, sliceIndex; entries.length = 0; for (sliceIndex = 0; sliceIndex < slice.length; sliceIndex++) { entry = slice[sliceIndex]; for (entriesIndex = 0; entriesIndex < sliceIndex; entriesIndex++) { if (entries[entriesIndex].key > entry.key) { entries.splice(entriesIndex, 0, entry); break; } } if (entriesIndex === sliceIndex) entries.push(entry); } state.updateURL(); }, // `URLSearchParams.prototype.forEach` method forEach: function forEach(callback /* , thisArg */ ) { var entries = getInternalParamsState(this).entries; var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined, 3); var index = 0; var entry; while (index < entries.length) { entry = entries[index++]; boundFunction(entry.value, entry.key, this); } }, // `URLSearchParams.prototype.keys` method keys: function keys() { return new URLSearchParamsIterator(this, 'keys'); }, // `URLSearchParams.prototype.values` method values: function values() { return new URLSearchParamsIterator(this, 'values'); }, // `URLSearchParams.prototype.entries` method entries: function entries() { return new URLSearchParamsIterator(this, 'entries'); } }, { enumerable: true }); // `URLSearchParams.prototype[@@iterator]` method redefine(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries); // `URLSearchParams.prototype.toString` method // https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior redefine(URLSearchParamsPrototype, 'toString', function toString() { var entries = getInternalParamsState(this).entries; var result = []; var index = 0; var entry; while (index < entries.length) { entry = entries[index++]; result.push(serialize(entry.key) + '=' + serialize(entry.value)); } return result.join('&'); }, { enumerable: true }); setToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS); $({ global: true, forced: !USE_NATIVE_URL }, { URLSearchParams: URLSearchParamsConstructor }); // Wrap `fetch` for correct work with polyfilled `URLSearchParams` // https://github.com/zloirock/core-js/issues/674 if (!USE_NATIVE_URL && typeof $fetch == 'function' && typeof Headers == 'function') { $({ global: true, enumerable: true, forced: true }, { fetch: function fetch(input /* , init */ ) { var args = [input]; var init, body, headers; if (arguments.length > 1) { init = arguments[1]; if (isObject(init)) { body = init.body; if (classof(body) === URL_SEARCH_PARAMS) { headers = init.headers ? new Headers(init.headers) : new Headers(); if (!headers.has('content-type')) { headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8'); } init = create(init, { body: createPropertyDescriptor(0, String(body)), headers: createPropertyDescriptor(0, headers) }); } } args.push(init); } return $fetch.apply(this, args); } }); } module.exports = { URLSearchParams: URLSearchParamsConstructor, getState: getInternalParamsState }; }, { "../internals/an-instance": 15, "../internals/an-object": 16, "../internals/classof": 40, "../internals/create-iterator-constructor": 53, "../internals/create-property-descriptor": 55, "../internals/export": 74, "../internals/function-bind-context": 79, "../internals/get-built-in": 82, "../internals/get-iterator": 84, "../internals/get-iterator-method": 83, "../internals/has": 89, "../internals/internal-state": 99, "../internals/is-object": 104, "../internals/native-url": 122, "../internals/object-create": 131, "../internals/redefine": 152, "../internals/redefine-all": 151, "../internals/set-to-string-tag": 165, "../internals/well-known-symbol": 197, "../modules/es.array.iterator": 217 }], 559: [function (require, module, exports) { 'use strict'; // TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env` require('../modules/es.string.iterator'); var $ = require('../internals/export'); var DESCRIPTORS = require('../internals/descriptors'); var USE_NATIVE_URL = require('../internals/native-url'); var global = require('../internals/global'); var defineProperties = require('../internals/object-define-properties'); var redefine = require('../internals/redefine'); var anInstance = require('../internals/an-instance'); var has = require('../internals/has'); var assign = require('../internals/object-assign'); var arrayFrom = require('../internals/array-from'); var codeAt = require('../internals/string-multibyte').codeAt; var toASCII = require('../internals/string-punycode-to-ascii'); var setToStringTag = require('../internals/set-to-string-tag'); var URLSearchParamsModule = require('../modules/web.url-search-params'); var InternalStateModule = require('../internals/internal-state'); var NativeURL = global.URL; var URLSearchParams = URLSearchParamsModule.URLSearchParams; var getInternalSearchParamsState = URLSearchParamsModule.getState; var setInternalState = InternalStateModule.set; var getInternalURLState = InternalStateModule.getterFor('URL'); var floor = Math.floor; var pow = Math.pow; var INVALID_AUTHORITY = 'Invalid authority'; var INVALID_SCHEME = 'Invalid scheme'; var INVALID_HOST = 'Invalid host'; var INVALID_PORT = 'Invalid port'; var ALPHA = /[A-Za-z]/; // eslint-disable-next-line regexp/no-obscure-range -- safe var ALPHANUMERIC = /[\d+-.A-Za-z]/; var DIGIT = /\d/; var HEX_START = /^0x/i; var OCT = /^[0-7]+$/; var DEC = /^\d+$/; var HEX = /^[\dA-Fa-f]+$/; /* eslint-disable no-control-regex -- safe */ var FORBIDDEN_HOST_CODE_POINT = /[\0\t\n\r #%/:<>?@[\\\]^|]/; var FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\0\t\n\r #/:<>?@[\\\]^|]/; var LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g; var TAB_AND_NEW_LINE = /[\t\n\r]/g; /* eslint-enable no-control-regex -- safe */ var EOF; var parseHost = function parseHost(url, input) { var result, codePoints, index; if (input.charAt(0) == '[') { if (input.charAt(input.length - 1) != ']') return INVALID_HOST; result = parseIPv6(input.slice(1, -1)); if (!result) return INVALID_HOST; url.host = result; // opaque host } else if (!isSpecial(url)) { if (FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(input)) return INVALID_HOST; result = ''; codePoints = arrayFrom(input); for (index = 0; index < codePoints.length; index++) { result += percentEncode(codePoints[index], C0ControlPercentEncodeSet); } url.host = result; } else { input = toASCII(input); if (FORBIDDEN_HOST_CODE_POINT.test(input)) return INVALID_HOST; result = parseIPv4(input); if (result === null) return INVALID_HOST; url.host = result; } }; var parseIPv4 = function parseIPv4(input) { var parts = input.split('.'); var partsLength, numbers, index, part, radix, number, ipv4; if (parts.length && parts[parts.length - 1] == '') { parts.pop(); } partsLength = parts.length; if (partsLength > 4) return input; numbers = []; for (index = 0; index < partsLength; index++) { part = parts[index]; if (part == '') return input; radix = 10; if (part.length > 1 && part.charAt(0) == '0') { radix = HEX_START.test(part) ? 16 : 8; part = part.slice(radix == 8 ? 1 : 2); } if (part === '') { number = 0; } else { if (!(radix == 10 ? DEC : radix == 8 ? OCT : HEX).test(part)) return input; number = parseInt(part, radix); } numbers.push(number); } for (index = 0; index < partsLength; index++) { number = numbers[index]; if (index == partsLength - 1) { if (number >= pow(256, 5 - partsLength)) return null; } else if (number > 255) return null; } ipv4 = numbers.pop(); for (index = 0; index < numbers.length; index++) { ipv4 += numbers[index] * pow(256, 3 - index); } return ipv4; }; // eslint-disable-next-line max-statements -- TODO var parseIPv6 = function parseIPv6(input) { var address = [0, 0, 0, 0, 0, 0, 0, 0]; var pieceIndex = 0; var compress = null; var pointer = 0; var value, length, numbersSeen, ipv4Piece, number, swaps, swap; var char = function char() { return input.charAt(pointer); }; if (char() == ':') { if (input.charAt(1) != ':') return; pointer += 2; pieceIndex++; compress = pieceIndex; } while (char()) { if (pieceIndex == 8) return; if (char() == ':') { if (compress !== null) return; pointer++; pieceIndex++; compress = pieceIndex; continue; } value = length = 0; while (length < 4 && HEX.test(char())) { value = value * 16 + parseInt(char(), 16); pointer++; length++; } if (char() == '.') { if (length == 0) return; pointer -= length; if (pieceIndex > 6) return; numbersSeen = 0; while (char()) { ipv4Piece = null; if (numbersSeen > 0) { if (char() == '.' && numbersSeen < 4) pointer++;else return; } if (!DIGIT.test(char())) return; while (DIGIT.test(char())) { number = parseInt(char(), 10); if (ipv4Piece === null) ipv4Piece = number;else if (ipv4Piece == 0) return;else ipv4Piece = ipv4Piece * 10 + number; if (ipv4Piece > 255) return; pointer++; } address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece; numbersSeen++; if (numbersSeen == 2 || numbersSeen == 4) pieceIndex++; } if (numbersSeen != 4) return; break; } else if (char() == ':') { pointer++; if (!char()) return; } else if (char()) return; address[pieceIndex++] = value; } if (compress !== null) { swaps = pieceIndex - compress; pieceIndex = 7; while (pieceIndex != 0 && swaps > 0) { swap = address[pieceIndex]; address[pieceIndex--] = address[compress + swaps - 1]; address[compress + --swaps] = swap; } } else if (pieceIndex != 8) return; return address; }; var findLongestZeroSequence = function findLongestZeroSequence(ipv6) { var maxIndex = null; var maxLength = 1; var currStart = null; var currLength = 0; var index = 0; for (; index < 8; index++) { if (ipv6[index] !== 0) { if (currLength > maxLength) { maxIndex = currStart; maxLength = currLength; } currStart = null; currLength = 0; } else { if (currStart === null) currStart = index; ++currLength; } } if (currLength > maxLength) { maxIndex = currStart; maxLength = currLength; } return maxIndex; }; var serializeHost = function serializeHost(host) { var result, index, compress, ignore0; // ipv4 if (typeof host == 'number') { result = []; for (index = 0; index < 4; index++) { result.unshift(host % 256); host = floor(host / 256); } return result.join('.'); // ipv6 } else if (typeof host == 'object') { result = ''; compress = findLongestZeroSequence(host); for (index = 0; index < 8; index++) { if (ignore0 && host[index] === 0) continue; if (ignore0) ignore0 = false; if (compress === index) { result += index ? ':' : '::'; ignore0 = true; } else { result += host[index].toString(16); if (index < 7) result += ':'; } } return '[' + result + ']'; } return host; }; var C0ControlPercentEncodeSet = {}; var fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, { ' ': 1, '"': 1, '<': 1, '>': 1, '`': 1 }); var pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, { '#': 1, '?': 1, '{': 1, '}': 1 }); var userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, { '/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\': 1, ']': 1, '^': 1, '|': 1 }); var percentEncode = function percentEncode(char, set) { var code = codeAt(char, 0); return code > 0x20 && code < 0x7F && !has(set, char) ? char : encodeURIComponent(char); }; var specialSchemes = { ftp: 21, file: null, http: 80, https: 443, ws: 80, wss: 443 }; var isSpecial = function isSpecial(url) { return has(specialSchemes, url.scheme); }; var includesCredentials = function includesCredentials(url) { return url.username != '' || url.password != ''; }; var cannotHaveUsernamePasswordPort = function cannotHaveUsernamePasswordPort(url) { return !url.host || url.cannotBeABaseURL || url.scheme == 'file'; }; var isWindowsDriveLetter = function isWindowsDriveLetter(string, normalized) { var second; return string.length == 2 && ALPHA.test(string.charAt(0)) && ((second = string.charAt(1)) == ':' || !normalized && second == '|'); }; var startsWithWindowsDriveLetter = function startsWithWindowsDriveLetter(string) { var third; return string.length > 1 && isWindowsDriveLetter(string.slice(0, 2)) && (string.length == 2 || (third = string.charAt(2)) === '/' || third === '\\' || third === '?' || third === '#'); }; var shortenURLsPath = function shortenURLsPath(url) { var path = url.path; var pathSize = path.length; if (pathSize && (url.scheme != 'file' || pathSize != 1 || !isWindowsDriveLetter(path[0], true))) { path.pop(); } }; var isSingleDot = function isSingleDot(segment) { return segment === '.' || segment.toLowerCase() === '%2e'; }; var isDoubleDot = function isDoubleDot(segment) { segment = segment.toLowerCase(); return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e'; }; // States: var SCHEME_START = {}; var SCHEME = {}; var NO_SCHEME = {}; var SPECIAL_RELATIVE_OR_AUTHORITY = {}; var PATH_OR_AUTHORITY = {}; var RELATIVE = {}; var RELATIVE_SLASH = {}; var SPECIAL_AUTHORITY_SLASHES = {}; var SPECIAL_AUTHORITY_IGNORE_SLASHES = {}; var AUTHORITY = {}; var HOST = {}; var HOSTNAME = {}; var PORT = {}; var FILE = {}; var FILE_SLASH = {}; var FILE_HOST = {}; var PATH_START = {}; var PATH = {}; var CANNOT_BE_A_BASE_URL_PATH = {}; var QUERY = {}; var FRAGMENT = {}; // eslint-disable-next-line max-statements -- TODO var parseURL = function parseURL(url, input, stateOverride, base) { var state = stateOverride || SCHEME_START; var pointer = 0; var buffer = ''; var seenAt = false; var seenBracket = false; var seenPasswordToken = false; var codePoints, char, bufferCodePoints, failure; if (!stateOverride) { url.scheme = ''; url.username = ''; url.password = ''; url.host = null; url.port = null; url.path = []; url.query = null; url.fragment = null; url.cannotBeABaseURL = false; input = input.replace(LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE, ''); } input = input.replace(TAB_AND_NEW_LINE, ''); codePoints = arrayFrom(input); while (pointer <= codePoints.length) { char = codePoints[pointer]; switch (state) { case SCHEME_START: if (char && ALPHA.test(char)) { buffer += char.toLowerCase(); state = SCHEME; } else if (!stateOverride) { state = NO_SCHEME; continue; } else return INVALID_SCHEME; break; case SCHEME: if (char && (ALPHANUMERIC.test(char) || char == '+' || char == '-' || char == '.')) { buffer += char.toLowerCase(); } else if (char == ':') { if (stateOverride && (isSpecial(url) != has(specialSchemes, buffer) || buffer == 'file' && (includesCredentials(url) || url.port !== null) || url.scheme == 'file' && !url.host)) return; url.scheme = buffer; if (stateOverride) { if (isSpecial(url) && specialSchemes[url.scheme] == url.port) url.port = null; return; } buffer = ''; if (url.scheme == 'file') { state = FILE; } else if (isSpecial(url) && base && base.scheme == url.scheme) { state = SPECIAL_RELATIVE_OR_AUTHORITY; } else if (isSpecial(url)) { state = SPECIAL_AUTHORITY_SLASHES; } else if (codePoints[pointer + 1] == '/') { state = PATH_OR_AUTHORITY; pointer++; } else { url.cannotBeABaseURL = true; url.path.push(''); state = CANNOT_BE_A_BASE_URL_PATH; } } else if (!stateOverride) { buffer = ''; state = NO_SCHEME; pointer = 0; continue; } else return INVALID_SCHEME; break; case NO_SCHEME: if (!base || base.cannotBeABaseURL && char != '#') return INVALID_SCHEME; if (base.cannotBeABaseURL && char == '#') { url.scheme = base.scheme; url.path = base.path.slice(); url.query = base.query; url.fragment = ''; url.cannotBeABaseURL = true; state = FRAGMENT; break; } state = base.scheme == 'file' ? FILE : RELATIVE; continue; case SPECIAL_RELATIVE_OR_AUTHORITY: if (char == '/' && codePoints[pointer + 1] == '/') { state = SPECIAL_AUTHORITY_IGNORE_SLASHES; pointer++; } else { state = RELATIVE; continue; } break; case PATH_OR_AUTHORITY: if (char == '/') { state = AUTHORITY; break; } else { state = PATH; continue; } case RELATIVE: url.scheme = base.scheme; if (char == EOF) { url.username = base.username; url.password = base.password; url.host = base.host; url.port = base.port; url.path = base.path.slice(); url.query = base.query; } else if (char == '/' || char == '\\' && isSpecial(url)) { state = RELATIVE_SLASH; } else if (char == '?') { url.username = base.username; url.password = base.password; url.host = base.host; url.port = base.port; url.path = base.path.slice(); url.query = ''; state = QUERY; } else if (char == '#') { url.username = base.username; url.password = base.password; url.host = base.host; url.port = base.port; url.path = base.path.slice(); url.query = base.query; url.fragment = ''; state = FRAGMENT; } else { url.username = base.username; url.password = base.password; url.host = base.host; url.port = base.port; url.path = base.path.slice(); url.path.pop(); state = PATH; continue; } break; case RELATIVE_SLASH: if (isSpecial(url) && (char == '/' || char == '\\')) { state = SPECIAL_AUTHORITY_IGNORE_SLASHES; } else if (char == '/') { state = AUTHORITY; } else { url.username = base.username; url.password = base.password; url.host = base.host; url.port = base.port; state = PATH; continue; } break; case SPECIAL_AUTHORITY_SLASHES: state = SPECIAL_AUTHORITY_IGNORE_SLASHES; if (char != '/' || buffer.charAt(pointer + 1) != '/') continue; pointer++; break; case SPECIAL_AUTHORITY_IGNORE_SLASHES: if (char != '/' && char != '\\') { state = AUTHORITY; continue; } break; case AUTHORITY: if (char == '@') { if (seenAt) buffer = '%40' + buffer; seenAt = true; bufferCodePoints = arrayFrom(buffer); for (var i = 0; i < bufferCodePoints.length; i++) { var codePoint = bufferCodePoints[i]; if (codePoint == ':' && !seenPasswordToken) { seenPasswordToken = true; continue; } var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet); if (seenPasswordToken) url.password += encodedCodePoints;else url.username += encodedCodePoints; } buffer = ''; } else if (char == EOF || char == '/' || char == '?' || char == '#' || char == '\\' && isSpecial(url)) { if (seenAt && buffer == '') return INVALID_AUTHORITY; pointer -= arrayFrom(buffer).length + 1; buffer = ''; state = HOST; } else buffer += char; break; case HOST: case HOSTNAME: if (stateOverride && url.scheme == 'file') { state = FILE_HOST; continue; } else if (char == ':' && !seenBracket) { if (buffer == '') return INVALID_HOST; failure = parseHost(url, buffer); if (failure) return failure; buffer = ''; state = PORT; if (stateOverride == HOSTNAME) return; } else if (char == EOF || char == '/' || char == '?' || char == '#' || char == '\\' && isSpecial(url)) { if (isSpecial(url) && buffer == '') return INVALID_HOST; if (stateOverride && buffer == '' && (includesCredentials(url) || url.port !== null)) return; failure = parseHost(url, buffer); if (failure) return failure; buffer = ''; state = PATH_START; if (stateOverride) return; continue; } else { if (char == '[') seenBracket = true;else if (char == ']') seenBracket = false; buffer += char; } break; case PORT: if (DIGIT.test(char)) { buffer += char; } else if (char == EOF || char == '/' || char == '?' || char == '#' || char == '\\' && isSpecial(url) || stateOverride) { if (buffer != '') { var port = parseInt(buffer, 10); if (port > 0xFFFF) return INVALID_PORT; url.port = isSpecial(url) && port === specialSchemes[url.scheme] ? null : port; buffer = ''; } if (stateOverride) return; state = PATH_START; continue; } else return INVALID_PORT; break; case FILE: url.scheme = 'file'; if (char == '/' || char == '\\') state = FILE_SLASH;else if (base && base.scheme == 'file') { if (char == EOF) { url.host = base.host; url.path = base.path.slice(); url.query = base.query; } else if (char == '?') { url.host = base.host; url.path = base.path.slice(); url.query = ''; state = QUERY; } else if (char == '#') { url.host = base.host; url.path = base.path.slice(); url.query = base.query; url.fragment = ''; state = FRAGMENT; } else { if (!startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) { url.host = base.host; url.path = base.path.slice(); shortenURLsPath(url); } state = PATH; continue; } } else { state = PATH; continue; } break; case FILE_SLASH: if (char == '/' || char == '\\') { state = FILE_HOST; break; } if (base && base.scheme == 'file' && !startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) { if (isWindowsDriveLetter(base.path[0], true)) url.path.push(base.path[0]);else url.host = base.host; } state = PATH; continue; case FILE_HOST: if (char == EOF || char == '/' || char == '\\' || char == '?' || char == '#') { if (!stateOverride && isWindowsDriveLetter(buffer)) { state = PATH; } else if (buffer == '') { url.host = ''; if (stateOverride) return; state = PATH_START; } else { failure = parseHost(url, buffer); if (failure) return failure; if (url.host == 'localhost') url.host = ''; if (stateOverride) return; buffer = ''; state = PATH_START; } continue; } else buffer += char; break; case PATH_START: if (isSpecial(url)) { state = PATH; if (char != '/' && char != '\\') continue; } else if (!stateOverride && char == '?') { url.query = ''; state = QUERY; } else if (!stateOverride && char == '#') { url.fragment = ''; state = FRAGMENT; } else if (char != EOF) { state = PATH; if (char != '/') continue; } break; case PATH: if (char == EOF || char == '/' || char == '\\' && isSpecial(url) || !stateOverride && (char == '?' || char == '#')) { if (isDoubleDot(buffer)) { shortenURLsPath(url); if (char != '/' && !(char == '\\' && isSpecial(url))) { url.path.push(''); } } else if (isSingleDot(buffer)) { if (char != '/' && !(char == '\\' && isSpecial(url))) { url.path.push(''); } } else { if (url.scheme == 'file' && !url.path.length && isWindowsDriveLetter(buffer)) { if (url.host) url.host = ''; buffer = buffer.charAt(0) + ':'; // normalize windows drive letter } url.path.push(buffer); } buffer = ''; if (url.scheme == 'file' && (char == EOF || char == '?' || char == '#')) { while (url.path.length > 1 && url.path[0] === '') { url.path.shift(); } } if (char == '?') { url.query = ''; state = QUERY; } else if (char == '#') { url.fragment = ''; state = FRAGMENT; } } else { buffer += percentEncode(char, pathPercentEncodeSet); } break; case CANNOT_BE_A_BASE_URL_PATH: if (char == '?') { url.query = ''; state = QUERY; } else if (char == '#') { url.fragment = ''; state = FRAGMENT; } else if (char != EOF) { url.path[0] += percentEncode(char, C0ControlPercentEncodeSet); } break; case QUERY: if (!stateOverride && char == '#') { url.fragment = ''; state = FRAGMENT; } else if (char != EOF) { if (char == "'" && isSpecial(url)) url.query += '%27';else if (char == '#') url.query += '%23';else url.query += percentEncode(char, C0ControlPercentEncodeSet); } break; case FRAGMENT: if (char != EOF) url.fragment += percentEncode(char, fragmentPercentEncodeSet); break; } pointer++; } }; // `URL` constructor // https://url.spec.whatwg.org/#url-class var URLConstructor = function URL(url /* , base */ ) { var that = anInstance(this, URLConstructor, 'URL'); var base = arguments.length > 1 ? arguments[1] : undefined; var urlString = String(url); var state = setInternalState(that, { type: 'URL' }); var baseState, failure; if (base !== undefined) { if (base instanceof URLConstructor) baseState = getInternalURLState(base);else { failure = parseURL(baseState = {}, String(base)); if (failure) throw TypeError(failure); } } failure = parseURL(state, urlString, null, baseState); if (failure) throw TypeError(failure); var searchParams = state.searchParams = new URLSearchParams(); var searchParamsState = getInternalSearchParamsState(searchParams); searchParamsState.updateSearchParams(state.query); searchParamsState.updateURL = function () { state.query = String(searchParams) || null; }; if (!DESCRIPTORS) { that.href = serializeURL.call(that); that.origin = getOrigin.call(that); that.protocol = getProtocol.call(that); that.username = getUsername.call(that); that.password = getPassword.call(that); that.host = getHost.call(that); that.hostname = getHostname.call(that); that.port = getPort.call(that); that.pathname = getPathname.call(that); that.search = getSearch.call(that); that.searchParams = getSearchParams.call(that); that.hash = getHash.call(that); } }; var URLPrototype = URLConstructor.prototype; var serializeURL = function serializeURL() { var url = getInternalURLState(this); var scheme = url.scheme; var username = url.username; var password = url.password; var host = url.host; var port = url.port; var path = url.path; var query = url.query; var fragment = url.fragment; var output = scheme + ':'; if (host !== null) { output += '//'; if (includesCredentials(url)) { output += username + (password ? ':' + password : '') + '@'; } output += serializeHost(host); if (port !== null) output += ':' + port; } else if (scheme == 'file') output += '//'; output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : ''; if (query !== null) output += '?' + query; if (fragment !== null) output += '#' + fragment; return output; }; var getOrigin = function getOrigin() { var url = getInternalURLState(this); var scheme = url.scheme; var port = url.port; if (scheme == 'blob') try { return new URLConstructor(scheme.path[0]).origin; } catch (error) { return 'null'; } if (scheme == 'file' || !isSpecial(url)) return 'null'; return scheme + '://' + serializeHost(url.host) + (port !== null ? ':' + port : ''); }; var getProtocol = function getProtocol() { return getInternalURLState(this).scheme + ':'; }; var getUsername = function getUsername() { return getInternalURLState(this).username; }; var getPassword = function getPassword() { return getInternalURLState(this).password; }; var getHost = function getHost() { var url = getInternalURLState(this); var host = url.host; var port = url.port; return host === null ? '' : port === null ? serializeHost(host) : serializeHost(host) + ':' + port; }; var getHostname = function getHostname() { var host = getInternalURLState(this).host; return host === null ? '' : serializeHost(host); }; var getPort = function getPort() { var port = getInternalURLState(this).port; return port === null ? '' : String(port); }; var getPathname = function getPathname() { var url = getInternalURLState(this); var path = url.path; return url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : ''; }; var getSearch = function getSearch() { var query = getInternalURLState(this).query; return query ? '?' + query : ''; }; var getSearchParams = function getSearchParams() { return getInternalURLState(this).searchParams; }; var getHash = function getHash() { var fragment = getInternalURLState(this).fragment; return fragment ? '#' + fragment : ''; }; var accessorDescriptor = function accessorDescriptor(getter, setter) { return { get: getter, set: setter, configurable: true, enumerable: true }; }; if (DESCRIPTORS) { defineProperties(URLPrototype, { // `URL.prototype.href` accessors pair // https://url.spec.whatwg.org/#dom-url-href href: accessorDescriptor(serializeURL, function (href) { var url = getInternalURLState(this); var urlString = String(href); var failure = parseURL(url, urlString); if (failure) throw TypeError(failure); getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query); }), // `URL.prototype.origin` getter // https://url.spec.whatwg.org/#dom-url-origin origin: accessorDescriptor(getOrigin), // `URL.prototype.protocol` accessors pair // https://url.spec.whatwg.org/#dom-url-protocol protocol: accessorDescriptor(getProtocol, function (protocol) { var url = getInternalURLState(this); parseURL(url, String(protocol) + ':', SCHEME_START); }), // `URL.prototype.username` accessors pair // https://url.spec.whatwg.org/#dom-url-username username: accessorDescriptor(getUsername, function (username) { var url = getInternalURLState(this); var codePoints = arrayFrom(String(username)); if (cannotHaveUsernamePasswordPort(url)) return; url.username = ''; for (var i = 0; i < codePoints.length; i++) { url.username += percentEncode(codePoints[i], userinfoPercentEncodeSet); } }), // `URL.prototype.password` accessors pair // https://url.spec.whatwg.org/#dom-url-password password: accessorDescriptor(getPassword, function (password) { var url = getInternalURLState(this); var codePoints = arrayFrom(String(password)); if (cannotHaveUsernamePasswordPort(url)) return; url.password = ''; for (var i = 0; i < codePoints.length; i++) { url.password += percentEncode(codePoints[i], userinfoPercentEncodeSet); } }), // `URL.prototype.host` accessors pair // https://url.spec.whatwg.org/#dom-url-host host: accessorDescriptor(getHost, function (host) { var url = getInternalURLState(this); if (url.cannotBeABaseURL) return; parseURL(url, String(host), HOST); }), // `URL.prototype.hostname` accessors pair // https://url.spec.whatwg.org/#dom-url-hostname hostname: accessorDescriptor(getHostname, function (hostname) { var url = getInternalURLState(this); if (url.cannotBeABaseURL) return; parseURL(url, String(hostname), HOSTNAME); }), // `URL.prototype.port` accessors pair // https://url.spec.whatwg.org/#dom-url-port port: accessorDescriptor(getPort, function (port) { var url = getInternalURLState(this); if (cannotHaveUsernamePasswordPort(url)) return; port = String(port); if (port == '') url.port = null;else parseURL(url, port, PORT); }), // `URL.prototype.pathname` accessors pair // https://url.spec.whatwg.org/#dom-url-pathname pathname: accessorDescriptor(getPathname, function (pathname) { var url = getInternalURLState(this); if (url.cannotBeABaseURL) return; url.path = []; parseURL(url, pathname + '', PATH_START); }), // `URL.prototype.search` accessors pair // https://url.spec.whatwg.org/#dom-url-search search: accessorDescriptor(getSearch, function (search) { var url = getInternalURLState(this); search = String(search); if (search == '') { url.query = null; } else { if ('?' == search.charAt(0)) search = search.slice(1); url.query = ''; parseURL(url, search, QUERY); } getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query); }), // `URL.prototype.searchParams` getter // https://url.spec.whatwg.org/#dom-url-searchparams searchParams: accessorDescriptor(getSearchParams), // `URL.prototype.hash` accessors pair // https://url.spec.whatwg.org/#dom-url-hash hash: accessorDescriptor(getHash, function (hash) { var url = getInternalURLState(this); hash = String(hash); if (hash == '') { url.fragment = null; return; } if ('#' == hash.charAt(0)) hash = hash.slice(1); url.fragment = ''; parseURL(url, hash, FRAGMENT); }) }); } // `URL.prototype.toJSON` method // https://url.spec.whatwg.org/#dom-url-tojson redefine(URLPrototype, 'toJSON', function toJSON() { return serializeURL.call(this); }, { enumerable: true }); // `URL.prototype.toString` method // https://url.spec.whatwg.org/#URL-stringification-behavior redefine(URLPrototype, 'toString', function toString() { return serializeURL.call(this); }, { enumerable: true }); if (NativeURL) { var nativeCreateObjectURL = NativeURL.createObjectURL; var nativeRevokeObjectURL = NativeURL.revokeObjectURL; // `URL.createObjectURL` method // https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL // eslint-disable-next-line no-unused-vars -- required for `.length` if (nativeCreateObjectURL) redefine(URLConstructor, 'createObjectURL', function createObjectURL(blob) { return nativeCreateObjectURL.apply(NativeURL, arguments); }); // `URL.revokeObjectURL` method // https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL // eslint-disable-next-line no-unused-vars -- required for `.length` if (nativeRevokeObjectURL) redefine(URLConstructor, 'revokeObjectURL', function revokeObjectURL(url) { return nativeRevokeObjectURL.apply(NativeURL, arguments); }); } setToStringTag(URLConstructor, 'URL'); $({ global: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, { URL: URLConstructor }); }, { "../internals/an-instance": 15, "../internals/array-from": 23, "../internals/descriptors": 61, "../internals/export": 74, "../internals/global": 88, "../internals/has": 89, "../internals/internal-state": 99, "../internals/native-url": 122, "../internals/object-assign": 130, "../internals/object-define-properties": 132, "../internals/redefine": 152, "../internals/set-to-string-tag": 165, "../internals/string-multibyte": 171, "../internals/string-punycode-to-ascii": 174, "../modules/es.string.iterator": 344, "../modules/web.url-search-params": 558 }], 560: [function (require, module, exports) { 'use strict'; var $ = require('../internals/export'); // `URL.prototype.toJSON` method // https://url.spec.whatwg.org/#dom-url-tojson $({ target: 'URL', proto: true, enumerable: true }, { toJSON: function toJSON() { return URL.prototype.toString.call(this); } }); }, { "../internals/export": 74 }], 561: [function (require, module, exports) { /*! * Cropper.js v1.5.7 * https://fengyuanchen.github.io/cropperjs * * Copyright 2015-present Chen Fengyuan * Released under the MIT license * * Date: 2020-05-23T05:23:00.081Z */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = global || self, global.Cropper = factory()); })(this, function () { 'use strict'; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var IS_BROWSER = typeof window !== 'undefined' && typeof window.document !== 'undefined'; var WINDOW = IS_BROWSER ? window : {}; var IS_TOUCH_DEVICE = IS_BROWSER && WINDOW.document.documentElement ? 'ontouchstart' in WINDOW.document.documentElement : false; var HAS_POINTER_EVENT = IS_BROWSER ? 'PointerEvent' in WINDOW : false; var NAMESPACE = 'cropper'; // Actions var ACTION_ALL = 'all'; var ACTION_CROP = 'crop'; var ACTION_MOVE = 'move'; var ACTION_ZOOM = 'zoom'; var ACTION_EAST = 'e'; var ACTION_WEST = 'w'; var ACTION_SOUTH = 's'; var ACTION_NORTH = 'n'; var ACTION_NORTH_EAST = 'ne'; var ACTION_NORTH_WEST = 'nw'; var ACTION_SOUTH_EAST = 'se'; var ACTION_SOUTH_WEST = 'sw'; // Classes var CLASS_CROP = "".concat(NAMESPACE, "-crop"); var CLASS_DISABLED = "".concat(NAMESPACE, "-disabled"); var CLASS_HIDDEN = "".concat(NAMESPACE, "-hidden"); var CLASS_HIDE = "".concat(NAMESPACE, "-hide"); var CLASS_INVISIBLE = "".concat(NAMESPACE, "-invisible"); var CLASS_MODAL = "".concat(NAMESPACE, "-modal"); var CLASS_MOVE = "".concat(NAMESPACE, "-move"); // Data keys var DATA_ACTION = "".concat(NAMESPACE, "Action"); var DATA_PREVIEW = "".concat(NAMESPACE, "Preview"); // Drag modes var DRAG_MODE_CROP = 'crop'; var DRAG_MODE_MOVE = 'move'; var DRAG_MODE_NONE = 'none'; // Events var EVENT_CROP = 'crop'; var EVENT_CROP_END = 'cropend'; var EVENT_CROP_MOVE = 'cropmove'; var EVENT_CROP_START = 'cropstart'; var EVENT_DBLCLICK = 'dblclick'; var EVENT_TOUCH_START = IS_TOUCH_DEVICE ? 'touchstart' : 'mousedown'; var EVENT_TOUCH_MOVE = IS_TOUCH_DEVICE ? 'touchmove' : 'mousemove'; var EVENT_TOUCH_END = IS_TOUCH_DEVICE ? 'touchend touchcancel' : 'mouseup'; var EVENT_POINTER_DOWN = HAS_POINTER_EVENT ? 'pointerdown' : EVENT_TOUCH_START; var EVENT_POINTER_MOVE = HAS_POINTER_EVENT ? 'pointermove' : EVENT_TOUCH_MOVE; var EVENT_POINTER_UP = HAS_POINTER_EVENT ? 'pointerup pointercancel' : EVENT_TOUCH_END; var EVENT_READY = 'ready'; var EVENT_RESIZE = 'resize'; var EVENT_WHEEL = 'wheel'; var EVENT_ZOOM = 'zoom'; // Mime types var MIME_TYPE_JPEG = 'image/jpeg'; // RegExps var REGEXP_ACTIONS = /^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/; var REGEXP_DATA_URL = /^data:/; var REGEXP_DATA_URL_JPEG = /^data:image\/jpeg;base64,/; var REGEXP_TAG_NAME = /^img|canvas$/i; // Misc var DEFAULTS = { // Define the view mode of the cropper viewMode: 0, // 0, 1, 2, 3 // Define the dragging mode of the cropper dragMode: DRAG_MODE_CROP, // 'crop', 'move' or 'none' // Define the initial aspect ratio of the crop box initialAspectRatio: NaN, // Define the aspect ratio of the crop box aspectRatio: NaN, // An object with the previous cropping result data data: null, // A selector for adding extra containers to preview preview: '', // Re-render the cropper when resize the window responsive: true, // Restore the cropped area after resize the window restore: true, // Check if the current image is a cross-origin image checkCrossOrigin: true, // Check the current image's Exif Orientation information checkOrientation: true, // Show the black modal modal: true, // Show the dashed lines for guiding guides: true, // Show the center indicator for guiding center: true, // Show the white modal to highlight the crop box highlight: true, // Show the grid background background: true, // Enable to crop the image automatically when initialize autoCrop: true, // Define the percentage of automatic cropping area when initializes autoCropArea: 0.8, // Enable to move the image movable: true, // Enable to rotate the image rotatable: true, // Enable to scale the image scalable: true, // Enable to zoom the image zoomable: true, // Enable to zoom the image by dragging touch zoomOnTouch: true, // Enable to zoom the image by wheeling mouse zoomOnWheel: true, // Define zoom ratio when zoom the image by wheeling mouse wheelZoomRatio: 0.1, // Enable to move the crop box cropBoxMovable: true, // Enable to resize the crop box cropBoxResizable: true, // Toggle drag mode between "crop" and "move" when click twice on the cropper toggleDragModeOnDblclick: true, // Size limitation minCanvasWidth: 0, minCanvasHeight: 0, minCropBoxWidth: 0, minCropBoxHeight: 0, minContainerWidth: 200, minContainerHeight: 100, // Shortcuts of events ready: null, cropstart: null, cropmove: null, cropend: null, crop: null, zoom: null }; var TEMPLATE = '
' + '
' + '
' + '
' + '
' + '
' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '
' + '
'; /** * Check if the given value is not a number. */ var isNaN = Number.isNaN || WINDOW.isNaN; /** * Check if the given value is a number. * @param {*} value - The value to check. * @returns {boolean} Returns `true` if the given value is a number, else `false`. */ function isNumber(value) { return typeof value === 'number' && !isNaN(value); } /** * Check if the given value is a positive number. * @param {*} value - The value to check. * @returns {boolean} Returns `true` if the given value is a positive number, else `false`. */ var isPositiveNumber = function isPositiveNumber(value) { return value > 0 && value < Infinity; }; /** * Check if the given value is undefined. * @param {*} value - The value to check. * @returns {boolean} Returns `true` if the given value is undefined, else `false`. */ function isUndefined(value) { return typeof value === 'undefined'; } /** * Check if the given value is an object. * @param {*} value - The value to check. * @returns {boolean} Returns `true` if the given value is an object, else `false`. */ function isObject(value) { return _typeof(value) === 'object' && value !== null; } var hasOwnProperty = Object.prototype.hasOwnProperty; /** * Check if the given value is a plain object. * @param {*} value - The value to check. * @returns {boolean} Returns `true` if the given value is a plain object, else `false`. */ function isPlainObject(value) { if (!isObject(value)) { return false; } try { var _constructor = value.constructor; var prototype = _constructor.prototype; return _constructor && prototype && hasOwnProperty.call(prototype, 'isPrototypeOf'); } catch (error) { return false; } } /** * Check if the given value is a function. * @param {*} value - The value to check. * @returns {boolean} Returns `true` if the given value is a function, else `false`. */ function isFunction(value) { return typeof value === 'function'; } var slice = Array.prototype.slice; /** * Convert array-like or iterable object to an array. * @param {*} value - The value to convert. * @returns {Array} Returns a new array. */ function toArray(value) { return Array.from ? Array.from(value) : slice.call(value); } /** * Iterate the given data. * @param {*} data - The data to iterate. * @param {Function} callback - The process function for each element. * @returns {*} The original data. */ function forEach(data, callback) { if (data && isFunction(callback)) { if (Array.isArray(data) || isNumber(data.length) /* array-like */ ) { toArray(data).forEach(function (value, key) { callback.call(data, value, key, data); }); } else if (isObject(data)) { Object.keys(data).forEach(function (key) { callback.call(data, data[key], key, data); }); } } return data; } /** * Extend the given object. * @param {*} target - The target object to extend. * @param {*} args - The rest objects for merging to the target object. * @returns {Object} The extended object. */ var assign = Object.assign || function assign(target) { for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } if (isObject(target) && args.length > 0) { args.forEach(function (arg) { if (isObject(arg)) { Object.keys(arg).forEach(function (key) { target[key] = arg[key]; }); } }); } return target; }; var REGEXP_DECIMALS = /\.\d*(?:0|9){12}\d*$/; /** * Normalize decimal number. * Check out {@link https://0.30000000000000004.com/} * @param {number} value - The value to normalize. * @param {number} [times=100000000000] - The times for normalizing. * @returns {number} Returns the normalized number. */ function normalizeDecimalNumber(value) { var times = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100000000000; return REGEXP_DECIMALS.test(value) ? Math.round(value * times) / times : value; } var REGEXP_SUFFIX = /^width|height|left|top|marginLeft|marginTop$/; /** * Apply styles to the given element. * @param {Element} element - The target element. * @param {Object} styles - The styles for applying. */ function setStyle(element, styles) { var style = element.style; forEach(styles, function (value, property) { if (REGEXP_SUFFIX.test(property) && isNumber(value)) { value = "".concat(value, "px"); } style[property] = value; }); } /** * Check if the given element has a special class. * @param {Element} element - The element to check. * @param {string} value - The class to search. * @returns {boolean} Returns `true` if the special class was found. */ function hasClass(element, value) { return element.classList ? element.classList.contains(value) : element.className.indexOf(value) > -1; } /** * Add classes to the given element. * @param {Element} element - The target element. * @param {string} value - The classes to be added. */ function addClass(element, value) { if (!value) { return; } if (isNumber(element.length)) { forEach(element, function (elem) { addClass(elem, value); }); return; } if (element.classList) { element.classList.add(value); return; } var className = element.className.trim(); if (!className) { element.className = value; } else if (className.indexOf(value) < 0) { element.className = "".concat(className, " ").concat(value); } } /** * Remove classes from the given element. * @param {Element} element - The target element. * @param {string} value - The classes to be removed. */ function removeClass(element, value) { if (!value) { return; } if (isNumber(element.length)) { forEach(element, function (elem) { removeClass(elem, value); }); return; } if (element.classList) { element.classList.remove(value); return; } if (element.className.indexOf(value) >= 0) { element.className = element.className.replace(value, ''); } } /** * Add or remove classes from the given element. * @param {Element} element - The target element. * @param {string} value - The classes to be toggled. * @param {boolean} added - Add only. */ function toggleClass(element, value, added) { if (!value) { return; } if (isNumber(element.length)) { forEach(element, function (elem) { toggleClass(elem, value, added); }); return; } // IE10-11 doesn't support the second parameter of `classList.toggle` if (added) { addClass(element, value); } else { removeClass(element, value); } } var REGEXP_CAMEL_CASE = /([a-z\d])([A-Z])/g; /** * Transform the given string from camelCase to kebab-case * @param {string} value - The value to transform. * @returns {string} The transformed value. */ function toParamCase(value) { return value.replace(REGEXP_CAMEL_CASE, '$1-$2').toLowerCase(); } /** * Get data from the given element. * @param {Element} element - The target element. * @param {string} name - The data key to get. * @returns {string} The data value. */ function getData(element, name) { if (isObject(element[name])) { return element[name]; } if (element.dataset) { return element.dataset[name]; } return element.getAttribute("data-".concat(toParamCase(name))); } /** * Set data to the given element. * @param {Element} element - The target element. * @param {string} name - The data key to set. * @param {string} data - The data value. */ function setData(element, name, data) { if (isObject(data)) { element[name] = data; } else if (element.dataset) { element.dataset[name] = data; } else { element.setAttribute("data-".concat(toParamCase(name)), data); } } /** * Remove data from the given element. * @param {Element} element - The target element. * @param {string} name - The data key to remove. */ function removeData(element, name) { if (isObject(element[name])) { try { delete element[name]; } catch (error) { element[name] = undefined; } } else if (element.dataset) { // #128 Safari not allows to delete dataset property try { delete element.dataset[name]; } catch (error) { element.dataset[name] = undefined; } } else { element.removeAttribute("data-".concat(toParamCase(name))); } } var REGEXP_SPACES = /\s\s*/; var onceSupported = function () { var supported = false; if (IS_BROWSER) { var once = false; var listener = function listener() {}; var options = Object.defineProperty({}, 'once', { get: function get() { supported = true; return once; }, /** * This setter can fix a `TypeError` in strict mode * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Getter_only} * @param {boolean} value - The value to set */ set: function set(value) { once = value; } }); WINDOW.addEventListener('test', listener, options); WINDOW.removeEventListener('test', listener, options); } return supported; }(); /** * Remove event listener from the target element. * @param {Element} element - The event target. * @param {string} type - The event type(s). * @param {Function} listener - The event listener. * @param {Object} options - The event options. */ function removeListener(element, type, listener) { var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; var handler = listener; type.trim().split(REGEXP_SPACES).forEach(function (event) { if (!onceSupported) { var listeners = element.listeners; if (listeners && listeners[event] && listeners[event][listener]) { handler = listeners[event][listener]; delete listeners[event][listener]; if (Object.keys(listeners[event]).length === 0) { delete listeners[event]; } if (Object.keys(listeners).length === 0) { delete element.listeners; } } } element.removeEventListener(event, handler, options); }); } /** * Add event listener to the target element. * @param {Element} element - The event target. * @param {string} type - The event type(s). * @param {Function} listener - The event listener. * @param {Object} options - The event options. */ function addListener(element, type, listener) { var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; var _handler = listener; type.trim().split(REGEXP_SPACES).forEach(function (event) { if (options.once && !onceSupported) { var _element$listeners = element.listeners, listeners = _element$listeners === void 0 ? {} : _element$listeners; _handler = function handler() { delete listeners[event][listener]; element.removeEventListener(event, _handler, options); for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } listener.apply(element, args); }; if (!listeners[event]) { listeners[event] = {}; } if (listeners[event][listener]) { element.removeEventListener(event, listeners[event][listener], options); } listeners[event][listener] = _handler; element.listeners = listeners; } element.addEventListener(event, _handler, options); }); } /** * Dispatch event on the target element. * @param {Element} element - The event target. * @param {string} type - The event type(s). * @param {Object} data - The additional event data. * @returns {boolean} Indicate if the event is default prevented or not. */ function dispatchEvent(element, type, data) { var event; // Event and CustomEvent on IE9-11 are global objects, not constructors if (isFunction(Event) && isFunction(CustomEvent)) { event = new CustomEvent(type, { detail: data, bubbles: true, cancelable: true }); } else { event = document.createEvent('CustomEvent'); event.initCustomEvent(type, true, true, data); } return element.dispatchEvent(event); } /** * Get the offset base on the document. * @param {Element} element - The target element. * @returns {Object} The offset data. */ function getOffset(element) { var box = element.getBoundingClientRect(); return { left: box.left + (window.pageXOffset - document.documentElement.clientLeft), top: box.top + (window.pageYOffset - document.documentElement.clientTop) }; } var location = WINDOW.location; var REGEXP_ORIGINS = /^(\w+:)\/\/([^:/?#]*):?(\d*)/i; /** * Check if the given URL is a cross origin URL. * @param {string} url - The target URL. * @returns {boolean} Returns `true` if the given URL is a cross origin URL, else `false`. */ function isCrossOriginURL(url) { var parts = url.match(REGEXP_ORIGINS); return parts !== null && (parts[1] !== location.protocol || parts[2] !== location.hostname || parts[3] !== location.port); } /** * Add timestamp to the given URL. * @param {string} url - The target URL. * @returns {string} The result URL. */ function addTimestamp(url) { var timestamp = "timestamp=".concat(new Date().getTime()); return url + (url.indexOf('?') === -1 ? '?' : '&') + timestamp; } /** * Get transforms base on the given object. * @param {Object} obj - The target object. * @returns {string} A string contains transform values. */ function getTransforms(_ref) { var rotate = _ref.rotate, scaleX = _ref.scaleX, scaleY = _ref.scaleY, translateX = _ref.translateX, translateY = _ref.translateY; var values = []; if (isNumber(translateX) && translateX !== 0) { values.push("translateX(".concat(translateX, "px)")); } if (isNumber(translateY) && translateY !== 0) { values.push("translateY(".concat(translateY, "px)")); } // Rotate should come first before scale to match orientation transform if (isNumber(rotate) && rotate !== 0) { values.push("rotate(".concat(rotate, "deg)")); } if (isNumber(scaleX) && scaleX !== 1) { values.push("scaleX(".concat(scaleX, ")")); } if (isNumber(scaleY) && scaleY !== 1) { values.push("scaleY(".concat(scaleY, ")")); } var transform = values.length ? values.join(' ') : 'none'; return { WebkitTransform: transform, msTransform: transform, transform: transform }; } /** * Get the max ratio of a group of pointers. * @param {string} pointers - The target pointers. * @returns {number} The result ratio. */ function getMaxZoomRatio(pointers) { var pointers2 = _objectSpread2({}, pointers); var ratios = []; forEach(pointers, function (pointer, pointerId) { delete pointers2[pointerId]; forEach(pointers2, function (pointer2) { var x1 = Math.abs(pointer.startX - pointer2.startX); var y1 = Math.abs(pointer.startY - pointer2.startY); var x2 = Math.abs(pointer.endX - pointer2.endX); var y2 = Math.abs(pointer.endY - pointer2.endY); var z1 = Math.sqrt(x1 * x1 + y1 * y1); var z2 = Math.sqrt(x2 * x2 + y2 * y2); var ratio = (z2 - z1) / z1; ratios.push(ratio); }); }); ratios.sort(function (a, b) { return Math.abs(a) < Math.abs(b); }); return ratios[0]; } /** * Get a pointer from an event object. * @param {Object} event - The target event object. * @param {boolean} endOnly - Indicates if only returns the end point coordinate or not. * @returns {Object} The result pointer contains start and/or end point coordinates. */ function getPointer(_ref2, endOnly) { var pageX = _ref2.pageX, pageY = _ref2.pageY; var end = { endX: pageX, endY: pageY }; return endOnly ? end : _objectSpread2({ startX: pageX, startY: pageY }, end); } /** * Get the center point coordinate of a group of pointers. * @param {Object} pointers - The target pointers. * @returns {Object} The center point coordinate. */ function getPointersCenter(pointers) { var pageX = 0; var pageY = 0; var count = 0; forEach(pointers, function (_ref3) { var startX = _ref3.startX, startY = _ref3.startY; pageX += startX; pageY += startY; count += 1; }); pageX /= count; pageY /= count; return { pageX: pageX, pageY: pageY }; } /** * Get the max sizes in a rectangle under the given aspect ratio. * @param {Object} data - The original sizes. * @param {string} [type='contain'] - The adjust type. * @returns {Object} The result sizes. */ function getAdjustedSizes(_ref4) // or 'cover' { var aspectRatio = _ref4.aspectRatio, height = _ref4.height, width = _ref4.width; var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'contain'; var isValidWidth = isPositiveNumber(width); var isValidHeight = isPositiveNumber(height); if (isValidWidth && isValidHeight) { var adjustedWidth = height * aspectRatio; if (type === 'contain' && adjustedWidth > width || type === 'cover' && adjustedWidth < width) { height = width / aspectRatio; } else { width = height * aspectRatio; } } else if (isValidWidth) { height = width / aspectRatio; } else if (isValidHeight) { width = height * aspectRatio; } return { width: width, height: height }; } /** * Get the new sizes of a rectangle after rotated. * @param {Object} data - The original sizes. * @returns {Object} The result sizes. */ function getRotatedSizes(_ref5) { var width = _ref5.width, height = _ref5.height, degree = _ref5.degree; degree = Math.abs(degree) % 180; if (degree === 90) { return { width: height, height: width }; } var arc = degree % 90 * Math.PI / 180; var sinArc = Math.sin(arc); var cosArc = Math.cos(arc); var newWidth = width * cosArc + height * sinArc; var newHeight = width * sinArc + height * cosArc; return degree > 90 ? { width: newHeight, height: newWidth } : { width: newWidth, height: newHeight }; } /** * Get a canvas which drew the given image. * @param {HTMLImageElement} image - The image for drawing. * @param {Object} imageData - The image data. * @param {Object} canvasData - The canvas data. * @param {Object} options - The options. * @returns {HTMLCanvasElement} The result canvas. */ function getSourceCanvas(image, _ref6, _ref7, _ref8) { var imageAspectRatio = _ref6.aspectRatio, imageNaturalWidth = _ref6.naturalWidth, imageNaturalHeight = _ref6.naturalHeight, _ref6$rotate = _ref6.rotate, rotate = _ref6$rotate === void 0 ? 0 : _ref6$rotate, _ref6$scaleX = _ref6.scaleX, scaleX = _ref6$scaleX === void 0 ? 1 : _ref6$scaleX, _ref6$scaleY = _ref6.scaleY, scaleY = _ref6$scaleY === void 0 ? 1 : _ref6$scaleY; var aspectRatio = _ref7.aspectRatio, naturalWidth = _ref7.naturalWidth, naturalHeight = _ref7.naturalHeight; var _ref8$fillColor = _ref8.fillColor, fillColor = _ref8$fillColor === void 0 ? 'transparent' : _ref8$fillColor, _ref8$imageSmoothingE = _ref8.imageSmoothingEnabled, imageSmoothingEnabled = _ref8$imageSmoothingE === void 0 ? true : _ref8$imageSmoothingE, _ref8$imageSmoothingQ = _ref8.imageSmoothingQuality, imageSmoothingQuality = _ref8$imageSmoothingQ === void 0 ? 'low' : _ref8$imageSmoothingQ, _ref8$maxWidth = _ref8.maxWidth, maxWidth = _ref8$maxWidth === void 0 ? Infinity : _ref8$maxWidth, _ref8$maxHeight = _ref8.maxHeight, maxHeight = _ref8$maxHeight === void 0 ? Infinity : _ref8$maxHeight, _ref8$minWidth = _ref8.minWidth, minWidth = _ref8$minWidth === void 0 ? 0 : _ref8$minWidth, _ref8$minHeight = _ref8.minHeight, minHeight = _ref8$minHeight === void 0 ? 0 : _ref8$minHeight; var canvas = document.createElement('canvas'); var context = canvas.getContext('2d'); var maxSizes = getAdjustedSizes({ aspectRatio: aspectRatio, width: maxWidth, height: maxHeight }); var minSizes = getAdjustedSizes({ aspectRatio: aspectRatio, width: minWidth, height: minHeight }, 'cover'); var width = Math.min(maxSizes.width, Math.max(minSizes.width, naturalWidth)); var height = Math.min(maxSizes.height, Math.max(minSizes.height, naturalHeight)); // Note: should always use image's natural sizes for drawing as // imageData.naturalWidth === canvasData.naturalHeight when rotate % 180 === 90 var destMaxSizes = getAdjustedSizes({ aspectRatio: imageAspectRatio, width: maxWidth, height: maxHeight }); var destMinSizes = getAdjustedSizes({ aspectRatio: imageAspectRatio, width: minWidth, height: minHeight }, 'cover'); var destWidth = Math.min(destMaxSizes.width, Math.max(destMinSizes.width, imageNaturalWidth)); var destHeight = Math.min(destMaxSizes.height, Math.max(destMinSizes.height, imageNaturalHeight)); var params = [-destWidth / 2, -destHeight / 2, destWidth, destHeight]; canvas.width = normalizeDecimalNumber(width); canvas.height = normalizeDecimalNumber(height); context.fillStyle = fillColor; context.fillRect(0, 0, width, height); context.save(); context.translate(width / 2, height / 2); context.rotate(rotate * Math.PI / 180); context.scale(scaleX, scaleY); context.imageSmoothingEnabled = imageSmoothingEnabled; context.imageSmoothingQuality = imageSmoothingQuality; context.drawImage.apply(context, [image].concat(_toConsumableArray(params.map(function (param) { return Math.floor(normalizeDecimalNumber(param)); })))); context.restore(); return canvas; } var fromCharCode = String.fromCharCode; /** * Get string from char code in data view. * @param {DataView} dataView - The data view for read. * @param {number} start - The start index. * @param {number} length - The read length. * @returns {string} The read result. */ function getStringFromCharCode(dataView, start, length) { var str = ''; length += start; for (var i = start; i < length; i += 1) { str += fromCharCode(dataView.getUint8(i)); } return str; } var REGEXP_DATA_URL_HEAD = /^data:.*,/; /** * Transform Data URL to array buffer. * @param {string} dataURL - The Data URL to transform. * @returns {ArrayBuffer} The result array buffer. */ function dataURLToArrayBuffer(dataURL) { var base64 = dataURL.replace(REGEXP_DATA_URL_HEAD, ''); var binary = atob(base64); var arrayBuffer = new ArrayBuffer(binary.length); var uint8 = new Uint8Array(arrayBuffer); forEach(uint8, function (value, i) { uint8[i] = binary.charCodeAt(i); }); return arrayBuffer; } /** * Transform array buffer to Data URL. * @param {ArrayBuffer} arrayBuffer - The array buffer to transform. * @param {string} mimeType - The mime type of the Data URL. * @returns {string} The result Data URL. */ function arrayBufferToDataURL(arrayBuffer, mimeType) { var chunks = []; // Chunk Typed Array for better performance (#435) var chunkSize = 8192; var uint8 = new Uint8Array(arrayBuffer); while (uint8.length > 0) { // XXX: Babel's `toConsumableArray` helper will throw error in IE or Safari 9 // eslint-disable-next-line prefer-spread chunks.push(fromCharCode.apply(null, toArray(uint8.subarray(0, chunkSize)))); uint8 = uint8.subarray(chunkSize); } return "data:".concat(mimeType, ";base64,").concat(btoa(chunks.join(''))); } /** * Get orientation value from given array buffer. * @param {ArrayBuffer} arrayBuffer - The array buffer to read. * @returns {number} The read orientation value. */ function resetAndGetOrientation(arrayBuffer) { var dataView = new DataView(arrayBuffer); var orientation; // Ignores range error when the image does not have correct Exif information try { var littleEndian; var app1Start; var ifdStart; // Only handle JPEG image (start by 0xFFD8) if (dataView.getUint8(0) === 0xFF && dataView.getUint8(1) === 0xD8) { var length = dataView.byteLength; var offset = 2; while (offset + 1 < length) { if (dataView.getUint8(offset) === 0xFF && dataView.getUint8(offset + 1) === 0xE1) { app1Start = offset; break; } offset += 1; } } if (app1Start) { var exifIDCode = app1Start + 4; var tiffOffset = app1Start + 10; if (getStringFromCharCode(dataView, exifIDCode, 4) === 'Exif') { var endianness = dataView.getUint16(tiffOffset); littleEndian = endianness === 0x4949; if (littleEndian || endianness === 0x4D4D /* bigEndian */ ) { if (dataView.getUint16(tiffOffset + 2, littleEndian) === 0x002A) { var firstIFDOffset = dataView.getUint32(tiffOffset + 4, littleEndian); if (firstIFDOffset >= 0x00000008) { ifdStart = tiffOffset + firstIFDOffset; } } } } } if (ifdStart) { var _length = dataView.getUint16(ifdStart, littleEndian); var _offset; var i; for (i = 0; i < _length; i += 1) { _offset = ifdStart + i * 12 + 2; if (dataView.getUint16(_offset, littleEndian) === 0x0112 /* Orientation */ ) { // 8 is the offset of the current tag's value _offset += 8; // Get the original orientation value orientation = dataView.getUint16(_offset, littleEndian); // Override the orientation with its default value dataView.setUint16(_offset, 1, littleEndian); break; } } } } catch (error) { orientation = 1; } return orientation; } /** * Parse Exif Orientation value. * @param {number} orientation - The orientation to parse. * @returns {Object} The parsed result. */ function parseOrientation(orientation) { var rotate = 0; var scaleX = 1; var scaleY = 1; switch (orientation) { // Flip horizontal case 2: scaleX = -1; break; // Rotate left 180° case 3: rotate = -180; break; // Flip vertical case 4: scaleY = -1; break; // Flip vertical and rotate right 90° case 5: rotate = 90; scaleY = -1; break; // Rotate right 90° case 6: rotate = 90; break; // Flip horizontal and rotate right 90° case 7: rotate = 90; scaleX = -1; break; // Rotate left 90° case 8: rotate = -90; break; } return { rotate: rotate, scaleX: scaleX, scaleY: scaleY }; } var render = { render: function render() { this.initContainer(); this.initCanvas(); this.initCropBox(); this.renderCanvas(); if (this.cropped) { this.renderCropBox(); } }, initContainer: function initContainer() { var element = this.element, options = this.options, container = this.container, cropper = this.cropper; addClass(cropper, CLASS_HIDDEN); removeClass(element, CLASS_HIDDEN); var containerData = { width: Math.max(container.offsetWidth, Number(options.minContainerWidth) || 200), height: Math.max(container.offsetHeight, Number(options.minContainerHeight) || 100) }; this.containerData = containerData; setStyle(cropper, { width: containerData.width, height: containerData.height }); addClass(element, CLASS_HIDDEN); removeClass(cropper, CLASS_HIDDEN); }, // Canvas (image wrapper) initCanvas: function initCanvas() { var containerData = this.containerData, imageData = this.imageData; var viewMode = this.options.viewMode; var rotated = Math.abs(imageData.rotate) % 180 === 90; var naturalWidth = rotated ? imageData.naturalHeight : imageData.naturalWidth; var naturalHeight = rotated ? imageData.naturalWidth : imageData.naturalHeight; var aspectRatio = naturalWidth / naturalHeight; var canvasWidth = containerData.width; var canvasHeight = containerData.height; if (containerData.height * aspectRatio > containerData.width) { if (viewMode === 3) { canvasWidth = containerData.height * aspectRatio; } else { canvasHeight = containerData.width / aspectRatio; } } else if (viewMode === 3) { canvasHeight = containerData.width / aspectRatio; } else { canvasWidth = containerData.height * aspectRatio; } var canvasData = { aspectRatio: aspectRatio, naturalWidth: naturalWidth, naturalHeight: naturalHeight, width: canvasWidth, height: canvasHeight }; canvasData.left = (containerData.width - canvasWidth) / 2; canvasData.top = (containerData.height - canvasHeight) / 2; canvasData.oldLeft = canvasData.left; canvasData.oldTop = canvasData.top; this.canvasData = canvasData; this.limited = viewMode === 1 || viewMode === 2; this.limitCanvas(true, true); this.initialImageData = assign({}, imageData); this.initialCanvasData = assign({}, canvasData); }, limitCanvas: function limitCanvas(sizeLimited, positionLimited) { var options = this.options, containerData = this.containerData, canvasData = this.canvasData, cropBoxData = this.cropBoxData; var viewMode = options.viewMode; var aspectRatio = canvasData.aspectRatio; var cropped = this.cropped && cropBoxData; if (sizeLimited) { var minCanvasWidth = Number(options.minCanvasWidth) || 0; var minCanvasHeight = Number(options.minCanvasHeight) || 0; if (viewMode > 1) { minCanvasWidth = Math.max(minCanvasWidth, containerData.width); minCanvasHeight = Math.max(minCanvasHeight, containerData.height); if (viewMode === 3) { if (minCanvasHeight * aspectRatio > minCanvasWidth) { minCanvasWidth = minCanvasHeight * aspectRatio; } else { minCanvasHeight = minCanvasWidth / aspectRatio; } } } else if (viewMode > 0) { if (minCanvasWidth) { minCanvasWidth = Math.max(minCanvasWidth, cropped ? cropBoxData.width : 0); } else if (minCanvasHeight) { minCanvasHeight = Math.max(minCanvasHeight, cropped ? cropBoxData.height : 0); } else if (cropped) { minCanvasWidth = cropBoxData.width; minCanvasHeight = cropBoxData.height; if (minCanvasHeight * aspectRatio > minCanvasWidth) { minCanvasWidth = minCanvasHeight * aspectRatio; } else { minCanvasHeight = minCanvasWidth / aspectRatio; } } } var _getAdjustedSizes = getAdjustedSizes({ aspectRatio: aspectRatio, width: minCanvasWidth, height: minCanvasHeight }); minCanvasWidth = _getAdjustedSizes.width; minCanvasHeight = _getAdjustedSizes.height; canvasData.minWidth = minCanvasWidth; canvasData.minHeight = minCanvasHeight; canvasData.maxWidth = Infinity; canvasData.maxHeight = Infinity; } if (positionLimited) { if (viewMode > (cropped ? 0 : 1)) { var newCanvasLeft = containerData.width - canvasData.width; var newCanvasTop = containerData.height - canvasData.height; canvasData.minLeft = Math.min(0, newCanvasLeft); canvasData.minTop = Math.min(0, newCanvasTop); canvasData.maxLeft = Math.max(0, newCanvasLeft); canvasData.maxTop = Math.max(0, newCanvasTop); if (cropped && this.limited) { canvasData.minLeft = Math.min(cropBoxData.left, cropBoxData.left + (cropBoxData.width - canvasData.width)); canvasData.minTop = Math.min(cropBoxData.top, cropBoxData.top + (cropBoxData.height - canvasData.height)); canvasData.maxLeft = cropBoxData.left; canvasData.maxTop = cropBoxData.top; if (viewMode === 2) { if (canvasData.width >= containerData.width) { canvasData.minLeft = Math.min(0, newCanvasLeft); canvasData.maxLeft = Math.max(0, newCanvasLeft); } if (canvasData.height >= containerData.height) { canvasData.minTop = Math.min(0, newCanvasTop); canvasData.maxTop = Math.max(0, newCanvasTop); } } } } else { canvasData.minLeft = -canvasData.width; canvasData.minTop = -canvasData.height; canvasData.maxLeft = containerData.width; canvasData.maxTop = containerData.height; } } }, renderCanvas: function renderCanvas(changed, transformed) { var canvasData = this.canvasData, imageData = this.imageData; if (transformed) { var _getRotatedSizes = getRotatedSizes({ width: imageData.naturalWidth * Math.abs(imageData.scaleX || 1), height: imageData.naturalHeight * Math.abs(imageData.scaleY || 1), degree: imageData.rotate || 0 }), naturalWidth = _getRotatedSizes.width, naturalHeight = _getRotatedSizes.height; var width = canvasData.width * (naturalWidth / canvasData.naturalWidth); var height = canvasData.height * (naturalHeight / canvasData.naturalHeight); canvasData.left -= (width - canvasData.width) / 2; canvasData.top -= (height - canvasData.height) / 2; canvasData.width = width; canvasData.height = height; canvasData.aspectRatio = naturalWidth / naturalHeight; canvasData.naturalWidth = naturalWidth; canvasData.naturalHeight = naturalHeight; this.limitCanvas(true, false); } if (canvasData.width > canvasData.maxWidth || canvasData.width < canvasData.minWidth) { canvasData.left = canvasData.oldLeft; } if (canvasData.height > canvasData.maxHeight || canvasData.height < canvasData.minHeight) { canvasData.top = canvasData.oldTop; } canvasData.width = Math.min(Math.max(canvasData.width, canvasData.minWidth), canvasData.maxWidth); canvasData.height = Math.min(Math.max(canvasData.height, canvasData.minHeight), canvasData.maxHeight); this.limitCanvas(false, true); canvasData.left = Math.min(Math.max(canvasData.left, canvasData.minLeft), canvasData.maxLeft); canvasData.top = Math.min(Math.max(canvasData.top, canvasData.minTop), canvasData.maxTop); canvasData.oldLeft = canvasData.left; canvasData.oldTop = canvasData.top; setStyle(this.canvas, assign({ width: canvasData.width, height: canvasData.height }, getTransforms({ translateX: canvasData.left, translateY: canvasData.top }))); this.renderImage(changed); if (this.cropped && this.limited) { this.limitCropBox(true, true); } }, renderImage: function renderImage(changed) { var canvasData = this.canvasData, imageData = this.imageData; var width = imageData.naturalWidth * (canvasData.width / canvasData.naturalWidth); var height = imageData.naturalHeight * (canvasData.height / canvasData.naturalHeight); assign(imageData, { width: width, height: height, left: (canvasData.width - width) / 2, top: (canvasData.height - height) / 2 }); setStyle(this.image, assign({ width: imageData.width, height: imageData.height }, getTransforms(assign({ translateX: imageData.left, translateY: imageData.top }, imageData)))); if (changed) { this.output(); } }, initCropBox: function initCropBox() { var options = this.options, canvasData = this.canvasData; var aspectRatio = options.aspectRatio || options.initialAspectRatio; var autoCropArea = Number(options.autoCropArea) || 0.8; var cropBoxData = { width: canvasData.width, height: canvasData.height }; if (aspectRatio) { if (canvasData.height * aspectRatio > canvasData.width) { cropBoxData.height = cropBoxData.width / aspectRatio; } else { cropBoxData.width = cropBoxData.height * aspectRatio; } } this.cropBoxData = cropBoxData; this.limitCropBox(true, true); // Initialize auto crop area cropBoxData.width = Math.min(Math.max(cropBoxData.width, cropBoxData.minWidth), cropBoxData.maxWidth); cropBoxData.height = Math.min(Math.max(cropBoxData.height, cropBoxData.minHeight), cropBoxData.maxHeight); // The width/height of auto crop area must large than "minWidth/Height" cropBoxData.width = Math.max(cropBoxData.minWidth, cropBoxData.width * autoCropArea); cropBoxData.height = Math.max(cropBoxData.minHeight, cropBoxData.height * autoCropArea); cropBoxData.left = canvasData.left + (canvasData.width - cropBoxData.width) / 2; cropBoxData.top = canvasData.top + (canvasData.height - cropBoxData.height) / 2; cropBoxData.oldLeft = cropBoxData.left; cropBoxData.oldTop = cropBoxData.top; this.initialCropBoxData = assign({}, cropBoxData); }, limitCropBox: function limitCropBox(sizeLimited, positionLimited) { var options = this.options, containerData = this.containerData, canvasData = this.canvasData, cropBoxData = this.cropBoxData, limited = this.limited; var aspectRatio = options.aspectRatio; if (sizeLimited) { var minCropBoxWidth = Number(options.minCropBoxWidth) || 0; var minCropBoxHeight = Number(options.minCropBoxHeight) || 0; var maxCropBoxWidth = limited ? Math.min(containerData.width, canvasData.width, canvasData.width + canvasData.left, containerData.width - canvasData.left) : containerData.width; var maxCropBoxHeight = limited ? Math.min(containerData.height, canvasData.height, canvasData.height + canvasData.top, containerData.height - canvasData.top) : containerData.height; // The min/maxCropBoxWidth/Height must be less than container's width/height minCropBoxWidth = Math.min(minCropBoxWidth, containerData.width); minCropBoxHeight = Math.min(minCropBoxHeight, containerData.height); if (aspectRatio) { if (minCropBoxWidth && minCropBoxHeight) { if (minCropBoxHeight * aspectRatio > minCropBoxWidth) { minCropBoxHeight = minCropBoxWidth / aspectRatio; } else { minCropBoxWidth = minCropBoxHeight * aspectRatio; } } else if (minCropBoxWidth) { minCropBoxHeight = minCropBoxWidth / aspectRatio; } else if (minCropBoxHeight) { minCropBoxWidth = minCropBoxHeight * aspectRatio; } if (maxCropBoxHeight * aspectRatio > maxCropBoxWidth) { maxCropBoxHeight = maxCropBoxWidth / aspectRatio; } else { maxCropBoxWidth = maxCropBoxHeight * aspectRatio; } } // The minWidth/Height must be less than maxWidth/Height cropBoxData.minWidth = Math.min(minCropBoxWidth, maxCropBoxWidth); cropBoxData.minHeight = Math.min(minCropBoxHeight, maxCropBoxHeight); cropBoxData.maxWidth = maxCropBoxWidth; cropBoxData.maxHeight = maxCropBoxHeight; } if (positionLimited) { if (limited) { cropBoxData.minLeft = Math.max(0, canvasData.left); cropBoxData.minTop = Math.max(0, canvasData.top); cropBoxData.maxLeft = Math.min(containerData.width, canvasData.left + canvasData.width) - cropBoxData.width; cropBoxData.maxTop = Math.min(containerData.height, canvasData.top + canvasData.height) - cropBoxData.height; } else { cropBoxData.minLeft = 0; cropBoxData.minTop = 0; cropBoxData.maxLeft = containerData.width - cropBoxData.width; cropBoxData.maxTop = containerData.height - cropBoxData.height; } } }, renderCropBox: function renderCropBox() { var options = this.options, containerData = this.containerData, cropBoxData = this.cropBoxData; if (cropBoxData.width > cropBoxData.maxWidth || cropBoxData.width < cropBoxData.minWidth) { cropBoxData.left = cropBoxData.oldLeft; } if (cropBoxData.height > cropBoxData.maxHeight || cropBoxData.height < cropBoxData.minHeight) { cropBoxData.top = cropBoxData.oldTop; } cropBoxData.width = Math.min(Math.max(cropBoxData.width, cropBoxData.minWidth), cropBoxData.maxWidth); cropBoxData.height = Math.min(Math.max(cropBoxData.height, cropBoxData.minHeight), cropBoxData.maxHeight); this.limitCropBox(false, true); cropBoxData.left = Math.min(Math.max(cropBoxData.left, cropBoxData.minLeft), cropBoxData.maxLeft); cropBoxData.top = Math.min(Math.max(cropBoxData.top, cropBoxData.minTop), cropBoxData.maxTop); cropBoxData.oldLeft = cropBoxData.left; cropBoxData.oldTop = cropBoxData.top; if (options.movable && options.cropBoxMovable) { // Turn to move the canvas when the crop box is equal to the container setData(this.face, DATA_ACTION, cropBoxData.width >= containerData.width && cropBoxData.height >= containerData.height ? ACTION_MOVE : ACTION_ALL); } setStyle(this.cropBox, assign({ width: cropBoxData.width, height: cropBoxData.height }, getTransforms({ translateX: cropBoxData.left, translateY: cropBoxData.top }))); if (this.cropped && this.limited) { this.limitCanvas(true, true); } if (!this.disabled) { this.output(); } }, output: function output() { this.preview(); dispatchEvent(this.element, EVENT_CROP, this.getData()); } }; var preview = { initPreview: function initPreview() { var element = this.element, crossOrigin = this.crossOrigin; var preview = this.options.preview; var url = crossOrigin ? this.crossOriginUrl : this.url; var alt = element.alt || 'The image to preview'; var image = document.createElement('img'); if (crossOrigin) { image.crossOrigin = crossOrigin; } image.src = url; image.alt = alt; this.viewBox.appendChild(image); this.viewBoxImage = image; if (!preview) { return; } var previews = preview; if (typeof preview === 'string') { previews = element.ownerDocument.querySelectorAll(preview); } else if (preview.querySelector) { previews = [preview]; } this.previews = previews; forEach(previews, function (el) { var img = document.createElement('img'); // Save the original size for recover setData(el, DATA_PREVIEW, { width: el.offsetWidth, height: el.offsetHeight, html: el.innerHTML }); if (crossOrigin) { img.crossOrigin = crossOrigin; } img.src = url; img.alt = alt; /** * Override img element styles * Add `display:block` to avoid margin top issue * Add `height:auto` to override `height` attribute on IE8 * (Occur only when margin-top <= -height) */ img.style.cssText = 'display:block;' + 'width:100%;' + 'height:auto;' + 'min-width:0!important;' + 'min-height:0!important;' + 'max-width:none!important;' + 'max-height:none!important;' + 'image-orientation:0deg!important;"'; el.innerHTML = ''; el.appendChild(img); }); }, resetPreview: function resetPreview() { forEach(this.previews, function (element) { var data = getData(element, DATA_PREVIEW); setStyle(element, { width: data.width, height: data.height }); element.innerHTML = data.html; removeData(element, DATA_PREVIEW); }); }, preview: function preview() { var imageData = this.imageData, canvasData = this.canvasData, cropBoxData = this.cropBoxData; var cropBoxWidth = cropBoxData.width, cropBoxHeight = cropBoxData.height; var width = imageData.width, height = imageData.height; var left = cropBoxData.left - canvasData.left - imageData.left; var top = cropBoxData.top - canvasData.top - imageData.top; if (!this.cropped || this.disabled) { return; } setStyle(this.viewBoxImage, assign({ width: width, height: height }, getTransforms(assign({ translateX: -left, translateY: -top }, imageData)))); forEach(this.previews, function (element) { var data = getData(element, DATA_PREVIEW); var originalWidth = data.width; var originalHeight = data.height; var newWidth = originalWidth; var newHeight = originalHeight; var ratio = 1; if (cropBoxWidth) { ratio = originalWidth / cropBoxWidth; newHeight = cropBoxHeight * ratio; } if (cropBoxHeight && newHeight > originalHeight) { ratio = originalHeight / cropBoxHeight; newWidth = cropBoxWidth * ratio; newHeight = originalHeight; } setStyle(element, { width: newWidth, height: newHeight }); setStyle(element.getElementsByTagName('img')[0], assign({ width: width * ratio, height: height * ratio }, getTransforms(assign({ translateX: -left * ratio, translateY: -top * ratio }, imageData)))); }); } }; var events = { bind: function bind() { var element = this.element, options = this.options, cropper = this.cropper; if (isFunction(options.cropstart)) { addListener(element, EVENT_CROP_START, options.cropstart); } if (isFunction(options.cropmove)) { addListener(element, EVENT_CROP_MOVE, options.cropmove); } if (isFunction(options.cropend)) { addListener(element, EVENT_CROP_END, options.cropend); } if (isFunction(options.crop)) { addListener(element, EVENT_CROP, options.crop); } if (isFunction(options.zoom)) { addListener(element, EVENT_ZOOM, options.zoom); } addListener(cropper, EVENT_POINTER_DOWN, this.onCropStart = this.cropStart.bind(this)); if (options.zoomable && options.zoomOnWheel) { addListener(cropper, EVENT_WHEEL, this.onWheel = this.wheel.bind(this), { passive: false, capture: true }); } if (options.toggleDragModeOnDblclick) { addListener(cropper, EVENT_DBLCLICK, this.onDblclick = this.dblclick.bind(this)); } addListener(element.ownerDocument, EVENT_POINTER_MOVE, this.onCropMove = this.cropMove.bind(this)); addListener(element.ownerDocument, EVENT_POINTER_UP, this.onCropEnd = this.cropEnd.bind(this)); if (options.responsive) { addListener(window, EVENT_RESIZE, this.onResize = this.resize.bind(this)); } }, unbind: function unbind() { var element = this.element, options = this.options, cropper = this.cropper; if (isFunction(options.cropstart)) { removeListener(element, EVENT_CROP_START, options.cropstart); } if (isFunction(options.cropmove)) { removeListener(element, EVENT_CROP_MOVE, options.cropmove); } if (isFunction(options.cropend)) { removeListener(element, EVENT_CROP_END, options.cropend); } if (isFunction(options.crop)) { removeListener(element, EVENT_CROP, options.crop); } if (isFunction(options.zoom)) { removeListener(element, EVENT_ZOOM, options.zoom); } removeListener(cropper, EVENT_POINTER_DOWN, this.onCropStart); if (options.zoomable && options.zoomOnWheel) { removeListener(cropper, EVENT_WHEEL, this.onWheel, { passive: false, capture: true }); } if (options.toggleDragModeOnDblclick) { removeListener(cropper, EVENT_DBLCLICK, this.onDblclick); } removeListener(element.ownerDocument, EVENT_POINTER_MOVE, this.onCropMove); removeListener(element.ownerDocument, EVENT_POINTER_UP, this.onCropEnd); if (options.responsive) { removeListener(window, EVENT_RESIZE, this.onResize); } } }; var handlers = { resize: function resize() { if (this.disabled) { return; } var options = this.options, container = this.container, containerData = this.containerData; var ratio = container.offsetWidth / containerData.width; // Resize when width changed or height changed if (ratio !== 1 || container.offsetHeight !== containerData.height) { var canvasData; var cropBoxData; if (options.restore) { canvasData = this.getCanvasData(); cropBoxData = this.getCropBoxData(); } this.render(); if (options.restore) { this.setCanvasData(forEach(canvasData, function (n, i) { canvasData[i] = n * ratio; })); this.setCropBoxData(forEach(cropBoxData, function (n, i) { cropBoxData[i] = n * ratio; })); } } }, dblclick: function dblclick() { if (this.disabled || this.options.dragMode === DRAG_MODE_NONE) { return; } this.setDragMode(hasClass(this.dragBox, CLASS_CROP) ? DRAG_MODE_MOVE : DRAG_MODE_CROP); }, wheel: function wheel(event) { var _this = this; var ratio = Number(this.options.wheelZoomRatio) || 0.1; var delta = 1; if (this.disabled) { return; } event.preventDefault(); // Limit wheel speed to prevent zoom too fast (#21) if (this.wheeling) { return; } this.wheeling = true; setTimeout(function () { _this.wheeling = false; }, 50); if (event.deltaY) { delta = event.deltaY > 0 ? 1 : -1; } else if (event.wheelDelta) { delta = -event.wheelDelta / 120; } else if (event.detail) { delta = event.detail > 0 ? 1 : -1; } this.zoom(-delta * ratio, event); }, cropStart: function cropStart(event) { var buttons = event.buttons, button = event.button; if (this.disabled // Handle mouse event and pointer event and ignore touch event || (event.type === 'mousedown' || event.type === 'pointerdown' && event.pointerType === 'mouse') && ( // No primary button (Usually the left button) isNumber(buttons) && buttons !== 1 || isNumber(button) && button !== 0 // Open context menu || event.ctrlKey)) { return; } var options = this.options, pointers = this.pointers; var action; if (event.changedTouches) { // Handle touch event forEach(event.changedTouches, function (touch) { pointers[touch.identifier] = getPointer(touch); }); } else { // Handle mouse event and pointer event pointers[event.pointerId || 0] = getPointer(event); } if (Object.keys(pointers).length > 1 && options.zoomable && options.zoomOnTouch) { action = ACTION_ZOOM; } else { action = getData(event.target, DATA_ACTION); } if (!REGEXP_ACTIONS.test(action)) { return; } if (dispatchEvent(this.element, EVENT_CROP_START, { originalEvent: event, action: action }) === false) { return; } // This line is required for preventing page zooming in iOS browsers event.preventDefault(); this.action = action; this.cropping = false; if (action === ACTION_CROP) { this.cropping = true; addClass(this.dragBox, CLASS_MODAL); } }, cropMove: function cropMove(event) { var action = this.action; if (this.disabled || !action) { return; } var pointers = this.pointers; event.preventDefault(); if (dispatchEvent(this.element, EVENT_CROP_MOVE, { originalEvent: event, action: action }) === false) { return; } if (event.changedTouches) { forEach(event.changedTouches, function (touch) { // The first parameter should not be undefined (#432) assign(pointers[touch.identifier] || {}, getPointer(touch, true)); }); } else { assign(pointers[event.pointerId || 0] || {}, getPointer(event, true)); } this.change(event); }, cropEnd: function cropEnd(event) { if (this.disabled) { return; } var action = this.action, pointers = this.pointers; if (event.changedTouches) { forEach(event.changedTouches, function (touch) { delete pointers[touch.identifier]; }); } else { delete pointers[event.pointerId || 0]; } if (!action) { return; } event.preventDefault(); if (!Object.keys(pointers).length) { this.action = ''; } if (this.cropping) { this.cropping = false; toggleClass(this.dragBox, CLASS_MODAL, this.cropped && this.options.modal); } dispatchEvent(this.element, EVENT_CROP_END, { originalEvent: event, action: action }); } }; var change = { change: function change(event) { var options = this.options, canvasData = this.canvasData, containerData = this.containerData, cropBoxData = this.cropBoxData, pointers = this.pointers; var action = this.action; var aspectRatio = options.aspectRatio; var left = cropBoxData.left, top = cropBoxData.top, width = cropBoxData.width, height = cropBoxData.height; var right = left + width; var bottom = top + height; var minLeft = 0; var minTop = 0; var maxWidth = containerData.width; var maxHeight = containerData.height; var renderable = true; var offset; // Locking aspect ratio in "free mode" by holding shift key if (!aspectRatio && event.shiftKey) { aspectRatio = width && height ? width / height : 1; } if (this.limited) { minLeft = cropBoxData.minLeft; minTop = cropBoxData.minTop; maxWidth = minLeft + Math.min(containerData.width, canvasData.width, canvasData.left + canvasData.width); maxHeight = minTop + Math.min(containerData.height, canvasData.height, canvasData.top + canvasData.height); } var pointer = pointers[Object.keys(pointers)[0]]; var range = { x: pointer.endX - pointer.startX, y: pointer.endY - pointer.startY }; var check = function check(side) { switch (side) { case ACTION_EAST: if (right + range.x > maxWidth) { range.x = maxWidth - right; } break; case ACTION_WEST: if (left + range.x < minLeft) { range.x = minLeft - left; } break; case ACTION_NORTH: if (top + range.y < minTop) { range.y = minTop - top; } break; case ACTION_SOUTH: if (bottom + range.y > maxHeight) { range.y = maxHeight - bottom; } break; } }; switch (action) { // Move crop box case ACTION_ALL: left += range.x; top += range.y; break; // Resize crop box case ACTION_EAST: if (range.x >= 0 && (right >= maxWidth || aspectRatio && (top <= minTop || bottom >= maxHeight))) { renderable = false; break; } check(ACTION_EAST); width += range.x; if (width < 0) { action = ACTION_WEST; width = -width; left -= width; } if (aspectRatio) { height = width / aspectRatio; top += (cropBoxData.height - height) / 2; } break; case ACTION_NORTH: if (range.y <= 0 && (top <= minTop || aspectRatio && (left <= minLeft || right >= maxWidth))) { renderable = false; break; } check(ACTION_NORTH); height -= range.y; top += range.y; if (height < 0) { action = ACTION_SOUTH; height = -height; top -= height; } if (aspectRatio) { width = height * aspectRatio; left += (cropBoxData.width - width) / 2; } break; case ACTION_WEST: if (range.x <= 0 && (left <= minLeft || aspectRatio && (top <= minTop || bottom >= maxHeight))) { renderable = false; break; } check(ACTION_WEST); width -= range.x; left += range.x; if (width < 0) { action = ACTION_EAST; width = -width; left -= width; } if (aspectRatio) { height = width / aspectRatio; top += (cropBoxData.height - height) / 2; } break; case ACTION_SOUTH: if (range.y >= 0 && (bottom >= maxHeight || aspectRatio && (left <= minLeft || right >= maxWidth))) { renderable = false; break; } check(ACTION_SOUTH); height += range.y; if (height < 0) { action = ACTION_NORTH; height = -height; top -= height; } if (aspectRatio) { width = height * aspectRatio; left += (cropBoxData.width - width) / 2; } break; case ACTION_NORTH_EAST: if (aspectRatio) { if (range.y <= 0 && (top <= minTop || right >= maxWidth)) { renderable = false; break; } check(ACTION_NORTH); height -= range.y; top += range.y; width = height * aspectRatio; } else { check(ACTION_NORTH); check(ACTION_EAST); if (range.x >= 0) { if (right < maxWidth) { width += range.x; } else if (range.y <= 0 && top <= minTop) { renderable = false; } } else { width += range.x; } if (range.y <= 0) { if (top > minTop) { height -= range.y; top += range.y; } } else { height -= range.y; top += range.y; } } if (width < 0 && height < 0) { action = ACTION_SOUTH_WEST; height = -height; width = -width; top -= height; left -= width; } else if (width < 0) { action = ACTION_NORTH_WEST; width = -width; left -= width; } else if (height < 0) { action = ACTION_SOUTH_EAST; height = -height; top -= height; } break; case ACTION_NORTH_WEST: if (aspectRatio) { if (range.y <= 0 && (top <= minTop || left <= minLeft)) { renderable = false; break; } check(ACTION_NORTH); height -= range.y; top += range.y; width = height * aspectRatio; left += cropBoxData.width - width; } else { check(ACTION_NORTH); check(ACTION_WEST); if (range.x <= 0) { if (left > minLeft) { width -= range.x; left += range.x; } else if (range.y <= 0 && top <= minTop) { renderable = false; } } else { width -= range.x; left += range.x; } if (range.y <= 0) { if (top > minTop) { height -= range.y; top += range.y; } } else { height -= range.y; top += range.y; } } if (width < 0 && height < 0) { action = ACTION_SOUTH_EAST; height = -height; width = -width; top -= height; left -= width; } else if (width < 0) { action = ACTION_NORTH_EAST; width = -width; left -= width; } else if (height < 0) { action = ACTION_SOUTH_WEST; height = -height; top -= height; } break; case ACTION_SOUTH_WEST: if (aspectRatio) { if (range.x <= 0 && (left <= minLeft || bottom >= maxHeight)) { renderable = false; break; } check(ACTION_WEST); width -= range.x; left += range.x; height = width / aspectRatio; } else { check(ACTION_SOUTH); check(ACTION_WEST); if (range.x <= 0) { if (left > minLeft) { width -= range.x; left += range.x; } else if (range.y >= 0 && bottom >= maxHeight) { renderable = false; } } else { width -= range.x; left += range.x; } if (range.y >= 0) { if (bottom < maxHeight) { height += range.y; } } else { height += range.y; } } if (width < 0 && height < 0) { action = ACTION_NORTH_EAST; height = -height; width = -width; top -= height; left -= width; } else if (width < 0) { action = ACTION_SOUTH_EAST; width = -width; left -= width; } else if (height < 0) { action = ACTION_NORTH_WEST; height = -height; top -= height; } break; case ACTION_SOUTH_EAST: if (aspectRatio) { if (range.x >= 0 && (right >= maxWidth || bottom >= maxHeight)) { renderable = false; break; } check(ACTION_EAST); width += range.x; height = width / aspectRatio; } else { check(ACTION_SOUTH); check(ACTION_EAST); if (range.x >= 0) { if (right < maxWidth) { width += range.x; } else if (range.y >= 0 && bottom >= maxHeight) { renderable = false; } } else { width += range.x; } if (range.y >= 0) { if (bottom < maxHeight) { height += range.y; } } else { height += range.y; } } if (width < 0 && height < 0) { action = ACTION_NORTH_WEST; height = -height; width = -width; top -= height; left -= width; } else if (width < 0) { action = ACTION_SOUTH_WEST; width = -width; left -= width; } else if (height < 0) { action = ACTION_NORTH_EAST; height = -height; top -= height; } break; // Move canvas case ACTION_MOVE: this.move(range.x, range.y); renderable = false; break; // Zoom canvas case ACTION_ZOOM: this.zoom(getMaxZoomRatio(pointers), event); renderable = false; break; // Create crop box case ACTION_CROP: if (!range.x || !range.y) { renderable = false; break; } offset = getOffset(this.cropper); left = pointer.startX - offset.left; top = pointer.startY - offset.top; width = cropBoxData.minWidth; height = cropBoxData.minHeight; if (range.x > 0) { action = range.y > 0 ? ACTION_SOUTH_EAST : ACTION_NORTH_EAST; } else if (range.x < 0) { left -= width; action = range.y > 0 ? ACTION_SOUTH_WEST : ACTION_NORTH_WEST; } if (range.y < 0) { top -= height; } // Show the crop box if is hidden if (!this.cropped) { removeClass(this.cropBox, CLASS_HIDDEN); this.cropped = true; if (this.limited) { this.limitCropBox(true, true); } } break; } if (renderable) { cropBoxData.width = width; cropBoxData.height = height; cropBoxData.left = left; cropBoxData.top = top; this.action = action; this.renderCropBox(); } // Override forEach(pointers, function (p) { p.startX = p.endX; p.startY = p.endY; }); } }; var methods = { // Show the crop box manually crop: function crop() { if (this.ready && !this.cropped && !this.disabled) { this.cropped = true; this.limitCropBox(true, true); if (this.options.modal) { addClass(this.dragBox, CLASS_MODAL); } removeClass(this.cropBox, CLASS_HIDDEN); this.setCropBoxData(this.initialCropBoxData); } return this; }, // Reset the image and crop box to their initial states reset: function reset() { if (this.ready && !this.disabled) { this.imageData = assign({}, this.initialImageData); this.canvasData = assign({}, this.initialCanvasData); this.cropBoxData = assign({}, this.initialCropBoxData); this.renderCanvas(); if (this.cropped) { this.renderCropBox(); } } return this; }, // Clear the crop box clear: function clear() { if (this.cropped && !this.disabled) { assign(this.cropBoxData, { left: 0, top: 0, width: 0, height: 0 }); this.cropped = false; this.renderCropBox(); this.limitCanvas(true, true); // Render canvas after crop box rendered this.renderCanvas(); removeClass(this.dragBox, CLASS_MODAL); addClass(this.cropBox, CLASS_HIDDEN); } return this; }, /** * Replace the image's src and rebuild the cropper * @param {string} url - The new URL. * @param {boolean} [hasSameSize] - Indicate if the new image has the same size as the old one. * @returns {Cropper} this */ replace: function replace(url) { var hasSameSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; if (!this.disabled && url) { if (this.isImg) { this.element.src = url; } if (hasSameSize) { this.url = url; this.image.src = url; if (this.ready) { this.viewBoxImage.src = url; forEach(this.previews, function (element) { element.getElementsByTagName('img')[0].src = url; }); } } else { if (this.isImg) { this.replaced = true; } this.options.data = null; this.uncreate(); this.load(url); } } return this; }, // Enable (unfreeze) the cropper enable: function enable() { if (this.ready && this.disabled) { this.disabled = false; removeClass(this.cropper, CLASS_DISABLED); } return this; }, // Disable (freeze) the cropper disable: function disable() { if (this.ready && !this.disabled) { this.disabled = true; addClass(this.cropper, CLASS_DISABLED); } return this; }, /** * Destroy the cropper and remove the instance from the image * @returns {Cropper} this */ destroy: function destroy() { var element = this.element; if (!element[NAMESPACE]) { return this; } element[NAMESPACE] = undefined; if (this.isImg && this.replaced) { element.src = this.originalUrl; } this.uncreate(); return this; }, /** * Move the canvas with relative offsets * @param {number} offsetX - The relative offset distance on the x-axis. * @param {number} [offsetY=offsetX] - The relative offset distance on the y-axis. * @returns {Cropper} this */ move: function move(offsetX) { var offsetY = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : offsetX; var _this$canvasData = this.canvasData, left = _this$canvasData.left, top = _this$canvasData.top; return this.moveTo(isUndefined(offsetX) ? offsetX : left + Number(offsetX), isUndefined(offsetY) ? offsetY : top + Number(offsetY)); }, /** * Move the canvas to an absolute point * @param {number} x - The x-axis coordinate. * @param {number} [y=x] - The y-axis coordinate. * @returns {Cropper} this */ moveTo: function moveTo(x) { var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : x; var canvasData = this.canvasData; var changed = false; x = Number(x); y = Number(y); if (this.ready && !this.disabled && this.options.movable) { if (isNumber(x)) { canvasData.left = x; changed = true; } if (isNumber(y)) { canvasData.top = y; changed = true; } if (changed) { this.renderCanvas(true); } } return this; }, /** * Zoom the canvas with a relative ratio * @param {number} ratio - The target ratio. * @param {Event} _originalEvent - The original event if any. * @returns {Cropper} this */ zoom: function zoom(ratio, _originalEvent) { var canvasData = this.canvasData; ratio = Number(ratio); if (ratio < 0) { ratio = 1 / (1 - ratio); } else { ratio = 1 + ratio; } return this.zoomTo(canvasData.width * ratio / canvasData.naturalWidth, null, _originalEvent); }, /** * Zoom the canvas to an absolute ratio * @param {number} ratio - The target ratio. * @param {Object} pivot - The zoom pivot point coordinate. * @param {Event} _originalEvent - The original event if any. * @returns {Cropper} this */ zoomTo: function zoomTo(ratio, pivot, _originalEvent) { var options = this.options, canvasData = this.canvasData; var width = canvasData.width, height = canvasData.height, naturalWidth = canvasData.naturalWidth, naturalHeight = canvasData.naturalHeight; ratio = Number(ratio); if (ratio >= 0 && this.ready && !this.disabled && options.zoomable) { var newWidth = naturalWidth * ratio; var newHeight = naturalHeight * ratio; if (dispatchEvent(this.element, EVENT_ZOOM, { ratio: ratio, oldRatio: width / naturalWidth, originalEvent: _originalEvent }) === false) { return this; } if (_originalEvent) { var pointers = this.pointers; var offset = getOffset(this.cropper); var center = pointers && Object.keys(pointers).length ? getPointersCenter(pointers) : { pageX: _originalEvent.pageX, pageY: _originalEvent.pageY }; // Zoom from the triggering point of the event canvasData.left -= (newWidth - width) * ((center.pageX - offset.left - canvasData.left) / width); canvasData.top -= (newHeight - height) * ((center.pageY - offset.top - canvasData.top) / height); } else if (isPlainObject(pivot) && isNumber(pivot.x) && isNumber(pivot.y)) { canvasData.left -= (newWidth - width) * ((pivot.x - canvasData.left) / width); canvasData.top -= (newHeight - height) * ((pivot.y - canvasData.top) / height); } else { // Zoom from the center of the canvas canvasData.left -= (newWidth - width) / 2; canvasData.top -= (newHeight - height) / 2; } canvasData.width = newWidth; canvasData.height = newHeight; this.renderCanvas(true); } return this; }, /** * Rotate the canvas with a relative degree * @param {number} degree - The rotate degree. * @returns {Cropper} this */ rotate: function rotate(degree) { return this.rotateTo((this.imageData.rotate || 0) + Number(degree)); }, /** * Rotate the canvas to an absolute degree * @param {number} degree - The rotate degree. * @returns {Cropper} this */ rotateTo: function rotateTo(degree) { degree = Number(degree); if (isNumber(degree) && this.ready && !this.disabled && this.options.rotatable) { this.imageData.rotate = degree % 360; this.renderCanvas(true, true); } return this; }, /** * Scale the image on the x-axis. * @param {number} scaleX - The scale ratio on the x-axis. * @returns {Cropper} this */ scaleX: function scaleX(_scaleX) { var scaleY = this.imageData.scaleY; return this.scale(_scaleX, isNumber(scaleY) ? scaleY : 1); }, /** * Scale the image on the y-axis. * @param {number} scaleY - The scale ratio on the y-axis. * @returns {Cropper} this */ scaleY: function scaleY(_scaleY) { var scaleX = this.imageData.scaleX; return this.scale(isNumber(scaleX) ? scaleX : 1, _scaleY); }, /** * Scale the image * @param {number} scaleX - The scale ratio on the x-axis. * @param {number} [scaleY=scaleX] - The scale ratio on the y-axis. * @returns {Cropper} this */ scale: function scale(scaleX) { var scaleY = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : scaleX; var imageData = this.imageData; var transformed = false; scaleX = Number(scaleX); scaleY = Number(scaleY); if (this.ready && !this.disabled && this.options.scalable) { if (isNumber(scaleX)) { imageData.scaleX = scaleX; transformed = true; } if (isNumber(scaleY)) { imageData.scaleY = scaleY; transformed = true; } if (transformed) { this.renderCanvas(true, true); } } return this; }, /** * Get the cropped area position and size data (base on the original image) * @param {boolean} [rounded=false] - Indicate if round the data values or not. * @returns {Object} The result cropped data. */ getData: function getData() { var rounded = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; var options = this.options, imageData = this.imageData, canvasData = this.canvasData, cropBoxData = this.cropBoxData; var data; if (this.ready && this.cropped) { data = { x: cropBoxData.left - canvasData.left, y: cropBoxData.top - canvasData.top, width: cropBoxData.width, height: cropBoxData.height }; var ratio = imageData.width / imageData.naturalWidth; forEach(data, function (n, i) { data[i] = n / ratio; }); if (rounded) { // In case rounding off leads to extra 1px in right or bottom border // we should round the top-left corner and the dimension (#343). var bottom = Math.round(data.y + data.height); var right = Math.round(data.x + data.width); data.x = Math.round(data.x); data.y = Math.round(data.y); data.width = right - data.x; data.height = bottom - data.y; } } else { data = { x: 0, y: 0, width: 0, height: 0 }; } if (options.rotatable) { data.rotate = imageData.rotate || 0; } if (options.scalable) { data.scaleX = imageData.scaleX || 1; data.scaleY = imageData.scaleY || 1; } return data; }, /** * Set the cropped area position and size with new data * @param {Object} data - The new data. * @returns {Cropper} this */ setData: function setData(data) { var options = this.options, imageData = this.imageData, canvasData = this.canvasData; var cropBoxData = {}; if (this.ready && !this.disabled && isPlainObject(data)) { var transformed = false; if (options.rotatable) { if (isNumber(data.rotate) && data.rotate !== imageData.rotate) { imageData.rotate = data.rotate; transformed = true; } } if (options.scalable) { if (isNumber(data.scaleX) && data.scaleX !== imageData.scaleX) { imageData.scaleX = data.scaleX; transformed = true; } if (isNumber(data.scaleY) && data.scaleY !== imageData.scaleY) { imageData.scaleY = data.scaleY; transformed = true; } } if (transformed) { this.renderCanvas(true, true); } var ratio = imageData.width / imageData.naturalWidth; if (isNumber(data.x)) { cropBoxData.left = data.x * ratio + canvasData.left; } if (isNumber(data.y)) { cropBoxData.top = data.y * ratio + canvasData.top; } if (isNumber(data.width)) { cropBoxData.width = data.width * ratio; } if (isNumber(data.height)) { cropBoxData.height = data.height * ratio; } this.setCropBoxData(cropBoxData); } return this; }, /** * Get the container size data. * @returns {Object} The result container data. */ getContainerData: function getContainerData() { return this.ready ? assign({}, this.containerData) : {}; }, /** * Get the image position and size data. * @returns {Object} The result image data. */ getImageData: function getImageData() { return this.sized ? assign({}, this.imageData) : {}; }, /** * Get the canvas position and size data. * @returns {Object} The result canvas data. */ getCanvasData: function getCanvasData() { var canvasData = this.canvasData; var data = {}; if (this.ready) { forEach(['left', 'top', 'width', 'height', 'naturalWidth', 'naturalHeight'], function (n) { data[n] = canvasData[n]; }); } return data; }, /** * Set the canvas position and size with new data. * @param {Object} data - The new canvas data. * @returns {Cropper} this */ setCanvasData: function setCanvasData(data) { var canvasData = this.canvasData; var aspectRatio = canvasData.aspectRatio; if (this.ready && !this.disabled && isPlainObject(data)) { if (isNumber(data.left)) { canvasData.left = data.left; } if (isNumber(data.top)) { canvasData.top = data.top; } if (isNumber(data.width)) { canvasData.width = data.width; canvasData.height = data.width / aspectRatio; } else if (isNumber(data.height)) { canvasData.height = data.height; canvasData.width = data.height * aspectRatio; } this.renderCanvas(true); } return this; }, /** * Get the crop box position and size data. * @returns {Object} The result crop box data. */ getCropBoxData: function getCropBoxData() { var cropBoxData = this.cropBoxData; var data; if (this.ready && this.cropped) { data = { left: cropBoxData.left, top: cropBoxData.top, width: cropBoxData.width, height: cropBoxData.height }; } return data || {}; }, /** * Set the crop box position and size with new data. * @param {Object} data - The new crop box data. * @returns {Cropper} this */ setCropBoxData: function setCropBoxData(data) { var cropBoxData = this.cropBoxData; var aspectRatio = this.options.aspectRatio; var widthChanged; var heightChanged; if (this.ready && this.cropped && !this.disabled && isPlainObject(data)) { if (isNumber(data.left)) { cropBoxData.left = data.left; } if (isNumber(data.top)) { cropBoxData.top = data.top; } if (isNumber(data.width) && data.width !== cropBoxData.width) { widthChanged = true; cropBoxData.width = data.width; } if (isNumber(data.height) && data.height !== cropBoxData.height) { heightChanged = true; cropBoxData.height = data.height; } if (aspectRatio) { if (widthChanged) { cropBoxData.height = cropBoxData.width / aspectRatio; } else if (heightChanged) { cropBoxData.width = cropBoxData.height * aspectRatio; } } this.renderCropBox(); } return this; }, /** * Get a canvas drawn the cropped image. * @param {Object} [options={}] - The config options. * @returns {HTMLCanvasElement} - The result canvas. */ getCroppedCanvas: function getCroppedCanvas() { var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; if (!this.ready || !window.HTMLCanvasElement) { return null; } var canvasData = this.canvasData; var source = getSourceCanvas(this.image, this.imageData, canvasData, options); // Returns the source canvas if it is not cropped. if (!this.cropped) { return source; } var _this$getData = this.getData(), initialX = _this$getData.x, initialY = _this$getData.y, initialWidth = _this$getData.width, initialHeight = _this$getData.height; var ratio = source.width / Math.floor(canvasData.naturalWidth); if (ratio !== 1) { initialX *= ratio; initialY *= ratio; initialWidth *= ratio; initialHeight *= ratio; } var aspectRatio = initialWidth / initialHeight; var maxSizes = getAdjustedSizes({ aspectRatio: aspectRatio, width: options.maxWidth || Infinity, height: options.maxHeight || Infinity }); var minSizes = getAdjustedSizes({ aspectRatio: aspectRatio, width: options.minWidth || 0, height: options.minHeight || 0 }, 'cover'); var _getAdjustedSizes = getAdjustedSizes({ aspectRatio: aspectRatio, width: options.width || (ratio !== 1 ? source.width : initialWidth), height: options.height || (ratio !== 1 ? source.height : initialHeight) }), width = _getAdjustedSizes.width, height = _getAdjustedSizes.height; width = Math.min(maxSizes.width, Math.max(minSizes.width, width)); height = Math.min(maxSizes.height, Math.max(minSizes.height, height)); var canvas = document.createElement('canvas'); var context = canvas.getContext('2d'); canvas.width = normalizeDecimalNumber(width); canvas.height = normalizeDecimalNumber(height); context.fillStyle = options.fillColor || 'transparent'; context.fillRect(0, 0, width, height); var _options$imageSmoothi = options.imageSmoothingEnabled, imageSmoothingEnabled = _options$imageSmoothi === void 0 ? true : _options$imageSmoothi, imageSmoothingQuality = options.imageSmoothingQuality; context.imageSmoothingEnabled = imageSmoothingEnabled; if (imageSmoothingQuality) { context.imageSmoothingQuality = imageSmoothingQuality; } // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.drawImage var sourceWidth = source.width; var sourceHeight = source.height; // Source canvas parameters var srcX = initialX; var srcY = initialY; var srcWidth; var srcHeight; // Destination canvas parameters var dstX; var dstY; var dstWidth; var dstHeight; if (srcX <= -initialWidth || srcX > sourceWidth) { srcX = 0; srcWidth = 0; dstX = 0; dstWidth = 0; } else if (srcX <= 0) { dstX = -srcX; srcX = 0; srcWidth = Math.min(sourceWidth, initialWidth + srcX); dstWidth = srcWidth; } else if (srcX <= sourceWidth) { dstX = 0; srcWidth = Math.min(initialWidth, sourceWidth - srcX); dstWidth = srcWidth; } if (srcWidth <= 0 || srcY <= -initialHeight || srcY > sourceHeight) { srcY = 0; srcHeight = 0; dstY = 0; dstHeight = 0; } else if (srcY <= 0) { dstY = -srcY; srcY = 0; srcHeight = Math.min(sourceHeight, initialHeight + srcY); dstHeight = srcHeight; } else if (srcY <= sourceHeight) { dstY = 0; srcHeight = Math.min(initialHeight, sourceHeight - srcY); dstHeight = srcHeight; } var params = [srcX, srcY, srcWidth, srcHeight]; // Avoid "IndexSizeError" if (dstWidth > 0 && dstHeight > 0) { var scale = width / initialWidth; params.push(dstX * scale, dstY * scale, dstWidth * scale, dstHeight * scale); } // All the numerical parameters should be integer for `drawImage` // https://github.com/fengyuanchen/cropper/issues/476 context.drawImage.apply(context, [source].concat(_toConsumableArray(params.map(function (param) { return Math.floor(normalizeDecimalNumber(param)); })))); return canvas; }, /** * Change the aspect ratio of the crop box. * @param {number} aspectRatio - The new aspect ratio. * @returns {Cropper} this */ setAspectRatio: function setAspectRatio(aspectRatio) { var options = this.options; if (!this.disabled && !isUndefined(aspectRatio)) { // 0 -> NaN options.aspectRatio = Math.max(0, aspectRatio) || NaN; if (this.ready) { this.initCropBox(); if (this.cropped) { this.renderCropBox(); } } } return this; }, /** * Change the drag mode. * @param {string} mode - The new drag mode. * @returns {Cropper} this */ setDragMode: function setDragMode(mode) { var options = this.options, dragBox = this.dragBox, face = this.face; if (this.ready && !this.disabled) { var croppable = mode === DRAG_MODE_CROP; var movable = options.movable && mode === DRAG_MODE_MOVE; mode = croppable || movable ? mode : DRAG_MODE_NONE; options.dragMode = mode; setData(dragBox, DATA_ACTION, mode); toggleClass(dragBox, CLASS_CROP, croppable); toggleClass(dragBox, CLASS_MOVE, movable); if (!options.cropBoxMovable) { // Sync drag mode to crop box when it is not movable setData(face, DATA_ACTION, mode); toggleClass(face, CLASS_CROP, croppable); toggleClass(face, CLASS_MOVE, movable); } } return this; } }; var AnotherCropper = WINDOW.Cropper; var Cropper = /*#__PURE__*/function () { /** * Create a new Cropper. * @param {Element} element - The target element for cropping. * @param {Object} [options={}] - The configuration options. */ function Cropper(element) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; _classCallCheck(this, Cropper); if (!element || !REGEXP_TAG_NAME.test(element.tagName)) { throw new Error('The first argument is required and must be an or element.'); } this.element = element; this.options = assign({}, DEFAULTS, isPlainObject(options) && options); this.cropped = false; this.disabled = false; this.pointers = {}; this.ready = false; this.reloading = false; this.replaced = false; this.sized = false; this.sizing = false; this.init(); } _createClass(Cropper, [{ key: "init", value: function init() { var element = this.element; var tagName = element.tagName.toLowerCase(); var url; if (element[NAMESPACE]) { return; } element[NAMESPACE] = this; if (tagName === 'img') { this.isImg = true; // e.g.: "img/picture.jpg" url = element.getAttribute('src') || ''; this.originalUrl = url; // Stop when it's a blank image if (!url) { return; } // e.g.: "https://example.com/img/picture.jpg" url = element.src; } else if (tagName === 'canvas' && window.HTMLCanvasElement) { url = element.toDataURL(); } this.load(url); } }, { key: "load", value: function load(url) { var _this = this; if (!url) { return; } this.url = url; this.imageData = {}; var element = this.element, options = this.options; if (!options.rotatable && !options.scalable) { options.checkOrientation = false; } // Only IE10+ supports Typed Arrays if (!options.checkOrientation || !window.ArrayBuffer) { this.clone(); return; } // Detect the mime type of the image directly if it is a Data URL if (REGEXP_DATA_URL.test(url)) { // Read ArrayBuffer from Data URL of JPEG images directly for better performance if (REGEXP_DATA_URL_JPEG.test(url)) { this.read(dataURLToArrayBuffer(url)); } else { // Only a JPEG image may contains Exif Orientation information, // the rest types of Data URLs are not necessary to check orientation at all. this.clone(); } return; } // 1. Detect the mime type of the image by a XMLHttpRequest. // 2. Load the image as ArrayBuffer for reading orientation if its a JPEG image. var xhr = new XMLHttpRequest(); var clone = this.clone.bind(this); this.reloading = true; this.xhr = xhr; // 1. Cross origin requests are only supported for protocol schemes: // http, https, data, chrome, chrome-extension. // 2. Access to XMLHttpRequest from a Data URL will be blocked by CORS policy // in some browsers as IE11 and Safari. xhr.onabort = clone; xhr.onerror = clone; xhr.ontimeout = clone; xhr.onprogress = function () { // Abort the request directly if it not a JPEG image for better performance if (xhr.getResponseHeader('content-type') !== MIME_TYPE_JPEG) { xhr.abort(); } }; xhr.onload = function () { _this.read(xhr.response); }; xhr.onloadend = function () { _this.reloading = false; _this.xhr = null; }; // Bust cache when there is a "crossOrigin" property to avoid browser cache error if (options.checkCrossOrigin && isCrossOriginURL(url) && element.crossOrigin) { url = addTimestamp(url); } xhr.open('GET', url); xhr.responseType = 'arraybuffer'; xhr.withCredentials = element.crossOrigin === 'use-credentials'; xhr.send(); } }, { key: "read", value: function read(arrayBuffer) { var options = this.options, imageData = this.imageData; // Reset the orientation value to its default value 1 // as some iOS browsers will render image with its orientation var orientation = resetAndGetOrientation(arrayBuffer); var rotate = 0; var scaleX = 1; var scaleY = 1; if (orientation > 1) { // Generate a new URL which has the default orientation value this.url = arrayBufferToDataURL(arrayBuffer, MIME_TYPE_JPEG); var _parseOrientation = parseOrientation(orientation); rotate = _parseOrientation.rotate; scaleX = _parseOrientation.scaleX; scaleY = _parseOrientation.scaleY; } if (options.rotatable) { imageData.rotate = rotate; } if (options.scalable) { imageData.scaleX = scaleX; imageData.scaleY = scaleY; } this.clone(); } }, { key: "clone", value: function clone() { var element = this.element, url = this.url; var crossOrigin = element.crossOrigin; var crossOriginUrl = url; if (this.options.checkCrossOrigin && isCrossOriginURL(url)) { if (!crossOrigin) { crossOrigin = 'anonymous'; } // Bust cache when there is not a "crossOrigin" property (#519) crossOriginUrl = addTimestamp(url); } this.crossOrigin = crossOrigin; this.crossOriginUrl = crossOriginUrl; var image = document.createElement('img'); if (crossOrigin) { image.crossOrigin = crossOrigin; } image.src = crossOriginUrl || url; image.alt = element.alt || 'The image to crop'; this.image = image; image.onload = this.start.bind(this); image.onerror = this.stop.bind(this); addClass(image, CLASS_HIDE); element.parentNode.insertBefore(image, element.nextSibling); } }, { key: "start", value: function start() { var _this2 = this; var image = this.image; image.onload = null; image.onerror = null; this.sizing = true; // Match all browsers that use WebKit as the layout engine in iOS devices, // such as Safari for iOS, Chrome for iOS, and in-app browsers. var isIOSWebKit = WINDOW.navigator && /(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(WINDOW.navigator.userAgent); var done = function done(naturalWidth, naturalHeight) { assign(_this2.imageData, { naturalWidth: naturalWidth, naturalHeight: naturalHeight, aspectRatio: naturalWidth / naturalHeight }); _this2.sizing = false; _this2.sized = true; _this2.build(); }; // Most modern browsers (excepts iOS WebKit) if (image.naturalWidth && !isIOSWebKit) { done(image.naturalWidth, image.naturalHeight); return; } var sizingImage = document.createElement('img'); var body = document.body || document.documentElement; this.sizingImage = sizingImage; sizingImage.onload = function () { done(sizingImage.width, sizingImage.height); if (!isIOSWebKit) { body.removeChild(sizingImage); } }; sizingImage.src = image.src; // iOS WebKit will convert the image automatically // with its orientation once append it into DOM (#279) if (!isIOSWebKit) { sizingImage.style.cssText = 'left:0;' + 'max-height:none!important;' + 'max-width:none!important;' + 'min-height:0!important;' + 'min-width:0!important;' + 'opacity:0;' + 'position:absolute;' + 'top:0;' + 'z-index:-1;'; body.appendChild(sizingImage); } } }, { key: "stop", value: function stop() { var image = this.image; image.onload = null; image.onerror = null; image.parentNode.removeChild(image); this.image = null; } }, { key: "build", value: function build() { if (!this.sized || this.ready) { return; } var element = this.element, options = this.options, image = this.image; // Create cropper elements var container = element.parentNode; var template = document.createElement('div'); template.innerHTML = TEMPLATE; var cropper = template.querySelector(".".concat(NAMESPACE, "-container")); var canvas = cropper.querySelector(".".concat(NAMESPACE, "-canvas")); var dragBox = cropper.querySelector(".".concat(NAMESPACE, "-drag-box")); var cropBox = cropper.querySelector(".".concat(NAMESPACE, "-crop-box")); var face = cropBox.querySelector(".".concat(NAMESPACE, "-face")); this.container = container; this.cropper = cropper; this.canvas = canvas; this.dragBox = dragBox; this.cropBox = cropBox; this.viewBox = cropper.querySelector(".".concat(NAMESPACE, "-view-box")); this.face = face; canvas.appendChild(image); // Hide the original image addClass(element, CLASS_HIDDEN); // Inserts the cropper after to the current image container.insertBefore(cropper, element.nextSibling); // Show the image if is hidden if (!this.isImg) { removeClass(image, CLASS_HIDE); } this.initPreview(); this.bind(); options.initialAspectRatio = Math.max(0, options.initialAspectRatio) || NaN; options.aspectRatio = Math.max(0, options.aspectRatio) || NaN; options.viewMode = Math.max(0, Math.min(3, Math.round(options.viewMode))) || 0; addClass(cropBox, CLASS_HIDDEN); if (!options.guides) { addClass(cropBox.getElementsByClassName("".concat(NAMESPACE, "-dashed")), CLASS_HIDDEN); } if (!options.center) { addClass(cropBox.getElementsByClassName("".concat(NAMESPACE, "-center")), CLASS_HIDDEN); } if (options.background) { addClass(cropper, "".concat(NAMESPACE, "-bg")); } if (!options.highlight) { addClass(face, CLASS_INVISIBLE); } if (options.cropBoxMovable) { addClass(face, CLASS_MOVE); setData(face, DATA_ACTION, ACTION_ALL); } if (!options.cropBoxResizable) { addClass(cropBox.getElementsByClassName("".concat(NAMESPACE, "-line")), CLASS_HIDDEN); addClass(cropBox.getElementsByClassName("".concat(NAMESPACE, "-point")), CLASS_HIDDEN); } this.render(); this.ready = true; this.setDragMode(options.dragMode); if (options.autoCrop) { this.crop(); } this.setData(options.data); if (isFunction(options.ready)) { addListener(element, EVENT_READY, options.ready, { once: true }); } dispatchEvent(element, EVENT_READY); } }, { key: "unbuild", value: function unbuild() { if (!this.ready) { return; } this.ready = false; this.unbind(); this.resetPreview(); this.cropper.parentNode.removeChild(this.cropper); removeClass(this.element, CLASS_HIDDEN); } }, { key: "uncreate", value: function uncreate() { if (this.ready) { this.unbuild(); this.ready = false; this.cropped = false; } else if (this.sizing) { this.sizingImage.onload = null; this.sizing = false; this.sized = false; } else if (this.reloading) { this.xhr.onabort = null; this.xhr.abort(); } else if (this.image) { this.stop(); } } /** * Get the no conflict cropper class. * @returns {Cropper} The cropper class. */ }], [{ key: "noConflict", value: function noConflict() { window.Cropper = AnotherCropper; return Cropper; } /** * Change the default options. * @param {Object} options - The new default options. */ }, { key: "setDefaults", value: function setDefaults(options) { assign(DEFAULTS, isPlainObject(options) && options); } }]); return Cropper; }(); assign(Cropper.prototype, render, preview, events, handlers, change, methods); return Cropper; }); }, {}], 562: [function (require, module, exports) { (function (process) { (function () { /* eslint-env browser */ /** * This is the web browser implementation of `debug()`. */ exports.formatArgs = formatArgs; exports.save = save; exports.load = load; exports.useColors = useColors; exports.storage = localstorage(); exports.destroy = function () { var warned = false; return function () { if (!warned) { warned = true; console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); } }; }(); /** * Colors. */ exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33']; /** * Currently only WebKit-based Web Inspectors, Firefox >= v31, * and the Firebug extension (any Firefox version) are known * to support "%c" CSS customizations. * * TODO: add a `localStorage` variable to explicitly enable/disable colors */ // eslint-disable-next-line complexity function useColors() { // NB: In an Electron preload script, document will be defined but not fully // initialized. Since we know we're in Chrome, we'll just detect this case // explicitly if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { return true; } // Internet Explorer and Edge do not support colors. if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { return false; } // Is webkit? http://stackoverflow.com/a/16459606/376773 // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773 typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31? // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); } /** * Colorize log arguments if enabled. * * @api public */ function formatArgs(args) { args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff); if (!this.useColors) { return; } var c = 'color: ' + this.color; args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other // arguments passed either before or after the %c, so we need to // figure out the correct index to insert the CSS into var index = 0; var lastC = 0; args[0].replace(/%[a-zA-Z%]/g, function (match) { if (match === '%%') { return; } index++; if (match === '%c') { // We only are interested in the *last* %c // (the user may have provided their own) lastC = index; } }); args.splice(lastC, 0, c); } /** * Invokes `console.debug()` when available. * No-op when `console.debug` is not a "function". * If `console.debug` is not available, falls back * to `console.log`. * * @api public */ exports.log = console.debug || console.log || function () {}; /** * Save `namespaces`. * * @param {String} namespaces * @api private */ function save(namespaces) { try { if (namespaces) { exports.storage.setItem('debug', namespaces); } else { exports.storage.removeItem('debug'); } } catch (error) {// Swallow // XXX (@Qix-) should we be logging these? } } /** * Load `namespaces`. * * @return {String} returns the previously persisted debug modes * @api private */ function load() { var r; try { r = exports.storage.getItem('debug'); } catch (error) {// Swallow // XXX (@Qix-) should we be logging these? } // If debug isn't set in LS, and we're in Electron, try to load $DEBUG if (!r && typeof process !== 'undefined' && 'env' in process) { r = process.env.DEBUG; } return r; } /** * Localstorage attempts to return the localstorage. * * This is necessary because safari throws * when a user disables cookies/localstorage * and you attempt to access it. * * @return {LocalStorage} * @api private */ function localstorage() { try { // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context // The Browser also has localStorage in the global context. return localStorage; } catch (error) {// Swallow // XXX (@Qix-) should we be logging these? } } module.exports = require('./common')(exports); var formatters = module.exports.formatters; /** * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. */ formatters.j = function (v) { try { return JSON.stringify(v); } catch (error) { return '[UnexpectedJSONParseError]: ' + error.message; } }; }).call(this); }).call(this, require('_process')); }, { "./common": 563, "_process": 596 }], 563: [function (require, module, exports) { /** * This is the common logic for both the Node.js and web browser * implementations of `debug()`. */ function setup(env) { createDebug.debug = createDebug; createDebug.default = createDebug; createDebug.coerce = coerce; createDebug.disable = disable; createDebug.enable = enable; createDebug.enabled = enabled; createDebug.humanize = require('ms'); createDebug.destroy = destroy; Object.keys(env).forEach(function (key) { createDebug[key] = env[key]; }); /** * The currently active debug mode names, and names to skip. */ createDebug.names = []; createDebug.skips = []; /** * Map of special "%n" handling functions, for the debug "format" argument. * * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". */ createDebug.formatters = {}; /** * Selects a color for a debug namespace * @param {String} namespace The namespace string for the for the debug instance to be colored * @return {Number|String} An ANSI color code for the given namespace * @api private */ function selectColor(namespace) { var hash = 0; for (var i = 0; i < namespace.length; i++) { hash = (hash << 5) - hash + namespace.charCodeAt(i); hash |= 0; // Convert to 32bit integer } return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; } createDebug.selectColor = selectColor; /** * Create a debugger with the given `namespace`. * * @param {String} namespace * @return {Function} * @api public */ function createDebug(namespace) { var prevTime; var enableOverride = null; var namespacesCache; var enabledCache; function debug() { for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { args[_key3] = arguments[_key3]; } // Disabled? if (!debug.enabled) { return; } var self = debug; // Set `diff` timestamp var curr = Number(new Date()); var ms = curr - (prevTime || curr); self.diff = ms; self.prev = prevTime; self.curr = curr; prevTime = curr; args[0] = createDebug.coerce(args[0]); if (typeof args[0] !== 'string') { // Anything else let's inspect with %O args.unshift('%O'); } // Apply any `formatters` transformations var index = 0; args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) { // If we encounter an escaped % then don't increase the array index if (match === '%%') { return '%'; } index++; var formatter = createDebug.formatters[format]; if (typeof formatter === 'function') { var val = args[index]; match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format` args.splice(index, 1); index--; } return match; }); // Apply env-specific formatting (colors, etc.) createDebug.formatArgs.call(self, args); var logFn = self.log || createDebug.log; logFn.apply(self, args); } debug.namespace = namespace; debug.useColors = createDebug.useColors(); debug.color = createDebug.selectColor(namespace); debug.extend = extend; debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. Object.defineProperty(debug, 'enabled', { enumerable: true, configurable: false, get: function get() { if (enableOverride !== null) { return enableOverride; } if (namespacesCache !== createDebug.namespaces) { namespacesCache = createDebug.namespaces; enabledCache = createDebug.enabled(namespace); } return enabledCache; }, set: function set(v) { enableOverride = v; } }); // Env-specific initialization logic for debug instances if (typeof createDebug.init === 'function') { createDebug.init(debug); } return debug; } function extend(namespace, delimiter) { var newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); newDebug.log = this.log; return newDebug; } /** * Enables a debug mode by namespaces. This can include modes * separated by a colon and wildcards. * * @param {String} namespaces * @api public */ function enable(namespaces) { createDebug.save(namespaces); createDebug.namespaces = namespaces; createDebug.names = []; createDebug.skips = []; var i; var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); var len = split.length; for (i = 0; i < len; i++) { if (!split[i]) { // ignore empty strings continue; } namespaces = split[i].replace(/\*/g, '.*?'); if (namespaces[0] === '-') { createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); } else { createDebug.names.push(new RegExp('^' + namespaces + '$')); } } } /** * Disable debug output. * * @return {String} namespaces * @api public */ function disable() { var namespaces = [].concat(createDebug.names.map(toNamespace), createDebug.skips.map(toNamespace).map(function (namespace) { return '-' + namespace; })).join(','); createDebug.enable(''); return namespaces; } /** * Returns true if the given mode name is enabled, false otherwise. * * @param {String} name * @return {Boolean} * @api public */ function enabled(name) { if (name[name.length - 1] === '*') { return true; } var i; var len; for (i = 0, len = createDebug.skips.length; i < len; i++) { if (createDebug.skips[i].test(name)) { return false; } } for (i = 0, len = createDebug.names.length; i < len; i++) { if (createDebug.names[i].test(name)) { return true; } } return false; } /** * Convert regexp to namespace * * @param {RegExp} regxep * @return {String} namespace * @api private */ function toNamespace(regexp) { return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, '*'); } /** * Coerce `val`. * * @param {Mixed} val * @return {Mixed} * @api private */ function coerce(val) { if (val instanceof Error) { return val.stack || val.message; } return val; } /** * XXX DO NOT USE. This is a temporary stub function. * XXX It WILL be removed in the next major release. */ function destroy() { console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); } createDebug.enable(createDebug.load()); return createDebug; } module.exports = setup; }, { "ms": 591 }], 564: [function (require, module, exports) { module.exports = function () { if (typeof self !== "undefined") { return self; } else if (typeof window !== "undefined") { return window; } else { return Function("return this")(); } }(); }, {}], 565: [function (require, module, exports) { var Socket = require("./socket"); module.exports = function (uri, opts) { return new Socket(uri, opts); }; /** * Expose deps for legacy compatibility * and standalone browser access. */ module.exports.Socket = Socket; module.exports.protocol = Socket.protocol; // this is an int module.exports.Transport = require("./transport"); module.exports.transports = require("./transports/index"); module.exports.parser = require("engine.io-parser"); }, { "./socket": 566, "./transport": 567, "./transports/index": 568, "engine.io-parser": 579 }], 566: [function (require, module, exports) { var transports = require("./transports/index"); var Emitter = require("component-emitter"); var debug = require("debug")("engine.io-client:socket"); var parser = require("engine.io-parser"); var parseuri = require("parseuri"); var parseqs = require("parseqs"); var Socket = /*#__PURE__*/function (_Emitter2) { _inheritsLoose(Socket, _Emitter2); /** * Socket constructor. * * @param {String|Object} uri or options * @param {Object} options * @api public */ function Socket(uri, opts) { var _this13; if (opts === void 0) { opts = {}; } _this13 = _Emitter2.call(this) || this; if (uri && "object" === typeof uri) { opts = uri; uri = null; } if (uri) { uri = parseuri(uri); opts.hostname = uri.host; opts.secure = uri.protocol === "https" || uri.protocol === "wss"; opts.port = uri.port; if (uri.query) opts.query = uri.query; } else if (opts.host) { opts.hostname = parseuri(opts.host).host; } _this13.secure = null != opts.secure ? opts.secure : typeof location !== "undefined" && "https:" === location.protocol; if (opts.hostname && !opts.port) { // if no port is specified manually, use the protocol default opts.port = _this13.secure ? "443" : "80"; } _this13.hostname = opts.hostname || (typeof location !== "undefined" ? location.hostname : "localhost"); _this13.port = opts.port || (typeof location !== "undefined" && location.port ? location.port : _this13.secure ? 443 : 80); _this13.transports = opts.transports || ["polling", "websocket"]; _this13.readyState = ""; _this13.writeBuffer = []; _this13.prevBufferLen = 0; _this13.opts = Object.assign({ path: "/engine.io", agent: false, withCredentials: false, upgrade: true, jsonp: true, timestampParam: "t", rememberUpgrade: false, rejectUnauthorized: true, perMessageDeflate: { threshold: 1024 }, transportOptions: {}, closeOnBeforeunload: true }, opts); _this13.opts.path = _this13.opts.path.replace(/\/$/, "") + "/"; if (typeof _this13.opts.query === "string") { _this13.opts.query = parseqs.decode(_this13.opts.query); } // set on handshake _this13.id = null; _this13.upgrades = null; _this13.pingInterval = null; _this13.pingTimeout = null; // set on heartbeat _this13.pingTimeoutTimer = null; if (typeof addEventListener === "function") { if (_this13.opts.closeOnBeforeunload) { // Firefox closes the connection when the "beforeunload" event is emitted but not Chrome. This event listener // ensures every browser behaves the same (no "disconnect" event at the Socket.IO level when the page is // closed/reloaded) addEventListener("beforeunload", function () { if (_this13.transport) { // silently close the transport _this13.transport.removeAllListeners(); _this13.transport.close(); } }, false); } if (_this13.hostname !== "localhost") { _this13.offlineEventListener = function () { _this13.onClose("transport close"); }; addEventListener("offline", _this13.offlineEventListener, false); } } _this13.open(); return _this13; } /** * Creates transport of the given type. * * @param {String} transport name * @return {Transport} * @api private */ var _proto = Socket.prototype; _proto.createTransport = function createTransport(name) { debug('creating transport "%s"', name); var query = clone(this.opts.query); // append engine.io protocol identifier query.EIO = parser.protocol; // transport name query.transport = name; // session id if we already have one if (this.id) query.sid = this.id; var opts = Object.assign({}, this.opts.transportOptions[name], this.opts, { query: query, socket: this, hostname: this.hostname, secure: this.secure, port: this.port }); debug("options: %j", opts); return new transports[name](opts); } /** * Initializes transport to use and starts probe. * * @api private */ ; _proto.open = function open() { var _this14 = this; var transport; if (this.opts.rememberUpgrade && Socket.priorWebsocketSuccess && this.transports.indexOf("websocket") !== -1) { transport = "websocket"; } else if (0 === this.transports.length) { // Emit error on next tick so it can be listened to setTimeout(function () { _this14.emit("error", "No transports available"); }, 0); return; } else { transport = this.transports[0]; } this.readyState = "opening"; // Retry with the next transport if the transport is disabled (jsonp: false) try { transport = this.createTransport(transport); } catch (e) { debug("error while creating transport: %s", e); this.transports.shift(); this.open(); return; } transport.open(); this.setTransport(transport); } /** * Sets the current transport. Disables the existing one (if any). * * @api private */ ; _proto.setTransport = function setTransport(transport) { var _this15 = this; debug("setting transport %s", transport.name); if (this.transport) { debug("clearing existing transport %s", this.transport.name); this.transport.removeAllListeners(); } // set up transport this.transport = transport; // set up transport listeners transport.on("drain", this.onDrain.bind(this)).on("packet", this.onPacket.bind(this)).on("error", this.onError.bind(this)).on("close", function () { _this15.onClose("transport close"); }); } /** * Probes a transport. * * @param {String} transport name * @api private */ ; _proto.probe = function probe(name) { var _this16 = this; debug('probing transport "%s"', name); var transport = this.createTransport(name, { probe: 1 }); var failed = false; Socket.priorWebsocketSuccess = false; var onTransportOpen = function onTransportOpen() { if (failed) return; debug('probe transport "%s" opened', name); transport.send([{ type: "ping", data: "probe" }]); transport.once("packet", function (msg) { if (failed) return; if ("pong" === msg.type && "probe" === msg.data) { debug('probe transport "%s" pong', name); _this16.upgrading = true; _this16.emit("upgrading", transport); if (!transport) return; Socket.priorWebsocketSuccess = "websocket" === transport.name; debug('pausing current transport "%s"', _this16.transport.name); _this16.transport.pause(function () { if (failed) return; if ("closed" === _this16.readyState) return; debug("changing transport and sending upgrade packet"); cleanup(); _this16.setTransport(transport); transport.send([{ type: "upgrade" }]); _this16.emit("upgrade", transport); transport = null; _this16.upgrading = false; _this16.flush(); }); } else { debug('probe transport "%s" failed', name); var err = new Error("probe error"); err.transport = transport.name; _this16.emit("upgradeError", err); } }); }; function freezeTransport() { if (failed) return; // Any callback called by transport should be ignored since now failed = true; cleanup(); transport.close(); transport = null; } // Handle any error that happens while probing var onerror = function onerror(err) { var error = new Error("probe error: " + err); error.transport = transport.name; freezeTransport(); debug('probe transport "%s" failed because of error: %s', name, err); _this16.emit("upgradeError", error); }; function onTransportClose() { onerror("transport closed"); } // When the socket is closed while we're probing function onclose() { onerror("socket closed"); } // When the socket is upgraded while we're probing function onupgrade(to) { if (transport && to.name !== transport.name) { debug('"%s" works - aborting "%s"', to.name, transport.name); freezeTransport(); } } // Remove all listeners on the transport and on self var cleanup = function cleanup() { transport.removeListener("open", onTransportOpen); transport.removeListener("error", onerror); transport.removeListener("close", onTransportClose); _this16.removeListener("close", onclose); _this16.removeListener("upgrading", onupgrade); }; transport.once("open", onTransportOpen); transport.once("error", onerror); transport.once("close", onTransportClose); this.once("close", onclose); this.once("upgrading", onupgrade); transport.open(); } /** * Called when connection is deemed open. * * @api public */ ; _proto.onOpen = function onOpen() { debug("socket open"); this.readyState = "open"; Socket.priorWebsocketSuccess = "websocket" === this.transport.name; this.emit("open"); this.flush(); // we check for `readyState` in case an `open` // listener already closed the socket if ("open" === this.readyState && this.opts.upgrade && this.transport.pause) { debug("starting upgrade probes"); var i = 0; var l = this.upgrades.length; for (; i < l; i++) { this.probe(this.upgrades[i]); } } } /** * Handles a packet. * * @api private */ ; _proto.onPacket = function onPacket(packet) { if ("opening" === this.readyState || "open" === this.readyState || "closing" === this.readyState) { debug('socket receive: type "%s", data "%s"', packet.type, packet.data); this.emit("packet", packet); // Socket is live - any packet counts this.emit("heartbeat"); switch (packet.type) { case "open": this.onHandshake(JSON.parse(packet.data)); break; case "ping": this.resetPingTimeout(); this.sendPacket("pong"); this.emit("ping"); this.emit("pong"); break; case "error": var err = new Error("server error"); err.code = packet.data; this.onError(err); break; case "message": this.emit("data", packet.data); this.emit("message", packet.data); break; } } else { debug('packet received with socket readyState "%s"', this.readyState); } } /** * Called upon handshake completion. * * @param {Object} handshake obj * @api private */ ; _proto.onHandshake = function onHandshake(data) { this.emit("handshake", data); this.id = data.sid; this.transport.query.sid = data.sid; this.upgrades = this.filterUpgrades(data.upgrades); this.pingInterval = data.pingInterval; this.pingTimeout = data.pingTimeout; this.onOpen(); // In case open handler closes socket if ("closed" === this.readyState) return; this.resetPingTimeout(); } /** * Sets and resets ping timeout timer based on server pings. * * @api private */ ; _proto.resetPingTimeout = function resetPingTimeout() { var _this17 = this; clearTimeout(this.pingTimeoutTimer); this.pingTimeoutTimer = setTimeout(function () { _this17.onClose("ping timeout"); }, this.pingInterval + this.pingTimeout); if (this.opts.autoUnref) { this.pingTimeoutTimer.unref(); } } /** * Called on `drain` event * * @api private */ ; _proto.onDrain = function onDrain() { this.writeBuffer.splice(0, this.prevBufferLen); // setting prevBufferLen = 0 is very important // for example, when upgrading, upgrade packet is sent over, // and a nonzero prevBufferLen could cause problems on `drain` this.prevBufferLen = 0; if (0 === this.writeBuffer.length) { this.emit("drain"); } else { this.flush(); } } /** * Flush write buffers. * * @api private */ ; _proto.flush = function flush() { if ("closed" !== this.readyState && this.transport.writable && !this.upgrading && this.writeBuffer.length) { debug("flushing %d packets in socket", this.writeBuffer.length); this.transport.send(this.writeBuffer); // keep track of current length of writeBuffer // splice writeBuffer and callbackBuffer on `drain` this.prevBufferLen = this.writeBuffer.length; this.emit("flush"); } } /** * Sends a message. * * @param {String} message. * @param {Function} callback function. * @param {Object} options. * @return {Socket} for chaining. * @api public */ ; _proto.write = function write(msg, options, fn) { this.sendPacket("message", msg, options, fn); return this; }; _proto.send = function send(msg, options, fn) { this.sendPacket("message", msg, options, fn); return this; } /** * Sends a packet. * * @param {String} packet type. * @param {String} data. * @param {Object} options. * @param {Function} callback function. * @api private */ ; _proto.sendPacket = function sendPacket(type, data, options, fn) { if ("function" === typeof data) { fn = data; data = undefined; } if ("function" === typeof options) { fn = options; options = null; } if ("closing" === this.readyState || "closed" === this.readyState) { return; } options = options || {}; options.compress = false !== options.compress; var packet = { type: type, data: data, options: options }; this.emit("packetCreate", packet); this.writeBuffer.push(packet); if (fn) this.once("flush", fn); this.flush(); } /** * Closes the connection. * * @api private */ ; _proto.close = function close() { var _this18 = this; var close = function close() { _this18.onClose("forced close"); debug("socket closing - telling transport to close"); _this18.transport.close(); }; var cleanupAndClose = function cleanupAndClose() { _this18.removeListener("upgrade", cleanupAndClose); _this18.removeListener("upgradeError", cleanupAndClose); close(); }; var waitForUpgrade = function waitForUpgrade() { // wait for upgrade to finish since we can't send packets while pausing a transport _this18.once("upgrade", cleanupAndClose); _this18.once("upgradeError", cleanupAndClose); }; if ("opening" === this.readyState || "open" === this.readyState) { this.readyState = "closing"; if (this.writeBuffer.length) { this.once("drain", function () { if (_this18.upgrading) { waitForUpgrade(); } else { close(); } }); } else if (this.upgrading) { waitForUpgrade(); } else { close(); } } return this; } /** * Called upon transport error * * @api private */ ; _proto.onError = function onError(err) { debug("socket error %j", err); Socket.priorWebsocketSuccess = false; this.emit("error", err); this.onClose("transport error", err); } /** * Called upon transport close. * * @api private */ ; _proto.onClose = function onClose(reason, desc) { if ("opening" === this.readyState || "open" === this.readyState || "closing" === this.readyState) { debug('socket close with reason: "%s"', reason); // clear timers clearTimeout(this.pingIntervalTimer); clearTimeout(this.pingTimeoutTimer); // stop event from firing again for transport this.transport.removeAllListeners("close"); // ensure transport won't stay open this.transport.close(); // ignore further transport communication this.transport.removeAllListeners(); if (typeof removeEventListener === "function") { removeEventListener("offline", this.offlineEventListener, false); } // set ready state this.readyState = "closed"; // clear session id this.id = null; // emit close event this.emit("close", reason, desc); // clean buffers after, so users can still // grab the buffers on `close` event this.writeBuffer = []; this.prevBufferLen = 0; } } /** * Filters upgrades, returning only those matching client transports. * * @param {Array} server upgrades * @api private * */ ; _proto.filterUpgrades = function filterUpgrades(upgrades) { var filteredUpgrades = []; var i = 0; var j = upgrades.length; for (; i < j; i++) { if (~this.transports.indexOf(upgrades[i])) filteredUpgrades.push(upgrades[i]); } return filteredUpgrades; }; return Socket; }(Emitter); Socket.priorWebsocketSuccess = false; /** * Protocol version. * * @api public */ Socket.protocol = parser.protocol; // this is an int function clone(obj) { var o = {}; for (var i in obj) { if (obj.hasOwnProperty(i)) { o[i] = obj[i]; } } return o; } module.exports = Socket; }, { "./transports/index": 568, "component-emitter": 8, "debug": 562, "engine.io-parser": 579, "parseqs": 593, "parseuri": 594 }], 567: [function (require, module, exports) { var parser = require("engine.io-parser"); var Emitter = require("component-emitter"); var debug = require("debug")("engine.io-client:transport"); var Transport = /*#__PURE__*/function (_Emitter3) { _inheritsLoose(Transport, _Emitter3); /** * Transport abstract constructor. * * @param {Object} options. * @api private */ function Transport(opts) { var _this19; _this19 = _Emitter3.call(this) || this; _this19.opts = opts; _this19.query = opts.query; _this19.readyState = ""; _this19.socket = opts.socket; return _this19; } /** * Emits an error. * * @param {String} str * @return {Transport} for chaining * @api public */ var _proto2 = Transport.prototype; _proto2.onError = function onError(msg, desc) { var err = new Error(msg); err.type = "TransportError"; err.description = desc; this.emit("error", err); return this; } /** * Opens the transport. * * @api public */ ; _proto2.open = function open() { if ("closed" === this.readyState || "" === this.readyState) { this.readyState = "opening"; this.doOpen(); } return this; } /** * Closes the transport. * * @api private */ ; _proto2.close = function close() { if ("opening" === this.readyState || "open" === this.readyState) { this.doClose(); this.onClose(); } return this; } /** * Sends multiple packets. * * @param {Array} packets * @api private */ ; _proto2.send = function send(packets) { if ("open" === this.readyState) { this.write(packets); } else { // this might happen if the transport was silently closed in the beforeunload event handler debug("transport is not open, discarding packets"); } } /** * Called upon open * * @api private */ ; _proto2.onOpen = function onOpen() { this.readyState = "open"; this.writable = true; this.emit("open"); } /** * Called with data. * * @param {String} data * @api private */ ; _proto2.onData = function onData(data) { var packet = parser.decodePacket(data, this.socket.binaryType); this.onPacket(packet); } /** * Called with a decoded packet. */ ; _proto2.onPacket = function onPacket(packet) { this.emit("packet", packet); } /** * Called upon close. * * @api private */ ; _proto2.onClose = function onClose() { this.readyState = "closed"; this.emit("close"); }; return Transport; }(Emitter); module.exports = Transport; }, { "component-emitter": 8, "debug": 562, "engine.io-parser": 579 }], 568: [function (require, module, exports) { var XMLHttpRequest = require("../../contrib/xmlhttprequest-ssl/XMLHttpRequest"); var XHR = require("./polling-xhr"); var JSONP = require("./polling-jsonp"); var websocket = require("./websocket"); exports.polling = polling; exports.websocket = websocket; /** * Polling transport polymorphic constructor. * Decides on xhr vs jsonp based on feature detection. * * @api private */ function polling(opts) { var xhr; var xd = false; var xs = false; var jsonp = false !== opts.jsonp; if (typeof location !== "undefined") { var isSSL = "https:" === location.protocol; var port = location.port; // some user agents have empty `location.port` if (!port) { port = isSSL ? 443 : 80; } xd = opts.hostname !== location.hostname || port !== opts.port; xs = opts.secure !== isSSL; } opts.xdomain = xd; opts.xscheme = xs; xhr = new XMLHttpRequest(opts); if ("open" in xhr && !opts.forceJSONP) { return new XHR(opts); } else { if (!jsonp) throw new Error("JSONP disabled"); return new JSONP(opts); } } }, { "../../contrib/xmlhttprequest-ssl/XMLHttpRequest": 575, "./polling-jsonp": 569, "./polling-xhr": 570, "./websocket": 573 }], 569: [function (require, module, exports) { var Polling = require("./polling"); var globalThis = require("../globalThis"); var rNewline = /\n/g; var rEscapedNewline = /\\n/g; /** * Global JSONP callbacks. */ var callbacks; var JSONPPolling = /*#__PURE__*/function (_Polling) { _inheritsLoose(JSONPPolling, _Polling); /** * JSONP Polling constructor. * * @param {Object} opts. * @api public */ function JSONPPolling(opts) { var _this20; _this20 = _Polling.call(this, opts) || this; _this20.query = _this20.query || {}; // define global callbacks array if not present // we do this here (lazily) to avoid unneeded global pollution if (!callbacks) { // we need to consider multiple engines in the same page callbacks = globalThis.___eio = globalThis.___eio || []; } // callback identifier _this20.index = callbacks.length; // add callback to jsonp global callbacks.push(_this20.onData.bind(_assertThisInitialized2(_this20))); // append to query string _this20.query.j = _this20.index; return _this20; } /** * JSONP only supports binary as base64 encoded strings */ var _proto3 = JSONPPolling.prototype; /** * Closes the socket. * * @api private */ _proto3.doClose = function doClose() { if (this.script) { // prevent spurious errors from being emitted when the window is unloaded this.script.onerror = function () {}; this.script.parentNode.removeChild(this.script); this.script = null; } if (this.form) { this.form.parentNode.removeChild(this.form); this.form = null; this.iframe = null; } _Polling.prototype.doClose.call(this); } /** * Starts a poll cycle. * * @api private */ ; _proto3.doPoll = function doPoll() { var _this21 = this; var script = document.createElement("script"); if (this.script) { this.script.parentNode.removeChild(this.script); this.script = null; } script.async = true; script.src = this.uri(); script.onerror = function (e) { _this21.onError("jsonp poll error", e); }; var insertAt = document.getElementsByTagName("script")[0]; if (insertAt) { insertAt.parentNode.insertBefore(script, insertAt); } else { (document.head || document.body).appendChild(script); } this.script = script; var isUAgecko = "undefined" !== typeof navigator && /gecko/i.test(navigator.userAgent); if (isUAgecko) { setTimeout(function () { var iframe = document.createElement("iframe"); document.body.appendChild(iframe); document.body.removeChild(iframe); }, 100); } } /** * Writes with a hidden iframe. * * @param {String} data to send * @param {Function} called upon flush. * @api private */ ; _proto3.doWrite = function doWrite(data, fn) { var _this22 = this; var iframe; if (!this.form) { var form = document.createElement("form"); var area = document.createElement("textarea"); var id = this.iframeId = "eio_iframe_" + this.index; form.className = "socketio"; form.style.position = "absolute"; form.style.top = "-1000px"; form.style.left = "-1000px"; form.target = id; form.method = "POST"; form.setAttribute("accept-charset", "utf-8"); area.name = "d"; form.appendChild(area); document.body.appendChild(form); this.form = form; this.area = area; } this.form.action = this.uri(); function complete() { initIframe(); fn(); } var initIframe = function initIframe() { if (_this22.iframe) { try { _this22.form.removeChild(_this22.iframe); } catch (e) { _this22.onError("jsonp polling iframe removal error", e); } } try { // ie6 dynamic iframes with target="" support (thanks Chris Lambacher) var html = '