diff --git a/lib/index.browser.js b/lib/index.browser.js index e4d144c..484d912 100644 --- a/lib/index.browser.js +++ b/lib/index.browser.js @@ -83,6 +83,8 @@ var _aFunction = function (it) { return it; }; +// optional / simple context binding + var _ctx = function (fn, that, length) { _aFunction(fn); if (that === undefined) return fn; @@ -119,6 +121,7 @@ var _fails = function (exec) { } }; +// Thank's IE8 for his funny defineProperty var _descriptors = !_fails(function () { return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; }); @@ -134,6 +137,10 @@ var _ie8DomDefine = !_descriptors && !_fails(function () { return Object.defineProperty(_domCreate('div'), 'a', { get: function () { return 7; } }).a != 7; }); +// 7.1.1 ToPrimitive(input [, PreferredType]) + +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string var _toPrimitive = function (it, S) { if (!_isObject(it)) return it; var fn, val; @@ -240,6 +247,7 @@ $export.U = 64; // safe $export.R = 128; // real proto method for `library` var _export = $export; +// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) _export(_export.S + _export.F * !_descriptors, 'Object', { defineProperty: _objectDp.f }); var $Object = _core.Object; @@ -296,6 +304,8 @@ var _defined = function (it) { return it; }; +// true -> String#at +// false -> String#codePointAt var _stringAt = function (TO_STRING) { return function (that, pos) { var s = String(_defined(that)); @@ -322,14 +332,22 @@ var _cof = function (it) { return toString.call(it).slice(8, -1); }; +// fallback for non-array-like ES3 and non-enumerable old V8 strings + +// eslint-disable-next-line no-prototype-builtins var _iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) { return _cof(it) == 'String' ? it.split('') : Object(it); }; +// to indexed object, toObject with fallback for non-array-like ES3 strings + + var _toIobject = function (it) { return _iobject(_defined(it)); }; +// 7.1.15 ToLength + var min = Math.min; var _toLength = function (it) { return it > 0 ? min(_toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 @@ -342,6 +360,11 @@ var _toAbsoluteIndex = function (index, length) { return index < 0 ? max(index + length, 0) : min$1(index, length); }; +// false -> Array#indexOf +// true -> Array#includes + + + var _arrayIncludes = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = _toIobject($this); @@ -407,6 +430,10 @@ var _enumBugKeys = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); +// 19.1.2.14 / 15.2.3.14 Object.keys(O) + + + var _objectKeys = Object.keys || function keys(O) { return _objectKeysInternal(O, _enumBugKeys); }; @@ -424,6 +451,10 @@ var _objectDps = _descriptors ? Object.defineProperties : function definePropert var document$2 = _global.document; var _html = document$2 && document$2.documentElement; +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + + + var IE_PROTO = _sharedKey('IE_PROTO'); var Empty = function () { /* empty */ }; var PROTOTYPE$1 = 'prototype'; @@ -494,10 +525,15 @@ var _iterCreate = function (Constructor, NAME, next) { _setToStringTag(Constructor, NAME + ' Iterator'); }; +// 7.1.13 ToObject(argument) + var _toObject = function (it) { return Object(_defined(it)); }; +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) + + var IE_PROTO$2 = _sharedKey('IE_PROTO'); var ObjectProto = Object.prototype; @@ -591,6 +627,10 @@ var _iterStep = function (done, value) { return { value: value, done: !!done }; }; +// 22.1.3.4 Array.prototype.entries() +// 22.1.3.13 Array.prototype.keys() +// 22.1.3.29 Array.prototype.values() +// 22.1.3.30 Array.prototype[@@iterator]() var es6_array_iterator = _iterDefine(Array, 'Array', function (iterated, kind) { this._t = _toIobject(iterated); // target this._i = 0; // next index @@ -722,6 +762,10 @@ var _objectPie = { f: f$3 }; +// all enumerable object keys, includes symbols + + + var _enumKeys = function (it) { var result = _objectKeys(it); var getSymbols = _objectGops.f; @@ -734,10 +778,14 @@ var _enumKeys = function (it) { } return result; }; +// 7.2.2 IsArray(argument) + var _isArray = Array.isArray || function isArray(arg) { return _cof(arg) == 'Array'; }; +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) + var hiddenKeys = _enumBugKeys.concat('length', 'prototype'); var f$5 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { @@ -748,6 +796,8 @@ var _objectGopn = { f: f$5 }; +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window + var gOPN$1 = _objectGopn.f; var toString$1 = {}.toString; @@ -785,6 +835,12 @@ var _objectGopd = { f: f$6 }; +// ECMAScript 6 symbols shim + + + + + var META = _meta.KEY; @@ -1049,6 +1105,10 @@ exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.d var _typeof = unwrapExports(_typeof_1); +// most Object methods by ES6 should accept primitives + + + var _objectSap = function (KEY, exec) { var fn = (_core.Object || {})[KEY] || Object[KEY]; var exp = {}; @@ -1056,6 +1116,10 @@ var _objectSap = function (KEY, exec) { _export(_export.S + _export.F * _fails(function () { fn(1); }), 'Object', exp); }; +// 19.1.2.14 Object.keys(O) + + + _objectSap('keys', function () { return function keys(it) { return _objectKeys(_toObject(it)); @@ -1070,11 +1134,16 @@ module.exports = { "default": keys$1, __esModule: true }; unwrapExports(keys); +// 20.1.2.3 Number.isInteger(number) + var floor$1 = Math.floor; var _isInteger = function isInteger(it) { return !_isObject(it) && isFinite(it) && floor$1(it) === it; }; +// 20.1.2.3 Number.isInteger(number) + + _export(_export.S, 'Number', { isInteger: _isInteger }); var isInteger$2 = _core.Number.isInteger; @@ -1124,6 +1193,7 @@ var _parseFloat$3 = 1 / $parseFloat(_stringWs + '-0') !== -Infinity ? function p return result === 0 && string.charAt(0) == '-' ? -0 : result; } : $parseFloat; +// 20.1.2.12 Number.parseFloat(string) _export(_export.S + _export.F * (Number.parseFloat != _parseFloat$3), 'Number', { parseFloat: _parseFloat$3 }); var _parseFloat$1 = _core.Number.parseFloat; @@ -1140,6 +1210,9 @@ unwrapExports(_parseFloat); * Released under MIT */ +/** + * is void element or not ? Means it will return true when val is undefined or null + */ function isVoid(obj) { return obj === undefined || obj === null; } @@ -1171,7 +1244,7 @@ function isNumber(obj) { return typeof obj === 'number'; } /** - * to tell you if the val can be transfer into number + * is it a string */ function isString(str) { return typeof str === 'string' || str instanceof String; @@ -1183,14 +1256,11 @@ function isBoolean(bool) { return typeof bool === 'boolean'; } /** - * is a promise or not + * is Primitive type or not, whick means it will return true when data is number/string/boolean/undefined/null */ function isPrimitive(val) { return isVoid(val) || isBoolean(val) || isString(val) || isNumber(val); } -/** - * is it an url, but this test require the url to have an protocol - */ /** * chimee-helper-log v0.1.3 @@ -2431,6 +2501,8 @@ var uaParser = createCommonjsModule(function (module, exports) { var uaParser_1 = uaParser.UAParser; +// call something on iterator step with safe closing on error + var _iterCall = function (iterator, fn, value, entries) { try { return entries ? fn(_anObject(value)[0], value[1]) : fn(value); @@ -2442,6 +2514,8 @@ var _iterCall = function (iterator, fn, value, entries) { } }; +// check on default Array iterator + var ITERATOR$1 = _wks('iterator'); var ArrayProto = Array.prototype; @@ -2454,6 +2528,8 @@ var _createProperty = function (object, index, value) { else object[index] = value; }; +// getting tag from 19.1.3.6 Object.prototype.toString() + var TAG$1 = _wks('toStringTag'); // ES3 wrong here var ARG = _cof(function () { return arguments; }()) == 'Arguments'; @@ -2573,6 +2649,11 @@ var _toConsumableArray = unwrapExports(toConsumableArray); * Released under MIT */ +/** + * the handler to generate an deep traversal handler + * @param {Function} fn the function you wanna run when you reach in the deep property + * @return {Function} the handler + */ function genTraversalHandler(fn) { var setter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (target, key, value) { target[key] = value; @@ -2598,9 +2679,9 @@ var _deepAssign = genTraversalHandler(function (val) { return val; }); /** - * deeply clone an object - * @param {Array|Object} source if you pass in other type, it will throw an error - * @return {clone-target} the new Object + * merge multiple objects + * @param {...Object} args [description] + * @return {merge-object} [description] */ function deepAssign() { for (var _len = arguments.length, args = Array(_len), _key2 = 0; _key2 < _len; _key2++) { @@ -2622,12 +2703,6 @@ function deepAssign() { return target; } -/** - * camelize any string, e.g hello world -> helloWorld - * @param {string} str only accept string! - * @return {string} camelize string - */ - var _anInstance = function (it, Constructor, name, forbiddenField) { if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { throw TypeError(name + ': incorrect invocation!'); @@ -2656,6 +2731,9 @@ exports.BREAK = BREAK; exports.RETURN = RETURN; }); +// 7.3.20 SpeciesConstructor(O, defaultConstructor) + + var SPECIES = _wks('species'); var _speciesConstructor = function (O, D) { var C = _anObject(O).constructor; @@ -2831,6 +2909,9 @@ var _microtask = function () { }; }; +// 25.4.1.5 NewPromiseCapability(C) + + function PromiseCapability(C) { var resolve, reject; this.promise = new C(function ($$resolve, $$reject) { @@ -3180,6 +3261,11 @@ _export(_export.P + _export.R, 'Promise', { 'finally': function (onFinally) { ); } }); +// https://github.com/tc39/proposal-promise-try + + + + _export(_export.S, 'Promise', { 'try': function (callbackfn) { var promiseCapability = _newPromiseCapability.f(this); var result = _perform(callbackfn); @@ -3195,6 +3281,11 @@ module.exports = { "default": promise$1, __esModule: true }; unwrapExports(promise); +// ********************** judgement ************************ +/** + * check if the code running in browser environment (not include worker env) + * @returns {Boolean} + */ var inBrowser = typeof window !== 'undefined' && Object.prototype.toString.call(window) !== '[object Object]'; // ********************** 对象操作 ************************ @@ -3205,13 +3296,7 @@ function makeArray(obj) { return _Array$from(obj); } -/** - * sort Object attributes by function - * and transfer them into array - * @param {Object} obj Object form from numric - * @param {Function} fn sort function - * @return {Array} the sorted attirbutes array - */ +// requestAnimationFrame var raf = inBrowser && (window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || window.oRequestAnimationFrame) || function (cb) { return setTimeout(cb, 17); }; @@ -3221,7 +3306,11 @@ var caf = inBrowser && (window.cancelAnimationFrame || window.mozCancelAnimation clearTimeout(id); }; -// 根据要求的位数,将9格式化为 09\009\0009... +// 19.1.2.1 Object.assign(target, source, ...) + + + + var $assign = Object.assign; @@ -3251,6 +3340,9 @@ var _objectAssign = !$assign || _fails(function () { } return T; } : $assign; +// 19.1.3.1 Object.assign(target, source) + + _export(_export.S + _export.F, 'Object', { assign: _objectAssign }); var assign$1 = _core.Object.assign; @@ -3261,6 +3353,7 @@ module.exports = { "default": assign$1, __esModule: true }; var _Object$assign = unwrapExports(assign); +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) _export(_export.S, 'Object', { create: _objectCreate }); var $Object$1 = _core.Object; @@ -3280,6 +3373,19 @@ var _Object$create = unwrapExports(create); * Released under MIT */ +/** +* @module event +* @author huzunjie +* @description 自定义事件基础类 +*/ + +/* 缓存事件监听方法及包装,内部数据格式: + * targetIndex_: [ [ + * function(){ ... handler ... }, + * function(){ ... handlerWrap ... handler.apply(target, arguments) ... }, + * isOnce + * ]] + */ var _evtListenerCache = _Object$create(null); _evtListenerCache.count = 0; @@ -3507,6 +3613,12 @@ var CustEvent = function () { return CustEvent; }(); +/** + * @module dom + * @author huzunjie + * @description 一些常用的DOM判断及操作方法,可以使用dom.$('*')包装DOM,实现类jQuery的链式操作;当然这里的静态方法也可以直接使用。 + */ + var _divEl = inBrowser ? document.createElement('div') : {}; var _textAttrName = 'innerText'; 'textContent' in _divEl && (_textAttrName = 'textContent'); @@ -4382,6 +4494,8 @@ var Thread = function () { return Thread; }(); +// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + var $getOwnPropertyDescriptor$1 = _objectGopd.f; _objectSap('getOwnPropertyDescriptor', function () { @@ -4401,6 +4515,10 @@ module.exports = { "default": getOwnPropertyDescriptor$1, __esModule: true }; var _Object$getOwnPropertyDescriptor = unwrapExports(getOwnPropertyDescriptor); +// all object keys, includes non-enumerable and symbols + + + var Reflect = _global.Reflect; var _ownKeys = Reflect && Reflect.ownKeys || function ownKeys(it) { var keys = _objectGopn.f(_anObject(it)); @@ -4408,6 +4526,13 @@ var _ownKeys = Reflect && Reflect.ownKeys || function ownKeys(it) { return getSymbols ? keys.concat(getSymbols(it)) : keys; }; +// https://github.com/tc39/proposal-object-getownpropertydescriptors + + + + + + _export(_export.S, 'Object', { getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { var O = _toIobject(object); @@ -4440,6 +4565,7 @@ module.exports = { "default": getOwnPropertySymbols$1, __esModule: true }; var _Object$getOwnPropertySymbols = unwrapExports(getOwnPropertySymbols); +// 19.1.2.7 Object.getOwnPropertyNames(O) _objectSap('getOwnPropertyNames', function () { return _objectGopnExt.f; }); @@ -4461,6 +4587,11 @@ var _Object$getOwnPropertyNames = unwrapExports(getOwnPropertyNames); * Released under MIT */ +/** + * bind the function with some context. we have some fallback strategy here + * @param {function} fn the function which we need to bind the context on + * @param {any} context the context object + */ function bind$1(fn, context) { if (fn.bind) { return fn.bind(context); @@ -4483,10 +4614,6 @@ function bind$1(fn, context) { } } -/** - * generate an uuid - */ - var ITERATOR$4 = _wks('iterator'); var core_isIterable = _core.isIterable = function (it) { @@ -4573,6 +4700,10 @@ exports.default = function () { unwrapExports(slicedToArray); +// 19.1.2.9 Object.getPrototypeOf(O) + + + _objectSap('getPrototypeOf', function () { return function getPrototypeOf(it) { return _objectGpo(_toObject(it)); @@ -4602,10 +4733,25 @@ var _arraySpeciesConstructor = function (original) { } return C === undefined ? Array : C; }; +// 9.4.2.3 ArraySpeciesCreate(originalArray, length) + + var _arraySpeciesCreate = function (original, length) { return new (_arraySpeciesConstructor(original))(length); }; +// 0 -> Array#forEach +// 1 -> Array#map +// 2 -> Array#filter +// 3 -> Array#some +// 4 -> Array#every +// 5 -> Array#find +// 6 -> Array#findIndex + + + + + var _arrayMethods = function (TYPE, $create) { var IS_MAP = TYPE == 1; var IS_FILTER = TYPE == 2; @@ -4838,6 +4984,9 @@ if (_fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp } }); +// https://tc39.github.io/proposal-setmap-offrom/ + + var _setCollectionOf = function (COLLECTION) { _export(_export.S, COLLECTION, { of: function of() { var length = arguments.length; @@ -4847,8 +4996,15 @@ var _setCollectionOf = function (COLLECTION) { } }); }; +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of _setCollectionOf('WeakMap'); +// https://tc39.github.io/proposal-setmap-offrom/ + + + + + var _setCollectionFrom = function (COLLECTION) { _export(_export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) { var mapFn = arguments[1]; @@ -4871,6 +5027,7 @@ var _setCollectionFrom = function (COLLECTION) { } }); }; +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from _setCollectionFrom('WeakMap'); var weakMap$1 = _core.WeakMap; @@ -4908,6 +5065,8 @@ exports.default = function (obj, key, value) { unwrapExports(defineProperty$5$1); +// 19.1.2.15 Object.preventExtensions(O) + var meta = _meta.onFreeze; _objectSap('preventExtensions', function ($preventExtensions) { @@ -4931,26 +5090,16 @@ unwrapExports(preventExtensions$1); */ var getOwnPropertyDescriptor$3 = _Object$getOwnPropertyDescriptor; -// ********************** 对象操作 ************************ -/** - * sort Object attributes by function - * and transfer them into array - * @param {Object} obj Object form from numric - * @param {Function} fn sort function - * @return {Array} the sorted attirbutes array - */ - - /** - * to check if an descriptor - * @param {anything} desc + * to check if the descirptor is an data descriptor + * @param {descriptor} desc it should be a descriptor better */ function isDataDescriptor(desc) { return !!desc && desc.hasOwnProperty('value') && isBoolean(desc.configurable) && isBoolean(desc.enumerable) && isBoolean(desc.writable); } /** - * to check if the descirptor is an initiallizer descriptor - * @param {descriptor} desc it should be a descriptor better + * set one value on the object + * @param {string} key */ function createDefaultSetter(key) { return function set(newValue) { @@ -4965,11 +5114,6 @@ function createDefaultSetter(key) { }; } -/** - * Compress many function into one function, but this function only accept one arguments; - * @param {Array} fns the array of function we need to compress into one function - * @param {string} errmsg When we check that there is something is not function, we will throw an error, you can set your own error message - */ function getOwnKeysFn() { var getOwnPropertyNames$$1 = _Object$getOwnPropertyNames, getOwnPropertySymbols$$1 = _Object$getOwnPropertySymbols; @@ -5257,7 +5401,6 @@ var Css = (_class = function () { setStyle(item.piece, 'transform', 'translateX(' + item.offset.x + 'px) translateY(' + item.offset.y + 'px) '); if (item.mode === 'flow') { item.offset.x = Math.floor(item.offset.x - item.speed); - console.log(item.offset.x); if (item.offset.x < -item.piece.width) { item.piece.parentNode.removeChild(item.piece); _this.thread.remove(i); @@ -5290,6 +5433,7 @@ var Css = (_class = function () { return Css; }(), _applyDecoratedDescriptor(_class.prototype, 'render', [autobind], _Object$getOwnPropertyDescriptor(_class.prototype, 'render'), _class.prototype), _class); +// import Browser from 'helper/browser.js'; var pieceId = 0; var Danma = function () { @@ -5536,6 +5680,9 @@ var Danma = function () { __$styleInject("chimee-danmu{position:absolute;top:0;left:0;display:block;width:100%;height:100%}chimee-danmu .chimee-danmu-content{position:relative;width:100%;height:100%;user-select:none;overflow:hidden}chimee-danmu .danmu-piece{position:absolute;left:0;top:0;display:inline-block;white-space:pre;pointer-events:none;font-weight:400;line-height:1.125;opacity:1;text-shadow:#000 1px 0 1px,#000 0 1px 1px,#000 0 -1px 1px,#000 -1px 0 1px}", {}); +/** + * 插件默认配置 + */ var defaultConfig = { lineHeight: 30, fontSize: 24, diff --git a/lib/index.js b/lib/index.js index d3900ca..6cf10b4 100644 --- a/lib/index.js +++ b/lib/index.js @@ -364,7 +364,7 @@ var Css = (_class = function () { this.thread.pool.forEach(function (item, i) { chimeeHelper.setStyle(item.piece, 'transform', 'translateX(' + item.offset.x + 'px) translateY(' + item.offset.y + 'px) '); if (item.mode === 'flow') { - item.offset.x -= item.speed; + item.offset.x = Math.floor(item.offset.x - item.speed); if (item.offset.x < -item.piece.width) { item.piece.parentNode.removeChild(item.piece); _this.thread.remove(i); diff --git a/lib/index.min.js b/lib/index.min.js index 06cc0c1..f10f694 100644 --- a/lib/index.min.js +++ b/lib/index.min.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.chimeePluginDanmu=t()}(this,function(){"use strict";var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e,t){return e(t={exports:{}},t.exports),t.exports}var r=t(n(function(e,t){t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}})),x=n(function(e){var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)}),v=n(function(e){var t=e.exports={version:"2.6.0"};"number"==typeof __e&&(__e=t)}),s=(v.version,function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}),g=function(i,r,e){if(s(i),void 0===r)return i;switch(e){case 1:return function(e){return i.call(r,e)};case 2:return function(e,t){return i.call(r,e,t)};case 3:return function(e,t,n){return i.call(r,e,t,n)}}return function(){return i.apply(r,arguments)}},k=function(e){return"object"==typeof e?null!==e:"function"==typeof e},p=function(e){if(!k(e))throw TypeError(e+" is not an object!");return e},E=function(e){try{return!!e()}catch(e){return!0}},O=!E(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),i=x.document,o=k(i)&&k(i.createElement),a=function(e){return o?i.createElement(e):{}},u=!O&&!E(function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}),c=function(e,t){if(!k(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!k(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!k(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!k(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")},f=Object.defineProperty,l={f:O?Object.defineProperty:function(e,t,n){if(p(e),t=c(t,!0),p(n),u)try{return f(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},S=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},A=O?function(e,t,n){return l.f(e,t,S(1,n))}:function(e,t,n){return e[t]=n,e},d={}.hasOwnProperty,m=function(e,t){return d.call(e,t)},w="prototype",y=function(e,t,n){var i,r,o,s=e&y.F,a=e&y.G,u=e&y.S,c=e&y.P,f=e&y.B,l=e&y.W,d=a?v:v[t]||(v[t]={}),h=d[w],p=a?x:u?x[t]:(x[t]||{})[w];for(i in a&&(n=t),n)(r=!s&&p&&void 0!==p[i])&&m(d,i)||(o=r?p[i]:n[i],d[i]=a&&"function"!=typeof p[i]?n[i]:f&&r?g(o,x):l&&p[i]==o?function(i){var e=function(e,t,n){if(this instanceof i){switch(arguments.length){case 0:return new i;case 1:return new i(e);case 2:return new i(e,t)}return new i(e,t,n)}return i.apply(this,arguments)};return e[w]=i[w],e}(o):c&&"function"==typeof o?g(Function.call,o):o,c&&((d.virtual||(d.virtual={}))[i]=o,e&y.R&&h&&!h[i]&&A(h,i,o)))};y.F=1,y.G=2,y.S=4,y.P=8,y.B=16,y.W=32,y.U=64,y.R=128;var T=y;T(T.S+T.F*!O,"Object",{defineProperty:l.f});var h,b=v.Object,_=function(e,t,n){return b.defineProperty(e,t,n)},M=n(function(e){e.exports={default:_,__esModule:!0}}),P=t(M),j=t(n(function(e,t){t.__esModule=!0;var n,r=(n=M)&&n.__esModule?n:{default:n};t.default=function(){function i(e,t){for(var n=0;nr;)m(i,n=t[r++])&&(~Q(o,n)||o.push(n));return o},te="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),ne=Object.keys||function(e){return ee(e,te)},ie=O?Object.defineProperties:function(e,t){p(e);for(var n,i=ne(t),r=i.length,o=0;odocument.F=Object<\/script>"),e.close(),ce=e.F;n--;)delete ce[ue][te[n]];return ce()},fe=Object.create||function(e,t){var n;return null!==e?(ae[ue]=p(e),n=new ae,ae[ue]=null,n[se]=e):n=ce(),void 0===t?n:ie(n,t)},le=n(function(e){var t=U("wks"),n=x.Symbol,i="function"==typeof n;(e.exports=function(e){return t[e]||(t[e]=i&&n[e]||(i?n:X)("Symbol."+e))}).store=t}),de=l.f,he=le("toStringTag"),pe=function(e,t,n){e&&!m(e=n?e:e.prototype,he)&&de(e,he,{configurable:!0,value:t})},ve={};A(ve,le("iterator"),function(){return this});var me,we=function(e){return Object(z(e))},ye=J("IE_PROTO"),ge=Object.prototype,be=Object.getPrototypeOf||function(e){return e=we(e),m(e,ye)?e[ye]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?ge:null},_e=le("iterator"),xe=!([].keys&&"next"in[].keys()),ke="values",Ee=function(){return this},Oe=function(e,t,n,i,r,o,s){var a,u,c;u=t,c=i,(a=n).prototype=fe(ve,{next:S(1,c)}),pe(a,u+" Iterator");var f,l,d,h=function(e){if(!xe&&e in w)return w[e];switch(e){case"keys":case ke:return function(){return new n(this,e)}}return function(){return new n(this,e)}},p=t+" Iterator",v=r==ke,m=!1,w=e.prototype,y=w[_e]||w["@@iterator"]||r&&w[r],g=y||h(r),b=r?v?h("entries"):g:void 0,_="Array"==t&&w.entries||y;if(_&&(d=be(_.call(new e)))!==Object.prototype&&d.next&&pe(d,p,!0),v&&y&&y.name!==ke&&(m=!0,g=function(){return y.call(this)}),s&&(xe||m||!w[_e])&&A(w,_e,g),F[t]=g,F[p]=Ee,r)if(f={values:v?g:h(ke),keys:o?g:h("keys"),entries:b},s)for(l in f)l in w||R(w,l,f[l]);else T(T.P+T.F*(xe||m),t,f);return f},Se=(me=!0,function(e,t){var n,i,r=String(z(e)),o=C(t),s=r.length;return o<0||s<=o?me?"":void 0:(n=r.charCodeAt(o))<55296||56319=t.length?{value:void 0,done:!0}:(e=Se(t,n),this._i+=e.length,{value:e,done:!1})});var Ae=function(e,t){return{value:t,done:!!e}};Oe(Array,"Array",function(e,t){this._t=I(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,Ae(1)):Ae(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values");F.Arguments=F.Array;for(var Te=le("toStringTag"),Me="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),Pe=0;Pes;)o.call(e,i=r[s++])&&t.push(i);return t}(t=I(t)),r=0,o=i.length;rr;)m(ct,t=n[r++])||t==ot||t==Je||i.push(t);return i},kt=function(e){for(var t,n=e===lt,i=et(n?ft:I(e)),r=[],o=0;i.length>o;)!m(ct,t=i[o++])||n&&!m(lt,t)||r.push(ct[t]);return r};dt||(R((tt=function(){if(this instanceof tt)throw TypeError("Symbol is not a constructor!");var t=X(0Ot;)le(Et[Ot++]);for(var St=ne(le.store),At=0;St.length>At;)De(St[At++]);T(T.S+T.F*!dt,"Symbol",{for:function(e){return m(ut,e+="")?ut[e]:ut[e]=tt(e)},keyFor:function(e){if(!wt(e))throw TypeError(e+" is not a symbol!");for(var t in ut)if(ut[t]===e)return t},useSetter:function(){pt=!0},useSimple:function(){pt=!1}}),T(T.S+T.F*!dt,"Object",{create:function(e,t){return void 0===t?fe(e):gt(fe(e),t)},defineProperty:yt,defineProperties:gt,getOwnPropertyDescriptor:_t,getOwnPropertyNames:xt,getOwnPropertySymbols:kt}),nt&&T(T.S+T.F*(!dt||E(function(){var e=tt();return"[null]"!=it([e])||"{}"!=it({a:e})||"{}"!=it(Object(e))})),"JSON",{stringify:function(e){for(var t,n,i=[e],r=1;arguments.length>r;)i.push(arguments[r++]);if(n=t=i[1],(k(t)||void 0!==e)&&!wt(e))return Ve(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!wt(t))return t}),i[1]=t,it.apply(nt,i)}}),tt[rt][st]||A(tt[rt],st,tt[rt].valueOf),pe(tt,"Symbol"),pe(Math,"Math",!0),pe(x.JSON,"JSON",!0),De("asyncIterator"),De("observable");var Tt=v.Symbol,Mt=n(function(e){e.exports={default:Tt,__esModule:!0}});t(Mt);var Pt=t(n(function(e,t){t.__esModule=!0;var n=o(Re),i=o(Mt),r="function"==typeof i.default&&"symbol"==typeof n.default?function(e){return typeof e}:function(e){return e&&"function"==typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":typeof e};function o(e){return e&&e.__esModule?e:{default:e}}t.default="function"==typeof i.default&&"symbol"===r(n.default)?function(e){return void 0===e?"undefined":r(e)}:function(e){return e&&"function"==typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":void 0===e?"undefined":r(e)}})),jt=function(e,t){var n=(v.Object||{})[e]||Object[e],i={};i[e]=t(n),T(T.S+T.F*E(function(){n(1)}),"Object",i)};jt("keys",function(){return function(e){return ne(we(e))}});var Nt=v.Object.keys;t(n(function(e){e.exports={default:Nt,__esModule:!0}}));var Lt=Math.floor;T(T.S,"Number",{isInteger:function(e){return!k(e)&&isFinite(e)&&Lt(e)===e}});var Ct=v.Number.isInteger;t(n(function(e){e.exports={default:Ct,__esModule:!0}}));var zt="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff",Rt="["+zt+"]",Ft=RegExp("^"+Rt+Rt+"*"),Bt=RegExp(Rt+Rt+"*$"),Dt=function(e,t,n){var i={},r=E(function(){return!!zt[e]()||"​…"!="​…"[e]()}),o=i[e]=r?t(Gt):zt[e];n&&(i[n]=o),T(T.P+T.F*r,"String",i)},Gt=Dt.trim=function(e,t){return e=String(z(e)),1&t&&(e=e.replace(Ft,"")),2&t&&(e=e.replace(Bt,"")),e},It=Dt,Vt=x.parseFloat,Ht=It.trim,Wt=1/Vt(zt+"-0")!=-1/0?function(e){var t=Ht(String(e),3),n=Vt(t);return 0===n&&"-"==t.charAt(0)?-0:n}:Vt;T(T.S+T.F*(Number.parseFloat!=Wt),"Number",{parseFloat:Wt});var qt=v.Number.parseFloat;function Ut(e){return null==e}function $t(e){return Array.isArray(e)}function Kt(e){return"function"==typeof e}function Xt(e){return Object(e)===e&&"[object Object]"===String(e)&&!Kt(e)&&!$t(e)}function Yt(e){return"string"==typeof e||e instanceof String}function Jt(e){return"boolean"==typeof e}function Qt(e){return Ut(e)||Jt(e)||Yt(e)||"number"==typeof e}function Zt(e,t){if(!Yt(e))throw new TypeError("Log's method only acccept string as argument, but not "+e+" in "+(void 0===e?"undefined":Pt(e)));return Yt(t)?"["+(e=en.FORCE_GLOBAL_TAG?en.GLOBAL_TAG:e||en.GLOBAL_TAG)+"] > "+t:"["+en.GLOBAL_TAG+"] > "+e}t(n(function(e){e.exports={default:qt,__esModule:!0}}));var en=function(){function n(){r(this,n)}return j(n,null,[{key:"error",value:function(e,t){n.ENABLE_ERROR&&(console.error||console.warn||console.log).call(console,Zt(e,t))}},{key:"info",value:function(e,t){n.ENABLE_INFO&&(console.info||console.log).call(console,Zt(e,t))}},{key:"warn",value:function(e,t){n.ENABLE_WARN&&(console.warn||console.log).call(console,Zt(e,t))}},{key:"debug",value:function(e,t){n.ENABLE_DEBUG&&(console.debug||console.log).call(console,Zt(e,t))}},{key:"verbose",value:function(e,t){n.ENABLE_VERBOSE&&console.log(Zt(e,t))}}]),n}();en.GLOBAL_TAG="chimee",en.FORCE_GLOBAL_TAG=!1,en.ENABLE_ERROR=!0,en.ENABLE_INFO=!0,en.ENABLE_WARN=!0,en.ENABLE_DEBUG=!0,en.ENABLE_VERBOSE=!0;n(function(x,k){!function(r,l){var d="function",e="undefined",t="model",n="name",i="type",o="vendor",s="version",a="architecture",u="console",c="mobile",f="tablet",h="smarttv",p="wearable",v={extend:function(e,t){var n={};for(var i in e)t[i]&&t[i].length%2==0?n[i]=t[i].concat(e[i]):n[i]=e[i];return n},has:function(e,t){return"string"==typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return"string"==typeof e?e.replace(/[^\d\.]/g,"").split(".")[0]:l},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},m={rgx:function(e,t){for(var n,i,r,o,s,a,u=0;un;)t.push(arguments[n++]);return Cn[++Ln]=function(){!function(e,t,n){var i=void 0===n;switch(t.length){case 0:return i?e():e.call(n);case 1:return i?e(t[0]):e.call(n,t[0]);case 2:return i?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return i?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return i?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}e.apply(n,t)}("function"==typeof e?e:Function(e),t)},_n(Ln),Ln},Pn=function(e){delete Cn[e]},"process"==D(Tn)?_n=function(e){Tn.nextTick(g(Rn,e,1))}:Nn&&Nn.now?_n=function(e){Nn.now(g(Rn,e,1))}:jn?(kn=(xn=new jn).port2,xn.port1.onmessage=Fn,_n=g(kn.postMessage,kn,1)):x.addEventListener&&"function"==typeof postMessage&&!x.importScripts?(_n=function(e){x.postMessage(e+"","*")},x.addEventListener("message",Fn,!1)):_n=zn in a("script")?function(e){oe.appendChild(a("script"))[zn]=function(){oe.removeChild(this),Rn.call(e)}}:function(e){setTimeout(g(Rn,e,1),0)});var Bn={set:Mn,clear:Pn},Dn=Bn.set,Gn=x.MutationObserver||x.WebKitMutationObserver,In=x.process,Vn=x.Promise,Hn="process"==D(In);function Wn(e){var n,i;this.promise=new e(function(e,t){if(void 0!==n||void 0!==i)throw TypeError("Bad Promise constructor");n=e,i=t}),this.resolve=s(n),this.reject=s(i)}var qn,Un,$n,Kn,Xn,Yn,Jn={f:function(e){return new Wn(e)}},Qn=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}},Zn=x.navigator,ei=Zn&&Zn.userAgent||"",ti=function(e,t){if(p(e),k(t)&&t.constructor===e)return t;var n=Jn.f(e);return(0,n.resolve)(t),n.promise},ni=function(e,t,n){for(var i in t)n&&e[i]?e[i]=t[i]:A(e,i,t[i]);return e},ii=le("species"),ri=Bn.set,oi=function(){var n,i,r,e=function(){var e,t;for(Hn&&(e=In.domain)&&e.exit();n;){t=n.fn,n=n.next;try{t()}catch(e){throw n?r():i=void 0,e}}i=void 0,e&&e.enter()};if(Hn)r=function(){In.nextTick(e)};else if(!Gn||x.navigator&&x.navigator.standalone)if(Vn&&Vn.resolve){var t=Vn.resolve(void 0);r=function(){t.then(e)}}else r=function(){Dn.call(x,e)};else{var o=!0,s=document.createTextNode("");new Gn(e).observe(s,{characterData:!0}),r=function(){s.data=o=!o}}return function(e){var t={fn:e,next:void 0};i&&(i.next=t),n||(n=t,r()),i=t}}(),si="Promise",ai=x.TypeError,ui=x.process,ci=ui&&ui.versions,fi=ci&&ci.v8||"",li=x[si],di="process"==cn(ui),hi=function(){},pi=Un=Jn.f,vi=!!function(){try{var e=li.resolve(1),t=(e.constructor={})[le("species")]=function(e){e(hi,hi)};return(di||"function"==typeof PromiseRejectionEvent)&&e.then(hi)instanceof t&&0!==fi.indexOf("6.6")&&-1===ei.indexOf("Chrome/66")}catch(e){}}(),mi=function(e){var t;return!(!k(e)||"function"!=typeof(t=e.then))&&t},wi=function(f,n){if(!f._n){f._n=!0;var i=f._c;oi(function(){for(var u=f._v,c=1==f._s,e=0,t=function(e){var t,n,i,r=c?e.ok:e.fail,o=e.resolve,s=e.reject,a=e.domain;try{r?(c||(2==f._h&&bi(f),f._h=1),!0===r?t=u:(a&&a.enter(),t=r(u),a&&(a.exit(),i=!0)),t===e.promise?s(ai("Promise-chain cycle")):(n=mi(t))?n.call(t,o,s):o(t)):s(u)}catch(e){a&&!i&&a.exit(),s(e)}};i.length>e;)t(i[e++]);f._c=[],f._n=!1,n&&!f._h&&yi(f)})}},yi=function(o){ri.call(x,function(){var e,t,n,i=o._v,r=gi(o);if(r&&(e=Qn(function(){di?ui.emit("unhandledRejection",i,o):(t=x.onunhandledrejection)?t({promise:o,reason:i}):(n=x.console)&&n.error&&n.error("Unhandled promise rejection",i)}),o._h=di||gi(o)?2:1),o._a=void 0,r&&e.e)throw e.v})},gi=function(e){return 1!==e._h&&0===(e._a||e._c).length},bi=function(t){ri.call(x,function(){var e;di?ui.emit("rejectionHandled",t):(e=x.onrejectionhandled)&&e({promise:t,reason:t._v})})},_i=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),wi(t,!0))},xi=function(e){var n,i=this;if(!i._d){i._d=!0,i=i._w||i;try{if(i===e)throw ai("Promise can't be resolved itself");(n=mi(e))?oi(function(){var t={_w:i,_d:!1};try{n.call(e,g(xi,t,1),g(_i,t,1))}catch(e){_i.call(t,e)}}):(i._v=e,i._s=1,wi(i,!1))}catch(e){_i.call({_w:i,_d:!1},e)}}};vi||(li=function(e){En(this,li,si,"_h"),s(e),qn.call(this);try{e(g(xi,this,1),g(_i,this,1))}catch(e){_i.call(this,e)}},(qn=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=ni(li.prototype,{then:function(e,t){var n=pi(An(this,li));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=di?ui.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&wi(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),$n=function(){var e=new qn;this.promise=e,this.resolve=g(xi,e,1),this.reject=g(_i,e,1)},Jn.f=pi=function(e){return e===li||e===Kn?new $n(e):Un(e)}),T(T.G+T.W+T.F*!vi,{Promise:li}),pe(li,si),Yn="function"==typeof v[Xn=si]?v[Xn]:x[Xn],O&&Yn&&!Yn[ii]&&l.f(Yn,ii,{configurable:!0,get:function(){return this}}),Kn=v[si],T(T.S+T.F*!vi,si,{reject:function(e){var t=pi(this);return(0,t.reject)(e),t.promise}}),T(T.S+!0*T.F,si,{resolve:function(e){return ti(this===Kn?li:this,e)}}),T(T.S+T.F*!(vi&&pn(function(e){li.all(e).catch(hi)})),si,{all:function(e){var s=this,t=pi(s),a=t.resolve,u=t.reject,n=Qn(function(){var i=[],r=0,o=1;On(e,!1,function(e){var t=r++,n=!1;i.push(void 0),o++,s.resolve(e).then(function(e){n||(n=!0,i[t]=e,--o||a(i))},u)}),--o||a(i)});return n.e&&u(n.v),t.promise},race:function(e){var t=this,n=pi(t),i=n.reject,r=Qn(function(){On(e,!1,function(e){t.resolve(e).then(n.resolve,i)})});return r.e&&i(r.v),n.promise}}),T(T.P+T.R,"Promise",{finally:function(t){var n=An(this,v.Promise||x.Promise),e="function"==typeof t;return this.then(e?function(e){return ti(n,t()).then(function(){return e})}:t,e?function(e){return ti(n,t()).then(function(){throw e})}:t)}}),T(T.S,"Promise",{try:function(e){var t=Jn.f(this),n=Qn(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}});var ki=v.Promise;t(n(function(e){e.exports={default:ki,__esModule:!0}}));var Ei="undefined"!=typeof window&&"[object Object]"!==Object.prototype.toString.call(window);var Oi=Ei&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame)||function(e){return setTimeout(e,17)},Si=Ei&&(window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.msCancelAnimationFrame||window.oCancelAnimationFrame)||function(e){clearTimeout(e)},Ai=Object.assign,Ti=!Ai||E(function(){var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach(function(e){t[e]=e}),7!=Ai({},e)[n]||Object.keys(Ai({},t)).join("")!=i})?function(e,t){for(var n=we(e),i=arguments.length,r=1,o=Ge.f,s=Ie.f;ra;)void 0!==(n=r(i,t=o[a++]))&&sn(s,t,n);return s}});var rr=v.Object.getOwnPropertyDescriptors,or=t(n(function(e){e.exports={default:rr,__esModule:!0}})),sr=v.Object.getOwnPropertySymbols,ar=t(n(function(e){e.exports={default:sr,__esModule:!0}}));jt("getOwnPropertyNames",function(){return Ke.f});var ur=v.Object,cr=function(e){return ur.getOwnPropertyNames(e)},fr=t(n(function(e){e.exports={default:cr,__esModule:!0}}));var lr=le("iterator"),dr=v.isIterable=function(e){var t=Object(e);return void 0!==t[lr]||"@@iterator"in t||F.hasOwnProperty(cn(t))},hr=n(function(e){e.exports={default:dr,__esModule:!0}});t(hr);var pr=v.getIterator=function(e){var t=ln(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return p(t.call(e))},vr=n(function(e){e.exports={default:pr,__esModule:!0}});t(vr),t(n(function(e,t){t.__esModule=!0;var n=i(hr),u=i(vr);function i(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){if(Array.isArray(e))return e;if((0,n.default)(Object(e)))return function(e,t){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=(0,u.default)(e);!(i=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){r=!0,o=e}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})),jt("getPrototypeOf",function(){return function(e){return be(we(e))}});var mr=v.Object.getPrototypeOf,wr=t(n(function(e){e.exports={default:mr,__esModule:!0}})),yr=le("species"),gr=function(e,t){return Ve(n=e)&&("function"!=typeof(i=n.constructor)||i!==Array&&!Ve(i.prototype)||(i=void 0),k(i)&&null===(i=i[yr])&&(i=void 0)),new(void 0===i?Array:i)(t);var n,i},br=function(l,e){var d=1==l,h=2==l,p=3==l,v=4==l,m=6==l,w=5==l||m,y=e||gr;return function(e,t,n){for(var i,r,o=we(e),s=G(o),a=g(t,n,3),u=H(s.length),c=0,f=d?y(e,u):h?y(e,0):void 0;c=this.currentPiece.time&&this.currentPiece.time;)this.danmu.emit(this.currentPiece),this.currentPiece=this.danmuList[this.currentPostion++]||{}},contextmenu:function(e){e.preventDefault();var t=this.danmu.getPieceByPoint(e.offsetX,e.offsetY);this.$emit("danmuContextmenu",t)}},methods:{_searchPosition:function(){var e=this.danmuList.length;if(0!==e){if(this.currentTime>this.danmuList[e-1].time)return this.currentPiece={},void(this.currentPostion=e+1);if(this.currentTime=this.currentTime){this.currentPostion=t,this.currentPiece=n;break}}}},open:function(){this.status="open",this.danmu.start()},close:function(){this.status="close",this.danmu.clear(),this.danmu.pause()},start:function(){this.danmu.start()},pause:function(){this.danmu.pause()},changeMode:function(e){this.danmu.changeMode(e)},sendMsg:function(e){"open"===this.status&&this.danmu.emit(e)},receiveData:function(e){this.danmuList=e,this.currentPiece=this.danmuList[this.currentPostion++]||{}},_resize:function(){this.danmu.resize()}}}}); +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.chimeePluginDanmu=t()}(this,function(){"use strict";var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e,t){return e(t={exports:{}},t.exports),t.exports}var r=t(n(function(e,t){t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}})),x=n(function(e){var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)}),v=n(function(e){var t=e.exports={version:"2.6.0"};"number"==typeof __e&&(__e=t)}),s=(v.version,function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}),g=function(i,r,e){if(s(i),void 0===r)return i;switch(e){case 1:return function(e){return i.call(r,e)};case 2:return function(e,t){return i.call(r,e,t)};case 3:return function(e,t,n){return i.call(r,e,t,n)}}return function(){return i.apply(r,arguments)}},k=function(e){return"object"==typeof e?null!==e:"function"==typeof e},p=function(e){if(!k(e))throw TypeError(e+" is not an object!");return e},E=function(e){try{return!!e()}catch(e){return!0}},O=!E(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),i=x.document,o=k(i)&&k(i.createElement),a=function(e){return o?i.createElement(e):{}},u=!O&&!E(function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}),c=function(e,t){if(!k(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!k(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!k(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!k(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")},f=Object.defineProperty,l={f:O?Object.defineProperty:function(e,t,n){if(p(e),t=c(t,!0),p(n),u)try{return f(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},S=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},A=O?function(e,t,n){return l.f(e,t,S(1,n))}:function(e,t,n){return e[t]=n,e},d={}.hasOwnProperty,m=function(e,t){return d.call(e,t)},w="prototype",y=function(e,t,n){var i,r,o,s=e&y.F,a=e&y.G,u=e&y.S,c=e&y.P,f=e&y.B,l=e&y.W,d=a?v:v[t]||(v[t]={}),h=d[w],p=a?x:u?x[t]:(x[t]||{})[w];for(i in a&&(n=t),n)(r=!s&&p&&void 0!==p[i])&&m(d,i)||(o=r?p[i]:n[i],d[i]=a&&"function"!=typeof p[i]?n[i]:f&&r?g(o,x):l&&p[i]==o?function(i){var e=function(e,t,n){if(this instanceof i){switch(arguments.length){case 0:return new i;case 1:return new i(e);case 2:return new i(e,t)}return new i(e,t,n)}return i.apply(this,arguments)};return e[w]=i[w],e}(o):c&&"function"==typeof o?g(Function.call,o):o,c&&((d.virtual||(d.virtual={}))[i]=o,e&y.R&&h&&!h[i]&&A(h,i,o)))};y.F=1,y.G=2,y.S=4,y.P=8,y.B=16,y.W=32,y.U=64,y.R=128;var T=y;T(T.S+T.F*!O,"Object",{defineProperty:l.f});var h,b=v.Object,_=function(e,t,n){return b.defineProperty(e,t,n)},M=n(function(e){e.exports={default:_,__esModule:!0}}),P=t(M),j=t(n(function(e,t){t.__esModule=!0;var n,r=(n=M)&&n.__esModule?n:{default:n};t.default=function(){function i(e,t){for(var n=0;nr;)m(i,n=t[r++])&&(~Q(o,n)||o.push(n));return o},te="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),ne=Object.keys||function(e){return ee(e,te)},ie=O?Object.defineProperties:function(e,t){p(e);for(var n,i=ne(t),r=i.length,o=0;odocument.F=Object<\/script>"),e.close(),ce=e.F;n--;)delete ce[ue][te[n]];return ce()},fe=Object.create||function(e,t){var n;return null!==e?(ae[ue]=p(e),n=new ae,ae[ue]=null,n[se]=e):n=ce(),void 0===t?n:ie(n,t)},le=n(function(e){var t=U("wks"),n=x.Symbol,i="function"==typeof n;(e.exports=function(e){return t[e]||(t[e]=i&&n[e]||(i?n:X)("Symbol."+e))}).store=t}),de=l.f,he=le("toStringTag"),pe=function(e,t,n){e&&!m(e=n?e:e.prototype,he)&&de(e,he,{configurable:!0,value:t})},ve={};A(ve,le("iterator"),function(){return this});var me,we=function(e){return Object(z(e))},ye=J("IE_PROTO"),ge=Object.prototype,be=Object.getPrototypeOf||function(e){return e=we(e),m(e,ye)?e[ye]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?ge:null},_e=le("iterator"),xe=!([].keys&&"next"in[].keys()),ke="values",Ee=function(){return this},Oe=function(e,t,n,i,r,o,s){var a,u,c;u=t,c=i,(a=n).prototype=fe(ve,{next:S(1,c)}),pe(a,u+" Iterator");var f,l,d,h=function(e){if(!xe&&e in w)return w[e];switch(e){case"keys":case ke:return function(){return new n(this,e)}}return function(){return new n(this,e)}},p=t+" Iterator",v=r==ke,m=!1,w=e.prototype,y=w[_e]||w["@@iterator"]||r&&w[r],g=y||h(r),b=r?v?h("entries"):g:void 0,_="Array"==t&&w.entries||y;if(_&&(d=be(_.call(new e)))!==Object.prototype&&d.next&&pe(d,p,!0),v&&y&&y.name!==ke&&(m=!0,g=function(){return y.call(this)}),s&&(xe||m||!w[_e])&&A(w,_e,g),F[t]=g,F[p]=Ee,r)if(f={values:v?g:h(ke),keys:o?g:h("keys"),entries:b},s)for(l in f)l in w||R(w,l,f[l]);else T(T.P+T.F*(xe||m),t,f);return f},Se=(me=!0,function(e,t){var n,i,r=String(z(e)),o=C(t),s=r.length;return o<0||s<=o?me?"":void 0:(n=r.charCodeAt(o))<55296||56319=t.length?{value:void 0,done:!0}:(e=Se(t,n),this._i+=e.length,{value:e,done:!1})});var Ae=function(e,t){return{value:t,done:!!e}};Oe(Array,"Array",function(e,t){this._t=I(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,Ae(1)):Ae(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values");F.Arguments=F.Array;for(var Te=le("toStringTag"),Me="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),Pe=0;Pes;)o.call(e,i=r[s++])&&t.push(i);return t}(t=I(t)),r=0,o=i.length;rr;)m(ct,t=n[r++])||t==ot||t==Je||i.push(t);return i},kt=function(e){for(var t,n=e===lt,i=et(n?ft:I(e)),r=[],o=0;i.length>o;)!m(ct,t=i[o++])||n&&!m(lt,t)||r.push(ct[t]);return r};dt||(R((tt=function(){if(this instanceof tt)throw TypeError("Symbol is not a constructor!");var t=X(0Ot;)le(Et[Ot++]);for(var St=ne(le.store),At=0;St.length>At;)De(St[At++]);T(T.S+T.F*!dt,"Symbol",{for:function(e){return m(ut,e+="")?ut[e]:ut[e]=tt(e)},keyFor:function(e){if(!wt(e))throw TypeError(e+" is not a symbol!");for(var t in ut)if(ut[t]===e)return t},useSetter:function(){pt=!0},useSimple:function(){pt=!1}}),T(T.S+T.F*!dt,"Object",{create:function(e,t){return void 0===t?fe(e):gt(fe(e),t)},defineProperty:yt,defineProperties:gt,getOwnPropertyDescriptor:_t,getOwnPropertyNames:xt,getOwnPropertySymbols:kt}),nt&&T(T.S+T.F*(!dt||E(function(){var e=tt();return"[null]"!=it([e])||"{}"!=it({a:e})||"{}"!=it(Object(e))})),"JSON",{stringify:function(e){for(var t,n,i=[e],r=1;arguments.length>r;)i.push(arguments[r++]);if(n=t=i[1],(k(t)||void 0!==e)&&!wt(e))return Ve(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!wt(t))return t}),i[1]=t,it.apply(nt,i)}}),tt[rt][st]||A(tt[rt],st,tt[rt].valueOf),pe(tt,"Symbol"),pe(Math,"Math",!0),pe(x.JSON,"JSON",!0),De("asyncIterator"),De("observable");var Tt=v.Symbol,Mt=n(function(e){e.exports={default:Tt,__esModule:!0}});t(Mt);var Pt=t(n(function(e,t){t.__esModule=!0;var n=o(Re),i=o(Mt),r="function"==typeof i.default&&"symbol"==typeof n.default?function(e){return typeof e}:function(e){return e&&"function"==typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":typeof e};function o(e){return e&&e.__esModule?e:{default:e}}t.default="function"==typeof i.default&&"symbol"===r(n.default)?function(e){return void 0===e?"undefined":r(e)}:function(e){return e&&"function"==typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":void 0===e?"undefined":r(e)}})),jt=function(e,t){var n=(v.Object||{})[e]||Object[e],i={};i[e]=t(n),T(T.S+T.F*E(function(){n(1)}),"Object",i)};jt("keys",function(){return function(e){return ne(we(e))}});var Nt=v.Object.keys;t(n(function(e){e.exports={default:Nt,__esModule:!0}}));var Lt=Math.floor;T(T.S,"Number",{isInteger:function(e){return!k(e)&&isFinite(e)&&Lt(e)===e}});var Ct=v.Number.isInteger;t(n(function(e){e.exports={default:Ct,__esModule:!0}}));var zt="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff",Rt="["+zt+"]",Ft=RegExp("^"+Rt+Rt+"*"),Bt=RegExp(Rt+Rt+"*$"),Dt=function(e,t,n){var i={},r=E(function(){return!!zt[e]()||"​…"!="​…"[e]()}),o=i[e]=r?t(Gt):zt[e];n&&(i[n]=o),T(T.P+T.F*r,"String",i)},Gt=Dt.trim=function(e,t){return e=String(z(e)),1&t&&(e=e.replace(Ft,"")),2&t&&(e=e.replace(Bt,"")),e},It=Dt,Vt=x.parseFloat,Ht=It.trim,Wt=1/Vt(zt+"-0")!=-1/0?function(e){var t=Ht(String(e),3),n=Vt(t);return 0===n&&"-"==t.charAt(0)?-0:n}:Vt;T(T.S+T.F*(Number.parseFloat!=Wt),"Number",{parseFloat:Wt});var qt=v.Number.parseFloat;function Ut(e){return null==e}function $t(e){return Array.isArray(e)}function Kt(e){return"function"==typeof e}function Xt(e){return Object(e)===e&&"[object Object]"===String(e)&&!Kt(e)&&!$t(e)}function Yt(e){return"string"==typeof e||e instanceof String}function Jt(e){return"boolean"==typeof e}function Qt(e){return Ut(e)||Jt(e)||Yt(e)||"number"==typeof e}function Zt(e,t){if(!Yt(e))throw new TypeError("Log's method only acccept string as argument, but not "+e+" in "+(void 0===e?"undefined":Pt(e)));return Yt(t)?"["+(e=en.FORCE_GLOBAL_TAG?en.GLOBAL_TAG:e||en.GLOBAL_TAG)+"] > "+t:"["+en.GLOBAL_TAG+"] > "+e}t(n(function(e){e.exports={default:qt,__esModule:!0}}));var en=function(){function n(){r(this,n)}return j(n,null,[{key:"error",value:function(e,t){n.ENABLE_ERROR&&(console.error||console.warn||console.log).call(console,Zt(e,t))}},{key:"info",value:function(e,t){n.ENABLE_INFO&&(console.info||console.log).call(console,Zt(e,t))}},{key:"warn",value:function(e,t){n.ENABLE_WARN&&(console.warn||console.log).call(console,Zt(e,t))}},{key:"debug",value:function(e,t){n.ENABLE_DEBUG&&(console.debug||console.log).call(console,Zt(e,t))}},{key:"verbose",value:function(e,t){n.ENABLE_VERBOSE&&console.log(Zt(e,t))}}]),n}();en.GLOBAL_TAG="chimee",en.FORCE_GLOBAL_TAG=!1,en.ENABLE_ERROR=!0,en.ENABLE_INFO=!0,en.ENABLE_WARN=!0,en.ENABLE_DEBUG=!0,en.ENABLE_VERBOSE=!0;n(function(x,k){!function(r,l){var d="function",e="undefined",t="model",n="name",i="type",o="vendor",s="version",a="architecture",u="console",c="mobile",f="tablet",h="smarttv",p="wearable",v={extend:function(e,t){var n={};for(var i in e)t[i]&&t[i].length%2==0?n[i]=t[i].concat(e[i]):n[i]=e[i];return n},has:function(e,t){return"string"==typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return"string"==typeof e?e.replace(/[^\d\.]/g,"").split(".")[0]:l},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},m={rgx:function(e,t){for(var n,i,r,o,s,a,u=0;un;)t.push(arguments[n++]);return Cn[++Ln]=function(){!function(e,t,n){var i=void 0===n;switch(t.length){case 0:return i?e():e.call(n);case 1:return i?e(t[0]):e.call(n,t[0]);case 2:return i?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return i?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return i?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}e.apply(n,t)}("function"==typeof e?e:Function(e),t)},_n(Ln),Ln},Pn=function(e){delete Cn[e]},"process"==D(Tn)?_n=function(e){Tn.nextTick(g(Rn,e,1))}:Nn&&Nn.now?_n=function(e){Nn.now(g(Rn,e,1))}:jn?(kn=(xn=new jn).port2,xn.port1.onmessage=Fn,_n=g(kn.postMessage,kn,1)):x.addEventListener&&"function"==typeof postMessage&&!x.importScripts?(_n=function(e){x.postMessage(e+"","*")},x.addEventListener("message",Fn,!1)):_n=zn in a("script")?function(e){oe.appendChild(a("script"))[zn]=function(){oe.removeChild(this),Rn.call(e)}}:function(e){setTimeout(g(Rn,e,1),0)});var Bn={set:Mn,clear:Pn},Dn=Bn.set,Gn=x.MutationObserver||x.WebKitMutationObserver,In=x.process,Vn=x.Promise,Hn="process"==D(In);function Wn(e){var n,i;this.promise=new e(function(e,t){if(void 0!==n||void 0!==i)throw TypeError("Bad Promise constructor");n=e,i=t}),this.resolve=s(n),this.reject=s(i)}var qn,Un,$n,Kn,Xn,Yn,Jn={f:function(e){return new Wn(e)}},Qn=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}},Zn=x.navigator,ei=Zn&&Zn.userAgent||"",ti=function(e,t){if(p(e),k(t)&&t.constructor===e)return t;var n=Jn.f(e);return(0,n.resolve)(t),n.promise},ni=function(e,t,n){for(var i in t)n&&e[i]?e[i]=t[i]:A(e,i,t[i]);return e},ii=le("species"),ri=Bn.set,oi=function(){var n,i,r,e=function(){var e,t;for(Hn&&(e=In.domain)&&e.exit();n;){t=n.fn,n=n.next;try{t()}catch(e){throw n?r():i=void 0,e}}i=void 0,e&&e.enter()};if(Hn)r=function(){In.nextTick(e)};else if(!Gn||x.navigator&&x.navigator.standalone)if(Vn&&Vn.resolve){var t=Vn.resolve(void 0);r=function(){t.then(e)}}else r=function(){Dn.call(x,e)};else{var o=!0,s=document.createTextNode("");new Gn(e).observe(s,{characterData:!0}),r=function(){s.data=o=!o}}return function(e){var t={fn:e,next:void 0};i&&(i.next=t),n||(n=t,r()),i=t}}(),si="Promise",ai=x.TypeError,ui=x.process,ci=ui&&ui.versions,fi=ci&&ci.v8||"",li=x[si],di="process"==cn(ui),hi=function(){},pi=Un=Jn.f,vi=!!function(){try{var e=li.resolve(1),t=(e.constructor={})[le("species")]=function(e){e(hi,hi)};return(di||"function"==typeof PromiseRejectionEvent)&&e.then(hi)instanceof t&&0!==fi.indexOf("6.6")&&-1===ei.indexOf("Chrome/66")}catch(e){}}(),mi=function(e){var t;return!(!k(e)||"function"!=typeof(t=e.then))&&t},wi=function(f,n){if(!f._n){f._n=!0;var i=f._c;oi(function(){for(var u=f._v,c=1==f._s,e=0,t=function(e){var t,n,i,r=c?e.ok:e.fail,o=e.resolve,s=e.reject,a=e.domain;try{r?(c||(2==f._h&&bi(f),f._h=1),!0===r?t=u:(a&&a.enter(),t=r(u),a&&(a.exit(),i=!0)),t===e.promise?s(ai("Promise-chain cycle")):(n=mi(t))?n.call(t,o,s):o(t)):s(u)}catch(e){a&&!i&&a.exit(),s(e)}};i.length>e;)t(i[e++]);f._c=[],f._n=!1,n&&!f._h&&yi(f)})}},yi=function(o){ri.call(x,function(){var e,t,n,i=o._v,r=gi(o);if(r&&(e=Qn(function(){di?ui.emit("unhandledRejection",i,o):(t=x.onunhandledrejection)?t({promise:o,reason:i}):(n=x.console)&&n.error&&n.error("Unhandled promise rejection",i)}),o._h=di||gi(o)?2:1),o._a=void 0,r&&e.e)throw e.v})},gi=function(e){return 1!==e._h&&0===(e._a||e._c).length},bi=function(t){ri.call(x,function(){var e;di?ui.emit("rejectionHandled",t):(e=x.onrejectionhandled)&&e({promise:t,reason:t._v})})},_i=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),wi(t,!0))},xi=function(e){var n,i=this;if(!i._d){i._d=!0,i=i._w||i;try{if(i===e)throw ai("Promise can't be resolved itself");(n=mi(e))?oi(function(){var t={_w:i,_d:!1};try{n.call(e,g(xi,t,1),g(_i,t,1))}catch(e){_i.call(t,e)}}):(i._v=e,i._s=1,wi(i,!1))}catch(e){_i.call({_w:i,_d:!1},e)}}};vi||(li=function(e){En(this,li,si,"_h"),s(e),qn.call(this);try{e(g(xi,this,1),g(_i,this,1))}catch(e){_i.call(this,e)}},(qn=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=ni(li.prototype,{then:function(e,t){var n=pi(An(this,li));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=di?ui.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&wi(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),$n=function(){var e=new qn;this.promise=e,this.resolve=g(xi,e,1),this.reject=g(_i,e,1)},Jn.f=pi=function(e){return e===li||e===Kn?new $n(e):Un(e)}),T(T.G+T.W+T.F*!vi,{Promise:li}),pe(li,si),Yn="function"==typeof v[Xn=si]?v[Xn]:x[Xn],O&&Yn&&!Yn[ii]&&l.f(Yn,ii,{configurable:!0,get:function(){return this}}),Kn=v[si],T(T.S+T.F*!vi,si,{reject:function(e){var t=pi(this);return(0,t.reject)(e),t.promise}}),T(T.S+!0*T.F,si,{resolve:function(e){return ti(this===Kn?li:this,e)}}),T(T.S+T.F*!(vi&&pn(function(e){li.all(e).catch(hi)})),si,{all:function(e){var s=this,t=pi(s),a=t.resolve,u=t.reject,n=Qn(function(){var i=[],r=0,o=1;On(e,!1,function(e){var t=r++,n=!1;i.push(void 0),o++,s.resolve(e).then(function(e){n||(n=!0,i[t]=e,--o||a(i))},u)}),--o||a(i)});return n.e&&u(n.v),t.promise},race:function(e){var t=this,n=pi(t),i=n.reject,r=Qn(function(){On(e,!1,function(e){t.resolve(e).then(n.resolve,i)})});return r.e&&i(r.v),n.promise}}),T(T.P+T.R,"Promise",{finally:function(t){var n=An(this,v.Promise||x.Promise),e="function"==typeof t;return this.then(e?function(e){return ti(n,t()).then(function(){return e})}:t,e?function(e){return ti(n,t()).then(function(){throw e})}:t)}}),T(T.S,"Promise",{try:function(e){var t=Jn.f(this),n=Qn(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}});var ki=v.Promise;t(n(function(e){e.exports={default:ki,__esModule:!0}}));var Ei="undefined"!=typeof window&&"[object Object]"!==Object.prototype.toString.call(window);var Oi=Ei&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame)||function(e){return setTimeout(e,17)},Si=Ei&&(window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.msCancelAnimationFrame||window.oCancelAnimationFrame)||function(e){clearTimeout(e)},Ai=Object.assign,Ti=!Ai||E(function(){var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach(function(e){t[e]=e}),7!=Ai({},e)[n]||Object.keys(Ai({},t)).join("")!=i})?function(e,t){for(var n=we(e),i=arguments.length,r=1,o=Ge.f,s=Ie.f;ra;)void 0!==(n=r(i,t=o[a++]))&&sn(s,t,n);return s}});var rr=v.Object.getOwnPropertyDescriptors,or=t(n(function(e){e.exports={default:rr,__esModule:!0}})),sr=v.Object.getOwnPropertySymbols,ar=t(n(function(e){e.exports={default:sr,__esModule:!0}}));jt("getOwnPropertyNames",function(){return Ke.f});var ur=v.Object,cr=function(e){return ur.getOwnPropertyNames(e)},fr=t(n(function(e){e.exports={default:cr,__esModule:!0}}));var lr=le("iterator"),dr=v.isIterable=function(e){var t=Object(e);return void 0!==t[lr]||"@@iterator"in t||F.hasOwnProperty(cn(t))},hr=n(function(e){e.exports={default:dr,__esModule:!0}});t(hr);var pr=v.getIterator=function(e){var t=ln(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return p(t.call(e))},vr=n(function(e){e.exports={default:pr,__esModule:!0}});t(vr),t(n(function(e,t){t.__esModule=!0;var n=i(hr),u=i(vr);function i(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){if(Array.isArray(e))return e;if((0,n.default)(Object(e)))return function(e,t){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=(0,u.default)(e);!(i=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){r=!0,o=e}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})),jt("getPrototypeOf",function(){return function(e){return be(we(e))}});var mr=v.Object.getPrototypeOf,wr=t(n(function(e){e.exports={default:mr,__esModule:!0}})),yr=le("species"),gr=function(e,t){return Ve(n=e)&&("function"!=typeof(i=n.constructor)||i!==Array&&!Ve(i.prototype)||(i=void 0),k(i)&&null===(i=i[yr])&&(i=void 0)),new(void 0===i?Array:i)(t);var n,i},br=function(l,e){var d=1==l,h=2==l,p=3==l,v=4==l,m=6==l,w=5==l||m,y=e||gr;return function(e,t,n){for(var i,r,o=we(e),s=G(o),a=g(t,n,3),u=H(s.length),c=0,f=d?y(e,u):h?y(e,0):void 0;c=this.currentPiece.time&&this.currentPiece.time;)this.danmu.emit(this.currentPiece),this.currentPiece=this.danmuList[this.currentPostion++]||{}},contextmenu:function(e){e.preventDefault();var t=this.danmu.getPieceByPoint(e.offsetX,e.offsetY);this.$emit("danmuContextmenu",t)}},methods:{_searchPosition:function(){var e=this.danmuList.length;if(0!==e){if(this.currentTime>this.danmuList[e-1].time)return this.currentPiece={},void(this.currentPostion=e+1);if(this.currentTime=this.currentTime){this.currentPostion=t,this.currentPiece=n;break}}}},open:function(){this.status="open",this.danmu.start()},close:function(){this.status="close",this.danmu.clear(),this.danmu.pause()},start:function(){this.danmu.start()},pause:function(){this.danmu.pause()},changeMode:function(e){this.danmu.changeMode(e)},sendMsg:function(e){"open"===this.status&&this.danmu.emit(e)},receiveData:function(e){this.danmuList=e,this.currentPiece=this.danmuList[this.currentPostion++]||{}},_resize:function(){this.danmu.resize()}}}}); diff --git a/lib/index.mjs b/lib/index.mjs index 1293a74..a86c720 100644 --- a/lib/index.mjs +++ b/lib/index.mjs @@ -360,7 +360,7 @@ var Css = (_class = function () { this.thread.pool.forEach(function (item, i) { setStyle(item.piece, 'transform', 'translateX(' + item.offset.x + 'px) translateY(' + item.offset.y + 'px) '); if (item.mode === 'flow') { - item.offset.x -= item.speed; + item.offset.x = Math.floor(item.offset.x - item.speed); if (item.offset.x < -item.piece.width) { item.piece.parentNode.removeChild(item.piece); _this.thread.remove(i);