-
-
Notifications
You must be signed in to change notification settings - Fork 200
/
index.min.js
1 lines (1 loc) · 107 KB
/
index.min.js
1
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Chimee=t()}(this,function(){"use strict";function e(e){return e&&e.__esModule?e.default:e}function t(e,t){return t={exports:{}},e(t,t.exports),t.exports}function r(e){return void 0===e||null===e}function n(e){return Array.isArray(e)}function i(e){return"function"==typeof e}function o(e){return Object(e)===e&&"[object Object]"===String(e)&&!i(e)&&!n(e)}function u(e){return"number"==typeof e}function a(e){return!n(e)&&e-Fn(e)+1>=0}function s(e){return kn(e)}function c(e){return n(e)?0===e.length:o(e)?0===bn(e).length:!e}function l(e){return"string"==typeof e||e instanceof String}function f(e){return"boolean"==typeof e}function d(e){return!!e&&("object"===(void 0===e?"undefined":gn(e))||"function"==typeof e)&&"function"==typeof e.then}function h(e){return r(e)||f(e)||l(e)||u(e)}function p(e){return!!("object"===("undefined"==typeof Node?"undefined":gn(Node))?e instanceof Node:e&&"object"===(void 0===e?"undefined":gn(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName)}function v(e){return!!("object"===("undefined"==typeof HTMLElement?"undefined":gn(HTMLElement))?e instanceof HTMLElement:e&&"object"===(void 0===e?"undefined":gn(e))&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName)}function y(e,t){if(!p(e)||!p(t))return!1;for(;t.parentNode;)if((t=t.parentNode)===e)return!0;return!1}function g(e){return/<[^>]+?>/.test(e)}function m(e){return e instanceof Error}function _(e,t){if(!l(e))throw new TypeError("Log's method only acccept string as argument");return l(t)?"["+(e=$n.FORCE_GLOBAL_TAG?$n.GLOBAL_TAG:e||$n.GLOBAL_TAG)+"] > "+t:"["+$n.GLOBAL_TAG+"] > "+e}function b(e){if(h(e))throw new TypeError("deepClone only accept non primitive type");return oi(e)}function w(){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(h(t[n]))throw new TypeError("deepAssign only accept non primitive type");var i=t.shift();return t.forEach(function(e){return oi(e,i)}),i}function E(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 k(e){return E(e).replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}function O(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(ii(n)))}}function P(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i.throwError,u=void 0!==o&&o,a=i.backup;if(l(t)&&(t=t.split(".")),!n(t))throw new TypeError("keys of getDeepProperty must be string or Array<string>");for(var s=[],c=e,f=0,d=t.length;f<d;f++){var h=t[f];if(r(c)){if(u)throw new Error("obj"+(s.length>0?"."+s.join("."):" itself")+" is "+c);return a}c=c[h],s.push(h)}return c}function S(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e,t){return+e-+t};return bn(e).sort(t).reduce(function(t,r){return t.concat(e[r])},[])}function j(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 Qi(function(t,n){!function o(u){if(!(u>=e.length)){var a=i(e[u])?e[u].apply(e,ii(r)):e[u];return!1===a?n("stop"):Qi.resolve(a).then(function(){return o(u+1)}).catch(function(e){return n(e||"stop")})}t()}(0)})}function x(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){return n>=e.length||!1!==(i(e[n])?e[n].apply(e,ii(r)):e[n])&&t(++n)}(0)}function A(e,t){var r=e.__evt_id;r||(Object.defineProperty(e,"__evt_id",{writable:!0,enumerable:!1,configurable:!0}),r=e.__evt_id=++oo.count);var n=r+"_"+t,i=oo[n];return i||(i=oo[n]=[]),i}function T(e,t,r){var n=io(null);n.type=t,n.target=e,r&&eo(n,o(r)?r:{data:r}),A(e,t).forEach(function(t){(t[1]||t[0]).apply(e,[n])})}function L(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments[4];i(n)&&!o&&(o=n,n=void 0);var u=[r,void 0,n];n&&!o&&(o=function(){M(e,t,r,n);for(var i=arguments.length,o=Array(i),u=0;u<i;u++)o[u]=arguments[u];r.apply(e,o)}),o&&(u[1]=o),A(e,t).push(u)}function M(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=A(e,t);if(r||n){var o=-1,u=void 0;return i.find(function(e,t){if((!r||e[0]===r)&&(!n||e[2]))return o=t,u=e[1],!0}),-1!==o&&i.splice(o,1),u}i.length=0}function C(e,t){var r=e.__evt_id;r||(Object.defineProperty(e,"__evt_id",{writable:!0,enumerable:!1,configurable:!0}),r=e.__evt_id=++ao.count);var n=r+"_"+t,i=ao[n];return i||(i=ao[n]=[]),i}function z(e,t,r){var n=io(null);n.type=t,n.target=e,r&&eo(n,o(r)?r:{data:r}),C(e,t).forEach(function(t){(t[1]||t[0]).apply(e,[n])})}function F(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments[4];i(n)&&!o&&(o=n,n=void 0);var u=[r,void 0,n];n&&!o&&(o=function(){$(e,t,r,n);for(var i=arguments.length,o=Array(i),u=0;u<i;u++)o[u]=arguments[u];r.apply(e,o)}),o&&(u[1]=o),C(e,t).push(u)}function $(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=C(e,t);if(r||n){var o=-1,u=void 0;return i.find(function(e,t){if((!r||e[0]===r)&&(!n||e[2]))return o=t,u=e[1],!0}),-1!==o&&i.splice(o,1),u}i.length=0}function N(e){return ni(e)}function D(e,t){return e.getAttribute(t)}function I(e,t,r){void 0===r?e.removeAttribute(t):e.setAttribute(t,r)}function R(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 H(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 V(e,t){return new RegExp("(?:^|\\s)"+t+"(?=\\s|$)").test(e.className)}function B(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(n){var o=$(e,t+"_once",r);o&&(r=o)}e.removeEventListener(t,r,i)}function W(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(n){var o=r;F(e,t+"_once",o,r=function(){for(var u=arguments.length,a=Array(u),s=0;s<u;s++)a[s]=arguments[s];o.apply(this,a),B(e,t,r,n,i)})}e.addEventListener(t,r,i)}function Y(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=function(r){var i=Z(r.target||r.srcElement,e,!0),o=K(t,e,!0).find(function(e){return i.find(function(t){return e===t})});o&&n.apply(o,arguments)};F(e,r+"_delegate_"+t,n,o),e.addEventListener(r,o,i)}function G(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=$(e,r+"_delegate_"+t,n);o&&e.removeEventListener(r,o,i)}function q(e,t){return(e.currentStyle||document.defaultView.getComputedStyle(e,null))[t]||e.style[t]}function U(e,t,r){if(o(t))for(var n in t)U(e,n,t[n]);else e.style[t]=r}function K(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,r=arguments[2],n=t.querySelectorAll(e);return r?ni(n):n}function Q(e){e.parentNode.removeChild(e)}function Z(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 J(e,t){return e.constructor===fo?e:new fo(e,t)}function X(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 ee(e){return!!e&&(i(e.get)||i(e.set))&&f(e.configurable)&&f(e.enumerable)&&void 0===e.writable}function te(e){return!!e&&e.hasOwnProperty("value")&&f(e.configurable)&&f(e.enumerable)&&f(e.writable)}function re(e){return!!e&&i(e.initializer)&&f(e.configurable)&&f(e.enumerable)&&f(e.writable)}function ne(e){return function(t){return ht(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t}),t}}function ie(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"You must pass me an array of function";if(!n(e)||e.length<1)throw new TypeError(t);if(1===e.length){if(!i(e[0]))throw new TypeError(t);return e[0]}return e.reduce(function(e,r){if(!i(r)||!i(e))throw new TypeError(t);return function(t){return O(r,this)(O(e,this)(t))}})}function oe(){var e,t;if(i(console.warn))return(e=console).warn.apply(e,arguments);(t=console).log.apply(t,arguments)}function ue(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.forEach(function(e){if(!i(t[0]))throw new TypeError("compressMultipleDecorators only accept function")}),1===t.length?t[0]:function(e,r,n){return t.reduce(function(t,n){return n(e,r,t)},n)}}function ae(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.get,r=e.set,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=o.preGet,a=void 0!==u&&u,s=o.preSet,c=void 0===s||s;if(!(i(t)||i(r)||n(t)&&t.length>0||n(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 l="@accessor only accept function or array of function as getter/setter";return t=n(t)?ie(t,l):t,r=n(r)?ie(r,l):r,function(e,n,o){var u=o||{},s=u.configurable,l=void 0===s||s,f=u.enumerable,d=void 0===f||f,h=i(t),p=i(r),v=function(e){return h?O(t,this)(e):e},y=function(e){return p?O(r,this)(e):e};if(ee(o)){var g=o.get,m=o.set,_=i(g),b=i(m);return!_&&h&&oe("You are trying to set getter via @accessor on "+n+" without getter. That's not a good idea."),!b&&p&&oe("You are trying to set setter via @accessor on "+n+" without setter. That's not a good idea."),{get:_||h?function(){var e=this,t=O(v,this),r=function(){return _?O(g,e)():void 0};return(a?[t,r]:[r,t]).reduce(function(e,t){return t(e)},void 0)}:void 0,set:b||p?function(e){var t=this,r=O(y,this),n=function(e){return b?O(m,t)(e):e};return(c?[r,n]:[n,r]).reduce(function(e,t){return t(e)},e)}:void 0,configurable:l,enumerable:d}}if(re(o)){var w=o.initializer,E=void 0,k=!1;return{get:function(){var e=O(v,this);return k?e(E):(E=O(w,this)(),k=!0,e(E))},set:function(e){var t=O(y,this);return E=c?t(e):e,k=!0,c||t(E),E},configurable:l,enumerable:d}}var P=(o||{}).value;return{get:function(){return O(v,this)(P)},set:function(e){var t=O(y,this);return P=c?t(e):e,c||t(P),P},configurable:l,enumerable:d}}}function se(){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&&X(t[2]))throw new Error("You may use @before straightly, @before return decorators, you need to call it");for(var o=t.length-1;o>-1;o--)if(!i(t[o]))throw new TypeError("@before only accept function parameter");return function(e,r,o){if(void 0===o)throw new Error("@before must used on descriptor, are you using it on undefined property?");var u=o.value,a=o.configurable,s=o.enumerable,c=o.writable;if(!i(u))throw new TypeError("@before can only be used on function");return{value:function(){for(var e=this,r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=t.reduce(function(t,r){var i=O(r,e).apply(void 0,ii(t));return void 0===i?t:n(i)?i:[i]},i);return O(u,this).apply(void 0,ii(a))},configurable:a,enumerable:s,writable:c}}}function ce(){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&&X(t[2]))throw new Error("You may use @initialize straightly, @initialize return decorators, you need to call it");var n=ie(t,"@initialize only accept function parameter");return function(e,t,r){if(void 0===r)return{value:O(n,e)(),configurable:!0,writable:!0,enumerable:!0};if(ee(r)){var i=!1;return ae({get:function(e){return i?e:O(n,this)(e)},set:r.set?function(e){return i=!0,e}:void 0})(e,t,r)}if(re(r)){var o=r.initializer;return{initializer:function(){return O(n,this)(O(o,this)())},configurable:r.configurable,writable:r.writable,enumerable:r.enumerable}}return{value:O(n,this)(r.value),writable:r.writable,configurable:r.configurable,enumerable:r.enumerable}}}function le(e,t,r,n,i,o){var u=r.configurable,a=r.enumerable,s=o.force,c=o.omit,l=$a(n,i);if(void 0!==l){if(c)return;if(!s)throw new Error("@alias can't set alias on an existing attribute");if(!l.configurable)throw new Error("You are tring to set alias on an existing attribute which its configurable is false. That's impossible. Please check if you have set @frozen on it.")}Na(n,i,{get:function(){return e[t]},set:function(r){return e[t]=r,t},configurable:u,enumerable:a})}function fe(e,t,r){if(2===arguments.length?l(e)&&(r=t,t=e,e=void 0):1===arguments.length&&(t=e,e=void 0),!l(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&&h(e))throw new TypeError(n);var i=o(r)?r:{force:!1,omit:!1},u=i.force,a=i.omit;return function(r,i,o){function s(e,t,r){var i=h(e)?t:e,o=r.split("."),u=o.slice(-1),a=uu(u,1)[0];if(i=P(i,o.slice(0,-1),{throwError:!0}),h(i))throw new TypeError(n);return{target:i,name:a}}if(o=o||{value:void 0,configurable:!0,writable:!0,enumerable:!0},re(o))return ce(function(r){var n=s(e,this,t),c=n.target,l=n.name;return le(this,i,o,c,l,{force:u,omit:a}),r})(r,i,o);if(ee(o)){var c=void 0,l=function(r){if(c)return r;var n=s(e,this,t),l=n.target,f=n.name;return le(this,i,o,l,f,{force:u,omit:a}),c=!0,r};return ae({get:l,set:l})(r,i,o)}var f=s(e,r,t),d=f.target,p=f.name;return le(r,i,o,d,p,{force:u,omit:a}),o}}function de(e,t){if(void 0===ku)throw new Error("Using @autobind on "+t.name+"() requires WeakMap support due to its use of super."+t.name+"()");Ra||(Ra=new ku),!1===Ra.has(e)&&Ra.set(e,new ku);var r=Ra.get(e);return!1===r.has(t)&&r.set(t,O(t,e)),r.get(t)}function he(e,t,r){if(1===arguments.length)return Ia()(e);if(!X(r))throw new Error("@autobind must used on descriptor, are you using it on undefined property?");var n=r.value,o=r.configurable;if(!i(n))throw new TypeError("@autobind can only be used on functions, not: "+n+")");var u=e.constructor;return{configurable:o,enumerable:!1,get:function(){var r=this,i=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return n.call.apply(n,[r].concat(ii(t)))};return this===e?n:this.constructor!==u&&po(this).constructor===u?n:this.constructor!==u&&t in this.constructor.prototype?de(this,n):(ht(this,t,{configurable:!0,writable:!0,enumerable:!1,value:i}),i)},set:ne(t)}}function pe(e,t,r){if(void 0===r)return oe("You are using @frozen on an undefined property. This property will become a frozen undefined forever, which is meaningless"),{value:void 0,writable:!1,enumerable:!1,configurable:!1};if(r.enumerable=!1,r.configurable=!1,ee(r)){var n=r.get;return r.set=void 0,i(n)?{get:function(){var e=O(n,this)();return Ha(this,t,{value:e,writable:!1,configurable:!1,enumerable:!1}),e},set:void 0,configurable:!1,enumerable:!1}:void oe("You are using @frozen on one accessor descriptor without getter. This property will become a frozen undefined finally.Which maybe meaningless.")}return r.writable=!1,r}function ve(e,t,r){if(void 0===r)return oe("You are using @lock on an undefined property. This property will become a lock undefined forever, which is meaningless"),{value:void 0,writable:!1,enumerable:!0,configurable:!1};if(r.configurable=!1,ee(r)){var n=r.get;return r.set=void 0,i(n)?{get:function(){var e=O(n,this)();return Wa(this,t,{value:e,writable:!1,configurable:!1,enumerable:r.enumerable}),e},set:void 0,configurable:!1,enumerable:r.enumerable}:void oe("You are using @lock on one accessor descriptor without getter. This property will become a lock undefined finally.Which maybe meaningless.")}return r.writable=!1,r}function ye(e,t,r){return void 0===r?{value:void 0,enumerable:!1,configurable:!0,writable:!0}:(r.enumerable=!1,r)}function ge(e,t){var u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=u.self,s=void 0!==a&&a,c=u.omit,l=void 0!==c&&c,f=i(t);if(f||n(t)){if(!i(e))throw new TypeError("If you want to decorator class, you must pass it a legal class");if(f)t(e);else for(var d=0,p=t.length;d<p;d++){var v=t[d];if(!i(v))throw new TypeError("If you want to decorate an class, you must pass it function or array of function");v(e)}return e}if(!s&&!i(e))throw new TypeError("applyDecorators only accept class as first arguments. If you want to modify instance, you should set options.self true.");if(s&&h(e))throw new TypeError("We can't apply docorators on a primitive value, even in self mode");if(!o(t))throw new TypeError("applyDecorators only accept object as second arguments");var y=s?e:e.prototype;if(r(y))throw new Error("The class muse have a prototype, please take a check");for(var g in t){var m=t[g],_=n(m)?m:[m],b=void 0;try{b=ue.apply(void 0,ii(_))}catch(e){throw oe(e&&e.message),new Error("The decorators set on props must be Function or Array of Function")}var w=Ga(y,g);if(!w||w.configurable)Ya(y,g,b(y,g,w));else if(!l)throw new Error(g+" of "+y+" is unconfigurable")}return e}function me(e,t,r){var i,u=r.diff,a=r.operationPrefix,s={},c=!1,l=new Proxy(e,{get:function(e,r,i){var l=e[r];if(n(e)&&qa.indexOf(r)>-1)return function(){c=!0,O(l,i).apply(void 0,arguments),c=!1,t()};if(!0===s[r])return l;if(o(l)||n(l)){var f=s[r]||me(l,t,{diff:u,operationPrefix:a});return s[r]=f,f}return s[r]=!0,l},set:function(e,r,i){var l=e[r],f=o(i)||n(i)?me(i,t,{diff:u,operationPrefix:a}):i;return e[r]=f,s[r]=!0,!!(c||u&&l===f)||(t(),!0)},deleteProperty:function(e,r){return delete e[r],delete s[r],!!c||(t(),!0)}}),f=(i={},Ou(i,a+"set",[ce(function(e){return function(e,t){l[e]=t}}),ye]),Ou(i,a+"del",[ce(function(e){return function(e){delete l[e]}}),ye]),i);return ge(l,f,{self:!0}),l}function _e(e,t,r){function u(e){var r=void 0;return e.reduce(function(e,i){return e[i]=[ae({set:function(e){return r=this[i],e}}),ae({get:function(e){return f[i]?e:((o(e)||n(e))&&_e(e,t,{operationPrefix:c,diff:l}),f[i]=!0,e)},set:function(e){return(o(e)||n(e))&&_e(e,t,{operationPrefix:c,diff:l}),f[i]=!0,d||l&&r===e||t(),e}},{preSet:!1})],e},{})}var a,s=this,c=r.operationPrefix,l=r.diff,f={},d=!1,h=u(za(e));if(ge(e,h,{self:!0,omit:!0}),n(e)){var p=qa.reduce(function(r,n){return r[n]=[ce(function(r){return r=i(r)?r:Array.prototype[n],function(){var n=e.length;if(d=!0,O(r,e).apply(void 0,arguments),d=!1,n<e.length){var i=u(new Array(e.length-n).fill(1).map(function(e,t){return(t+n).toString()}));ge(e,i,{self:!0,omit:!0})}t()}}),ye],r},{});ge(e,p,{self:!0})}var v=(a={},Ou(a,c+"set",[ce(function(t){return function(r,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=o.disable,c=o.isNewVal;if(c=c||-1===za(e).indexOf(r),i(t)&&O(t,s)(r,n,{disable:!0,isNewVal:c}),c){var l=u([r]);ge(e,l,{self:!0,omit:!0})}a||(e[r]=n)}}),ye]),Ou(a,c+"del",[ce(function(r){return function(n){if(-1===za(e).indexOf(n)){var o=u([n]);ge(e,o,{self:!0,omit:!0})}i(r)?O(r,s)(n):delete e[n],t()}}),ye]),a);return ge(e,v,{self:!0}),e}function be(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var u=o(t[t.length-1])?t[t.length-1]:{},a=u.deep,s=u.omit,c=u.other,f=u.operationPrefix,d=void 0===f?"__":f,p=u.diff,v=void 0===p||p,y=u.proxy;if(Proxy||(y=!1,oe("You browser do not support Proxy, we will change back into observe mode.")),!t.length)throw new TypeError("You must pass a function or a string to find the hanlder function.");if(void 0!==c&&h(c))throw new TypeError("If you want us to trigger function on the other instance, you must pass in a legal instance");if(!l(d))throw new TypeError("operationPrefix must be an string");return function(e,r,u){var f=t.reduce(function(r,n,o){if(!l(n)&&!i(n)){if(!o||o!==t.length-1)throw new TypeError("You can only pass function or string as handler");return r}return r.push(l(n)?function(t,r){var o=P(c||e,n);if(i(o))return O(o,this)(t,r);if(!s)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},[]),h=function(e,t){var r=this;f.forEach(function(n){return O(n,r)(e,t)})},p=!1,g=void 0,m=void 0,_=void 0;return ue(ae({set:function(e){var t=this;g=this[r],_=void 0;var i=function(){return O(h,t)(m,g)};return a&&(o(e)||n(e))?y?me(e,i,{diff:v,operationPrefix:d}):_e(e,i,{operationPrefix:d,diff:v}):e},get:function(e){var t=this;if(_)return _;if(!p){p=!0;var r=function(){return O(h,t)(m,g)};if(a&&(o(e)||n(e))){if(y)return _=me(e,r,{diff:v,operationPrefix:d}),g=_,m=_,_;_e(e,r,{operationPrefix:d,diff:v})}g=e,m=e}return e}},{preSet:!0}),ae({set:function(e){return m=e,v&&g===e||O(h,this)(m,g),g=e,e}},{preSet:!1}))(e,r,u)}}function we(e,t,r){if(void 0===r)throw new Error("@nonextendable could not handle undefined");return ce(function(e){return Ua(e),e})(e,t,r)}function Ee(e,t,r){return void 0===r?{value:void 0,enumerable:!0,configurable:!0,writable:!0}:(r.configurable=!0,r)}function ke(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=!!f(t[0])&&t.shift();return t.unshift(function(e){return f(e)?e:n}),ae({set:t,get:t})}function Oe(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=u(t[0])?t.shift():0;return t.unshift(function(e){return u(e)?e:n}),ae({set:t,get:t})}function Pe(e,t){if(!l(e))throw new TypeError("key parameter must be String");if(!i(t))throw new TypeError("fn parameter must be Function")}function Se(){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 je(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 xe(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 Ae(e){return l(e)?e:void 0}function Te(e){return ae({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 Le(e){var t=o(e)?e:{set:e,get:e,isBoolean:!1},r=t.set,n=t.get,i=t.isBoolean;return ae({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 Me(e,t){return ae({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 Ce(e){return ae({get:function(t){if(!this.dispatcher.videoConfigReady)return t;var r=this.dom.getAttr("video",e),n=this.dom.videoElement[e];return a(r)&&u(n)?n:r||void 0},set:function(t){if(!this.dispatcher.videoConfigReady)return t;var r=void 0;return void 0===t||u(t)?r=t:l(t)&&!Number.isNaN(parseFloat(t))&&(r=t),this.dom.setAttr("video",e,r),r}})}function ze(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 Fe(e){$n.warn("chimee","You are trying to obtain "+e+", we will return you the DOM node. It's not a good idea to handle this by yourself. If you have some requirement, you can tell use by https://github.com/Chimeejs/chimee/issues")}function $e(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 Ne(e){if("video"===e&&(e="videoElement"),!v(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 De(e,t,r){if(!l(t))throw new TypeError("to handle dom's attribute or style, your attr parameter must be string");if(!l(e))throw new TypeError("to handle dom's attribute or style, your target parameter must be string");return[e,t,r]}function Ie(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 Re(e){if(!l(e))throw new Error("Plugin's name must be a string");return E(e)}function He(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 Ve(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 Be(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}var We=e(t(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")}})),Ye=t(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)}),Ge=t(function(e){var t=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=t)}),qe=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e},Ue=function(e,t,r){if(qe(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)}},Ke=function(e){return"object"==typeof e?null!==e:"function"==typeof e},Qe=function(e){if(!Ke(e))throw TypeError(e+" is not an object!");return e},Ze=function(e){try{return!!e()}catch(e){return!0}},Je=!Ze(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),Xe=Ye.document,et=Ke(Xe)&&Ke(Xe.createElement),tt=function(e){return et?Xe.createElement(e):{}},rt=!Je&&!Ze(function(){return 7!=Object.defineProperty(tt("div"),"a",{get:function(){return 7}}).a}),nt=function(e,t){if(!Ke(e))return e;var r,n;if(t&&"function"==typeof(r=e.toString)&&!Ke(n=r.call(e)))return n;if("function"==typeof(r=e.valueOf)&&!Ke(n=r.call(e)))return n;if(!t&&"function"==typeof(r=e.toString)&&!Ke(n=r.call(e)))return n;throw TypeError("Can't convert object to primitive value")},it=Object.defineProperty,ot={f:Je?Object.defineProperty:function(e,t,r){if(Qe(e),t=nt(t,!0),Qe(r),rt)try{return it(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}},ut=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},at=Je?function(e,t,r){return ot.f(e,t,ut(1,r))}:function(e,t,r){return e[t]=r,e},st=function(e,t,r){var n,i,o,u=e&st.F,a=e&st.G,s=e&st.S,c=e&st.P,l=e&st.B,f=e&st.W,d=a?Ge:Ge[t]||(Ge[t]={}),h=d.prototype,p=a?Ye:s?Ye[t]:(Ye[t]||{}).prototype;a&&(r=t);for(n in r)(i=!u&&p&&void 0!==p[n])&&n in d||(o=i?p[n]:r[n],d[n]=a&&"function"!=typeof p[n]?r[n]:l&&i?Ue(o,Ye):f&&p[n]==o?function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(o):c&&"function"==typeof o?Ue(Function.call,o):o,c&&((d.virtual||(d.virtual={}))[n]=o,e&st.R&&h&&!h[n]&&at(h,n,o)))};st.F=1,st.G=2,st.S=4,st.P=8,st.B=16,st.W=32,st.U=64,st.R=128;var ct=st;ct(ct.S+ct.F*!Je,"Object",{defineProperty:ot.f});var lt=Ge.Object,ft=function(e,t,r){return lt.defineProperty(e,t,r)},dt=t(function(e){e.exports={default:ft,__esModule:!0}}),ht=e(dt),pt=e(t(function(e,t){t.__esModule=!0;var r=function(e){return e&&e.__esModule?e:{default:e}}(dt);t.default=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),(0,r.default)(e,i.key,i)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()})),vt=Math.ceil,yt=Math.floor,gt=function(e){return isNaN(e=+e)?0:(e>0?yt:vt)(e)},mt=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e},_t=at,bt={}.hasOwnProperty,wt=function(e,t){return bt.call(e,t)},Et={},kt={}.toString,Ot=function(e){return kt.call(e).slice(8,-1)},Pt=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==Ot(e)?e.split(""):Object(e)},St=function(e){return Pt(mt(e))},jt=Math.min,xt=function(e){return e>0?jt(gt(e),9007199254740991):0},At=Math.max,Tt=Math.min,Lt=function(e,t){return(e=gt(e))<0?At(e+t,0):Tt(e,t)},Mt=Ye["__core-js_shared__"]||(Ye["__core-js_shared__"]={}),Ct=function(e){return Mt[e]||(Mt[e]={})},zt=0,Ft=Math.random(),$t=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++zt+Ft).toString(36))},Nt=Ct("keys"),Dt=function(e){return Nt[e]||(Nt[e]=$t(e))},It=function(e){return function(t,r,n){var i,o=St(t),u=xt(o.length),a=Lt(n,u);if(e&&r!=r){for(;u>a;)if((i=o[a++])!=i)return!0}else for(;u>a;a++)if((e||a in o)&&o[a]===r)return e||a||0;return!e&&-1}}(!1),Rt=Dt("IE_PROTO"),Ht=function(e,t){var r,n=St(e),i=0,o=[];for(r in n)r!=Rt&&wt(n,r)&&o.push(r);for(;t.length>i;)wt(n,r=t[i++])&&(~It(o,r)||o.push(r));return o},Vt="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),Bt=Object.keys||function(e){return Ht(e,Vt)},Wt=Je?Object.defineProperties:function(e,t){Qe(e);for(var r,n=Bt(t),i=n.length,o=0;i>o;)ot.f(e,r=n[o++],t[r]);return e},Yt=Ye.document&&document.documentElement,Gt=Dt("IE_PROTO"),qt=function(){},Ut=function(){var e,t=tt("iframe"),r=Vt.length;for(t.style.display="none",Yt.appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),Ut=e.F;r--;)delete Ut.prototype[Vt[r]];return Ut()},Kt=Object.create||function(e,t){var r;return null!==e?(qt.prototype=Qe(e),r=new qt,qt.prototype=null,r[Gt]=e):r=Ut(),void 0===t?r:Wt(r,t)},Qt=t(function(e){var t=Ct("wks"),r=Ye.Symbol,n="function"==typeof r;(e.exports=function(e){return t[e]||(t[e]=n&&r[e]||(n?r:$t)("Symbol."+e))}).store=t}),Zt=ot.f,Jt=Qt("toStringTag"),Xt=function(e,t,r){e&&!wt(e=r?e:e.prototype,Jt)&&Zt(e,Jt,{configurable:!0,value:t})},er={};at(er,Qt("iterator"),function(){return this});var tr=function(e,t,r){e.prototype=Kt(er,{next:ut(1,r)}),Xt(e,t+" Iterator")},rr=function(e){return Object(mt(e))},nr=Dt("IE_PROTO"),ir=Object.prototype,or=Object.getPrototypeOf||function(e){return e=rr(e),wt(e,nr)?e[nr]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?ir:null},ur=Qt("iterator"),ar=!([].keys&&"next"in[].keys()),sr=function(){return this},cr=function(e,t,r,n,i,o,u){tr(r,t,n);var a,s,c,l=function(e){if(!ar&&e in p)return p[e];switch(e){case"keys":case"values":return function(){return new r(this,e)}}return function(){return new r(this,e)}},f=t+" Iterator",d="values"==i,h=!1,p=e.prototype,v=p[ur]||p["@@iterator"]||i&&p[i],y=v||l(i),g=i?d?l("entries"):y:void 0,m="Array"==t?p.entries||v:v;if(m&&(c=or(m.call(new e)))!==Object.prototype&&Xt(c,f,!0),d&&v&&"values"!==v.name&&(h=!0,y=function(){return v.call(this)}),u&&(ar||h||!p[ur])&&at(p,ur,y),Et[t]=y,Et[f]=sr,i)if(a={values:d?y:l("values"),keys:o?y:l("keys"),entries:g},u)for(s in a)s in p||_t(p,s,a[s]);else ct(ct.P+ct.F*(ar||h),t,a);return a},lr=function(e){return function(t,r){var n,i,o=String(mt(t)),u=gt(r),a=o.length;return u<0||u>=a?e?"":void 0:(n=o.charCodeAt(u))<55296||n>56319||u+1===a||(i=o.charCodeAt(u+1))<56320||i>57343?e?o.charAt(u):n:e?o.slice(u,u+2):i-56320+(n-55296<<10)+65536}}(!0);cr(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=lr(t,r),this._i+=e.length,{value:e,done:!1})});var fr=function(){},dr=function(e,t){return{value:t,done:!!e}};cr(Array,"Array",function(e,t){this._t=St(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,dr(1)):"keys"==t?dr(0,r):"values"==t?dr(0,e[r]):dr(0,[r,e[r]])},"values");Et.Arguments=Et.Array,fr(),fr(),fr();for(var hr=Qt("toStringTag"),pr=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],vr=0;vr<5;vr++){var yr=pr[vr],gr=Ye[yr],mr=gr&&gr.prototype;mr&&!mr[hr]&&at(mr,hr,yr),Et[yr]=Et.Array}var _r={f:Qt},br=_r.f("iterator"),wr=t(function(e){e.exports={default:br,__esModule:!0}}),Er=t(function(e){var t=$t("meta"),r=ot.f,n=0,i=Object.isExtensible||function(){return!0},o=!Ze(function(){return i(Object.preventExtensions({}))}),u=function(e){r(e,t,{value:{i:"O"+ ++n,w:{}}})},a=e.exports={KEY:t,NEED:!1,fastKey:function(e,r){if(!Ke(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!wt(e,t)){if(!i(e))return"F";if(!r)return"E";u(e)}return e[t].i},getWeak:function(e,r){if(!wt(e,t)){if(!i(e))return!0;if(!r)return!1;u(e)}return e[t].w},onFreeze:function(e){return o&&a.NEED&&i(e)&&!wt(e,t)&&u(e),e}}}),kr=ot.f,Or=function(e){var t=Ge.Symbol||(Ge.Symbol={});"_"==e.charAt(0)||e in t||kr(t,e,{value:_r.f(e)})},Pr=function(e,t){for(var r,n=St(e),i=Bt(n),o=i.length,u=0;o>u;)if(n[r=i[u++]]===t)return r},Sr={f:Object.getOwnPropertySymbols},jr={f:{}.propertyIsEnumerable},xr=function(e){var t=Bt(e),r=Sr.f;if(r)for(var n,i=r(e),o=jr.f,u=0;i.length>u;)o.call(e,n=i[u++])&&t.push(n);return t},Ar=Array.isArray||function(e){return"Array"==Ot(e)},Tr=Vt.concat("length","prototype"),Lr={f:Object.getOwnPropertyNames||function(e){return Ht(e,Tr)}},Mr=Lr.f,Cr={}.toString,zr="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Fr=function(e){try{return Mr(e)}catch(e){return zr.slice()}},$r={f:function(e){return zr&&"[object Window]"==Cr.call(e)?Fr(e):Mr(St(e))}},Nr=Object.getOwnPropertyDescriptor,Dr={f:Je?Nr:function(e,t){if(e=St(e),t=nt(t,!0),rt)try{return Nr(e,t)}catch(e){}if(wt(e,t))return ut(!jr.f.call(e,t),e[t])}},Ir=Er.KEY,Rr=Dr.f,Hr=ot.f,Vr=$r.f,Br=Ye.Symbol,Wr=Ye.JSON,Yr=Wr&&Wr.stringify,Gr=Qt("_hidden"),qr=Qt("toPrimitive"),Ur={}.propertyIsEnumerable,Kr=Ct("symbol-registry"),Qr=Ct("symbols"),Zr=Ct("op-symbols"),Jr=Object.prototype,Xr="function"==typeof Br,en=Ye.QObject,tn=!en||!en.prototype||!en.prototype.findChild,rn=Je&&Ze(function(){return 7!=Kt(Hr({},"a",{get:function(){return Hr(this,"a",{value:7}).a}})).a})?function(e,t,r){var n=Rr(Jr,t);n&&delete Jr[t],Hr(e,t,r),n&&e!==Jr&&Hr(Jr,t,n)}:Hr,nn=function(e){var t=Qr[e]=Kt(Br.prototype);return t._k=e,t},on=Xr&&"symbol"==typeof Br.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof Br},un=function(e,t,r){return e===Jr&&un(Zr,t,r),Qe(e),t=nt(t,!0),Qe(r),wt(Qr,t)?(r.enumerable?(wt(e,Gr)&&e[Gr][t]&&(e[Gr][t]=!1),r=Kt(r,{enumerable:ut(0,!1)})):(wt(e,Gr)||Hr(e,Gr,ut(1,{})),e[Gr][t]=!0),rn(e,t,r)):Hr(e,t,r)},an=function(e,t){Qe(e);for(var r,n=xr(t=St(t)),i=0,o=n.length;o>i;)un(e,r=n[i++],t[r]);return e},sn=function(e){var t=Ur.call(this,e=nt(e,!0));return!(this===Jr&&wt(Qr,e)&&!wt(Zr,e))&&(!(t||!wt(this,e)||!wt(Qr,e)||wt(this,Gr)&&this[Gr][e])||t)},cn=function(e,t){if(e=St(e),t=nt(t,!0),e!==Jr||!wt(Qr,t)||wt(Zr,t)){var r=Rr(e,t);return!r||!wt(Qr,t)||wt(e,Gr)&&e[Gr][t]||(r.enumerable=!0),r}},ln=function(e){for(var t,r=Vr(St(e)),n=[],i=0;r.length>i;)wt(Qr,t=r[i++])||t==Gr||t==Ir||n.push(t);return n},fn=function(e){for(var t,r=e===Jr,n=Vr(r?Zr:St(e)),i=[],o=0;n.length>o;)!wt(Qr,t=n[o++])||r&&!wt(Jr,t)||i.push(Qr[t]);return i};Xr||(_t((Br=function(){if(this instanceof Br)throw TypeError("Symbol is not a constructor!");var e=$t(arguments.length>0?arguments[0]:void 0),t=function(r){this===Jr&&t.call(Zr,r),wt(this,Gr)&&wt(this[Gr],e)&&(this[Gr][e]=!1),rn(this,e,ut(1,r))};return Je&&tn&&rn(Jr,e,{configurable:!0,set:t}),nn(e)}).prototype,"toString",function(){return this._k}),Dr.f=cn,ot.f=un,Lr.f=$r.f=ln,jr.f=sn,Sr.f=fn,_r.f=function(e){return nn(Qt(e))}),ct(ct.G+ct.W+ct.F*!Xr,{Symbol:Br});for(var dn="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),hn=0;dn.length>hn;)Qt(dn[hn++]);for(var dn=Bt(Qt.store),hn=0;dn.length>hn;)Or(dn[hn++]);ct(ct.S+ct.F*!Xr,"Symbol",{for:function(e){return wt(Kr,e+="")?Kr[e]:Kr[e]=Br(e)},keyFor:function(e){if(on(e))return Pr(Kr,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){tn=!0},useSimple:function(){tn=!1}}),ct(ct.S+ct.F*!Xr,"Object",{create:function(e,t){return void 0===t?Kt(e):an(Kt(e),t)},defineProperty:un,defineProperties:an,getOwnPropertyDescriptor:cn,getOwnPropertyNames:ln,getOwnPropertySymbols:fn}),Wr&&ct(ct.S+ct.F*(!Xr||Ze(function(){var e=Br();return"[null]"!=Yr([e])||"{}"!=Yr({a:e})||"{}"!=Yr(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!on(e)){for(var t,r,n=[e],i=1;arguments.length>i;)n.push(arguments[i++]);return"function"==typeof(t=n[1])&&(r=t),!r&&Ar(t)||(t=function(e,t){if(r&&(t=r.call(this,e,t)),!on(t))return t}),n[1]=t,Yr.apply(Wr,n)}}}),Br.prototype[qr]||at(Br.prototype,qr,Br.prototype.valueOf),Xt(Br,"Symbol"),Xt(Math,"Math",!0),Xt(Ye.JSON,"JSON",!0),Or("asyncIterator"),Or("observable");var pn=Ge.Symbol,vn=t(function(e){e.exports={default:pn,__esModule:!0}}),yn=t(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(wr),i=r(vn),o="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};t.default="function"==typeof i.default&&"symbol"===o(n.default)?function(e){return void 0===e?"undefined":o(e)}:function(e){return e&&"function"==typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":void 0===e?"undefined":o(e)}}),gn=e(yn),mn=function(e,t){var r=(Ge.Object||{})[e]||Object[e],n={};n[e]=t(r),ct(ct.S+ct.F*Ze(function(){r(1)}),"Object",n)};mn("keys",function(){return function(e){return Bt(rr(e))}});var _n=Ge.Object.keys,bn=e(t(function(e){e.exports={default:_n,__esModule:!0}})),wn=Math.floor;ct(ct.S,"Number",{isInteger:function(e){return!Ke(e)&&isFinite(e)&&wn(e)===e}});var En=Ge.Number.isInteger,kn=e(t(function(e){e.exports={default:En,__esModule:!0}})),On="\t\n\v\f\r \u2028\u2029\ufeff",Pn="["+On+"]",Sn=RegExp("^"+Pn+Pn+"*"),jn=RegExp(Pn+Pn+"*$"),xn=function(e,t,r){var n={},i=Ze(function(){return!!On[e]()||"
"!="
"[e]()}),o=n[e]=i?t(An):On[e];r&&(n[r]=o),ct(ct.P+ct.F*i,"String",n)},An=xn.trim=function(e,t){return e=String(mt(e)),1&t&&(e=e.replace(Sn,"")),2&t&&(e=e.replace(jn,"")),e},Tn=xn,Ln=Ye.parseFloat,Mn=Tn.trim,Cn=1/Ln(On+"-0")!=-1/0?function(e){var t=Mn(String(e),3),r=Ln(t);return 0===r&&"-"==t.charAt(0)?-0:r}:Ln;ct(ct.S+ct.F*(Number.parseFloat!=Cn),"Number",{parseFloat:Cn});var zn=parseFloat,Fn=e(t(function(e){e.exports={default:zn,__esModule:!0}})),$n=function(){function e(){We(this,e)}return pt(e,null,[{key:"error",value:function(t,r){e.ENABLE_ERROR&&(console.error||console.warn||console.log)(_(t,r))}},{key:"info",value:function(t,r){e.ENABLE_INFO&&(console.info||console.log)(_(t,r))}},{key:"warn",value:function(t,r){e.ENABLE_WARN&&(console.warn||console.log)(_(t,r))}},{key:"debug",value:function(t,r){e.ENABLE_DEBUG&&(console.debug||console.log)(_(t,r))}},{key:"verbose",value:function(t,r){e.ENABLE_VERBOSE&&console.log(_(t,r))}}]),e}();$n.GLOBAL_TAG="chimee",$n.FORCE_GLOBAL_TAG=!1,$n.ENABLE_ERROR=!0,$n.ENABLE_INFO=!0,$n.ENABLE_WARN=!0,$n.ENABLE_DEBUG=!0,$n.ENABLE_VERBOSE=!0;var Nn=function(e,t,r,n){try{return n?t(Qe(r)[0],r[1]):t(r)}catch(t){var i=e.return;throw void 0!==i&&Qe(i.call(e)),t}},Dn=Qt("iterator"),In=Array.prototype,Rn=function(e){return void 0!==e&&(Et.Array===e||In[Dn]===e)},Hn=function(e,t,r){t in e?ot.f(e,t,ut(0,r)):e[t]=r},Vn=Qt("toStringTag"),Bn="Arguments"==Ot(function(){return arguments}()),Wn=function(e,t){try{return e[t]}catch(e){}},Yn=function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=Wn(t=Object(e),Vn))?r:Bn?Ot(t):"Object"==(n=Ot(t))&&"function"==typeof t.callee?"Arguments":n},Gn=Qt("iterator"),qn=Ge.getIteratorMethod=function(e){if(void 0!=e)return e[Gn]||e["@@iterator"]||Et[Yn(e)]},Un=Qt("iterator"),Kn=!1;try{var Qn=[7][Un]();Qn.return=function(){Kn=!0},Array.from(Qn,function(){throw 2})}catch(e){}var Zn=function(e,t){if(!t&&!Kn)return!1;var r=!1;try{var n=[7],i=n[Un]();i.next=function(){return{done:r=!0}},n[Un]=function(){return i},e(n)}catch(e){}return r};ct(ct.S+ct.F*!Zn(function(e){Array.from(e)}),"Array",{from:function(e){var t,r,n,i,o=rr(e),u="function"==typeof this?this:Array,a=arguments.length,s=a>1?arguments[1]:void 0,c=void 0!==s,l=0,f=qn(o);if(c&&(s=Ue(s,a>2?arguments[2]:void 0,2)),void 0==f||u==Array&&Rn(f))for(r=new u(t=xt(o.length));t>l;l++)Hn(r,l,c?s(o[l],l):o[l]);else for(i=f.call(o),r=new u;!(n=i.next()).done;l++)Hn(r,l,c?Nn(i,s,[n.value,l],!0):n.value);return r.length=l,r}});var Jn,Xn,ei,ti=Ge.Array.from,ri=t(function(e){e.exports={default:ti,__esModule:!0}}),ni=e(ri),ii=e(t(function(e,t){t.__esModule=!0;var r=function(e){return e&&e.__esModule?e:{default:e}}(ri);t.default=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return(0,r.default)(e)}})),oi=function(e){function t(r,i,u){if(n(r)||o(r)){i=i||(o(r)?{}:[]);for(var a in r)i[a]=t(r[a],i[a],a);return i}return e(r,i,u)}return t}(function(e){return e}),ui=function(e,t,r,n){if(!(e instanceof t)||void 0!==n&&n in e)throw TypeError(r+": incorrect invocation!");return e},ai=t(function(e){var t={},r={},n=e.exports=function(e,n,i,o,u){var a,s,c,l,f=u?function(){return e}:qn(e),d=Ue(i,o,n?2:1),h=0;if("function"!=typeof f)throw TypeError(e+" is not iterable!");if(Rn(f)){for(a=xt(e.length);a>h;h++)if((l=n?d(Qe(s=e[h])[0],s[1]):d(e[h]))===t||l===r)return l}else for(c=f.call(e);!(s=c.next()).done;)if((l=Nn(c,d,s.value,n))===t||l===r)return l};n.BREAK=t,n.RETURN=r}),si=Qt("species"),ci=function(e,t){var r,n=Qe(e).constructor;return void 0===n||void 0==(r=Qe(n)[si])?t:qe(r)},li=function(e,t,r){var n=void 0===r;switch(t.length){case 0:return n?e():e.call(r);case 1:return n?e(t[0]):e.call(r,t[0]);case 2:return n?e(t[0],t[1]):e.call(r,t[0],t[1]);case 3:return n?e(t[0],t[1],t[2]):e.call(r,t[0],t[1],t[2]);case 4:return n?e(t[0],t[1],t[2],t[3]):e.call(r,t[0],t[1],t[2],t[3])}return e.apply(r,t)},fi=Ye.process,di=Ye.setImmediate,hi=Ye.clearImmediate,pi=Ye.MessageChannel,vi=0,yi={},gi=function(){var e=+this;if(yi.hasOwnProperty(e)){var t=yi[e];delete yi[e],t()}},mi=function(e){gi.call(e.data)};di&&hi||(di=function(e){for(var t=[],r=1;arguments.length>r;)t.push(arguments[r++]);return yi[++vi]=function(){li("function"==typeof e?e:Function(e),t)},Jn(vi),vi},hi=function(e){delete yi[e]},"process"==Ot(fi)?Jn=function(e){fi.nextTick(Ue(gi,e,1))}:pi?(ei=(Xn=new pi).port2,Xn.port1.onmessage=mi,Jn=Ue(ei.postMessage,ei,1)):Ye.addEventListener&&"function"==typeof postMessage&&!Ye.importScripts?(Jn=function(e){Ye.postMessage(e+"","*")},Ye.addEventListener("message",mi,!1)):Jn="onreadystatechange"in tt("script")?function(e){Yt.appendChild(tt("script")).onreadystatechange=function(){Yt.removeChild(this),gi.call(e)}}:function(e){setTimeout(Ue(gi,e,1),0)});var _i,bi,wi,Ei={set:di,clear:hi},ki=Ei.set,Oi=Ye.MutationObserver||Ye.WebKitMutationObserver,Pi=Ye.process,Si=Ye.Promise,ji="process"==Ot(Pi),xi=function(e,t,r){for(var n in t)r&&e[n]?e[n]=t[n]:at(e,n,t[n]);return e},Ai=Qt("species"),Ti=Ei.set,Li=function(){var e,t,r,n=function(){var n,i;for(ji&&(n=Pi.domain)&&n.exit();e;){i=e.fn,e=e.next;try{i()}catch(n){throw e?r():t=void 0,n}}t=void 0,n&&n.enter()};if(ji)r=function(){Pi.nextTick(n)};else if(Oi){var i=!0,o=document.createTextNode("");new Oi(n).observe(o,{characterData:!0}),r=function(){o.data=i=!i}}else if(Si&&Si.resolve){var u=Si.resolve();r=function(){u.then(n)}}else r=function(){ki.call(Ye,n)};return function(n){var i={fn:n,next:void 0};t&&(t.next=i),e||(e=i,r()),t=i}}(),Mi=Ye.TypeError,Ci=Ye.process,zi=Ye.Promise,Ci=Ye.process,Fi="process"==Yn(Ci),$i=function(){},Ni=!!function(){try{var e=zi.resolve(1),t=(e.constructor={})[Qt("species")]=function(e){e($i,$i)};return(Fi||"function"==typeof PromiseRejectionEvent)&&e.then($i)instanceof t}catch(e){}}(),Di=function(e,t){return e===t||e===zi&&t===wi},Ii=function(e){var t;return!(!Ke(e)||"function"!=typeof(t=e.then))&&t},Ri=function(e){return Di(zi,e)?new Hi(e):new bi(e)},Hi=bi=function(e){var t,r;this.promise=new e(function(e,n){if(void 0!==t||void 0!==r)throw Mi("Bad Promise constructor");t=e,r=n}),this.resolve=qe(t),this.reject=qe(r)},Vi=function(e){try{e()}catch(e){return{error:e}}},Bi=function(e,t){if(!e._n){e._n=!0;var r=e._c;Li(function(){for(var n=e._v,i=1==e._s,o=0;r.length>o;)!function(t){var r,o,u=i?t.ok:t.fail,a=t.resolve,s=t.reject,c=t.domain;try{u?(i||(2==e._h&&Gi(e),e._h=1),!0===u?r=n:(c&&c.enter(),r=u(n),c&&c.exit()),r===t.promise?s(Mi("Promise-chain cycle")):(o=Ii(r))?o.call(r,a,s):a(r)):s(n)}catch(e){s(e)}}(r[o++]);e._c=[],e._n=!1,t&&!e._h&&Wi(e)})}},Wi=function(e){Ti.call(Ye,function(){var t,r,n,i=e._v;if(Yi(e)&&(t=Vi(function(){Fi?Ci.emit("unhandledRejection",i,e):(r=Ye.onunhandledrejection)?r({promise:e,reason:i}):(n=Ye.console)&&n.error&&n.error("Unhandled promise rejection",i)}),e._h=Fi||Yi(e)?2:1),e._a=void 0,t)throw t.error})},Yi=function(e){if(1==e._h)return!1;for(var t,r=e._a||e._c,n=0;r.length>n;)if((t=r[n++]).fail||!Yi(t.promise))return!1;return!0},Gi=function(e){Ti.call(Ye,function(){var t;Fi?Ci.emit("rejectionHandled",e):(t=Ye.onrejectionhandled)&&t({promise:e,reason:e._v})})},qi=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()),Bi(t,!0))},Ui=function(e){var t,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===e)throw Mi("Promise can't be resolved itself");(t=Ii(e))?Li(function(){var n={_w:r,_d:!1};try{t.call(e,Ue(Ui,n,1),Ue(qi,n,1))}catch(e){qi.call(n,e)}}):(r._v=e,r._s=1,Bi(r,!1))}catch(e){qi.call({_w:r,_d:!1},e)}}};Ni||(zi=function(e){ui(this,zi,"Promise","_h"),qe(e),_i.call(this);try{e(Ue(Ui,this,1),Ue(qi,this,1))}catch(e){qi.call(this,e)}},(_i=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=xi(zi.prototype,{then:function(e,t){var r=Ri(ci(this,zi));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=Fi?Ci.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&Bi(this,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),Hi=function(){var e=new _i;this.promise=e,this.resolve=Ue(Ui,e,1),this.reject=Ue(qi,e,1)}),ct(ct.G+ct.W+ct.F*!Ni,{Promise:zi}),Xt(zi,"Promise"),function(e){var t="function"==typeof Ge[e]?Ge[e]:Ye[e];Je&&t&&!t[Ai]&&ot.f(t,Ai,{configurable:!0,get:function(){return this}})}("Promise"),wi=Ge.Promise,ct(ct.S+ct.F*!Ni,"Promise",{reject:function(e){var t=Ri(this);return(0,t.reject)(e),t.promise}}),ct(ct.S+!0*ct.F,"Promise",{resolve:function(e){if(e instanceof zi&&Di(e.constructor,this))return e;var t=Ri(this);return(0,t.resolve)(e),t.promise}}),ct(ct.S+ct.F*!(Ni&&Zn(function(e){zi.all(e).catch($i)})),"Promise",{all:function(e){var t=this,r=Ri(t),n=r.resolve,i=r.reject,o=Vi(function(){var r=[],o=0,u=1;ai(e,!1,function(e){var a=o++,s=!1;r.push(void 0),u++,t.resolve(e).then(function(e){s||(s=!0,r[a]=e,--u||n(r))},i)}),--u||n(r)});return o&&i(o.error),r.promise},race:function(e){var t=this,r=Ri(t),n=r.reject,i=Vi(function(){ai(e,!1,function(e){t.resolve(e).then(r.resolve,n)})});return i&&n(i.error),r.promise}});var Ki=Ge.Promise,Qi=e(t(function(e){e.exports={default:Ki,__esModule:!0}})),Zi=("undefined"!=typeof window&&Object.prototype.toString.call(window),Object.assign),Ji=!Zi||Ze(function(){var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(e){t[e]=e}),7!=Zi({},e)[r]||Object.keys(Zi({},t)).join("")!=n})?function(e,t){for(var r=rr(e),n=arguments.length,i=1,o=Sr.f,u=jr.f;n>i;)for(var a,s=Pt(arguments[i++]),c=o?Bt(s).concat(o(s)):Bt(s),l=c.length,f=0;l>f;)u.call(s,a=c[f++])&&(r[a]=s[a]);return r}:Zi;ct(ct.S+ct.F,"Object",{assign:Ji});var Xi=Ge.Object.assign,eo=e(t(function(e){e.exports={default:Xi,__esModule:!0}}));ct(ct.S,"Object",{create:Kt});var to=Ge.Object,ro=function(e,t){return to.create(e,t)},no=t(function(e){e.exports={default:ro,__esModule:!0}}),io=e(no),oo=io(null);oo.count=0;var uo=function(){function e(t,r){var n=this;if(We(this,e),Object.defineProperty(this,"__target",{writable:!0,enumerable:!1,configurable:!0}),this.__target=this,t){if("object"!==(void 0===t?"undefined":gn(t)))throw new Error("CusEvent target are not object");this.__target=t,r&&["on","once","off","emit"].forEach(function(e){t[e]=n[e]})}}return pt(e,[{key:"on",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return L(this.__target,e,t,r),this}},{key:"once",value:function(e,t){return this.on(e,t,!0)}},{key:"off",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return M(this.__target,e,t,r),this}},{key:"emit",value:function(e,t){return T(this.__target,e,{data:t}),this}}]),e}(),ao=io(null);ao.count=0;(function(){function e(t,r){var n=this;if(We(this,e),Object.defineProperty(this,"__target",{writable:!0,enumerable:!1,configurable:!0}),this.__target=this,t){if("object"!==(void 0===t?"undefined":gn(t)))throw new Error("CusEvent target are not object");this.__target=t,r&&["on","once","off","emit"].forEach(function(e){t[e]=n[e]})}}pt(e,[{key:"on",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return F(this.__target,e,t,r),this}},{key:"once",value:function(e,t){return this.on(e,t,!0)}},{key:"off",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return $(this.__target,e,t,r),this}},{key:"emit",value:function(e,t){return z(this.__target,e,{data:t}),this}}])})(),"undefined"!=typeof window&&Object.prototype.toString.call(window);var so=document.createElement("div"),co="innerText";"textContent"in so&&(co="textContent");var lo=Array.prototype,fo=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;We(this,e);var i=this;i.selector=t;var o=void 0;t&&t.constructor===NodeList?o=N(t):n(t)?o=t:l(t)?0===t.indexOf("<")?(so.innerHTML=t,o=K("*",so,!0)):o=K(t,r,!0):o=[t],eo(i,o),i.length=o.length}return pt(e,[{key:"each",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return lo.forEach.apply(this,t),this}},{key:"push",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return lo.push.apply(this,t),this}},{key:"splice",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return J(lo.splice.apply(this,t))}},{key:"find",value:function(e){var t=[];this.each(function(r){t=t.concat(K(e,r,!0))});var r=J(t);return r.parent=this,r.selector=e,r}},{key:"append",value:function(e){var t=J(e),r=this[0];return t.each(function(e){return r.appendChild(e)}),this}},{key:"appendTo",value:function(e){return J(e).append(this),this}},{key:"text",value:function(e){return 0===arguments.length?this[0][co]:this.each(function(t){t[co]=e})}},{key:"html",value:function(e){return 0===arguments.length?this[0].innerHTML:this.each(function(t){t.innerHTML=e})}},{key:"attr",value:function(e,t){return 1===arguments.length?D(this[0],e):this.each(function(r){return I(r,e,t)})}},{key:"data",value:function(e,t){return 0===arguments.length?this[0].dataset||{}:1===arguments.length?(this[0].dataset||{})[e]:this.each(function(r){(r.dataset||(r.dataset={}))[e]=t})}},{key:"css",value:function(e,t){return 1!==arguments.length||o(e)?this.each(function(r){return U(r,e,t)}):q(this[0],e)}},{key:"addClass",value:function(e){return this.each(function(t){return R(t,e)})}},{key:"removeClass",value:function(e){return this.each(function(t){return H(t,e)})}},{key:"hasClass",value:function(e){return V(this[0],e)}},{key:"on",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.each(function(i){return W(i,e,t,r,n)})}},{key:"off",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.each(function(i){return B(i,e,t,r,n)})}},{key:"delegate",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.each(function(i){return Y(i,e,t,r,n)})}},{key:"undelegate",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.each(function(i){return G(i,e,t,r,n)})}},{key:"remove",value:function(){return this.each(function(e){return Q(e)})}}]),e}();mn("getPrototypeOf",function(){return function(e){return or(rr(e))}});var ho=Ge.Object.getPrototypeOf,po=e(t(function(e){e.exports={default:ho,__esModule:!0}})),vo=e(t(function(e,t){t.__esModule=!0;var r=function(e){return e&&e.__esModule?e:{default:e}}(yn);t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,r.default)(t))&&"function"!=typeof t?e:t}})),yo=function(e,t){if(Qe(e),!Ke(t)&&null!==t)throw TypeError(t+": can't set as prototype!")},go={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=Ue(Function.call,Dr.f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return yo(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:yo};ct(ct.S,"Object",{setPrototypeOf:go.set});var mo=Ge.Object.setPrototypeOf,_o=t(function(e){e.exports={default:mo,__esModule:!0}}),bo=e(t(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(_o),i=r(no),o=r(yn);t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,o.default)(t)));e.prototype=(0,i.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(n.default?(0,n.default)(e,t):e.__proto__=t)}})),wo=Dr.f;mn("getOwnPropertyDescriptor",function(){return function(e,t){return wo(St(e),t)}});var Eo=Ge.Object,ko=function(e,t){return Eo.getOwnPropertyDescriptor(e,t)},Oo=e(t(function(e){e.exports={default:ko,__esModule:!0}})),Po={type:"vod",autoPlay:!1,box:"native",lockInternalProperty:!1,debug:!0},So=function(e){function t(e,r){We(this,t);var n=vo(this,(t.__proto__||po(t)).call(this));return n.video=e,n.box="Native",n.config=Po,w(n.config,r),n.bindEvents(),n}return bo(t,uo),pt(t,[{key:"internalPropertyHandle",value:function(){if(Oo){var e=this,t=Oo(HTMLMediaElement.prototype,"currentTime");Object.defineProperty(this.video,"currentTime",{get:function(){return t.get.call(e.video)},set:function(r){if(e.currentTimeLock)return t.set.call(e.video,r);throw new Error("can not set currentTime by youself")}})}}},{key:"bindEvents",value:function(){var e=this;this.video&&this.config.lockInternalProperty&&this.video.addEventListener("canplay",function(){e.internalPropertyHandle()})}},{key:"load",value:function(e){this.config.src=e||this.config.src,this.video.src=this.config.src}},{key:"unload",value:function(){this.video.src="",this.video.removeAttribute("src")}},{key:"destroy",value:function(){this.video&&this.unload()}},{key:"play",value:function(){return this.video.play()}},{key:"pause",value:function(){return this.video.pause()}},{key:"attachMedia",value:function(){}},{key:"seek",value:function(e){this.currentTimeLock=!0,this.video.currentTime=e,this.currentTimeLock=!1}}]),t}(),jo=function(e){function t(e,r){We(this,t);var n=vo(this,(t.__proto__||po(t)).call(this));return n.tag="kernel",n.config=r,n.video=e,n.videokernel=n.selectKernel(),n.bindEvents(n.videokernel,n.video),n.timer=null,n}return bo(t,uo),pt(t,[{key:"bindEvents",value:function(e,t){var r=this;e&&(e.on("mediaInfo",function(e){r.emit("mediaInfo",e)}),t.addEventListener("canplay",function(){clearTimeout(r.timer),r.timer=null}))}},{key:"selectKernel",value:function(){var e=this.config,t=e.box?e.box:-1!==e.src.indexOf(".flv")?"flv":-1!==e.src.indexOf(".m3u8")?"hls":"native";return"native"===t?new So(this.video,e):"flv"===t?new e.preset[t](this.video,e):"hls"===t?new e.preset[t](this.video,e):($n.error(this.tag,"not mactch any player, please check your config"),null)}},{key:"attachMedia",value:function(){this.videokernel?this.videokernel.attachMedia():$n.error(this.tag,"video player is not already, must init player")}},{key:"load",value:function(e){var t=this;this.config.src=e||this.config.src,this.videokernel&&this.config.src?(this.videokernel.load(e),this.timer||(this.timer=setTimeout(function(){t.timer=null,t.pause(),t.refresh()},1e3))):$n.error(this.tag,"video player is not already, must init player")}},{key:"destroy",value:function(){this.videokernel?this.videokernel.destroy():$n.error(this.tag,"player is not exit")}},{key:"play",value:function(){this.videokernel?this.videokernel.play():$n.error(this.tag,"video player is not already, must init player")}},{key:"pause",value:function(){this.videokernel&&this.config.src?this.videokernel.pause():$n.error(this.tag,"video player is not already, must init player")}},{key:"seek",value:function(e){if(u(e))return this.videokernel.seek(e);$n.error(this.tag,"seek params must be a number")}},{key:"refresh",value:function(){this.videokernel.refresh()}},{key:"currentTime",get:function(){return this.videokernel?this.video.currentTime:0}},{key:"duration",get:function(){return this.video.duration}},{key:"volume",get:function(){return this.video.volume},set:function(e){this.video.volume=e}},{key:"muted",get:function(){return this.video.muted},set:function(e){this.video.muted=e}},{key:"buffered",get:function(){return this.video.buffered}}]),t}(),xo=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","interruptbegin","interruptend","loadeddata","loadedmetadata","loadstart","mozaudioavailable","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],Ao=["buffered","currentSrc","duration","error","ended","networkState","paused","readyState","seekable","sinkId","controlsList","tabIndex","dataset","offsetHeight","offsetLeft","offsetParent","offsetTop","offsetWidth"],To=["beforeinput","blur","click","compositionend","compositionstart","compositionupdate","dblclick","focus","focusin","focusout","input","keydown","keypress","keyup","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","resize","scroll","select","wheel","fullscreenchange","webkitfullscreenchange","mozfullscreenchange","msfullscreenchange","contextmenu"],Lo=["silentLoad","fullScreen"],Mo=["play","pause","seek"],Co=["load"],zo=["focus","fullScreen","requestFullScreen","exitFullScreen"],Fo=["canPlayType","captureStream","setSinkId"],$o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},No=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Do=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),Io=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},Ro=function e(t,r,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,r,n)}if("value"in i)return i.value;var u=i.get;if(void 0!==u)return u.call(n)},Ho=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},Vo=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},Bo=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)},Wo=/^(before|after|_)/,Yo=function(){function e(t){No(this,e),this.events={},this.onceMap={},this.__dispatcher=t}return Do(e,[{key:"on",value:function(e,t,r){var n=this._getEventStage(t),i=n.stage,o=n.key;this._addEvent([o,i,e],r)}},{key:"off",value:function(e,t,r){var n=this._getEventStage(t),o=n.stage,u=[n.key,o,e];if(!this._removeEvent(u,r)){var a=this._getHandlerFromOnceMap(u,r);i(a)&&this._removeEvent(u,a)&&this._removeFromOnceMap(u,r,a)}}},{key:"once",value:function(e,t,r){var n=this._getEventStage(t),i=n.stage,o=this,u=[n.key,i,e],a=function e(){O(r,this).apply(void 0,arguments),o._removeEvent(u,e),o._removeFromOnceMap(u,r,e)};this._addEvent(u,a),this._addToOnceMap(u,r,a)}},{key:"emit",value:function(e){for(var t=this,r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];if(!e.match(Wo)){var o=this.events[e];if(c(o))return Lo.indexOf(e)>-1?Promise.resolve():this._eventProcessor.apply(this,[e,{sync:!1}].concat(Bo(n)));var u=this._getEventQueue(o.before,this.__dispatcher.order);return j.apply(void 0,[u].concat(Bo(n))).then(function(){if(!(Lo.indexOf(e)>-1))return t._eventProcessor.apply(t,[e,{sync:!1}].concat(Bo(n)))}).catch(function(e){return m(e)&&t.__dispatcher.throwError(e),Promise.reject(e)})}$n.warn("bus","Secondary Event could not be emit")}},{key:"emitSync",value:function(e){if(e.match(Wo))return $n.warn("bus","Secondary Event could not be emit"),!1;for(var t=this.events[e],r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];if(c(t))return Lo.indexOf(e)>-1||this._eventProcessor.apply(this,[e,{sync:!0}].concat(Bo(n)));var o=this._getEventQueue(t.before,this.__dispatcher.order);return x.apply(void 0,[o].concat(Bo(n)))&&(Lo.indexOf(e)>-1||this._eventProcessor.apply(this,[e,{sync:!0}].concat(Bo(n))))}},{key:"trigger",value:function(e){for(var t=this,r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];if(!e.match(Wo)){var o=this.events[e];if(c(o))return Promise.resolve(!0);var u=this._getEventQueue(o.main,this.__dispatcher.order);return j.apply(void 0,[u].concat(Bo(n))).then(function(){var e=t._getEventQueue(o.after,t.__dispatcher.order);return j.apply(void 0,[e].concat(Bo(n)))}).then(function(){return t._runSideEffectEvent.apply(t,[e,t.__dispatcher.order].concat(Bo(n)))}).catch(function(r){return m(r)&&t.__dispatcher.throwError(r),t._runSideEffectEvent.apply(t,[e,t.__dispatcher.order].concat(Bo(n)))})}$n.warn("bus","Secondary Event could not be emit")}},{key:"triggerSync",value:function(e){if(e.match(Wo))return $n.warn("bus","Secondary Event could not be emit"),!1;var t=this.events[e];if(c(t))return!0;for(var r=this._getEventQueue(t.main,this.__dispatcher.order),n=this._getEventQueue(t.after,this.__dispatcher.order),i=arguments.length,o=Array(i>1?i-1:0),u=1;u<i;u++)o[u-1]=arguments[u];var a=x.apply(void 0,[r].concat(Bo(o)))&&x.apply(void 0,[n].concat(Bo(o)));return this._runSideEffectEvent.apply(this,[e,this.__dispatcher.order].concat(Bo(o))),a}},{key:"destroy",value:function(){delete this.events,delete this.__dispatcher}},{key:"_addEvent",value:function(e,t){var r=(e=b(e)).pop(),n=e.reduce(function(e,t){return e[t]=e[t]||{},e[t]},this.events);n[r]=n[r]||[],n[r].push(t)}},{key:"_removeEvent",value:function(e,t){for(var r=(e=b(e)).pop(),n=this.events,i=0,o=e.length;i<o;i++){var u=n[e[i]];if(c(u))return;n=u}var a=n[r]||[],s=a.indexOf(t),l=s>-1;return l&&a.splice(s,1),a.length<1&&delete n[r],l}},{key:"_addToOnceMap",value:function(e,t,r){var n=e.join("-"),i=this.onceMap[n]=this.onceMap[n]||new Map;i.has(t)||i.set(t,[]),i.get(t).push(r)}},{key:"_removeFromOnceMap",value:function(e,t,r){var n=e.join("-"),i=this.onceMap[n],o=i.get(t),u=o.indexOf(r);o.splice(u,1),c(o)&&i.delete(t)}},{key:"_getHandlerFromOnceMap",value:function(e,t){var n=e.join("-"),i=this.onceMap[n];if(!r(i)&&i.has(t))return i.get(t)[0]}},{key:"_getEventStage",value:function(e){var t=e.match(Wo),r=t&&t[0]||"main";return t&&(e=E(e.replace(Wo,""))),{stage:r,key:e}}},{key:"_getEventQueue",value:function(e,t){var r=this;return t=n(t)?t.concat(["_vm"]):["_vm"],c(e)?[]:t.reduce(function(t,i){return c(e[i])||!n(e[i])||!r.__dispatcher.plugins[i]&&"_vm"!==i?t:t.concat(e[i].map(function(e){return O(e,r.__dispatcher.plugins[i]||r.__dispatcher.vm)}))},[])}},{key:"_eventProcessor",value:function(e,t){for(var r=t.sync,n=Mo.indexOf(e)>-1,i=zo.indexOf(e)>-1,o=Co.indexOf(e)>-1,u=arguments.length,a=Array(u>2?u-2:0),s=2;s<u;s++)a[s-2]=arguments[s];if(n||i||o){if(o){var c;(c=this.__dispatcher)[e].apply(c,Bo(a))}else{var l;(l=this.__dispatcher[n?"kernel":"dom"])[e].apply(l,Bo(a))}if(xo.indexOf(e)>-1||To.indexOf(e)>-1)return!0}return this[r?"triggerSync":"trigger"].apply(this,[e].concat(Bo(a)))}},{key:"_runSideEffectEvent",value:function(e,t){for(var r=arguments.length,n=Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];var o=this.events[e];if(!c(o))return this._getEventQueue(o._,t).forEach(function(e){return e.apply(void 0,Bo(n))}),!0}}]),e}(),Go=Ye.Reflect,qo=Go&&Go.ownKeys||function(e){var t=Lr.f(Qe(e)),r=Sr.f;return r?t.concat(r(e)):t};ct(ct.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,r=St(e),n=Dr.f,i=qo(r),o={},u=0;i.length>u;)Hn(o,t=i[u++],n(r,t));return o}});var Uo=Ge.Object.getOwnPropertyDescriptors,Ko=e(t(function(e){e.exports={default:Uo,__esModule:!0}})),Qo=Ge.Object.getOwnPropertySymbols,Zo=e(t(function(e){e.exports={default:Qo,__esModule:!0}}));mn("getOwnPropertyNames",function(){return $r.f});var Jo=Ge.Object,Xo=function(e){return Jo.getOwnPropertyNames(e)},eu=e(t(function(e){e.exports={default:Xo,__esModule:!0}})),tu=Qt("iterator"),ru=Ge.isIterable=function(e){var t=Object(e);return void 0!==t[tu]||"@@iterator"in t||Et.hasOwnProperty(Yn(t))},nu=t(function(e){e.exports={default:ru,__esModule:!0}}),iu=Ge.getIterator=function(e){var t=qn(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return Qe(t.call(e))},ou=t(function(e){e.exports={default:iu,__esModule:!0}}),uu=e(t(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var n=r(nu),i=r(ou);t.default=function(){function e(e,t){var r=[],n=!0,o=!1,u=void 0;try{for(var a,s=(0,i.default)(e);!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,u=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw u}}return r}return function(t,r){if(Array.isArray(t))return t;if((0,n.default)(Object(t)))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()})),au=Qt("species"),su=function(e){var t;return Ar(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!Ar(t.prototype)||(t=void 0),Ke(t)&&null===(t=t[au])&&(t=void 0)),void 0===t?Array:t},cu=function(e,t){return new(su(e))(t)},lu=function(e,t){var r=1==e,n=2==e,i=3==e,o=4==e,u=6==e,a=5==e||u,s=t||cu;return function(t,c,l){for(var f,d,h=rr(t),p=Pt(h),v=Ue(c,l,3),y=xt(p.length),g=0,m=r?s(t,y):n?s(t,0):void 0;y>g;g++)if((a||g in p)&&(f=p[g],d=v(f,g,h),e))if(r)m[g]=d;else if(d)switch(e){case 3:return!0;case 5:return f;case 6:return g;case 2:m.push(f)}else if(o)return!1;return u?-1:i||o?o:m}},fu=Er.getWeak,du=lu(5),hu=lu(6),pu=0,vu=function(e){return e._l||(e._l=new yu)},yu=function(){this.a=[]},gu=function(e,t){return du(e.a,function(e){return e[0]===t})};yu.prototype={get:function(e){var t=gu(this,e);if(t)return t[1]},has:function(e){return!!gu(this,e)},set:function(e,t){var r=gu(this,e);r?r[1]=t:this.a.push([e,t])},delete:function(e){var t=hu(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}};var mu={getConstructor:function(e,t,r,n){var i=e(function(e,o){ui(e,i,t,"_i"),e._i=pu++,e._l=void 0,void 0!=o&&ai(o,r,e[n],e)});return xi(i.prototype,{delete:function(e){if(!Ke(e))return!1;var t=fu(e);return!0===t?vu(this).delete(e):t&&wt(t,this._i)&&delete t[this._i]},has:function(e){if(!Ke(e))return!1;var t=fu(e);return!0===t?vu(this).has(e):t&&wt(t,this._i)}}),i},def:function(e,t,r){var n=fu(Qe(t),!0);return!0===n?vu(e).set(t,r):n[e._i]=r,e},ufstore:vu},_u=ot.f,bu=lu(0),wu=function(e,t,r,n,i,o){var u=Ye[e],a=u,s=i?"set":"add",c=a&&a.prototype,l={};return Je&&"function"==typeof a&&(o||c.forEach&&!Ze(function(){(new a).entries().next()}))?(a=t(function(t,r){ui(t,a,e,"_c"),t._c=new u,void 0!=r&&ai(r,i,t[s],t)}),bu("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(e){var t="add"==e||"set"==e;e in c&&(!o||"clear"!=e)&&at(a.prototype,e,function(r,n){if(ui(this,a,e),!t&&o&&!Ke(r))return"get"==e&&void 0;var i=this._c[e](0===r?0:r,n);return t?this:i})}),"size"in c&&_u(a.prototype,"size",{get:function(){return this._c.size}})):(a=n.getConstructor(t,e,i,s),xi(a.prototype,r),Er.NEED=!0),Xt(a,e),l[e]=a,ct(ct.G+ct.W+ct.F,l),o||n.setStrong(a,e,i),a},Eu=(t(function(e){var t,r=lu(0),n=Er.getWeak,i=Object.isExtensible,o=mu.ufstore,u={},a=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},s={get:function(e){if(Ke(e)){var t=n(e);return!0===t?o(this).get(e):t?t[this._i]:void 0}},set:function(e,t){return mu.def(this,e,t)}},c=e.exports=wu("WeakMap",a,s,mu,!0,!0);7!=(new c).set((Object.freeze||Object)(u),7).get(u)&&(t=mu.getConstructor(a),Ji(t.prototype,s),Er.NEED=!0,r(["delete","has","get","set"],function(e){var r=c.prototype,n=r[e];_t(r,e,function(r,o){if(Ke(r)&&!i(r)){this._f||(this._f=new t);var u=this._f[e](r,o);return"set"==e?this:u}return n.call(this,r,o)})}))}),Ge.WeakMap),ku=e(t(function(e){e.exports={default:Eu,__esModule:!0}})),Ou=e(t(function(e,t){t.__esModule=!0;var r=function(e){return e&&e.__esModule?e:{default:e}}(dt);t.default=function(e,t,n){return t in e?(0,r.default)(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}})),Pu=Er.onFreeze;mn("preventExtensions",function(e){return function(t){return e&&Ke(t)?e(Pu(t)):t}});var Su,ju,xu,Au,Tu,Lu,Mu,Cu,zu,Fu,$u,Nu,Du,Iu,Ru,Hu,Vu,Bu,Wu,Yu,Gu,qu,Uu,Ku,Qu,Zu,Ju,Xu,ea,ta,ra,na,ia,oa,ua,aa,sa,ca,la,fa,da,ha,pa,va,ya,ga,ma,_a,ba,wa,Ea,ka,Oa,Pa,Sa,ja,xa,Aa,Ta,La=Ge.Object.preventExtensions,Ma=e(t(function(e){e.exports={default:La,__esModule:!0}})),Ca=Oo,za=function(){var e=eu,t=Zo;return i(t)?function(r){return ni(e(r).concat(t(r)))}:e}(),Fa=i(Ko)?Ko:function(e){return za(e).reduce(function(t,r){return t[r]=Ca(e,r),t},{})},$a=Oo,Na=ht,Da=ht,Ia=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=t.requirement,u=t.customArgs,a=void 0!==u&&u;return function(){for(var t=arguments.length,u=Array(t>1?t-1:0),s=1;s<t;s++)u[s-1]=arguments[s];var c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},l=c.exclude,f=void 0===l?[]:l,d=c.include,p=void 0===d?[]:d,v=c.construct,y=void 0!==v&&v,g=c.self,m=void 0!==g&&g;if(!n(f))throw new TypeError("options.exclude must be an array");if(!n(p))throw new TypeError("options.include must be an array");return function(t){var n=i(t);if(!m&&!n)throw new TypeError("@"+e.name+"Class can only be used on class");if(m&&h(t))throw new TypeError("@"+e.name+"Class must be used on non-primitive type value in 'self' mode");var s=m?t:t.prototype;if(r(s))throw new Error("The prototype of the "+t.name+" is empty, please check it");var c=Fa(s);za(s).concat(p).forEach(function(t){var r=c[t];"constructor"===t&&!y||m&&n&&["name","length","prototype"].indexOf(t)>-1||f.indexOf(t)>-1||i(o)&&!1===o(s,t,r,{self:m})||Da(s,t,(a?e.apply(void 0,ii(u)):e)(s,t,r))})}}}(he,{requirement:function(e,t,r){return te(r)&&i(r.value)}}),Ra=void 0,Ha=ht,Va=Oo,Ba=ht,Wa=ht,Ya=ht,Ga=Oo,qa=["push","pop","unshift","shift","splice","sort","reverse"],Ua=Ma,Ka={src:[function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=l(t[0])?t.shift():"";return t.unshift(function(e){return l(e)?e:n}),ae({set:t,get:t})}(),ae({set:function(e){return this.dispatcher.readySync&&this.autoload&&e!==this.src&&(this.needToLoadSrc=!0),e}}),ae({set:function(e){return this.needToLoadSrc&&(this.needToLoadSrc=!1,this.dispatcher.bus.emit("load",e)),e}},{preSet:!1})],autoload:ke(),autoplay:[ke(),Te("autoplay")],controls:[ke(),Te("controls")],width:[Ce("width")],height:[Ce("height")],crossOrigin:[ae({set:Ae}),Le({set:"crossorigin",get:"crossOrigin"})],loop:[ke(),Te("loop")],defaultMuted:[ke(),Le({get:"defaultMuted",set:"muted",isBoolean:!0})],muted:[ke(),Te("muted")],preload:[ae({set:Ae}),Le("preload")],poster:[ae({set:Ae}),Le("poster")],playsInline:[ae({get:function(e){var t=this.dom.videoElement.playsInline;return this.dispatcher.videoConfigReady&&this.inited?void 0===t?e:t:e},set:function(e){if(!this.dispatcher.videoConfigReady)return e;this.dom.videoElement.playsInline=e;var t=e?"":void 0;return this.dom.setAttr("video","playsinline",t),this.dom.setAttr("video","webkit-playsinline",t),this.dom.setAttr("video","x5-video-player-type",e?"h5":void 0),e}}),ke()],x5VideoPlayerFullScreen:[ae({set:function(e){return!!e},get:function(e){return!!e}}),Me("x5-video-player-fullscreen",!0)],x5VideoOrientation:[ae({set:Ae}),Me("x5-video-orientation")],xWebkitAirplay:[ae({set:function(e){return!!e},get:function(e){return!!e}}),Me("x-webkit-airplay",!0)],playbackRate:[Oe(1),Te("playbackRate")],defaultPlaybackRate:[Te("defaultPlaybackRate"),Oe(1)],disableRemotePlayback:[ke(),Te("disableRemotePlayback")],volume:[Oe(1),Te("volume")]},Qa=(Su=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=!!f(t[0])&&t.shift();return t.unshift(function(e){return f(e)?e:n}),ce.apply(void 0,t)}(),ju=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=l(t[0])?t.shift():"";return t.unshift(function(e){return l(e)?e:n}),ce.apply(void 0,t)}(function(e){return e.toLocaleLowerCase()}),xu=function(){function e(t,r){No(this,e),je(this,"needToLoadSrc",Au,this),je(this,"changeWatchable",Tu,this),je(this,"inited",Lu,this),this.src="",je(this,"isLive",Mu,this),je(this,"box",Cu,this),this.preset={},this.autoload=!0,this.autoplay=!1,this.controls=!1,this.width=void 0,this.height=void 0,this.crossOrigin=void 0,this.loop=!1,this.defaultMuted=!1,this.muted=!1,this.preload="auto",this.poster=void 0,this.playsInline=!1,this.x5VideoPlayerFullScreen=!1,this.x5VideoOrientation=void 0,this.xWebkitAirplay=!1,this.playbackRate=1,this.defaultPlaybackRate=1,this.disableRemotePlayback=!1,this.volume=1,je(this,"_kernelProperty",zu,this),je(this,"_realDomAttr",Fu,this),ge(this,Ka,{self:!0}),Object.defineProperty(this,"dispatcher",{value:t,enumerable:!1,writable:!1,configurable:!1}),Object.defineProperty(this,"dom",{value:t.dom,enumerable:!1,writable:!1,configurable:!1}),w(this,r)}return Do(e,[{key:"lockKernelProperty",value:function(){ge(this,{isLive:ve,box:ve,preset:ve},{self:!0})}}]),Do(e,[{key:"init",value:function(){var e=this;this._realDomAttr.forEach(function(t){e[t]=e[t]}),this.inited=!0}}]),e}(),Au=xe(xu.prototype,"needToLoadSrc",[ye],{enumerable:!0,initializer:function(){return!1}}),Tu=xe(xu.prototype,"changeWatchable",[ye],{enumerable:!0,initializer:function(){return!0}}),Lu=xe(xu.prototype,"inited",[ye],{enumerable:!0,initializer:function(){return!1}}),Mu=xe(xu.prototype,"isLive",[Su,Ee],{enumerable:!0,initializer:function(){return!1}}),Cu=xe(xu.prototype,"box",[ju,Ee],{enumerable:!0,initializer:function(){return""}}),zu=xe(xu.prototype,"_kernelProperty",[pe],{enumerable:!0,initializer:function(){return["isLive","box","preset"]}}),Fu=xe(xu.prototype,"_realDomAttr",[pe],{enumerable:!0,initializer:function(){return["src","controls","width","height","crossOrigin","loop","muted","preload","poster","autoplay","playsInline","x5VideoPlayerFullScreen","x5VideoOrientation","xWebkitAirplay","playbackRate","defaultPlaybackRate","autoload","disableRemotePlayback","defaultMuted","volume"]}}),xu),Za=($u=Ia(),Nu=fe("silentLoad"),Du=fe("fullScreen"),Iu=fe("emit"),Ru=fe("emitSync"),Hu=fe("on"),Vu=fe("addEventListener"),Bu=se(Pe),Wu=fe("off"),Yu=fe("removeEventListener"),Gu=se(Pe),qu=fe("once"),Uu=se(Pe),Ku=fe("css"),Qu=se(Se),Zu=fe("attr"),Ju=se(Se),$u((ea=function(){function e(){No(this,e),this.__events={},this.__unwatchHandlers=[]}return Do(e,[{key:"__wrapAsVideo",value:function(e){var t=this;Ao.forEach(function(e){Object.defineProperty(t,e,{get:function(){return this.__dispatcher.dom.videoElement[e]},set:void 0,configurable:!1,enumerable:!1})}),Fo.forEach(function(e){Object.defineProperty(t,e,{get:function(){var t=this.__dispatcher.dom.videoElement;return O(t[e],t)},set:void 0,configurable:!1,enumerable:!1})}),ge(this,e._realDomAttr.concat(e._kernelProperty).reduce(function(t,r){return t[r]=[ae({get:function(){return e[r]},set:function(t){return e[r]=t,t}}),ye],t},{}),{self:!0}),Mo.forEach(function(e){Object.defineProperty(t,e,{value:function(){for(var t=this,r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];return new Promise(function(r,i){var o;t.__dispatcher.bus.once(t.__id,"_"+e,r),(o=t.__dispatcher.bus)[/^(seek)$/.test(e)?"emitSync":"emit"].apply(o,[e].concat(Bo(n)))})},configurable:!0,enumerable:!1,writable:!0})}),zo.forEach(function(e){"fullScreen"!==e&&Object.defineProperty(t,e,{value:function(){var t;return(t=this.__dispatcher.dom)[e].apply(t,arguments)},configurable:!0,enumerable:!1,writable:!0})})}},{key:"$watch",value:function(e,t){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i.deep,u=i.diff,a=void 0===u||u,s=i.other,c=i.proxy,f=void 0!==c&&c;if(!l(e)&&!n(e))throw new TypeError("$watch only accept string and Array<string> as key to find the target to spy on, but not "+e+", whose type is "+(void 0===e?"undefined":$o(e)));var d=!0,h=function e(){d=!1;var t=r.__unwatchHandlers.indexOf(e);t>-1&&r.__unwatchHandlers.splice(t,1)},p=l(e)?e.split("."):e,v=p.pop(),y=this.__dispatcher.videoConfig;return ge(0===p.length&&!s&&y._realDomAttr.indexOf(v)>-1?y:["isFullScreen","fullScreenElement"].indexOf(v)>-1?this.__dispatcher.dom:P(s||this,p,{throwError:!0}),Io({},v,be(function(){!d||this instanceof Qa&&!this.dispatcher.changeWatchable||O(t,this).apply(void 0,arguments)},{deep:o,diff:a,proxy:f})),{self:!0}),this.__unwatchHandlers.push(h),h}},{key:"$set",value:function(e,t,r){if(!o(e)&&!n(e))throw new TypeError("$set only support Array or Object, but not "+e+", whose type is "+(void 0===e?"undefined":$o(e)));if(!i(e.__set))return $n.warn("chimee",JSON.stringify(e)+" has not been deep watch. There is no need to use $set."),void(e[t]=r);e.__set(t,r)}},{key:"$del",value:function(e,t){if(!o(e)&&!n(e))throw new TypeError("$del only support Array or Object, but not "+e+", whose type is "+(void 0===e?"undefined":$o(e)));if(!i(e.__del))return $n.warn("chimee",JSON.stringify(e)+" has not been deep watch. There is no need to use $del."),void delete e[t];e.__del(t)}},{key:"load",value:function(){for(var e=this,t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return new Promise(function(t,n){var i;e.__dispatcher.bus.once(e.__id,"_load",t),(i=e.__dispatcher.bus).emit.apply(i,["load"].concat(r))})}},{key:"$silentLoad",value:function(){for(var e=this,t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return this.__dispatcher.bus.emit("silentLoad").then(function(){var t;return(t=e.__dispatcher).silentLoad.apply(t,r)}).then(function(t){e.__dispatcher.bus.trigger("silentLoad",t)})}},{key:"$fullScreen",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"container";if(!this.__dispatcher.bus.emitSync("fullScreen",e,t))return!1;var r=this.__dispatcher.dom.fullScreen(e,t);return this.__dispatcher.bus.triggerSync("fullScreen",e,t),r}},{key:"$emit",value:function(e){var t;if(!l(e))throw new TypeError("emit key parameter must be String");To.indexOf(e.replace(/^\w_/,""))>-1&&$n.warn("plugin","You are try to emit "+e+" event. As emit is wrapped in Promise. It make you can't use event.preventDefault and event.stopPropagation. So we advice you to use emitSync");for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];(t=this.__dispatcher.bus).emit.apply(t,[e].concat(Bo(n)))}},{key:"$emitSync",value:function(e){var t;if(!l(e))throw new TypeError("emitSync key parameter must be String");for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return(t=this.__dispatcher.bus).emitSync.apply(t,[e].concat(Bo(n)))}},{key:"$on",value:function(e,t){this.__dispatcher.bus.on(this.__id,e,t),this.__addEvents(e,t)}},{key:"$off",value:function(e,t){this.__dispatcher.bus.off(this.__id,e,t),this.__removeEvents(e,t)}},{key:"$once",value:function(e,t){var r=this,n=function n(){O(t,this).apply(void 0,arguments),r.__removeEvents(e,n)};r.__addEvents(e,n),this.__dispatcher.bus.once(this.__id,e,n)}},{key:"$css",value:function(e){for(var t,r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return(t=this.__dispatcher.dom)[e+"Style"].apply(t,n)}},{key:"$attr",value:function(e){for(var t,r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];if("set"===e&&/video/.test(n[0])){if(!this.__dispatcher.videoConfigReady)return $n.warn("chimee",this.__id+" is tring to set attribute on video before video inited. Please wait until the inited event has benn trigger"),n[2];if(this.__dispatcher.videoConfig._realDomAttr.indexOf(n[1])>-1){var o=n[1],u=n[2];return this.__dispatcher.videoConfig[o]=u,u}}return(t=this.__dispatcher.dom)[e+"Attr"].apply(t,n)}},{key:"__addEvents",value:function(e,t){this.__events[e]=this.__events[e]||[],this.__events[e].push(t)}},{key:"__removeEvents",value:function(e,t){if(!c(this.__events[e])){var r=this.__events[e].indexOf(t);r<0||(this.__events[e].splice(r,1),c(this.__events[e])&&delete this.__events[e])}}},{key:"__destroy",value:function(){var e=this;this.__unwatchHandlers.forEach(function(e){return e()}),Object.keys(this.__events).forEach(function(t){n(e.__events[t])&&e.__events[t].forEach(function(r){return e.$off(t,r)})}),delete this.__events}},{key:"currentTime",get:function(){return this.__dispatcher.kernel.currentTime},set:function(e){this.__dispatcher.bus.emitSync("seek",e)}},{key:"$plugins",get:function(){return this.__dispatcher.plugins}},{key:"$pluginOrder",get:function(){return this.__dispatcher.order}},{key:"$wrapper",get:function(){return Fe("wrapper"),this.__dispatcher.dom.wrapper}},{key:"$container",get:function(){return Fe("container"),this.__dispatcher.dom.container}},{key:"$video",get:function(){return Fe("video"),this.__dispatcher.dom.videoElement}},{key:"isFullScreen",get:function(){return this.__dispatcher.dom.isFullScreen}},{key:"fullScreenElement",get:function(){return this.__dispatcher.dom.fullScreenElement}}]),e}(),ze(ea.prototype,"$silentLoad",[Nu],Object.getOwnPropertyDescriptor(ea.prototype,"$silentLoad"),ea.prototype),ze(ea.prototype,"$fullScreen",[Du],Object.getOwnPropertyDescriptor(ea.prototype,"$fullScreen"),ea.prototype),ze(ea.prototype,"$emit",[Iu],Object.getOwnPropertyDescriptor(ea.prototype,"$emit"),ea.prototype),ze(ea.prototype,"$emitSync",[Ru],Object.getOwnPropertyDescriptor(ea.prototype,"$emitSync"),ea.prototype),ze(ea.prototype,"$on",[Hu,Vu,Bu],Object.getOwnPropertyDescriptor(ea.prototype,"$on"),ea.prototype),ze(ea.prototype,"$off",[Wu,Yu,Gu],Object.getOwnPropertyDescriptor(ea.prototype,"$off"),ea.prototype),ze(ea.prototype,"$once",[qu,Uu],Object.getOwnPropertyDescriptor(ea.prototype,"$once"),ea.prototype),ze(ea.prototype,"$css",[Ku,Qu],Object.getOwnPropertyDescriptor(ea.prototype,"$css"),ea.prototype),ze(ea.prototype,"$attr",[Zu,Ju],Object.getOwnPropertyDescriptor(ea.prototype,"$attr"),ea.prototype),ze(ea.prototype,"$plugins",[ye,we],Object.getOwnPropertyDescriptor(ea.prototype,"$plugins"),ea.prototype),ze(ea.prototype,"$pluginOrder",[ye,we],Object.getOwnPropertyDescriptor(ea.prototype,"$pluginOrder"),ea.prototype),ze(ea.prototype,"$wrapper",[ye],Object.getOwnPropertyDescriptor(ea.prototype,"$wrapper"),ea.prototype),ze(ea.prototype,"$container",[ye],Object.getOwnPropertyDescriptor(ea.prototype,"$container"),ea.prototype),ze(ea.prototype,"$video",[ye],Object.getOwnPropertyDescriptor(ea.prototype,"$video"),ea.prototype),Xu=ea))||Xu),Ja=(ta=Ia())(ra=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.id,n=e.name,u=e.level,a=void 0===u?0:u,d=e.operable,h=void 0===d||d,p=e.beforeCreate,v=e.create,y=e.init,g=e.inited,m=e.destroy,_=e.events,b=void 0===_?{}:_,E=e.data,k=void 0===E?{}:E,P=e.computed,S=void 0===P?{}:P,j=e.methods,x=void 0===j?{}:j,A=e.el,T=e.penetrate,L=void 0!==T&&T,M=e.inner,C=void 0===M||M,z=e.autoFocus,F=e.className,$=arguments[1],N=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{name:n};No(this,t);var D=Vo(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(D.destroyed=!1,D.VERSION="0.2.3",D.__operable=!0,D.__level=0,c($))throw $n.error("Dispatcher.plugin","lack of dispatcher. Do you forget to pass arguments to super in plugin?"),new TypeError("lack of dispatcher");if(!l(r))throw new TypeError("id of PluginConfig must be string");D.__id=r,D.__dispatcher=$,D.$videoConfig=D.__dispatcher.videoConfig,D.__wrapAsVideo(D.$videoConfig),D.beforeCreate=D.beforeCreate||p;try{i(D.beforeCreate)&&D.beforeCreate({events:b,data:k,computed:S,methods:x},N)}catch(e){D.$throwError(e)}if(!c(x)&&o(x)&&Object.keys(x).forEach(function(e){var t=x[e];if(!i(t))throw new TypeError("plugins methods must be Function");Object.defineProperty(D,e,{value:O(t,D),writable:!0,enumerable:!1,configurable:!0})}),!c(b)&&o(b)&&Object.keys(b).forEach(function(e){if(!i(b[e]))throw new TypeError("plugins events hook must bind with Function");D.$on(e,b[e])}),!c(k)&&o(k)&&w(D,k),!c(S)&&o(S)){var I=Object.keys(S).reduce(function(e,t){var r=S[t];return i(r)?(e[t]=ae({get:r}),e):o(r)&&(i(r.get)||i(r.set))?(e[t]=ae(r),e):($n.warn("Dispatcher.plugin","Wrong computed member '"+t+"' defination in Plugin "+n),e)},{});ge(D,I,{self:!0})}D.create=D.create||v,D.init=D.init||y,D.inited=D.inited||g,D.destroy=D.destroy||m,D.$dom=D.__dispatcher.dom.insertPlugin(D.__id,A,{penetrate:L,inner:C,autoFocus:z,className:F}),D.$inner=C,D.$autoFocus=z,D.$penetrate=L,ge(D,{$inner:pe,$autoFocus:pe,$penetrate:pe},{self:!0}),D.$operable=f(N.operable)?N.operable:h,D.__level=s(N.level)?N.level:a,D.$config=N;try{i(D.create)&&D.create()}catch(e){D.$throwError(e)}return D}return Ho(t,Za),Do(t,[{key:"__init",value:function(e){try{i(this.init)&&this.init(e)}catch(e){this.$throwError(e)}}},{key:"__inited",value:function(){var e=this,t=void 0;try{t=i(this.inited)&&this.inited()}catch(e){this.$throwError(e)}return this.readySync=!d(t),this.ready=this.readySync?Promise.resolve():t.then(function(t){return e.readySync=!0,t}).catch(function(t){return m(t)?e.$throwError(t):Promise.reject(t)}),this.readySync||this.ready}},{key:"$bumpToTop",value:function(){var e=this.__dispatcher._getTopLevel(this.$inner);this.$level=e+1}},{key:"$throwError",value:function(e){this.__dispatcher.throwError(e)}},{key:"$destroy",value:function(){i(this.destroy)&&this.destroy(),Ro(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"__destroy",this).call(this),this.__dispatcher.dom.removePlugin(this.__id),delete this.__dispatcher,delete this.$dom,this.destroyed=!0}},{key:"$operable",set:function(e){f(e)&&(this.$dom.style.pointerEvents=e?"auto":"none",this.__operable=e)},get:function(){return this.__operable}},{key:"$level",set:function(e){s(e)&&(this.__level=e,this.__dispatcher._sortZIndex())},get:function(){return this.__level}}]),t}())||ra,Xa=(na=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).other;if(!i(e)&&!d(e)&&!l(e))throw new TypeError("@waitUntil only accept Function, Promise or String");return function(n,o,u){if(void 0===u)throw new Error("@waituntil must used on descriptor, are you using it on undefined property?");var a=u.value,s=u.configurable;if(!i(a))throw new TypeError("@waituntil can only be used on function, but not "+a);var c=!1,l=[],f=d(e)?function(){return e}:i(e)?e:function(){var n=e.split("."),i=n.slice(-1),o=h(t)?this:t;if(!c){var u=P(o,n.slice(0,-1));if(r(u))return u;var a=Va(u,i),s=function(e){if(!0===e)for(;l.length>0;)l[0](),l.shift();return e},f=X(a)?ae({set:s})(u,i,a):ae({set:s})(u,i,{value:void 0,configurable:!0,enumerable:!0,writable:!0});Ba(u,i,f),c=!0}return P(o,n)};return{value:function(){for(var e=this,t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=O(a,this),o=O(f,this).apply(void 0,r);return d(o)?Qi.resolve(o).then(function(){return O(a,e).apply(void 0,r)}):!0===o?O(a,this).apply(void 0,r):new Qi(function(e){l.push(function(){i.apply(void 0,r),e()})})},enumerable:!1,configurable:s,writable:!1}}}("__dispatcher.videoConfigReady"),ia=se(De,Ne),oa=se(De,Ne),ua=se(De,Ne),aa=se(De,Ne),sa=se(Ne),ca=function(){function e(t,r){var n=this;if(No(this,e),this.plugins={},this.originHTML="",this.videoEventHandlerList=[],this.videoDomEventHandlerList=[],this.containerDomEventHandlerList=[],this.wrapperDomEventHandlerList=[],this.__domEventHandlerList={},this.__mouseInVideo=!1,this.__videoExtendedNodes=[],this.isFullScreen=!1,this.fullScreenElement=void 0,this.__dispatcher=r,!v(t)&&!l(t))throw new TypeError("Illegal wrapper");var i=J(t);if(0===i.length)throw new TypeError("Can not get dom node accroding wrapper. Please check your wrapper");this.wrapper=i[0],this.originHTML=this.wrapper.innerHTML;var o=i.find("video")[0];o||(o=document.createElement("video")),this.installVideo(o),To.forEach(function(e){var t=function(){for(var t,r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return(t=n.__dispatcher.bus).triggerSync.apply(t,["c_"+e].concat(i))};n.containerDomEventHandlerList.push(t),W(n.container,e,t);var r=function(){for(var t,r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return(t=n.__dispatcher.bus).triggerSync.apply(t,["w_"+e].concat(i))};n.wrapperDomEventHandlerList.push(r),W(n.wrapper,e,r)}),this._bindFullScreen()}return Do(e,[{key:"installVideo",value:function(e){var t=this;if(this.__videoExtendedNodes.push(e),I(e,"tabindex",-1),this._autoFocusToVideo(e),v(this.container)){var r=this.container;0===r.childNodes.length?r.appendChild(e):r.insertBefore(e,r.childNodes[0])}else e.parentElement&&v(e.parentElement)&&e.parentElement!==this.wrapper?this.container=e.parentElement:(this.container=document.createElement("container"),J(this.container).append(e));return this.container.parentElement!==this.wrapper&&J(this.wrapper).append(this.container),xo.forEach(function(r){var n=function(){for(var e,n=arguments.length,i=Array(n),o=0;o<n;o++)i[o]=arguments[o];return(e=t.__dispatcher.bus).trigger.apply(e,[r].concat(i))};t.videoEventHandlerList.push(n),W(e,r,n)}),To.forEach(function(r){var n=t._getEventHandler(r,{penetrate:!0});t.videoDomEventHandlerList.push(n),W(e,r,n)}),this.videoElement=e,e}},{key:"removeVideo",value:function(){var e=this,t=this.videoElement;return this._autoFocusToVideo(this.videoElement,!1),xo.forEach(function(t,r){B(e.videoElement,t,e.videoEventHandlerList[r])}),To.forEach(function(t,r){B(e.videoElement,t,e.videoDomEventHandlerList[r])}),J(t).remove(),delete this.videoElement,t}},{key:"insertPlugin",value:function(e,t){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!l(e))throw new TypeError("insertPlugin id parameter must be string");if(v(this.plugins[e])&&($n.warn("Dispatcher.dom","Plugin "+e+" have already had a dom node. Now it will be replaced"),this.removePlugin(e)),l(t))if(g(t)){var u=document.createElement("div");u.innerHTML=t,t=u.children[0]}else t=document.createElement(k(t));else o(t)&&(i=t);var a=i,s=a.inner,c=a.penetrate,d=a.autoFocus,h=i.className,p=t&&v(t)?t:document.createElement("div");n(h)&&(h=h.join(" ")),l(h)&&R(p,h),this.plugins[e]=p;var y=s?this.container:this.wrapper,m=s?this.videoElement:this.container;return(f(d)?d:s)&&this._autoFocusToVideo(p),c&&(this.__domEventHandlerList[e]=this.__domEventHandlerList[e]||[],To.forEach(function(t){var n=r._getEventHandler(t,{penetrate:c});W(p,t,n),r.__domEventHandlerList[e].push(n)}),this.__videoExtendedNodes.push(p)),y.lastChild===m?(y.appendChild(p),p):(y.insertBefore(p,m.nextSibling),p)}},{key:"removePlugin",value:function(e){var t=this;if(l(e)){var r=this.plugins[e];v(r)&&(r.parentNode&&r.parentNode.removeChild(r),this._autoFocusToVideo(r,!0)),c(this.__domEventHandlerList[e])||(To.forEach(function(r,n){B(t.plugins[e],r,t.__domEventHandlerList[e][n])}),delete this.__domEventHandlerList[e]),delete this.plugins[e]}}},{key:"setPluginsZIndex",value:function(e){var t=this;e.forEach(function(e,r){return U(e.match(/^(videoElement|container)$/)?t[e]:t.plugins[e],"z-index",++r)})}},{key:"setAttr",value:function(e,t,r){I(this[e],t,r)}},{key:"getAttr",value:function(e,t){return D(this[e],t)}},{key:"setStyle",value:function(e,t,r){U(this[e],t,r)}},{key:"getStyle",value:function(e,t){return q(this[e],t)}},{key:"requestFullScreen",value:function(e){for(var t=["requestFullscreen","mozRequestFullScreen","webkitRequestFullscreen","msRequestFullscreen"],r=0,n=t.length;r<n;r++)if(i(this[e][t[r]]))return this[e][t[r]](),!0;return!1}},{key:"exitFullScreen",value:function(){for(var e=["exitFullscreen","msExitFullscreen","mozCancelFullScreen","webkitExitFullscreen"],t=0,r=e.length;t<r;t++)if(i(document[e[t]]))return document[e[t]](),!0;return!1}},{key:"fullScreen",value:function(){for(var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"container",r=arguments.length,n=Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];return e?this.requestFullScreen.apply(this,[t].concat(Bo(n))):this.exitFullScreen.apply(this,Bo(n))}},{key:"focus",value:function(){this.videoElement.focus()}},{key:"destroy",value:function(){var e=this;this.removeVideo(),To.forEach(function(t,r){B(e.container,t,e.containerDomEventHandlerList[r]),B(e.wrapper,t,e.wrapperDomEventHandlerList[r])}),this._bindFullScreen(!0),this.wrapper.innerHTML=this.originHTML,delete this.wrapper,delete this.plugins}},{key:"_autoFocusToVideo",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(t?B:W)(e,"mouseup",this._focusToVideo,!1,!0),(t?B:W)(e,"touchend",this._focusToVideo,!1,!0)}},{key:"_focusToVideo",value:function(e){var t=window.scrollX,r=window.scrollY;i(this.videoElement.focus)&&this.videoElement.focus(),window.scrollTo(t,r)}},{key:"_fullScreenMonitor",value:function(){var e=["fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement"].reduce(function(e,t){return e||document[t]},null);if(!e||!y(this.wrapper,e)&&e!==this.wrapper)return this.isFullScreen=!1,void(this.fullScreenElement=void 0);this.isFullScreen=!0,this.fullScreenElement=this.wrapper===e?"wrapper":this.container===e?"container":this.videoElement===e?"video":e}},{key:"_bindFullScreen",value:function(e){var t=this;e||this._fullScreenMonitor(),["webkitfullscreenchange","mozfullscreenchange","msfullscreenchange","fullscreenchange"].forEach(function(r){document[(e?"remove":"add")+"EventListener"](r,t._fullScreenMonitor)})}},{key:"_getEventHandler",value:function(e,t){var r=this;if(!t.penetrate||["mouseenter","mouseleave"].indexOf(e)<0)return function(){for(var t,n=arguments.length,i=Array(n),o=0;o<n;o++)i[o]=arguments[o];(t=r.__dispatcher.bus).triggerSync.apply(t,[e].concat(i))};var n=function(e){return r.__videoExtendedNodes.indexOf(e)>-1||r.__videoExtendedNodes.reduce(function(t,r){return t||y(r,e)},!1)};return function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];var o=t[0],u=o.toElement,a=o.currentTarget,s=o.relatedTarget,c=o.type,l=u||s;if(r.__mouseInVideo&&"mouseleave"===c&&!n(l)){var f;return r.__mouseInVideo=!1,(f=r.__dispatcher.bus).triggerSync.apply(f,["mouseleave"].concat(t))}if(!r.__mouseInVideo&&"mouseenter"===c&&n(a)){var d;return r.__mouseInVideo=!0,(d=r.__dispatcher.bus).triggerSync.apply(d,["mouseenter"].concat(t))}}}}]),e}(),$e(ca.prototype,"setAttr",[na,ia],Object.getOwnPropertyDescriptor(ca.prototype,"setAttr"),ca.prototype),$e(ca.prototype,"getAttr",[oa],Object.getOwnPropertyDescriptor(ca.prototype,"getAttr"),ca.prototype),$e(ca.prototype,"setStyle",[ua],Object.getOwnPropertyDescriptor(ca.prototype,"setStyle"),ca.prototype),$e(ca.prototype,"getStyle",[aa],Object.getOwnPropertyDescriptor(ca.prototype,"getStyle"),ca.prototype),$e(ca.prototype,"requestFullScreen",[sa],Object.getOwnPropertyDescriptor(ca.prototype,"requestFullScreen"),ca.prototype),$e(ca.prototype,"_focusToVideo",[he],Object.getOwnPropertyDescriptor(ca.prototype,"_focusToVideo"),ca.prototype),$e(ca.prototype,"_fullScreenMonitor",[he],Object.getOwnPropertyDescriptor(ca.prototype,"_fullScreenMonitor"),ca.prototype),ca),es={},ts=(la=se(Re),fa=se(function(e){if(i(e)){if(!(e.prototype instanceof Ja))throw new TypeError("Your are trying to install plugin "+e.name+", but it's not extends from Chimee.plugin.")}else{if(!o(e)||c(e))throw new TypeError("plugin's config must be an Object");var t=e.name;if(!l(t)||t.length<1)throw new TypeError("plugin must have a legal name")}}),da=se(Re),ha=se(Re),pa=se(Re),va=function(){function e(t,r){var n=this;if(No(this,e),this.plugins={},this.order=[],this.readySync=!1,this.zIndexMap={inner:[],outer:[]},this.changeWatchable=!0,!o(t))throw new TypeError("UserConfig must be an Object");this.dom=new Xa(t.wrapper,this),this.bus=new Yo(this),this.vm=r,this.videoConfigReady=!1,this.videoConfig=new Qa(this,t),this._initUserPlugin(t.plugin),this.order.forEach(function(e){return n.plugins[e].__init(n.videoConfig)}),this.videoConfig.lockKernelProperty(),this.videoConfigReady=!0,this.videoConfig.init(),this.kernel=new jo(this.dom.videoElement,this.videoConfig);var i=[];this.order.forEach(function(e){var t=n.plugins[e].__inited();d(t)&&i.push(t)}),this.readySync=0===i.length,this.ready=this.readySync?Promise.resolve():Promise.all(i).then(function(){n.readySync=!0,n.bus.trigger("ready"),n._autoloadVideoSrcAtFirst()}),this.readySync&&this._autoloadVideoSrcAtFirst()}return Do(e,[{key:"use",value:function(t){if(l(t)&&(t={name:t,alias:void 0}),!o(t)||o(t)&&!l(t.name))throw new TypeError("pluginConfig do not match requirement");l(t.alias)||(t.alias=void 0);var r=t,n=r.name,u=r.alias;t.name=u||n,delete t.alias;var a=E(n),s=E(u||n),f=t,d=e.getPluginConfig(a);if(c(d))throw new TypeError("You have not installed plugin "+a);o(d)&&(d.id=s);var h=i(d)?new d({id:s},this,f):new Ja(d,this,f);return this.plugins[s]=h,Object.defineProperty(this.vm,s,{value:h,configurable:!0,enumerable:!1,writable:!1}),this.order.push(s),this._sortZIndex(),this.videoConfigReady&&h.__inited(),h.ready}},{key:"unuse",value:function(e){var t=this.plugins[e];if(o(t)&&i(t.$destroy)){t.$destroy();var r=this.order.indexOf(e);r>-1&&this.order.splice(r,1),delete this.plugins[e],delete this.vm[e]}else delete this.plugins[e]}},{key:"throwError",value:function(e){this.vm.__throwError(e)}},{key:"silentLoad",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.duration,i=void 0===n?3:n,o=r.bias,u=void 0===o?0:o,a=r.repeatTimes,s=void 0===a?0:a,l=r.increment,f=void 0===l?0:l,d=r.isLive,h=void 0===d?this.videoConfig.isLive:d,p=r.box,v=void 0===p?this.videoConfig.box:p,y=r.preset,g=void 0===y?this.videoConfig.preset:y,_={isLive:h,box:v,src:e,preset:g};return j(new Array(s+1).fill(1).map(function(e,n){return function(){return new Promise(function(e,o){r.abort&&o({error:!0,message:"user abort the mission"});var a=document.createElement("video"),l=t.kernel.currentTime+i+f*n;a.muted=!0;var d=!1,h=function r(n){var i=t.kernel.currentTime;if(u<=0&&i>=l||u>0&&(Math.abs(l-i)<=u&&d||i-l>u))return B(t.dom.videoElement,"timeupdate",r),B(a,"error",y,!0),d?o({error:!1,video:a,kernel:g}):(B(a,"canplay",p,!0),B(a,"loadedmetadata",v,!0),g.destroy(),e())},p=function(e){if(d=!0,r.immediate)return B(t.dom.videoElement,"timeupdate",h),B(a,"error",y,!0),o({error:!1,video:a,kernel:g})},v=function(e){g.seek(l)},y=function(r){B(a,"canplay",p,!0),B(a,"loadedmetadata",v,!0),B(t.dom.videoElement,"timeupdate",h);var i=c(a.error)?new Error("unknow video error"):new Error(a.error.message);return $n.error("chimee's silentload",i.message),g.destroy(),n===s?o(i):e(i)};W(a,"canplay",p,!0),W(a,"loadedmetadata",v,!0),W(a,"error",y,!0),W(t.dom.videoElement,"timeupdate",h);var g=new jo(a,_);g.load()})}})).then(function(){var t="The silentLoad for "+e+" timed out. Please set a longer duration or check your network";return $n.warn("chimee's silentLoad",t),Promise.reject(new Error(t))}).catch(function(e){if(m(e))return Promise.reject(e);if(e.error)return $n.warn("chimee's silentLoad",e.message),Promise.reject(new Error(e.message));var n=e.video,i=e.kernel;return r.abort?(i.destroy(),Promise.reject(new Error("user abort the mission"))):t.dom.videoElement.paused?(t.switchKernel({video:n,kernel:i,config:_}),Promise.resolve()):new Promise(function(e){W(n,"play",function(r){t.switchKernel({video:n,kernel:i,config:_}),e()},!0),n.play()})})}},{key:"load",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!c(t)){var r=this.videoConfig,n=t.isLive,i=void 0===n?r.isLive:n,o=t.box,u=void 0===o?r.box:o,a=t.preset,s=void 0===a?r.preset:a,l=document.createElement("video"),f={isLive:i,box:u,preset:s,src:e},d=new jo(l,f);this.switchKernel({video:l,kernel:d,config:f})}this.kernel.load(e)}},{key:"switchKernel",value:function(e){var t=this,r=e.video,n=e.kernel,i=e.config,o=this.kernel,u=b(this.videoConfig);this.dom.removeVideo(),this.dom.installVideo(r),this.videoConfig.changeWatchable=!1,this.videoConfig.autoload=!1,this.videoConfig.src=i.src,this.videoConfig._realDomAttr.forEach(function(e){"src"!==e&&(t.videoConfig[e]=u[e])}),this.videoConfig.changeWatchable=!0,ge(i,{src:ae({get:function(e){return t.videoConfig.src},set:function(e){return t.videoConfig.src=e,e}})},{self:!0}),this.kernel=n,o.destroy()}},{key:"destroy",value:function(){for(var e in this.plugins)this.unuse(e);this.bus.destroy(),delete this.bus,this.dom.destroy(),delete this.dom,this.kernel.destroy(),delete this.kernel,delete this.vm,delete this.plugins,delete this.order}},{key:"_initUserPlugin",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return n(t)||($n.warn("Dispatcher","UserConfig.plugin can only by an Array"),t=[]),t.map(function(t){return e.use(t)})}},{key:"_sortZIndex",value:function(){var e=this,t=this.order.reduce(function(t,r){var n=e.plugins[r];if(c(n))return t;var i=t[n.$inner?"inner":"outer"],o=n.$level;return i[o]=i[o]||[],i[o].push(r),t},{inner:{},outer:{}}),r=t.inner,n=t.outer;r[0]=r[0]||[],r[0].unshift("videoElement"),n[0]=n[0]||[],n[0].unshift("container");var i=S(r),o=S(n);this.dom.setPluginsZIndex(i),this.dom.setPluginsZIndex(o),this.zIndexMap.inner=i,this.zIndexMap.outer=o}},{key:"_getTopLevel",value:function(e){var t=this.zIndexMap[e?"inner":"outer"],r=this.plugins[t[t.length-1]];return c(r)?0:r.$level}},{key:"_autoloadVideoSrcAtFirst",value:function(){this.videoConfig.autoload&&this.bus.emit("load",this.videoConfig.src)}}],[{key:"install",value:function(e){var t=e.name,r=E(t);c(es[r])||$n.warn("Dispatcher","You have installed "+t+" again. And the older one will be replaced");var n=i(e)?e:w({id:r},e);return es[r]=n,r}},{key:"hasInstalled",value:function(e){return!c(es[e])}},{key:"uninstall",value:function(e){delete es[e]}},{key:"getPluginConfig",value:function(e){return es[e]}}]),e}(),Ie(va.prototype,"unuse",[la],Object.getOwnPropertyDescriptor(va.prototype,"unuse"),va.prototype),Ie(va,"install",[fa],Object.getOwnPropertyDescriptor(va,"install"),va),Ie(va,"hasInstalled",[da],Object.getOwnPropertyDescriptor(va,"hasInstalled"),va),Ie(va,"uninstall",[ha],Object.getOwnPropertyDescriptor(va,"uninstall"),va),Ie(va,"getPluginConfig",[pa],Object.getOwnPropertyDescriptor(va,"getPluginConfig"),va),va),rs=(ya=function(){function e(){No(this,e),this.log={error:!0,info:!0,warn:!0,debug:!0,verbose:!0},He(this,"_silent",ga,this),this.errorHandler=void 0;var t=Object.keys(this.log).reduce(function(e,t){return e[t]=ae({get:function(){return $n["ENABLE_"+t.toUpperCase()]},set:function(e){return $n["ENABLE_"+t.toUpperCase()]=e,!0===e&&(this.silent=!1),e}}),e},{});ge(this.log,t,{self:!0})}return Do(e,[{key:"silent",get:function(){return this._silent},set:function(e){var t=this;e=!!e,this._silent=e,Object.keys(this.log).forEach(function(r){t.log[r]=!e})}}]),e}(),ga=function(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}(ya.prototype,"_silent",[ye],{enumerable:!0,initializer:function(){return!1}}),ya);return Ia()((Ta=Aa=function(e){function t(e){No(this,t);var r=Vo(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(r.destroyed=!1,Ve(r,"__id",ba,r),Ve(r,"version",wa,r),Ve(r,"config",Ea,r),l(e)||v(e))e={wrapper:e,controls:!0};else{if(!o(e))throw new Error("You must pass in an Object containing wrapper or string or element to new a Chimee");if(!e.wrapper)throw new Error("You must pass in an legal object")}return r.__dispatcher=new ts(e,r),r.__dispatcher.kernel.on("error",r.__throwError),r.ready=r.__dispatcher.ready,r.readySync=r.__dispatcher.readySync,r.__wrapAsVideo(r.__dispatcher.videoConfig),r}return Ho(t,Za),Do(t,[{key:"destroy",value:function(){Ro(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"__destroy",this).call(this),this.__dispatcher.destroy(),this.destroyed=!0}},{key:"use",value:function(e){this.__dispatcher.use(e)}},{key:"unuse",value:function(e){this.__dispatcher.unuse(e)}},{key:"__throwError",value:function(e){l(e)&&(e=new Error(e));var r=this.config.errorHandler||t.config.errorHandler;if(i(r))return r(e);if(!t.config.silent)throw e}}]),t}(),Aa.plugin=Ja,Aa.config=new rs,Aa.install=ts.install,Aa.uninstall=ts.uninstall,Aa.hasInstalled=ts.hasInstalled,Aa.getPluginConfig=ts.getPluginConfig,_a=Ta,ba=Be(_a.prototype,"__id",[pe],{enumerable:!0,initializer:function(){return"_vm"}}),wa=Be(_a.prototype,"version",[pe],{enumerable:!0,initializer:function(){return"0.2.3"}}),Ea=Be(_a.prototype,"config",[pe],{enumerable:!0,initializer:function(){return{errorHandler:void 0}}}),Be(_a,"plugin",[pe],(ka=Object.getOwnPropertyDescriptor(_a,"plugin"),ka=ka?ka.value:void 0,{enumerable:!0,configurable:!0,writable:!0,initializer:function(){return ka}}),_a),Be(_a,"config",[pe],(Oa=Object.getOwnPropertyDescriptor(_a,"config"),Oa=Oa?Oa.value:void 0,{enumerable:!0,configurable:!0,writable:!0,initializer:function(){return Oa}}),_a),Be(_a,"install",[pe],(Pa=Object.getOwnPropertyDescriptor(_a,"install"),Pa=Pa?Pa.value:void 0,{enumerable:!0,configurable:!0,writable:!0,initializer:function(){return Pa}}),_a),Be(_a,"uninstall",[pe],(Sa=Object.getOwnPropertyDescriptor(_a,"uninstall"),Sa=Sa?Sa.value:void 0,{enumerable:!0,configurable:!0,writable:!0,initializer:function(){return Sa}}),_a),Be(_a,"hasInstalled",[pe],(ja=Object.getOwnPropertyDescriptor(_a,"hasInstalled"),ja=ja?ja.value:void 0,{enumerable:!0,configurable:!0,writable:!0,initializer:function(){return ja}}),_a),Be(_a,"getPluginConfig",[pe],(xa=Object.getOwnPropertyDescriptor(_a,"getPluginConfig"),xa=xa?xa.value:void 0,{enumerable:!0,configurable:!0,writable:!0,initializer:function(){return xa}}),_a),ma=_a))||ma});