UNPKG

youtube-vue3

Version:

Youtube player component for vue.js 3.x

1,892 lines (1,477 loc) 105 kB
module.exports = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = "fb15"); /******/ }) /************************************************************************/ /******/ ({ /***/ "00ee": /***/ (function(module, exports, __webpack_require__) { var wellKnownSymbol = __webpack_require__("b622"); var TO_STRING_TAG = wellKnownSymbol('toStringTag'); var test = {}; test[TO_STRING_TAG] = 'z'; module.exports = String(test) === '[object z]'; /***/ }), /***/ "069b": /***/ (function(module, exports, __webpack_require__) { "use strict"; var alphabet = __webpack_require__("41fa"); var build = __webpack_require__("3df9"); var isValid = __webpack_require__("dd14"); // if you are using cluster or multiple servers use this to make each instance // has a unique value for worker // Note: I don't know if this is automatically set when using third // party cluster solutions such as pm2. var clusterWorkerId = __webpack_require__("9fc2") || 0; /** * Set the seed. * Highly recommended if you don't want people to try to figure out your id schema. * exposed as shortid.seed(int) * @param seed Integer value to seed the random alphabet. ALWAYS USE THE SAME SEED or you might get overlaps. */ function seed(seedValue) { alphabet.seed(seedValue); return module.exports; } /** * Set the cluster worker or machine id * exposed as shortid.worker(int) * @param workerId worker must be positive integer. Number less than 16 is recommended. * returns shortid module so it can be chained. */ function worker(workerId) { clusterWorkerId = workerId; return module.exports; } /** * * sets new characters to use in the alphabet * returns the shuffled alphabet */ function characters(newCharacters) { if (newCharacters !== undefined) { alphabet.characters(newCharacters); } return alphabet.shuffled(); } /** * Generate unique id * Returns string id */ function generate() { return build(clusterWorkerId); } // Export all other functions as properties of the generate function module.exports = generate; module.exports.generate = generate; module.exports.seed = seed; module.exports.worker = worker; module.exports.characters = characters; module.exports.isValid = isValid; /***/ }), /***/ "06cf": /***/ (function(module, exports, __webpack_require__) { var DESCRIPTORS = __webpack_require__("83ab"); var call = __webpack_require__("c65b"); var propertyIsEnumerableModule = __webpack_require__("d1e7"); var createPropertyDescriptor = __webpack_require__("5c6c"); var toIndexedObject = __webpack_require__("fc6a"); var toPropertyKey = __webpack_require__("a04b"); var hasOwn = __webpack_require__("1a2d"); var IE8_DOM_DEFINE = __webpack_require__("0cfb"); // 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 = toPropertyKey(P); if (IE8_DOM_DEFINE) try { return $getOwnPropertyDescriptor(O, P); } catch (error) { /* empty */ } if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]); }; /***/ }), /***/ "07fa": /***/ (function(module, exports, __webpack_require__) { var toLength = __webpack_require__("50c4"); // `LengthOfArrayLike` abstract operation // https://tc39.es/ecma262/#sec-lengthofarraylike module.exports = function (obj) { return toLength(obj.length); }; /***/ }), /***/ "091d": /***/ (function(module, exports, __webpack_require__) { "use strict"; var crypto = typeof window === 'object' && (window.crypto || window.msCrypto); // IE 11 uses window.msCrypto var randomByte; if (!crypto || !crypto.getRandomValues) { randomByte = function(size) { var bytes = []; for (var i = 0; i < size; i++) { bytes.push(Math.floor(Math.random() * 256)); } return bytes; }; } else { randomByte = function(size) { return crypto.getRandomValues(new Uint8Array(size)); }; } module.exports = randomByte; /***/ }), /***/ "0cfb": /***/ (function(module, exports, __webpack_require__) { var DESCRIPTORS = __webpack_require__("83ab"); var fails = __webpack_require__("d039"); var createElement = __webpack_require__("cc12"); // Thanks to IE8 for its funny defineProperty module.exports = !DESCRIPTORS && !fails(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty(createElement('div'), 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), /***/ "0d51": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("da84"); var String = global.String; module.exports = function (argument) { try { return String(argument); } catch (error) { return 'Object'; } }; /***/ }), /***/ "0fe3": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _sister = __webpack_require__("3041"); var _sister2 = _interopRequireDefault(_sister); var _loadYouTubeIframeApi = __webpack_require__("308c"); var _loadYouTubeIframeApi2 = _interopRequireDefault(_loadYouTubeIframeApi); var _YouTubePlayer = __webpack_require__("dc91"); var _YouTubePlayer2 = _interopRequireDefault(_YouTubePlayer); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * @typedef YT.Player * @see https://developers.google.com/youtube/iframe_api_reference * */ /** * @see https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player */ var youtubeIframeAPI = void 0; /** * A factory function used to produce an instance of YT.Player and queue function calls and proxy events of the resulting object. * * @param maybeElementId Either An existing YT.Player instance, * the DOM element or the id of the HTML element where the API will insert an <iframe>. * @param options See `options` (Ignored when using an existing YT.Player instance). * @param strictState A flag designating whether or not to wait for * an acceptable state when calling supported functions. Default: `false`. * See `FunctionStateMap.js` for supported functions and acceptable states. */ exports.default = function (maybeElementId) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var strictState = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; var emitter = (0, _sister2.default)(); if (!youtubeIframeAPI) { youtubeIframeAPI = (0, _loadYouTubeIframeApi2.default)(emitter); } if (options.events) { throw new Error('Event handlers cannot be overwritten.'); } if (typeof maybeElementId === 'string' && !document.getElementById(maybeElementId)) { throw new Error('Element "' + maybeElementId + '" does not exist.'); } options.events = _YouTubePlayer2.default.proxyEvents(emitter); var playerAPIReady = new Promise(function (resolve) { if ((typeof maybeElementId === 'undefined' ? 'undefined' : _typeof(maybeElementId)) === 'object' && maybeElementId.playVideo instanceof Function) { var player = maybeElementId; resolve(player); } else { // asume maybeElementId can be rendered inside // eslint-disable-next-line promise/catch-or-return youtubeIframeAPI.then(function (YT) { // eslint-disable-line promise/prefer-await-to-then var player = new YT.Player(maybeElementId, options); emitter.on('ready', function () { resolve(player); }); return null; }); } }); var playerApi = _YouTubePlayer2.default.promisifyPlayer(playerAPIReady, strictState); playerApi.on = emitter.on; playerApi.off = emitter.off; return playerApi; }; module.exports = exports['default']; /***/ }), /***/ "1626": /***/ (function(module, exports) { // `IsCallable` abstract operation // https://tc39.es/ecma262/#sec-iscallable module.exports = function (argument) { return typeof argument == 'function'; }; /***/ }), /***/ "1a2d": /***/ (function(module, exports, __webpack_require__) { var uncurryThis = __webpack_require__("e330"); var toObject = __webpack_require__("7b0b"); var hasOwnProperty = uncurryThis({}.hasOwnProperty); // `HasOwnProperty` abstract operation // https://tc39.es/ecma262/#sec-hasownproperty module.exports = Object.hasOwn || function hasOwn(it, key) { return hasOwnProperty(toObject(it), key); }; /***/ }), /***/ "1adc": /***/ (function(module, exports) { /** * Helpers. */ var s = 1000; var m = s * 60; var h = m * 60; var d = h * 24; var y = d * 365.25; /** * Parse or format the given `val`. * * Options: * * - `long` verbose formatting [false] * * @param {String|Number} val * @param {Object} [options] * @throws {Error} throw an error if val is not a non-empty string or a number * @return {String|Number} * @api public */ module.exports = function(val, options) { options = options || {}; var type = typeof val; if (type === 'string' && val.length > 0) { return parse(val); } else if (type === 'number' && isNaN(val) === false) { return options.long ? fmtLong(val) : fmtShort(val); } throw new Error( 'val is not a non-empty string or a valid number. val=' + JSON.stringify(val) ); }; /** * Parse the given `str` and return milliseconds. * * @param {String} str * @return {Number} * @api private */ function parse(str) { str = String(str); if (str.length > 100) { return; } var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec( str ); if (!match) { return; } var n = parseFloat(match[1]); var type = (match[2] || 'ms').toLowerCase(); switch (type) { case 'years': case 'year': case 'yrs': case 'yr': case 'y': return n * y; case 'days': case 'day': case 'd': return n * d; case 'hours': case 'hour': case 'hrs': case 'hr': case 'h': return n * h; case 'minutes': case 'minute': case 'mins': case 'min': case 'm': return n * m; case 'seconds': case 'second': case 'secs': case 'sec': case 's': return n * s; case 'milliseconds': case 'millisecond': case 'msecs': case 'msec': case 'ms': return n; default: return undefined; } } /** * Short format for `ms`. * * @param {Number} ms * @return {String} * @api private */ function fmtShort(ms) { if (ms >= d) { return Math.round(ms / d) + 'd'; } if (ms >= h) { return Math.round(ms / h) + 'h'; } if (ms >= m) { return Math.round(ms / m) + 'm'; } if (ms >= s) { return Math.round(ms / s) + 's'; } return ms + 'ms'; } /** * Long format for `ms`. * * @param {Number} ms * @return {String} * @api private */ function fmtLong(ms) { return plural(ms, d, 'day') || plural(ms, h, 'hour') || plural(ms, m, 'minute') || plural(ms, s, 'second') || ms + ' ms'; } /** * Pluralization helper. */ function plural(ms, n, name) { if (ms < n) { return; } if (ms < n * 1.5) { return Math.floor(ms / n) + ' ' + name; } return Math.ceil(ms / n) + ' ' + name + 's'; } /***/ }), /***/ "1d80": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("da84"); var TypeError = global.TypeError; // `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; }; /***/ }), /***/ "23cb": /***/ (function(module, exports, __webpack_require__) { var toIntegerOrInfinity = __webpack_require__("5926"); 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 = toIntegerOrInfinity(index); return integer < 0 ? max(integer + length, 0) : min(integer, length); }; /***/ }), /***/ "241c": /***/ (function(module, exports, __webpack_require__) { var internalObjectKeys = __webpack_require__("ca84"); var enumBugKeys = __webpack_require__("7839"); 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); }; /***/ }), /***/ "2d00": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("da84"); var userAgent = __webpack_require__("342f"); var process = global.process; var Deno = global.Deno; var versions = process && process.versions || Deno && Deno.version; var v8 = versions && versions.v8; var match, version; if (v8) { match = v8.split('.'); // in old Chrome, versions of V8 isn't V8 = Chrome / 10 // but their correct versions are not interesting for us version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]); } // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0` // so check `userAgent` even if `.v8` exists, but 0 if (!version && userAgent) { match = userAgent.match(/Edge\/(\d+)/); if (!match || match[1] >= 74) { match = userAgent.match(/Chrome\/(\d+)/); if (match) version = +match[1]; } } module.exports = version; /***/ }), /***/ "3041": /***/ (function(module, exports, __webpack_require__) { "use strict"; var Sister; /** * @link https://github.com/gajus/sister for the canonical source repository * @license https://github.com/gajus/sister/blob/master/LICENSE BSD 3-Clause */ Sister = function () { var sister = {}, events = {}; /** * @name handler * @function * @param {Object} data Event data. */ /** * @param {String} name Event name. * @param {handler} handler * @return {listener} */ sister.on = function (name, handler) { var listener = {name: name, handler: handler}; events[name] = events[name] || []; events[name].unshift(listener); return listener; }; /** * @param {listener} */ sister.off = function (listener) { var index = events[listener.name].indexOf(listener); if (index !== -1) { events[listener.name].splice(index, 1); } }; /** * @param {String} name Event name. * @param {Object} data Event data. */ sister.trigger = function (name, data) { var listeners = events[name], i; if (listeners) { i = listeners.length; while (i--) { listeners[i].handler(data); } } }; return sister; }; module.exports = Sister; /***/ }), /***/ "308c": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _loadScript = __webpack_require__("32e6"); var _loadScript2 = _interopRequireDefault(_loadScript); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (emitter) { /** * A promise that is resolved when window.onYouTubeIframeAPIReady is called. * The promise is resolved with a reference to window.YT object. */ var iframeAPIReady = new Promise(function (resolve) { if (window.YT && window.YT.Player && window.YT.Player instanceof Function) { resolve(window.YT); return; } else { var protocol = window.location.protocol === 'http:' ? 'http:' : 'https:'; (0, _loadScript2.default)(protocol + '//www.youtube.com/iframe_api', function (error) { if (error) { emitter.trigger('error', error); } }); } var previous = window.onYouTubeIframeAPIReady; // The API will call this function when page has finished downloading // the JavaScript for the player API. window.onYouTubeIframeAPIReady = function () { if (previous) { previous(); } resolve(window.YT); }; }); return iframeAPIReady; }; module.exports = exports['default']; /***/ }), /***/ "32e6": /***/ (function(module, exports) { module.exports = function load (src, opts, cb) { var head = document.head || document.getElementsByTagName('head')[0] var script = document.createElement('script') if (typeof opts === 'function') { cb = opts opts = {} } opts = opts || {} cb = cb || function() {} script.type = opts.type || 'text/javascript' script.charset = opts.charset || 'utf8'; script.async = 'async' in opts ? !!opts.async : true script.src = src if (opts.attrs) { setAttributes(script, opts.attrs) } if (opts.text) { script.text = '' + opts.text } var onend = 'onload' in script ? stdOnEnd : ieOnEnd onend(script, cb) // some good legacy browsers (firefox) fail the 'in' detection above // so as a fallback we always set onload // old IE will ignore this and new IE will set onload if (!script.onload) { stdOnEnd(script, cb); } head.appendChild(script) } function setAttributes(script, attrs) { for (var attr in attrs) { script.setAttribute(attr, attrs[attr]); } } function stdOnEnd (script, cb) { script.onload = function () { this.onerror = this.onload = null cb(null, script) } script.onerror = function () { // this.onload = null here is necessary // because even IE9 works not like others this.onerror = this.onload = null cb(new Error('Failed to load ' + this.src), script) } } function ieOnEnd (script, cb) { script.onreadystatechange = function () { if (this.readyState != 'complete' && this.readyState != 'loaded') return this.onreadystatechange = null cb(null, script) // there is no way to catch loading errors in IE8 } } /***/ }), /***/ "342f": /***/ (function(module, exports, __webpack_require__) { var getBuiltIn = __webpack_require__("d066"); module.exports = getBuiltIn('navigator', 'userAgent') || ''; /***/ }), /***/ "3a9b": /***/ (function(module, exports, __webpack_require__) { var uncurryThis = __webpack_require__("e330"); module.exports = uncurryThis({}.isPrototypeOf); /***/ }), /***/ "3bbe": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("da84"); var isCallable = __webpack_require__("1626"); var String = global.String; var TypeError = global.TypeError; module.exports = function (argument) { if (typeof argument == 'object' || isCallable(argument)) return argument; throw TypeError("Can't set " + String(argument) + ' as a prototype'); }; /***/ }), /***/ "3df9": /***/ (function(module, exports, __webpack_require__) { "use strict"; var generate = __webpack_require__("bd92"); var alphabet = __webpack_require__("41fa"); // Ignore all milliseconds before a certain time to reduce the size of the date entropy without sacrificing uniqueness. // This number should be updated every year or so to keep the generated id short. // To regenerate `new Date() - 0` and bump the version. Always bump the version! var REDUCE_TIME = 1567752802062; // don't change unless we change the algos or REDUCE_TIME // must be an integer and less than 16 var version = 7; // Counter is used when shortid is called multiple times in one second. var counter; // Remember the last time shortid was called in case counter is needed. var previousSeconds; /** * Generate unique id * Returns string id */ function build(clusterWorkerId) { var str = ''; var seconds = Math.floor((Date.now() - REDUCE_TIME) * 0.001); if (seconds === previousSeconds) { counter++; } else { counter = 0; previousSeconds = seconds; } str = str + generate(version); str = str + generate(clusterWorkerId); if (counter > 0) { str = str + generate(counter); } str = str + generate(seconds); return str; } module.exports = build; /***/ }), /***/ "408a": /***/ (function(module, exports, __webpack_require__) { var uncurryThis = __webpack_require__("e330"); // `thisNumberValue` abstract operation // https://tc39.es/ecma262/#sec-thisnumbervalue module.exports = uncurryThis(1.0.valueOf); /***/ }), /***/ "40d5": /***/ (function(module, exports, __webpack_require__) { var fails = __webpack_require__("d039"); module.exports = !fails(function () { var test = (function () { /* empty */ }).bind(); // eslint-disable-next-line no-prototype-builtins -- safe return typeof test != 'function' || test.hasOwnProperty('prototype'); }); /***/ }), /***/ "41fa": /***/ (function(module, exports, __webpack_require__) { "use strict"; var randomFromSeed = __webpack_require__("7eac"); var ORIGINAL = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-'; var alphabet; var previousSeed; var shuffled; function reset() { shuffled = false; } function setCharacters(_alphabet_) { if (!_alphabet_) { if (alphabet !== ORIGINAL) { alphabet = ORIGINAL; reset(); } return; } if (_alphabet_ === alphabet) { return; } if (_alphabet_.length !== ORIGINAL.length) { throw new Error('Custom alphabet for shortid must be ' + ORIGINAL.length + ' unique characters. You submitted ' + _alphabet_.length + ' characters: ' + _alphabet_); } var unique = _alphabet_.split('').filter(function(item, ind, arr){ return ind !== arr.lastIndexOf(item); }); if (unique.length) { throw new Error('Custom alphabet for shortid must be ' + ORIGINAL.length + ' unique characters. These characters were not unique: ' + unique.join(', ')); } alphabet = _alphabet_; reset(); } function characters(_alphabet_) { setCharacters(_alphabet_); return alphabet; } function setSeed(seed) { randomFromSeed.seed(seed); if (previousSeed !== seed) { reset(); previousSeed = seed; } } function shuffle() { if (!alphabet) { setCharacters(ORIGINAL); } var sourceArray = alphabet.split(''); var targetArray = []; var r = randomFromSeed.nextValue(); var characterIndex; while (sourceArray.length > 0) { r = randomFromSeed.nextValue(); characterIndex = Math.floor(r * sourceArray.length); targetArray.push(sourceArray.splice(characterIndex, 1)[0]); } return targetArray.join(''); } function getShuffled() { if (shuffled) { return shuffled; } shuffled = shuffle(); return shuffled; } /** * lookup shuffled letter * @param index * @returns {string} */ function lookup(index) { var alphabetShuffled = getShuffled(); return alphabetShuffled[index]; } function get () { return alphabet || ORIGINAL; } module.exports = { get: get, characters: characters, seed: setSeed, lookup: lookup, shuffled: getShuffled }; /***/ }), /***/ "4362": /***/ (function(module, exports, __webpack_require__) { exports.nextTick = function nextTick(fn) { var args = Array.prototype.slice.call(arguments); args.shift(); setTimeout(function () { fn.apply(null, args); }, 0); }; exports.platform = exports.arch = exports.execPath = exports.title = 'browser'; exports.pid = 1; exports.browser = true; exports.env = {}; exports.argv = []; exports.binding = function (name) { throw new Error('No such module. (Possibly not yet loaded)') }; (function () { var cwd = '/'; var path; exports.cwd = function () { return cwd }; exports.chdir = function (dir) { if (!path) path = __webpack_require__("df7c"); cwd = path.resolve(dir, cwd); }; })(); exports.exit = exports.kill = exports.umask = exports.dlopen = exports.uptime = exports.memoryUsage = exports.uvCounters = function() {}; exports.features = {}; /***/ }), /***/ "44ad": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("da84"); var uncurryThis = __webpack_require__("e330"); var fails = __webpack_require__("d039"); var classof = __webpack_require__("c6b6"); var Object = global.Object; var split = uncurryThis(''.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(it, '') : Object(it); } : Object; /***/ }), /***/ "485a": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("da84"); var call = __webpack_require__("c65b"); var isCallable = __webpack_require__("1626"); var isObject = __webpack_require__("861d"); var TypeError = global.TypeError; // `OrdinaryToPrimitive` abstract operation // https://tc39.es/ecma262/#sec-ordinarytoprimitive module.exports = function (input, pref) { var fn, val; if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val; if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val; if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val; throw TypeError("Can't convert object to primitive value"); }; /***/ }), /***/ "4930": /***/ (function(module, exports, __webpack_require__) { /* eslint-disable es/no-symbol -- required for testing */ var V8_VERSION = __webpack_require__("2d00"); var fails = __webpack_require__("d039"); // 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; }); /***/ }), /***/ "4d64": /***/ (function(module, exports, __webpack_require__) { var toIndexedObject = __webpack_require__("fc6a"); var toAbsoluteIndex = __webpack_require__("23cb"); var lengthOfArrayLike = __webpack_require__("07fa"); // `Array.prototype.{ indexOf, includes }` methods implementation var createMethod = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIndexedObject($this); var length = lengthOfArrayLike(O); 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) }; /***/ }), /***/ "50c4": /***/ (function(module, exports, __webpack_require__) { var toIntegerOrInfinity = __webpack_require__("5926"); var min = Math.min; // `ToLength` abstract operation // https://tc39.es/ecma262/#sec-tolength module.exports = function (argument) { return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 }; /***/ }), /***/ "5692": /***/ (function(module, exports, __webpack_require__) { var IS_PURE = __webpack_require__("c430"); var store = __webpack_require__("c6cd"); (module.exports = function (key, value) { return store[key] || (store[key] = value !== undefined ? value : {}); })('versions', []).push({ version: '3.21.1', mode: IS_PURE ? 'pure' : 'global', copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)', license: 'https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE', source: 'https://github.com/zloirock/core-js' }); /***/ }), /***/ "577e": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("da84"); var classof = __webpack_require__("f5df"); var String = global.String; module.exports = function (argument) { if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string'); return String(argument); }; /***/ }), /***/ "5899": /***/ (function(module, exports) { // a string of all valid unicode whitespaces module.exports = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' + '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; /***/ }), /***/ "58a8": /***/ (function(module, exports, __webpack_require__) { var uncurryThis = __webpack_require__("e330"); var requireObjectCoercible = __webpack_require__("1d80"); var toString = __webpack_require__("577e"); var whitespaces = __webpack_require__("5899"); var replace = uncurryThis(''.replace); 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 (TYPE) { return function ($this) { var string = toString(requireObjectCoercible($this)); if (TYPE & 1) string = replace(string, ltrim, ''); if (TYPE & 2) string = replace(string, 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) }; /***/ }), /***/ "5926": /***/ (function(module, exports) { var ceil = Math.ceil; var floor = Math.floor; // `ToIntegerOrInfinity` abstract operation // https://tc39.es/ecma262/#sec-tointegerorinfinity module.exports = function (argument) { var number = +argument; // eslint-disable-next-line no-self-compare -- safe return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number); }; /***/ }), /***/ "59ed": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("da84"); var isCallable = __webpack_require__("1626"); var tryToString = __webpack_require__("0d51"); var TypeError = global.TypeError; // `Assert: IsCallable(argument) is true` module.exports = function (argument) { if (isCallable(argument)) return argument; throw TypeError(tryToString(argument) + ' is not a function'); }; /***/ }), /***/ "5c6c": /***/ (function(module, exports) { module.exports = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; /***/ }), /***/ "5cb1": /***/ (function(module, exports) { // This file replaces `format.js` in bundlers like webpack or Rollup, // according to `browser` config in `package.json`. module.exports = function (random, alphabet, size) { // We can’t use bytes bigger than the alphabet. To make bytes values closer // to the alphabet, we apply bitmask on them. We look for the closest // `2 ** x - 1` number, which will be bigger than alphabet size. If we have // 30 symbols in the alphabet, we will take 31 (00011111). // We do not use faster Math.clz32, because it is not available in browsers. var mask = (2 << Math.log(alphabet.length - 1) / Math.LN2) - 1 // Bitmask is not a perfect solution (in our example it will pass 31 bytes, // which is bigger than the alphabet). As a result, we will need more bytes, // than ID size, because we will refuse bytes bigger than the alphabet. // Every hardware random generator call is costly, // because we need to wait for entropy collection. This is why often it will // be faster to ask for few extra bytes in advance, to avoid additional calls. // Here we calculate how many random bytes should we call in advance. // It depends on ID length, mask / alphabet size and magic number 1.6 // (which was selected according benchmarks). // -~f => Math.ceil(f) if n is float number // -~i => i + 1 if n is integer number var step = -~(1.6 * mask * size / alphabet.length) var id = '' while (true) { var bytes = random(step) // Compact alternative for `for (var i = 0; i < step; i++)` var i = step while (i--) { // If random byte is bigger than alphabet even after bitmask, // we refuse it by `|| ''`. id += alphabet[bytes[i] & mask] || '' // More compact than `id.length + 1 === size` if (id.length === +size) return id } } } /***/ }), /***/ "5e77": /***/ (function(module, exports, __webpack_require__) { var DESCRIPTORS = __webpack_require__("83ab"); var hasOwn = __webpack_require__("1a2d"); var FunctionPrototype = Function.prototype; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor; var EXISTS = hasOwn(FunctionPrototype, 'name'); // additional protection from minified / mangled / dropped function names var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something'; var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable)); module.exports = { EXISTS: EXISTS, PROPER: PROPER, CONFIGURABLE: CONFIGURABLE }; /***/ }), /***/ "69f3": /***/ (function(module, exports, __webpack_require__) { var NATIVE_WEAK_MAP = __webpack_require__("7f9a"); var global = __webpack_require__("da84"); var uncurryThis = __webpack_require__("e330"); var isObject = __webpack_require__("861d"); var createNonEnumerableProperty = __webpack_require__("9112"); var hasOwn = __webpack_require__("1a2d"); var shared = __webpack_require__("c6cd"); var sharedKey = __webpack_require__("f772"); var hiddenKeys = __webpack_require__("d012"); var OBJECT_ALREADY_INITIALIZED = 'Object already initialized'; var TypeError = global.TypeError; var WeakMap = global.WeakMap; var set, get, has; var enforce = function (it) { return has(it) ? get(it) : set(it, {}); }; var getterFor = function (TYPE) { return function (it) { var state; if (!isObject(it) || (state = get(it)).type !== TYPE) { throw TypeError('Incompatible receiver, ' + TYPE + ' required'); } return state; }; }; if (NATIVE_WEAK_MAP || shared.state) { var store = shared.state || (shared.state = new WeakMap()); var wmget = uncurryThis(store.get); var wmhas = uncurryThis(store.has); var wmset = uncurryThis(store.set); set = function (it, metadata) { if (wmhas(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED); metadata.facade = it; wmset(store, it, metadata); return metadata; }; get = function (it) { return wmget(store, it) || {}; }; has = function (it) { return wmhas(store, it); }; } else { var STATE = sharedKey('state'); hiddenKeys[STATE] = true; set = function (it, metadata) { if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED); metadata.facade = it; createNonEnumerableProperty(it, STATE, metadata); return metadata; }; get = function (it) { return hasOwn(it, STATE) ? it[STATE] : {}; }; has = function (it) { return hasOwn(it, STATE); }; } module.exports = { set: set, get: get, has: has, enforce: enforce, getterFor: getterFor }; /***/ }), /***/ "6b0d": /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); // runtime helper for setting properties on components // in a tree-shakable way exports.default = (sfc, props) => { const target = sfc.__vccOpts || sfc; for (const [key, val] of props) { target[key] = val; } return target; }; /***/ }), /***/ "6eeb": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("da84"); var isCallable = __webpack_require__("1626"); var hasOwn = __webpack_require__("1a2d"); var createNonEnumerableProperty = __webpack_require__("9112"); var setGlobal = __webpack_require__("ce4e"); var inspectSource = __webpack_require__("8925"); var InternalStateModule = __webpack_require__("69f3"); var CONFIGURABLE_FUNCTION_NAME = __webpack_require__("5e77").CONFIGURABLE; 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 name = options && options.name !== undefined ? options.name : key; var state; if (isCallable(value)) { if (String(name).slice(0, 7) === 'Symbol(') { name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']'; } if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) { createNonEnumerableProperty(value, 'name', name); } state = enforceInternalState(value); if (!state.source) { state.source = TEMPLATE.join(typeof name == 'string' ? name : ''); } } 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 isCallable(this) && getInternalState(this).source || inspectSource(this); }); /***/ }), /***/ "7134": /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** * This is the web browser implementation of `debug()`. * * Expose `debug()` as the module. */ exports = module.exports = __webpack_require__("e2a0"); exports.log = log; exports.formatArgs = formatArgs; exports.save = save; exports.load = load; exports.useColors = useColors; exports.storage = 'undefined' != typeof chrome && 'undefined' != typeof chrome.storage ? chrome.storage.local : localstorage(); /** * Colors. */ exports.colors = [ 'lightseagreen', 'forestgreen', 'goldenrod', 'dodgerblue', 'darkorchid', 'crimson' ]; /** * 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 */ 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') { return true; } // 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+)/)); } /** * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. */ exports.formatters.j = function(v) { try { return JSON.stringify(v); } catch (err) { return '[UnexpectedJSONParseError]: ' + err.message; } }; /** * Colorize log arguments if enabled. * * @api public */ function formatArgs(args) { var useColors = this.useColors; args[0] = (useColors ? '%c' : '') + this.namespace + (useColors ? ' %c' : ' ') + args[0] + (useColors ? '%c ' : ' ') + '+' + exports.humanize(this.diff); if (!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 ('%c' === match) { // we only are interested in the *last* %c // (the user may have provided their own) lastC = index; } }); args.splice(lastC, 0, c); } /** * Invokes `console.log()` when available. * No-op when `console.log` is not a "function". * * @api public */ function log() { // this hackery is required for IE8/9, where // the `console.log` function doesn't have 'apply' return 'object' === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments); } /** * Save `namespaces`. * * @param {String} namespaces * @api private */ function save(namespaces) { try { if (null == namespaces) { exports.storage.removeItem('debug'); } else { exports.storage.debug = namespaces; } } catch(e) {} } /** * Load `namespaces`. * * @return {String} returns the previously persisted debug modes * @api private */ function load() { var r; try { r = exports.storage.debug; } catch(e) {} // 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 = Object({"NODE_ENV":"production","BASE_URL":"/"}).DEBUG; } return r; } /** * Enable namespaces listed in `localStorage.debug` initially. */ exports.enable(load()); /** * 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 { return window.localStorage; } catch (e) {} } /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("4362"))) /***/ }), /***/ "7156": /***/ (function(module, exports, __webpack_require__) { var isCallable = __webpack_require__("1626"); var isObject = __webpack_require__("861d"); var setPrototypeOf = __webpack_require__("d2bb"); // 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 isCallable(NewTarget = dummy.constructor) && NewTarget !== Wrapper && isObject(NewTargetPrototype = NewTarget.prototype) && NewTargetPrototype !== Wrapper.prototype ) setPrototypeOf($this, NewTargetPrototype); return $this; }; /***/ }), /***/ "7839": /***/ (function(module, exports) { // IE8- don't enum bug keys module.exports = [ 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf' ]; /***/ }), /***/ "7b0b": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("da84"); var requireObjectCoercible = __webpack_require__("1d80"); var Object = global.Object; // `ToObject` abstract operation // https://tc39.es/ecma262/#sec-toobject module.exports = function (argument) { return Object(requireObjectCoercible(argument)); }; /***/ }), /***/ "7eac": /***/ (function(module, exports, __webpack_require__) { "use strict"; // Found this seed-based random generator somewhere // Based on The Central Randomizer 1.3 (C) 1997 by Paul Houle (houle@msc.cornell.edu) var seed = 1; /** * return a random number based on a seed * @param seed * @returns {number} */ function getNextValue() { seed = (seed * 9301 + 49297) % 233280; return seed/(233280.0); } function setSeed(_seed_) { seed = _seed_; } module.exports = { nextValue: getNextValue, seed: setSeed }; /***/ }), /***/ "7f9a": /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__("da84"); var isCallable = __webpack_require__("1626"); var inspectSource = __webpack_require__("8925"); var WeakMap = global.WeakMap; module.exports = isCallable(WeakMap) && /native code/.test(inspectS