UNPKG

chimee-player

Version:
1 lines 662 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.ChimeePlayer=t()}(this,function(){"use strict";function __$styleInject(e,t){if("undefined"==typeof document)return t;e=e||"";var r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");return n.type="text/css",r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)),t}function unwrapExports(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function createCommonjsModule(e,t){return t={exports:{}},e(t,t.exports),t.exports}function PromiseCapability(e){var t,r;this.promise=new e(function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n}),this.resolve=_aFunction(t),this.reject=_aFunction(r)}function defined$1(e){return void 0!==e}function isVoid(e){return void 0===e||null===e}function isArray$1(e){return Array.isArray(e)}function isFunction(e){return"function"==typeof e}function isObject$1(e){return Object(e)===e&&"[object Object]"===String(e)&&!isFunction(e)&&!isArray$1(e)}function isNumber(e){return"number"==typeof e}function isNumeric(e){return!isArray$1(e)&&e-_Number$parseFloat(e)+1>=0}function isInteger(e){return _Number$isInteger(e)}function isEmpty(e){return isArray$1(e)?0===e.length:isObject$1(e)?0===_Object$keys(e).length:!e}function isEvent(e){return e instanceof Event||(e&&e.originalEvent)instanceof Event}function isString(e){return"string"==typeof e||e instanceof String}function isBoolean(e){return"boolean"==typeof e}function isPromise(e){return!!e&&("object"===(void 0===e?"undefined":_typeof(e))||"function"==typeof e)&&"function"==typeof e.then}function isPrimitive(e){return isVoid(e)||isBoolean(e)||isString(e)||isNumber(e)}function isUrl(e){return isString(e)&&!!e.match(/^((https?|ftp|rtsp|mms):\/\/)(([0-9a-z_!~*'().&=+$%-]+: )?[0-9a-z_!~*'().&=+$%-]+@)?(([0-9]{1,3}\.){3}[0-9]{1,3}|([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6}|localhost)(:[0-9]{1,4})?((\/?)|(\/[0-9a-z_!~*'().;?:@&=+$,%#-]+)+\/?)$/i)}function isNode$2(e){return!!("object"===("undefined"==typeof Node?"undefined":_typeof(Node))?e instanceof Node:e&&"object"===(void 0===e?"undefined":_typeof(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName)}function isElement(e){return!!("object"===("undefined"==typeof HTMLElement?"undefined":_typeof(HTMLElement))?e instanceof HTMLElement:e&&"object"===(void 0===e?"undefined":_typeof(e))&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName)}function isPosterityNode(e,t){if(!isNode$2(e)||!isNode$2(t))return!1;for(;t.parentNode;)if((t=t.parentNode)===e)return!0;return!1}function isHTMLString(e){return/<[^>]+?>/.test(e)}function isError(e){return e instanceof Error}function formatter(e,t){if(!isString(e))throw new TypeError("Log's method only acccept string as argument, but not "+e+" in "+(void 0===e?"undefined":_typeof(e)));return isString(t)?"["+(e=Log$1.FORCE_GLOBAL_TAG?Log$1.GLOBAL_TAG:e||Log$1.GLOBAL_TAG)+"] > "+t:"["+Log$1.GLOBAL_TAG+"] > "+e}function genTraversalHandler(e){function t(r,n,i){if(isArray$1(r)||isObject$1(r)){n=isPrimitive(n)?isObject$1(r)?{}:[]:n;for(var o in r)n[o]=t(r[o],n[o],o);return n}return e(r,n,i)}return t}function deepClone(e){if(isPrimitive(e))throw new TypeError("deepClone only accept non primitive type");return _deepAssign(e)}function deepAssign(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length<2)throw new Error("deepAssign accept two and more argument");for(var n=t.length-1;n>-1;n--)if(isPrimitive(t[n]))throw new TypeError("deepAssign only accept non primitive type");var i=t.shift();return t.forEach(function(e){return _deepAssign(e,i)}),i}function camelize(e,t){return e.replace(/(^|[^a-zA-Z]+)([a-zA-Z])/g,function(e,r,n,i){return t||0!==i?n.toUpperCase():n.toLowerCase()})}function hypenate(e){return camelize(e).replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}function bind(e,t){return e.bind?e.bind(t):e.apply?function(){for(var r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];return e.apply(t,n)}:function(){for(var r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];return e.call.apply(e,[t].concat(_toConsumableArray(n)))}}function uuid(){return S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4()}function S4(){return(65536*(1+Math.random())|0).toString(16).substring(1)}function getDeepProperty(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.throwError,i=void 0!==n&&n,o=r.backup;if(isString(t)&&(t=t.split(".")),!isArray$1(t))throw new TypeError("keys of getDeepProperty must be string or Array<string>");for(var a=[],s=e,u=0,c=t.length;u<c;u++){var l=t[u];if(isVoid(s)){if(i)throw new Error("obj"+(a.length>0?"."+a.join("."):" itself")+" is "+s);return o}s=s[l],a.push(l)}return s}function transObjectAttrIntoArray(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e,t){return+e-+t};return _Object$keys(e).sort(t).reduce(function(t,r){return t.concat(e[r])},[])}function runRejectableQueue(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return new _Promise(function(t,n){!function i(o){if(!(o>=e.length)){var a=isFunction(e[o])?e[o].apply(e,_toConsumableArray(r)):e[o];return!1===a?n("stop"):_Promise.resolve(a).then(function(){return i(o+1)}).catch(function(e){return n(e||"stop")})}t()}(0)})}function runStoppableQueue(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return function t(n){if(n>=e.length)return!0;return!1!==(isFunction(e[n])?e[n].apply(e,_toConsumableArray(r)):e[n])&&t(++n)}(0)}function strRepeat(e,t){var r=t,n=(e=""+(e||"")).length;return(((t=(t||n)-n)>0?e.repeat?"0".repeat(t):new Array(t+1).join("0"):"")+e).slice(0,r)}function formatTime(e){var t=Math.floor(e/3600);e=Math.floor(e%3600);var r=strRepeat(Math.floor(e/60),2),n=strRepeat(e=Math.floor(e%60),2);return t>=1?t+":"+r+":"+n:r+":"+n}function formatDate(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yyyy-MM-dd hh:mm:ss.i",r=e.getFullYear().toString(),n={M:e.getMonth()+1,d:e.getDate(),h:e.getHours(),m:e.getMinutes(),s:e.getSeconds(),i:e.getMilliseconds()};t=t.replace(/(y+)/gi,function(e,t){return r.substr(4-Math.min(4,t.length))});var i=function(e){t=t.replace(new RegExp("("+e+"+)","g"),function(t,r){return(n[e]<10&&r.length>1?"0":"")+n[e]})};for(var o in n)i(o);return t}function getLocalStorage(e){try{return window.localStorage.getItem(e)}catch(r){try{var t=document.cookie.match(new RegExp("(^| )"+e+"=([^;]*)(;|$)"));return isArray$1(t)?unescape(t[2]):""}catch(e){return""}}}function setLocalStorage(e,t){try{window.localStorage.setItem(e,t)}catch(n){var r=new Date;r.setTime(r.getTime()+2592e7);try{document.cookie=e+"="+escape(t)+";expires="+r.toUTCString()+";path=/;"}catch(e){}}}function getEvtTypeCache(e,t){var r=e.__evt_id;r||(Object.defineProperty(e,"__evt_id",{writable:!0,enumerable:!1,configurable:!0}),r=e.__evt_id=++_evtListenerCache.count);var n=r+"_"+t,i=_evtListenerCache[n];return i||(i=_evtListenerCache[n]=[]),i}function emitEventCache(e,t,r){var n=_Object$create(null);n.type=t,n.target=e,r&&_Object$assign(n,isObject$1(r)?r:{data:r}),getEvtTypeCache(e,t).forEach(function(t){(t[1]||t[0]).apply(e,[n])})}function addEventCache(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments[4];isFunction(n)&&!i&&(i=n,n=void 0);var o=[r,void 0,n];n&&!i&&(i=function(){removeEventCache(e,t,r,n);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];r.apply(e,o)}),i&&(o[1]=i),getEvtTypeCache(e,t).push(o)}function removeEventCache(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=getEvtTypeCache(e,t);if(r||n){var o=-1,a=void 0;return i.find(function(e,t){if((!r||e[0]===r)&&(!n||e[2]))return o=t,a=e[1],!0}),-1!==o&&i.splice(o,1),a}i.length=0}function getEvtTypeCache$1(e,t){var r=e.__evt_id;r||(Object.defineProperty(e,"__evt_id",{writable:!0,enumerable:!1,configurable:!0}),r=e.__evt_id=++_evtListenerCache$1.count);var n=r+"_"+t,i=_evtListenerCache$1[n];return i||(i=_evtListenerCache$1[n]=[]),i}function emitEventCache$1(e,t,r){var n=_Object$create(null);n.type=t,n.target=e,r&&_Object$assign(n,isObject$1(r)?r:{data:r}),getEvtTypeCache$1(e,t).forEach(function(t){(t[1]||t[0]).apply(e,[n])})}function addEventCache$1(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments[4];isFunction(n)&&!i&&(i=n,n=void 0);var o=[r,void 0,n];n&&!i&&(i=function(){removeEventCache$1(e,t,r,n);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];r.apply(e,o)}),i&&(o[1]=i),getEvtTypeCache$1(e,t).push(o)}function removeEventCache$1(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=getEvtTypeCache$1(e,t);if(r||n){var o=-1,a=void 0;return i.find(function(e,t){if((!r||e[0]===r)&&(!n||e[2]))return o=t,a=e[1],!0}),-1!==o&&i.splice(o,1),a}i.length=0}function makeArray$1(e){return _Array$from(e)}function getAttr(e,t){return e.getAttribute(t)}function setAttr(e,t,r){void 0===r?e.removeAttribute(t):e.setAttribute(t,r)}function addClassName(e,t){if(t&&(t=t.trim())){var r=t.split(/\s+/);if(e.classList)r.forEach(function(t){return e.classList.add(t)});else{var n=" "+(e.className||"")+" ";r.forEach(function(e){-1===n.indexOf(" "+e+" ")&&(n+=" "+e)}),e.className=n.trim()}}}function removeClassName(e,t){if(t&&(t=t.trim())){var r=t.split(/\s+/);if(e.classList)r.forEach(function(t){return e.classList.remove(t)});else{var n=" "+e.className+" ";r.forEach(function(e){for(var t=" "+e+" ";-1!==n.indexOf(t);)n=n.replace(t," ")}),e.className=n.trim()}}}function hasClassName(e,t){return new RegExp("(?:^|\\s)"+t+"(?=\\s|$)").test(e.className)}function removeEvent(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(void 0!==i&&!isBoolean(i)&&supportsPassive&&(i={passive:!0}),n){var o=removeEventCache$1(e,t+"_once",r);o&&(r=o)}e.removeEventListener(t,r,i)}function addEvent(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(void 0!==i&&!isBoolean(i)&&supportsPassive&&(i={passive:!0}),n){var o=r;addEventCache$1(e,t+"_once",o,r=function(){for(var a=arguments.length,s=Array(a),u=0;u<a;u++)s[u]=arguments[u];o.apply(this,s),removeEvent(e,t,r,n,i)})}e.addEventListener(t,r,i)}function addDelegate(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];void 0!==i&&!isBoolean(i)&&supportsPassive&&(i={passive:!0});var o=function(r){var i=findParents(r.target||r.srcElement,e,!0),o=query(t,e,!0),a=void 0;o.find?a=o.find(function(e){return i.find(function(t){return e===t})}):o.forEach(function(e){return!a&&i.forEach(function(t){a||e!==t||(a=t)})}),a&&n.apply(a,arguments)};addEventCache$1(e,r+"_delegate_"+t,n,o),e.addEventListener(r,o,i)}function removeDelegate(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];void 0!==i&&!isBoolean(i)&&supportsPassive&&(i={passive:!0});var o=removeEventCache$1(e,r+"_delegate_"+t,n);o&&e.removeEventListener(r,o,i)}function getStyle(e,t){return(e.currentStyle||document.defaultView.getComputedStyle(e,null))[t]||e.style[t]}function setStyle(e,t,r){if(isObject$1(t))for(var n in t)setStyle(e,n,t[n]);else e.style[t]=r}function query(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,r=arguments[2],n=t.querySelectorAll(e);return r?_Array$from(n):n}function removeEl(e){e.parentNode.removeChild(e)}function findParents(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments[2],n=arguments[3],i=[];for(r&&i.push(e);e&&e.parentNode!==t;)(e=e.parentNode)&&i.push(e);return n&&i.push(t),i}function $(e,t){return e.constructor===NodeWrap?e:new NodeWrap(e,t)}function isDescriptor(e){if(!e||!e.hasOwnProperty)return!1;for(var t=["value","initializer","get","set"],r=0,n=t.length;r<n;r++)if(e.hasOwnProperty(t[r]))return!0;return!1}function isAccessorDescriptor(e){return!!e&&(isFunction(e.get)||isFunction(e.set))&&isBoolean(e.configurable)&&isBoolean(e.enumerable)&&void 0===e.writable}function isDataDescriptor(e){return!!e&&e.hasOwnProperty("value")&&isBoolean(e.configurable)&&isBoolean(e.enumerable)&&isBoolean(e.writable)}function isInitializerDescriptor(e){return!!e&&isFunction(e.initializer)&&isBoolean(e.configurable)&&isBoolean(e.enumerable)&&isBoolean(e.writable)}function createDefaultSetter(e){return function(t){return _Object$defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t}),t}}function compressOneArgFnArray(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"You must pass me an array of function";if(!isArray$1(e)||e.length<1)throw new TypeError(t);if(1===e.length){if(!isFunction(e[0]))throw new TypeError(t);return e[0]}return e.reduce(function(e,r){if(!isFunction(r)||!isFunction(e))throw new TypeError(t);return function(t){return bind(r,this)(bind(e,this)(t))}})}function getOwnKeysFn(){var e=_Object$getOwnPropertyNames,t=_Object$getOwnPropertySymbols;return isFunction(t)?function(r){return _Array$from(e(r).concat(t(r)))}:e}function getOwnPropertyDescriptorsFn(){return isFunction(_Object$getOwnPropertyDescriptors)?_Object$getOwnPropertyDescriptors:function(e){return getOwnKeys(e).reduce(function(t,r){return t[r]=getOwnPropertyDescriptor$3(e,r),t},{})}}function compressMultipleDecorators(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(!t.length)throw new TypeError("You must pass in decorators in compressMultipleDecorators");return t.forEach(function(e){if(!isFunction(e))throw new TypeError('Decorators must be a function, but not "'+e+'" in '+(void 0===e?"undefined":_typeof(e)))}),1===t.length?t[0]:function(e,r,n){return t.reduce(function(t,n){return n(e,r,t)},n)}}function accessor(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.get,r=e.set,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.preGet,o=void 0!==i&&i,a=n.preSet,s=void 0===a||a;if(!(isFunction(t)||isFunction(r)||isArray$1(t)&&t.length>0||isArray$1(r)&&r.length>0))throw new TypeError("@accessor need a getter or setter. If you don't need to add setter/getter. You should remove @accessor");var u="@accessor only accept function or array of function as getter/setter";return t=isArray$1(t)?compressOneArgFnArray(t,u):t,r=isArray$1(r)?compressOneArgFnArray(r,u):r,function(e,n,i){var a=i||{},u=a.configurable,c=void 0===u||u,l=a.enumerable,d=void 0===l||l,f=isFunction(t),h=isFunction(r),p=function(e){return f?bind(t,this)(e):e},m=function(e){return h?bind(r,this)(e):e};if(isAccessorDescriptor(i)){var v=i.get,y=i.set,g=isFunction(v),_=isFunction(y);return{get:g||f?function(){var e=this,t=bind(p,this),r=function(){return g?bind(v,e)():void 0};return(o?[t,r]:[r,t]).reduce(function(e,t){return t(e)},void 0)}:void 0,set:_||h?function(e){var t=this,r=bind(m,this),n=function(e){return _?bind(y,t)(e):e};return(s?[r,n]:[n,r]).reduce(function(e,t){return t(e)},e)}:void 0,configurable:c,enumerable:d}}if(isInitializerDescriptor(i)){var b=i.initializer,w=void 0,E=!1;return{get:function(){var e=bind(p,this);return E?e(w):(w=bind(b,this)(),E=!0,e(w))},set:function(e){var t=bind(m,this);return w=s?t(e):e,E=!0,s||t(w),w},configurable:c,enumerable:d}}var S=(i||{}).value;return{get:function(){return bind(p,this)(S)},set:function(e){var t=bind(m,this);return S=s?t(e):e,s||t(S),S},configurable:c,enumerable:d}}}function before(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(0===t.length)throw new Error("@before accept at least one parameter. If you don't need to preprocess before your function, do not add @before decorators");if(t.length>2&&isDescriptor(t[2]))throw new Error("You may use @before straightly, @before return decorators, you should call it before you set it as decorator.");for(var n=t.length-1;n>-1;n--)if(!isFunction(t[n]))throw new TypeError("@before only accept function parameter");return function(e,r,n){var i=n||{},o=i.value,a=i.configurable,s=i.enumerable,u=i.writable;if(!isFunction(o))throw new TypeError('@before can only be used on function, please check the property "'+r+'" is a method or not.');return{value:function(){for(var e=this,r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];var a=t.reduce(function(t,r){var n=bind(r,e).apply(void 0,_toConsumableArray(t));return void 0===n?t:isArray$1(n)?n:[n]},n);return bind(o,this).apply(void 0,_toConsumableArray(a))},configurable:a,enumerable:s,writable:u}}}function initialize(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(0===t.length)throw new Error("@initialize accept at least one parameter. If you don't need to initialize your value, do not add @initialize.");if(t.length>2&&isDescriptor(t[2]))throw new Error("You may use @initialize straightly, @initialize return decorators, you need to call it");var n=compressOneArgFnArray(t,"@initialize only accept function parameter");return function(e,t,r){if(void 0===r)return{value:bind(n,e)(),configurable:!0,writable:!0,enumerable:!0};if(isAccessorDescriptor(r)){var i=!1;return accessor({get:function(e){return i?e:bind(n,this)(e)},set:r.set?function(e){return i=!0,e}:void 0})(e,t,r)}if(isInitializerDescriptor(r)){var o=r.initializer;return{initializer:function(){return bind(n,this)(bind(o,this)())},configurable:r.configurable,writable:r.writable,enumerable:r.enumerable}}return{value:bind(n,this)(r.value),writable:r.writable,configurable:r.configurable,enumerable:r.enumerable}}}function setAlias(e,t,r,n,i,o){var a=r.configurable,s=r.enumerable,u=o.force,c=o.omit,l=getOwnPropertyDescriptor$1$1(n,i);if(void 0!==l){if(c)return;if(!u)throw new Error('"'+t+'" is an existing property, if you want to override it, please set "force" true in @alias option.');if(!l.configurable)throw new Error('property "'+t+'" is unconfigurable.')}defineProperty$4(n,i,{get:function(){return e[t]},set:function(r){return e[t]=r,t},configurable:a,enumerable:s})}function alias(e,t,r){if(2===arguments.length?isString(e)&&(r=t,t=e,e=void 0):1===arguments.length&&(t=e,e=void 0),!isString(t))throw new TypeError("@alias need a string as a key to find the porperty to set alias on");var n="If you want to use @alias to set alias on other instance, you must pass in a legal instance";if(void 0!==e&&isPrimitive(e))throw new TypeError(n);var i=isObject$1(r)?r:{force:!1,omit:!1},o=i.force,a=i.omit;return function(r,i,s){function u(e,t,r){var i=isPrimitive(e)?t:e,o=r.split("."),a=o.slice(-1),s=_slicedToArray(a,1)[0];if(i=getDeepProperty(i,o.slice(0,-1),{throwError:!0}),isPrimitive(i))throw new TypeError(n);return{target:i,name:s}}if(s=s||{value:void 0,configurable:!0,writable:!0,enumerable:!0},isInitializerDescriptor(s))return initialize(function(r){var n=u(e,this,t),c=n.target,l=n.name;return setAlias(this,i,s,c,l,{force:o,omit:a}),r})(r,i,s);if(isAccessorDescriptor(s)){var c=void 0,l=function(r){if(c)return r;var n=u(e,this,t),l=n.target,d=n.name;return setAlias(this,i,s,l,d,{force:o,omit:a}),c=!0,r};return accessor({get:l,set:l})(r,i,s)}var d=u(e,r,t),f=d.target,h=d.name;return setAlias(r,i,s,f,h,{force:o,omit:a}),s}}function classify(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.requirement,n=t.customArgs,i=void 0!==n&&n;return function(){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=a.exclude,u=void 0===s?[]:s,c=a.include,l=void 0===c?[]:c,d=a.construct,f=void 0!==d&&d,h=a.self,p=void 0!==h&&h;if(!isArray$1(u))throw new TypeError("options.exclude must be an array");if(!isArray$1(l))throw new TypeError("options.include must be an array");return function(t){var o=isFunction(t);if(!p&&!o)throw new TypeError("@"+e.name+"Class can only be used on class");if(p&&isPrimitive(t))throw new TypeError("@"+e.name+"Class must be used on non-primitive type value in 'self' mode");var a=p?t:t.prototype;if(isVoid(a))throw new Error("The prototype of the "+t.name+" is empty, please check it");var s=getOwnPropertyDescriptors(a);getOwnKeys(a).concat(l).forEach(function(t){var c=s[t];"constructor"===t&&!f||p&&o&&["name","length","prototype"].indexOf(t)>-1||u.indexOf(t)>-1||isFunction(r)&&!1===r(a,t,c,{self:p})||defineProperty$1$1(a,t,(i?e.apply(void 0,_toConsumableArray(n)):e)(a,t,c))})}}}function getBoundSuper(e,t){if(void 0===_WeakMap)throw new Error("Using @autobind on "+t.name+"() requires WeakMap support due to its use of super."+t.name+"()");mapStore||(mapStore=new _WeakMap),!1===mapStore.has(e)&&mapStore.set(e,new _WeakMap);var r=mapStore.get(e);return!1===r.has(t)&&r.set(t,bind(t,e)),r.get(t)}function autobind(e,t,r){if(1===arguments.length)return autobindClass()(e);var n=r||{},i=n.value,o=n.configurable;if(!isFunction(i))throw new TypeError('@autobind can only be used on functions, not "'+i+'" in '+(void 0===i?"undefined":_typeof(i))+' on property "'+t+'"');var a=e.constructor;return{configurable:o,enumerable:!1,get:function(){var r=this,n=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.call.apply(i,[r].concat(_toConsumableArray(t)))};return this===e?i:this.constructor!==a&&_Object$getPrototypeOf(this).constructor===a?i:this.constructor!==a&&t in this.constructor.prototype?getBoundSuper(this,i):(_Object$defineProperty(this,t,{configurable:!0,writable:!0,enumerable:!1,value:n}),n)},set:createDefaultSetter(t)}}function frozen(e,t,r){if(void 0===r)return{value:void 0,writable:!1,enumerable:!1,configurable:!1};if(r.enumerable=!1,r.configurable=!1,isAccessorDescriptor(r)){var n=r.get;if(r.set=void 0,!isFunction(n))return;return{get:function(){var e=bind(n,this)();return defineProperty$2$1(this,t,{value:e,writable:!1,configurable:!1,enumerable:!1}),e},set:void 0,configurable:!1,enumerable:!1}}return r.writable=!1,r}function waituntil(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).other;if(!isFunction(e)&&!isPromise(e)&&!isString(e))throw new TypeError("@waitUntil only accept Function, Promise or String");return function(r,n,i){var o=i||{},a=o.value,s=o.configurable;if(!isFunction(a))throw new TypeError("@waituntil can only be used on function, but not "+a+' on property "'+n+'"');var u=!1,c=[],l=isPromise(e)?function(){return e}:isFunction(e)?e:function(){var r=e.split("."),n=r.slice(-1),i=isPrimitive(t)?this:t;if(!u){var o=getDeepProperty(i,r.slice(0,-1));if(isVoid(o))return o;var a=getOwnPropertyDescriptor$2$1(o,n),s=function(e){if(!0===e)for(;c.length>0;)c[0](),c.shift();return e},l=isDescriptor(a)?accessor({set:s})(o,n,a):accessor({set:s})(o,n,{value:void 0,configurable:!0,enumerable:!0,writable:!0});defineProperty$3$1(o,n,l),u=!0}return getDeepProperty(i,r)};return{value:function(){for(var e=this,t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=bind(a,this),o=bind(l,this).apply(void 0,r);return isPromise(o)?_Promise.resolve(o).then(function(){return bind(a,e).apply(void 0,r)}):!0===o?bind(a,this).apply(void 0,r):new _Promise(function(e){c.push(function(){i.apply(void 0,r),e()})})},enumerable:!1,configurable:s,writable:!1}}}function nonenumerable(e,t,r){return void 0===r?{value:void 0,enumerable:!1,configurable:!0,writable:!0}:(r.enumerable=!1,r)}function applyDecorators(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.self,i=void 0!==n&&n,o=r.omit,a=void 0!==o&&o,s=isFunction(t);if(s||isArray$1(t)){if(!isFunction(e))throw new TypeError("If you want to decorator class, you must pass it a legal class");if(s)t(e);else for(var u=0,c=t.length;u<c;u++){var l=t[u];if(!isFunction(l))throw new TypeError("If you want to decorate an class, you must pass it function or array of function");l(e)}return e}if(!i&&!isFunction(e))throw new TypeError("applyDecorators only accept class as first arguments. If you want to modify instance, you should set options.self true.");if(i&&isPrimitive(e))throw new TypeError("We can't apply docorators on a primitive value, even in self mode");if(!isObject$1(t))throw new TypeError("applyDecorators only accept object as second arguments");var d=i?e:e.prototype;if(isVoid(d))throw new Error("The class muse have a prototype, please take a check");for(var f in t){var h=t[f],p=isArray$1(h)?h:[h],m=void 0;try{m=compressMultipleDecorators.apply(void 0,_toConsumableArray(p))}catch(e){throw new Error("The decorators set on props must be Function or Array of Function")}var v=getOwnPropertyDescriptor$3$1(d,f);if(!v||v.configurable)defineProperty$6(d,f,m(d,f,v));else if(!a)throw new Error(f+" of "+d+" is unconfigurable")}return e}function deepProxy(e,t,r){var n,i=r.diff,o=r.operationPrefix,a={},s=!1,u=new Proxy(e,{get:function(e,r,n){var u=e[r];if(isArray$1(e)&&arrayChangeMethod.indexOf(r)>-1)return function(){s=!0,bind(u,n).apply(void 0,arguments),s=!1,t()};if(!0===a[r])return u;if(isObject$1(u)||isArray$1(u)){var c=a[r]||deepProxy(u,t,{diff:i,operationPrefix:o});return a[r]=c,c}return a[r]=!0,u},set:function(e,r,n){var u=e[r],c=isObject$1(n)||isArray$1(n)?deepProxy(n,t,{diff:i,operationPrefix:o}):n;return e[r]=c,a[r]=!0,!!(s||i&&u===c)||(t(),!0)},deleteProperty:function(e,r){return delete e[r],delete a[r],!!s||(t(),!0)}}),c=(n={},_defineProperty$1(n,o+"set",[initialize(function(e){return function(e,t){u[e]=t}}),nonenumerable]),_defineProperty$1(n,o+"del",[initialize(function(e){return function(e){delete u[e]}}),nonenumerable]),n);return applyDecorators(u,c,{self:!0}),u}function deepObserve(e,t,r){function n(e){var r=void 0;return e.reduce(function(e,n){return e[n]=[accessor({set:function(e){return r=this[n],e}}),accessor({get:function(e){return u[n]?e:((isObject$1(e)||isArray$1(e))&&deepObserve(e,t,{operationPrefix:a,diff:s}),u[n]=!0,e)},set:function(e){return(isObject$1(e)||isArray$1(e))&&deepObserve(e,t,{operationPrefix:a,diff:s}),u[n]=!0,c||s&&r===e||t(),e}},{preSet:!1})],e},{})}var i,o=this,a=r.operationPrefix,s=r.diff,u={},c=!1,l=n(getOwnKeys(e));if(applyDecorators(e,l,{self:!0,omit:!0}),isArray$1(e)){var d=arrayChangeMethod.reduce(function(r,i){return r[i]=[initialize(function(r){return r=isFunction(r)?r:Array.prototype[i],function(){var i=e.length;if(c=!0,bind(r,e).apply(void 0,arguments),c=!1,i<e.length){var o=n(new Array(e.length-i).fill(1).map(function(e,t){return(t+i).toString()}));applyDecorators(e,o,{self:!0,omit:!0})}t()}}),nonenumerable],r},{});applyDecorators(e,d,{self:!0})}var f=(i={},_defineProperty$1(i,a+"set",[initialize(function(t){return function(r,i){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=a.disable,u=a.isNewVal;if(u=u||-1===getOwnKeys(e).indexOf(r),isFunction(t)&&bind(t,o)(r,i,{disable:!0,isNewVal:u}),u){var c=n([r]);applyDecorators(e,c,{self:!0,omit:!0})}s||(e[r]=i)}}),nonenumerable]),_defineProperty$1(i,a+"del",[initialize(function(r){return function(n){isFunction(r)?bind(r,o)(n):delete e[n],t()}}),nonenumerable]),i);return applyDecorators(e,f,{self:!0}),e}function watch(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=isObject$1(t[t.length-1])?t[t.length-1]:{},i=n.deep,o=n.omit,a=n.other,s=n.operationPrefix,u=void 0===s?"__":s,c=n.diff,l=void 0===c||c,d=n.proxy;if("function"!=typeof Proxy&&(d=!1),!t.length)throw new TypeError("You must pass a function or a string to find the hanlder function.");if(void 0!==a&&isPrimitive(a))throw new TypeError("If you want us to trigger function on the other instance, you must pass in a legal instance");if(!isString(u))throw new TypeError("operationPrefix must be an string");return function(e,r,n){var s=t.reduce(function(r,n,i){if(!isString(n)&&!isFunction(n)){if(!i||i!==t.length-1)throw new TypeError("You can only pass function or string as handler");return r}return r.push(isString(n)?function(t,r){var i=getDeepProperty(a||e,n);if(isFunction(i))return bind(i,this)(t,r);if(!o)throw new Error("You pass in a function for us to trigger, please ensure the property to be a function or set omit flag true")}:n),r},[]),c=function(e,t){var r=this;s.forEach(function(n){return bind(n,r)(e,t)})},f=!1,h=void 0,p=void 0,m=void 0;return compressMultipleDecorators(accessor({set:function(e){var t=this;h=this[r],m=void 0;var n=function(){return bind(c,t)(p,h)};return i&&(isObject$1(e)||isArray$1(e))?d?deepProxy(e,n,{diff:l,operationPrefix:u}):deepObserve(e,n,{operationPrefix:u,diff:l}):e},get:function(e){var t=this;if(m)return m;if(!f){f=!0;var r=function(){return bind(c,t)(p,h)};if(i&&(isObject$1(e)||isArray$1(e))){if(d)return m=deepProxy(e,r,{diff:l,operationPrefix:u}),h=m,p=m,m;deepObserve(e,r,{operationPrefix:u,diff:l})}h=e,p=e}return e}},{preSet:!0}),accessor({set:function(e){return p=e,l&&h===e||bind(c,this)(p,h),h=e,e}},{preSet:!1}))(e,r,n)}}function runnable(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.other,n=t.backup;if(!isFunction(e)&&!isString(e))throw new TypeError("@runnable only accept Function or String");return function(t,i,o){var a=o||{},s=a.value,u=a.configurable;if(!isFunction(s))throw new TypeError("@runnable can only be used on method, but not "+s+' on property "'+i+'".');var c=isFunction(e)?e:function(){var t=e.split(".");return getDeepProperty(isPrimitive(r)?this:r,t)};return n=isFunction(n)?n:function(){},{value:function(){return!0===bind(c,this).apply(void 0,arguments)?bind(s,this).apply(void 0,arguments):bind(n,this).apply(void 0,arguments)},enumerable:!1,configurable:u,writable:!1}}}function nonconfigurable(e,t,r){return void 0===r?{value:void 0,enumerable:!0,configurable:!0,writable:!0}:(r.configurable=!0,r)}function string(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=isString(t[0])?t.shift():"";return t.unshift(function(e){return isString(e)?e:n}),initialize.apply(void 0,t)}function boolean(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=!!isBoolean(t[0])&&t.shift();return t.unshift(function(e){return isBoolean(e)?e:n}),initialize.apply(void 0,t)}function string$1(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=isString(t[0])?t.shift():"";return t.unshift(function(e){return isString(e)?e:n}),accessor({set:t,get:t})}function boolean$1(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=!!isBoolean(t[0])&&t.shift();return t.unshift(function(e){return isBoolean(e)?e:n}),accessor({set:t,get:t})}function number$1(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=isNumber(t[0])?t.shift():0;return t.unshift(function(e){return isNumber(e)?e:n}),accessor({set:t,get:t})}function setStyle$1(e,t,r){if(isObject$1(t))for(var n in t)setStyle$1(e,n,t[n]);else e.style[t]=r}function native(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(isObject$1(t)&&(r=t),isString(e)&&(t=e),isElement(e)||(e=document),!isString(t))throw new Error("You must pass in a string as name, but not "+(void 0===t?"undefined":_typeof(t))+".");for(var n=r.keyOnly,i=void 0!==n&&n,o=0;o<SYNONYMS.length;o++){t=t.replace(SYNONYMS[o][0],SYNONYMS[o][1]);for(var a=0;a<VENDOR_PREFIXES.length;a++){var s=0===a?t:VENDOR_PREFIXES[a]+t.charAt(0).toUpperCase()+t.substr(1);if(void 0!==e[s])return i?s:e[s]}}return i?"":void 0}function dispatchEvent(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.bubbles,i=void 0===n||n,o=r.cancelable,a=void 0===o||o,s=void 0;if(isFunction(Event)?s=new Event(t,{bubbles:i,cancelable:a}):document.createEvent?(s=document.createEvent("HTMLEvents")).initEvent(t,!0,!0):document.createEventObject&&((s=document.createEventObject()).eventType=t,s.eventName=t),!isObject$1(s)&&!isEvent(s))throw new Error("We can't create an object on this browser, please report to author");e.dispatchEvent?e.dispatchEvent(s):e.fireEvent?e.fireEvent("on"+s.eventType,s):e[t]?e[t]():e["on"+t]&&e["on"+t]()}function _applyDecoratedDescriptor$1$1(e,t,r,n,i){var o={};return Object.keys(n).forEach(function(e){o[e]=n[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(r,n){return n(e,t,r)||r},o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(e,t,o),o=null),o}function _applyDecoratedDescriptor$2(e,t,r,n,i){var o={};return Object.keys(n).forEach(function(e){o[e]=n[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(r,n){return n(e,t,r)||r},o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(e,t,o),o=null),o}function secondaryChecker(e){return!e.match(secondaryReg)}function eventBinderCheck(e,t){if(!isString(e))throw new TypeError("key parameter must be String");if(!isFunction(t))throw new TypeError("fn parameter must be Function")}function attrAndStyleCheck(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length>2?["set"].concat(t):2===t.length?["video","container","wrapper","videoElement"].indexOf(t[0])>-1?["get"].concat(t):["set","container"].concat(t):["get","container"].concat(t)}function _initDefineProp$1(e,t,r,n){r&&_Object$defineProperty(e,t,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function _applyDecoratedDescriptor$4(e,t,r,n,i){var o={};return Object.keys(n).forEach(function(e){o[e]=n[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(r,n){return n(e,t,r)||r},o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(e,t,o),o=null),o}function stringOrVoid(e){return isString(e)?e:void 0}function accessorVideoProperty(e){return accessor({get:function(t){return this.dispatcher.videoConfigReady&&this.inited?this.dom.videoElement[e]:t},set:function(t){return this.dispatcher.videoConfigReady?(this.dom.videoElement[e]=t,t):t}})}function accessorVideoAttribute(e){var t=isObject$1(e)?e:{set:e,get:e,isBoolean:!1},r=t.set,n=t.get,i=t.isBoolean;return accessor({get:function(e){return this.dispatcher.videoConfigReady&&this.inited?this.dom.videoElement[n]:e},set:function(e){if(!this.dispatcher.videoConfigReady)return e;var t=i?e?"":void 0:null===e?void 0:e;return this.dom.setAttr("video",r,t),e}})}function accessorCustomAttribute(e,t){return accessor({get:function(r){var n=this.dom.getAttr("video",e);return this.dispatcher.videoConfigReady&&this.inited?t?!!n:n:r},set:function(r){if(!this.dispatcher.videoConfigReady)return r;var n=t?r||void 0:null===r?void 0:r;return this.dom.setAttr("video",e,n),r}})}function accessorWidthAndHeight(e){return accessor({get:function(t){if(!this.dispatcher.videoConfigReady||!this.inited)return t;var r=this.dom.getAttr("video",e),n=this.dom.videoElement[e];return isNumeric(r)&&isNumber(n)?n:r||void 0},set:function(t){if(!this.dispatcher.videoConfigReady)return t;var r=void 0;return void 0===t||isNumber(t)?r=t:isString(t)&&!_Number$isNaN(parseFloat(t))&&(r=t),this.dom.setAttr("video",e,r),r}})}function _applyDecoratedDescriptor$3(e,t,r,n,i){var o={};return Object.keys(n).forEach(function(e){o[e]=n[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(r,n){return n(e,t,r)||r},o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(e,t,o),o=null),o}function _applyDecoratedDescriptor$5(e,t,r,n,i){var o={};return Object.keys(n).forEach(function(e){o[e]=n[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(r,n){return n(e,t,r)||r},o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(e,t,o),o=null),o}function targetCheck(e){if("video"===e&&(e="videoElement"),!isElement(this[e]))throw new TypeError('Your target "'+e+'" is not a legal HTMLElement');for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return[e].concat(r)}function attrOperationCheck(e,t,r){if(!isString(t))throw new TypeError("to handle dom's attribute or style, your attr parameter must be string, but not "+t+" in "+(void 0===t?"undefined":_typeof(t)));if(!isString(e))throw new TypeError("to handle dom's attribute or style, your target parameter must be string, , but not "+e+" in "+(void 0===e?"undefined":_typeof(e)));return[e,t,r]}function _applyDecoratedDescriptor$1(e,t,r,n,i){var o={};return Object.keys(n).forEach(function(e){o[e]=n[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(r,n){return n(e,t,r)||r},o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(e,t,o),o=null),o}function convertNameIntoId(e){if(!isString(e))throw new Error("Plugin's name must be a string, but not \""+e+'" in '+(void 0===e?"undefined":_typeof(e)));return camelize(e)}function checkPluginConfig(e){if(isFunction(e)){if(!(e.prototype instanceof Plugin))throw new TypeError("Your are trying to install plugin "+e.name+", but it's not extends from Chimee.plugin.")}else{if(!isObject$1(e)||isEmpty(e))throw new TypeError("plugin's config must be an Object, but not \""+e+'" in '+(void 0===e?"undefined":_typeof(e)));var t=e.name;if(!isString(t)||t.length<1)throw new TypeError('plugin must have a legal namea, but not "'+t+'" in '+(void 0===t?"undefined":_typeof(t)))}}function _initDefineProp$2(e,t,r,n){r&&_Object$defineProperty(e,t,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function _applyDecoratedDescriptor$6(e,t,r,n,i){var o={};return Object.keys(n).forEach(function(e){o[e]=n[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(r,n){return n(e,t,r)||r},o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(e,t,o),o=null),o}function _initDefineProp(e,t,r,n){r&&_Object$defineProperty(e,t,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function _applyDecoratedDescriptor(e,t,r,n,i){var o={};return Object.keys(n).forEach(function(e){o[e]=n[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(r,n){return n(e,t,r)||r},o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(e,t,o),o=null),o}function __$styleInject$1(e,t){if("undefined"==typeof document)return t;e=e||"";var r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");return n.type="text/css",r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)),t}function unwrapExports$1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function createCommonjsModule$1(e,t){return t={exports:{}},e(t,t.exports),t.exports}function bind$1(e,t){return e.bind?e.bind(t):e.apply?function(){for(var r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];return e.apply(t,n)}:function(){for(var r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];return e.call.apply(e,[t].concat(_toConsumableArray$1(n)))}}function _applyDecoratedDescriptor$2$1(e,t,r,n,i){var o={};return Object.keys(n).forEach(function(e){o[e]=n[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(r,n){return n(e,t,r)||r},o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(e,t,o),o=null),o}function _applyDecoratedDescriptor$1$2(e,t,r,n,i){var o={};return Object.keys(n).forEach(function(e){o[e]=n[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(r,n){return n(e,t,r)||r},o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(e,t,o),o=null),o}function _applyDecoratedDescriptor$2$2(e,t,r,n,i){var o={};return Object.keys(n).forEach(function(e){o[e]=n[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(r,n){return n(e,t,r)||r},o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(e,t,o),o=null),o}function hundleChildren(e){return e.$config.children?e.$config.children:e.isLive?{play:!0,progressTime:!1,progressBar:!1,volume:!0,screen:!0}:{play:!0,progressTime:!0,progressBar:!0,volume:!0,screen:!0}}function createChild(e){var t=e.config.children=hundleChildren(e),r={};return t?_Object$keys$1(t).forEach(function(n){switch(n){case"play":t.play&&(r.play=new Play(e,t.play));break;case"progressTime":t.progressTime&&(r.progressTime=new ProgressTime(e,t.progressTime));break;case"progressBar":r.progressBar=new ProgressBar(e,t.progressBar);break;case"volume":t.volume&&(r.volume=new Volume(e,t.volume));break;case"screen":t.screen&&(r.screen=new Screen(e,t.screen));break;case"clarity":t.clarity&&Array.isArray(t.clarity.list)&&(r.clarity=new Clarity(e,t.clarity));break;default:r[n]=new Component(e,t[n])}}):(r.play=new Play(e),r.progressTime=new ProgressTime(e),r.progressBar=new ProgressBar(e),r.volume=new Volume(e),r.screen=new Screen(e)),r}function __$styleInject$2(e,t){if("undefined"==typeof document)return t;e=e||"";var r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");return n.type="text/css",r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)),t}function popupFactory(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.tagName,r=void 0===t?"chimee-popup":t,n=e.className,i=e.name,o=void 0===i?"popup":i,a=e.html,s=e.title,u=void 0===s?"这是一个信息框":s,c=e.body,l=void 0===c?"这里是信息内容":c,d=e.offsetAttr,f=void 0===d?"left top":d,h=e.offset,p=void 0===h?"50% 50%":h,m=e.translate,v=void 0===m?"":m,y=e.width,g=e.height,_=e.level,b=e.init,w=e.inited,E=e.data,S=e.create,O=e.beforeCreate,T=e.destroy,k=e.events,A=e.computed,D=e.methods,M=void 0===D?{}:D,x=e.penetrate,I=void 0!==x&&x,C=e.operable,R=void 0===C||C,P=e.hide,L=void 0!==P&&P,N=e.opened,j=e.closed,F=e.autoFocus,B={html:a||"\n <cm-pp-close>×</cm-pp-close>\n "+(!1!==u?"<cm-pp-head>"+u+"</cm-pp-head>":"")+"\n "+(!1!==l?"<cm-pp-body>"+l+"</cm-pp-body>":"")+"\n ",closeSelector:"._close"};return{name:o,el:r,className:n,beforeCreate:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.events,r=e.methods,n=arguments[1];isObject$1(n)&&(isObject$1(n.events)&&deepAssign(t,n.events),isObject$1(n.methods)&&deepAssign(r,n.methods)),O&&O.apply(this,arguments)},create:function(){var e=isObject$1(this.$config)?deepAssign(B,this.$config):B;(this.$domWrap=$(this.$dom).css("display","none")).html(e.html).delegate("cm-pp-close, "+e.closeSelector,"click",this.close),this.width(y).height(g).offset(p).translate(v),this._hide=L;for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];S&&S.apply(this,r),!this._hide&&this.open()},destroy:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];T&&T.apply(this,t),this.$domWrap.undelegate(this.$config.closeSelector,"click",this.close).remove()},level:_,init:b,inited:w,data:E,events:k,computed:A,penetrate:I,operable:R,autoFocus:F,methods:deepAssign({open:function(){if(this.destroyed)return this;this.$domWrap.css("display","block"),this._hide=!1;for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.$emit("popupOpen",t,this),isFunction(N)&&N.apply(this,t),this},close:function(){if(this.destroyed)return this;this.$domWrap.css("display","none"),this._hide=!0;for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.$emit("popupClose",t,this),isFunction(j)&&j.apply(this,t),this},width:function(e){return e&&this.$domWrap.css("width",e),this},height:function(e){return e&&this.$domWrap.css("height",e),this},offset:function(e){var t=(""+(e||"")).split(" "),r={};if(t.length>2)return["top","right","bottom","left"].forEach(function(e,n){t[n]&&(r[e]=t[n])}),this.$domWrap.css(r),this;var n=_slicedToArray(t,2),i=n[0],o=n[1];if(""===i)return this;var a=o||i,s=f.split(" ");r[s[0]]=i,r[s[1]]=a,this.$domWrap.css(r);var u=[];return"50%"===i&&u.push("-50%"),"50%"===a&&u.push("-50%"),u.length>0&&this.translate(u.join(" ")),this},translate:function(e){var t=(""+(e||"")).split(" "),r=_slicedToArray(t,2),n=r[0],i=r[1];return""!==n&&(this.$domWrap.css("transform","translate("+n+", "+(i||n)+")"),"transform"in document.createElement("a").style||!window.console||!window.console.warn||console.warn("[chimee-plugin-popup] 当前环境不支持CSS3的transform特性,Dom元素无法正常使用translate。")),this}},M)}}function __$styleInject$3(e,t){if("undefined"==typeof document)return t;e=e||"";var r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");return n.type="text/css",r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)),t}function __$styleInject$4(e,t){if("undefined"==typeof document)return t;e=e||"";var r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");return n.type="text/css",r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)),t}function __$styleInject$5(e,t){if("undefined"==typeof document)return t;e=e||"";var r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");return n.type="text/css",r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)),t}var commonjsGlobal="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},_defined=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e},_toObject=function(e){return Object(_defined(e))},hasOwnProperty={}.hasOwnProperty,_has=function(e,t){return hasOwnProperty.call(e,t)},_global=createCommonjsModule(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)}),SHARED="__core-js_shared__",store=_global[SHARED]||(_global[SHARED]={}),_shared=function(e){return store[e]||(store[e]={})},id=0,px=Math.random(),_uid=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++id+px).toString(36))},shared=_shared("keys"),_sharedKey=function(e){return shared[e]||(shared[e]=_uid(e))},IE_PROTO=_sharedKey("IE_PROTO"),ObjectProto=Object.prototype,_objectGpo=Object.getPrototypeOf||function(e){return e=_toObject(e),_has(e,IE_PROTO)?e[IE_PROTO]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?ObjectProto:null},_core=createCommonjsModule(function(e){var t=e.exports={version:"2.5.1"};"number"==typeof __e&&(__e=t)}),_core_1=_core.version,_aFunction=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e},_ctx=function(e,t,r){if(_aFunction(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}},_isObject=function(e){return"object"==typeof e?null!==e:"function"==typeof e},_anObject=function(e){if(!_isObject(e))throw TypeError(e+" is not an object!");return e},_fails=function(e){try{return!!e()}catch(e){return!0}},_descriptors=!_fails(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),document$1=_global.document,is=_isObject(document$1)&&_isObject(document$1.createElement),_domCreate=function(e){return is?document$1.createElement(e):{}},_ie8DomDefine=!_descriptors&&!_fails(function(){return 7!=Object.defineProperty(_domCreate("div"),"a",{get:function(){return 7}}).a}),_toPrimitive=function(e,t){if(!_isObject(e))return e;var r,n;if(t&&"function"==typeof(r=e.toString)&&!_isObject(n=r.call(e)))return n;if("function"==typeof(r=e.valueOf)&&!_isObject(n=r.call(e)))return n;if(!t&&"function"==typeof(r=e.toString)&&!_isObject(n=r.call(e)))return n;throw TypeError("Can't convert object to primitive value")},dP=Object.defineProperty,f=_descriptors?Object.defineProperty:function(e,t,r){if(_anObject(e),t=_toPrimitive(t,!0),_anObject(r),_ie8DomDefine)try{return dP(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e},_objectDp={f:f},_propertyDesc=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},_hide=_descriptors?function(e,t,r){return _objectDp.f(e,t,_propertyDesc(1,r))}:function(e,t,r){return e[t]=r,e},PROTOTYPE="prototype",$export=function(e,t,r){var n,i,o,a=e&$export.F,s=e&$export.G,u=e&$export.S,c=e&$export.P,l=e&$export.B,d=e&$export.W,f=s?_core:_core[t]||(_co