text: !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.ChimeePlayer=t()}(this,function(){"use strict";function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function t(e,t){return t={exports:{}},e(t,t.exports),t.exports}function n(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r}),this.resolve=Dr(t),this.reject=Dr(n)}function r(e){return void 0===e||null===e}function i(e){return Array.isArray(e)}function o(e){return"function"==typeof e}function a(e){return Object(e)===e&&"[object Object]"===String(e)&&!o(e)&&!i(e)}function s(e){return"number"==typeof e}function u(e){return e instanceof Blob}function l(e){return"string"==typeof e||e instanceof String}function c(e){return"boolean"==typeof e}function f(e){return!!e&&("object"===(void 0===e?"undefined":vu(e))||"function"==typeof e)&&"function"==typeof e.then}function d(e){return r(e)||c(e)||l(e)||s(e)}function h(e){return l(e)&&!!e.match(/^((https?|ftp|rtsp|mms):\/\/)(([0-9a-z_!~*'().&=+$%-]+: )?[0-9a-z_!~*'().&=+$%-]+@)?(([0-9]{1,3}\.){3}[0-9]{1,3}|([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6}|localhost)(:[0-9]{1,4})?((\/?)|(\/[0-9a-z_!~*'().;?:@&=+$,%#-]+)+\/?)$/i)}function p(e){return!!("object"===("undefined"==typeof Node?"undefined":vu(Node))?e instanceof Node:e&&"object"===(void 0===e?"undefined":vu(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName)}function m(e,t){if(!l(e))throw new TypeError("Log's method only acccept string as argument, but not "+e+" in "+(void 0===e?"undefined":du(e)));return l(t)?"["+(e=bu.FORCE_GLOBAL_TAG?bu.GLOBAL_TAG:e||bu.GLOBAL_TAG)+"] > "+t:"["+bu.GLOBAL_TAG+"] > "+e}function g(e){return void 0===e||null===e}function y(e){return Array.isArray(e)}function b(e){return"function"==typeof e}function w(e){return Object(e)===e&&"[object Object]"===String(e)&&!b(e)&&!y(e)}function _(e){return"number"==typeof e}function E(e){return"string"==typeof e||e instanceof String}function S(e){return"boolean"==typeof e}function k(e){return g(e)||S(e)||E(e)||_(e)}function T(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length<2)throw new Error("deepAssign accept two and more argument");for(var r=t.length-1;r>-1;r--)if(k(t[r]))throw new TypeError("deepAssign only accept non primitive type");var i=t.shift();return t.forEach(function(e){return wu(e,i)}),i}function A(e,t){var n=t,r=(e=""+(e||"")).length;return(((t=(t||r)-r)>0?e.repeat?"0".repeat(t):new Array(t+1).join("0"):"")+e).slice(0,n)}function M(e){var t=Math.floor(e/3600);e=Math.floor(e%3600);var n=A(Math.floor(e/60),2),r=A(e=Math.floor(e%60),2);return t>=1?t+":"+n+":"+r:n+":"+r}function x(e,t){var n=e.__evt_id;n||(Object.defineProperty(e,"__evt_id",{writable:!0,enumerable:!1,configurable:!0}),n=e.__evt_id=++Lu.count);var r=n+"_"+t,i=Lu[r];return i||(i=Lu[r]=[]),i}function L(e,t,n){var r=xu(null);r.type=t,r.target=e,n&&Mu(r,a(n)?n:{data:n}),x(e,t).forEach(function(t){(t[1]||t[0]).apply(e,[r])})}function O(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments[4];o(r)&&!i&&(i=r,r=void 0);var a=[n,void 0,r];r&&!i&&(i=function(){D(e,t,n,r);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];n.apply(e,o)}),i&&(a[1]=i),x(e,t).push(a)}function D(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=x(e,t);if(n||r){var o=-1,a=void 0;return i.find(function(e,t){if((!n||e[0]===n)&&(!r||e[2]))return o=t,a=e[1],!0}),-1!==o&&i.splice(o,1),a}i.length=0}function I(e,t){var n=e.__evt_id;n||(Object.defineProperty(e,"__evt_id",{writable:!0,enumerable:!1,configurable:!0}),n=e.__evt_id=++Du.count);var r=n+"_"+t,i=Du[r];return i||(i=Du[r]=[]),i}function R(e,t,n){var r=qo(null);r.type=t,r.target=e,n&&Ca(r,w(n)?n:{data:n}),I(e,t).forEach(function(t){(t[1]||t[0]).apply(e,[r])})}function N(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments[4];b(r)&&!i&&(i=r,r=void 0);var o=[n,void 0,r];r&&!i&&(i=function(){C(e,t,n,r);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];n.apply(e,o)}),i&&(o[1]=i),I(e,t).push(o)}function C(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=I(e,t);if(n||r){var o=-1,a=void 0;return i.find(function(e,t){if((!n||e[0]===n)&&(!r||e[2]))return o=t,a=e[1],!0}),-1!==o&&i.splice(o,1),a}i.length=0}function P(e){return ou(e)}function j(e,t){return e.getAttribute(t)}function F(e,t,n){void 0===n?e.removeAttribute(t):e.setAttribute(t,n)}function B(e,t){if(t&&(t=t.trim())){var n=t.split(/\s+/);if(e.classList)n.forEach(function(t){return e.classList.add(t)});else{var r=" "+(e.className||"")+" ";n.forEach(function(e){-1===r.indexOf(" "+e+" ")&&(r+=" "+e)}),e.className=r.trim()}}}function z(e,t){if(t&&(t=t.trim())){var n=t.split(/\s+/);if(e.classList)n.forEach(function(t){return e.classList.remove(t)});else{var r=" "+e.className+" ";n.forEach(function(e){for(var t=" "+e+" ";-1!==r.indexOf(t);)r=r.replace(t," ")}),e.className=r.trim()}}}function U(e,t){return new RegExp("(?:^|\\s)"+t+"(?=\\s|$)").test(e.className)}function G(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(r){var o=C(e,t+"_once",n);o&&(n=o)}e.removeEventListener(t,n,i)}function W(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(r){var o=n;N(e,t+"_once",o,n=function(){for(var a=arguments.length,s=Array(a),u=0;u<a;u++)s[u]=arguments[u];o.apply(this,s),G(e,t,n,r,i)})}e.addEventListener(t,n,i)}function H(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=function(n){var i=K(n.target||n.srcElement,e,!0),o=$(t,e,!0),a=void 0;o.find?a=o.find(function(e){return i.find(function(t){return e===t})}):o.forEach(function(e){return!a&&i.forEach(function(t){a||e!==t||(a=t)})}),a&&r.apply(a,arguments)};N(e,n+"_delegate_"+t,r,o),e.addEventListener(n,o,i)}function V(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=C(e,n+"_delegate_"+t,r);o&&e.removeEventListener(n,o,i)}function Z(e,t){return(e.currentStyle||document.defaultView.getComputedStyle(e,null))[t]||e.style[t]}function Y(e,t,n){if(w(t))for(var r in t)Y(e,r,t[r]);else e.style[t]=n}function $(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,n=arguments[2],r=t.querySelectorAll(e);return n?ou(r):r}function J(e){e.parentNode.removeChild(e)}function K(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments[2],r=arguments[3],i=[];for(n&&i.push(e);e&&e.parentNode!==t;)(e=e.parentNode)&&i.push(e);return r&&i.push(t),i}function Q(e,t){return e.constructor===Cu?e:new Cu(e,t)}function X(e){function t(n,r,o){if(i(n)||a(n)){r=r||(a(n)?{}:[]);for(var s in n)r[s]=t(n[s],r[s],s);return r}return e(n,r,o)}return t}function q(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length<2)throw new Error("deepAssign accept two and more argument");for(var r=t.length-1;r>-1;r--)if(d(t[r]))throw new TypeError("deepAssign only accept non primitive type");var i=t.shift();return t.forEach(function(e){return Sl(e,i)}),i}function ee(e,t){return e.replace(/(^|[^a-zA-Z]+)([a-zA-Z])/g,function(e,n,r,i){return t||0!==i?r.toUpperCase():r.toLowerCase()})}function te(e,t){return e.bind?e.bind(t):e.apply?function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return e.apply(t,r)}:function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return e.call.apply(e,[t].concat(El(r)))}}function ne(){return re()+re()+"-"+re()+"-"+re()+"-"+re()+"-"+re()+re()+re()}function re(){return(65536*(1+Math.random())|0).toString(16).substring(1)}function ie(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.throwError,a=void 0!==o&&o,s=n.backup;if(l(t)&&(t=t.split(".")),!i(t))throw new TypeError("keys of getDeepProperty must be string or Array<string>");for(var u=[],c=e,f=0,d=t.length;f<d;f++){var h=t[f];if(r(c)){if(a)throw new Error("obj"+(u.length>0?"."+u.join("."):" itself")+" is "+c);return s}c=c[h],u.push(h)}return c}function oe(e){if(!e||!e.hasOwnProperty)return!1;for(var t=["value","initializer","get","set"],n=0,r=t.length;n<r;n++)if(e.hasOwnProperty(t[n]))return!0;return!1}function ae(e){return!!e&&(o(e.get)||o(e.set))&&c(e.configurable)&&c(e.enumerable)&&void 0===e.writable}function se(e){return!!e&&e.hasOwnProperty("value")&&c(e.configurable)&&c(e.enumerable)&&c(e.writable)}function ue(e){return!!e&&o(e.initializer)&&c(e.configurable)&&c(e.enumerable)&&c(e.writable)}function le(e){return function(t){return bl(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t}),t}}function ce(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"You must pass me an array of function";if(!i(e)||e.length<1)throw new TypeError(t);if(1===e.length){if(!o(e[0]))throw new TypeError(t);return e[0]}return e.reduce(function(e,n){if(!o(n)||!o(e))throw new TypeError(t);return function(t){return te(n,this)(te(e,this)(t))}})}function fe(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!t.length)throw new TypeError("You must pass in decorators in compressMultipleDecorators");return t.forEach(function(e){if(!o(e))throw new TypeError('Decorators must be a function, but not "'+e+'" in '+(void 0===e?"undefined":al(e)))}),1===t.length?t[0]:function(e,n,r){return t.reduce(function(t,r){return r(e,n,t)},r)}}function de(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.get,n=e.set,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=r.preGet,s=void 0!==a&&a,u=r.preSet,l=void 0===u||u;if(!(o(t)||o(n)||i(t)&&t.length>0||i(n)&&n.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 c="@accessor only accept function or array of function as getter/setter";return t=i(t)?ce(t,c):t,n=i(n)?ce(n,c):n,function(e,r,i){var a=i||{},u=a.configurable,c=void 0===u||u,f=a.enumerable,d=void 0===f||f,h=o(t),p=o(n),v=function(e){return h?te(t,this)(e):e},m=function(e){return p?te(n,this)(e):e};if(ae(i)){var g=i.get,y=i.set,b=o(g),w=o(y);return{get:b||h?function(){var e=this,t=te(v,this),n=function(){return b?te(g,e)():void 0};return(s?[t,n]:[n,t]).reduce(function(e,t){return t(e)},void 0)}:void 0,set:w||p?function(e){var t=this,n=te(m,this),r=function(e){return w?te(y,t)(e):e};return(l?[n,r]:[r,n]).reduce(function(e,t){return t(e)},e)}:void 0,configurable:c,enumerable:d}}if(ue(i)){var _=i.initializer,E=void 0,S=!1;return{get:function(){var e=te(v,this);return S?e(E):(E=te(_,this)(),S=!0,e(E))},set:function(e){var t=te(m,this);return E=l?t(e):e,S=!0,l||t(E),E},configurable:c,enumerable:d}}var k=(i||{}).value;return{get:function(){return te(v,this)(k)},set:function(e){var t=te(m,this);return k=l?t(e):e,l||t(k),k},configurable:c,enumerable:d}}}function he(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];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&&oe(t[2]))throw new Error("You may use @before straightly, @before return decorators, you should call it before you set it as decorator.");for(var r=t.length-1;r>-1;r--)if(!o(t[r]))throw new TypeError("@before only accept function parameter");return function(e,n,r){var a=r||{},s=a.value,u=a.configurable,l=a.enumerable,c=a.writable;if(!o(s))throw new TypeError('@before can only be used on function, please check the property "'+n+'" is a method or not.');return{value:function(){for(var e=this,n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];var a=t.reduce(function(t,n){var r=te(n,e).apply(void 0,kl(t));return void 0===r?t:i(r)?r:[r]},r);return te(s,this).apply(void 0,kl(a))},configurable:u,enumerable:l,writable:c}}}function pe(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];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&&oe(t[2]))throw new Error("You may use @initialize straightly, @initialize return decorators, you need to call it");var r=ce(t,"@initialize only accept function parameter");return function(e,t,n){if(void 0===n)return{value:te(r,e)(),configurable:!0,writable:!0,enumerable:!0};if(ae(n)){var i=!1;return de({get:function(e){return i?e:te(r,this)(e)},set:n.set?function(e){return i=!0,e}:void 0})(e,t,n)}if(ue(n)){var o=n.initializer;return{initializer:function(){return te(r,this)(te(o,this)())},configurable:n.configurable,writable:n.writable,enumerable:n.enumerable}}return{value:te(r,this)(n.value),writable:n.writable,configurable:n.configurable,enumerable:n.enumerable}}}function ve(e,t,n,r,i,o){var a=n.configurable,s=n.enumerable,u=o.force,l=o.omit,c=Zl(r,i);if(void 0!==c){if(l)return;if(!u)throw new Error('"'+t+'" is an existing property, if you want to override it, please set "force" true in @alias option.');if(!c.configurable)throw new Error('property "'+t+'" is unconfigurable.')}Yl(r,i,{get:function(){return e[t]},set:function(n){return e[t]=n,t},configurable:a,enumerable:s})}function me(e,t,n){if(2===arguments.length?l(e)&&(n=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 r="If you want to use @alias to set alias on other instance, you must pass in a legal instance";if(void 0!==e&&d(e))throw new TypeError(r);var i=a(n)?n:{force:!1,omit:!1},o=i.force,s=i.omit;return function(n,i,a){function u(e,t,n){var i=d(e)?t:e,o=n.split("."),a=o.slice(-1),s=Ml(a,1)[0];if(i=ie(i,o.slice(0,-1),{throwError:!0}),d(i))throw new TypeError(r);return{target:i,name:s}}if(a=a||{value:void 0,configurable:!0,writable:!0,enumerable:!0},ue(a))return pe(function(n){var r=u(e,this,t),l=r.target,c=r.name;return ve(this,i,a,l,c,{force:o,omit:s}),n})(n,i,a);if(ae(a)){var l=void 0,c=function(n){if(l)return n;var r=u(e,this,t),c=r.target,f=r.name;return ve(this,i,a,c,f,{force:o,omit:s}),l=!0,n};return de({get:c,set:c})(n,i,a)}var f=u(e,n,t),h=f.target,p=f.name;return ve(n,i,a,h,p,{force:o,omit:s}),a}}function ge(e,t){if(void 0===Fl)throw new Error("Using @autobind on "+t.name+"() requires WeakMap support due to its use of super."+t.name+"()");Kl||(Kl=new Fl),!1===Kl.has(e)&&Kl.set(e,new Fl);var n=Kl.get(e);return!1===n.has(t)&&n.set(t,te(t,e)),n.get(t)}function ye(e,t,n){if(1===arguments.length)return Jl()(e);var r=n||{},i=r.value,a=r.configurable;if(!o(i))throw new TypeError('@autobind can only be used on functions, not "'+i+'" in '+(void 0===i?"undefined":al(i))+' on property "'+t+'"');var s=e.constructor;return{configurable:a,enumerable:!1,get:function(){var n=this,r=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return i.call.apply(i,[n].concat(kl(t)))};return this===e?i:this.constructor!==s&&xl(this).constructor===s?i:this.constructor!==s&&t in this.constructor.prototype?ge(this,i):(bl(this,t,{configurable:!0,writable:!0,enumerable:!1,value:r}),r)},set:le(t)}}function be(e,t,n){if(void 0===n)return{value:void 0,writable:!1,enumerable:!1,configurable:!1};if(n.enumerable=!1,n.configurable=!1,ae(n)){var r=n.get;if(n.set=void 0,!o(r))return;return{get:function(){var e=te(r,this)();return Ql(this,t,{value:e,writable:!1,configurable:!1,enumerable:!1}),e},set:void 0,configurable:!1,enumerable:!1}}return n.writable=!1,n}function we(e,t,n){return void 0===n?{value:void 0,enumerable:!1,configurable:!0,writable:!0}:(n.enumerable=!1,n)}function _e(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=n.self,u=void 0!==s&&s,l=n.omit,c=void 0!==l&&l,f=o(t);if(f||i(t)){if(!o(e))throw new TypeError("If you want to decorator class, you must pass it a legal class");if(f)t(e);else for(var h=0,p=t.length;h<p;h++){var v=t[h];if(!o(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(!u&&!o(e))throw new TypeError("applyDecorators only accept class as first arguments. If you want to modify instance, you should set options.self true.");if(u&&d(e))throw new TypeError("We can't apply docorators on a primitive value, even in self mode");if(!a(t))throw new TypeError("applyDecorators only accept object as second arguments");var m=u?e:e.prototype;if(r(m))throw new Error("The class muse have a prototype, please take a check");for(var g in t){var y=t[g],b=i(y)?y:[y],w=void 0;try{w=fe.apply(void 0,kl(b))}catch(e){throw new Error("The decorators set on props must be Function or Array of Function")}var _=tc(m,g);if(!_||_.configurable)ec(m,g,w(m,g,_));else if(!c)throw new Error(g+" of "+m+" is unconfigurable")}return e}function Ee(e,t,n){var r,o=n.diff,s=n.operationPrefix,u={},l=!1,c=new Proxy(e,{get:function(e,n,r){var c=e[n];if(i(e)&&nc.indexOf(n)>-1)return function(){l=!0,te(c,r).apply(void 0,arguments),l=!1,t()};if(!0===u[n])return c;if(a(c)||i(c)){var f=u[n]||Ee(c,t,{diff:o,operationPrefix:s});return u[n]=f,f}return u[n]=!0,c},set:function(e,n,r){var c=e[n],f=a(r)||i(r)?Ee(r,t,{diff:o,operationPrefix:s}):r;return e[n]=f,u[n]=!0,!!(l||o&&c===f)||(t(),!0)},deleteProperty:function(e,n){return delete e[n],delete u[n],!!l||(t(),!0)}}),f=(r={},zl(r,s+"set",[pe(function(e){return function(e,t){c[e]=t}}),we]),zl(r,s+"del",[pe(function(e){return function(e){delete c[e]}}),we]),r);return _e(c,f,{self:!0}),c}function Se(e,t,n){function r(e){var n=void 0;return e.reduce(function(e,r){return e[r]=[de({set:function(e){return n=this[r],e}}),de({get:function(e){return f[r]?e:((a(e)||i(e))&&Se(e,t,{operationPrefix:l,diff:c}),f[r]=!0,e)},set:function(e){return(a(e)||i(e))&&Se(e,t,{operationPrefix:l,diff:c}),f[r]=!0,d||c&&n===e||t(),e}},{preSet:!1})],e},{})}var s,u=this,l=n.operationPrefix,c=n.diff,f={},d=!1,h=r(Hl(e));if(_e(e,h,{self:!0,omit:!0}),i(e)){var p=nc.reduce(function(n,i){return n[i]=[pe(function(n){return n=o(n)?n:Array.prototype[i],function(){var i=e.length;if(d=!0,te(n,e).apply(void 0,arguments),d=!1,i<e.length){var o=r(new Array(e.length-i).fill(1).map(function(e,t){return(t+i).toString()}));_e(e,o,{self:!0,omit:!0})}t()}}),we],n},{});_e(e,p,{self:!0})}var v=(s={},zl(s,l+"set",[pe(function(t){return function(n,i){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=a.disable,l=a.isNewVal;if(l=l||-1===Hl(e).indexOf(n),o(t)&&te(t,u)(n,i,{disable:!0,isNewVal:l}),l){var c=r([n]);_e(e,c,{self:!0,omit:!0})}s||(e[n]=i)}}),we]),zl(s,l+"del",[pe(function(n){return function(r){o(n)?te(n,u)(r):delete e[r],t()}}),we]),s);return _e(e,v,{self:!0}),e}function ke(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=a(t[t.length-1])?t[t.length-1]:{},s=r.deep,u=r.omit,c=r.other,f=r.operationPrefix,h=void 0===f?"__":f,p=r.diff,v=void 0===p||p,m=r.proxy;if("function"!=typeof Proxy&&(m=!1),!t.length)throw new TypeError("You must pass a function or a string to find the hanlder function.");if(void 0!==c&&d(c))throw new TypeError("If you want us to trigger function on the other instance, you must pass in a legal instance");if(!l(h))throw new TypeError("operationPrefix must be an string");return function(e,n,r){var f=t.reduce(function(n,r,i){if(!l(r)&&!o(r)){if(!i||i!==t.length-1)throw new TypeError("You can only pass function or string as handler");return n}return n.push(l(r)?function(t,n){var i=ie(c||e,r);if(o(i))return te(i,this)(t,n);if(!u)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")}:r),n},[]),d=function(e,t){var n=this;f.forEach(function(r){return te(r,n)(e,t)})},p=!1,g=void 0,y=void 0,b=void 0;return fe(de({set:function(e){var t=this;g=this[n],b=void 0;var r=function(){return te(d,t)(y,g)};return s&&(a(e)||i(e))?m?Ee(e,r,{diff:v,operationPrefix:h}):Se(e,r,{operationPrefix:h,diff:v}):e},get:function(e){var t=this;if(b)return b;if(!p){p=!0;var n=function(){return te(d,t)(y,g)};if(s&&(a(e)||i(e))){if(m)return b=Ee(e,n,{diff:v,operationPrefix:h}),g=b,y=b,b;Se(e,n,{operationPrefix:h,diff:v})}g=e,y=e}return e}},{preSet:!0}),de({set:function(e){return y=e,v&&g===e||te(d,this)(y,g),g=e,e}},{preSet:!1}))(e,n,r)}}function Te(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.other,r=t.backup;if(!o(e)&&!l(e))throw new TypeError("@runnable only accept Function or String");return function(t,i,a){var s=a||{},u=s.value,l=s.configurable;if(!o(u))throw new TypeError("@runnable can only be used on method, but not "+u+' on property "'+i+'".');var c=o(e)?e:function(){var t=e.split(".");return ie(d(n)?this:n,t)};return r=o(r)?r:function(){},{value:function(){return!0===te(c,this).apply(void 0,arguments)?te(u,this).apply(void 0,arguments):te(r,this).apply(void 0,arguments)},enumerable:!1,configurable:l,writable:!1}}}function Ae(e,t,n){return void 0===n?{value:void 0,enumerable:!0,configurable:!0,writable:!0}:(n.configurable=!0,n)}function Me(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=!!c(t[0])&&t.shift();return t.unshift(function(e){return c(e)?e:r}),de({set:t,get:t})}function xe(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=s(t[0])?t.shift():0;return t.unshift(function(e){return s(e)?e:r}),de({set:t,get:t})}function Le(e){return void 0!==e}function Oe(e){return Array.isArray(e)}function De(e){return"function"==typeof e}function Ie(e){return Object(e)===e&&"[object Object]"===String(e)&&!De(e)&&!Oe(e)}function Re(e){return e instanceof Event||(e&&e.originalEvent)instanceof Event}function Ne(e){return"string"==typeof e||e instanceof String}function Ce(e){return!!("object"===("undefined"==typeof HTMLElement?"undefined":Ho(HTMLElement))?e instanceof HTMLElement:e&&"object"===(void 0===e?"undefined":Ho(e))&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName)}function Pe(e,t,n){if(Ie(t))for(var r in t)Pe(e,r,t[r]);else e.style[t]=n}function je(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Ie(t)&&(n=t),Ne(e)&&(t=e),Ce(e)||(e=document),!Ne(t))throw new Error("You must pass in a string as name, but not "+(void 0===t?"undefined":Ho(t))+".");for(var r=n.keyOnly,i=void 0!==r&&r,o=0;o<mc.length;o++){t=t.replace(mc[o][0],mc[o][1]);for(var a=0;a<vc.length;a++){var s=0===a?t:vc[a]+t.charAt(0).toUpperCase()+t.substr(1);if(void 0!==e[s])return i?s:e[s]}}return i?"":void 0}function Fe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.bubbles,i=void 0===r||r,o=n.cancelable,a=void 0===o||o,s=void 0;if(De(Event)?s=new Event(t,{bubbles:i,cancelable:a}):document.createEvent?(s=document.createEvent("HTMLEvents")).initEvent(t,!0,!0):document.createEventObject&&((s=document.createEventObject()).eventType=t,s.eventName=t),!Ie(s)&&!Re(s))throw new Error("We can't create an object on this browser, please report to author");e.dispatchEvent?e.dispatchEvent(s):e.fireEvent?e.fireEvent("on"+s.eventType,s):e[t]?e[t]():e["on"+t]&&e["on"+t]()}function Be(e,t,n,r,i){var o={};return Object.keys(r).forEach(function(e){o[e]=r[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},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 ze(e){return void 0===e||null===e}function Ue(e){return Array.isArray(e)}function Ge(e){return"function"==typeof e}function We(e){return Object(e)===e&&"[object Object]"===String(e)&&!Ge(e)&&!Ue(e)}function He(e){return"number"==typeof e}function Ve(e){return!Ue(e)&&e-tu(e)+1>=0}function Ze(e){return Ws(e)}function Ye(e){return Ue(e)?0===e.length:We(e)?0===zs(e).length:!e}function $e(e){return e instanceof Event||(e&&e.originalEvent)instanceof Event}function Je(e){return"string"==typeof e||e instanceof String}function Ke(e){return"boolean"==typeof e}function Qe(e){return!!e&&("object"===(void 0===e?"undefined":Ho(e))||"function"==typeof e)&&"function"==typeof e.then}function Xe(e){return ze(e)||Ke(e)||Je(e)||He(e)}function qe(e){return!!("object"===("undefined"==typeof Node?"undefined":Ho(Node))?e instanceof Node:e&&"object"===(void 0===e?"undefined":Ho(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName)}function et(e){return!!("object"===("undefined"==typeof HTMLElement?"undefined":Ho(HTMLElement))?e instanceof HTMLElement:e&&"object"===(void 0===e?"undefined":Ho(e))&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName)}function tt(e,t){if(!qe(e)||!qe(t))return!1;for(;t.parentNode;)if((t=t.parentNode)===e)return!0;return!1}function nt(e){return/<[^>]+?>/.test(e)}function rt(e){return e instanceof Error}function it(e,t){if(!Je(e))throw new TypeError("Log's method only acccept string as argument, but not "+e+" in "+(void 0===e?"undefined":Ho(e)));return Je(t)?"["+(e=Ec.FORCE_GLOBAL_TAG?Ec.GLOBAL_TAG:e||Ec.GLOBAL_TAG)+"] > "+t:"["+Ec.GLOBAL_TAG+"] > "+e}function ot(e){if(Xe(e))throw new TypeError("deepClone only accept non primitive type");return kc(e)}function at(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length<2)throw new Error("deepAssign accept two and more argument");for(var r=t.length-1;r>-1;r--)if(Xe(t[r]))throw new TypeError("deepAssign only accept non primitive type");var i=t.shift();return t.forEach(function(e){return kc(e,i)}),i}function st(e,t){return e.replace(/(^|[^a-zA-Z]+)([a-zA-Z])/g,function(e,n,r,i){return t||0!==i?r.toUpperCase():r.toLowerCase()})}function ut(e){return st(e).replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}function lt(e,t){return e.bind?e.bind(t):e.apply?function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return e.apply(t,r)}:function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return e.call.apply(e,[t].concat(au(r)))}}function ct(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.throwError,i=void 0!==r&&r,o=n.backup;if(Je(t)&&(t=t.split(".")),!Ue(t))throw new TypeError("keys of getDeepProperty must be string or Array<string>");for(var a=[],s=e,u=0,l=t.length;u<l;u++){var c=t[u];if(ze(s)){if(i)throw new Error("obj"+(a.length>0?"."+a.join("."):" itself")+" is "+s);return o}s=s[c],a.push(c)}return s}function ft(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e,t){return+e-+t};return zs(e).sort(t).reduce(function(t,n){return t.concat(e[n])},[])}function dt(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new Fs(function(t,r){!function i(o){if(!(o>=e.length)){var a=Ge(e[o])?e[o].apply(e,au(n)):e[o];return!1===a?r("stop"):Fs.resolve(a).then(function(){return i(o+1)}).catch(function(e){return r(e||"stop")})}t()}(0)})}function ht(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return function t(r){return r>=e.length||!1!==(Ge(e[r])?e[r].apply(e,au(n)):e[r])&&t(++r)}(0)}function pt(e,t){var n=e.__evt_id;n||(Object.defineProperty(e,"__evt_id",{writable:!0,enumerable:!1,configurable:!0}),n=e.__evt_id=++Tc.count);var r=n+"_"+t,i=Tc[r];return i||(i=Tc[r]=[]),i}function vt(e,t,n){var r=qo(null);r.type=t,r.target=e,n&&Ca(r,We(n)?n:{data:n}),pt(e,t).forEach(function(t){(t[1]||t[0]).apply(e,[r])})}function mt(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments[4];Ge(r)&&!i&&(i=r,r=void 0);var o=[n,void 0,r];r&&!i&&(i=function(){gt(e,t,n,r);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];n.apply(e,o)}),i&&(o[1]=i),pt(e,t).push(o)}function gt(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=pt(e,t);if(n||r){var o=-1,a=void 0;return i.find(function(e,t){if((!n||e[0]===n)&&(!r||e[2]))return o=t,a=e[1],!0}),-1!==o&&i.splice(o,1),a}i.length=0}function yt(e,t){var n=e.__evt_id;n||(Object.defineProperty(e,"__evt_id",{writable:!0,enumerable:!1,configurable:!0}),n=e.__evt_id=++Ac.count);var r=n+"_"+t,i=Ac[r];return i||(i=Ac[r]=[]),i}function bt(e,t,n){var r=qo(null);r.type=t,r.target=e,n&&Ca(r,We(n)?n:{data:n}),yt(e,t).forEach(function(t){(t[1]||t[0]).apply(e,[r])})}function wt(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments[4];Ge(r)&&!i&&(i=r,r=void 0);var o=[n,void 0,r];r&&!i&&(i=function(){_t(e,t,n,r);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];n.apply(e,o)}),i&&(o[1]=i),yt(e,t).push(o)}function _t(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=yt(e,t);if(n||r){var o=-1,a=void 0;return i.find(function(e,t){if((!n||e[0]===n)&&(!r||e[2]))return o=t,a=e[1],!0}),-1!==o&&i.splice(o,1),a}i.length=0}function Et(e){return ou(e)}function St(e,t){return e.getAttribute(t)}function kt(e,t,n){void 0===n?e.removeAttribute(t):e.setAttribute(t,n)}function Tt(e,t){if(t&&(t=t.trim())){var n=t.split(/\s+/);if(e.classList)n.forEach(function(t){return e.classList.add(t)});else{var r=" "+(e.className||"")+" ";n.forEach(function(e){-1===r.indexOf(" "+e+" ")&&(r+=" "+e)}),e.className=r.trim()}}}function At(e,t){if(t&&(t=t.trim())){var n=t.split(/\s+/);if(e.classList)n.forEach(function(t){return e.classList.remove(t)});else{var r=" "+e.className+" ";n.forEach(function(e){for(var t=" "+e+" ";-1!==r.indexOf(t);)r=r.replace(t," ")}),e.className=r.trim()}}}function Mt(e,t){return new RegExp("(?:^|\\s)"+t+"(?=\\s|$)").test(e.className)}function xt(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(r){var o=_t(e,t+"_once",n);o&&(n=o)}e.removeEventListener(t,n,i)}function Lt(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(r){var o=n;wt(e,t+"_once",o,n=function(){for(var a=arguments.length,s=Array(a),u=0;u<a;u++)s[u]=arguments[u];o.apply(this,s),xt(e,t,n,r,i)})}e.addEventListener(t,n,i)}function Ot(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=function(n){var i=Pt(n.target||n.srcElement,e,!0),o=Nt(t,e,!0),a=void 0;o.find?a=o.find(function(e){return i.find(function(t){return e===t})}):o.forEach(function(e){return!a&&i.forEach(function(t){a||e!==t||(a=t)})}),a&&r.apply(a,arguments)};wt(e,n+"_delegate_"+t,r,o),e.addEventListener(n,o,i)}function Dt(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=_t(e,n+"_delegate_"+t,r);o&&e.removeEventListener(n,o,i)}function It(e,t){return(e.currentStyle||document.defaultView.getComputedStyle(e,null))[t]||e.style[t]}function Rt(e,t,n){if(We(t))for(var r in t)Rt(e,r,t[r]);else e.style[t]=n}function Nt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,n=arguments[2],r=t.querySelectorAll(e);return n?ou(r):r}function Ct(e){e.parentNode.removeChild(e)}function Pt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments[2],r=arguments[3],i=[];for(n&&i.push(e);e&&e.parentNode!==t;)(e=e.parentNode)&&i.push(e);return r&&i.push(t),i}function jt(e,t){return e.constructor===Yf?e:new Yf(e,t)}function Ft(e,t,n,r,i){var o={};return Object.keys(r).forEach(function(e){o[e]=r[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},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 Bt(e){return!e.match(nd)}function zt(e,t){if(!Je(e))throw new TypeError("key parameter must be String");if(!Ge(t))throw new TypeError("fn parameter must be Function")}function Ut(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];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 Gt(e,t,n,r){n&&ia(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function Wt(e,t,n,r,i){var o={};return Object.keys(r).forEach(function(e){o[e]=r[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},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 Ht(e){return Je(e)?e:void 0}function Vt(e){return de({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 Zt(e){var t=We(e)?e:{set:e,get:e,isBoolean:!1},n=t.set,r=t.get,i=t.isBoolean;return de({get:function(e){return this.dispatcher.videoConfigReady&&this.inited?this.dom.videoElement[r]: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",n,t),e}})}function Yt(e,t){return de({get:function(n){var r=this.dom.getAttr("video",e);return this.dispatcher.videoConfigReady&&this.inited?t?!!r:r:n},set:function(n){if(!this.dispatcher.videoConfigReady)return n;var r=t?n||void 0:null===n?void 0:n;return this.dom.setAttr("video",e,r),n}})}function $t(e){return de({get:function(t){if(!this.dispatcher.videoConfigReady)return t;var n=this.dom.getAttr("video",e),r=this.dom.videoElement[e];return Ve(n)&&He(r)?r:n||void 0},set:function(t){if(!this.dispatcher.videoConfigReady)return t;var n=void 0;return void 0===t||He(t)?n=t:Je(t)&&!pc(parseFloat(t))&&(n=t),this.dom.setAttr("video",e,n),n}})}function Jt(e,t,n,r,i){var o={};return Object.keys(r).forEach(function(e){o[e]=r[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},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 Kt(e){}function Qt(e,t,n,r,i){var o={};return Object.keys(r).forEach(function(e){o[e]=r[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},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 Xt(e){if("video"===e&&(e="videoElement"),!et(this[e]))throw new TypeError('Your target "'+e+'" is not a legal HTMLElement');for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return[e].concat(n)}function qt(e,t,n){if(!Je(t))throw new TypeError("to handle dom's attribute or style, your attr parameter must be string, but not "+t+" in "+(void 0===t?"undefined":Ho(t)));if(!Je(e))throw new TypeError("to handle dom's attribute or style, your target parameter must be string, , but not "+e+" in "+(void 0===e?"undefined":Ho(e)));return[e,t,n]}function en(e,t,n,r,i){var o={};return Object.keys(r).forEach(function(e){o[e]=r[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},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 tn(e){if(!Je(e))throw new Error("Plugin's name must be a string, but not \""+e+'" in '+(void 0===e?"undefined":Ho(e)));return st(e)}function nn(e,t,n,r){n&&ia(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function rn(e,t,n,r){n&&ia(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function on(e,t,n,r,i){var o={};return Object.keys(r).forEach(function(e){o[e]=r[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},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 an(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function sn(e,t){return t={exports:{}},e(t,t.exports),t.exports}function un(e,t){return e.bind?e.bind(t):e.apply?function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return e.apply(t,r)}:function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return e.call.apply(e,[t].concat(Sv(r)))}}function ln(e,t,n,r,i){var o={};return Object.keys(r).forEach(function(e){o[e]=r[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},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 cn(e,t,n,r,i){var o={};return Object.keys(r).forEach(function(e){o[e]=r[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},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 fn(e){return e.$config.children?e.$config.children:e.isLive?{play:!0,progressTime:!1,progressBar:!1,volume:!0,screen:!0}:{play:!0,progressTime:!0,progressBar:!0,volume:!0,screen:!0}}function dn(e){var t=e.config.children=fn(e),n={};return t?lh(t).forEach(function(r){switch(r){case"play":t.play&&(n.play=new Wv(e,t.play));break;case"progressTime":t.progressTime&&(n.progressTime=new Kv(e,t.progressTime));break;case"progressBar":n.progressBar=new $v(e,t.progressBar);break;case"volume":t.volume&&(n.volume=new Zv(e,t.volume));break;case"screen":t.screen&&(n.screen=new Xv(e,t.screen));break;case"clarity":t.clarity&&Array.isArray(t.clarity.list)&&(n.clarity=new em(e,t.clarity));break;default:n[r]=new Uv(e,t[r])}}):(n.play=new Wv(e),n.progressTime=new Kv(e),n.progressBar=new $v(e),n.volume=new Zv(e),n.screen=new Xv(e)),n}function hn(e,t,n){if(d(e))throw TypeError("setFrozenAttr obj parameter can not be primitive type");if(!l(t))throw TypeError("setFrozenAttr key parameter must be String");rm(e,t,{value:n,configurable:!1,enumerable:!1,writable:!1})}function pn(e,t,n){var r=e;if(t+n<r.length){for(;n--;)if(128!=(192&r[++t]))return!1;return!0}return!1}function vn(e,t){var n=t,r=(e=""+(e||"")).length;return(((t=(t||r)-r)>0?e.repeat?"0".repeat(t):new Array(t+1).join("0"):"")+e).slice(0,n)}function mn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yyyy-MM-dd hh:mm:ss.i",n=e.getFullYear().toString(),r={M:e.getMonth()+1,d:e.getDate(),h:e.getHours(),m:e.getMinutes(),s:e.getSeconds(),i:e.getMilliseconds()};t=t.replace(/(y+)/gi,function(e,t){return n.substr(4-Math.min(4,t.length))});for(var i in r)!function(e){t=t.replace(new RegExp("("+e+"+)","g"),function(t,n){return(r[e]<10&&n.length>1?"0":"")+r[e]})}(i);return t}function gn(e){try{return window.localStorage.getItem(e)}catch(n){try{var t=document.cookie.match(new RegExp("(^| )"+e+"=([^;]*)(;|$)"));return i(t)?unescape(t[2]):""}catch(e){return""}}}function yn(e,t){try{window.localStorage.setItem(e,t)}catch(r){var n=new Date;n.setTime(n.getTime()+2592e7);try{document.cookie=e+"="+escape(t)+";expires="+n.toUTCString()+";path=/;"}catch(e){}}}function bn(e,t){var n=e.__evt_id;n||(Object.defineProperty(e,"__evt_id",{writable:!0,enumerable:!1,configurable:!0}),n=e.__evt_id=++Em.count);var r=n+"_"+t,i=Em[r];return i||(i=Em[r]=[]),i}function wn(e,t,n){var r=_m(null);r.type=t,r.target=e,n&&dm(r,a(n)?n:{data:n}),bn(e,t).forEach(function(t){(t[1]||t[0]).apply(e,[r])})}function _n(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments[4];o(r)&&!i&&(i=r,r=void 0);var a=[n,void 0,r];r&&!i&&(i=function(){En(e,t,n,r);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];n.apply(e,o)}),i&&(a[1]=i),bn(e,t).push(a)}function En(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=bn(e,t);if(n||r){var o=-1,a=void 0;return i.find(function(e,t){if((!n||e[0]===n)&&(!r||e[2]))return o=t,a=e[1],!0}),-1!==o&&i.splice(o,1),a}i.length=0}function Sn(e){return gm(e)}function kn(e,t){return e.getAttribute(t)}function Tn(e,t,n){void 0===n?e.removeAttribute(t):e.setAttribute(t,n)}function An(e,t){if(t&&(t=t.trim())){var n=t.split(/\s+/);if(e.classList)n.forEach(function(t){return e.classList.add(t)});else{var r=" "+(e.className||"")+" ";n.forEach(function(e){-1===r.indexOf(" "+e+" ")&&(r+=" "+e)}),e.className=r.trim()}}}function Mn(e,t){if(t&&(t=t.trim())){var n=t.split(/\s+/);if(e.classList)n.forEach(function(t){return e.classList.remove(t)});else{var r=" "+e.className+" ";n.forEach(function(e){for(var t=" "+e+" ";-1!==r.indexOf(t);)r=r.replace(t," ")}),e.className=r.trim()}}}function xn(e,t){return new RegExp("(?:^|\\s)"+t+"(?=\\s|$)").test(e.className)}function Ln(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(r){var o=En(e,t+"_once",n);o&&(n=o)}e.removeEventListener(t,n,i)}function On(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(r){var o=n;_n(e,t+"_once",o,n=function(){for(var a=arguments.length,s=Array(a),u=0;u<a;u++)s[u]=arguments[u];o.apply(this,s),Ln(e,t,n,r,i)})}e.addEventListener(t,n,i)}function Dn(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=function(n){var i=jn(n.target||n.srcElement,e,!0),o=Cn(t,e,!0).find(function(e){return i.find(function(t){return e===t})});o&&r.apply(o,arguments)};_n(e,n+"_delegate_"+t,r,o),e.addEventListener(n,o,i)}function In(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=En(e,n+"_delegate_"+t,r);o&&e.removeEventListener(n,o,i)}function Rn(e,t){return(e.currentStyle||document.defaultView.getComputedStyle(e,null))[t]||e.style[t]}function Nn(e,t,n){if(a(t))for(var r in t)Nn(e,r,t[r]);else e.style[t]=n}function Cn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,n=arguments[2],r=t.querySelectorAll(e);return n?gm(r):r}function Pn(e){e.parentNode.removeChild(e)}function jn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments[2],r=arguments[3],i=[];for(n&&i.push(e);e&&e.parentNode!==t;)(e=e.parentNode)&&i.push(e);return r&&i.push(t),i}function Fn(e,t){return e.constructor===Am?e:new Am(e,t)}function Bn(e){return Array.isArray(e)}function zn(e){return"function"==typeof e}function Un(e){return Object(e)===e&&"[object Object]"===String(e)&&!zn(e)&&!Bn(e)}function Gn(e){return"string"==typeof e||e instanceof String}function Wn(e,t){if(!Gn(e))throw new TypeError("Log's method only acccept string as argument, but not "+e+" in "+(void 0===e?"undefined":Ho(e)));return Gn(t)?"["+(e=Im.FORCE_GLOBAL_TAG?Im.GLOBAL_TAG:e||Im.GLOBAL_TAG)+"] > "+t:"["+Im.GLOBAL_TAG+"] > "+e}function Hn(e,t){var n=e.__evt_id;n||(Object.defineProperty(e,"__evt_id",{writable:!0,enumerable:!1,configurable:!0}),n=e.__evt_id=++Nm.count);var r=n+"_"+t,i=Nm[r];return i||(i=Nm[r]=[]),i}function Vn(e,t,n){var r=qo(null);r.type=t,r.target=e,n&&Ca(r,Un(n)?n:{data:n}),Hn(e,t).forEach(function(t){(t[1]||t[0]).apply(e,[r])})}function Zn(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments[4];zn(r)&&!i&&(i=r,r=void 0);var o=[n,void 0,r];r&&!i&&(i=function(){Yn(e,t,n,r);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];n.apply(e,o)}),i&&(o[1]=i),Hn(e,t).push(o)}function Yn(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=Hn(e,t);if(n||r){var o=-1,a=void 0;return i.find(function(e,t){if((!n||e[0]===n)&&(!r||e[2]))return o=t,a=e[1],!0}),-1!==o&&i.splice(o,1),a}i.length=0}function $n(e,t){var n=e.__evt_id;n||(Object.defineProperty(e,"__evt_id",{writable:!0,enumerable:!1,configurable:!0}),n=e.__evt_id=++Cm.count);var r=n+"_"+t,i=Cm[r];return i||(i=Cm[r]=[]),i}function Jn(e,t,n){var r=qo(null);r.type=t,r.target=e,n&&Ca(r,Un(n)?n:{data:n}),$n(e,t).forEach(function(t){(t[1]||t[0]).apply(e,[r])})}function Kn(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments[4];zn(r)&&!i&&(i=r,r=void 0);var o=[n,void 0,r];r&&!i&&(i=function(){Qn(e,t,n,r);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];n.apply(e,o)}),i&&(o[1]=i),$n(e,t).push(o)}function Qn(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=$n(e,t);if(n||r){var o=-1,a=void 0;return i.find(function(e,t){if((!n||e[0]===n)&&(!r||e[2]))return o=t,a=e[1],!0}),-1!==o&&i.splice(o,1),a}i.length=0}function Xn(e){return ou(e)}function qn(e,t){return e.getAttribute(t)}function er(e,t,n){void 0===n?e.removeAttribute(t):e.setAttribute(t,n)}function tr(e,t){if(t&&(t=t.trim())){var n=t.split(/\s+/);if(e.classList)n.forEach(function(t){return e.classList.add(t)});else{var r=" "+(e.className||"")+" ";n.forEach(function(e){-1===r.indexOf(" "+e+" ")&&(r+=" "+e)}),e.className=r.trim()}}}function nr(e,t){if(t&&(t=t.trim())){var n=t.split(/\s+/);if(e.classList)n.forEach(function(t){return e.classList.remove(t)});else{var r=" "+e.className+" ";n.forEach(function(e){for(var t=" "+e+" ";-1!==r.indexOf(t);)r=r.replace(t," ")}),e.className=r.trim()}}}function rr(e,t){return new RegExp("(?:^|\\s)"+t+"(?=\\s|$)").test(e.className)}function ir(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(r){var o=Qn(e,t+"_once",n);o&&(n=o)}e.removeEventListener(t,n,i)}function or(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(r){var o=n;Kn(e,t+"_once",o,n=function(){for(var a=arguments.length,s=Array(a),u=0;u<a;u++)s[u]=arguments[u];o.apply(this,s),ir(e,t,n,r,i)})}e.addEventListener(t,n,i)}function ar(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=function(n){var i=dr(n.target||n.srcElement,e,!0),o=cr(t,e,!0).find(function(e){return i.find(function(t){return e===t})});o&&r.apply(o,arguments)};Kn(e,n+"_delegate_"+t,r,o),e.addEventListener(n,o,i)}function sr(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=Qn(e,n+"_delegate_"+t,r);o&&e.removeEventListener(n,o,i)}function ur(e,t){return(e.currentStyle||document.defaultView.getComputedStyle(e,null))[t]||e.style[t]}function lr(e,t,n){if(Un(t))for(var r in t)lr(e,r,t[r]);else e.style[t]=n}function cr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,n=arguments[2],r=t.querySelectorAll(e);return n?ou(r):r}function fr(e){e.parentNode.removeChild(e)}function dr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments[2],r=arguments[3],i=[];for(n&&i.push(e);e&&e.parentNode!==t;)(e=e.parentNode)&&i.push(e);return r&&i.push(t),i}function hr(e,t){return e.constructor===Bm?e:new Bm(e,t)}var pr="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},vr=function(e){if(void 0==e)throw TypeError("Can't call method on  "+e);return e},mr=function(e){return Object(vr(e))},gr={}.hasOwnProperty,yr=function(e,t){return gr.call(e,t)},br=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)}),wr=br["__core-js_shared__"]||(br["__core-js_shared__"]={}),_r=function(e){return wr[e]||(wr[e]={})},Er=0,Sr=Math.random(),kr=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++Er+Sr).toString(36))},Tr=_r("keys"),Ar=function(e){return Tr[e]||(Tr[e]=kr(e))},Mr=Ar("IE_PROTO"),xr=Object.prototype,Lr=Object.getPrototypeOf||function(e){return e=mr(e),yr(e,Mr)?e[Mr]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?xr:null},Or=t(function(e){var t=e.exports={version:"2.5.0"};"number"==typeof __e&&(__e=t)}),Dr=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e},Ir=function(e,t,n){if(Dr(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}},Rr=function(e){return"object"==typeof e?null!==e:"function"==typeof e},Nr=function(e){if(!Rr(e))throw TypeError(e+" is not an object!");return e},Cr=function(e){try{return!!e()}catch(e){return!0}},Pr=!Cr(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),jr=br.document,Fr=Rr(jr)&&Rr(jr.createElement),Br=function(e){return Fr?jr.createElement(e):{}},zr=!Pr&&!Cr(function(){return 7!=Object.defineProperty(Br("div"),"a",{get:function(){return 7}}).a}),Ur=function(e,t){if(!Rr(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!Rr(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!Rr(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!Rr(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},Gr=Object.defineProperty,Wr={f:Pr?Object.defineProperty:function(e,t,n){if(Nr(e),t=Ur(t,!0),Nr(n),zr)try{return Gr(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},Hr=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Vr=Pr?function(e,t,n){return Wr.f(e,t,Hr(1,n))}:function(e,t,n){return e[t]=n,e},Zr=function(e,t,n){var r,i,o,a=e&Zr.F,s=e&Zr.G,u=e&Zr.S,l=e&Zr.P,c=e&Zr.B,f=e&Zr.W,d=s?Or:Or[t]||(Or[t]={}),h=d.prototype,p=s?br:u?br[t]:(br[t]||{}).prototype;s&&(n=t);for(r in n)(i=!a&&p&&void 0!==p[r])&&r in d||(o=i?p[r]:n[r],d[r]=s&&"function"!=typeof p[r]?n[r]:c&&i?Ir(o,br):f&&p[r]==o?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(o):l&&"function"==typeof o?Ir(Function.call,o):o,l&&((d.virtual||(d.virtual={}))[r]=o,e&Zr.R&&h&&!h[r]&&Vr(h,r,o)))};Zr.F=1,Zr.G=2,Zr.S=4,Zr.P=8,Zr.B=16,Zr.W=32,Zr.U=64,Zr.R=128;var Yr=Zr,$r=function(e,t){var n=(Or.Object||{})[e]||Object[e],r={};r[e]=t(n),Yr(Yr.S+Yr.F*Cr(function(){n(1)}),"Object",r)};$r("getPrototypeOf",function(){return function(e){return Lr(mr(e))}});var Jr=Or.Object.getPrototypeOf,Kr=t(function(e){e.exports={default:Jr,__esModule:!0}}),Qr=e(Kr),Xr=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")}})),qr=Math.ceil,ei=Math.floor,ti=function(e){return isNaN(e=+e)?0:(e>0?ei:qr)(e)},ni=Vr,ri={},ii={}.toString,oi=function(e){return ii.call(e).slice(8,-1)},ai=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==oi(e)?e.split(""):Object(e)},si=function(e){return ai(vr(e))},ui=Math.min,li=function(e){return e>0?ui(ti(e),9007199254740991):0},ci=Math.max,fi=Math.min,di=function(e,t){return(e=ti(e))<0?ci(e+t,0):fi(e,t)},hi=function(e){return function(t,n,r){var i,o=si(t),a=li(o.length),s=di(r,a);if(e&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}}(!1),pi=Ar("IE_PROTO"),vi=function(e,t){var n,r=si(e),i=0,o=[];for(n in r)n!=pi&&yr(r,n)&&o.push(n);for(;t.length>i;)yr(r,n=t[i++])&&(~hi(o,n)||o.push(n));return o},mi="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),gi=Object.keys||function(e){return vi(e,mi)},yi=Pr?Object.defineProperties:function(e,t){Nr(e);for(var n,r=gi(t),i=r.length,o=0;i>o;)Wr.f(e,n=r[o++],t[n]);return e},bi=br.document,wi=bi&&bi.documentElement,_i=Ar("IE_PROTO"),Ei=function(){},Si=function(){var e,t=Br("iframe"),n=mi.length;for(t.style.display="none",wi.appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),Si=e.F;n--;)delete Si.prototype[mi[n]];return Si()},ki=Object.create||function(e,t){var n;return null!==e?(Ei.prototype=Nr(e),n=new Ei,Ei.prototype=null,n[_i]=e):n=Si(),void 0===t?n:yi(n,t)},Ti=t(function(e){var t=_r("wks"),n=br.Symbol,r="function"==typeof n;(e.exports=function(e){return t[e]||(t[e]=r&&n[e]||(r?n:kr)("Symbol."+e))}).store=t}),Ai=Wr.f,Mi=Ti("toStringTag"),xi=function(e,t,n){e&&!yr(e=n?e:e.prototype,Mi)&&Ai(e,Mi,{configurable:!0,value:t})},Li={};Vr(Li,Ti("iterator"),function(){return this});var Oi=function(e,t,n){e.prototype=ki(Li,{next:Hr(1,n)}),xi(e,t+" Iterator")},Di=Ti("iterator"),Ii=!([].keys&&"next"in[].keys()),Ri=function(){return this},Ni=function(e,t,n,r,i,o,a){Oi(n,t,r);var s,u,l,c=function(e){if(!Ii&&e in p)return p[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},f=t+" Iterator",d="values"==i,h=!1,p=e.prototype,v=p[Di]||p["@@iterator"]||i&&p[i],m=v||c(i),g=i?d?c("entries"):m:void 0,y="Array"==t?p.entries||v:v;if(y&&(l=Lr(y.call(new e)))!==Object.prototype&&l.next&&xi(l,f,!0),d&&v&&"values"!==v.name&&(h=!0,m=function(){return v.call(this)}),a&&(Ii||h||!p[Di])&&Vr(p,Di,m),ri[t]=m,ri[f]=Ri,i)if(s={values:d?m:c("values"),keys:o?m:c("keys"),entries:g},a)for(u in s)u in p||ni(p,u,s[u]);else Yr(Yr.P+Yr.F*(Ii||h),t,s);return s},Ci=function(e){return function(t,n){var r,i,o=String(vr(t)),a=ti(n),s=o.length;return a<0||a>=s?e?"":void 0:(r=o.charCodeAt(a))<55296||r>56319||a+1===s||(i=o.charCodeAt(a+1))<56320||i>57343?e?o.charAt(a):r:e?o.slice(a,a+2):i-56320+(r-55296<<10)+65536}}(!0);Ni(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=Ci(t,n),this._i+=e.length,{value:e,done:!1})});var Pi=function(){},ji=function(e,t){return{value:t,done:!!e}};Ni(Array,"Array",function(e,t){this._t=si(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,ji(1)):"keys"==t?ji(0,n):"values"==t?ji(0,e[n]):ji(0,[n,e[n]])},"values");ri.Arguments=ri.Array,Pi(),Pi(),Pi();for(var Fi=Ti("toStringTag"),Bi="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),zi=0;zi<Bi.length;zi++){var Ui=Bi[zi],Gi=br[Ui],Wi=Gi&&Gi.prototype;Wi&&!Wi[Fi]&&Vr(Wi,Fi,Ui),ri[Ui]=ri.Array}var Hi={f:Ti},Vi=Hi.f("iterator"),Zi=t(function(e){e.exports={default:Vi,__esModule:!0}});e(Zi);var Yi=t(function(e){var t=kr("meta"),n=Wr.f,r=0,i=Object.isExtensible||function(){return!0},o=!Cr(function(){return i(Object.preventExtensions({}))}),a=function(e){n(e,t,{value:{i:"O"+ ++r,w:{}}})},s=e.exports={KEY:t,NEED:!1,fastKey:function(e,n){if(!Rr(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!yr(e,t)){if(!i(e))return"F";if(!n)return"E";a(e)}return e[t].i},getWeak:function(e,n){if(!yr(e,t)){if(!i(e))return!0;if(!n)return!1;a(e)}return e[t].w},onFreeze:function(e){return o&&s.NEED&&i(e)&&!yr(e,t)&&a(e),e}}}),$i=Wr.f,Ji=function(e){var t=Or.Symbol||(Or.Symbol={});"_"==e.charAt(0)||e in t||$i(t,e,{value:Hi.f(e)})},Ki=function(e,t){for(var n,r=si(e),i=gi(r),o=i.length,a=0;o>a;)if(r[n=i[a++]]===t)return n},Qi={f:Object.getOwnPropertySymbols},Xi={f:{}.propertyIsEnumerable},qi=function(e){var t=gi(e),n=Qi.f;if(n)for(var r,i=n(e),o=Xi.f,a=0;i.length>a;)o.call(e,r=i[a++])&&t.push(r);return t},eo=Array.isArray||function(e){return"Array"==oi(e)},to=mi.concat("length","prototype"),no={f:Object.getOwnPropertyNames||function(e){return vi(e,to)}},ro=no.f,io={}.toString,oo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],ao=function(e){try{return ro(e)}catch(e){return oo.slice()}},so={f:function(e){return oo&&"[object Window]"==io.call(e)?ao(e):ro(si(e))}},uo=Object.getOwnPropertyDescriptor,lo={f:Pr?uo:function(e,t){if(e=si(e),t=Ur(t,!0),zr)try{return uo(e,t)}catch(e){}if(yr(e,t))return Hr(!Xi.f.call(e,t),e[t])}},co=Yi.KEY,fo=lo.f,ho=Wr.f,po=so.f,vo=br.Symbol,mo=br.JSON,go=mo&&mo.stringify,yo=Ti("_hidden"),bo=Ti("toPrimitive"),wo={}.propertyIsEnumerable,_o=_r("symbol-registry"),Eo=_r("symbols"),So=_r("op-symbols"),ko=Object.prototype,To="function"==typeof vo,Ao=br.QObject,Mo=!Ao||!Ao.prototype||!Ao.prototype.findChild,xo=Pr&&Cr(function(){return 7!=ki(ho({},"a",{get:function(){return ho(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=fo(ko,t);r&&delete ko[t],ho(e,t,n),r&&e!==ko&&ho(ko,t,r)}:ho,Lo=function(e){var t=Eo[e]=ki(vo.prototype);return t._k=e,t},Oo=To&&"symbol"==typeof vo.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof vo},Do=function(e,t,n){return e===ko&&Do(So,t,n),Nr(e),t=Ur(t,!0),Nr(n),yr(Eo,t)?(n.enumerable?(yr(e,yo)&&e[yo][t]&&(e[yo][t]=!1),n=ki(n,{enumerable:Hr(0,!1)})):(yr(e,yo)||ho(e,yo,Hr(1,{})),e[yo][t]=!0),xo(e,t,n)):ho(e,t,n)},Io=function(e,t){Nr(e);for(var n,r=qi(t=si(t)),i=0,o=r.length;o>i;)Do(e,n=r[i++],t[n]);return e},Ro=function(e){var t=wo.call(this,e=Ur(e,!0));return!(this===ko&&yr(Eo,e)&&!yr(So,e))&&(!(t||!yr(this,e)||!yr(Eo,e)||yr(this,yo)&&this[yo][e])||t)},No=function(e,t){if(e=si(e),t=Ur(t,!0),e!==ko||!yr(Eo,t)||yr(So,t)){var n=fo(e,t);return!n||!yr(Eo,t)||yr(e,yo)&&e[yo][t]||(n.enumerable=!0),n}},Co=function(e){for(var t,n=po(si(e)),r=[],i=0;n.length>i;)yr(Eo,t=n[i++])||t==yo||t==co||r.push(t);return r},Po=function(e){for(var t,n=e===ko,r=po(n?So:si(e)),i=[],o=0;r.length>o;)!yr(Eo,t=r[o++])||n&&!yr(ko,t)||i.push(Eo[t]);return i};To||(ni((vo=function(){if(this instanceof vo)throw TypeError("Symbol is not a constructor!");var e=kr(arguments.length>0?arguments[0]:void 0),t=function(n){this===ko&&t.call(So,n),yr(this,yo)&&yr(this[yo],e)&&(this[yo][e]=!1),xo(this,e,Hr(1,n))};return Pr&&Mo&&xo(ko,e,{configurable:!0,set:t}),Lo(e)}).prototype,"toString",function(){return this._k}),lo.f=No,Wr.f=Do,no.f=so.f=Co,Xi.f=Ro,Qi.f=Po,Hi.f=function(e){return Lo(Ti(e))}),Yr(Yr.G+Yr.W+Yr.F*!To,{Symbol:vo});for(var jo="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Fo=0;jo.length>Fo;)Ti(jo[Fo++]);for(var Bo=gi(Ti.store),zo=0;Bo.length>zo;)Ji(Bo[zo++]);Yr(Yr.S+Yr.F*!To,"Symbol",{for:function(e){return yr(_o,e+="")?_o[e]:_o[e]=vo(e)},keyFor:function(e){if(Oo(e))return Ki(_o,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){Mo=!0},useSimple:function(){Mo=!1}}),Yr(Yr.S+Yr.F*!To,"Object",{create:function(e,t){return void 0===t?ki(e):Io(ki(e),t)},defineProperty:Do,defineProperties:Io,getOwnPropertyDescriptor:No,getOwnPropertyNames:Co,getOwnPropertySymbols:Po}),mo&&Yr(Yr.S+Yr.F*(!To||Cr(function(){var e=vo();return"[null]"!=go([e])||"{}"!=go({a:e})||"{}"!=go(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!Oo(e)){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);return"function"==typeof(t=r[1])&&(n=t),!n&&eo(t)||(t=function(e,t){if(n&&(t=n.call(this,e,t)),!Oo(t))return t}),r[1]=t,go.apply(mo,r)}}}),vo.prototype[bo]||Vr(vo.prototype,bo,vo.prototype.valueOf),xi(vo,"Symbol"),xi(Math,"Math",!0),xi(br.JSON,"JSON",!0),Ji("asyncIterator"),Ji("observable");var Uo=Or.Symbol,Go=t(function(e){e.exports={default:Uo,__esModule:!0}});e(Go);var Wo=t(function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=n(Zi),i=n(Go),o="function"==typeof i.default&&"symbol"==typeof r.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(r.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)}}),Ho=e(Wo),Vo=e(t(function(e,t){t.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(Wo);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,n.default)(t))&&"function"!=typeof t?e:t}})),Zo=function(e,t){if(Nr(e),!Rr(t)&&null!==t)throw TypeError(t+": can't set as prototype!")},Yo={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,n){try{(n=Ir(Function.call,lo.f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,r){return Zo(e,r),t?e.__proto__=r:n(e,r),e}}({},!1):void 0),check:Zo};Yr(Yr.S,"Object",{setPrototypeOf:Yo.set});var $o=Or.Object.setPrototypeOf,Jo=t(function(e){e.exports={default:$o,__esModule:!0}});e(Jo),Yr(Yr.S,"Object",{create:ki});var Ko=Or.Object,Qo=function(e,t){return Ko.create(e,t)},Xo=t(function(e){e.exports={default:Qo,__esModule:!0}}),qo=e(Xo),ea=e(t(function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=n(Jo),i=n(Xo),o=n(Wo);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&&(r.default?(0,r.default)(e,t):e.__proto__=t)}}));Yr(Yr.S+Yr.F*!Pr,"Object",{defineProperty:Wr.f});var ta=Or.Object,na=function(e,t,n){return ta.defineProperty(e,t,n)},ra=t(function(e){e.exports={default:na,__esModule:!0}}),ia=e(ra),oa=lo.f;$r("getOwnPropertyDescriptor",function(){return function(e,t){return oa(si(e),t)}});var aa=Or.Object,sa=function(e,t){return aa.getOwnPropertyDescriptor(e,t)},ua=t(function(e){e.exports={default:sa,__esModule:!0}}),la=e(ua),ca=e(t(function(e,t){t.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(ra);t.default=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),(0,n.default)(e,i.key,i)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()})),fa=e(t(function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=n(Kr),i=n(ua);t.default=function e(t,n,o){null===t&&(t=Function.prototype);var a=(0,i.default)(t,n);if(void 0===a){var s=(0,r.default)(t);return null===s?void 0:e(s,n,o)}if("value"in a)return a.value;var u=a.get;if(void 0!==u)return u.call(o)}})),da=Ti("toStringTag"),ha="Arguments"==oi(function(){return arguments}()),pa=function(e,t){try{return e[t]}catch(e){}},va=function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=pa(t=Object(e),da))?n:ha?oi(t):"Object"==(r=oi(t))&&"function"==typeof t.callee?"Arguments":r},ma=Ti("iterator"),ga=Or.isIterable=function(e){var t=Object(e);return void 0!==t[ma]||"@@iterator"in t||ri.hasOwnProperty(va(t))},ya=t(function(e){e.exports={default:ga,__esModule:!0}});e(ya);var ba=Ti("iterator"),wa=Or.getIteratorMethod=function(e){if(void 0!=e)return e[ba]||e["@@iterator"]||ri[va(e)]},_a=Or.getIterator=function(e){var t=wa(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return Nr(t.call(e))},Ea=t(function(e){e.exports={default:_a,__esModule:!0}});e(Ea);var Sa=t(function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=n(ya),i=n(Ea);t.default=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var s,u=(0,i.default)(e);!(r=(s=u.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if((0,r.default)(Object(t)))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()}),ka=e(Sa),Ta=Xi.f,Aa=function(e){return function(t){for(var n,r=si(t),i=gi(r),o=i.length,a=0,s=[];o>a;)Ta.call(r,n=i[a++])&&s.push(e?[n,r[n]]:r[n]);return s}}(!0);Yr(Yr.S,"Object",{entries:function(e){return Aa(e)}});var Ma=Or.Object.entries,xa=e(t(function(e){e.exports={default:Ma,__esModule:!0}})),La=Object.assign,Oa=!La||Cr(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=La({},e)[n]||Object.keys(La({},t)).join("")!=r})?function(e,t){for(var n=mr(e),r=arguments.length,i=1,o=Qi.f,a=Xi.f;r>i;)for(var s,u=ai(arguments[i++]),l=o?gi(u).concat(o(u)):gi(u),c=l.length,f=0;c>f;)a.call(u,s=l[f++])&&(n[s]=u[s]);return n}:La;Yr(Yr.S+Yr.F,"Object",{assign:Oa});var Da,Ia,Ra,Na=Or.Object.assign,Ca=e(t(function(e){e.exports={default:Na,__esModule:!0}})),Pa=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e},ja=function(e,t,n,r){try{return r?t(Nr(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&Nr(i.call(e)),t}},Fa=Ti("iterator"),Ba=Array.prototype,za=function(e){return void 0!==e&&(ri.Array===e||Ba[Fa]===e)},Ua=t(function(e){var t={},n={},r=e.exports=function(e,r,i,o,a){var s,u,l,c,f=a?function(){return e}:wa(e),d=Ir(i,o,r?2:1),h=0;if("function"!=typeof f)throw TypeError(e+" is not iterable!");if(za(f)){for(s=li(e.length);s>h;h++)if((c=r?d(Nr(u=e[h])[0],u[1]):d(e[h]))===t||c===n)return c}else for(l=f.call(e);!(u=l.next()).done;)if((c=ja(l,d,u.value,r))===t||c===n)return c};r.BREAK=t,r.RETURN=n}),Ga=Ti("species"),Wa=function(e,t){var n,r=Nr(e).constructor;return void 0===r||void 0==(n=Nr(r)[Ga])?t:Dr(n)},Ha=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)},Va=br.process,Za=br.setImmediate,Ya=br.clearImmediate,$a=br.MessageChannel,Ja=br.Dispatch,Ka=0,Qa={},Xa=function(){var e=+this;if(Qa.hasOwnProperty(e)){var t=Qa[e];delete Qa[e],t()}},qa=function(e){Xa.call(e.data)};Za&&Ya||(Za=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return Qa[++Ka]=function(){Ha("function"==typeof e?e:Function(e),t)},Da(Ka),Ka},Ya=function(e){delete Qa[e]},"process"==oi(Va)?Da=function(e){Va.nextTick(Ir(Xa,e,1))}:Ja&&Ja.now?Da=function(e){Ja.now(Ir(Xa,e,1))}:$a?(Ra=(Ia=new $a).port2,Ia.port1.onmessage=qa,Da=Ir(Ra.postMessage,Ra,1)):br.addEventListener&&"function"==typeof postMessage&&!br.importScripts?(Da=function(e){br.postMessage(e+"","*")},br.addEventListener("message",qa,!1)):Da="onreadystatechange"in Br("script")?function(e){wi.appendChild(Br("script")).onreadystatechange=function(){wi.removeChild(this),Xa.call(e)}}:function(e){setTimeout(Ir(Xa,e,1),0)});var es={set:Za,clear:Ya},ts=es.set,ns=br.MutationObserver||br.WebKitMutationObserver,rs=br.process,is=br.Promise,os="process"==oi(rs),as={f:function(e){return new n(e)}},ss=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}},us=function(e,t){var n=as.f(e);return(0,n.resolve)(t),n.promise},ls=function(e,t,n){for(var r in t)n&&e[r]?e[r]=t[r]:Vr(e,r,t[r]);return e},cs=Ti("species"),fs=function(e){var t="function"==typeof Or[e]?Or[e]:br[e];Pr&&t&&!t[cs]&&Wr.f(t,cs,{configurable:!0,get:function(){return this}})},ds=Ti("iterator"),hs=!1;try{var ps=[7][ds]();ps.return=function(){hs=!0},Array.from(ps,function(){throw 2})}catch(e){}var vs,ms,gs,ys,bs=function(e,t){if(!t&&!hs)return!1;var n=!1;try{var r=[7],i=r[ds]();i.next=function(){return{done:n=!0}},r[ds]=function(){return i},e(r)}catch(e){}return n},ws=es.set,_s=function(){var e,t,n,r=function(){var r,i;for(os&&(r=rs.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(os)n=function(){rs.nextTick(r)};else if(ns){var i=!0,o=document.createTextNode("");new ns(r).observe(o,{characterData:!0}),n=function(){o.data=i=!i}}else if(is&&is.resolve){var a=is.resolve();n=function(){a.then(r)}}else n=function(){ts.call(br,r)};return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}(),Es=br.TypeError,Ss=br.process,ks=br.Promise,Ts="process"==va(Ss),As=function(){},Ms=ms=as.f,xs=!!function(){try{var e=ks.resolve(1),t=(e.constructor={})[Ti("species")]=function(e){e(As,As)};return(Ts||"function"==typeof PromiseRejectionEvent)&&e.then(As)instanceof t}catch(e){}}(),Ls=function(e,t){return e===t||e===ks&&t===ys},Os=function(e){var t;return!(!Rr(e)||"function"!=typeof(t=e.then))&&t},Ds=function(e,t){if(!e._n){e._n=!0;var n=e._c;_s(function(){for(var r=e._v,i=1==e._s,o=0;n.length>o;)!function(t){var n,o,a=i?t.ok:t.fail,s=t.resolve,u=t.reject,l=t.domain;try{a?(i||(2==e._h&&Ns(e),e._h=1),!0===a?n=r:(l&&l.enter(),n=a(r),l&&l.exit()),n===t.promise?u(Es("Promise-chain cycle")):(o=Os(n))?o.call(n,s,u):s(n)):u(r)}catch(e){u(e)}}(n[o++]);e._c=[],e._n=!1,t&&!e._h&&Is(e)})}},Is=function(e){ws.call(br,function(){var t,n,r,i=e._v,o=Rs(e);if(o&&(t=ss(function(){Ts?Ss.emit("unhandledRejection",i,e):(n=br.onunhandledrejection)?n({promise:e,reason:i}):(r=br.console)&&r.error&&r.error("Unhandled promise rejection",i)}),e._h=Ts||Rs(e)?2:1),e._a=void 0,o&&t.e)throw t.v})},Rs=function(e){if(1==e._h)return!1;for(var t,n=e._a||e._c,r=0;n.length>r;)if((t=n[r++]).fail||!Rs(t.promise))return!1;return!0},Ns=function(e){ws.call(br,function(){var t;Ts?Ss.emit("rejectionHandled",e):(t=br.onrejectionhandled)&&t({promise:e,reason:e._v})})},Cs=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()),Ds(t,!0))},Ps=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw Es("Promise can't be resolved itself");(t=Os(e))?_s(function(){var r={_w:n,_d:!1};try{t.call(e,Ir(Ps,r,1),Ir(Cs,r,1))}catch(e){Cs.call(r,e)}}):(n._v=e,n._s=1,Ds(n,!1))}catch(e){Cs.call({_w:n,_d:!1},e)}}};xs||(ks=function(e){Pa(this,ks,"Promise","_h"),Dr(e),vs.call(this);try{e(Ir(Ps,this,1),Ir(Cs,this,1))}catch(e){Cs.call(this,e)}},(vs=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=ls(ks.prototype,{then:function(e,t){var n=Ms(Wa(this,ks));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=Ts?Ss.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&Ds(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),gs=function(){var e=new vs;this.promise=e,this.resolve=Ir(Ps,e,1),this.reject=Ir(Cs,e,1)},as.f=Ms=function(e){return Ls(ks,e)?new gs(e):ms(e)}),Yr(Yr.G+Yr.W+Yr.F*!xs,{Promise:ks}),xi(ks,"Promise"),fs("Promise"),ys=Or.Promise,Yr(Yr.S+Yr.F*!xs,"Promise",{reject:function(e){var t=Ms(this);return(0,t.reject)(e),t.promise}}),Yr(Yr.S+!0*Yr.F,"Promise",{resolve:function(e){return e instanceof ks&&Ls(e.constructor,this)?e:us(this,e)}}),Yr(Yr.S+Yr.F*!(xs&&bs(function(e){ks.all(e).catch(As)})),"Promise",{all:function(e){var t=this,n=Ms(t),r=n.resolve,i=n.reject,o=ss(function(){var n=[],o=0,a=1;Ua(e,!1,function(e){var s=o++,u=!1;n.push(void 0),a++,t.resolve(e).then(function(e){u||(u=!0,n[s]=e,--a||r(n))},i)}),--a||r(n)});return o.e&&i(o.v),n.promise},race:function(e){var t=this,n=Ms(t),r=n.reject,i=ss(function(){Ua(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}}),Yr(Yr.P+Yr.R,"Promise",{finally:function(e){var t=Wa(this,Or.Promise||br.Promise),n="function"==typeof e;return this.then(n?function(n){return us(t,e()).then(function(){return n})}:e,n?function(n){return us(t,e()).then(function(){throw n})}:e)}}),Yr(Yr.S,"Promise",{try:function(e){var t=as.f(this),n=ss(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}});var js=Or.Promise,Fs=e(t(function(e){e.exports={default:js,__esModule:!0}}));$r("keys",function(){return function(e){return gi(mr(e))}});var Bs=Or.Object.keys,zs=e(t(function(e){e.exports={default:Bs,__esModule:!0}})),Us=Math.floor;Yr(Yr.S,"Number",{isInteger:function(e){return!Rr(e)&&isFinite(e)&&Us(e)===e}});var Gs=Or.Number.isInteger,Ws=e(t(function(e){e.exports={default:Gs,__esModule:!0}})),Hs="\t\n\v\f\r   ᠎             　\u2028\u2029\ufeff",Vs="["+Hs+"]",Zs=RegExp("^"+Vs+Vs+"*"),Ys=RegExp(Vs+Vs+"*$"),$s=function(e,t,n){var r={},i=Cr(function(){return!!Hs[e]()||"​"!="​"[e]()}),o=r[e]=i?t(Js):Hs[e];n&&(r[n]=o),Yr(Yr.P+Yr.F*i,"String",r)},Js=$s.trim=function(e,t){return e=String(vr(e)),1&t&&(e=e.replace(Zs,"")),2&t&&(e=e.replace(Ys,"")),e},Ks=$s,Qs=br.parseFloat,Xs=Ks.trim,qs=1/Qs(Hs+"-0")!=-1/0?function(e){var t=Xs(String(e),3),n=Qs(t);return 0===n&&"-"==t.charAt(0)?-0:n}:Qs;Yr(Yr.S+Yr.F*(Number.parseFloat!=qs),"Number",{parseFloat:qs});var eu=parseFloat,tu=e(t(function(e){e.exports={default:eu,__esModule:!0}})),nu=function(e,t,n){t in e?Wr.f(e,t,Hr(0,n)):e[t]=n};Yr(Yr.S+Yr.F*!bs(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,r,i,o=mr(e),a="function"==typeof this?this:Array,s=arguments.length,u=s>1?arguments[1]:void 0,l=void 0!==u,c=0,f=wa(o);if(l&&(u=Ir(u,s>2?arguments[2]:void 0,2)),void 0==f||a==Array&&za(f))for(n=new a(t=li(o.length));t>c;c++)nu(n,c,l?u(o[c],c):o[c]);else for(i=f.call(o),n=new a;!(r=i.next()).done;c++)nu(n,c,l?ja(i,u,[r.value,c],!0):r.value);return n.length=c,n}});var ru=Or.Array.from,iu=t(function(e){e.exports={default:ru,__esModule:!0}}),ou=e(iu),au=e(t(function(e,t){t.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(iu);t.default=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(0,n.default)(e)}})),su=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")}})),uu=t(function(e){e.exports={default:na,__esModule:!0}});e(uu);var lu=e(t(function(e,t){t.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(uu);t.default=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),(0,n.default)(e,i.key,i)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()})),cu=t(function(e){e.exports={default:Vi,__esModule:!0}});e(cu);var fu=t(function(e){e.exports={default:Uo,__esModule:!0}});e(fu);var du=e(t(function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=n(cu),i=n(fu),o="function"==typeof i.default&&"symbol"==typeof r.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(r.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)}})),hu=t(function(e){e.exports={default:Vi,__esModule:!0}});e(hu);var pu=t(function(e){e.exports={default:Uo,__esModule:!0}});e(pu);var vu=e(t(function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=n(hu),i=n(pu),o="function"==typeof i.default&&"symbol"==typeof r.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(r.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)}})),mu=e(t(function(e){e.exports={default:Bs,__esModule:!0}})),gu=e(t(function(e){e.exports={default:Gs,__esModule:!0}})),yu=e(t(function(e){e.exports={default:eu,__esModule:!0}})),bu=function(){function e(){su(this,e)}return lu(e,null,[{key:"error",value:function(t,n){e.ENABLE_ERROR&&(console.error||console.warn||console.log)(m(t,n))}},{key:"info",value:function(t,n){e.ENABLE_INFO&&(console.info||console.log)(m(t,n))}},{key:"warn",value:function(t,n){e.ENABLE_WARN&&(console.warn||console.log)(m(t,n))}},{key:"debug",value:function(t,n){e.ENABLE_DEBUG&&(console.debug||console.log)(m(t,n))}},{key:"verbose",value:function(t,n){e.ENABLE_VERBOSE&&console.log(m(t,n))}}]),e}();bu.GLOBAL_TAG="chimee",bu.FORCE_GLOBAL_TAG=!1,bu.ENABLE_ERROR=!0,bu.ENABLE_INFO=!0,bu.ENABLE_WARN=!0,bu.ENABLE_DEBUG=!0,bu.ENABLE_VERBOSE=!0;t(function(e,t){!function(n,r){var i="model",o="name",a="type",s="vendor",u="version",l="mobile",c="tablet",f={extend:function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},has:function(e,t){return"string"==typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return"string"==typeof e?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},d={rgx:function(e,t){for(var n,r,i,o,a,s,u=0;u<t.length&&!a;){var l=t[u],c=t[u+1];for(n=r=0;n<l.length&&!a;)if(a=l[n++].exec(e))for(i=0;i<c.length;i++)s=a[++r],"object"==typeof(o=c[i])&&o.length>0?2==o.length?"function"==typeof o[1]?this[o[0]]=o[1].call(this,s):this[o[0]]=o[1]:3==o.length?"function"!=typeof o[1]||o[1].exec&&o[1].test?this[o[0]]=s?s.replace(o[1],o[2]):void 0:this[o[0]]=s?o[1].call(this,s,o[2]):void 0:4==o.length&&(this[o[0]]=s?o[3].call(this,s.replace(o[1],o[2])):void 0):this[o]=s||void 0;u+=2}},str:function(e,t){for(var n in t)if("object"==typeof t[n]&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(f.has(t[n][r],e))return"?"===n?void 0:n}else if(f.has(t[n],e))return"?"===n?void 0:n;return e}},h={browser:{oldsafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{amazon:{model:{"Fire Phone":["SD","KF"]}},sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2000:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}},p={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[o,u],[/(opios)[\/\s]+([\w\.]+)/i],[[o,"Opera Mini"],u],[/\s(opr)\/([\w\.]+)/i],[[o,"Opera"],u],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]+)*/i,/(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?([\w\.]*)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]+)*/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser)\/([\w\.-]+)/i],[o,u],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[o,"IE"],u],[/(edge)\/((\d+)?[\w\.]+)/i],[o,u],[/(yabrowser)\/([\w\.]+)/i],[[o,"Yandex"],u],[/(puffin)\/([\w\.]+)/i],[[o,"Puffin"],u],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[o,"UCBrowser"],u],[/(comodo_dragon)\/([\w\.]+)/i],[[o,/_/g," "],u],[/(micromessenger)\/([\w\.]+)/i],[[o,"WeChat"],u],[/(QQ)\/([\d\.]+)/i],[o,u],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[o,u],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[u,[o,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[u,[o,"Facebook"]],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[u,[o,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[o,/(.+)/,"$1 WebView"],u],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[o,/(.+(?:g|us))(.+)/,"$1 $2"],u],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[u,[o,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[o,u],[/(dolfin)\/([\w\.]+)/i],[[o,"Dolphin"],u],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[o,"Chrome"],u],[/(coast)\/([\w\.]+)/i],[[o,"Opera Coast"],u],[/fxios\/([\w\.-]+)/i],[u,[o,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[u,[o,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[u,o],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[o,"GSA"],u],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[o,[u,d.str,h.browser.oldsafari.version]],[/(konqueror)\/([\w\.]+)/i,/(webkit|khtml)\/([\w\.]+)/i],[o,u],[/(navigator|netscape)\/([\w\.-]+)/i],[[o,"Netscape"],u],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix)\/([\w\.-]+)/i,/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]+)*/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[o,u]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",f.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/windows\s(ce|mobile);\sppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[["architecture",/ower/,"",f.lowerize]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+;))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[["architecture",f.lowerize]]],device:[[/\((ipad|playbook);[\w\s\);-]+(rim|apple)/i],[i,s,[a,c]],[/applecoremedia\/[\w\.]+ \((ipad)/],[i,[s,"Apple"],[a,c]],[/(apple\s{0,1}tv)/i],[[i,"Apple TV"],[s,"Apple"]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[s,i,[a,c]],[/(kf[A-z]+)\sbuild\/[\w\.]+.*silk\//i],[i,[s,"Amazon"],[a,c]],[/(sd|kf)[0349hijorstuw]+\sbuild\/[\w\.]+.*silk\//i],[[i,d.str,h.device.amazon.model],[s,"Amazon"],[a,l]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[i,s,[a,l]],[/\((ip[honed|\s\w*]+);/i],[i,[s,"Apple"],[a,l]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]+)*/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[s,i,[a,l]],[/\(bb10;\s(\w+)/i],[i,[s,"BlackBerry"],[a,l]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone)/i],[i,[s,"Asus"],[a,c]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[s,"Sony"],[i,"Xperia Tablet"],[a,c]],[/android.+\s([c-g]\d{4}|so[-l]\w+)\sbuild\//i],[i,[s,"Sony"],[a,l]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[s,i,[a,"console"]],[/android.+;\s(shield)\sbuild/i],[i,[s,"Nvidia"],[a,"console"]],[/(playstation\s[34portablevi]+)/i],[i,[s,"Sony"],[a,"console"]],[/(sprint\s(\w+))/i],[[s,d.str,h.device.sprint.vendor],[i,d.str,h.device.sprint.model],[a,l]],[/(lenovo)\s?(S(?:5000|6000)+(?:[-][\w+]))/i],[s,i,[a,c]],[/(htc)[;_\s-]+([\w\s]+(?=\))|\w+)*/i,/(zte)-(\w+)*/i,/(alcatel|geeksphone|lenovo|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]+)*/i],[s,[i,/_/g," "],[a,l]],[/(nexus\s9)/i],[i,[s,"HTC"],[a,c]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p)/i],[i,[s,"Huawei"],[a,l]],[/(microsoft);\s(lumia[\s\w]+)/i],[s,i,[a,l]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[i,[s,"Microsoft"],[a,"console"]],[/(kin\.[onetw]{3})/i],[[i,/\./g," "],[s,"Microsoft"],[a,l]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?(:?\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w+)*/i,/(XT\d{3,4}) build\//i,/(nexus\s6)/i],[i,[s,"Motorola"],[a,l]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[i,[s,"Motorola"],[a,c]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[s,f.trim],[i,f.trim],[a,"smarttv"]],[/hbbtv.+maple;(\d+)/i],[[i,/^/,"SmartTV"],[s,"Samsung"],[a,"smarttv"]],[/\(dtv[\);].+(aquos)/i],[i,[s,"Sharp"],[a,"smarttv"]],[/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[s,"Samsung"],i,[a,c]],[/smart-tv.+(samsung)/i],[s,[a,"smarttv"],i],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)*/i,/sec-((sgh\w+))/i],[[s,"Samsung"],i,[a,l]],[/sie-(\w+)*/i],[i,[s,"Siemens"],[a,l]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]+)*/i],[[s,"Nokia"],i,[a,l]],[/android\s3\.[\s\w;-]{10}(a\d{3})/i],[i,[s,"Acer"],[a,c]],[/android.+([vl]k\-?\d{3})\s+build/i],[i,[s,"LG"],[a,c]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[s,"LG"],i,[a,c]],[/(lg) netcast\.tv/i],[s,i,[a,"smarttv"]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w+)*/i,/android.+lg(\-?[\d\w]+)\s+build/i],[i,[s,"LG"],[a,l]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[i,[s,"Lenovo"],[a,c]],[/linux;.+((jolla));/i],[s,i,[a,l]],[/((pebble))app\/[\d\.]+\s/i],[s,i,[a,"wearable"]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[s,i,[a,l]],[/crkey/i],[[i,"Chromecast"],[s,"Google"]],[/android.+;\s(glass)\s\d/i],[i,[s,"Google"],[a,"wearable"]],[/android.+;\s(pixel c)\s/i],[i,[s,"Google"],[a,c]],[/android.+;\s(pixel xl|pixel)\s/i],[i,[s,"Google"],[a,l]],[/android.+(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i,/android.+(mi[\s\-_]*(?:one|one[\s_]plus|note lte)?[\s_]*(?:\d\w)?)\s+build/i,/android.+(redmi[\s\-_]*(?:note)?(?:[\s_]*[\w\s]+)?)\s+build/i],[[i,/_/g," "],[s,"Xiaomi"],[a,l]],[/android.+(mi[\s\-_]*(?:pad)?(?:[\s_]*[\w\s]+)?)\s+build/i],[[i,/_/g," "],[s,"Xiaomi"],[a,c]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[i,[s,"Meizu"],[a,c]],[/android.+a000(1)\s+build/i],[i,[s,"OnePlus"],[a,l]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[i,[s,"RCA"],[a,c]],[/android.+[;\/]\s*(Venue[\d\s]*)\s+build/i],[i,[s,"Dell"],[a,c]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[i,[s,"Verizon"],[a,c]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[s,"Barnes & Noble"],i,[a,c]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[i,[s,"NuVision"],[a,c]],[/android.+[;\/]\s*(zte)?.+(k\d{2})\s+build/i],[[s,"ZTE"],i,[a,c]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[i,[s,"Swiss"],[a,l]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[i,[s,"Swiss"],[a,c]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[i,[s,"Zeki"],[a,c]],[/(android).+[;\/]\s+([YR]\d{2}x?.*)\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(.+)\s+build/i],[[s,"Dragon Touch"],i,[a,c]],[/android.+[;\/]\s*(NS-?.+)\s+build/i],[i,[s,"Insignia"],[a,c]],[/android.+[;\/]\s*((NX|Next)-?.+)\s+build/i],[i,[s,"NextBook"],[a,c]],[/android.+[;\/]\s*(Xtreme\_?)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[s,"Voice"],i,[a,l]],[/android.+[;\/]\s*(LVTEL\-?)?(V1[12])\s+build/i],[[s,"LvTel"],i,[a,l]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[i,[s,"Envizen"],[a,c]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(.*\b)\s+build/i],[s,i,[a,c]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[i,[s,"MachSpeed"],[a,c]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[s,i,[a,c]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[i,[s,"Rotor"],[a,c]],[/android.+(KS(.+))\s+build/i],[i,[s,"Amazon"],[a,c]],[/android.+(Gigaset)[\s\-]+(Q.+)\s+build/i],[s,i,[a,c]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[a,f.lowerize],s,i],[/(android.+)[;\/].+build/i],[i,[s,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[u,[o,"EdgeHTML"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[o,u],[/rv\:([\w\.]+).*(gecko)/i],[u,o]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[o,u],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s]+\w)*/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[o,[u,d.str,h.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[o,"Windows"],[u,d.str,h.os.windows.version]],[/\((bb)(10);/i],[[o,"BlackBerry"],u],[/(blackberry)\w*\/?([\w\.]+)*/i,/(tizen)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|contiki)[\/\s-]?([\w\.]+)*/i,/linux;.+(sailfish);/i],[o,u],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]+)*/i],[[o,"Symbian"],u],[/\((series40);/i],[o],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[o,"Firefox OS"],u],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w+)*/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]+)*/i,/(hurd|linux)\s?([\w\.]+)*/i,/(gnu)\s?([\w\.]+)*/i],[o,u],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[o,"Chromium OS"],u],[/(sunos)\s?([\w\.]+\d)*/i],[[o,"Solaris"],u],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]+)*/i],[o,u],[/(haiku)\s(\w+)/i],[o,u],[/cfnetwork\/.+darwin/i,/ip[honead]+(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[u,/_/g,"."],[o,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]+\w)*/i,/(macintosh|mac(?=_powerpc)\s)/i],[[o,"Mac OS"],[u,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]+)*/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.]*)*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms)/i,/(unix)\s?([\w\.]+)*/i],[o,u]]},v=function(e,t){if("object"==typeof e&&(t=e,e=void 0),!(this instanceof v))return new v(e,t).getResult();var r=e||(n&&n.navigator&&n.navigator.userAgent?n.navigator.userAgent:""),i=t?f.extend(p,t):p;return this.getBrowser=function(){var e={name:void 0,version:void 0};return d.rgx.call(e,r,i.browser),e.major=f.major(e.version),e},this.getCPU=function(){var e={architecture:void 0};return d.rgx.call(e,r,i.cpu),e},this.getDevice=function(){var e={vendor:void 0,model:void 0,type:void 0};return d.rgx.call(e,r,i.device),e},this.getEngine=function(){var e={name:void 0,version:void 0};return d.rgx.call(e,r,i.engine),e},this.getOS=function(){var e={name:void 0,version:void 0};return d.rgx.call(e,r,i.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(e){return r=e,this},this};v.VERSION="0.7.17",v.BROWSER={NAME:o,MAJOR:"major",VERSION:u},v.CPU={ARCHITECTURE:"architecture"},v.DEVICE={MODEL:i,VENDOR:s,TYPE:a,CONSOLE:"console",MOBILE:l,SMARTTV:"smarttv",TABLET:c,WEARABLE:"wearable",EMBEDDED:"embedded"},v.ENGINE={NAME:o,VERSION:u},v.OS={NAME:o,VERSION:u},e.exports&&(t=e.exports=v),t.UAParser=v;var m=n&&(n.jQuery||n.Zepto);if(void 0!==m){var g=new v;m.ua=g.getResult(),m.ua.get=function(){return g.getUA()},m.ua.set=function(e){g.setUA(e);var t=g.getResult();for(var n in t)m.ua[n]=t[n]}}}("object"==typeof window?window:pr)});var wu=function(e){function t(n,r,i){if(y(n)||w(n)){r=k(r)?w(n)?{}:[]:r;for(var o in n)r[o]=t(n[o],r[o],o);return r}return e(n,r,i)}return t}(function(e){return e}),_u=("undefined"!=typeof window&&Object.prototype.toString.call(window),t(function(e){e.exports={default:Vi,__esModule:!0}}));e(_u);var Eu=t(function(e){e.exports={default:Uo,__esModule:!0}});e(Eu);var Su=e(t(function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=n(_u),i=n(Eu),o="function"==typeof i.default&&"symbol"==typeof r.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(r.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)}})),ku=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")}})),Tu=t(function(e){e.exports={default:na,__esModule:!0}});e(Tu);var Au=e(t(function(e,t){t.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(Tu);t.default=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),(0,n.default)(e,i.key,i)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()})),Mu=e(t(function(e){e.exports={default:Na,__esModule:!0}})),xu=e(t(function(e){e.exports={default:Qo,__esModule:!0}})),Lu=xu(null);Lu.count=0;var Ou=function(){function e(t,n){var r=this;if(ku(this,e),Object.defineProperty(this,"__target",{writable:!0,enumerable:!1,configurable:!0}),this.__target=this,t){if("object"!==(void 0===t?"undefined":Su(t)))throw new Error("CusEvent target are not object");this.__target=t,n&&["on","once","off","emit"].forEach(function(e){t[e]=r[e]})}}return Au(e,[{key:"on",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return O(this.__target,e,t,n),this}},{key:"once",value:function(e,t){return this.on(e,t,!0)}},{key:"off",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return D(this.__target,e,t,n),this}},{key:"emit",value:function(e,t){return L(this.__target,e,{data:t}),this}}]),e}(),Du=qo(null);Du.count=0;(function(){function e(t,n){var r=this;if(Xr(this,e),Object.defineProperty(this,"__target",{writable:!0,enumerable:!1,configurable:!0}),this.__target=this,t){if("object"!==(void 0===t?"undefined":Ho(t)))throw new Error("CusEvent target are not object");this.__target=t,n&&["on","once","off","emit"].forEach(function(e){t[e]=r[e]})}}ca(e,[{key:"on",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return N(this.__target,e,t,n),this}},{key:"once",value:function(e,t){return this.on(e,t,!0)}},{key:"off",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return C(this.__target,e,t,n),this}},{key:"emit",value:function(e,t){return R(this.__target,e,{data:t}),this}}])})(),"undefined"!=typeof window&&Object.prototype.toString.call(window);var Iu=document.createElement("div"),Ru="innerText";"textContent"in Iu&&(Ru="textContent");var Nu=Array.prototype,Cu=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;Xr(this,e);var r=this;r.selector=t;var i=void 0;t&&t.constructor===NodeList?i=P(t):y(t)?i=t:E(t)?0===t.indexOf("<")?(Iu.innerHTML=t,i=$("*",Iu,!0)):i=$(t,n,!0):i=[t],Ca(r,i),r.length=i.length}return ca(e,[{key:"each",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Nu.forEach.apply(this,t),this}},{key:"push",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Nu.push.apply(this,t),this}},{key:"splice",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Q(Nu.splice.apply(this,t))}},{key:"find",value:function(e){var t=[];this.each(function(n){t=t.concat($(e,n,!0))});var n=Q(t);return n.parent=this,n.selector=e,n}},{key:"append",value:function(e){var t=Q(e),n=this[0];return t.each(function(e){return n.appendChild(e)}),this}},{key:"appendTo",value:function(e){return Q(e).append(this),this}},{key:"text",value:function(e){return 0===arguments.length?this[0][Ru]:this.each(function(t){t[Ru]=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?j(this[0],e):this.each(function(n){return F(n,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(n){(n.dataset||(n.dataset={}))[e]=t})}},{key:"css",value:function(e,t){return 1!==arguments.length||w(e)?this.each(function(n){return Y(n,e,t)}):Z(this[0],e)}},{key:"addClass",value:function(e){return this.each(function(t){return B(t,e)})}},{key:"removeClass",value:function(e){return this.each(function(t){return z(t,e)})}},{key:"hasClass",value:function(e){return U(this[0],e)}},{key:"on",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.each(function(i){return W(i,e,t,n,r)})}},{key:"off",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.each(function(i){return G(i,e,t,n,r)})}},{key:"delegate",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.each(function(i){return H(i,e,t,n,r)})}},{key:"undelegate",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.each(function(i){return V(i,e,t,n,r)})}},{key:"remove",value:function(){return this.each(function(e){return J(e)})}}]),e}(),Pu={type:"vod",autoPlay:!1,box:"native",lockInternalProperty:!1,debug:!0,reloadTime:1500},ju=function(e){function t(e,n){Xr(this,t);var r=Vo(this,(t.__proto__||Qr(t)).call(this));return r.video=e,r.box="Native",r.config=Pu,T(r.config,n),r.bindEvents(),r}return ea(t,Ou),ca(t,[{key:"internalPropertyHandle",value:function(){if(la){var e=this,t=la(HTMLMediaElement.prototype,"currentTime");Object.defineProperty(this.video,"currentTime",{get:function(){return t.get.call(e.video)},set:function(n){if(e.currentTimeLock)return t.set.call(e.video,n);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:"refresh",value:function(){this.video.src=this.config.src}},{key:"attachMedia",value:function(){}},{key:"seek",value:function(e){this.currentTimeLock=!0,this.video.currentTime=e,this.currentTimeLock=!1}}]),t}(),Fu={reloadTime:1500},Bu=function(e){function t(e,n){Xr(this,t);var r=Vo(this,(t.__proto__||Qr(t)).call(this));return r.tag="kernel",r.config=T({},Fu,n),r.video=e,r.videokernel=r.selectKernel(),r.bindEvents(r.videokernel,r.video),r.timer=null,r}return ea(t,Ou),ca(t,[{key:"bindEvents",value:function(e,t){var n=this;e&&(e.on("mediaInfo",function(e){n.emit("mediaInfo",e)}),t.addEventListener("canplay",function(){clearTimeout(n.timer),n.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 ju(this.video,e):"flv"===t?new e.preset[t](this.video,e):"hls"===t?new e.preset[t](this.video,e):(bu.error(this.tag,"not mactch any player, please check your config"),null)}},{key:"attachMedia",value:function(){this.videokernel?this.videokernel.attachMedia():bu.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(this.config.src),this.timer||"hls"===this.box||(this.timer=setTimeout(function(){t.timer=null,t.pause(),t.refresh()},this.config.reloadTime))):bu.error(this.tag,"video player is not already, must init player")}},{key:"destroy",value:function(){this.videokernel?(this.videokernel.destroy(),clearTimeout(this.timer),this.timer=null):bu.error(this.tag,"player is not exit")}},{key:"play",value:function(){this.videokernel?this.videokernel.play():bu.error(this.tag,"video player is not already, must init player")}},{key:"pause",value:function(){this.videokernel&&this.config.src?this.videokernel.pause():bu.error(this.tag,"video player is not already, must init player")}},{key:"seek",value:function(e){if(_(e))return this.videokernel.seek(e);bu.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}(),zu=function(e,t){if(!Rr(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e},Uu=Wr.f,Gu=Yi.fastKey,Wu=Pr?"_s":"size",Hu=function(e,t){var n,r=Gu(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n},Vu={getConstructor:function(e,t,n,r){var i=e(function(e,o){Pa(e,i,t,"_i"),e._t=t,e._i=ki(null),e._f=void 0,e._l=void 0,e[Wu]=0,void 0!=o&&Ua(o,n,e[r],e)});return ls(i.prototype,{clear:function(){for(var e=zu(this,t),n=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];e._f=e._l=void 0,e[Wu]=0},delete:function(e){var n=zu(this,t),r=Hu(n,e);if(r){var i=r.n,o=r.p;delete n._i[r.i],r.r=!0,o&&(o.n=i),i&&(i.p=o),n._f==r&&(n._f=i),n._l==r&&(n._l=o),n[Wu]--}return!!r},forEach:function(e){zu(this,t);for(var n,r=Ir(e,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(e){return!!Hu(zu(this,t),e)}}),Pr&&Uu(i.prototype,"size",{get:function(){return zu(this,t)[Wu]}}),i},def:function(e,t,n){var r,i,o=Hu(e,t);return o?o.v=n:(e._l=o={i:i=Gu(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=o),r&&(r.n=o),e[Wu]++,"F"!==i&&(e._i[i]=o)),e},getEntry:Hu,setStrong:function(e,t,n){Ni(e,t,function(e,n){this._t=zu(e,t),this._k=n,this._l=void 0},function(){for(var e=this,t=e._k,n=e._l;n&&n.r;)n=n.p;return e._t&&(e._l=n=n?n.n:e._t._f)?"keys"==t?ji(0,n.k):"values"==t?ji(0,n.v):ji(0,[n.k,n.v]):(e._t=void 0,ji(1))},n?"entries":"values",!n,!0),fs(t)}},Zu=Ti("species"),Yu=function(e){var t;return eo(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!eo(t.prototype)||(t=void 0),Rr(t)&&null===(t=t[Zu])&&(t=void 0)),void 0===t?Array:t},$u=function(e,t){return new(Yu(e))(t)},Ju=function(e,t){var n=1==e,r=2==e,i=3==e,o=4==e,a=6==e,s=5==e||a,u=t||$u;return function(t,l,c){for(var f,d,h=mr(t),p=ai(h),v=Ir(l,c,3),m=li(p.length),g=0,y=n?u(t,m):r?u(t,0):void 0;m>g;g++)if((s||g in p)&&(f=p[g],d=v(f,g,h),e))if(n)y[g]=d;else if(d)switch(e){case 3:return!0;case 5:return f;case 6:return g;case 2:y.push(f)}else if(o)return!1;return a?-1:i||o?o:y}},Ku=Wr.f,Qu=Ju(0),Xu=function(e,t,n,r,i,o){var a=br[e],s=a,u=i?"set":"add",l=s&&s.prototype,c={};return Pr&&"function"==typeof s&&(o||l.forEach&&!Cr(function(){(new s).entries().next()}))?(s=t(function(t,n){Pa(t,s,e,"_c"),t._c=new a,void 0!=n&&Ua(n,i,t[u],t)}),Qu("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(e){var t="add"==e||"set"==e;e in l&&(!o||"clear"!=e)&&Vr(s.prototype,e,function(n,r){if(Pa(this,s,e),!t&&o&&!Rr(n))return"get"==e&&void 0;var i=this._c[e](0===n?0:n,r);return t?this:i})}),o||Ku(s.prototype,"size",{get:function(){return this._c.size}})):(s=r.getConstructor(t,e,i,u),ls(s.prototype,n),Yi.NEED=!0),xi(s,e),c[e]=s,Yr(Yr.G+Yr.W+Yr.F,c),o||r.setStrong(s,e,i),s},qu=(Xu("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=Vu.getEntry(zu(this,"Map"),e);return t&&t.v},set:function(e,t){return Vu.def(zu(this,"Map"),0===e?0:e,t)}},Vu,!0),function(e,t){var n=[];return Ua(e,!1,n.push,n,t),n});Yr(Yr.P+Yr.R,"Map",{toJSON:function(e){return function(){if(va(this)!=e)throw TypeError(e+"#toJSON isn't generic");return qu(this)}}("Map")});var el=function(e){Yr(Yr.S,e,{of:function(){for(var e=arguments.length,t=Array(e);e--;)t[e]=arguments[e];return new this(t)}})};el("Map");var tl=function(e){Yr(Yr.S,e,{from:function(e){var t,n,r,i,o=arguments[1];return Dr(this),(t=void 0!==o)&&Dr(o),void 0==e?new this:(n=[],t?(r=0,i=Ir(o,arguments[2],2),Ua(e,!1,function(e){n.push(i(e,r++))})):Ua(e,!1,n.push,n),new this(n))}})};tl("Map");var nl=Or.Map,rl=e(t(function(e){e.exports={default:nl,__esModule:!0}})),il=t(function(e){e.exports={default:Vi,__esModule:!0}});e(il);var ol=t(function(e){e.exports={default:Uo,__esModule:!0}});e(ol);var al=e(t(function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=n(il),i=n(ol),o="function"==typeof i.default&&"symbol"==typeof r.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(r.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)}})),sl=br.Reflect,ul=sl&&sl.ownKeys||function(e){var t=no.f(Nr(e)),n=Qi.f;return n?t.concat(n(e)):t};Yr(Yr.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n,r=si(e),i=lo.f,o=ul(r),a={},s=0;o.length>s;)void 0!==(n=i(r,t=o[s++]))&&nu(a,t,n);return a}});var ll=Or.Object.getOwnPropertyDescriptors,cl=e(t(function(e){e.exports={default:ll,__esModule:!0}})),fl=t(function(e){e.exports={default:ru,__esModule:!0}}),dl=e(fl),hl=Or.Object.getOwnPropertySymbols,pl=e(t(function(e){e.exports={default:hl,__esModule:!0}}));$r("getOwnPropertyNames",function(){return so.f});var vl=Or.Object,ml=function(e){return vl.getOwnPropertyNames(e)},gl=e(t(function(e){e.exports={default:ml,__esModule:!0}})),yl=t(function(e){e.exports={default:na,__esModule:!0}}),bl=e(yl);e(t(function(e){e.exports={default:Bs,__esModule:!0}}));var wl=e(t(function(e){e.exports={default:sa,__esModule:!0}})),_l=t(function(e){e.exports={default:ru,__esModule:!0}});e(_l);var El=e(t(function(e,t){t.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(_l);t.default=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(0,n.default)(e)}})),Sl=X(function(e){return e}),kl=e(t(function(e,t){t.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(fl);t.default=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(0,n.default)(e)}})),Tl=t(function(e){e.exports={default:ga,__esModule:!0}});e(Tl);var Al=t(function(e){e.exports={default:_a,__esModule:!0}});e(Al);var Ml=e(t(function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=n(Tl),i=n(Al);t.default=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var s,u=(0,i.default)(e);!(r=(s=u.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if((0,r.default)(Object(t)))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()})),xl=e(t(function(e){e.exports={default:Jr,__esModule:!0}})),Ll=Yi.getWeak,Ol=Ju(5),Dl=Ju(6),Il=0,Rl=function(e){return e._l||(e._l=new Nl)},Nl=function(){this.a=[]},Cl=function(e,t){return Ol(e.a,function(e){return e[0]===t})};Nl.prototype={get:function(e){var t=Cl(this,e);if(t)return t[1]},has:function(e){return!!Cl(this,e)},set:function(e,t){var n=Cl(this,e);n?n[1]=t:this.a.push([e,t])},delete:function(e){var t=Dl(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}};var Pl={getConstructor:function(e,t,n,r){var i=e(function(e,o){Pa(e,i,t,"_i"),e._t=t,e._i=Il++,e._l=void 0,void 0!=o&&Ua(o,n,e[r],e)});return ls(i.prototype,{delete:function(e){if(!Rr(e))return!1;var n=Ll(e);return!0===n?Rl(zu(this,t)).delete(e):n&&yr(n,this._i)&&delete n[this._i]},has:function(e){if(!Rr(e))return!1;var n=Ll(e);return!0===n?Rl(zu(this,t)).has(e):n&&yr(n,this._i)}}),i},def:function(e,t,n){var r=Ll(Nr(t),!0);return!0===r?Rl(e).set(t,n):r[e._i]=n,e},ufstore:Rl};t(function(e){var t,n=Ju(0),r=Yi.getWeak,i=Object.isExtensible,o=Pl.ufstore,a={},s=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},u={get:function(e){if(Rr(e)){var t=r(e);return!0===t?o(zu(this,"WeakMap")).get(e):t?t[this._i]:void 0}},set:function(e,t){return Pl.def(zu(this,"WeakMap"),e,t)}},l=e.exports=Xu("WeakMap",s,u,Pl,!0,!0);Cr(function(){return 7!=(new l).set((Object.freeze||Object)(a),7).get(a)})&&(t=Pl.getConstructor(s,"WeakMap"),Oa(t.prototype,u),Yi.NEED=!0,n(["delete","has","get","set"],function(e){var n=l.prototype,r=n[e];ni(n,e,function(n,o){if(Rr(n)&&!i(n)){this._f||(this._f=new t);var a=this._f[e](n,o);return"set"==e?this:a}return r.call(this,n,o)})}))});el("WeakMap"),tl("WeakMap");var jl=Or.WeakMap,Fl=e(t(function(e){e.exports={default:jl,__esModule:!0}})),Bl=e(t(function(e){e.exports={default:js,__esModule:!0}})),zl=e(t(function(e,t){t.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(yl);t.default=function(e,t,r){return t in e?(0,n.default)(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}})),Ul=Yi.onFreeze;$r("preventExtensions",function(e){return function(t){return e&&Rr(t)?e(Ul(t)):t}});var Gl=Or.Object.preventExtensions;e(t(function(e){e.exports={default:Gl,__esModule:!0}}));var Wl=wl,Hl=function(){var e=gl,t=pl;return o(t)?function(n){return dl(e(n).concat(t(n)))}:e}(),Vl=o(cl)?cl:function(e){return Hl(e).reduce(function(t,n){return t[n]=Wl(e,n),t},{})},Zl=wl,Yl=bl,$l=bl,Jl=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.requirement,a=t.customArgs,s=void 0!==a&&a;return function(){for(var t=arguments.length,a=Array(t>1?t-1:0),u=1;u<t;u++)a[u-1]=arguments[u];var l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=l.exclude,f=void 0===c?[]:c,h=l.include,p=void 0===h?[]:h,v=l.construct,m=void 0!==v&&v,g=l.self,y=void 0!==g&&g;if(!i(f))throw new TypeError("options.exclude must be an array");if(!i(p))throw new TypeError("options.include must be an array");return function(t){var i=o(t);if(!y&&!i)throw new TypeError("@"+e.name+"Class can only be used on class");if(y&&d(t))throw new TypeError("@"+e.name+"Class must be used on non-primitive type value in 'self' mode");var u=y?t:t.prototype;if(r(u))throw new Error("The prototype of the "+t.name+" is empty, please check it");var l=Vl(u);Hl(u).concat(p).forEach(function(t){var r=l[t];"constructor"===t&&!m||y&&i&&["name","length","prototype"].indexOf(t)>-1||f.indexOf(t)>-1||o(n)&&!1===n(u,t,r,{self:y})||$l(u,t,(s?e.apply(void 0,kl(a)):e)(u,t,r))})}}}(ye,{requirement:function(e,t,n){return se(n)&&o(n.value)}}),Kl=void 0,Ql=bl,Xl=wl,ql=bl,ec=bl,tc=wl,nc=["push","pop","unshift","shift","splice","sort","reverse"],rc=Or.JSON||(Or.JSON={stringify:JSON.stringify}),ic=function(e){return rc.stringify.apply(rc,arguments)};e(t(function(e){e.exports={default:ic,__esModule:!0}}));var oc=e(t(function(e,t){t.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(ra);t.default=function(e,t,r){return t in e?(0,n.default)(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}}));Yr(Yr.S,"Number",{isNaN:function(e){return e!=e}});var ac,sc,uc,lc,cc,fc,dc,hc=Or.Number.isNaN,pc=e(t(function(e){e.exports={default:hc,__esModule:!0}})),vc=["","o","ms","moz","webkit","webkitCurrent"],mc=[["",""],["exit","cancel"],["screen","Screen"]],gc={position:"fixed",zIndex:"2147483647",left:0,top:0,right:0,bottom:0,overflow:"hidden",width:"100%",height:"100%"},yc=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],bc=["fullscreenerror","webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"],wc=je("fullscreenEnabled"),_c=new(ac=Jl(),sc=me("requestFullscreen"),uc=me("exitFullscreen"),lc=me("addEventListener"),cc=me("removeEventListener"),ac((dc=function(){function e(){Xr(this,e),this._fullscreenElement=null,this.isNativelySupport=Le(je("fullscreenElement"))&&(!Le(wc)||!0===wc),this._openKey=je(document.body,"requestFullscreen",{keyOnly:!0}),this._exitKey=je("exitFullscreen",{keyOnly:!0})}return ca(e,[{key:"open",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).force,n=void 0!==t&&t,r=this.fullscreenElement;if(r&&r!==e){if(!n)return Fe(document,"fullscreenerror"),!1;this.exit()}return this.isNativelySupport?(e[this._openKey](),!0):(this._savedStyles=zs(gc).reduce(function(t,n){return t[n]=e.style[n],t},{}),Pe(e,gc),document.body&&(this._bodyOverflow=document.body.style.overflow,document.body.style.overflow="hidden"),document.documentElement&&(this._htmlOverflow=document.documentElement.style.overflow,document.documentElement.style.overflow="hidden"),this._fullscreenElement=e,Fe(e,"fullscreenchange"),!0)}},{key:"exit",value:function(){if(!this.isFullscreen)return!1;if(this.isNativelySupport)return document[this._exitKey](),!0;var e=this._fullscreenElement;return Pe(e,this._savedStyles),document.body&&(document.body.style.overflow=this._bodyOverflow),document.documentElement&&(document.documentElement.style.overflow=this._htmlOverflow),this._fullscreenElement=null,this._savedStyles={},Fe(e,"fullscreenchange"),!0}},{key:"on",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document;this._handleEvent(n,"addEventListener",e,t)}},{key:"off",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document;this._handleEvent(n,"removeEventListener",e,t)}},{key:"_handleEvent",value:function(e,t,n,r){("fullscreenchange"===n?yc:bc).forEach(function(n){e[t](n,r)})}},{key:"fullscreenElement",get:function(){return["fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement"].reduce(function(e,t){return e||document[t]},null)||this._fullscreenElement}},{key:"isFullscreen",get:function(){return Ce(this.fullscreenElement)}}]),e}(),Be(dc.prototype,"open",[sc],la(dc.prototype,"open"),dc.prototype),Be(dc.prototype,"exit",[uc],la(dc.prototype,"exit"),dc.prototype),Be(dc.prototype,"on",[lc],la(dc.prototype,"on"),dc.prototype),Be(dc.prototype,"off",[cc],la(dc.prototype,"off"),dc.prototype),fc=dc))||fc),Ec=function(){function e(){Xr(this,e)}return ca(e,null,[{key:"error",value:function(t,n){e.ENABLE_ERROR&&(console.error||console.warn||console.log)(it(t,n))}},{key:"info",value:function(t,n){e.ENABLE_INFO&&(console.info||console.log)(it(t,n))}},{key:"warn",value:function(t,n){e.ENABLE_WARN&&(console.warn||console.log)(it(t,n))}},{key:"debug",value:function(t,n){e.ENABLE_DEBUG&&(console.debug||console.log)(it(t,n))}},{key:"verbose",value:function(t,n){e.ENABLE_VERBOSE&&console.log(it(t,n))}}]),e}();Ec.GLOBAL_TAG="chimee",Ec.FORCE_GLOBAL_TAG=!1,Ec.ENABLE_ERROR=!0,Ec.ENABLE_INFO=!0,Ec.ENABLE_WARN=!0,Ec.ENABLE_DEBUG=!0,Ec.ENABLE_VERBOSE=!0;var Sc="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},kc=(function(e,t){t={exports:{}},e(t,t.exports),t.exports}(function(e,t){!function(n,r){var i="model",o="name",a="type",s="vendor",u="version",l="mobile",c="tablet",f={extend:function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},has:function(e,t){return"string"==typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return"string"==typeof e?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},d={rgx:function(e,t){for(var n,r,i,o,a,s,u=0;u<t.length&&!a;){var l=t[u],c=t[u+1];for(n=r=0;n<l.length&&!a;)if(a=l[n++].exec(e))for(i=0;i<c.length;i++)s=a[++r],"object"==typeof(o=c[i])&&o.length>0?2==o.length?"function"==typeof o[1]?this[o[0]]=o[1].call(this,s):this[o[0]]=o[1]:3==o.length?"function"!=typeof o[1]||o[1].exec&&o[1].test?this[o[0]]=s?s.replace(o[1],o[2]):void 0:this[o[0]]=s?o[1].call(this,s,o[2]):void 0:4==o.length&&(this[o[0]]=s?o[3].call(this,s.replace(o[1],o[2])):void 0):this[o]=s||void 0;u+=2}},str:function(e,t){for(var n in t)if("object"==typeof t[n]&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(f.has(t[n][r],e))return"?"===n?void 0:n}else if(f.has(t[n],e))return"?"===n?void 0:n;return e}},h={browser:{oldsafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{amazon:{model:{"Fire Phone":["SD","KF"]}},sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2000:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}},p={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[o,u],[/(opios)[\/\s]+([\w\.]+)/i],[[o,"Opera Mini"],u],[/\s(opr)\/([\w\.]+)/i],[[o,"Opera"],u],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]+)*/i,/(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?([\w\.]*)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]+)*/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser)\/([\w\.-]+)/i],[o,u],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[o,"IE"],u],[/(edge)\/((\d+)?[\w\.]+)/i],[o,u],[/(yabrowser)\/([\w\.]+)/i],[[o,"Yandex"],u],[/(puffin)\/([\w\.]+)/i],[[o,"Puffin"],u],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[o,"UCBrowser"],u],[/(comodo_dragon)\/([\w\.]+)/i],[[o,/_/g," "],u],[/(micromessenger)\/([\w\.]+)/i],[[o,"WeChat"],u],[/(QQ)\/([\d\.]+)/i],[o,u],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[o,u],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[u,[o,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[u,[o,"Facebook"]],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[u,[o,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[o,/(.+)/,"$1 WebView"],u],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[o,/(.+(?:g|us))(.+)/,"$1 $2"],u],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[u,[o,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[o,u],[/(dolfin)\/([\w\.]+)/i],[[o,"Dolphin"],u],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[o,"Chrome"],u],[/(coast)\/([\w\.]+)/i],[[o,"Opera Coast"],u],[/fxios\/([\w\.-]+)/i],[u,[o,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[u,[o,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[u,o],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[o,"GSA"],u],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[o,[u,d.str,h.browser.oldsafari.version]],[/(konqueror)\/([\w\.]+)/i,/(webkit|khtml)\/([\w\.]+)/i],[o,u],[/(navigator|netscape)\/([\w\.-]+)/i],[[o,"Netscape"],u],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix)\/([\w\.-]+)/i,/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]+)*/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[o,u]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",f.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/windows\s(ce|mobile);\sppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[["architecture",/ower/,"",f.lowerize]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+;))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[["architecture",f.lowerize]]],device:[[/\((ipad|playbook);[\w\s\);-]+(rim|apple)/i],[i,s,[a,c]],[/applecoremedia\/[\w\.]+ \((ipad)/],[i,[s,"Apple"],[a,c]],[/(apple\s{0,1}tv)/i],[[i,"Apple TV"],[s,"Apple"]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[s,i,[a,c]],[/(kf[A-z]+)\sbuild\/[\w\.]+.*silk\//i],[i,[s,"Amazon"],[a,c]],[/(sd|kf)[0349hijorstuw]+\sbuild\/[\w\.]+.*silk\//i],[[i,d.str,h.device.amazon.model],[s,"Amazon"],[a,l]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[i,s,[a,l]],[/\((ip[honed|\s\w*]+);/i],[i,[s,"Apple"],[a,l]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]+)*/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[s,i,[a,l]],[/\(bb10;\s(\w+)/i],[i,[s,"BlackBerry"],[a,l]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone)/i],[i,[s,"Asus"],[a,c]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[s,"Sony"],[i,"Xperia Tablet"],[a,c]],[/android.+\s([c-g]\d{4}|so[-l]\w+)\sbuild\//i],[i,[s,"Sony"],[a,l]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[s,i,[a,"console"]],[/android.+;\s(shield)\sbuild/i],[i,[s,"Nvidia"],[a,"console"]],[/(playstation\s[34portablevi]+)/i],[i,[s,"Sony"],[a,"console"]],[/(sprint\s(\w+))/i],[[s,d.str,h.device.sprint.vendor],[i,d.str,h.device.sprint.model],[a,l]],[/(lenovo)\s?(S(?:5000|6000)+(?:[-][\w+]))/i],[s,i,[a,c]],[/(htc)[;_\s-]+([\w\s]+(?=\))|\w+)*/i,/(zte)-(\w+)*/i,/(alcatel|geeksphone|lenovo|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]+)*/i],[s,[i,/_/g," "],[a,l]],[/(nexus\s9)/i],[i,[s,"HTC"],[a,c]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p)/i],[i,[s,"Huawei"],[a,l]],[/(microsoft);\s(lumia[\s\w]+)/i],[s,i,[a,l]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[i,[s,"Microsoft"],[a,"console"]],[/(kin\.[onetw]{3})/i],[[i,/\./g," "],[s,"Microsoft"],[a,l]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?(:?\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w+)*/i,/(XT\d{3,4}) build\//i,/(nexus\s6)/i],[i,[s,"Motorola"],[a,l]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[i,[s,"Motorola"],[a,c]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[s,f.trim],[i,f.trim],[a,"smarttv"]],[/hbbtv.+maple;(\d+)/i],[[i,/^/,"SmartTV"],[s,"Samsung"],[a,"smarttv"]],[/\(dtv[\);].+(aquos)/i],[i,[s,"Sharp"],[a,"smarttv"]],[/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[s,"Samsung"],i,[a,c]],[/smart-tv.+(samsung)/i],[s,[a,"smarttv"],i],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)*/i,/sec-((sgh\w+))/i],[[s,"Samsung"],i,[a,l]],[/sie-(\w+)*/i],[i,[s,"Siemens"],[a,l]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]+)*/i],[[s,"Nokia"],i,[a,l]],[/android\s3\.[\s\w;-]{10}(a\d{3})/i],[i,[s,"Acer"],[a,c]],[/android.+([vl]k\-?\d{3})\s+build/i],[i,[s,"LG"],[a,c]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[s,"LG"],i,[a,c]],[/(lg) netcast\.tv/i],[s,i,[a,"smarttv"]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w+)*/i,/android.+lg(\-?[\d\w]+)\s+build/i],[i,[s,"LG"],[a,l]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[i,[s,"Lenovo"],[a,c]],[/linux;.+((jolla));/i],[s,i,[a,l]],[/((pebble))app\/[\d\.]+\s/i],[s,i,[a,"wearable"]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[s,i,[a,l]],[/crkey/i],[[i,"Chromecast"],[s,"Google"]],[/android.+;\s(glass)\s\d/i],[i,[s,"Google"],[a,"wearable"]],[/android.+;\s(pixel c)\s/i],[i,[s,"Google"],[a,c]],[/android.+;\s(pixel xl|pixel)\s/i],[i,[s,"Google"],[a,l]],[/android.+(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i,/android.+(mi[\s\-_]*(?:one|one[\s_]plus|note lte)?[\s_]*(?:\d\w)?)\s+build/i,/android.+(redmi[\s\-_]*(?:note)?(?:[\s_]*[\w\s]+)?)\s+build/i],[[i,/_/g," "],[s,"Xiaomi"],[a,l]],[/android.+(mi[\s\-_]*(?:pad)?(?:[\s_]*[\w\s]+)?)\s+build/i],[[i,/_/g," "],[s,"Xiaomi"],[a,c]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[i,[s,"Meizu"],[a,c]],[/android.+a000(1)\s+build/i],[i,[s,"OnePlus"],[a,l]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[i,[s,"RCA"],[a,c]],[/android.+[;\/]\s*(Venue[\d\s]*)\s+build/i],[i,[s,"Dell"],[a,c]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[i,[s,"Verizon"],[a,c]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[s,"Barnes & Noble"],i,[a,c]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[i,[s,"NuVision"],[a,c]],[/android.+[;\/]\s*(zte)?.+(k\d{2})\s+build/i],[[s,"ZTE"],i,[a,c]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[i,[s,"Swiss"],[a,l]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[i,[s,"Swiss"],[a,c]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[i,[s,"Zeki"],[a,c]],[/(android).+[;\/]\s+([YR]\d{2}x?.*)\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(.+)\s+build/i],[[s,"Dragon Touch"],i,[a,c]],[/android.+[;\/]\s*(NS-?.+)\s+build/i],[i,[s,"Insignia"],[a,c]],[/android.+[;\/]\s*((NX|Next)-?.+)\s+build/i],[i,[s,"NextBook"],[a,c]],[/android.+[;\/]\s*(Xtreme\_?)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[s,"Voice"],i,[a,l]],[/android.+[;\/]\s*(LVTEL\-?)?(V1[12])\s+build/i],[[s,"LvTel"],i,[a,l]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[i,[s,"Envizen"],[a,c]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(.*\b)\s+build/i],[s,i,[a,c]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[i,[s,"MachSpeed"],[a,c]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[s,i,[a,c]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[i,[s,"Rotor"],[a,c]],[/android.+(KS(.+))\s+build/i],[i,[s,"Amazon"],[a,c]],[/android.+(Gigaset)[\s\-]+(Q.+)\s+build/i],[s,i,[a,c]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[a,f.lowerize],s,i],[/(android.+)[;\/].+build/i],[i,[s,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[u,[o,"EdgeHTML"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[o,u],[/rv\:([\w\.]+).*(gecko)/i],[u,o]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[o,u],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s]+\w)*/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[o,[u,d.str,h.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[o,"Windows"],[u,d.str,h.os.windows.version]],[/\((bb)(10);/i],[[o,"BlackBerry"],u],[/(blackberry)\w*\/?([\w\.]+)*/i,/(tizen)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|contiki)[\/\s-]?([\w\.]+)*/i,/linux;.+(sailfish);/i],[o,u],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]+)*/i],[[o,"Symbian"],u],[/\((series40);/i],[o],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[o,"Firefox OS"],u],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w+)*/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]+)*/i,/(hurd|linux)\s?([\w\.]+)*/i,/(gnu)\s?([\w\.]+)*/i],[o,u],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[o,"Chromium OS"],u],[/(sunos)\s?([\w\.]+\d)*/i],[[o,"Solaris"],u],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]+)*/i],[o,u],[/(haiku)\s(\w+)/i],[o,u],[/cfnetwork\/.+darwin/i,/ip[honead]+(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[u,/_/g,"."],[o,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]+\w)*/i,/(macintosh|mac(?=_powerpc)\s)/i],[[o,"Mac OS"],[u,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]+)*/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.]*)*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms)/i,/(unix)\s?([\w\.]+)*/i],[o,u]]},v=function(e,t){if("object"==typeof e&&(t=e,e=void 0),!(this instanceof v))return new v(e,t).getResult();var r=e||(n&&n.navigator&&n.navigator.userAgent?n.navigator.userAgent:""),i=t?f.extend(p,t):p;return this.getBrowser=function(){var e={name:void 0,version:void 0};return d.rgx.call(e,r,i.browser),e.major=f.major(e.version),e},this.getCPU=function(){var e={architecture:void 0};return d.rgx.call(e,r,i.cpu),e},this.getDevice=function(){var e={vendor:void 0,model:void 0,type:void 0};return d.rgx.call(e,r,i.device),e},this.getEngine=function(){var e={name:void 0,version:void 0};return d.rgx.call(e,r,i.engine),e},this.getOS=function(){var e={name:void 0,version:void 0};return d.rgx.call(e,r,i.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(e){return r=e,this},this};v.VERSION="0.7.17",v.BROWSER={NAME:o,MAJOR:"major",VERSION:u},v.CPU={ARCHITECTURE:"architecture"},v.DEVICE={MODEL:i,VENDOR:s,TYPE:a,CONSOLE:"console",MOBILE:l,SMARTTV:"smarttv",TABLET:c,WEARABLE:"wearable",EMBEDDED:"embedded"},v.ENGINE={NAME:o,VERSION:u},v.OS={NAME:o,VERSION:u},e.exports&&(t=e.exports=v),t.UAParser=v;var m=n&&(n.jQuery||n.Zepto);if(void 0!==m){var g=new v;m.ua=g.getResult(),m.ua.get=function(){return g.getUA()},m.ua.set=function(e){g.setUA(e);var t=g.getResult();for(var n in t)m.ua[n]=t[n]}}}("object"==typeof window?window:Sc)}),function(e){function t(n,r,i){if(Ue(n)||We(n)){r=Xe(r)?We(n)?{}:[]:r;for(var o in n)r[o]=t(n[o],r[o],o);return r}return e(n,r,i)}return t}(function(e){return e})),Tc=("undefined"!=typeof window&&Object.prototype.toString.call(window),qo(null));Tc.count=0;!function(){function e(t,n){var r=this;if(Xr(this,e),Object.defineProperty(this,"__target",{writable:!0,enumerable:!1,configurable:!0}),this.__target=this,t){if("object"!==(void 0===t?"undefined":Ho(t)))throw new Error("CusEvent target are not object");this.__target=t,n&&["on","once","off","emit"].forEach(function(e){t[e]=r[e]})}}ca(e,[{key:"on",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return mt(this.__target,e,t,n),this}},{key:"once",value:function(e,t){return this.on(e,t,!0)}},{key:"off",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return gt(this.__target,e,t,n),this}},{key:"emit",value:function(e,t){return vt(this.__target,e,{data:t}),this}}])}();var Ac=qo(null);Ac.count=0;(function(){function e(t,n){var r=this;if(Xr(this,e),Object.defineProperty(this,"__target",{writable:!0,enumerable:!1,configurable:!0}),this.__target=this,t){if("object"!==(void 0===t?"undefined":Ho(t)))throw new Error("CusEvent target are not object");this.__target=t,n&&["on","once","off","emit"].forEach(function(e){t[e]=r[e]})}}ca(e,[{key:"on",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return wt(this.__target,e,t,n),this}},{key:"once",value:function(e,t){return this.on(e,t,!0)}},{key:"off",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return _t(this.__target,e,t,n),this}},{key:"emit",value:function(e,t){return bt(this.__target,e,{data:t}),this}}])})(),"undefined"!=typeof window&&Object.prototype.toString.call(window);var Mc=document.createElement("div"),xc="innerText";"textContent"in Mc&&(xc="textContent");var Lc,Oc,Dc,Ic,Rc,Nc,Cc,Pc,jc,Fc,Bc,zc,Uc,Gc,Wc,Hc,Vc,Zc,Yc,$c,Jc,Kc,Qc,Xc,qc,ef,tf,nf,rf,of,af,sf,uf,lf,cf,ff,df,hf,pf,vf,mf,gf,yf,bf,wf,_f,Ef,Sf,kf,Tf,Af,Mf,xf,Lf,Of,Df,If,Rf,Nf,Cf,Pf,jf,Ff,Bf,zf,Uf,Gf,Wf,Hf,Vf,Zf=Array.prototype,Yf=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;Xr(this,e);var r=this;r.selector=t;var i=void 0;t&&t.constructor===NodeList?i=Et(t):Ue(t)?i=t:Je(t)?0===t.indexOf("<")?(Mc.innerHTML=t,i=Nt("*",Mc,!0)):i=Nt(t,n,!0):i=[t],Ca(r,i),r.length=i.length}return ca(e,[{key:"each",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Zf.forEach.apply(this,t),this}},{key:"push",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Zf.push.apply(this,t),this}},{key:"splice",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return jt(Zf.splice.apply(this,t))}},{key:"find",value:function(e){var t=[];this.each(function(n){t=t.concat(Nt(e,n,!0))});var n=jt(t);return n.parent=this,n.selector=e,n}},{key:"append",value:function(e){var t=jt(e),n=this[0];return t.each(function(e){return n.appendChild(e)}),this}},{key:"appendTo",value:function(e){return jt(e).append(this),this}},{key:"text",value:function(e){return 0===arguments.length?this[0][xc]:this.each(function(t){t[xc]=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?St(this[0],e):this.each(function(n){return kt(n,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(n){(n.dataset||(n.dataset={}))[e]=t})}},{key:"css",value:function(e,t){return 1!==arguments.length||We(e)?this.each(function(n){return Rt(n,e,t)}):It(this[0],e)}},{key:"addClass",value:function(e){return this.each(function(t){return Tt(t,e)})}},{key:"removeClass",value:function(e){return this.each(function(t){return At(t,e)})}},{key:"hasClass",value:function(e){return Mt(this[0],e)}},{key:"on",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.each(function(i){return Lt(i,e,t,n,r)})}},{key:"off",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.each(function(i){return xt(i,e,t,n,r)})}},{key:"delegate",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.each(function(i){return Ot(i,e,t,n,r)})}},{key:"undelegate",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.each(function(i){return Dt(i,e,t,n,r)})}},{key:"remove",value:function(){return this.each(function(e){return Ct(e)})}}]),e}(),$f=["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"],Jf=["buffered","currentSrc","duration","error","ended","networkState","paused","readyState","seekable","sinkId","controlsList","tabIndex","dataset","offsetHeight","offsetLeft","offsetParent","offsetTop","offsetWidth"],Kf=["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","contextmenu"],Qf=["silentLoad","fullscreen"],Xf=["play","pause","seek"],qf=["load"],ed=["focus","fullscreen","requestFullscreen","exitFullscreen"],td=["canPlayType","captureStream","setSinkId"],nd=/^(before|after|_)/,rd=(Lc=Te(Bt),Oc=Te(Bt,{backup:function(){return!1}}),Dc=Te(Bt),Ic=Te(Bt,{backup:function(){return!1}}),Rc=function(){function e(t){Xr(this,e),this.events={},this.onceMap={},this.__dispatcher=t}return ca(e,[{key:"on",value:function(e,t,n){var r=this._getEventStage(t),i=r.stage,o=r.key;this._addEvent([o,i,e],n)}},{key:"off",value:function(e,t,n){var r=this._getEventStage(t),i=r.stage,o=[r.key,i,e];if(!this._removeEvent(o,n)){var a=this._getHandlerFromOnceMap(o,n);Ge(a)&&this._removeEvent(o,a)&&this._removeFromOnceMap(o,n,a)}}},{key:"once",value:function(e,t,n){var r=this._getEventStage(t),i=r.stage,o=this,a=[r.key,i,e],s=function e(){lt(n,this).apply(void 0,arguments),o._removeEvent(a,e),o._removeFromOnceMap(a,n,e)};this._addEvent(a,s),this._addToOnceMap(a,n,s)}},{key:"emit",value:function(e){for(var t=this,n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=this.events[e];if(Ye(o))return Qf.indexOf(e)>-1?Fs.resolve():this._eventProcessor.apply(this,[e,{sync:!1}].concat(au(r)));var a=this._getEventQueue(o.before,this.__dispatcher.order);return dt.apply(void 0,[a].concat(au(r))).then(function(){if(!(Qf.indexOf(e)>-1))return t._eventProcessor.apply(t,[e,{sync:!1}].concat(au(r)))}).catch(function(e){return rt(e)&&t.__dispatcher.throwError(e),Fs.reject(e)})}},{key:"emitSync",value:function(e){for(var t=this.events[e],n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];if(Ye(t))return Qf.indexOf(e)>-1||this._eventProcessor.apply(this,[e,{sync:!0}].concat(au(r)));var o=this._getEventQueue(t.before,this.__dispatcher.order);return ht.apply(void 0,[o].concat(au(r)))&&(Qf.indexOf(e)>-1||this._eventProcessor.apply(this,[e,{sync:!0}].concat(au(r))))}},{key:"trigger",value:function(e){for(var t=this,n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=this.events[e];if(Ye(o))return Fs.resolve(!0);var a=this._getEventQueue(o.main,this.__dispatcher.order);return dt.apply(void 0,[a].concat(au(r))).then(function(){var e=t._getEventQueue(o.after,t.__dispatcher.order);return dt.apply(void 0,[e].concat(au(r)))}).then(function(){return t._runSideEffectEvent.apply(t,[e,t.__dispatcher.order].concat(au(r)))}).catch(function(n){return rt(n)&&t.__dispatcher.throwError(n),t._runSideEffectEvent.apply(t,[e,t.__dispatcher.order].concat(au(r)))})}},{key:"triggerSync",value:function(e){var t=this.events[e];if(Ye(t))return!0;for(var n=this._getEventQueue(t.main,this.__dispatcher.order),r=this._getEventQueue(t.after,this.__dispatcher.order),i=arguments.length,o=Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];var s=ht.apply(void 0,[n].concat(au(o)))&&ht.apply(void 0,[r].concat(au(o)));return this._runSideEffectEvent.apply(this,[e,this.__dispatcher.order].concat(au(o))),s}},{key:"destroy",value:function(){delete this.events,delete this.__dispatcher}},{key:"_addEvent",value:function(e,t){var n=(e=ot(e)).pop(),r=e.reduce(function(e,t){return e[t]=e[t]||{},e[t]},this.events);r[n]=r[n]||[],r[n].push(t)}},{key:"_removeEvent",value:function(e,t){for(var n=(e=ot(e)).pop(),r=this.events,i=0,o=e.length;i<o;i++){var a=r[e[i]];if(Ye(a))return;r=a}var s=r[n]||[],u=s.indexOf(t),l=u>-1;return l&&s.splice(u,1),s.length<1&&delete r[n],l}},{key:"_addToOnceMap",value:function(e,t,n){var r=e.join("-"),i=this.onceMap[r]=this.onceMap[r]||new rl;i.has(t)||i.set(t,[]),i.get(t).push(n)}},{key:"_removeFromOnceMap",value:function(e,t,n){var r=e.join("-"),i=this.onceMap[r],o=i.get(t),a=o.indexOf(n);o.splice(a,1),Ye(o)&&i.delete(t)}},{key:"_getHandlerFromOnceMap",value:function(e,t){var n=e.join("-"),r=this.onceMap[n];if(!ze(r)&&r.has(t))return r.get(t)[0]}},{key:"_getEventStage",value:function(e){var t=e.match(nd),n=t&&t[0]||"main";return t&&(e=st(e.replace(nd,""))),{stage:n,key:e}}},{key:"_getEventQueue",value:function(e,t){var n=this;return t=Ue(t)?t.concat(["_vm"]):["_vm"],Ye(e)?[]:t.reduce(function(t,r){return Ye(e[r])||!Ue(e[r])||!n.__dispatcher.plugins[r]&&"_vm"!==r?t:t.concat(e[r].map(function(e){return lt(e,n.__dispatcher.plugins[r]||n.__dispatcher.vm)}))},[])}},{key:"_eventProcessor",value:function(e,t){for(var n=t.sync,r=Xf.indexOf(e)>-1,i=ed.indexOf(e)>-1,o=qf.indexOf(e)>-1,a=arguments.length,s=Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];if(r||i||o){if(o){var l;(l=this.__dispatcher)[e].apply(l,au(s))}else{var c;(c=this.__dispatcher[r?"kernel":"dom"])[e].apply(c,au(s))}if($f.indexOf(e)>-1||Kf.indexOf(e)>-1)return!0}return this[n?"triggerSync":"trigger"].apply(this,[e].concat(au(s)))}},{key:"_runSideEffectEvent",value:function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=this.events[e];return!Ye(o)&&(this._getEventQueue(o._,t).forEach(function(e){return e.apply(void 0,au(r))}),!0)}}]),e}(),Ft(Rc.prototype,"emit",[Lc],la(Rc.prototype,"emit"),Rc.prototype),Ft(Rc.prototype,"emitSync",[Oc],la(Rc.prototype,"emitSync"),Rc.prototype),Ft(Rc.prototype,"trigger",[Dc],la(Rc.prototype,"trigger"),Rc.prototype),Ft(Rc.prototype,"triggerSync",[Ic],la(Rc.prototype,"triggerSync"),Rc.prototype),Rc),id={src:[function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=l(t[0])?t.shift():"";return t.unshift(function(e){return l(e)?e:r}),de({set:t,get:t})}(),de({set:function(e){return this.dispatcher.readySync&&this.autoload&&e!==this.src&&(this.needToLoadSrc=!0),e}}),de({set:function(e){return this.needToLoadSrc&&(this.needToLoadSrc=!1,this.dispatcher.bus.emit("load",e)),e}},{preSet:!1})],autoload:Me(),autoplay:[Me(),Vt("autoplay")],controls:[Me(),Vt("controls")],width:[$t("width")],height:[$t("height")],crossOrigin:[de({set:Ht}),Zt({set:"crossorigin",get:"crossOrigin"})],loop:[Me(),Vt("loop")],defaultMuted:[Me(),Zt({get:"defaultMuted",set:"muted",isBoolean:!0})],muted:[Me(),Vt("muted")],preload:[de({set:Ht}),Zt("preload")],poster:[de({set:Ht}),Zt("poster")],playsInline:[de({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}}),Me()],x5VideoPlayerFullscreen:[de({set:function(e){return!!e},get:function(e){return!!e}}),Yt("x5-video-player-fullscreen",!0)],x5VideoOrientation:[de({set:Ht}),Yt("x5-video-orientation")],xWebkitAirplay:[de({set:function(e){return!!e},get:function(e){return!!e}}),Yt("x-webkit-airplay",!0)],playbackRate:[xe(1),Vt("playbackRate")],defaultPlaybackRate:[Vt("defaultPlaybackRate"),xe(1)],disableRemotePlayback:[Me(),Vt("disableRemotePlayback")],volume:[xe(1),Vt("volume")]},od=(Nc=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=!!c(t[0])&&t.shift();return t.unshift(function(e){return c(e)?e:r}),pe.apply(void 0,t)}(),Cc=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=l(t[0])?t.shift():"";return t.unshift(function(e){return l(e)?e:r}),pe.apply(void 0,t)}(function(e){return e.toLocaleLowerCase()}),Pc=function(){function e(t,n){Xr(this,e),Gt(this,"needToLoadSrc",jc,this),Gt(this,"changeWatchable",Fc,this),Gt(this,"inited",Bc,this),this.src="",Gt(this,"isLive",zc,this),Gt(this,"box",Uc,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,Gt(this,"_kernelProperty",Gc,this),Gt(this,"_realDomAttr",Wc,this),_e(this,id,{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}),at(this,n)}return ca(e,[{key:"init",value:function(){var e=this;this._realDomAttr.forEach(function(t){e[t]=e[t]}),this.inited=!0}}]),e}(),jc=Wt(Pc.prototype,"needToLoadSrc",[we],{enumerable:!0,initializer:function(){return!1}}),Fc=Wt(Pc.prototype,"changeWatchable",[we],{enumerable:!0,initializer:function(){return!0}}),Bc=Wt(Pc.prototype,"inited",[we],{enumerable:!0,initializer:function(){return!1}}),zc=Wt(Pc.prototype,"isLive",[Nc,Ae],{enumerable:!0,initializer:function(){return!1}}),Uc=Wt(Pc.prototype,"box",[Cc,Ae],{enumerable:!0,initializer:function(){return""}}),Gc=Wt(Pc.prototype,"_kernelProperty",[be],{enumerable:!0,initializer:function(){return["isLive","box","preset"]}}),Wc=Wt(Pc.prototype,"_realDomAttr",[be],{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"]}}),Pc),ad=(Hc=Jl(),Vc=me("silentLoad"),Zc=me("fullScreen"),Yc=me("$fullScreen"),$c=me("fullscreen"),Jc=me("emit"),Kc=me("emitSync"),Qc=me("on"),Xc=me("addEventListener"),qc=he(zt),ef=me("off"),tf=me("removeEventListener"),nf=he(zt),rf=me("once"),of=he(zt),af=me("css"),sf=he(Ut),uf=me("attr"),lf=he(Ut),Hc((ff=function(){function e(){Xr(this,e),this.__events={},this.__unwatchHandlers=[]}return ca(e,[{key:"__wrapAsVideo",value:function(e){var t=this;Jf.forEach(function(e){ia(t,e,{get:function(){return this.__dispatcher.dom.videoElement[e]},set:void 0,configurable:!1,enumerable:!1})}),td.forEach(function(e){ia(t,e,{get:function(){var t=this.__dispatcher.dom.videoElement;return lt(t[e],t)},set:void 0,configurable:!1,enumerable:!1})}),_e(this,e._realDomAttr.concat(e._kernelProperty).reduce(function(t,n){return t[n]=[de({get:function(){return e[n]},set:function(t){return e[n]=t,t}}),we],t},{}),{self:!0}),Xf.forEach(function(e){ia(t,e,{value:function(){for(var t=this,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return new Fs(function(n,i){var o;t.__dispatcher.bus.once(t.__id,"_"+e,n),(o=t.__dispatcher.bus)[/^(seek)$/.test(e)?"emitSync":"emit"].apply(o,[e].concat(au(r)))})},configurable:!0,enumerable:!1,writable:!0})}),ed.forEach(function(e){"fullscreen"!==e&&ia(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 n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.deep,o=r.diff,a=void 0===o||o,s=r.other,u=r.proxy,l=void 0!==u&&u;if(!Je(e)&&!Ue(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":Ho(e)));var c=!0,f=function e(){c=!1;var t=n.__unwatchHandlers.indexOf(e);t>-1&&n.__unwatchHandlers.splice(t,1)},d=Je(e)?e.split("."):e,h=d.pop(),p=this.__dispatcher.videoConfig;return _e(0===d.length&&!s&&p._realDomAttr.indexOf(h)>-1?p:["isFullscreen","fullscreenElement"].indexOf(h)>-1?this.__dispatcher.dom:ct(s||this,d,{throwError:!0}),oc({},h,ke(function(){!c||this instanceof od&&!this.dispatcher.changeWatchable||lt(t,this).apply(void 0,arguments)},{deep:i,diff:a,proxy:l})),{self:!0}),this.__unwatchHandlers.push(f),f}},{key:"$set",value:function(e,t,n){if(!We(e)&&!Ue(e))throw new TypeError("$set only support Array or Object, but not "+e+", whose type is "+(void 0===e?"undefined":Ho(e)));Ge(e.__set)?e.__set(t,n):e[t]=n}},{key:"$del",value:function(e,t){if(!We(e)&&!Ue(e))throw new TypeError("$del only support Array or Object, but not "+e+", whose type is "+(void 0===e?"undefined":Ho(e)));Ge(e.__del)?e.__del(t):delete e[t]}},{key:"load",value:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return new Fs(function(t,r){var i;e.__dispatcher.bus.once(e.__id,"_load",t),(i=e.__dispatcher.bus).emit.apply(i,["load"].concat(n))})}},{key:"$silentLoad",value:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.__dispatcher.bus.emit("silentLoad").then(function(){var t;return(t=e.__dispatcher).silentLoad.apply(t,n)}).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 n=this.__dispatcher.dom.fullscreen(e,t);return this.__dispatcher.bus.triggerSync("fullscreen",e,t),n}},{key:"$emit",value:function(e){var t;if(!Je(e))throw new TypeError("emit key parameter must be String");for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(t=this.__dispatcher.bus).emit.apply(t,[e].concat(au(r)))}},{key:"$emitSync",value:function(e){var t;if(!Je(e))throw new TypeError("emitSync key parameter must be String");for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return(t=this.__dispatcher.bus).emitSync.apply(t,[e].concat(au(r)))}},{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 n=this,r=function r(){lt(t,this).apply(void 0,arguments),n.__removeEvents(e,r)};n.__addEvents(e,r),this.__dispatcher.bus.once(this.__id,e,r)}},{key:"$css",value:function(e){for(var t,n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return(t=this.__dispatcher.dom)[e+"Style"].apply(t,r)}},{key:"$attr",value:function(e){for(var t,n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];if("set"===e&&/video/.test(r[0])){if(!this.__dispatcher.videoConfigReady)return r[2];if(this.__dispatcher.videoConfig._realDomAttr.indexOf(r[1])>-1){var o=r[1],a=r[2];return this.__dispatcher.videoConfig[o]=a,a}}return(t=this.__dispatcher.dom)[e+"Attr"].apply(t,r)}},{key:"__addEvents",value:function(e,t){this.__events[e]=this.__events[e]||[],this.__events[e].push(t)}},{key:"__removeEvents",value:function(e,t){if(!Ye(this.__events[e])){var n=this.__events[e].indexOf(t);n<0||(this.__events[e].splice(n,1),Ye(this.__events[e])&&delete this.__events[e])}}},{key:"__destroy",value:function(){var e=this;this.__unwatchHandlers.forEach(function(e){return e()}),zs(this.__events).forEach(function(t){Ue(e.__events[t])&&e.__events[t].forEach(function(n){return e.$off(t,n)})}),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 Kt(),this.__dispatcher.dom.wrapper}},{key:"$container",get:function(){return Kt(),this.__dispatcher.dom.container}},{key:"$video",get:function(){return Kt(),this.__dispatcher.dom.videoElement}},{key:"isFullscreen",get:function(){return this.__dispatcher.dom.isFullscreen}},{key:"fullscreenElement",get:function(){return this.__dispatcher.dom.fullscreenElement}}]),e}(),Jt(ff.prototype,"$silentLoad",[Vc],la(ff.prototype,"$silentLoad"),ff.prototype),Jt(ff.prototype,"$fullscreen",[Zc,Yc,$c],la(ff.prototype,"$fullscreen"),ff.prototype),Jt(ff.prototype,"$emit",[Jc],la(ff.prototype,"$emit"),ff.prototype),Jt(ff.prototype,"$emitSync",[Kc],la(ff.prototype,"$emitSync"),ff.prototype),Jt(ff.prototype,"$on",[Qc,Xc,qc],la(ff.prototype,"$on"),ff.prototype),Jt(ff.prototype,"$off",[ef,tf,nf],la(ff.prototype,"$off"),ff.prototype),Jt(ff.prototype,"$once",[rf,of],la(ff.prototype,"$once"),ff.prototype),Jt(ff.prototype,"$css",[af,sf],la(ff.prototype,"$css"),ff.prototype),Jt(ff.prototype,"$attr",[uf,lf],la(ff.prototype,"$attr"),ff.prototype),Jt(ff.prototype,"$plugins",[we],la(ff.prototype,"$plugins"),ff.prototype),Jt(ff.prototype,"$pluginOrder",[we],la(ff.prototype,"$pluginOrder"),ff.prototype),Jt(ff.prototype,"$wrapper",[we],la(ff.prototype,"$wrapper"),ff.prototype),Jt(ff.prototype,"$container",[we],la(ff.prototype,"$container"),ff.prototype),Jt(ff.prototype,"$video",[we],la(ff.prototype,"$video"),ff.prototype),cf=ff))||cf),sd=(df=Jl())(hf=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.id,r=e.name,i=e.level,o=void 0===i?0:i,a=e.operable,s=void 0===a||a,u=e.beforeCreate,l=e.create,c=e.init,f=e.inited,d=e.destroy,h=e.events,p=void 0===h?{}:h,v=e.data,m=void 0===v?{}:v,g=e.computed,y=void 0===g?{}:g,b=e.methods,w=void 0===b?{}:b,_=e.el,E=e.penetrate,S=void 0!==E&&E,k=e.inner,T=void 0===k||k,A=e.autoFocus,M=e.className,x=arguments[1],L=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{name:r};Xr(this,t);var O=Vo(this,(t.__proto__||Qr(t)).call(this));if(O.destroyed=!1,O.VERSION="0.4.2",O.__operable=!0,O.__level=0,Ye(x))throw new TypeError("lack of dispatcher");if(!Je(n))throw new TypeError("id of PluginConfig must be string");O.__id=n,O.__dispatcher=x,O.$videoConfig=O.__dispatcher.videoConfig,O.__wrapAsVideo(O.$videoConfig),O.beforeCreate=O.beforeCreate||u;try{Ge(O.beforeCreate)&&O.beforeCreate({events:p,data:m,computed:y,methods:w},L)}catch(e){O.$throwError(e)}if(!Ye(w)&&We(w)&&zs(w).forEach(function(e){var t=w[e];if(!Ge(t))throw new TypeError("plugins methods must be Function");ia(O,e,{value:lt(t,O),writable:!0,enumerable:!1,configurable:!0})}),!Ye(p)&&We(p)&&zs(p).forEach(function(e){if(!Ge(p[e]))throw new TypeError("plugins events hook must bind with Function");O.$on(e,p[e])}),!Ye(m)&&We(m)&&at(O,m),!Ye(y)&&We(y)){var D=zs(y).reduce(function(e,t){var n=y[t];return Ge(n)?(e[t]=de({get:n}),e):We(n)&&(Ge(n.get)||Ge(n.set))?(e[t]=de(n),e):e},{});_e(O,D,{self:!0})}O.create=O.create||l,O.init=O.init||c,O.inited=O.inited||f,O.destroy=O.destroy||d,O.$dom=O.__dispatcher.dom.insertPlugin(O.__id,_,{penetrate:S,inner:T,autoFocus:A,className:M}),O.$inner=T,O.$autoFocus=A,O.$penetrate=S,_e(O,{$inner:be,$autoFocus:be,$penetrate:be},{self:!0}),O.$operable=Ke(L.operable)?L.operable:s,O.__level=Ze(L.level)?L.level:o,O.$config=L;try{Ge(O.create)&&O.create()}catch(e){O.$throwError(e)}return O}return ea(t,ad),ca(t,[{key:"__init",value:function(e){try{Ge(this.init)&&this.init(e)}catch(e){this.$throwError(e)}}},{key:"__inited",value:function(){var e=this,t=void 0;try{t=Ge(this.inited)&&this.inited()}catch(e){this.$throwError(e)}return this.readySync=!Qe(t),this.ready=this.readySync?Fs.resolve():t.then(function(t){return e.readySync=!0,t}).catch(function(t){return rt(t)?e.$throwError(t):Fs.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(){Ge(this.destroy)&&this.destroy(),fa(t.prototype.__proto__||Qr(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){Ke(e)&&(this.$dom.style.pointerEvents=e?"auto":"none",this.__operable=e)},get:function(){return this.__operable}},{key:"$level",set:function(e){Ze(e)&&(this.__level=e,this.__dispatcher._sortZIndex())},get:function(){return this.__level}}]),t}())||hf,ud=(pf=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).other;if(!o(e)&&!f(e)&&!l(e))throw new TypeError("@waitUntil only accept Function, Promise or String");return function(n,i,a){var s=a||{},u=s.value,l=s.configurable;if(!o(u))throw new TypeError("@waituntil can only be used on function, but not "+u+' on property "'+i+'"');var c=!1,h=[],p=f(e)?function(){return e}:o(e)?e:function(){var n=e.split("."),i=n.slice(-1),o=d(t)?this:t;if(!c){var a=ie(o,n.slice(0,-1));if(r(a))return a;var s=Xl(a,i),u=function(e){if(!0===e)for(;h.length>0;)h[0](),h.shift();return e},l=oe(s)?de({set:u})(a,i,s):de({set:u})(a,i,{value:void 0,configurable:!0,enumerable:!0,writable:!0});ql(a,i,l),c=!0}return ie(o,n)};return{value:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=te(u,this),o=te(p,this).apply(void 0,n);return f(o)?Bl.resolve(o).then(function(){return te(u,e).apply(void 0,n)}):!0===o?te(u,this).apply(void 0,n):new Bl(function(e){h.push(function(){i.apply(void 0,n),e()})})},enumerable:!1,configurable:l,writable:!1}}}("__dispatcher.videoConfigReady"),vf=he(qt,Xt),mf=he(qt,Xt),gf=he(qt,Xt),yf=he(qt,Xt),bf=he(Xt),wf=function(){function e(t,n){var r=this;if(Xr(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=n,!et(t)&&!Je(t))throw new TypeError("Wrapper can only be string or HTMLElement, but not "+(void 0===t?"undefined":Ho(t)));var i=jt(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),Kf.forEach(function(e){var t=function(){for(var t,n=arguments.length,i=Array(n),o=0;o<n;o++)i[o]=arguments[o];return(t=r.__dispatcher.bus).triggerSync.apply(t,["c_"+e].concat(au(i)))};r.containerDomEventHandlerList.push(t),Lt(r.container,e,t);var n=function(){for(var t,n=arguments.length,i=Array(n),o=0;o<n;o++)i[o]=arguments[o];return(t=r.__dispatcher.bus).triggerSync.apply(t,["w_"+e].concat(au(i)))};r.wrapperDomEventHandlerList.push(n),Lt(r.wrapper,e,n)}),this._fullscreenMonitor(),_c.on("fullscreenchange",this._fullscreenMonitor)}return ca(e,[{key:"installVideo",value:function(e){var t=this;if(this.__videoExtendedNodes.push(e),kt(e,"tabindex",-1),this._autoFocusToVideo(e),et(this.container)){var n=this.container;0===n.childNodes.length?n.appendChild(e):n.insertBefore(e,n.childNodes[0])}else e.parentElement&&et(e.parentElement)&&e.parentElement!==this.wrapper?this.container=e.parentElement:(this.container=document.createElement("container"),jt(this.container).append(e));return this.container.parentElement!==this.wrapper&&jt(this.wrapper).append(this.container),$f.forEach(function(n){var r=function(){for(var e,r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return(e=t.__dispatcher.bus).trigger.apply(e,[n].concat(au(i)))};t.videoEventHandlerList.push(r),Lt(e,n,r)}),Kf.forEach(function(n){var r=t._getEventHandler(n,{penetrate:!0});t.videoDomEventHandlerList.push(r),Lt(e,n,r)}),this.videoElement=e,e}},{key:"removeVideo",value:function(){var e=this,t=this.videoElement;return this._autoFocusToVideo(this.videoElement,!1),$f.forEach(function(t,n){xt(e.videoElement,t,e.videoEventHandlerList[n])}),Kf.forEach(function(t,n){xt(e.videoElement,t,e.videoDomEventHandlerList[n])}),jt(t).remove(),delete this.videoElement,t}},{key:"insertPlugin",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!Je(e))throw new TypeError("insertPlugin id parameter must be string");if(et(this.plugins[e])&&this.removePlugin(e),Je(t))if(nt(t)){var i=document.createElement("div");i.innerHTML=t,t=i.children[0]}else t=document.createElement(ut(t));else We(t)&&(r=t);var o=r,a=o.inner,s=o.penetrate,u=o.autoFocus,l=r.className,c=t&&et(t)?t:document.createElement("div");Ue(l)&&(l=l.join(" ")),Je(l)&&Tt(c,l),this.plugins[e]=c;var f=a?this.container:this.wrapper,d=a?this.videoElement:this.container;return(Ke(u)?u:a)&&this._autoFocusToVideo(c),s&&(this.__domEventHandlerList[e]=this.__domEventHandlerList[e]||[],Kf.forEach(function(t){var r=n._getEventHandler(t,{penetrate:s});Lt(c,t,r),n.__domEventHandlerList[e].push(r)}),this.__videoExtendedNodes.push(c)),f.lastChild===d?(f.appendChild(c),c):(f.insertBefore(c,d.nextSibling),c)}},{key:"removePlugin",value:function(e){var t=this;if(Je(e)){var n=this.plugins[e];et(n)&&(n.parentNode&&n.parentNode.removeChild(n),this._autoFocusToVideo(n,!0)),Ye(this.__domEventHandlerList[e])||(Kf.forEach(function(n,r){xt(t.plugins[e],n,t.__domEventHandlerList[e][r])}),delete this.__domEventHandlerList[e]),delete this.plugins[e]}}},{key:"setPluginsZIndex",value:function(e){var t=this;e.forEach(function(e,n){return Rt(e.match(/^(videoElement|container)$/)?t[e]:t.plugins[e],"z-index",++n)})}},{key:"setAttr",value:function(e,t,n){kt(this[e],t,n)}},{key:"getAttr",value:function(e,t){return St(this[e],t)}},{key:"setStyle",value:function(e,t,n){Rt(this[e],t,n)}},{key:"getStyle",value:function(e,t){return It(this[e],t)}},{key:"requestFullscreen",value:function(e){return _c.open(this[e])}},{key:"exitFullscreen",value:function(){return _c.exit()}},{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",n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e?this.requestFullscreen.apply(this,[t].concat(au(r))):this.exitFullscreen.apply(this,au(r))}},{key:"focus",value:function(){this.videoElement.focus()}},{key:"destroy",value:function(){var e=this;this.removeVideo(),Kf.forEach(function(t,n){xt(e.container,t,e.containerDomEventHandlerList[n]),xt(e.wrapper,t,e.wrapperDomEventHandlerList[n])}),_c.off("fullscreenchange",this._fullscreenMonitor),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?xt:Lt)(e,"mouseup",this._focusToVideo,!1,!0),(t?xt:Lt)(e,"touchend",this._focusToVideo,!1,!0)}},{key:"_focusToVideo",value:function(e){var t=window.scrollX,n=window.scrollY;Ge(this.videoElement.focus)&&this.videoElement.focus(),window.scrollTo(t,n)}},{key:"_fullscreenMonitor",value:function(e){var t=_c.fullscreenElement,n=this.isFullscreen;!t||!tt(this.wrapper,t)&&t!==this.wrapper?(this.isFullscreen=!1,this.fullscreenElement=void 0):(this.isFullscreen=!0,this.fullscreenElement=this.wrapper===t?"wrapper":this.container===t?"container":this.videoElement===t?"video":t),$e(e)&&n!==this.isFullscreen&&this.__dispatcher.bus.triggerSync("fullscreenchange",e)}},{key:"_getEventHandler",value:function(e,t){var n=this;if(!t.penetrate||["mouseenter","mouseleave"].indexOf(e)<0)return function(){for(var t,r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];(t=n.__dispatcher.bus).triggerSync.apply(t,[e].concat(i))};var r=function(e){return n.__videoExtendedNodes.indexOf(e)>-1||n.__videoExtendedNodes.reduce(function(t,n){return t||tt(n,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],a=o.toElement,s=o.currentTarget,u=o.relatedTarget,l=o.type,c=a||u;if(n.__mouseInVideo&&"mouseleave"===l&&!r(c)){var f;return n.__mouseInVideo=!1,(f=n.__dispatcher.bus).triggerSync.apply(f,["mouseleave"].concat(t))}if(!n.__mouseInVideo&&"mouseenter"===l&&r(s)){var d;return n.__mouseInVideo=!0,(d=n.__dispatcher.bus).triggerSync.apply(d,["mouseenter"].concat(t))}}}}]),e}(),Qt(wf.prototype,"setAttr",[pf,vf],la(wf.prototype,"setAttr"),wf.prototype),Qt(wf.prototype,"getAttr",[mf],la(wf.prototype,"getAttr"),wf.prototype),Qt(wf.prototype,"setStyle",[gf],la(wf.prototype,"setStyle"),wf.prototype),Qt(wf.prototype,"getStyle",[yf],la(wf.prototype,"getStyle"),wf.prototype),Qt(wf.prototype,"requestFullscreen",[bf],la(wf.prototype,"requestFullscreen"),wf.prototype),Qt(wf.prototype,"_focusToVideo",[ye],la(wf.prototype,"_focusToVideo"),wf.prototype),Qt(wf.prototype,"_fullscreenMonitor",[ye],la(wf.prototype,"_fullscreenMonitor"),wf.prototype),wf),ld={},cd={},fd=(_f=he(tn),Ef=he(function(e){if(Ge(e)){if(!(e.prototype instanceof sd))throw new TypeError("Your are trying to install plugin "+e.name+", but it's not extends from Chimee.plugin.")}else{if(!We(e)||Ye(e))throw new TypeError("plugin's config must be an Object, but not \""+e+'" in '+(void 0===e?"undefined":Ho(e)));var t=e.name;if(!Je(t)||t.length<1)throw new TypeError('plugin must have a legal namea, but not "'+t+'" in '+(void 0===t?"undefined":Ho(t)))}}),Sf=he(tn),kf=he(tn),Tf=he(tn),Af=function(){function e(t,n){var r=this;if(Xr(this,e),this.plugins={},this.order=[],this.readySync=!1,this.zIndexMap={inner:[],outer:[]},this.changeWatchable=!0,!We(t))throw new TypeError('UserConfig must be an Object, but not "'+t+'" in '+(void 0===t?"undefined":Ho(t)));this.dom=new ud(t.wrapper,this),this.bus=new rd(this),this.vm=n,this.videoConfigReady=!1,this.videoConfig=new od(this,t),Ue(t.plugins)&&!Ue(t.plugin)&&(t.plugin=t.plugins,delete t.plugins),this._initUserPlugin(t.plugin),this.order.forEach(function(e){return r.plugins[e].__init(r.videoConfig)}),this.videoConfigReady=!0,this.videoConfig.init(),this.kernel=this._createKernel(this.dom.videoElement,this.videoConfig);var i=[];this.order.forEach(function(e){var t=r.plugins[e].__inited();Qe(t)&&i.push(t)}),this.readySync=0===i.length,this.ready=this.readySync?Fs.resolve():Fs.all(i).then(function(){r.readySync=!0,r.bus.trigger("ready"),r._autoloadVideoSrcAtFirst()}),this.readySync&&this._autoloadVideoSrcAtFirst()}return ca(e,[{key:"use",value:function(t){if(Je(t)&&(t={name:t,alias:void 0}),!We(t)||We(t)&&!Je(t.name))throw new TypeError("pluginConfig do not match requirement");Je(t.alias)||(t.alias=void 0);var n=t,r=n.name,i=n.alias;t.name=i||r,delete t.alias;var o=st(r),a=st(i||r),s=t,u=e.getPluginConfig(o);if(Ye(u))throw new TypeError("You have not installed plugin "+o);We(u)&&(u.id=a);var l=Ge(u)?new u({id:a},this,s):new sd(u,this,s);return this.plugins[a]=l,ia(this.vm,a,{value:l,configurable:!0,enumerable:!1,writable:!1}),this.order.push(a),this._sortZIndex(),this.videoConfigReady&&l.__inited(),l.ready}},{key:"unuse",value:function(e){var t=this.plugins[e];if(We(t)&&Ge(t.$destroy)){t.$destroy();var n=this.order.indexOf(e);n>-1&&this.order.splice(n,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,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.duration,i=void 0===r?3:r,o=n.bias,a=void 0===o?0:o,s=n.repeatTimes,u=void 0===s?0:s,l=n.increment,c=void 0===l?0:l,f=n.isLive,d=void 0===f?this.videoConfig.isLive:f,h=n.box,p=void 0===h?this.videoConfig.box:h,v=n.kernels,m=void 0===v?this.videoConfig.kernels:v,g=n.preset,y=void 0===g?this.videoConfig.preset:g,b={isLive:d,box:p,src:e,kernels:m,preset:y};return dt(new Array(u+1).fill(1).map(function(e,r){return function(){return new Fs(function(e,o){n.abort&&o({error:!0,message:"user abort the mission"});var s=document.createElement("video"),l=t.kernel.currentTime+i+c*r;s.muted=!0;var f=!1,d=function n(){var r=t.kernel.currentTime;if(a<=0&&r>=l||a>0&&(Math.abs(l-r)<=a&&f||r-l>a))return xt(t.dom.videoElement,"timeupdate",n),xt(s,"error",v,!0),f?o({error:!1,video:s,kernel:m}):(xt(s,"canplay",h,!0),xt(s,"loadedmetadata",p,!0),m.destroy(),e())},h=function(e){if(f=!0,n.immediate)return xt(t.dom.videoElement,"timeupdate",d),xt(s,"error",v,!0),o({error:!1,video:s,kernel:m})},p=function(e){m.seek(l)},v=function(n){xt(s,"canplay",h,!0),xt(s,"loadedmetadata",p,!0),xt(t.dom.videoElement,"timeupdate",d);var i=Ye(s.error)?new Error("unknow video error"):new Error(s.error.message);return Ec.error("chimee's silentload",i.message),m.destroy(),r===u?o(i):e(i)};Lt(s,"canplay",h,!0),Lt(s,"loadedmetadata",p,!0),Lt(s,"error",v,!0);var m=t._createKernel(s,b);Lt(t.dom.videoElement,"timeupdate",d),m.load()})}})).then(function(){var t="The silentLoad for "+e+" timed out. Please set a longer duration or check your network";return Fs.reject(new Error(t))}).catch(function(e){if(rt(e))return Fs.reject(e);if(e.error)return Fs.reject(new Error(e.message));var r=e.video,i=e.kernel;return n.abort?(i.destroy(),Fs.reject(new Error("user abort the mission"))):t.dom.videoElement.paused?(t.switchKernel({video:r,kernel:i,config:b}),Fs.resolve()):new Fs(function(e){Lt(r,"play",function(n){t.switchKernel({video:r,kernel:i,config:b}),e()},!0),r.play()})})}},{key:"load",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Ye(t)){var n=this.videoConfig,r=t.isLive,i=void 0===r?n.isLive:r,o=t.box,a=void 0===o?n.box:o,s=t.preset,u=void 0===s?n.preset:s,l=t.kernels,c=void 0===l?n.kernels:l,f=document.createElement("video"),d={isLive:i,box:a,preset:u,src:e,kernels:c},h=this._createKernel(f,d);this.switchKernel({video:f,kernel:h,config:d})}var p=this.videoConfig.autoload;this._changeUnwatchable(this.videoConfig,"autoload",!1),this.videoConfig.src=e||this.videoConfig.src,this.kernel.load(this.videoConfig.src),this._changeUnwatchable(this.videoConfig,"autoload",p)}},{key:"switchKernel",value:function(e){var t=this,n=e.video,r=e.kernel,i=e.config,o=this.kernel,a=ot(this.videoConfig);this.dom.removeVideo(),this.dom.installVideo(n),this.videoConfig.changeWatchable=!1,this.videoConfig.autoload=!1,this.videoConfig.src=i.src,this.videoConfig._realDomAttr.forEach(function(e){"src"!==e&&(t.videoConfig[e]=a[e])}),this.videoConfig.changeWatchable=!0,this.kernel=r,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 Ue(t)||(t=[]),t.map(function(t){return e.use(t)})}},{key:"_sortZIndex",value:function(){var e=this,t=this.order.reduce(function(t,n){var r=e.plugins[n];if(Ye(r))return t;var i=t[r.$inner?"inner":"outer"],o=r.$level;return i[o]=i[o]||[],i[o].push(n),t},{inner:{},outer:{}}),n=t.inner,r=t.outer;n[0]=n[0]||[],n[0].unshift("videoElement"),r[0]=r[0]||[],r[0].unshift("container");var i=ft(n),o=ft(r);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"],n=this.plugins[t[t.length-1]];return Ye(n)?0:n.$level}},{key:"_autoloadVideoSrcAtFirst",value:function(){this.videoConfig.autoload&&this.bus.emit("load",this.videoConfig.src)}},{key:"_changeUnwatchable",value:function(e,t,n){this.changeWatchable=!1,e[t]=n,this.changeWatchable=!0}},{key:"_createKernel",value:function(e,t){var n=t.kernels,r=t.preset,i=Ue(n)?n.reduce(function(e,t){return Ge(cd[t])?(e[t]=cd[t],e):(Ec.warn("You have not installed kernel for "+t+"."),e)},{}):We(n)?n:{};return t.preset=Ca(i,r),new Bu(e,t)}}],[{key:"install",value:function(e){var t=st(e.name);Ye(ld[t]);var n=Ge(e)?e:at({id:t},e);return ld[t]=n,t}},{key:"hasInstalled",value:function(e){return!Ye(ld[e])}},{key:"uninstall",value:function(e){delete ld[e]}},{key:"getPluginConfig",value:function(e){return ld[e]}},{key:"installKernel",value:function(e,t){(We(e)?xa(e):[[e,t]]).forEach(function(e){var t=ka(e,2),n=t[0],r=t[1];if(!Ge(r))throw new Error("The kernel you install on "+n+" must be a Function, but not "+(void 0===r?"undefined":Ho(r)));Ge(cd[n])&&Ec.warn("You have alrady install a kenrle on "+n+", and now we will replace it"),cd[n]=r})}},{key:"uninstallKernel",value:function(e){delete cd[e]}},{key:"hasInstalledKernel",value:function(e){return Ge(cd[e])}}]),e}(),en(Af.prototype,"unuse",[_f],la(Af.prototype,"unuse"),Af.prototype),en(Af,"install",[Ef],la(Af,"install"),Af),en(Af,"hasInstalled",[Sf],la(Af,"hasInstalled"),Af),en(Af,"uninstall",[kf],la(Af,"uninstall"),Af),en(Af,"getPluginConfig",[Tf],la(Af,"getPluginConfig"),Af),Af),dd=(Mf=function(){function e(){Xr(this,e),this.log={error:!0,info:!0,warn:!0,debug:!0,verbose:!0},nn(this,"_silent",xf,this),this.errorHandler=void 0;var t=zs(this.log).reduce(function(e,t){return e[t]=de({get:function(){return Ec["ENABLE_"+t.toUpperCase()]},set:function(e){return Ec["ENABLE_"+t.toUpperCase()]=e,!0===e&&(this.silent=!1),e}}),e},{});_e(this.log,t,{self:!0})}return ca(e,[{key:"silent",get:function(){return this._silent},set:function(e){var t=this;e=!!e,this._silent=e,zs(this.log).forEach(function(n){t.log[n]=!e})}}]),e}(),xf=function(e,t,n,r,i){var o={};return Object.keys(r).forEach(function(e){o[e]=r[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},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}(Mf.prototype,"_silent",[we],{enumerable:!0,initializer:function(){return!1}}),Mf),hd=(Lf=Jl())((Vf=Hf=function(e){function t(e){Xr(this,t);var n=Vo(this,(t.__proto__||Qr(t)).call(this));if(n.destroyed=!1,rn(n,"__id",If,n),rn(n,"version",Rf,n),rn(n,"config",Nf,n),Je(e)||et(e))e={wrapper:e,controls:!0};else{if(!We(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 n.__dispatcher=new fd(e,n),n.__dispatcher.kernel.on("error",n.__throwError),n.ready=n.__dispatcher.ready,n.readySync=n.__dispatcher.readySync,n.__wrapAsVideo(n.__dispatcher.videoConfig),n}return ea(t,ad),ca(t,[{key:"destroy",value:function(){fa(t.prototype.__proto__||Qr(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){Je(e)&&(e=new Error(e));var n=this.config.errorHandler||t.config.errorHandler;if(Ge(n))return n(e);if(!t.config.silent)throw e}}]),t}(),Hf.plugin=sd,Hf.config=new dd,Hf.install=fd.install,Hf.uninstall=fd.uninstall,Hf.hasInstalled=fd.hasInstalled,Hf.installKernel=fd.installKernel,Hf.uninstallKernel=fd.uninstallKernel,Hf.hasInstalledKernel=fd.hasInstalledKernel,Hf.getPluginConfig=fd.getPluginConfig,Df=Vf,If=on(Df.prototype,"__id",[be],{enumerable:!0,initializer:function(){return"_vm"}}),Rf=on(Df.prototype,"version",[be],{enumerable:!0,initializer:function(){return"0.4.2"}}),Nf=on(Df.prototype,"config",[be],{enumerable:!0,initializer:function(){return{errorHandler:void 0}}}),on(Df,"plugin",[be],(Cf=la(Df,"plugin"),Cf=Cf?Cf.value:void 0,{enumerable:!0,configurable:!0,writable:!0,initializer:function(){return Cf}}),Df),on(Df,"config",[be],(Pf=la(Df,"config"),Pf=Pf?Pf.value:void 0,{enumerable:!0,configurable:!0,writable:!0,initializer:function(){return Pf}}),Df),on(Df,"install",[be],(jf=la(Df,"install"),jf=jf?jf.value:void 0,{enumerable:!0,configurable:!0,writable:!0,initializer:function(){return jf}}),Df),on(Df,"uninstall",[be],(Ff=la(Df,"uninstall"),Ff=Ff?Ff.value:void 0,{enumerable:!0,configurable:!0,writable:!0,initializer:function(){return Ff}}),Df),on(Df,"hasInstalled",[be],(Bf=la(Df,"hasInstalled"),Bf=Bf?Bf.value:void 0,{enumerable:!0,configurable:!0,writable:!0,initializer:function(){return Bf}}),Df),on(Df,"installKernel",[be],(zf=la(Df,"installKernel"),zf=zf?zf.value:void 0,{enumerable:!0,configurable:!0,writable:!0,initializer:function(){return zf}}),Df),on(Df,"uninstallKernel",[be],(Uf=la(Df,"uninstallKernel"),Uf=Uf?Uf.value:void 0,{enumerable:!0,configurable:!0,writable:!0,initializer:function(){return Uf}}),Df),on(Df,"hasInstalledKernel",[be],(Gf=la(Df,"hasInstalledKernel"),Gf=Gf?Gf.value:void 0,{enumerable:!0,configurable:!0,writable:!0,initializer:function(){return Gf}}),Df),on(Df,"getPluginConfig",[be],(Wf=la(Df,"getPluginConfig"),Wf=Wf?Wf.value:void 0,{enumerable:!0,configurable:!0,writable:!0,initializer:function(){return Wf}}),Df),Of=Df))||Of;!function(e,t){if("undefined"==typeof document)return t;e=e||"";var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}("/* 暂时存放到这的， 用来设置 container video 的基本样式 */\ncontainer {\n  position: relative;\n}\n\ncontainer,\nvideo {\n  display: block;\n  width: 100%;\n  height: 100%;\n  background: #000;\n  outline: none;\n}\n\nvideo:focus {\n  outline: none;\n}\n\n/* 用到的变量 */\n\n/* 全局默认样式 */\n.chimee-flex-component svg g {\n  fill: #fff;\n  stroke: #fff;\n}\n\n.chimee-flex-component svg:hover g {\n  fill: #fff;\n  stroke: #fff;\n}\n\n/* 默认隐藏 */\nchimee-volume-state-mute,\nchimee-volume-state-low,\nchimee-volume-state-high,\nchimee-control-state-pause,\nchimee-control-state-play,\nchimee-progressbar-tip,\nchimee-screen-full,\nchimee-clarity-list,\nchimee-screen-small {\n  display: none;\n}\n\n/* 满足条件时显示 */\nchimee-control.full chimee-screen-full,\nchimee-control.small chimee-screen-small,\nchimee-volume.mute chimee-volume-state-mute,\nchimee-volume.low chimee-volume-state-low,\nchimee-volume.high chimee-volume-state-high,\nchimee-control.pause chimee-control-state-pause,\nchimee-control.play chimee-control-state-play,\nchimee-control.full chimee-screen-full,\nchimee-control.small chimee-screen-small {\n  display: inline-block;\n  width: 1.4em;\n  height: 100%;\n}\n\n/* 开始写具体样式 */\nchimee-control {\n  position: absolute;\n  bottom: 0;\n  left: 0;\n  display: block;\n  width: 100%;\n  height: 100%;\n  line-height: 2em;\n  font-size: 14px;\n  -webkit-user-select: none;\n     -moz-user-select: none;\n      -ms-user-select: none;\n          user-select: none;\n  overflow: hidden;\n  font-family: Roboto, Arial, Helvetica, sans-serif;\n  -webkit-transition: visibility 0.5s ease;\n  transition: visibility 0.5s ease;\n}\n\nchimee-control-wrap {\n  position: absolute;\n  left: 0;\n  bottom: 0;\n  width: 100%;\n  height: 2.2em;\n  display: -webkit-box;\n  display: -ms-flexbox;\n  display: flex;\n  -webkit-box-orient: horizontal;\n  -webkit-box-direction: normal;\n      -ms-flex-flow: row nowrap;\n          flex-flow: row nowrap;\n  -webkit-box-pack: start;\n      -ms-flex-pack: start;\n          justify-content: flex-start;\n  -webkit-box-align: start;\n      -ms-flex-align: start;\n          align-items: flex-start;\n  background: rgba(0, 0, 0, .5);\n  -webkit-transition: bottom 0.5s ease;\n  transition: bottom 0.5s ease;\n  pointer-events: auto;\n}\n\n.chimee-flex-component {\n  -webkit-box-ordinal-group: 2;\n      -ms-flex-order: 1;\n          order: 1;\n  -webkit-box-flex: 0;\n      -ms-flex-positive: 0;\n          flex-grow: 0;\n  height: 2em;\n  cursor: pointer;\n}\n\n.chimee-flex-component svg {\n  vertical-align: middle;\n  width: 2em;\n  height: 1.5em;\n}\n\n/* 播放器状态，播放／暂停 */\nchimee-control-state.chimee-flex-component {\n  -ms-flex-preferred-size: 3em;\n      flex-basis: 3em;\n  text-align: right;\n  margin-right: 1em;\n}\n\n/* 播放器状态，播放／暂停 动画效果 */\nchimee-control-state .left,\nchimee-control-state .right {\n  -webkit-transition: d 0.2s ease-in-out;\n  transition: d 0.2s ease-in-out;\n}\n\n/* 时间显示 */\nchimee-progresstime.chimee-flex-component {\n  color: #fff;\n  font-weight: normal;\n  text-align: center;\n  white-space: nowrap;\n}\n\nchimee-progresstime-pass,\nchimee-progresstime-total {\n  display: inline;\n}\n\n/* 播放器控制条 */\nchimee-progressbar.chimee-flex-component {\n  position: relative;\n  -webkit-box-flex: 1;\n      -ms-flex-positive: 1;\n          flex-grow: 1;\n}\n\nchimee-progressbar-wrap {\n  display: inline-block;\n  height: 100%;\n  position: absolute;\n  left: 1em;\n  right: 1em;\n  top: 0;\n}\n\nchimee-progressbar.progressbar-layout-top {\n  position: static\n}\n\nchimee-progressbar.progressbar-layout-top chimee-progressbar-wrap {\n  top: -1.6em;\n  height: 1.6em;\n  left: 0.8em;\n  right: 0;\n}\n\nchimee-progressbar.progressbar-layout-top .chimee-progressbar-line {\n  left: 0;\n  top: 0.8em;\n}\n\n.chimee-progressbar-line {\n  position: absolute;\n  top: 0.9em;\n  left: 0;\n  display: inline-block;\n  height: 3px;\n}\n\nchimee-progressbar-bg {\n  width: 100%;\n  background: #4c4c4c;\n}\n\nchimee-progressbar-buffer {\n  width: 0;\n  background: #6f6f6f;\n}\n\nchimee-progressbar-all {\n  margin-left: -0.8em;\n  background: #de698c;\n}\n\nchimee-progressbar-ball {\n  content: '';\n  position: absolute;\n  right: -0.8em;\n  top: -0.3em;\n  display: inline-block;\n  width: 0.8em;\n  height: 0.8em;\n  border-radius: 0.8em;\n  background: #fff;\n  pointer-events: none;\n}\n\nchimee-progressbar-tip {\n  position: absolute;\n  bottom: 0.5em;\n  top: -1.5em;\n  left: 0;\n  z-index: 10;\n  padding: 0 0.5em;\n  height: 1.5em;\n  background: #fff;\n  line-height: 1.5em;\n  border-radius: 4px;\n  color: #000;\n  text-align: center;\n}\n\n/* 音量控制 */\nchimee-volume.chimee-flex-component {\n  cursor: pointer;\n  padding: 0;\n  -ms-flex-preferred-size: 7em;\n      flex-basis: 7em;\n  white-space: nowrap;\n  margin-right: 1em;\n  position: relative;\n}\n\nchimee-volume.chimee-flex-component.vertical {\n  padding-right: 1em;\n  -ms-flex-preferred-size: 2em;\n      flex-basis: 2em;\n}\n\nchimee-volume-state {\n  display: inline-block;\n  width: 2em;\n  vertical-align: top;\n}\n\n/* 动画所用到的元素 css */\nchimee-volume .ring1,\nchimee-volume .ring2,\nchimee-volume .line {\n  stroke-dasharray: 150;\n  stroke-dashoffset: 150;\n  -webkit-transition: stroke-dashoffset 0.7s ease-in-out;\n  transition: stroke-dashoffset 0.7s ease-in-out;\n}\n\nchimee-volume.mute .line,\nchimee-volume.mute .ring1,\nchimee-volume.mute .ring2 {\n  stroke-dashoffset: 0;\n}\n\nchimee-volume.high .ring1,\nchimee-volume.high .ring2 {\n  stroke-dashoffset: 0;\n}\n\nchimee-volume.low .ring2 {\n  stroke-dashoffset: 0;\n}\n\nchimee-volume.vertical:hover chimee-volume-bar {\n  display: inline-block;\n}\n\nchimee-volume.vertical chimee-volume-bar {\n  position: absolute;\n  top: -7em;\n  left: -0.2em;\n  width: 2em;\n  height: 4em;\n  padding-bottom: 3em;\n  display: none;\n  vertical-align: middle;\n}\n\nchimee-volume.vertical chimee-volume-bar::before {\n  content: '';\n  position: absolute;\n  left: 0;\n  right: 0;\n  top: 0;\n  bottom: 1em;\n  background: #212121;\n  border-radius: 4px;\n}\n\nchimee-volume.horizonal chimee-volume-bar {\n  position: relative;\n  height: 1.2em;\n  width: 4em;\n  display: inline-block;\n  vertical-align: middle;\n}\n\nchimee-volume.vertical chimee-volume-bar-wrap {\n  display: inline-block;\n  position: absolute;\n  bottom: 1em;\n  left: 0;\n  top: 1em;\n  right: 0;\n  height: 4em;\n}\n\nchimee-volume.vertical chimee-volume-bar-all,\nchimee-volume.vertical chimee-volume-bar-bg {\n  position: absolute;\n  bottom: 0;\n  left: 1em;\n  display: inline-block;\n  width: 2px;\n  border-radius: 4px;\n}\n\nchimee-volume.vertical chimee-volume-bar-bg {\n  height: 4em;\n  background: #4c4c4c;\n  opacity: 0.5;\n}\n\nchimee-volume.vertical chimee-volume-bar-all {\n  background: #de698c;\n}\n\nchimee-volume.vertical chimee-volume-bar-all::after {\n  content: '';\n  position: absolute;\n  right: -0.34em;\n  top: -0.4em;\n  display: inline-block;\n  width: 0.8em;\n  height: 0.8em;\n  border-radius: 0.8em;\n  background: #fff;\n  pointer-events: none;\n}\n\nchimee-volume.horizonal chimee-volume-bar {\n  position: relative;\n  height: 1.2em;\n  width: 4em;\n  display: inline-block;\n  vertical-align: middle;\n}\n\nchimee-volume.horizonal chimee-volume-bar-all,\nchimee-volume.horizonal chimee-volume-bar-bg {\n  position: absolute;\n  top: 0.4em;\n  left: 0;\n  display: inline-block;\n  height: 2px;\n}\n\nchimee-volume.horizonal chimee-volume-bar-bg {\n  width: 4em;\n  background: #4c4c4c;\n  opacity: 0.5;\n}\n\nchimee-volume.horizonal chimee-volume-bar-all {\n  background: #de698c;\n}\n\nchimee-volume.horizonal chimee-volume-bar-all::after {\n  content: '';\n  position: absolute;\n  right: -0.4em;\n  top: -0.3em;\n  display: inline-block;\n  width: 0.8em;\n  height: 0.8em;\n  border-radius: 0.8em;\n  background: #fff;\n  pointer-events: none;\n}\n\n/* 全屏 */\nchimee-screen.chimee-flex-component {\n  -ms-flex-preferred-size: 3em;\n      flex-basis: 3em;\n  text-align: left;\n}\n\n/* 清晰度切换 */\nchimee-clarity.chimee-flex-component {\n  position: relative;\n  color: #fff;\n  width: 6em;\n  height: 1.75em;\n  padding: 0;\n  padding-right: 1em;\n  padding-left: 1em;\n  text-align: center;\n  vertical-align: middle;\n  font-size: 16px;\n}\n\nchimee-clarity.chimee-flex-component:hover chimee-clarity-list {\n  display: inline-block;\n}\n\nchimee-clarity.chimee-flex-component svg {\n  width: auto;\n  height: auto;\n}\n\nchimee-clarity-list {\n  position: absolute;\n  left: 0;\n  bottom: 1em;\n  width: 100%;\n  padding-bottom: 1.5em;\n  opacity: 0.8;\n  -webkit-box-sizing: content-box;\n          box-sizing: content-box;\n  line-height: 0;\n}\n\nchimee-clarity-list ul {\n  margin: 0;\n  padding: 0.5em 0;\n  background: #292929;\n  line-height: 2em;\n}\n\nchimee-clarity-list li {\n  list-style-type: none;\n}\n\nchimee-clarity-list li:hover,\nchimee-clarity-list li.active {\n  color: #de698c;\n}\n\nchimee-clarity-list-arrow {\n  position: absolute;\n  bottom: 1.5em;\n  width: 100%;\n}\n",void 0);var pd=function(e){if(void 0==e)throw TypeError("Can't call method on  "+e);return e},vd=function(e){return Object(pd(e))},md={}.hasOwnProperty,gd=function(e,t){return md.call(e,t)},yd={}.toString,bd=function(e){return yd.call(e).slice(8,-1)},wd=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==bd(e)?e.split(""):Object(e)},_d=function(e){return wd(pd(e))},Ed=Math.ceil,Sd=Math.floor,kd=function(e){return isNaN(e=+e)?0:(e>0?Sd:Ed)(e)},Td=Math.min,Ad=function(e){return e>0?Td(kd(e),9007199254740991):0},Md=Math.max,xd=Math.min,Ld=function(e,t){return(e=kd(e))<0?Md(e+t,0):xd(e,t)},Od=sn(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)}),Dd=Od["__core-js_shared__"]||(Od["__core-js_shared__"]={}),Id=function(e){return Dd[e]||(Dd[e]={})},Rd=0,Nd=Math.random(),Cd=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++Rd+Nd).toString(36))},Pd=Id("keys"),jd=function(e){return Pd[e]||(Pd[e]=Cd(e))},Fd=function(e){return function(t,n,r){var i,o=_d(t),a=Ad(o.length),s=Ld(r,a);if(e&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}}(!1),Bd=jd("IE_PROTO"),zd=function(e,t){var n,r=_d(e),i=0,o=[];for(n in r)n!=Bd&&gd(r,n)&&o.push(n);for(;t.length>i;)gd(r,n=t[i++])&&(~Fd(o,n)||o.push(n));return o},Ud="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),Gd=Object.keys||function(e){return zd(e,Ud)},Wd=sn(function(e){var t=e.exports={version:"2.5.1"};"number"==typeof __e&&(__e=t)}),Hd=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e},Vd=function(e,t,n){if(Hd(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}},Zd=function(e){return"object"==typeof e?null!==e:"function"==typeof e},Yd=function(e){if(!Zd(e))throw TypeError(e+" is not an object!");return e},$d=function(e){try{return!!e()}catch(e){return!0}},Jd=!$d(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),Kd=Od.document,Qd=Zd(Kd)&&Zd(Kd.createElement),Xd=function(e){return Qd?Kd.createElement(e):{}},qd=!Jd&&!$d(function(){return 7!=Object.defineProperty(Xd("div"),"a",{get:function(){return 7}}).a}),eh=function(e,t){if(!Zd(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!Zd(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!Zd(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!Zd(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},th=Object.defineProperty,nh={f:Jd?Object.defineProperty:function(e,t,n){if(Yd(e),t=eh(t,!0),Yd(n),qd)try{return th(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},rh=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},ih=Jd?function(e,t,n){return nh.f(e,t,rh(1,n))}:function(e,t,n){return e[t]=n,e},oh=function(e,t,n){var r,i,o,a=e&oh.F,s=e&oh.G,u=e&oh.S,l=e&oh.P,c=e&oh.B,f=e&oh.W,d=s?Wd:Wd[t]||(Wd[t]={}),h=d.prototype,p=s?Od:u?Od[t]:(Od[t]||{}).prototype;s&&(n=t);for(r in n)(i=!a&&p&&void 0!==p[r])&&r in d||(o=i?p[r]:n[r],d[r]=s&&"function"!=typeof p[r]?n[r]:c&&i?Vd(o,Od):f&&p[r]==o?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(o):l&&"function"==typeof o?Vd(Function.call,o):o,l&&((d.virtual||(d.virtual={}))[r]=o,e&oh.R&&h&&!h[r]&&ih(h,r,o)))};oh.F=1,oh.G=2,oh.S=4,oh.P=8,oh.B=16,oh.W=32,oh.U=64,oh.R=128;var ah=oh,sh=function(e,t){var n=(Wd.Object||{})[e]||Object[e],r={};r[e]=t(n),ah(ah.S+ah.F*$d(function(){n(1)}),"Object",r)};sh("keys",function(){return function(e){return Gd(vd(e))}});var uh=Wd.Object.keys,lh=an(sn(function(e){e.exports={default:uh,__esModule:!0}})),ch=jd("IE_PROTO"),fh=Object.prototype,dh=Object.getPrototypeOf||function(e){return e=vd(e),gd(e,ch)?e[ch]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?fh:null};sh("getPrototypeOf",function(){return function(e){return dh(vd(e))}});var hh=Wd.Object.getPrototypeOf,ph=sn(function(e){e.exports={default:hh,__esModule:!0}}),vh=an(ph),mh=an(sn(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")}}));ah(ah.S+ah.F*!Jd,"Object",{defineProperty:nh.f});var gh=Wd.Object,yh=function(e,t,n){return gh.defineProperty(e,t,n)},bh=sn(function(e){e.exports={default:yh,__esModule:!0}});an(bh);var wh=an(sn(function(e,t){t.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(bh);t.default=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),(0,n.default)(e,i.key,i)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()})),_h=ih,Eh={},Sh=Jd?Object.defineProperties:function(e,t){Yd(e);for(var n,r=Gd(t),i=r.length,o=0;i>o;)nh.f(e,n=r[o++],t[n]);return e},kh=Od.document,Th=kh&&kh.documentElement,Ah=jd("IE_PROTO"),Mh=function(){},xh=function(){var e,t=Xd("iframe"),n=Ud.length;for(t.style.display="none",Th.appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),xh=e.F;n--;)delete xh.prototype[Ud[n]];return xh()},Lh=Object.create||function(e,t){var n;return null!==e?(Mh.prototype=Yd(e),n=new Mh,Mh.prototype=null,n[Ah]=e):n=xh(),void 0===t?n:Sh(n,t)},Oh=sn(function(e){var t=Id("wks"),n=Od.Symbol,r="function"==typeof n;(e.exports=function(e){return t[e]||(t[e]=r&&n[e]||(r?n:Cd)("Symbol."+e))}).store=t}),Dh=nh.f,Ih=Oh("toStringTag"),Rh=function(e,t,n){e&&!gd(e=n?e:e.prototype,Ih)&&Dh(e,Ih,{configurable:!0,value:t})},Nh={};ih(Nh,Oh("iterator"),function(){return this});var Ch=function(e,t,n){e.prototype=Lh(Nh,{next:rh(1,n)}),Rh(e,t+" Iterator")},Ph=Oh("iterator"),jh=!([].keys&&"next"in[].keys()),Fh=function(){return this},Bh=function(e,t,n,r,i,o,a){Ch(n,t,r);var s,u,l,c=function(e){if(!jh&&e in p)return p[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},f=t+" Iterator",d="values"==i,h=!1,p=e.prototype,v=p[Ph]||p["@@iterator"]||i&&p[i],m=v||c(i),g=i?d?c("entries"):m:void 0,y="Array"==t?p.entries||v:v;if(y&&(l=dh(y.call(new e)))!==Object.prototype&&l.next&&Rh(l,f,!0),d&&v&&"values"!==v.name&&(h=!0,m=function(){return v.call(this)}),a&&(jh||h||!p[Ph])&&ih(p,Ph,m),Eh[t]=m,Eh[f]=Fh,i)if(s={values:d?m:c("values"),keys:o?m:c("keys"),entries:g},a)for(u in s)u in p||_h(p,u,s[u]);else ah(ah.P+ah.F*(jh||h),t,s);return s},zh=function(e){return function(t,n){var r,i,o=String(pd(t)),a=kd(n),s=o.length;return a<0||a>=s?e?"":void 0:(r=o.charCodeAt(a))<55296||r>56319||a+1===s||(i=o.charCodeAt(a+1))<56320||i>57343?e?o.charAt(a):r:e?o.slice(a,a+2):i-56320+(r-55296<<10)+65536}}(!0);Bh(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=zh(t,n),this._i+=e.length,{value:e,done:!1})});var Uh=function(e,t){return{value:t,done:!!e}};Bh(Array,"Array",function(e,t){this._t=_d(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,Uh(1)):"keys"==t?Uh(0,n):"values"==t?Uh(0,e[n]):Uh(0,[n,e[n]])},"values");Eh.Arguments=Eh.Array;for(var Gh=Oh("toStringTag"),Wh="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),Hh=0;Hh<Wh.length;Hh++){var Vh=Wh[Hh],Zh=Od[Vh],Yh=Zh&&Zh.prototype;Yh&&!Yh[Gh]&&ih(Yh,Gh,Vh),Eh[Vh]=Eh.Array}var $h={f:Oh},Jh=$h.f("iterator"),Kh=sn(function(e){e.exports={default:Jh,__esModule:!0}});an(Kh);var Qh=sn(function(e){var t=Cd("meta"),n=nh.f,r=0,i=Object.isExtensible||function(){return!0},o=!$d(function(){return i(Object.preventExtensions({}))}),a=function(e){n(e,t,{value:{i:"O"+ ++r,w:{}}})},s=e.exports={KEY:t,NEED:!1,fastKey:function(e,n){if(!Zd(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!gd(e,t)){if(!i(e))return"F";if(!n)return"E";a(e)}return e[t].i},getWeak:function(e,n){if(!gd(e,t)){if(!i(e))return!0;if(!n)return!1;a(e)}return e[t].w},onFreeze:function(e){return o&&s.NEED&&i(e)&&!gd(e,t)&&a(e),e}}}),Xh=nh.f,qh=function(e){var t=Wd.Symbol||(Wd.Symbol={});"_"==e.charAt(0)||e in t||Xh(t,e,{value:$h.f(e)})},ep={f:Object.getOwnPropertySymbols},tp={f:{}.propertyIsEnumerable},np=function(e){var t=Gd(e),n=ep.f;if(n)for(var r,i=n(e),o=tp.f,a=0;i.length>a;)o.call(e,r=i[a++])&&t.push(r);return t},rp=Array.isArray||function(e){return"Array"==bd(e)},ip=Ud.concat("length","prototype"),op={f:Object.getOwnPropertyNames||function(e){return zd(e,ip)}},ap=op.f,sp={}.toString,up="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],lp=function(e){try{return ap(e)}catch(e){return up.slice()}},cp={f:function(e){return up&&"[object Window]"==sp.call(e)?lp(e):ap(_d(e))}},fp=Object.getOwnPropertyDescriptor,dp={f:Jd?fp:function(e,t){if(e=_d(e),t=eh(t,!0),qd)try{return fp(e,t)}catch(e){}if(gd(e,t))return rh(!tp.f.call(e,t),e[t])}},hp=Qh.KEY,pp=dp.f,vp=nh.f,mp=cp.f,gp=Od.Symbol,yp=Od.JSON,bp=yp&&yp.stringify,wp=Oh("_hidden"),_p=Oh("toPrimitive"),Ep={}.propertyIsEnumerable,Sp=Id("symbol-registry"),kp=Id("symbols"),Tp=Id("op-symbols"),Ap=Object.prototype,Mp="function"==typeof gp,xp=Od.QObject,Lp=!xp||!xp.prototype||!xp.prototype.findChild,Op=Jd&&$d(function(){return 7!=Lh(vp({},"a",{get:function(){return vp(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=pp(Ap,t);r&&delete Ap[t],vp(e,t,n),r&&e!==Ap&&vp(Ap,t,r)}:vp,Dp=function(e){var t=kp[e]=Lh(gp.prototype);return t._k=e,t},Ip=Mp&&"symbol"==typeof gp.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof gp},Rp=function(e,t,n){return e===Ap&&Rp(Tp,t,n),Yd(e),t=eh(t,!0),Yd(n),gd(kp,t)?(n.enumerable?(gd(e,wp)&&e[wp][t]&&(e[wp][t]=!1),n=Lh(n,{enumerable:rh(0,!1)})):(gd(e,wp)||vp(e,wp,rh(1,{})),e[wp][t]=!0),Op(e,t,n)):vp(e,t,n)},Np=function(e,t){Yd(e);for(var n,r=np(t=_d(t)),i=0,o=r.length;o>i;)Rp(e,n=r[i++],t[n]);return e},Cp=function(e){var t=Ep.call(this,e=eh(e,!0));return!(this===Ap&&gd(kp,e)&&!gd(Tp,e))&&(!(t||!gd(this,e)||!gd(kp,e)||gd(this,wp)&&this[wp][e])||t)},Pp=function(e,t){if(e=_d(e),t=eh(t,!0),e!==Ap||!gd(kp,t)||gd(Tp,t)){var n=pp(e,t);return!n||!gd(kp,t)||gd(e,wp)&&e[wp][t]||(n.enumerable=!0),n}},jp=function(e){for(var t,n=mp(_d(e)),r=[],i=0;n.length>i;)gd(kp,t=n[i++])||t==wp||t==hp||r.push(t);return r},Fp=function(e){for(var t,n=e===Ap,r=mp(n?Tp:_d(e)),i=[],o=0;r.length>o;)!gd(kp,t=r[o++])||n&&!gd(Ap,t)||i.push(kp[t]);return i};Mp||(_h((gp=function(){if(this instanceof gp)throw TypeError("Symbol is not a constructor!");var e=Cd(arguments.length>0?arguments[0]:void 0),t=function(n){this===Ap&&t.call(Tp,n),gd(this,wp)&&gd(this[wp],e)&&(this[wp][e]=!1),Op(this,e,rh(1,n))};return Jd&&Lp&&Op(Ap,e,{configurable:!0,set:t}),Dp(e)}).prototype,"toString",function(){return this._k}),dp.f=Pp,nh.f=Rp,op.f=cp.f=jp,tp.f=Cp,ep.f=Fp,$h.f=function(e){return Dp(Oh(e))}),ah(ah.G+ah.W+ah.F*!Mp,{Symbol:gp});for(var Bp="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),zp=0;Bp.length>zp;)Oh(Bp[zp++]);for(var Up=Gd(Oh.store),Gp=0;Up.length>Gp;)qh(Up[Gp++]);ah(ah.S+ah.F*!Mp,"Symbol",{for:function(e){return gd(Sp,e+="")?Sp[e]:Sp[e]=gp(e)},keyFor:function(e){if(!Ip(e))throw TypeError(e+" is not a symbol!");for(var t in Sp)if(Sp[t]===e)return t},useSetter:function(){Lp=!0},useSimple:function(){Lp=!1}}),ah(ah.S+ah.F*!Mp,"Object",{create:function(e,t){return void 0===t?Lh(e):Np(Lh(e),t)},defineProperty:Rp,defineProperties:Np,getOwnPropertyDescriptor:Pp,getOwnPropertyNames:jp,getOwnPropertySymbols:Fp}),yp&&ah(ah.S+ah.F*(!Mp||$d(function(){var e=gp();return"[null]"!=bp([e])||"{}"!=bp({a:e})||"{}"!=bp(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!Ip(e)){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);return"function"==typeof(t=r[1])&&(n=t),!n&&rp(t)||(t=function(e,t){if(n&&(t=n.call(this,e,t)),!Ip(t))return t}),r[1]=t,bp.apply(yp,r)}}}),gp.prototype[_p]||ih(gp.prototype,_p,gp.prototype.valueOf),Rh(gp,"Symbol"),Rh(Math,"Math",!0),Rh(Od.JSON,"JSON",!0),qh("asyncIterator"),qh("observable");var Wp=Wd.Symbol,Hp=sn(function(e){e.exports={default:Wp,__esModule:!0}});an(Hp);var Vp=sn(function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=n(Kh),i=n(Hp),o="function"==typeof i.default&&"symbol"==typeof r.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(r.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)}});an(Vp);var Zp=an(sn(function(e,t){t.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(Vp);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,n.default)(t))&&"function"!=typeof t?e:t}})),Yp=dp.f;sh("getOwnPropertyDescriptor",function(){return function(e,t){return Yp(_d(e),t)}});var $p=Wd.Object,Jp=function(e,t){return $p.getOwnPropertyDescriptor(e,t)},Kp=sn(function(e){e.exports={default:Jp,__esModule:!0}}),Qp=an(Kp),Xp=an(sn(function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=n(ph),i=n(Kp);t.default=function e(t,n,o){null===t&&(t=Function.prototype);var a=(0,i.default)(t,n);if(void 0===a){var s=(0,r.default)(t);return null===s?void 0:e(s,n,o)}if("value"in a)return a.value;var u=a.get;if(void 0!==u)return u.call(o)}})),qp=function(e,t){if(Yd(e),!Zd(t)&&null!==t)throw TypeError(t+": can't set as prototype!")},ev={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,n){try{(n=Vd(Function.call,dp.f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,r){return qp(e,r),t?e.__proto__=r:n(e,r),e}}({},!1):void 0),check:qp};ah(ah.S,"Object",{setPrototypeOf:ev.set});var tv=Wd.Object.setPrototypeOf,nv=sn(function(e){e.exports={default:tv,__esModule:!0}});an(nv),ah(ah.S,"Object",{create:Lh});var rv=Wd.Object,iv=function(e,t){return rv.create(e,t)},ov=sn(function(e){e.exports={default:iv,__esModule:!0}});an(ov);var av=an(sn(function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=n(nv),i=n(ov),o=n(Vp);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&&(r.default?(0,r.default)(e,t):e.__proto__=t)}})),sv=function(e,t,n,r){try{return r?t(Yd(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&Yd(i.call(e)),t}},uv=Oh("iterator"),lv=Array.prototype,cv=function(e){return void 0!==e&&(Eh.Array===e||lv[uv]===e)},fv=function(e,t,n){t in e?nh.f(e,t,rh(0,n)):e[t]=n},dv=Oh("toStringTag"),hv="Arguments"==bd(function(){return arguments}()),pv=function(e,t){try{return e[t]}catch(e){}},vv=function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=pv(t=Object(e),dv))?n:hv?bd(t):"Object"==(r=bd(t))&&"function"==typeof t.callee?"Arguments":r},mv=Oh("iterator"),gv=Wd.getIteratorMethod=function(e){if(void 0!=e)return e[mv]||e["@@iterator"]||Eh[vv(e)]},yv=Oh("iterator"),bv=!1;try{[7][yv]().return=function(){bv=!0}}catch(e){}ah(ah.S+ah.F*!function(e,t){if(!t&&!bv)return!1;var n=!1;try{var r=[7],i=r[yv]();i.next=function(){return{done:n=!0}},r[yv]=function(){return i},e(r)}catch(e){}return n}(function(e){}),"Array",{from:function(e){var t,n,r,i,o=vd(e),a="function"==typeof this?this:Array,s=arguments.length,u=s>1?arguments[1]:void 0,l=void 0!==u,c=0,f=gv(o);if(l&&(u=Vd(u,s>2?arguments[2]:void 0,2)),void 0==f||a==Array&&cv(f))for(n=new a(t=Ad(o.length));t>c;c++)fv(n,c,l?u(o[c],c):o[c]);else for(i=f.call(o),n=new a;!(r=i.next()).done;c++)fv(n,c,l?sv(i,u,[r.value,c],!0):r.value);return n.length=c,n}});var wv=Wd.Array.from,_v=sn(function(e){e.exports={default:wv,__esModule:!0}}),Ev=an(_v),Sv=an(sn(function(e,t){t.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(_v);t.default=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(0,n.default)(e)}})),kv=Math.floor;ah(ah.S,"Number",{isInteger:function(e){return!Zd(e)&&isFinite(e)&&kv(e)===e}});var Tv=Wd.Number.isInteger;an(sn(function(e){e.exports={default:Tv,__esModule:!0}}));var Av="\t\n\v\f\r   ᠎             　\u2028\u2029\ufeff",Mv="["+Av+"]",xv=RegExp("^"+Mv+Mv+"*"),Lv=RegExp(Mv+Mv+"*$"),Ov=function(e,t,n){var r={},i=$d(function(){return!!Av[e]()||"​"!="​"[e]()}),o=r[e]=i?t(Dv):Av[e];n&&(r[n]=o),ah(ah.P+ah.F*i,"String",r)},Dv=Ov.trim=function(e,t){return e=String(pd(e)),1&t&&(e=e.replace(xv,"")),2&t&&(e=e.replace(Lv,"")),e},Iv=Ov,Rv=Od.parseFloat,Nv=Iv.trim,Cv=1/Rv(Av+"-0")!=-1/0?function(e){var t=Nv(String(e),3),n=Rv(t);return 0===n&&"-"==t.charAt(0)?-0:n}:Rv;ah(ah.S+ah.F*(Number.parseFloat!=Cv),"Number",{parseFloat:Cv});var Pv=parseFloat;an(sn(function(e){e.exports={default:Pv,__esModule:!0}}));var jv,Fv,Bv,zv=function(){function e(t){mh(this,e),this.parent=t}return wh(e,[{key:"create",value:function(){this.createEl(),this.addAllEvent()}},{key:"destroy",value:function(){this.removeAllEvent()}},{key:"createEl",value:function(){this.$dom=document.createElement(this.option.tag),this.$dom.innerHTML=this.option.html,this.parent.$wrap.appendChild(this.$dom)}},{key:"addAllEvent",value:function(){var e=this;this.option.defaultEvent&&lh(this.option.defaultEvent).forEach(function(t){var n=e.option.defaultEvent[t];e[n]=un(e[n],e),W(e.$dom,t,e[n],!1,!1)}),this.option.event&&lh(this.option.event).forEach(function(t){var n="__"+t;e[n]=un(e.option.event[t],e),W(e.$dom,t,e[n],!1,!1)})}},{key:"removeAllEvent",value:function(){var e=this;this.option.defaultEvent&&lh(this.option.defaultEvent).forEach(function(t){var n=e.option.defaultEvent[t];e[n]=un(e[n],e),G(e.$dom,t,e[n],!1,!1)}),this.option.event&&lh(this.option.event).forEach(function(t){var n="__"+t;e[n]=un(e.option.event[t],e),G(e.$dom,t,e[n],!1,!1)})}}]),e}(),Uv=function(e){function t(e,n){mh(this,t);var r=Zp(this,(t.__proto__||vh(t)).call(this,e));return r.option=n,r.init(),r}return av(t,zv),wh(t,[{key:"init",value:function(){Xp(t.prototype.__proto__||vh(t.prototype),"create",this).call(this),B(this.$dom,"chimee-flex-component")}}]),t}(),Gv={tag:"chimee-control-state",html:"\n    <chimee-control-state-play></chimee-control-state-play>\n    <chimee-control-state-pause></chimee-control-state-pause>\n  ",animate:{icon:'\n      <svg viewBox="0 0 200 200" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n        <g fill="#ffffff" stroke="#ffffff">\n          <path class="left"></path>\n          <path class="right"></path>\n        </g>\n      </svg>\n    ',path:{play:{left:"M0.921875,0.265625L0.921875,197.074852L95.7890625,149L96.2929688,49Z",right:"M90.3142151,45.9315226L90.3142151,151.774115L201.600944,99.9938782L201.600944,98.0237571Z"},pause:{left:"M0.921875,1.265625L0.921875,198.074852L79.3611677,198.074852L79.3611677,0.258923126Z",right:"M126.921875,1.265625L126.921875,198.074852L205.361168,198.074852L205.361168,0.258923126Z"}}},defaultEvent:{click:"click"}},Wv=function(e){function t(e,n){mh(this,t);var r=Zp(this,(t.__proto__||vh(t)).call(this,e));return r.option=T(Gv,w(n)?n:{}),r.animate=!1,r.init(),r}return av(t,zv),wh(t,[{key:"init",value:function(){Xp(t.prototype.__proto__||vh(t.prototype),"create",this).call(this),this.$dom=Q(this.$dom),this.$dom.addClass("chimee-flex-component"),this.option.icon&&this.option.icon.play&&this.option.icon.pause?(this.$play=this.$dom.find("chimee-control-state-play"),this.$pause=this.$dom.find("chimee-control-state-pause"),this.$play.html(this.option.icon.play),this.$pause.html(this.option.icon.pause)):this.option.bitmap||(this.animate=!0,this.option.animate.path=this.option.path?this.option.path:this.option.animate.path,this.$dom.html(this.option.animate.icon),this.$left=this.$dom.find(".left"),this.$right=this.$dom.find(".right")),this.changeState("pause")}},{key:"changeState",value:function(e){var t="play"===e?"pause":"play";this.state=e,B(this.parent.$dom,t),z(this.parent.$dom,e),this.animate&&this.setPath(t)}},{key:"setPath",value:function(e){var t=this.option.animate.path;"play"===e?(this.$left.attr("d",t.play.left),this.$right.attr("d",t.play.right)):(this.$left.attr("d",t.pause.left),this.$right.attr("d",t.pause.right))}},{key:"click",value:function(e){var t="play"===this.state?"pause":"play";this.changeState(t),this.parent.$emit(t)}}]),t}(),Hv={tag:"chimee-volume",html:"\n    <chimee-volume-state>\n      <chimee-volume-state-mute></chimee-volume-state-mute>\n      <chimee-volume-state-low></chimee-volume-state-low>\n      <chimee-volume-state-high></chimee-volume-state-high>\n    </chimee-volume-state>\n    <chimee-volume-bar>\n      <chimee-volume-bar-wrap>\n        <chimee-volume-bar-bg></chimee-volume-bar-bg>\n        <chimee-volume-bar-all>\n          <chimee-volume-bar-ball></chimee-volume-bar-ball>\n        </chimee-volume-bar-all>\n        <chimee-volume-bar-track></chimee-volume-bar-track>\n      </chimee-volume-bar-wrap>\n    </chimee-volume-bar>\n  ",animate:{icon:'\n      <svg viewBox="0 0 107 101" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n        <g class="volume">\n          <polygon class="horn" points="0.403399942 30 27.3842118 30 56.8220589 2.84217094e-14 57.9139815 100 27.3842118 70 0.403399942 70"></polygon>\n          <path class="ring1" d="M63,5.00975239 C69.037659,4.78612057 75.9178585,8.40856146 83.6405984,15.877075 C95.2247083,27.0798454 100,34.7975125 100,50.9608558 C100,67.1241991 95.3628694,73.7907482 83.6405984,83.8306724 C75.8257511,90.5239552 68.9455516,94.0320644 63,94.355" fill-opacity="0" stroke-width="10"></path>\n          <path class="ring2" d="M65.2173913,29.4929195 C67.8779343,29.3931169 70.9097496,31.0097416 74.3128371,34.3427934 C79.4174684,39.3423712 81.5217391,42.7866154 81.5217391,50 C81.5217391,57.2133846 79.4783502,60.1885354 74.3128371,64.6691576 C70.8691617,67.656239 67.8373465,69.2218397 65.2173913,69.3659595" fill-opacity="0" stroke-width="10"></path>\n          <path class="line" d="M4.19119202,3.65220497 L102,96" stroke-width="10"></path>\n        </g>\n      </svg>\n    '},defaultEvent:{mousedown:"mousedown"}},Vv=function(e){var t=[];if(null===e)return t;for(t.push(e);null!==e.parentNode;)e=e.parentNode,t.push(e);return t},Zv=(jv=function(e){function t(e,n){mh(this,t);var r=Zp(this,(t.__proto__||vh(t)).call(this,e));return r.parent.preVolume=0,r.option=T(Hv,w(n)?n:{}),r.init(),r}return av(t,zv),wh(t,[{key:"inited",value:function(){this.update()}},{key:"init",value:function(){Xp(t.prototype.__proto__||vh(t.prototype),"create",this).call(this),this.$dom=Q(this.$dom),this.$state=this.$dom.find("chimee-volume-state"),this.$bar=this.$dom.find("chimee-volume-bar"),this.$all=this.$dom.find("chimee-volume-bar-all"),this.$bg=this.$dom.find("chimee-volume-bar-bg"),this.layout="vertical"===this.option.layout?"vertical":"horizonal",this.option.icon&&this.option.icon.mute&&this.option.icon.low?(this.option.icon.high=this.option.icon.high||this.option.icon.low,this.$mute=this.$dom.find("chimee-volume-state-mute"),this.$low=this.$dom.find("chimee-volume-state-low"),this.$high=this.$dom.find("chimee-volume-state-high"),this.$mute.html(this.option.icon.mute),this.$low.html(this.option.icon.low),this.$high.html(this.option.icon.high)):this.option.bitmap||(this.animate=!0,this.$state.html(this.option.animate.icon)),this.$dom.addClass("chimee-flex-component "+this.layout),this.changeState()}},{key:"changeState",value:function(){0===this.parent.volume?this.state="mute":this.parent.volume>0&&this.parent.volume<=.5?this.state="low":this.parent.volume>.5&&this.parent.volume<=1&&(this.state="high"),this.$dom.removeClass("mute low high"),this.$dom.addClass(this.state)}},{key:"click",value:function(e){var t=e.path||Vv(e.target);return-1!==t.indexOf(this.$state[0])?(this.stateClick(e),"state"):-1!==t.indexOf(this.$bar[0])?(this.barClick(e),"bar"):"padding"}},{key:"stateClick",value:function(){var e=this.parent.volume;this.parent.volume=0===e?this.parent.preVolume:0,this.parent.preVolume=e,this.changeState()}},{key:"barClick",value:function(e){var t="vertical"===this.layout?1-e.offsetY/this.$bg[0].offsetHeight:e.offsetX/this.$bg[0].offsetWidth;this.parent.volume=t<0?0:t>1?1:t,this.update()}},{key:"mousedown",value:function(e){"bar"===this.click(e)&&(this.startX="vertical"===this.layout?e.clientY:e.clientX,this.startVolume=this.parent.volume,W(window,"mousemove",this.draging),W(window,"mouseup",this.dragEnd),W(window,"contextmenu",this.dragEnd))}},{key:"update",value:function(){this.changeState(),"vertical"===this.layout?this.$all.css("height",100*this.parent.volume+"%"):this.$all.css("width",100*this.parent.volume+"%")}},{key:"draging",value:function(e){this.endX="vertical"===this.layout?e.clientY:e.clientX;var t="vertical"===this.layout?(this.startX-this.endX)/this.$bg[0].offsetHeight:(this.endX-this.startX)/this.$bg[0].offsetWidth,n=+(this.startVolume+t).toFixed(2);this.parent.volume=n<0?0:n>1?1:n}},{key:"dragEnd",value:function(){this.startX=0,this.startVolume=0,G(window,"mousemove",this.draging),G(window,"mouseup",this.dragEnd),G(window,"contextmenu",this.dragEnd)}}]),t}(),ln(jv.prototype,"draging",[ye],Qp(jv.prototype,"draging"),jv.prototype),ln(jv.prototype,"dragEnd",[ye],Qp(jv.prototype,"dragEnd"),jv.prototype),jv),Yv={tag:"chimee-progressbar",html:'\n    <chimee-progressbar-wrap>\n      <chimee-progressbar-bg class="chimee-progressbar-line"></chimee-progressbar-bg>\n      <chimee-progressbar-buffer class="chimee-progressbar-line"></chimee-progressbar-buffer>\n      <chimee-progressbar-all class="chimee-progressbar-line">\n        <chimee-progressbar-ball></chimee-progressbar-ball>\n      </chimee-progressbar-all>\n      <chimee-progressbar-tip></chimee-progressbar-tip>\n    </chimee-progressbar-wrap>\n  '},$v=(Fv=function(e){function t(e,n){mh(this,t);var r=Zp(this,(t.__proto__||vh(t)).call(this,e));return r.option=T(Yv,w(n)?n:{}),r.visiable=!1!==n,r.init(),r}return av(t,zv),wh(t,[{key:"init",value:function(){Xp(t.prototype.__proto__||vh(t.prototype),"create",this).call(this),this.$dom=Q(this.$dom),this.$wrap=this.$dom.find("chimee-progressbar-wrap"),this.$buffer=this.$dom.find("chimee-progressbar-buffer"),this.$all=this.$dom.find("chimee-progressbar-all"),this.$tip=this.$dom.find("chimee-progressbar-tip"),this.$track=this.$dom.find("chimee-progressbar-track"),this.$line=this.$dom.find(".chimee-progressbar-line"),this.$ball=this.$dom.find("chimee-progressbar-ball"),this.$dom.addClass("chimee-flex-component"),!this.visiable&&this.$dom.css("visibility","hidden"),"top"===this.option.layout&&(this.$dom.addClass("progressbar-layout-top"),this.$wrap.css({top:-this.$ball[0].offsetHeight+"px"}),Y(this.parent.$wrap,"paddingTop",this.$ball[0].offsetHeight+"px")),this.addWrapEvent()}},{key:"destroy",value:function(){this.removeWrapEvent(),this.watch_screen&&this.watch_screen(),Xp(t.prototype.__proto__||vh(t.prototype),"destroy",this).call(this)}},{key:"addWrapEvent",value:function(){this.$wrap.on("mousedown",this.mousedown),this.$wrap.on("mousemove",this.tipShow),this.$wrap.on("mouseleave",this.tipEnd)}},{key:"removeWrapEvent",value:function(){this.$wrap.off("mousedown",this.mousedown),this.$wrap.off("mousemove",this.tipShow),this.$wrap.off("mouseleave",this.tipEnd)}},{key:"progress",value:function(){var e=0;try{e=this.parent.buffered.end(0)}catch(e){}var t=e/this.parent.duration*100+"%";this.$buffer.css("width",t)}},{key:"update",value:function(){var e=void 0!==this._currentTime?this._currentTime:this.parent.currentTime,t=e?e/this.parent.duration:0;this.$all.css("width",100*t+"%")}},{key:"mousedown",value:function(e){e.target!==this.$tip[0]&&(this._currentTime=e.offsetX/this.$wrap[0].offsetWidth*this.parent.duration,this.startX=e.clientX,this.startTime=this._currentTime,W(window,"mousemove",this.draging),W(window,"mouseup",this.dragEnd),W(window,"contextmenu",this.dragEnd))}},{key:"draging",value:function(e){this.endX=e.clientX;var t=(this.endX-this.startX)/this.$wrap[0].offsetWidth*this.parent.duration,n=+(this.startTime+t).toFixed(2);this._currentTime=n<0?0:n>this.parent.duration?this.parent.duration:n,this.update()}},{key:"dragEnd",value:function(){this.startX=0,this.startTime=0,this.parent.currentTime=this._currentTime,this._currentTime=void 0,G(window,"mousemove",this.draging),G(window,"mouseup",this.dragEnd),G(window,"contextmenu",this.dragEnd)}},{key:"tipShow",value:function(e){if(e.target!==this.$tip[0]&&e.target!==this.$ball[0]){var t=e.offsetX/this.$wrap[0].offsetWidth*this.parent.duration,n=M(t=t<0?0:t>this.parent.duration?this.parent.duration:t),r=e.offsetX-this.$tip[0].offsetWidth/2,i=this.$wrap[0].offsetWidth-this.$tip[0].offsetWidth;r=r<0?0:r>i?i:r,this.$tip.text(n),this.$tip.css("display","inline-block"),this.$tip.css("left",r+"px")}else this.$tip.css("display","none")}},{key:"tipEnd",value:function(){this.$tip.css("display","none")}}]),t}(),cn(Fv.prototype,"mousedown",[ye],Qp(Fv.prototype,"mousedown"),Fv.prototype),cn(Fv.prototype,"draging",[ye],Qp(Fv.prototype,"draging"),Fv.prototype),cn(Fv.prototype,"dragEnd",[ye],Qp(Fv.prototype,"dragEnd"),Fv.prototype),cn(Fv.prototype,"tipShow",[ye],Qp(Fv.prototype,"tipShow"),Fv.prototype),cn(Fv.prototype,"tipEnd",[ye],Qp(Fv.prototype,"tipEnd"),Fv.prototype),Fv),Jv={tag:"chimee-progresstime",html:"\n    <chimee-progresstime-pass>00:00</chimee-progresstime-pass\n    ><chimee-progresstime-total\n      ><span>/</span\n      ><chimee-progresstime-total-value>00:00</chimee-progresstime-total-value>\n    </chimee-progresstime-total>\n  "},Kv=function(e){function t(e,n){mh(this,t);var r=Zp(this,(t.__proto__||vh(t)).call(this,e));return r.option=T(Jv,w(n)?n:{}),r.init(),r}return av(t,zv),wh(t,[{key:"init",value:function(){Xp(t.prototype.__proto__||vh(t.prototype),"create",this).call(this),this.$dom=Q(this.$dom),this.$total=this.$dom.find("chimee-progresstime-total-value"),this.$pass=this.$dom.find("chimee-progresstime-pass"),this.$dom.addClass("chimee-flex-component")}},{key:"updatePass",value:function(){this.$pass.text(M(this.parent.currentTime))}},{key:"updateTotal",value:function(){this.$total.text(M(this.parent.duration))}}]),t}(),Qv={tag:"chimee-screen",html:'\n    <chimee-screen-full>\n      <svg viewBox="0 0 67 66" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n          \x3c!-- Generator: Sketch 43.1 (39012) - http://www.bohemiancoding.com/sketch --\x3e\n          <desc>Created with Sketch.</desc>\n          <defs></defs>\n          <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n              <g id="screen-small" transform="translate(33.756308, 32.621867) rotate(45.000000) translate(-33.756308, -32.621867) translate(18.756308, -10.378133)" fill="#FFFFFF">\n                  <polygon id="Path" transform="translate(14.967695, 66.389245) rotate(180.000000) translate(-14.967695, -66.389245) " points="11.5190786 46.9431778 11.7210093 70.7913773 0.565180527 70.7913773 15.4674455 85.8353125 29.3702096 70.7913773 18.5573247 70.7702156 18.5573247 46.9431778"></polygon>\n                  <polygon id="Path" points="11.5190786 0.274130278 11.7210093 24.1223298 0.565180527 24.1223298 15.4674455 39.1662649 29.3702096 24.1223298 18.5573247 24.1011681 18.5573247 0.274130278"></polygon>\n              </g>\n          </g>\n      </svg>\n    </chimee-screen-full>\n    <chimee-screen-small>\n      <svg viewBox="0 0 61 62" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n        \x3c!-- Generator: Sketch 43.1 (39012) - http://www.bohemiancoding.com/sketch --\x3e\n        <desc>Created with Sketch.</desc>\n        <defs></defs>\n        <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n            <g id="Group" transform="translate(30.756308, 30.621867) rotate(45.000000) translate(-30.756308, -30.621867) translate(15.756308, -12.378133)" fill="#FFFFFF">\n                <polygon id="Path" points="11.5190786 46.9431778 11.7210093 70.7913773 0.565180527 70.7913773 15.4674455 85.8353125 29.3702096 70.7913773 18.5573247 70.7702156 18.5573247 46.9431778"></polygon>\n                <polygon id="Path" transform="translate(14.967695, 19.720198) rotate(180.000000) translate(-14.967695, -19.720198) " points="11.5190786 0.274130278 11.7210093 24.1223298 0.565180527 24.1223298 15.4674455 39.1662649 29.3702096 24.1223298 18.5573247 24.1011681 18.5573247 0.274130278"></polygon>\n            </g>\n        </g>\n      </svg>\n    </chimee-screen-small>\n  ',defaultEvent:{click:"click"}},Xv=(Bv=function(e){function t(e,n){mh(this,t);var r=Zp(this,(t.__proto__||vh(t)).call(this,e));return r.state="small",r.option=T(Qv,w(n)?n:{}),r.init(),r}return av(t,zv),wh(t,[{key:"init",value:function(){Xp(t.prototype.__proto__||vh(t.prototype),"create",this).call(this),this.$dom=Q(this.$dom),this.changeState(this.state),this.$dom.addClass("chimee-flex-component"),this.$full=this.$dom.find("chimee-screen-full"),this.$small=this.$dom.find("chimee-screen-small"),this.option.icon&&this.option.icon.full&&this.option.icon.small?(this.$full.html(this.option.icon.full),this.$small.html(this.option.icon.small)):this.option.bitmap&&(this.$full.html(""),this.$small.html(""))}},{key:"changeState",value:function(e){var t="small"===e?"full":"small";B(this.parent.$dom,e),z(this.parent.$dom,t)}},{key:"click",value:function(){var e=!1;"small"===this.state?(this.state="full",e=!0):(this.state="small",e=!1),this.changeState(this.state),this.parent.$fullscreen(e,"container"),e?this.watch_screen=this.parent.$watch("isFullscreen",this.screenChange):this.watch_screen()}},{key:"screenChange",value:function(){this.parent.fullscreenElement&&(this.state="small",this.changeState("small"),this.parent.$fullscreen(!1,"container"))}}]),t}(),function(e,t,n,r,i){var o={};Object.keys(r).forEach(function(e){o[e]=r[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},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)}(Bv.prototype,"screenChange",[ye],Qp(Bv.prototype,"screenChange"),Bv.prototype),Bv),qv={tag:"chimee-clarity",width:"2em",html:'\n    <chimee-clarity-text></chimee-clarity-text>\n    <chimee-clarity-list>\n      <ul></ul>\n      <div class="chimee-clarity-list-arrow">\n        <svg viewBox="0 0 115 6"  version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n          <g id="Group-3-Copy" fill="#57B0F6">\n            <polygon id="Path-2" points="0.0205224145 0.0374249581 0.0205224145 2.12677903 53.9230712 2.12677903 57.1127727 5.3468462 60.2283558 2.12677903 113.820935 2.12677903 113.820935 0.0374249581"></polygon>\n          </g>\n        </svg>\n      </div>\n    </chimee-clarity-list>\n  ',defaultEvent:{click:"click"}},em=function(e){function t(e,n){mh(this,t);var r=Zp(this,(t.__proto__||vh(t)).call(this,e));return r.option=T(qv,w(n)?n:{}),r.init(),r}return av(t,zv),wh(t,[{key:"init",value:function(){Xp(t.prototype.__proto__||vh(t.prototype),"create",this).call(this),B(this.$dom,"chimee-flex-component"),this.$text=Q(this.$dom).find("chimee-clarity-text"),this.$list=Q(this.$dom).find("chimee-clarity-list"),this.$listUl=this.$list.find("ul"),this.option.width&&Y(this.$dom,"width",this.option.width),this.initTextList()}},{key:"initTextList",value:function(){var e=this;this.option.list.forEach(function(t){var n=Q(document.createElement("li"));n.attr("data-url",t.src),n.text(t.name),t.src===e.parent.$videoConfig.src&&(e.$text.text(t.name),n.addClass("active")),e.$listUl.append(n)})}},{key:"click",value:function(e){var t=e.target;if("LI"===t.tagName){Ev(t.parentElement.children).map(function(e){z(e,"active")});var n=t.getAttribute("data-url")||"";B(e.target,"active"),this.$text.text(e.target.textContent),this.switchClarity(n)}}},{key:"switchClarity",value:function(e){var t=this;this.loadOption&&(this.loadOption.abort=!0),this.loadOption={abort:!1,repeatTimes:3,increment:1,immediate:!0},this.parent.$silentLoad(e,this.loadOption).then(function(){t.loadOption=void 0}).catch(function(e){})}}]),t}(),tm={},nm={name:"chimeeControl",el:"chimee-control",data:{children:{},show:!1,disabled:!0},level:99,operable:!1,penetrate:!1,create:function(){},init:function(e){e.controls&&(this.show=!0,e.controls=!1);var t=this;_e(e,{controls:de({get:function(){return t.show},set:function(e){return t.show=Boolean(e),t._display(),!1}},{preSet:!0})},{self:!0}),this.config=w(this.$config)?T(tm,this.$config):tm,this.$dom.innerHTML="<chimee-control-wrap></chimee-control-wrap>",this.$wrap=this.$dom.querySelector("chimee-control-wrap"),this.children=dn(this),this._setStyle()},destroy:function(){window.clearTimeout(this.timeId)},inited:function(){for(var e in this.children)this.children[e].inited&&this.children[e].inited()},events:{loadstart:function(){this._disable(!0)},canplay:function(){this._disable(!1)},play:function(){this.children.play&&this.children.play.changeState("play"),this._hideItself()},pause:function(){this.children.play&&this.children.play.changeState("pause"),this._showItself()},load:function(){},c_touchmove:function(){this._mousemove()},c_mousemove:function(){this._mousemove()},durationchange:function(){this.children.progressTime&&this.children.progressTime.updateTotal()},timeupdate:function(){this._progressUpdate()},progress:function(){this.children.progressBar&&this.children.progressBar.progress()},volumechange:function(){this.children.volume&&this.children.volume.update()},keydown:function(e){if(!this.disabled)switch(e.stopPropagation(),e.keyCode){case 32:e.preventDefault(),this.children.play&&this.children.play.click(e);break;case 37:e.preventDefault();var t=this.currentTime-10;this.currentTime=t<0?0:t,this._mousemove();break;case 39:e.preventDefault();var n=this.currentTime+10;this.currentTime=n>this.duration?this.duration:n,this._mousemove();break;case 38:e.preventDefault();var r=this.volume+.1;this.volume=r>1?1:r,this._mousemove();break;case 40:e.preventDefault();var i=this.volume-.1;this.volume=i<0?0:i,this._mousemove()}},touchstart:function(e){!this.disabled&&this.children.play&&this.children.play.click(e)},click:function(e){var t=this,n=new Date,r=this.clickTime;this.clickTime=n,n-r<300?clearTimeout(this.clickTimeId):this.clickTimeId=setTimeout(function(){!t.disabled&&t.children.play&&t.children.play.click(e)},300)},dblclick:function(e){!this.disabled&&this.children.screen&&this.children.screen.click()}},methods:{_progressUpdate:function(){this.children.progressBar&&this.children.progressBar.update(),this.children.progressTime&&this.children.progressTime.updatePass()},_hideItself:function(){var e=this;window.clearTimeout(this.timeId),this.timeId=setTimeout(function(){var t=e.$wrap.offsetHeight;t=e.children.progressBar?e.children.progressBar.$wrap[0].offsetTop-t:-t,Y(e.$wrap,{bottom:t+"px"}),Y(e.$dom,{visibility:"hidden"})},2e3)},_showItself:function(){window.clearTimeout(this.timeId),Y(this.$wrap,{bottom:"0"}),Y(this.$dom,{visibility:"visible"})},_display:function(){var e=this.show?"block":"none";Y(this.$dom,{display:e})},_mousemove:function(e){this.paused||(this._showItself(),this._hideItself())},_disable:function(e){this.show&&(this.disabled=e,Y(this.$wrap,"pointerEvents",e?"none":"auto"))},_setStyle:function(){var e="";e+=this.config.majorColor?"\n  .chimee-flex-component svg *{\n    fill: majorColor;\n    stroke: majorColor;\n  }\n  chimee-progressbar-all{\n    background: majorColor;\n  }\n  chimee-volume.chimee-flex-component chimee-volume-bar-all{\n    background: majorColor;    \n  }\n  chimee-clarity-list li:hover,\n  chimee-clarity-list li.active {\n    color: majorColor;\n  }\n".replace(/majorColor/g,this.config.majorColor):"",e+=this.config.hoverColor?"\n  .chimee-flex-component svg:hover *{\n    fill: hoverColor;\n    stroke: hoverColor;\n  }\n".replace(/hoverColor/g,this.config.hoverColor):"";var t=document.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t)}}},rm=e(t(function(e){e.exports={default:na,__esModule:!0}})),im=t(function(e){e.exports={default:ru,__esModule:!0}}),om=e(im),am=e(t(function(e,t){t.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(im);t.default=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(0,n.default)(e)}})),sm=e(t(function(e){e.exports={default:js,__esModule:!0}})),um=e(t(function(e){e.exports={default:Bs,__esModule:!0}})),lm="undefined"!=typeof window&&"[object Object]"!==Object.prototype.toString.call(window),cm=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||function(e){return setTimeout(e,17)},fm=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.msCancelAnimationFrame||window.oCancelAnimationFrame||function(e){clearTimeout(e)},dm=e(t(function(e){e.exports={default:Na,__esModule:!0}})),hm=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")}})),pm=t(function(e){e.exports={default:na,__esModule:!0}});e(pm);var vm=e(t(function(e,t){t.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(pm);t.default=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),(0,n.default)(e,i.key,i)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()})),mm=t(function(e){e.exports={default:ru,__esModule:!0}}),gm=e(mm),ym=t(function(e){e.exports={default:Vi,__esModule:!0}});e(ym);var bm=t(function(e){e.exports={default:Uo,__esModule:!0}});e(bm);var wm=e(t(function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=n(ym),i=n(bm),o="function"==typeof i.default&&"symbol"==typeof r.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(r.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)}})),_m=e(t(function(e){e.exports={default:Qo,__esModule:!0}}));e(t(function(e,t){t.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(mm);t.default=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(0,n.default)(e)}})),e(t(function(e){e.exports={default:js,__esModule:!0}})),e(t(function(e){e.exports={default:Bs,__esModule:!0}}));var Em=_m(null);Em.count=0;(function(){function e(t,n){var r=this;if(hm(this,e),Object.defineProperty(this,"__target",{writable:!0,enumerable:!1,configurable:!0}),this.__target=this,t){if("object"!==(void 0===t?"undefined":wm(t)))throw new Error("CusEvent target are not object");this.__target=t,n&&["on","once","off","emit"].forEach(function(e){t[e]=r[e]})}}vm(e,[{key:"on",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return _n(this.__target,e,t,n),this}},{key:"once",value:function(e,t){return this.on(e,t,!0)}},{key:"off",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return En(this.__target,e,t,n),this}},{key:"emit",value:function(e,t){return wn(this.__target,e,{data:t}),this}}])})(),"undefined"!=typeof window&&Object.prototype.toString.call(window);var Sm=document.createElement("div"),km="innerText";"textContent"in Sm&&(km="textContent");var Tm=Array.prototype,Am=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;hm(this,e);var r=this;r.selector=t;var o=void 0;t&&t.constructor===NodeList?o=Sn(t):i(t)?o=t:l(t)?0===t.indexOf("<")?(Sm.innerHTML=t,o=Cn("*",Sm,!0)):o=Cn(t,n,!0):o=[t],dm(r,o),r.length=o.length}return vm(e,[{key:"each",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Tm.forEach.apply(this,t),this}},{key:"push",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Tm.push.apply(this,t),this}},{key:"splice",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Fn(Tm.splice.apply(this,t))}},{key:"find",value:function(e){var t=[];this.each(function(n){t=t.concat(Cn(e,n,!0))});var n=Fn(t);return n.parent=this,n.selector=e,n}},{key:"append",value:function(e){var t=Fn(e),n=this[0];return t.each(function(e){return n.appendChild(e)}),this}},{key:"appendTo",value:function(e){return Fn(e).append(this),this}},{key:"text",value:function(e){return 0===arguments.length?this[0][km]:this.each(function(t){t[km]=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?kn(this[0],e):this.each(function(n){return Tn(n,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(n){(n.dataset||(n.dataset={}))[e]=t})}},{key:"css",value:function(e,t){return 1!==arguments.length||a(e)?this.each(function(n){return Nn(n,e,t)}):Rn(this[0],e)}},{key:"addClass",value:function(e){return this.each(function(t){return An(t,e)})}},{key:"removeClass",value:function(e){return this.each(function(t){return Mn(t,e)})}},{key:"hasClass",value:function(e){return xn(this[0],e)}},{key:"on",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.each(function(i){return On(i,e,t,n,r)})}},{key:"off",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.each(function(i){return Ln(i,e,t,n,r)})}},{key:"delegate",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.each(function(i){return Dn(i,e,t,n,r)})}},{key:"undelegate",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.each(function(i){return In(i,e,t,n,r)})}},{key:"remove",value:function(){return this.each(function(e){return Pn(e)})}}]),e}(),Mm=Object.freeze({Log:bu,genTraversalHandler:X,deepClone:function(e){if(d(e))throw new TypeError("deepClone only accept non primitive type");return Sl(e)},deepAssign:q,camelize:ee,hypenate:function(e){return ee(e).replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})},bind:te,uuid:ne,S4:re,rand:function(e){for(var t="";t.length<e;)t+=re();return t.slice(0,e)},getDeepProperty:ie,isVoid:r,isArray:i,isFunction:o,isObject:a,isNumber:s,isNumeric:function(e){return!i(e)&&e-yu(e)+1>=0},isInteger:function(e){return gu(e)},isEmpty:function(e){return i(e)?0===e.length:a(e)?0===mu(e).length:!e},isEvent:function(e){return e instanceof Event||e.originalEvent instanceof Event},isBlob:u,isFile:function(e){return u(e)&&l(e.name)},isDate:function(e){return"[object Date]"===Object.prototype.toString.call(e)},isString:l,isBoolean:c,isPromise:f,isPrimitive:d,isUrl:h,isNode:p,isElement:function(e){return!!("object"===("undefined"==typeof HTMLElement?"undefined":vu(HTMLElement))?e instanceof HTMLElement:e&&"object"===(void 0===e?"undefined":vu(e))&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName)},isChildNode:function(e,t){return!(!p(e)||!p(t))&&t.parentNode===e},isPosterityNode:function(e,t){if(!p(e)||!p(t))return!1;for(;t.parentNode;)if((t=t.parentNode)===e)return!0;return!1},isHTMLString:function(e){return/<[^>]+?>/.test(e)},isError:function(e){return e instanceof Error},inBrowser:lm,makeArray:function(e){return om(e)},transObjectAttrIntoArray:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e,t){return+e-+t};return um(e).sort(t).reduce(function(t,n){return t.concat(e[n])},[])},runRejectableQueue:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new sm(function(t,r){!function i(a){if(!(a>=e.length)){var s=o(e[a])?e[a].apply(e,am(n)):e[a];return!1===s?r("stop"):sm.resolve(s).then(function(){return i(a+1)}).catch(function(e){return r(e||"stop")})}t()}(0)})},runStoppableQueue:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return function t(r){return r>=e.length||!1!==(o(e[r])?e[r].apply(e,am(n)):e[r])&&t(++r)}(0)},setFrozenAttr:hn,setAttrGetterAndSetter:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.get,i=n.set,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"__";if(d(e))throw TypeError("setFrozenAttr obj parameter can not be primitive type");if(!l(t))throw TypeError("setAttrGetterAndSetter key parameter must be String");var s=e[t];if(!o(r)&&(rm(e,a+t,{value:s,configurable:!0,writable:!0,enumerable:!1}),r=function(){return this[a+t]},i&&o(i))){var u=i;i=function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];this[a+t]=u.call.apply(u,[this].concat(n))}}rm(e,t,{get:r,set:i})},decodeUTF8:function(e){for(var t=[],n=e,r=0,i=e.length;r<i;)if(n[r]<128)t.push(String.fromCharCode(n[r])),++r;else{if(n[r]<192);else if(n[r]<224){if(pn(n,r,1)){var o=(31&n[r])<<6|63&n[r+1];if(o>=128){t.push(String.fromCharCode(65535&o)),r+=2;continue}}}else if(n[r]<240){if(pn(n,r,2)){var a=(15&n[r])<<12|(63&n[r+1])<<6|63&n[r+2];if(a>=2048&&55296!=(63488&a)){t.push(String.fromCharCode(65535&a)),r+=3;continue}}}else if(n[r]<248&&pn(n,r,3)){var s=(7&n[r])<<18|(63&n[r+1])<<12|(63&n[r+2])<<6|63&n[r+3];if(s>65536&&s<1114112){s-=65536,t.push(String.fromCharCode(s>>>10|55296)),t.push(String.fromCharCode(1023&s|56320)),r+=4;continue}}t.push(String.fromCharCode(65533)),++r}return t.join("")},debounce:function(e,t,n){var r=void 0,i=void 0,o=void 0,a=void 0,s=void 0,u=function u(){var l=new Date-a;l<t&&l>=0?r=setTimeout(u,t-l):(r=null,n||(s=e.apply(o,i),r||(o=i=null)))};return function(){o=this,i=arguments,a=new Date;var l=n&&!r;return r||(r=setTimeout(u,t)),l&&(s=e.apply(o,i),o=i=null),s}},throttle:function(e,t,n,r){var i=void 0,o=void 0,a=void 0,s=null,u=0;n||(n={});var l=function(){u=!1===n.leading?0:new Date-0,s=null,a=e.apply(i,o),s||(i=o=null)};return t=t||0,function(){var c=new Date;u||!1!==n.leading||(u=c);var f=t-(c-u);return i=r||this,o=arguments,f<=0||f>t?(s&&(clearTimeout(s),s=null),u=c,a=e.apply(i,o),s||(i=o=null)):s||!1===n.trailing||(s=setTimeout(l,f)),a}},raf:cm,caf:fm,strRepeat:vn,formatTime:function(e){var t=Math.floor(e/3600);e=Math.floor(e%3600);var n=vn(Math.floor(e/60),2),r=vn(e=Math.floor(e%60),2);return t>=1?t+":"+n+":"+r:n+":"+r},addTransMethod:function(e){hn(e,"trans",function(t){return e.__fns||hn(e,"__fns",{}),e.__fns[t]||(e.__fns[t]=function(){if(!o(e[t]))throw TypeError("obj.trans(methodName) parameter must be Function");return e[t].apply(e,arguments)}),e.__fns[t]})},appendCSS:function(e){var t=document,n=t.querySelector("style");if(!n){n=t.createElement("style");var r=t.querySelector("head");r&&r.appendChild(n)}return n.appendChild(t.createTextNode(e)),n},formatDate:mn,getLocalStorage:gn,setLocalStorage:yn,emitEventCache:L,addEventCache:O,removeEventCache:D,CustEvent:Ou,getAttr:kn,setAttr:Tn,addClassName:An,removeClassName:Mn,hasClassName:xn,removeEvent:Ln,addEvent:On,addDelegate:Dn,removeDelegate:In,getStyle:Rn,setStyle:Nn,query:Cn,removeEl:Pn,findParents:jn,$:Fn,NodeWrap:Am}),xm=Mm&&void 0||Mm,Lm=function(e){return e&&"object"==typeof e&&"default"in e?e.default:e}(Sa);!function(e,t){if("undefined"==typeof document)return t;e=e||"";var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e)),n.appendChild(r)}("chimee-popup{position:absolute;color:#fff;background-color:rgba(88,88,88,.5);font-size:13px;font-family:sans-serif;border:1px solid hsla(0,0%,100%,.08);padding:3px}chimee-popup cm-pp-close{float:right;color:#fff;text-decoration:none;opacity:.8;line-height:14px;text-shadow:0 0 1px #000;font-size:15px;padding:0 3px;cursor:pointer}chimee-popup cm-pp-close:hover{opacity:1}chimee-popup cm-pp-body,chimee-popup cm-pp-head{display:block;padding:3px 3px 6px}chimee-popup cm-pp-head{font-weight:700;border-bottom:1px solid hsla(0,0%,100%,.18);padding:0 5px 4px;margin-bottom:5px}chimee-popup cm-pp-body{font-size:12px}",void 0);var Om=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.tagName,n=void 0===t?"chimee-popup":t,r=e.className,i=e.name,o=void 0===i?"popup":i,a=e.html,s=e.title,u=void 0===s?"这是一个信息框":s,l=e.body,c=void 0===l?"这里是信息内容":l,f=e.offsetAttr,d=void 0===f?"left top":f,h=e.offset,p=void 0===h?"50% 50%":h,v=e.translate,m=void 0===v?"":v,g=e.width,y=e.height,b=e.level,w=e.init,_=e.inited,E=e.data,S=e.create,k=e.beforeCreate,T=e.destroy,A=e.events,M=e.computed,x=e.methods,L=void 0===x?{}:x,O=e.penetrate,D=void 0!==O&&O,I=e.operable,R=void 0===I||I,N=e.hide,C=void 0!==N&&N,P=e.opened,j=e.closed,F=e.autoFocus,B={html:a||"\n      <cm-pp-close>×</cm-pp-close>\n      "+(!1!==u?"<cm-pp-head>"+u+"</cm-pp-head>":"")+"\n      "+(!1!==c?"<cm-pp-body>"+c+"</cm-pp-body>":"")+"\n    ",closeSelector:"._close"};return{name:o,el:n,className:r,beforeCreate:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.events,n=e.methods,r=arguments[1];xm.isObject(r)&&(xm.isObject(r.events)&&xm.deepAssign(t,r.events),xm.isObject(r.methods)&&xm.deepAssign(n,r.methods)),k&&k.apply(this,arguments)},create:function(){var e=xm.isObject(this.$config)?xm.deepAssign(B,this.$config):B;(this.$domWrap=xm.$(this.$dom).css("display","none")).html(e.html).delegate("cm-pp-close, "+e.closeSelector,"click",this.close),this.width(g).height(y).offset(p).translate(m),this._hide=C;for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];S&&S.apply(this,n),!this._hide&&this.open()},destroy:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];T&&T.apply(this,t),this.$domWrap.undelegate(this.$config.closeSelector,"click",this.close).remove()},level:b,init:w,inited:_,data:E,events:A,computed:M,penetrate:D,operable:R,autoFocus:F,methods:xm.deepAssign({open:function(){if(this.destroyed)return this;this.$domWrap.css("display","block"),this._hide=!1;for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.$emit("popupOpen",t,this),xm.isFunction(P)&&P.apply(this,t),this},close:function(){if(this.destroyed)return this;this.$domWrap.css("display","none"),this._hide=!0;for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.$emit("popupClose",t,this),xm.isFunction(j)&&j.apply(this,t),this},width:function(e){return e&&this.$domWrap.css("width",e),this},height:function(e){return e&&this.$domWrap.css("height",e),this},offset:function(e){var t=(""+(e||"")).split(" "),n={};if(t.length>2)return["top","right","bottom","left"].forEach(function(e,r){t[r]&&"auto"!==t[r]&&(n[e]=t[r])}),this.$domWrap.css(n),this;var r=Lm(t,2),i=r[0],o=r[1];if(""===i)return this;var a=o||i,s=d.split(" ");n[s[0]]=i,n[s[1]]=a,this.$domWrap.css(n);var u=[];return"50%"===i&&u.push("-50%"),"50%"===a&&u.push("-50%"),u.length>0&&this.translate(u.join(" ")),this},translate:function(e){var t=(""+(e||"")).split(" "),n=Lm(t,2),r=n[0],i=n[1];return r&&this.$domWrap.css("transform","translate("+r+", "+(i||r)+")"),this}},L)}};!function(e,t){if("undefined"==typeof document)return t;e=e||"";var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}('chimee-center-state{position:absolute}@keyframes a{0%{opacity:1}to{transform:scale(2);opacity:0}}chimee-center-state-correct,chimee-center-state-error,chimee-center-state-loading,chimee-center-state-tip{display:none}chimee-center-state.correct chimee-center-state-correct,chimee-center-state.error chimee-center-state-error,chimee-center-state.loading chimee-center-state-loading,chimee-center-state.tip chimee-center-state-tip{display:inline-block}chimee-center-state-correct{width:104px;height:104px}chimee-center-state-tip{position:absolute;left:26px;bottom:26px;width:52px;height:52px;border-radius:26px;background:rgba(0,0,0,.5);animation:a .5s linear 1 normal forwards}chimee-center-state.play span{background-image:url("data:image/svg+xml;base64,Cjxzdmcgd2lkdGg9IjQycHgiIGhlaWdodD0iNTFweCIgdmlld0JveD0iMCAwIDQyIDUxIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPCEtLSBHZW5lcmF0b3I6IFNrZXRjaCA0My4xICgzOTAxMikgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxkZWZzPjwvZGVmcz4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxwb2x5Z29uIGlkPSJUcmlhbmdsZSIgZmlsbD0iI0ZGRkZGRiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjEuMDAwMDAwLCAyNS41MDAwMDApIHJvdGF0ZSg5MC4wMDAwMDApIHRyYW5zbGF0ZSgtMjEuMDAwMDAwLCAtMjUuNTAwMDAwKSAiIHBvaW50cz0iMjEgNSA0NiA0NiAtNCA0NiI+PC9wb2x5Z29uPgogICAgPC9nPgo8L3N2Zz4=")}chimee-center-state.pause span{background-image:url("data:image/svg+xml;base64,Cjxzdmcgd2lkdGg9IjUwcHgiIGhlaWdodD0iNTBweCIgdmlld0JveD0iMCAwIDUwIDUwIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPCEtLSBHZW5lcmF0b3I6IFNrZXRjaCA0My4xICgzOTAxMikgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxkZWZzPjwvZGVmcz4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxyZWN0IGlkPSJSZWN0YW5nbGUiIGZpbGw9IiNGRkZGRkYiIHg9IjAiIHk9IjAiIHdpZHRoPSIyMCIgaGVpZ2h0PSI1MCI+PC9yZWN0PgogICAgICAgIDxyZWN0IGlkPSJSZWN0YW5nbGUiIGZpbGw9IiNGRkZGRkYiIHg9IjMwIiB5PSIwIiB3aWR0aD0iMjAiIGhlaWdodD0iNTAiPjwvcmVjdD4KICAgIDwvZz4KPC9zdmc+")}chimee-center-state.back span{background-image:url("data:image/svg+xml;base64,Cjxzdmcgd2lkdGg9IjczMXB4IiBoZWlnaHQ9Ijg4NHB4IiB2aWV3Qm94PSIwIDAgNzMxIDg4NCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDwhLS0gR2VuZXJhdG9yOiBTa2V0Y2ggNDQuMSAoNDE0NTUpIC0gaHR0cDovL3d3dy5ib2hlbWlhbmNvZGluZy5jb20vc2tldGNoIC0tPgogICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+CiAgICA8ZGVmcz48L2RlZnM+CiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9IiNmZmZmZmYiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyBpZD0iNzcxLeWNlee6v++8jOWIt+aWsCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMzY1LjUwMDAwMCwgNDQyLjAwMDAwMCkgc2NhbGUoLTEsIDEpIHRyYW5zbGF0ZSgtMzY1LjUwMDAwMCwgLTQ0Mi4wMDAwMDApICIgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSIjZmZmZmZmIj4KICAgICAgICAgICAgPHBhdGggZD0iTTcwNS4xMTg1NTgsNDkyLjQxNDIwMyBDNjkwLjk4OTc2OSw0OTIuNDE0MjAzIDY3OS41MzU5MDMsNTAzLjg2ODA2OSA2NzkuNTM1OTAzLDUxNy45OTY4NTggQzY3OS41MzU5MDMsNjkxLjA2MDQ0OSA1MzguNzM3MTU3LDgzMS44NTkxOTUgMzY1LjY3MzU2Niw4MzEuODU5MTk1IEMxOTIuNjA4OTUyLDgzMS44NTkxOTUgNTEuODEyMjUyLDY5MS4wNjA0NDkgNTEuODEyMjUyLDUxNy45OTY4NTggQzUxLjgxMjI1MiwzNTUuMDM4NDE2IDE3Ni42NTI1MzgsMjIwLjcwNjk2NSAzMzUuNzE0MjMsMjA1LjU3MzI4OSBMMjIzLjYwMDgwMywzMTcuNjg2NzE2IEMyMTMuNjEwMjY1LDMyNy42NzcyNTQgMjEzLjYxMDI2NSwzNDMuODc1MTY4IDIyMy42MDA4MDMsMzUzLjg2NTcwNyBDMjI4LjU5NjU4NCwzNTguODYwNDY1IDIzNS4xNDM2OTcsMzYxLjM1ODM1NSAyNDEuNjkwODEsMzYxLjM1ODM1NSBDMjQ4LjIzNzkyMywzNjEuMzU4MzU1IDI1NC43ODUwMzYsMzU4Ljg2MDQ2NSAyNTkuNzgwODE3LDM1My44NjU3MDcgTDQxNC43MzcwMDUsMTk4LjkwOTUxOSBDNDI0LjcyNzU0MywxODguOTE4OTgxIDQyNC43Mjc1NDMsMTcyLjcyMTA2NyA0MTQuNzM3MDA1LDE2Mi43MzA1MjggTDI1OS43Nzk3OTMsNy43NzQzNDEgQzI0OS43ODgyMzEsLTIuMjE2MTk3IDIzMy41OTEzNDEsLTIuMjE2MTk3IDIyMy42MDA4MDIsNy43NzQzNDEgQzIxMy42MTAyNjQsMTcuNzY0ODc5IDIxMy42MTAyNjQsMzMuOTYyNzkzIDIyMy42MDA4MDIsNDMuOTUzMzMyIEwzMzMuOTkwOTgxLDE1NC4zNDM1MTEgQzI5NS45MDE0NzgsMTU3LjYwMjc0MSAyNTguODgyMzUzLDE2Ni43MzM3MDIgMjIzLjU4MTM1OSwxODEuNjY0NzYzIEMxODAuMTExMzEyLDIwMC4wNTE1MjkgMTQxLjA3NjI3MywyMjYuMzY3ODk0IDEwNy41NjA5NDksMjU5Ljg4MzIxOSBDNzQuMDQ1NjI1LDI5My4zOTg1NDQgNDcuNzI5MjU5LDMzMi40MzI1NTkgMjkuMzQyNDkzLDM3NS45MDM2MjkgQzEwLjMwMTgzNSw0MjAuOTIxOTM5IDAuNjQ2OTQxLDQ2OC43Mjk3ODEgMC42NDY5NDEsNTE3Ljk5NTgzNCBDMC42NDY5NDEsNTY3LjI2MzkzNCAxMC4zMDE4MzUsNjE1LjA2OTczIDI5LjM0MjQ5Myw2NjAuMDg5MDYzIEM0Ny43MjkyNTksNzAzLjU1ODA4NyA3NC4wNDU2MjQsNzQyLjU5NDE0OSAxMDcuNTYwOTQ5LDc3Ni4xMDk0NzMgQzE0MS4wNzYyNzQsODA5LjYyNDc5NyAxODAuMTEwMjg5LDgzNS45NDExNjMgMjIzLjU4MTM1OSw4NTQuMzI2OTA2IEMyNjguNTk5NjY5LDg3My4zNjg1ODggMzE2LjQwNjQ4OCw4ODMuMDIzNDgyIDM2NS42NzM1NjQsODgzLjAyMzQ4MiBDNDE0Ljk0MTY2NCw4ODMuMDIzNDgyIDQ2Mi43NDc0Niw4NzMuMzY4NTg4IDUwNy43NjY3OTMsODU0LjMyNjkwNiBDNTUxLjIzNTgxNyw4MzUuOTQxMTY0IDU5MC4yNzE4NzksODA5LjYyNDc5OCA2MjMuNzg3MjAzLDc3Ni4xMDk0NzMgQzY1Ny4zMDI1MjcsNzQyLjU5NDE0OCA2ODMuNjE4ODkzLDcwMy41NTkxMSA3MDIuMDA0NjM2LDY2MC4wODkwNjMgQzcyMS4wNDYzMTgsNjE1LjA2OTczIDczMC43MDEyMTIsNTY3LjI2MjkxMSA3MzAuNzAxMjEyLDUxNy45OTU4MzQgQzczMC43MDEyMTMsNTAzLjg2ODA2OSA3MTkuMjQ4MzcsNDkyLjQxNDIwMyA3MDUuMTE4NTU4LDQ5Mi40MTQyMDMgWiIgaWQ9IlNoYXBlIj48L3BhdGg+CiAgICAgICAgPC9nPgogICAgICAgIDx0ZXh0IGlkPSIxMCIgZm9udC1mYW1pbHk9IkhlbHZldGljYSIgZm9udC1zaXplPSIyODgiIGZvbnQtd2VpZ2h0PSJub3JtYWwiIGZpbGw9IiNmZmZmZmYiPgogICAgICAgICAgICA8dHNwYW4geD0iMjExIiB5PSI2MzQiPjEwPC90c3Bhbj4KICAgICAgICA8L3RleHQ+CiAgICA8L2c+Cjwvc3ZnPg==")}chimee-center-state.forward span{background-image:url("data:image/svg+xml;base64,Cjxzdmcgd2lkdGg9IjczMXB4IiBoZWlnaHQ9Ijg4NHB4IiB2aWV3Qm94PSIwIDAgNzMxIDg4NCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDwhLS0gR2VuZXJhdG9yOiBTa2V0Y2ggNDQuMSAoNDE0NTUpIC0gaHR0cDovL3d3dy5ib2hlbWlhbmNvZGluZy5jb20vc2tldGNoIC0tPgogICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+CiAgICA8ZGVmcz48L2RlZnM+CiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9IiNmZmZmZmYiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyBpZD0iNzcxLeWNlee6v++8jOWIt+aWsCIgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSIjZmZmZmZmIj4KICAgICAgICAgICAgPHBhdGggZD0iTTcwNS4xMTg1NTgsNDkyLjQxNDIwMyBDNjkwLjk4OTc2OSw0OTIuNDE0MjAzIDY3OS41MzU5MDMsNTAzLjg2ODA2OSA2NzkuNTM1OTAzLDUxNy45OTY4NTggQzY3OS41MzU5MDMsNjkxLjA2MDQ0OSA1MzguNzM3MTU3LDgzMS44NTkxOTUgMzY1LjY3MzU2Niw4MzEuODU5MTk1IEMxOTIuNjA4OTUyLDgzMS44NTkxOTUgNTEuODEyMjUyLDY5MS4wNjA0NDkgNTEuODEyMjUyLDUxNy45OTY4NTggQzUxLjgxMjI1MiwzNTUuMDM4NDE2IDE3Ni42NTI1MzgsMjIwLjcwNjk2NSAzMzUuNzE0MjMsMjA1LjU3MzI4OSBMMjIzLjYwMDgwMywzMTcuNjg2NzE2IEMyMTMuNjEwMjY1LDMyNy42NzcyNTQgMjEzLjYxMDI2NSwzNDMuODc1MTY4IDIyMy42MDA4MDMsMzUzLjg2NTcwNyBDMjI4LjU5NjU4NCwzNTguODYwNDY1IDIzNS4xNDM2OTcsMzYxLjM1ODM1NSAyNDEuNjkwODEsMzYxLjM1ODM1NSBDMjQ4LjIzNzkyMywzNjEuMzU4MzU1IDI1NC43ODUwMzYsMzU4Ljg2MDQ2NSAyNTkuNzgwODE3LDM1My44NjU3MDcgTDQxNC43MzcwMDUsMTk4LjkwOTUxOSBDNDI0LjcyNzU0MywxODguOTE4OTgxIDQyNC43Mjc1NDMsMTcyLjcyMTA2NyA0MTQuNzM3MDA1LDE2Mi43MzA1MjggTDI1OS43Nzk3OTMsNy43NzQzNDEgQzI0OS43ODgyMzEsLTIuMjE2MTk3IDIzMy41OTEzNDEsLTIuMjE2MTk3IDIyMy42MDA4MDIsNy43NzQzNDEgQzIxMy42MTAyNjQsMTcuNzY0ODc5IDIxMy42MTAyNjQsMzMuOTYyNzkzIDIyMy42MDA4MDIsNDMuOTUzMzMyIEwzMzMuOTkwOTgxLDE1NC4zNDM1MTEgQzI5NS45MDE0NzgsMTU3LjYwMjc0MSAyNTguODgyMzUzLDE2Ni43MzM3MDIgMjIzLjU4MTM1OSwxODEuNjY0NzYzIEMxODAuMTExMzEyLDIwMC4wNTE1MjkgMTQxLjA3NjI3MywyMjYuMzY3ODk0IDEwNy41NjA5NDksMjU5Ljg4MzIxOSBDNzQuMDQ1NjI1LDI5My4zOTg1NDQgNDcuNzI5MjU5LDMzMi40MzI1NTkgMjkuMzQyNDkzLDM3NS45MDM2MjkgQzEwLjMwMTgzNSw0MjAuOTIxOTM5IDAuNjQ2OTQxLDQ2OC43Mjk3ODEgMC42NDY5NDEsNTE3Ljk5NTgzNCBDMC42NDY5NDEsNTY3LjI2MzkzNCAxMC4zMDE4MzUsNjE1LjA2OTczIDI5LjM0MjQ5Myw2NjAuMDg5MDYzIEM0Ny43MjkyNTksNzAzLjU1ODA4NyA3NC4wNDU2MjQsNzQyLjU5NDE0OSAxMDcuNTYwOTQ5LDc3Ni4xMDk0NzMgQzE0MS4wNzYyNzQsODA5LjYyNDc5NyAxODAuMTEwMjg5LDgzNS45NDExNjMgMjIzLjU4MTM1OSw4NTQuMzI2OTA2IEMyNjguNTk5NjY5LDg3My4zNjg1ODggMzE2LjQwNjQ4OCw4ODMuMDIzNDgyIDM2NS42NzM1NjQsODgzLjAyMzQ4MiBDNDE0Ljk0MTY2NCw4ODMuMDIzNDgyIDQ2Mi43NDc0Niw4NzMuMzY4NTg4IDUwNy43NjY3OTMsODU0LjMyNjkwNiBDNTUxLjIzNTgxNyw4MzUuOTQxMTY0IDU5MC4yNzE4NzksODA5LjYyNDc5OCA2MjMuNzg3MjAzLDc3Ni4xMDk0NzMgQzY1Ny4zMDI1MjcsNzQyLjU5NDE0OCA2ODMuNjE4ODkzLDcwMy41NTkxMSA3MDIuMDA0NjM2LDY2MC4wODkwNjMgQzcyMS4wNDYzMTgsNjE1LjA2OTczIDczMC43MDEyMTIsNTY3LjI2MjkxMSA3MzAuNzAxMjEyLDUxNy45OTU4MzQgQzczMC43MDEyMTMsNTAzLjg2ODA2OSA3MTkuMjQ4MzcsNDkyLjQxNDIwMyA3MDUuMTE4NTU4LDQ5Mi40MTQyMDMgWiIgaWQ9IlNoYXBlIj48L3BhdGg+CiAgICAgICAgPC9nPgogICAgICAgIDx0ZXh0IGlkPSIxMCIgZm9udC1mYW1pbHk9IkhlbHZldGljYSIgZm9udC1zaXplPSIyODgiIGZvbnQtd2VpZ2h0PSJub3JtYWwiIGZpbGw9IiNmZmZmZmYiPgogICAgICAgICAgICA8dHNwYW4geD0iMjExIiB5PSI2MzQiPjEwPC90c3Bhbj4KICAgICAgICA8L3RleHQ+CiAgICA8L2c+Cjwvc3ZnPg==")}chimee-center-state.volume-high span{background-image:url("data:image/svg+xml;base64,Cjxzdmcgd2lkdGg9IjEwN3B4IiBoZWlnaHQ9IjEwMXB4IiB2aWV3Qm94PSIwIDAgMTA3IDEwMSIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDwhLS0gR2VuZXJhdG9yOiBTa2V0Y2ggNDQuMSAoNDE0NTUpIC0gaHR0cDovL3d3dy5ib2hlbWlhbmNvZGluZy5jb20vc2tldGNoIC0tPgogICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+CiAgICA8ZGVmcz48L2RlZnM+CiAgICA8ZyBpZD0iR3JvdXAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEuMDAwMDAwLCAwLjAwMDAwMCkiIHN0cm9rZT0iI0ZGRkZGRiI+CiAgICAgICAgPHBvbHlnb24gaWQ9IlBhdGgiIGZpbGw9IiNmZmZmZmYiIHBvaW50cz0iMC40MDczMTY0NDYgMzAgMjcuNjUwMDc3OSAzMCA1Ny4zNzM3MjkzIDIuODQyMTcwOTRlLTE0IDU4LjQ3NjI1MzIgMTAwIDI3LjY1MDA3NzkgNzAgMC40MDczMTY0NDYgNzAiPjwvcG9seWdvbj4KICAgICAgICA8cGF0aCBkPSJNNjMuNjExNjUwNSw1LjAwOTc1MjM5IEM2OS43MDc5Mjc1LDQuNzg2MTIwNTcgNzYuNjU0OTI1MSw4LjQwODU2MTQ2IDg0LjQ1MjY0MzEsMTUuODc3MDc1IEM5Ni4xNDkyMjAxLDI3LjA3OTg0NTQgMTAwLjk3MDg3NCwzNC43OTc1MTI1IDEwMC45NzA4NzQsNTAuOTYwODU1OCBDMTAwLjk3MDg3NCw2Ny4xMjQxOTkxIDk2LjI4ODcyMjUsNzMuNzkwNzQ4MiA4NC40NTI2NDMxLDgzLjgzMDY3MjQgQzc2LjU2MTkyMzQsOTAuNTIzOTU1MiA2OS42MTQ5MjU5LDk0LjAzMjA2NDQgNjMuNjExNjUwNSw5NC4zNTUiIGlkPSLlpJbnjq8iIHN0cm9rZS13aWR0aD0iMTAiPjwvcGF0aD4KICAgICAgICA8cGF0aCBkPSJNNjUuODUwNTY5OSwyOS40OTI5MTk1IEM2OC41MzY5NDM0LDI5LjM5MzExNjkgNzEuNTk4MTkzOCwzMS4wMDk3NDE2IDc1LjAzNDMyMSwzNC4zNDI3OTM0IEM4MC4xODg1MTE4LDM5LjM0MjM3MTIgODIuMzEzMjEyMyw0Mi43ODY2MTU0IDgyLjMxMzIxMjMsNTAgQzgyLjMxMzIxMjMsNTcuMjEzMzg0NiA4MC4yNDk5ODQ3LDYwLjE4ODUzNTQgNzUuMDM0MzIxLDY0LjY2OTE1NzYgQzcxLjU1NzIxMTksNjcuNjU2MjM5IDY4LjQ5NTk2MTUsNjkuMjIxODM5NyA2NS44NTA1Njk5LDY5LjM2NTk1OTUiIGlkPSLlhoXnjq8iIHN0cm9rZS13aWR0aD0iMTAiPjwvcGF0aD4KICAgIDwvZz4KPC9zdmc+")}chimee-center-state.volume-low span{background-image:url("data:image/svg+xml;base64,Cjxzdmcgd2lkdGg9Ijg5cHgiIGhlaWdodD0iMTAxcHgiIHZpZXdCb3g9IjAgMCA4OSAxMDEiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDQ0LjEgKDQxNDU1KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+PC9kZWZzPgogICAgPGcgaWQ9Ikdyb3VwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxLjAwMDAwMCwgMC4wMDAwMDApIiBzdHJva2U9IiNGRkZGRkYiPgogICAgICAgIDxwb2x5Z29uIGlkPSJQYXRoIiBmaWxsPSIjZmZmZmZmIiBwb2ludHM9IjAuNDA3MzE2NDQ2IDMwIDI3LjY1MDA3NzkgMzAgNTcuMzczNzI5MyAyLjg0MjE3MDk0ZS0xNCA1OC40NzYyNTMyIDEwMCAyNy42NTAwNzc5IDcwIDAuNDA3MzE2NDQ2IDcwIj48L3BvbHlnb24+CiAgICAgICAgPHBhdGggZD0iTTY1Ljg1MDU2OTksMjkuNDkyOTE5NSBDNjguNTM2OTQzNCwyOS4zOTMxMTY5IDcxLjU5ODE5MzgsMzEuMDA5NzQxNiA3NS4wMzQzMjEsMzQuMzQyNzkzNCBDODAuMTg4NTExOCwzOS4zNDIzNzEyIDgyLjMxMzIxMjMsNDIuNzg2NjE1NCA4Mi4zMTMyMTIzLDUwIEM4Mi4zMTMyMTIzLDU3LjIxMzM4NDYgODAuMjQ5OTg0Nyw2MC4xODg1MzU0IDc1LjAzNDMyMSw2NC42NjkxNTc2IEM3MS41NTcyMTE5LDY3LjY1NjIzOSA2OC40OTU5NjE1LDY5LjIyMTgzOTcgNjUuODUwNTY5OSw2OS4zNjU5NTk1IiBpZD0i5YaF546vIiBzdHJva2Utd2lkdGg9IjEwIj48L3BhdGg+CiAgICA8L2c+Cjwvc3ZnPg==")}chimee-center-state-tip span{display:inline-block;width:24px;height:24px;margin:14px;background-origin:content-box;background-size:auto 100%;background-repeat:no-repeat;background-position:50%;box-sizing:initial}chimee-center-state.play span{background-position:110% 50%}chimee-center-state-loading{width:52px;height:52px;padding:26px;background-image:url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nMTIwcHgnIGhlaWdodD0nMTIwcHgnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIiBjbGFzcz0idWlsLWRlZmF1bHQiPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIiBmaWxsPSJub25lIiBjbGFzcz0iYmsiPjwvcmVjdD48cmVjdCAgeD0nNDcnIHk9JzQwJyB3aWR0aD0nNicgaGVpZ2h0PScyMCcgcng9JzUnIHJ5PSc1JyBmaWxsPScjZmZmZmZmJyB0cmFuc2Zvcm09J3JvdGF0ZSgwIDUwIDUwKSB0cmFuc2xhdGUoMCAtMzApJz4gIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9J29wYWNpdHknIGZyb209JzEnIHRvPScwJyBkdXI9JzFzJyBiZWdpbj0nLTFzJyByZXBlYXRDb3VudD0naW5kZWZpbml0ZScvPjwvcmVjdD48cmVjdCAgeD0nNDcnIHk9JzQwJyB3aWR0aD0nNicgaGVpZ2h0PScyMCcgcng9JzUnIHJ5PSc1JyBmaWxsPScjZmZmZmZmJyB0cmFuc2Zvcm09J3JvdGF0ZSgzMCA1MCA1MCkgdHJhbnNsYXRlKDAgLTMwKSc+ICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSdvcGFjaXR5JyBmcm9tPScxJyB0bz0nMCcgZHVyPScxcycgYmVnaW49Jy0wLjkxNjY2NjY2NjY2NjY2NjZzJyByZXBlYXRDb3VudD0naW5kZWZpbml0ZScvPjwvcmVjdD48cmVjdCAgeD0nNDcnIHk9JzQwJyB3aWR0aD0nNicgaGVpZ2h0PScyMCcgcng9JzUnIHJ5PSc1JyBmaWxsPScjZmZmZmZmJyB0cmFuc2Zvcm09J3JvdGF0ZSg2MCA1MCA1MCkgdHJhbnNsYXRlKDAgLTMwKSc+ICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSdvcGFjaXR5JyBmcm9tPScxJyB0bz0nMCcgZHVyPScxcycgYmVnaW49Jy0wLjgzMzMzMzMzMzMzMzMzMzRzJyByZXBlYXRDb3VudD0naW5kZWZpbml0ZScvPjwvcmVjdD48cmVjdCAgeD0nNDcnIHk9JzQwJyB3aWR0aD0nNicgaGVpZ2h0PScyMCcgcng9JzUnIHJ5PSc1JyBmaWxsPScjZmZmZmZmJyB0cmFuc2Zvcm09J3JvdGF0ZSg5MCA1MCA1MCkgdHJhbnNsYXRlKDAgLTMwKSc+ICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSdvcGFjaXR5JyBmcm9tPScxJyB0bz0nMCcgZHVyPScxcycgYmVnaW49Jy0wLjc1cycgcmVwZWF0Q291bnQ9J2luZGVmaW5pdGUnLz48L3JlY3Q+PHJlY3QgIHg9JzQ3JyB5PSc0MCcgd2lkdGg9JzYnIGhlaWdodD0nMjAnIHJ4PSc1JyByeT0nNScgZmlsbD0nI2ZmZmZmZicgdHJhbnNmb3JtPSdyb3RhdGUoMTIwIDUwIDUwKSB0cmFuc2xhdGUoMCAtMzApJz4gIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9J29wYWNpdHknIGZyb209JzEnIHRvPScwJyBkdXI9JzFzJyBiZWdpbj0nLTAuNjY2NjY2NjY2NjY2NjY2NnMnIHJlcGVhdENvdW50PSdpbmRlZmluaXRlJy8+PC9yZWN0PjxyZWN0ICB4PSc0NycgeT0nNDAnIHdpZHRoPSc2JyBoZWlnaHQ9JzIwJyByeD0nNScgcnk9JzUnIGZpbGw9JyNmZmZmZmYnIHRyYW5zZm9ybT0ncm90YXRlKDE1MCA1MCA1MCkgdHJhbnNsYXRlKDAgLTMwKSc+ICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSdvcGFjaXR5JyBmcm9tPScxJyB0bz0nMCcgZHVyPScxcycgYmVnaW49Jy0wLjU4MzMzMzMzMzMzMzMzMzRzJyByZXBlYXRDb3VudD0naW5kZWZpbml0ZScvPjwvcmVjdD48cmVjdCAgeD0nNDcnIHk9JzQwJyB3aWR0aD0nNicgaGVpZ2h0PScyMCcgcng9JzUnIHJ5PSc1JyBmaWxsPScjZmZmZmZmJyB0cmFuc2Zvcm09J3JvdGF0ZSgxODAgNTAgNTApIHRyYW5zbGF0ZSgwIC0zMCknPiAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0nb3BhY2l0eScgZnJvbT0nMScgdG89JzAnIGR1cj0nMXMnIGJlZ2luPSctMC41cycgcmVwZWF0Q291bnQ9J2luZGVmaW5pdGUnLz48L3JlY3Q+PHJlY3QgIHg9JzQ3JyB5PSc0MCcgd2lkdGg9JzYnIGhlaWdodD0nMjAnIHJ4PSc1JyByeT0nNScgZmlsbD0nI2ZmZmZmZicgdHJhbnNmb3JtPSdyb3RhdGUoMjEwIDUwIDUwKSB0cmFuc2xhdGUoMCAtMzApJz4gIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9J29wYWNpdHknIGZyb209JzEnIHRvPScwJyBkdXI9JzFzJyBiZWdpbj0nLTAuNDE2NjY2NjY2NjY2NjY2N3MnIHJlcGVhdENvdW50PSdpbmRlZmluaXRlJy8+PC9yZWN0PjxyZWN0ICB4PSc0NycgeT0nNDAnIHdpZHRoPSc2JyBoZWlnaHQ9JzIwJyByeD0nNScgcnk9JzUnIGZpbGw9JyNmZmZmZmYnIHRyYW5zZm9ybT0ncm90YXRlKDI0MCA1MCA1MCkgdHJhbnNsYXRlKDAgLTMwKSc+ICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSdvcGFjaXR5JyBmcm9tPScxJyB0bz0nMCcgZHVyPScxcycgYmVnaW49Jy0wLjMzMzMzMzMzMzMzMzMzMzNzJyByZXBlYXRDb3VudD0naW5kZWZpbml0ZScvPjwvcmVjdD48cmVjdCAgeD0nNDcnIHk9JzQwJyB3aWR0aD0nNicgaGVpZ2h0PScyMCcgcng9JzUnIHJ5PSc1JyBmaWxsPScjZmZmZmZmJyB0cmFuc2Zvcm09J3JvdGF0ZSgyNzAgNTAgNTApIHRyYW5zbGF0ZSgwIC0zMCknPiAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0nb3BhY2l0eScgZnJvbT0nMScgdG89JzAnIGR1cj0nMXMnIGJlZ2luPSctMC4yNXMnIHJlcGVhdENvdW50PSdpbmRlZmluaXRlJy8+PC9yZWN0PjxyZWN0ICB4PSc0NycgeT0nNDAnIHdpZHRoPSc2JyBoZWlnaHQ9JzIwJyByeD0nNScgcnk9JzUnIGZpbGw9JyNmZmZmZmYnIHRyYW5zZm9ybT0ncm90YXRlKDMwMCA1MCA1MCkgdHJhbnNsYXRlKDAgLTMwKSc+ICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSdvcGFjaXR5JyBmcm9tPScxJyB0bz0nMCcgZHVyPScxcycgYmVnaW49Jy0wLjE2NjY2NjY2NjY2NjY2NjY2cycgcmVwZWF0Q291bnQ9J2luZGVmaW5pdGUnLz48L3JlY3Q+PHJlY3QgIHg9JzQ3JyB5PSc0MCcgd2lkdGg9JzYnIGhlaWdodD0nMjAnIHJ4PSc1JyByeT0nNScgZmlsbD0nI2ZmZmZmZicgdHJhbnNmb3JtPSdyb3RhdGUoMzMwIDUwIDUwKSB0cmFuc2xhdGUoMCAtMzApJz4gIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9J29wYWNpdHknIGZyb209JzEnIHRvPScwJyBkdXI9JzFzJyBiZWdpbj0nLTAuMDgzMzMzMzMzMzMzMzMzMzNzJyByZXBlYXRDb3VudD0naW5kZWZpbml0ZScvPjwvcmVjdD48L3N2Zz4=");background-origin:content-box;background-size:auto 100%;background-repeat:no-repeat;background-position:50%}chimee-center-state-error{display:none;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:180px;font-size:16px;z-index:1;color:#ffcf00;text-shadow:0 0 3px red;font-weight:100}',void 0);var Dm=Om({name:"chimeeCenterState",tagName:"chimee-center-state",html:"\n    <chimee-center-state-correct>\n      <chimee-center-state-loading></chimee-center-state-loading>\n      <chimee-center-state-tip>\n        <span></span>\n      </chimee-center-state-tip>\n    </chimee-center-state-correct>\n    <chimee-center-state-error>加载失败，请刷新重试</chimee-center-state-error>\n  ",offset:"50%",hide:!1,create:function(){},inited:function(){this.src&&this.showLoading(!0)},penetrate:!0,operable:!1,destroy:function(){this.clearTimeout()},events:{pause:function(){this.showTip("pause"),this.showLoading(!1)},play:function(){this.showTip("play")},canplay:function(){this.playing()},playing:function(){this.playing()},loadstart:function(){this.waiting("loadstart")},waiting:function(){this.waiting()},timeupdate:function(){this.clearTimeout()},keydown:function(e){if(this.$videoConfig.plugin.some(function(e){return"chimeeControl"===(e.name||e)}))switch(e.stopPropagation(),e.keyCode){case 37:e.preventDefault(),!this.live&&this.showTip("back");break;case 39:e.preventDefault(),!this.live&&this.showTip("forward");break;case 38:e.preventDefault(),this.showTip("volume-high");break;case 40:e.preventDefault(),this.showTip("volume-low")}}},methods:{playing:function(){this.clearTimeout(),this.showLoading(!1),this.showError(!1)},waiting:function(e){var t=this;this.clearTimeout(),this._timeout=setTimeout(function(){return t.showError()},3e4),("loadstart"===e||!this.paused)&&this.showLoading()},clearTimeout:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){this._timeout&&(clearTimeout(this._timeout),this._timeout=null)}),showTip:function(e){var t=this;this.$domWrap.removeClass("correct tip play pause back forward volume-high volume-low").addClass("correct tip "+e),setTimeout(function(){t.$domWrap.removeClass("tip "+e)},500)},showLoading:function(e){!1===e?this.$domWrap.removeClass("loading"):this.$domWrap.addClass("correct loading")},showError:function(e){!1===e?this.$domWrap.removeClass("error"):(this.$domWrap[0].className="",this.$domWrap.addClass("error"))}}});!function(e,t){if("undefined"==typeof document)return t;e=e||"";var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e)),n.appendChild(r)}("chimee-popup{position:absolute;color:#fff;background-color:rgba(88,88,88,.5);font-size:13px;font-family:sans-serif;border:1px solid hsla(0,0%,100%,.08);padding:3px}chimee-popup cm-pp-close{float:right;color:#fff;text-decoration:none;line-height:14px;text-shadow:0 0 1px #000;font-size:15px;padding:0 3px;cursor:pointer;opacity:.8}chimee-popup cm-pp-close:hover{opacity:1}chimee-popup cm-pp-body,chimee-popup cm-pp-head{display:block;padding:3px 3px 6px}chimee-popup cm-pp-head{font-weight:700;border-bottom:1px solid hsla(0,0%,100%,.18);padding:0 5px 4px;margin-bottom:5px}chimee-popup cm-pp-body{font-size:12px}",void 0);var Im=function(){function e(){Xr(this,e)}return ca(e,null,[{key:"error",value:function(t,n){e.ENABLE_ERROR&&(console.error||console.warn||console.log)(Wn(t,n))}},{key:"info",value:function(t,n){e.ENABLE_INFO&&(console.info||console.log)(Wn(t,n))}},{key:"warn",value:function(t,n){e.ENABLE_WARN&&(console.warn||console.log)(Wn(t,n))}},{key:"debug",value:function(t,n){e.ENABLE_DEBUG&&(console.debug||console.log)(Wn(t,n))}},{key:"verbose",value:function(t,n){e.ENABLE_VERBOSE&&console.log(Wn(t,n))}}]),e}();Im.GLOBAL_TAG="chimee",Im.FORCE_GLOBAL_TAG=!1,Im.ENABLE_ERROR=!0,Im.ENABLE_INFO=!0,Im.ENABLE_WARN=!0,Im.ENABLE_DEBUG=!0,Im.ENABLE_VERBOSE=!0;var Rm="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Nm=(function(e,t){t={exports:{}},e(t,t.exports),t.exports}(function(e,t){!function(n,r){var i="model",o="name",a="type",s="vendor",u="version",l="mobile",c="tablet",f={extend:function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},has:function(e,t){return"string"==typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return"string"==typeof e?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},d={rgx:function(e,t){for(var n,r,i,o,a,s,u=0;u<t.length&&!a;){var l=t[u],c=t[u+1];for(n=r=0;n<l.length&&!a;)if(a=l[n++].exec(e))for(i=0;i<c.length;i++)s=a[++r],"object"==typeof(o=c[i])&&o.length>0?2==o.length?"function"==typeof o[1]?this[o[0]]=o[1].call(this,s):this[o[0]]=o[1]:3==o.length?"function"!=typeof o[1]||o[1].exec&&o[1].test?this[o[0]]=s?s.replace(o[1],o[2]):void 0:this[o[0]]=s?o[1].call(this,s,o[2]):void 0:4==o.length&&(this[o[0]]=s?o[3].call(this,s.replace(o[1],o[2])):void 0):this[o]=s||void 0;u+=2}},str:function(e,t){for(var n in t)if("object"==typeof t[n]&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(f.has(t[n][r],e))return"?"===n?void 0:n}else if(f.has(t[n],e))return"?"===n?void 0:n;return e}},h={browser:{oldsafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{amazon:{model:{"Fire Phone":["SD","KF"]}},sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2000:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}},p={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[o,u],[/(opios)[\/\s]+([\w\.]+)/i],[[o,"Opera Mini"],u],[/\s(opr)\/([\w\.]+)/i],[[o,"Opera"],u],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]+)*/i,/(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?([\w\.]*)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]+)*/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser)\/([\w\.-]+)/i],[o,u],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[o,"IE"],u],[/(edge)\/((\d+)?[\w\.]+)/i],[o,u],[/(yabrowser)\/([\w\.]+)/i],[[o,"Yandex"],u],[/(puffin)\/([\w\.]+)/i],[[o,"Puffin"],u],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[o,"UCBrowser"],u],[/(comodo_dragon)\/([\w\.]+)/i],[[o,/_/g," "],u],[/(micromessenger)\/([\w\.]+)/i],[[o,"WeChat"],u],[/(QQ)\/([\d\.]+)/i],[o,u],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[o,u],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[u,[o,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[u,[o,"Facebook"]],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[u,[o,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[o,/(.+)/,"$1 WebView"],u],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[o,/(.+(?:g|us))(.+)/,"$1 $2"],u],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[u,[o,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[o,u],[/(dolfin)\/([\w\.]+)/i],[[o,"Dolphin"],u],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[o,"Chrome"],u],[/(coast)\/([\w\.]+)/i],[[o,"Opera Coast"],u],[/fxios\/([\w\.-]+)/i],[u,[o,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[u,[o,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[u,o],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[o,"GSA"],u],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[o,[u,d.str,h.browser.oldsafari.version]],[/(konqueror)\/([\w\.]+)/i,/(webkit|khtml)\/([\w\.]+)/i],[o,u],[/(navigator|netscape)\/([\w\.-]+)/i],[[o,"Netscape"],u],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix)\/([\w\.-]+)/i,/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]+)*/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[o,u]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",f.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/windows\s(ce|mobile);\sppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[["architecture",/ower/,"",f.lowerize]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+;))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[["architecture",f.lowerize]]],device:[[/\((ipad|playbook);[\w\s\);-]+(rim|apple)/i],[i,s,[a,c]],[/applecoremedia\/[\w\.]+ \((ipad)/],[i,[s,"Apple"],[a,c]],[/(apple\s{0,1}tv)/i],[[i,"Apple TV"],[s,"Apple"]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[s,i,[a,c]],[/(kf[A-z]+)\sbuild\/[\w\.]+.*silk\//i],[i,[s,"Amazon"],[a,c]],[/(sd|kf)[0349hijorstuw]+\sbuild\/[\w\.]+.*silk\//i],[[i,d.str,h.device.amazon.model],[s,"Amazon"],[a,l]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[i,s,[a,l]],[/\((ip[honed|\s\w*]+);/i],[i,[s,"Apple"],[a,l]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]+)*/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[s,i,[a,l]],[/\(bb10;\s(\w+)/i],[i,[s,"BlackBerry"],[a,l]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone)/i],[i,[s,"Asus"],[a,c]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[s,"Sony"],[i,"Xperia Tablet"],[a,c]],[/android.+\s([c-g]\d{4}|so[-l]\w+)\sbuild\//i],[i,[s,"Sony"],[a,l]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[s,i,[a,"console"]],[/android.+;\s(shield)\sbuild/i],[i,[s,"Nvidia"],[a,"console"]],[/(playstation\s[34portablevi]+)/i],[i,[s,"Sony"],[a,"console"]],[/(sprint\s(\w+))/i],[[s,d.str,h.device.sprint.vendor],[i,d.str,h.device.sprint.model],[a,l]],[/(lenovo)\s?(S(?:5000|6000)+(?:[-][\w+]))/i],[s,i,[a,c]],[/(htc)[;_\s-]+([\w\s]+(?=\))|\w+)*/i,/(zte)-(\w+)*/i,/(alcatel|geeksphone|lenovo|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]+)*/i],[s,[i,/_/g," "],[a,l]],[/(nexus\s9)/i],[i,[s,"HTC"],[a,c]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p)/i],[i,[s,"Huawei"],[a,l]],[/(microsoft);\s(lumia[\s\w]+)/i],[s,i,[a,l]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[i,[s,"Microsoft"],[a,"console"]],[/(kin\.[onetw]{3})/i],[[i,/\./g," "],[s,"Microsoft"],[a,l]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?(:?\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w+)*/i,/(XT\d{3,4}) build\//i,/(nexus\s6)/i],[i,[s,"Motorola"],[a,l]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[i,[s,"Motorola"],[a,c]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[s,f.trim],[i,f.trim],[a,"smarttv"]],[/hbbtv.+maple;(\d+)/i],[[i,/^/,"SmartTV"],[s,"Samsung"],[a,"smarttv"]],[/\(dtv[\);].+(aquos)/i],[i,[s,"Sharp"],[a,"smarttv"]],[/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[s,"Samsung"],i,[a,c]],[/smart-tv.+(samsung)/i],[s,[a,"smarttv"],i],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)*/i,/sec-((sgh\w+))/i],[[s,"Samsung"],i,[a,l]],[/sie-(\w+)*/i],[i,[s,"Siemens"],[a,l]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]+)*/i],[[s,"Nokia"],i,[a,l]],[/android\s3\.[\s\w;-]{10}(a\d{3})/i],[i,[s,"Acer"],[a,c]],[/android.+([vl]k\-?\d{3})\s+build/i],[i,[s,"LG"],[a,c]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[s,"LG"],i,[a,c]],[/(lg) netcast\.tv/i],[s,i,[a,"smarttv"]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w+)*/i,/android.+lg(\-?[\d\w]+)\s+build/i],[i,[s,"LG"],[a,l]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[i,[s,"Lenovo"],[a,c]],[/linux;.+((jolla));/i],[s,i,[a,l]],[/((pebble))app\/[\d\.]+\s/i],[s,i,[a,"wearable"]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[s,i,[a,l]],[/crkey/i],[[i,"Chromecast"],[s,"Google"]],[/android.+;\s(glass)\s\d/i],[i,[s,"Google"],[a,"wearable"]],[/android.+;\s(pixel c)\s/i],[i,[s,"Google"],[a,c]],[/android.+;\s(pixel xl|pixel)\s/i],[i,[s,"Google"],[a,l]],[/android.+(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i,/android.+(mi[\s\-_]*(?:one|one[\s_]plus|note lte)?[\s_]*(?:\d\w)?)\s+build/i,/android.+(redmi[\s\-_]*(?:note)?(?:[\s_]*[\w\s]+)?)\s+build/i],[[i,/_/g," "],[s,"Xiaomi"],[a,l]],[/android.+(mi[\s\-_]*(?:pad)?(?:[\s_]*[\w\s]+)?)\s+build/i],[[i,/_/g," "],[s,"Xiaomi"],[a,c]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[i,[s,"Meizu"],[a,c]],[/android.+a000(1)\s+build/i],[i,[s,"OnePlus"],[a,l]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[i,[s,"RCA"],[a,c]],[/android.+[;\/]\s*(Venue[\d\s]*)\s+build/i],[i,[s,"Dell"],[a,c]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[i,[s,"Verizon"],[a,c]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[s,"Barnes & Noble"],i,[a,c]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[i,[s,"NuVision"],[a,c]],[/android.+[;\/]\s*(zte)?.+(k\d{2})\s+build/i],[[s,"ZTE"],i,[a,c]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[i,[s,"Swiss"],[a,l]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[i,[s,"Swiss"],[a,c]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[i,[s,"Zeki"],[a,c]],[/(android).+[;\/]\s+([YR]\d{2}x?.*)\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(.+)\s+build/i],[[s,"Dragon Touch"],i,[a,c]],[/android.+[;\/]\s*(NS-?.+)\s+build/i],[i,[s,"Insignia"],[a,c]],[/android.+[;\/]\s*((NX|Next)-?.+)\s+build/i],[i,[s,"NextBook"],[a,c]],[/android.+[;\/]\s*(Xtreme\_?)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[s,"Voice"],i,[a,l]],[/android.+[;\/]\s*(LVTEL\-?)?(V1[12])\s+build/i],[[s,"LvTel"],i,[a,l]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[i,[s,"Envizen"],[a,c]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(.*\b)\s+build/i],[s,i,[a,c]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[i,[s,"MachSpeed"],[a,c]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[s,i,[a,c]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[i,[s,"Rotor"],[a,c]],[/android.+(KS(.+))\s+build/i],[i,[s,"Amazon"],[a,c]],[/android.+(Gigaset)[\s\-]+(Q.+)\s+build/i],[s,i,[a,c]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[a,f.lowerize],s,i],[/(android.+)[;\/].+build/i],[i,[s,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[u,[o,"EdgeHTML"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[o,u],[/rv\:([\w\.]+).*(gecko)/i],[u,o]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[o,u],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s]+\w)*/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[o,[u,d.str,h.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[o,"Windows"],[u,d.str,h.os.windows.version]],[/\((bb)(10);/i],[[o,"BlackBerry"],u],[/(blackberry)\w*\/?([\w\.]+)*/i,/(tizen)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|contiki)[\/\s-]?([\w\.]+)*/i,/linux;.+(sailfish);/i],[o,u],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]+)*/i],[[o,"Symbian"],u],[/\((series40);/i],[o],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[o,"Firefox OS"],u],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w+)*/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]+)*/i,/(hurd|linux)\s?([\w\.]+)*/i,/(gnu)\s?([\w\.]+)*/i],[o,u],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[o,"Chromium OS"],u],[/(sunos)\s?([\w\.]+\d)*/i],[[o,"Solaris"],u],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]+)*/i],[o,u],[/(haiku)\s(\w+)/i],[o,u],[/cfnetwork\/.+darwin/i,/ip[honead]+(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[u,/_/g,"."],[o,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]+\w)*/i,/(macintosh|mac(?=_powerpc)\s)/i],[[o,"Mac OS"],[u,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]+)*/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.]*)*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms)/i,/(unix)\s?([\w\.]+)*/i],[o,u]]},v=function(e,t){if("object"==typeof e&&(t=e,e=void 0),!(this instanceof v))return new v(e,t).getResult();var r=e||(n&&n.navigator&&n.navigator.userAgent?n.navigator.userAgent:""),i=t?f.extend(p,t):p;return this.getBrowser=function(){var e={name:void 0,version:void 0};return d.rgx.call(e,r,i.browser),e.major=f.major(e.version),e},this.getCPU=function(){var e={architecture:void 0};return d.rgx.call(e,r,i.cpu),e},this.getDevice=function(){var e={vendor:void 0,model:void 0,type:void 0};return d.rgx.call(e,r,i.device),e},this.getEngine=function(){var e={name:void 0,version:void 0};return d.rgx.call(e,r,i.engine),e},this.getOS=function(){var e={name:void 0,version:void 0};return d.rgx.call(e,r,i.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(e){return r=e,this},this};v.VERSION="0.7.17",v.BROWSER={NAME:o,MAJOR:"major",VERSION:u},v.CPU={ARCHITECTURE:"architecture"},v.DEVICE={MODEL:i,VENDOR:s,TYPE:a,CONSOLE:"console",MOBILE:l,SMARTTV:"smarttv",TABLET:c,WEARABLE:"wearable",EMBEDDED:"embedded"},v.ENGINE={NAME:o,VERSION:u},v.OS={NAME:o,VERSION:u},e.exports&&(t=e.exports=v),t.UAParser=v;var m=n&&(n.jQuery||n.Zepto);if(void 0!==m){var g=new v;m.ua=g.getResult(),m.ua.get=function(){return g.getUA()},m.ua.set=function(e){g.setUA(e);var t=g.getResult();for(var n in t)m.ua[n]=t[n]}}}("object"==typeof window?window:Rm)}),"undefined"!=typeof window&&Object.prototype.toString.call(window),qo(null));Nm.count=0;!function(){function e(t,n){var r=this;if(Xr(this,e),Object.defineProperty(this,"__target",{writable:!0,enumerable:!1,configurable:!0}),this.__target=this,t){if("object"!==(void 0===t?"undefined":Ho(t)))throw new Error("CusEvent target are not object");this.__target=t,n&&["on","once","off","emit"].forEach(function(e){t[e]=r[e]})}}ca(e,[{key:"on",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Zn(this.__target,e,t,n),this}},{key:"once",value:function(e,t){return this.on(e,t,!0)}},{key:"off",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Yn(this.__target,e,t,n),this}},{key:"emit",value:function(e,t){return Vn(this.__target,e,{data:t}),this}}])}();var Cm=qo(null);Cm.count=0;(function(){function e(t,n){var r=this;if(Xr(this,e),Object.defineProperty(this,"__target",{writable:!0,enumerable:!1,configurable:!0}),this.__target=this,t){if("object"!==(void 0===t?"undefined":Ho(t)))throw new Error("CusEvent target are not object");this.__target=t,n&&["on","once","off","emit"].forEach(function(e){t[e]=r[e]})}}ca(e,[{key:"on",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Kn(this.__target,e,t,n),this}},{key:"once",value:function(e,t){return this.on(e,t,!0)}},{key:"off",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Qn(this.__target,e,t,n),this}},{key:"emit",value:function(e,t){return Jn(this.__target,e,{data:t}),this}}])})(),"undefined"!=typeof window&&Object.prototype.toString.call(window);var Pm=document.createElement("div"),jm="innerText";"textContent"in Pm&&(jm="textContent");var Fm=Array.prototype,Bm=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;Xr(this,e);var r=this;r.selector=t;var i=void 0;t&&t.constructor===NodeList?i=Xn(t):Bn(t)?i=t:Gn(t)?0===t.indexOf("<")?(Pm.innerHTML=t,i=cr("*",Pm,!0)):i=cr(t,n,!0):i=[t],Ca(r,i),r.length=i.length}return ca(e,[{key:"each",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Fm.forEach.apply(this,t),this}},{key:"push",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Fm.push.apply(this,t),this}},{key:"splice",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return hr(Fm.splice.apply(this,t))}},{key:"find",value:function(e){var t=[];this.each(function(n){t=t.concat(cr(e,n,!0))});var n=hr(t);return n.parent=this,n.selector=e,n}},{key:"append",value:function(e){var t=hr(e),n=this[0];return t.each(function(e){return n.appendChild(e)}),this}},{key:"appendTo",value:function(e){return hr(e).append(this),this}},{key:"text",value:function(e){return 0===arguments.length?this[0][jm]:this.each(function(t){t[jm]=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?qn(this[0],e):this.each(function(n){return er(n,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(n){(n.dataset||(n.dataset={}))[e]=t})}},{key:"css",value:function(e,t){return 1!==arguments.length||Un(e)?this.each(function(n){return lr(n,e,t)}):ur(this[0],e)}},{key:"addClass",value:function(e){return this.each(function(t){return tr(t,e)})}},{key:"removeClass",value:function(e){return this.each(function(t){return nr(t,e)})}},{key:"hasClass",value:function(e){return rr(this[0],e)}},{key:"on",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.each(function(i){return or(i,e,t,n,r)})}},{key:"off",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.each(function(i){return ir(i,e,t,n,r)})}},{key:"delegate",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.each(function(i){return ar(i,e,t,n,r)})}},{key:"undelegate",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.each(function(i){return sr(i,e,t,n,r)})}},{key:"remove",value:function(){return this.each(function(e){return fr(e)})}}]),e}();!function(e,t){if("undefined"==typeof document)return t;e=e||"";var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}("chimee-menu{position:absolute;color:#fff;background-color:rgba(37,37,37,.7);font-size:13px;font-family:sans-serif;border:1px solid hsla(0,0%,100%,.08);border-radius:2px;padding:2px;box-shadow:0 1px 4px rgba(0,0,0,.6)}chimee-menu ul{margin:0;padding:0;font-size:12px}chimee-menu li{cursor:pointer;padding:0 4px;line-height:24px;list-style:none;white-space:nowrap;margin:0;border:0;font-size:12px;font-weight:400}chimee-menu li:hover{background-color:hsla(0,0%,100%,.1)}chimee-menu li[disable]{opacity:.5;cursor:default}chimee-menu li a{color:#fff;text-decoration:none}chimee-menu li a:hover{color:#fff}",void 0);var zm=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.tagName,n=void 0===t?"chimee-popup":t,r=e.className,i=e.name,s=void 0===i?"popup":i,u=e.html,l=e.title,c=void 0===l?"这是一个信息框":l,f=e.body,d=void 0===f?"这里是信息内容":f,h=e.offsetAttr,p=void 0===h?"left top":h,v=e.offset,m=void 0===v?"50% 50%":v,g=e.translate,y=void 0===g?"":g,b=e.width,w=e.height,_=e.level,E=e.init,S=e.inited,k=e.data,T=e.create,A=e.beforeCreate,M=e.destroy,x=e.events,L=e.computed,O=e.methods,D=void 0===O?{}:O,I=e.penetrate,R=void 0!==I&&I,N=e.operable,C=void 0===N||N,P=e.hide,j=void 0!==P&&P,F=e.opened,B=e.closed,z=e.autoFocus,U={html:u||"\n      <cm-pp-close>×</cm-pp-close>\n      "+(!1!==c?"<cm-pp-head>"+c+"</cm-pp-head>":"")+"\n      "+(!1!==d?"<cm-pp-body>"+d+"</cm-pp-body>":"")+"\n    ",closeSelector:"._close"};return{name:s,el:n,className:r,beforeCreate:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.events,n=e.methods,r=arguments[1];a(r)&&(a(r.events)&&q(t,r.events),a(r.methods)&&q(n,r.methods)),A&&A.apply(this,arguments)},create:function(){var e=a(this.$config)?q(U,this.$config):U;(this.$domWrap=Fn(this.$dom).css("display","none")).html(e.html).delegate("cm-pp-close, "+e.closeSelector,"click",this.close),this.width(b).height(w).offset(m).translate(y),this._hide=j;for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];T&&T.apply(this,n),!this._hide&&this.open()},destroy:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];M&&M.apply(this,t),this.$domWrap.undelegate(this.$config.closeSelector,"click",this.close).remove()},level:_,init:E,inited:S,data:k,events:x,computed:L,penetrate:R,operable:C,autoFocus:z,methods:q({open:function(){if(this.destroyed)return this;this.$domWrap.css("display","block"),this._hide=!1;for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.$emit("popupOpen",t,this),o(F)&&F.apply(this,t),this},close:function(){if(this.destroyed)return this;this.$domWrap.css("display","none"),this._hide=!0;for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.$emit("popupClose",t,this),o(B)&&B.apply(this,t),this},width:function(e){return e&&this.$domWrap.css("width",e),this},height:function(e){return e&&this.$domWrap.css("height",e),this},offset:function(e){var t=(""+(e||"")).split(" "),n={};if(t.length>2)return["top","right","bottom","left"].forEach(function(e,r){t[r]&&"auto"!==t[r]&&(n[e]=t[r])}),this.$domWrap.css(n),this;var r=ka(t,2),i=r[0],o=r[1];if(""===i)return this;var a=o||i,s=p.split(" ");n[s[0]]=i,n[s[1]]=a,this.$domWrap.css(n);var u=[];return"50%"===i&&u.push("-50%"),"50%"===a&&u.push("-50%"),u.length>0&&this.translate(u.join(" ")),this},translate:function(e){var t=(""+(e||"")).split(" "),n=ka(t,2),r=n[0],i=n[1];return r&&this.$domWrap.css("transform","translate("+r+", "+(i||r)+")"),this}},D)}}({tagName:"chimee-menu",name:"chimeeContextmenu",html:"<ul></ul>",offset:"0",hide:!0,data:{baseMenus:[{text:"查看日志",action:"openLogPopup",hide:!0},{text:"Chimee {VERSION} &copy; 360",url:"http://chimee.org",disable:!0}]},create:function(){var e=this,t=this.$config,n=t.baseMenus,r=t.menus;Bn(n)&&(this.baseMenus=n),this.updatemenu(r),this.$domWrap.on("click",this.clickHandler),this.$plugins.chimeeLog&&this.switchLogMenu(!1),this._doc=new this.$domWrap.constructor(document),this._doc_click=function(t){return e.close()},this._doc.on("click",this._doc_click)},destroy:function(){this._doc.off("click",this._doc_click)},opened:function(){this.$bumpToTop()},events:{contextmenu:function(e){var t=e.offsetX,n=e.offsetY,r=this.$dom.parentElement;if(zn(r.getBoundingClientRect)){var i=r.getBoundingClientRect();t=e.pageX-i.left-(document.documentElement.scrollLeft||document.body.scrollLeft||0),n=e.pageY-i.top-(document.documentElement.scrollTop||document.body.scrollTop||0)}this.offset(t+"px "+n+"px").open(e),e.preventDefault()},logPluginDestroy:function(){this.switchLogMenu(!0)},logPluginCreate:function(){this.switchLogMenu(!1)}},methods:{switchLogMenu:function(e){var t=this.baseMenus.find(function(e){return"openLogPopup"===e.action});t&&(t.hide=e,this.$domWrap.find('[data-action="openLogPopup"]').css("display",e?"none":""))},updatemenu:function(e){var t=this,n=[];Bn(e)&&(n=n.concat(e));var r=n.concat(this.baseMenus).map(function(e){var n=e.hide,r=e.disable,i=e.action,o=e.className,a=e.text,s=e.url,u=r?"disable":"",l=i?'data-action="'+i+'"':"",c=o?'class="'+o+'"':"",f=n?'style="display:none"':"",d=a.replace(/\{([^)]*)\}/g,function(e,n){return t[n]});return s&&(d='<a href="'+s+'" target="_blank">'+d+"</a>"),"<li "+u+" "+l+" "+c+" "+f+">"+d+"</li>"}).join("");this.$domWrap.find("ul").html(r)},clickHandler:function(e){var t=e.target;if(!t.disable){var n=t.dataset.action;n&&(this.$emit(n),zn(this[n])&&this[n](e)),this.close()}e.stopPropagation()}}}),Um=e(t(function(e){e.exports={default:Bs,__esModule:!0}})),Gm=e(t(function(e){e.exports={default:ic,__esModule:!0}})),Wm=t(function(e){e.exports={default:ga,__esModule:!0}});e(Wm);var Hm=t(function(e){e.exports={default:_a,__esModule:!0}});e(Hm);var Vm=e(t(function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=n(Wm),i=n(Hm);t.default=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var s,u=(0,i.default)(e);!(r=(s=u.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if((0,r.default)(Object(t)))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()}));!function(e,t){if("undefined"==typeof document)return t;e=e||"";var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e)),n.appendChild(r)}("chimee-popup{position:absolute;color:#fff;background-color:rgba(88,88,88,.5);font-size:13px;font-family:sans-serif;border:1px solid hsla(0,0%,100%,.08);padding:3px}chimee-popup cm-pp-close{float:right;color:#fff;text-decoration:none;line-height:14px;text-shadow:0 0 1px #000;font-size:15px;padding:0 3px;cursor:pointer;opacity:.8}chimee-popup cm-pp-close:hover{opacity:1}chimee-popup cm-pp-body,chimee-popup cm-pp-head{display:block;padding:3px 3px 6px}chimee-popup cm-pp-head{font-weight:700;border-bottom:1px solid hsla(0,0%,100%,.18);padding:0 5px 4px;margin-bottom:5px}chimee-popup cm-pp-body{font-size:12px}",void 0),function(e,t){if("undefined"==typeof document)return t;e=e||"";var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}(".chimee-log{padding:2px;box-shadow:0 1px 4px rgba(0,0,0,.6)}.chimee-log label{margin-left:10px;font-weight:100;font-size:12px}.chimee-log label input{vertical-align:middle;display:inline;width:auto;padding:0;margin:0}.chimee-log vs-pp-body{padding:3px}.chimee-log textarea{display:block;width:100%;height:200px;margin:-3px;border:1px solid hsla(0,0%,100%,.5);background-color:hsla(0,0%,100%,.9)}",void 0);var Zm=(new Date).getTime().toString();yn("_chimee_t",Zm);var Ym=gn("_chimee_t")===Zm,$m=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r={};return t.forEach(function(e){r[e]=function(t){for(var n=this,r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];this.writeLog(t);var a=this.box,s=this.type,u=this.src,l=this._waiting_num,c=this.currentTime,f=this._is_seek,d=void 0!==f&&f,h=this._is_play,p=void 0!==h&&h,v=this.playingTimestamp,m=this.loadstartTimestamp,g=this.waitingTimestamp;switch(e){case"loadstart":this.sendLog(e,{box:a,type:s,src:u}),this._ls_timeout=setTimeout(function(){n.sendLog("timeout",{src:u})},this.timeoutDelay),this._total_waiting_time=0;break;case"seeking":this._is_seek=!0;break;case"play":this._is_play=!0;break;case"pause":this.sendLog(e,{src:u,currentTime:c});break;case"canplay":clearTimeout(this._ls_timeout);var y=this.canplayTimestamp;this.sendLog(e,{src:u,currentTime:c,waitingNum:l,waitingTime:y-(m||g||y)});break;case"playing":clearTimeout(this._ls_timeout);var b=v-(m||g||v);this._total_waiting_time+=b,this.sendLog(e,{src:u,waitingNum:l,currentTime:c,isSeek:d,isPlay:p,waitingTime:b}),this.loadstartTimestamp=0,this.waitingTimestamp=0,this._is_seek=!1,this._is_play=!1;break;case"ended":this.sendLog(e,{src:u,waitingNum:l,totalWaitingTime:this._total_waiting_time});break;case"waiting":this._waiting_num++,this.sendLog(e,{src:u,waitingNum:l,currentTime:c,isSeek:d,isPlay:p});break;case"error":this.sendLog(e,{src:u,args:i})}}}),r}("loadstart","abort","durationchange","loadedmetadata","loadeddata","progress","canplay","canplaythrough","pause","play","playing","emptied","ended","seeking","seeked","stalled","suspend","timeupdate","waiting","error"),Jm=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.tagName,n=void 0===t?"chimee-popup":t,r=e.className,i=e.name,s=void 0===i?"popup":i,u=e.html,l=e.title,c=void 0===l?"这是一个信息框":l,f=e.body,d=void 0===f?"这里是信息内容":f,h=e.offsetAttr,p=void 0===h?"left top":h,v=e.offset,m=void 0===v?"50% 50%":v,g=e.translate,y=void 0===g?"":g,b=e.width,w=e.height,_=e.level,E=e.init,S=e.inited,k=e.data,T=e.create,A=e.beforeCreate,M=e.destroy,x=e.events,L=e.computed,O=e.methods,D=void 0===O?{}:O,I=e.penetrate,R=void 0!==I&&I,N=e.operable,C=void 0===N||N,P=e.hide,j=void 0!==P&&P,F=e.opened,B=e.closed,z=e.autoFocus,U={html:u||"\n      <cm-pp-close>×</cm-pp-close>\n      "+(!1!==c?"<cm-pp-head>"+c+"</cm-pp-head>":"")+"\n      "+(!1!==d?"<cm-pp-body>"+d+"</cm-pp-body>":"")+"\n    ",closeSelector:"._close"};return{name:s,el:n,className:r,beforeCreate:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.events,n=e.methods,r=arguments[1];a(r)&&(a(r.events)&&q(t,r.events),a(r.methods)&&q(n,r.methods)),A&&A.apply(this,arguments)},create:function(){var e=a(this.$config)?q(U,this.$config):U;(this.$domWrap=Fn(this.$dom).css("display","none")).html(e.html).delegate("cm-pp-close, "+e.closeSelector,"click",this.close),this.width(b).height(w).offset(m).translate(y),this._hide=j;for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];T&&T.apply(this,n),!this._hide&&this.open()},destroy:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];M&&M.apply(this,t),this.$domWrap.undelegate(this.$config.closeSelector,"click",this.close).remove()},level:_,init:E,inited:S,data:k,events:x,computed:L,penetrate:R,operable:C,autoFocus:z,methods:q({open:function(){if(this.destroyed)return this;this.$domWrap.css("display","block"),this._hide=!1;for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.$emit("popupOpen",t,this),o(F)&&F.apply(this,t),this},close:function(){if(this.destroyed)return this;this.$domWrap.css("display","none"),this._hide=!0;for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.$emit("popupClose",t,this),o(B)&&B.apply(this,t),this},width:function(e){return e&&this.$domWrap.css("width",e),this},height:function(e){return e&&this.$domWrap.css("height",e),this},offset:function(e){var t=(""+(e||"")).split(" "),n={};if(t.length>2)return["top","right","bottom","left"].forEach(function(e,r){t[r]&&"auto"!==t[r]&&(n[e]=t[r])}),this.$domWrap.css(n),this;var r=Vm(t,2),i=r[0],o=r[1];if(""===i)return this;var a=o||i,s=p.split(" ");n[s[0]]=i,n[s[1]]=a,this.$domWrap.css(n);var u=[];return"50%"===i&&u.push("-50%"),"50%"===a&&u.push("-50%"),u.length>0&&this.translate(u.join(" ")),this},translate:function(e){var t=(""+(e||"")).split(" "),n=Vm(t,2),r=n[0],i=n[1];return r&&this.$domWrap.css("transform","translate("+r+", "+(i||r)+")"),this}},D)}}({name:"chimeeLog",className:"chimee-log",title:"日志信息"+(Ym?'<label><input type="checkbox">下次自动打开</label>':""),body:"<textarea>Chimee logs:</textarea>",offset:"0",width:"400px",hide:!0,autoFocus:!1,logPostUrl:void 0,beforeCreate:function(e,t){h(t.logPostUrl)&&(this.logPostUrl=t.logPostUrl),t.timeoutDelay&&(this.timeoutDelay=t.timeoutDelay)},create:function(){this.logBase.ver=this.VERSION;var e=this.$domWrap;if(this.$txtEl=e.find("textarea"),Ym){var t="1"===gn("auto_on");e.find('input[type="checkbox"]').on("change",function(e){yn("auto_on",+this.checked)})[0].checked=t,this._hide=!t}this.writeLog({type:"ready"}),this.$emitSync("logPluginCreate")},destroy:function(){clearTimeout(this._ls_timeout),this.$emitSync("logPluginDestroy"),this.sendLog("destroy")},inited:function(){},closed:function(){this.$txtEl.text("")},opened:function(){this.$bumpToTop()},methods:{writeLog:function(e){var t=e.type;if(this[t+"Timestamp"]=+new Date,!this._hide){var n=void 0,r="write_"+t+"_log";if(this[r]){for(var i=arguments.length,o=Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];n=this[r](t,o)}var s=this.$txtEl.text()+"\n["+mn(new Date(this[t+"Timestamp"]),"yyyy-MM-dd hh:mm:ss.i")+"] "+t+" "+(void 0!==n?Gm(n):""),u=this.$txtEl.text(s)[0];u.scrollTop=u.scrollHeight}},write_loadstart_log:function(e){return{box:this.box,type:this.type,src:this.src}},write_durationchange_log:function(){return{duration:this.duration}},write_timeupdate_log:function(){return{currentTime:this.currentTime}},send_inited_log:function(){var e=this.box,t=this.type,n=this.src,r=this.controls,i=this.loop;return{pro:location.protocol,box:e,type:t,src:n,ctrs:r,loop:i}},sendLog:function(e,t){var n=this.logPostUrl;if(n){var r=q(t||{},this.logBase),i="send_"+e+"_log";this[i]&&q(r,this[i](e,r)),q(r,{evt:e,_t:+new Date,_r:Math.random()});var o=[];Um(r).forEach(function(e){return o.push(encodeURIComponent(e)+"="+encodeURIComponent(r[e]))});var a=new Image;a.onload=a.onerror=function(e){a=null},a.src=n+"?"+o.join("&")}}},events:q($m,{openLogPopup:function(){this.open()}}),data:{timeoutDelay:3e4,pageLoadedTimestamp:Zm,_waiting_num:0,_total_waiting_time:0,logBase:{uid:function(e){return e||yn("_chimee_uid",e=ne()),e}(gn("_chimee_uid")),ref:location.href}},computed:{type:function(){return this.$videoConfig.isLive?"live":"vod"}}}),Km=e(t(function(e,t){!function(t,n){e.exports=n()}(0,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/dist/",t(t.s=8)}([function(e,t,n){function r(){}function i(e,t){return t="["+e+"] > "+t}function o(e){var t=self.console[e];return t?function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];r[0]&&(r[0]=i(e,r[0])),t.apply(self.console,r)}:r}function a(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];n.forEach(function(t){l[t]=e[t]?e[t].bind(e):o(t)})}n.d(t,"a",function(){return c}),n.d(t,"b",function(){return f});var s="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},u={trace:r,debug:r,log:r,warn:r,info:r,error:r},l=u,c=function(e){if(!0===e||"object"===(void 0===e?"undefined":s(e))){a(e,"debug","log","info","warn","error");try{l.log()}catch(e){l=u}}else l=u},f=l},function(e,t,n){t.a={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",BUFFER_RESET:"hlsBufferReset",BUFFER_CODECS:"hlsBufferCodecs",BUFFER_CREATED:"hlsBufferCreated",BUFFER_APPENDING:"hlsBufferAppending",BUFFER_APPENDED:"hlsBufferAppended",BUFFER_EOS:"hlsBufferEos",BUFFER_FLUSHING:"hlsBufferFlushing",BUFFER_FLUSHED:"hlsBufferFlushed",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",MANIFEST_PARSED:"hlsManifestParsed",LEVEL_SWITCH:"hlsLevelSwitch",LEVEL_SWITCHING:"hlsLevelSwitching",LEVEL_SWITCHED:"hlsLevelSwitched",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsLevelPtsUpdated",AUDIO_TRACKS_UPDATED:"hlsAudioTracksUpdated",AUDIO_TRACK_SWITCH:"hlsAudioTrackSwitch",AUDIO_TRACK_SWITCHING:"hlsAudioTrackSwitching",AUDIO_TRACK_SWITCHED:"hlsAudioTrackSwitched",AUDIO_TRACK_LOADING:"hlsAudioTrackLoading",AUDIO_TRACK_LOADED:"hlsAudioTrackLoaded",SUBTITLE_TRACKS_UPDATED:"hlsSubtitleTracksUpdated",SUBTITLE_TRACK_SWITCH:"hlsSubtitleTrackSwitch",SUBTITLE_TRACK_LOADING:"hlsSubtitleTrackLoading",SUBTITLE_TRACK_LOADED:"hlsSubtitleTrackLoaded",SUBTITLE_FRAG_PROCESSED:"hlsSubtitleFragProcessed",INIT_PTS_FOUND:"hlsInitPtsFound",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_DECRYPTED:"hlsFragDecrypted",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_USERDATA:"hlsFragParsingUserdata",FRAG_PARSING_METADATA:"hlsFragParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFpsDrop",FPS_DROP_LEVEL_CAPPING:"hlsFpsDropLevelCapping",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded",STREAM_STATE_TRANSITION:"hlsStreamStateTransition"}},function(e,t,n){n.d(t,"b",function(){return r}),n.d(t,"a",function(){return i});var r={NETWORK_ERROR:"networkError",MEDIA_ERROR:"mediaError",MUX_ERROR:"muxError",OTHER_ERROR:"otherError"},i={MANIFEST_LOAD_ERROR:"manifestLoadError",MANIFEST_LOAD_TIMEOUT:"manifestLoadTimeOut",MANIFEST_PARSING_ERROR:"manifestParsingError",MANIFEST_INCOMPATIBLE_CODECS_ERROR:"manifestIncompatibleCodecsError",LEVEL_LOAD_ERROR:"levelLoadError",LEVEL_LOAD_TIMEOUT:"levelLoadTimeOut",LEVEL_SWITCH_ERROR:"levelSwitchError",AUDIO_TRACK_LOAD_ERROR:"audioTrackLoadError",AUDIO_TRACK_LOAD_TIMEOUT:"audioTrackLoadTimeOut",FRAG_LOAD_ERROR:"fragLoadError",FRAG_LOOP_LOADING_ERROR:"fragLoopLoadingError",FRAG_LOAD_TIMEOUT:"fragLoadTimeOut",FRAG_DECRYPT_ERROR:"fragDecryptError",FRAG_PARSING_ERROR:"fragParsingError",REMUX_ALLOC_ERROR:"remuxAllocError",KEY_LOAD_ERROR:"keyLoadError",KEY_LOAD_TIMEOUT:"keyLoadTimeOut",BUFFER_ADD_CODEC_ERROR:"bufferAddCodecError",BUFFER_APPEND_ERROR:"bufferAppendError",BUFFER_APPENDING_ERROR:"bufferAppendingError",BUFFER_STALLED_ERROR:"bufferStalledError",BUFFER_FULL_ERROR:"bufferFullError",BUFFER_SEEK_OVER_HOLE:"bufferSeekOverHole",BUFFER_NUDGE_ON_STALL:"bufferNudgeOnStall",INTERNAL_EXCEPTION:"internalException"}},function(e,t,n){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=function(){function e(t,n){r(this,e),this.subtle=t,this.aesIV=n}return e.prototype.decrypt=function(e,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e)},e}(),u=function(){function e(t,n){i(this,e),this.subtle=t,this.key=n}return e.prototype.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},e}(),l=function(){function e(){o(this,e),this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.initTable()}return e.prototype.uint8ArrayToUint32Array_=function(e){for(var t=new DataView(e),n=new Uint32Array(4),r=0;r<4;r++)n[r]=t.getUint32(4*r);return n},e.prototype.initTable=function(){var e=this.sBox,t=this.invSBox,n=this.subMix,r=n[0],i=n[1],o=n[2],a=n[3],s=this.invSubMix,u=s[0],l=s[1],c=s[2],f=s[3],d=new Uint32Array(256),h=0,p=0,v=0;for(v=0;v<256;v++)d[v]=v<128?v<<1:v<<1^283;for(v=0;v<256;v++){var m=p^p<<1^p<<2^p<<3^p<<4;m=m>>>8^255&m^99,e[h]=m,t[m]=h;var g=d[h],y=d[g],b=d[y],w=257*d[m]^16843008*m;r[h]=w<<24|w>>>8,i[h]=w<<16|w>>>16,o[h]=w<<8|w>>>24,a[h]=w,w=16843009*b^65537*y^257*g^16843008*h,u[m]=w<<24|w>>>8,l[m]=w<<16|w>>>16,c[m]=w<<8|w>>>24,f[m]=w,h?(h=g^d[d[d[b^g]]],p^=d[d[p]]):h=p=1}},e.prototype.expandKey=function(e){for(var t=this.uint8ArrayToUint32Array_(e),n=!0,r=0;r<t.length&&n;)n=t[r]===this.key[r],r++;if(!n){this.key=t;var i=this.keySize=t.length;if(4!==i&&6!==i&&8!==i)throw new Error("Invalid aes key size="+i);var o=this.ksRows=4*(i+6+1),a=void 0,s=void 0,u=this.keySchedule=new Uint32Array(o),l=this.invKeySchedule=new Uint32Array(o),c=this.sBox,f=this.rcon,d=this.invSubMix,h=d[0],p=d[1],v=d[2],m=d[3],g=void 0,y=void 0;for(a=0;a<o;a++)a<i?g=u[a]=t[a]:(y=g,a%i==0?(y=c[(y=y<<8|y>>>24)>>>24]<<24|c[y>>>16&255]<<16|c[y>>>8&255]<<8|c[255&y],y^=f[a/i|0]<<24):i>6&&a%i==4&&(y=c[y>>>24]<<24|c[y>>>16&255]<<16|c[y>>>8&255]<<8|c[255&y]),u[a]=g=(u[a-i]^y)>>>0);for(s=0;s<o;s++)a=o-s,y=3&s?u[a]:u[a-4],l[s]=s<4||a<=4?y:h[c[y>>>24]]^p[c[y>>>16&255]]^v[c[y>>>8&255]]^m[c[255&y]],l[s]=l[s]>>>0}},e.prototype.networkToHostOrderSwap=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},e.prototype.decrypt=function(e,t,n){for(var r,i,o=this.keySize+6,a=this.invKeySchedule,s=this.invSBox,u=this.invSubMix,l=u[0],c=u[1],f=u[2],d=u[3],h=this.uint8ArrayToUint32Array_(n),p=h[0],v=h[1],m=h[2],g=h[3],y=new Int32Array(e),b=new Int32Array(y.length),w=void 0,_=void 0,E=void 0,S=void 0,k=void 0,T=void 0,A=void 0,M=void 0,x=void 0,L=void 0,O=void 0,D=void 0,I=this.networkToHostOrderSwap;t<y.length;){for(x=I(y[t]),L=I(y[t+1]),O=I(y[t+2]),D=I(y[t+3]),k=x^a[0],T=D^a[1],A=O^a[2],M=L^a[3],r=4,i=1;i<o;i++)w=l[k>>>24]^c[T>>16&255]^f[A>>8&255]^d[255&M]^a[r],_=l[T>>>24]^c[A>>16&255]^f[M>>8&255]^d[255&k]^a[r+1],E=l[A>>>24]^c[M>>16&255]^f[k>>8&255]^d[255&T]^a[r+2],S=l[M>>>24]^c[k>>16&255]^f[T>>8&255]^d[255&A]^a[r+3],k=w,T=_,A=E,M=S,r+=4;w=s[k>>>24]<<24^s[T>>16&255]<<16^s[A>>8&255]<<8^s[255&M]^a[r],_=s[T>>>24]<<24^s[A>>16&255]<<16^s[M>>8&255]<<8^s[255&k]^a[r+1],E=s[A>>>24]<<24^s[M>>16&255]<<16^s[k>>8&255]<<8^s[255&T]^a[r+2],S=s[M>>>24]<<24^s[k>>16&255]<<16^s[T>>8&255]<<8^s[255&A]^a[r+3],r+=3,b[t]=I(w^p),b[t+1]=I(S^v),b[t+2]=I(E^m),b[t+3]=I(_^g),p=x,v=L,m=O,g=D,t+=4}return b.buffer},e.prototype.destroy=function(){this.key=void 0,this.keySize=void 0,this.ksRows=void 0,this.sBox=void 0,this.invSBox=void 0,this.subMix=void 0,this.invSubMix=void 0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.rcon=void 0},e}(),c=n(2),f=n(0),d=function(){function e(t,n){a(this,e),this.observer=t,this.config=n,this.logEnabled=!0;try{var r=crypto||self.crypto;this.subtle=r.subtle||r.webkitSubtle}catch(e){}this.disableWebCrypto=!this.subtle}return e.prototype.isSync=function(){return this.disableWebCrypto&&this.config.enableSoftwareAES},e.prototype.decrypt=function(e,t,n,r){var i=this;if(this.disableWebCrypto&&this.config.enableSoftwareAES){this.logEnabled&&(f.b.log("JS AES decrypt"),this.logEnabled=!1);var o=this.decryptor;o||(this.decryptor=o=new l),o.expandKey(t),r(o.decrypt(e,0,n))}else{this.logEnabled&&(f.b.log("WebCrypto AES decrypt"),this.logEnabled=!1);var a=this.subtle;this.key!==t&&(this.key=t,this.fastAesKey=new u(a,t)),this.fastAesKey.expandKey().then(function(o){new s(a,n).decrypt(e,o).catch(function(o){i.onWebCryptoError(o,e,t,n,r)}).then(function(e){r(e)})}).catch(function(o){i.onWebCryptoError(o,e,t,n,r)})}},e.prototype.onWebCryptoError=function(e,t,n,r,i){this.config.enableSoftwareAES?(f.b.log("WebCrypto Error, disable WebCrypto API"),this.disableWebCrypto=!0,this.logEnabled=!0,this.decrypt(t,n,r,i)):(f.b.error("decrypting error : "+e.message),this.observer.trigger(Event.ERROR,{type:c.b.MEDIA_ERROR,details:c.a.FRAG_DECRYPT_ERROR,fatal:!0,reason:e.message}))},e.prototype.destroy=function(){var e=this.decryptor;e&&(e.destroy(),this.decryptor=void 0)},e}();t.a=d},function(e,t,n){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(){r(this,e)}return e.isHeader=function(e,t){return t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},e.isFooter=function(e,t){return t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},e.getID3Data=function(t,n){for(var r=n,i=0;e.isHeader(t,n);)i+=10,i+=e._readSize(t,n+6),e.isFooter(t,n+10)&&(i+=10),n+=i;if(i>0)return t.subarray(r,r+i)},e._readSize=function(e,t){var n=0;return n=(127&e[t])<<21,n|=(127&e[t+1])<<14,n|=(127&e[t+2])<<7,n|=127&e[t+3]},e.getTimeStamp=function(t){for(var n=e.getID3Frames(t),r=0;r<n.length;r++){var i=n[r];if(e.isTimeStampFrame(i))return e._readTimeStamp(i)}},e.isTimeStampFrame=function(e){return e&&"PRIV"===e.key&&"com.apple.streaming.transportStreamTimestamp"===e.info},e._getFrameData=function(t){var n=String.fromCharCode(t[0],t[1],t[2],t[3]),r=e._readSize(t,4);return{type:n,size:r,data:t.subarray(10,10+r)}},e.getID3Frames=function(t){for(var n=0,r=[];e.isHeader(t,n);){for(var i=e._readSize(t,n+6),o=(n+=10)+i;n+8<o;){var a=e._getFrameData(t.subarray(n)),s=e._decodeFrame(a);s&&r.push(s),n+=a.size+10}e.isFooter(t,n)&&(n+=10)}return r},e._decodeFrame=function(t){return"PRIV"===t.type?e._decodePrivFrame(t):"T"===t.type[0]?e._decodeTextFrame(t):"W"===t.type[0]?e._decodeURLFrame(t):void 0},e._readTimeStamp=function(e){if(8===e.data.byteLength){var t=new Uint8Array(e.data),n=1&t[3],r=(t[4]<<23)+(t[5]<<15)+(t[6]<<7)+t[7];return r/=45,n&&(r+=47721858.84),Math.round(r)}},e._decodePrivFrame=function(t){if(!(t.size<2)){var n=e._utf8ArrayToStr(t.data),r=new Uint8Array(t.data.subarray(n.length+1));return{key:t.type,info:n,data:r.buffer}}},e._decodeTextFrame=function(t){if(!(t.size<2)){if("TXXX"===t.type){var n=1,r=e._utf8ArrayToStr(t.data.subarray(n));n+=r.length+1;var i=e._utf8ArrayToStr(t.data.subarray(n));return{key:t.type,info:r,data:i}}var o=e._utf8ArrayToStr(t.data.subarray(1));return{key:t.type,data:o}}},e._decodeURLFrame=function(t){if("WXXX"===t.type){if(t.size<2)return;var n=1,r=e._utf8ArrayToStr(t.data.subarray(n));n+=r.length+1;var i=e._utf8ArrayToStr(t.data.subarray(n));return{key:t.type,info:r,data:i}}var o=e._utf8ArrayToStr(t.data);return{key:t.type,data:o}},e._utf8ArrayToStr=function(e){for(var t=void 0,n=void 0,r="",i=0,o=e.length;i<o;){var a=e[i++];switch(a>>4){case 0:return r;case 1:case 2:case 3:case 4:case 5:case 6:case 7:r+=String.fromCharCode(a);break;case 12:case 13:t=e[i++],r+=String.fromCharCode((31&a)<<6|63&t);break;case 14:t=e[i++],n=e[i++],r+=String.fromCharCode((15&a)<<12|(63&t)<<6|(63&n)<<0)}}return r},e}();t.a=i},function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function i(e){return"number"==typeof e}function o(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!i(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,i,s,u,l;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(n=this._events[e],a(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(o(n))for(s=Array.prototype.slice.call(arguments,1),i=(l=n.slice()).length,u=0;u<i;u++)l[u].apply(this,s);return!0},n.prototype.addListener=function(e,t){var i;if(!r(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,r(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,o(this._events[e])&&!this._events[e].warned&&(i=a(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&i>0&&this._events[e].length>i&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var i=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,i,a,s;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],a=n.length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(s=a;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],r(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,n){!function(t){var n=/^((?:[^\/;?#]+:)?)(\/\/[^\/\;?#]*)?(.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,r=/^([^\/;?#]*)(.*)$/,i=/(?:\/|^)\.(?=\/)/g,o=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,a={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var i=this.parseURL(e);if(!s)throw new Error("Error trying to parse base URL.");return i.path=a.normalizePath(i.path),a.buildURLFromParts(i)}var o=this.parseURL(t);if(!o)throw new Error("Error trying to parse relative URL.");if(o.scheme)return n.alwaysNormalize?(o.path=a.normalizePath(o.path),a.buildURLFromParts(o)):t;var s=this.parseURL(e);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&"/"!==s.path[0]){var u=r.exec(s.path);s.netLoc=u[1],s.path=u[2]}s.netLoc&&!s.path&&(s.path="/");var l={scheme:s.scheme,netLoc:o.netLoc,path:null,params:o.params,query:o.query,fragment:o.fragment};if(!o.netLoc&&(l.netLoc=s.netLoc,"/"!==o.path[0]))if(o.path){var c=s.path,f=c.substring(0,c.lastIndexOf("/")+1)+o.path;l.path=a.normalizePath(f)}else l.path=s.path,o.params||(l.params=s.params,o.query||(l.query=s.query));return null===l.path&&(l.path=n.alwaysNormalize?a.normalizePath(o.path):o.path),a.buildURLFromParts(l)},parseURL:function(e){var t=n.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(i,"");e.length!==(e=e.replace(o,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}};e.exports=a}()},function(e,t,n){function r(e,t,n,r){var i,o,a,s,u,l=navigator.userAgent.toLowerCase(),c=r,f=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];if(i=1+((192&t[n+2])>>>6),!((o=(60&t[n+2])>>>2)>f.length-1))return s=(1&t[n+2])<<2,s|=(192&t[n+3])>>>6,M.b.log("manifest codec:"+r+",ADTS data:type:"+i+",sampleingIndex:"+o+"["+f[o]+"Hz],channelConfig:"+s),/firefox/i.test(l)?o>=6?(i=5,u=new Array(4),a=o-3):(i=2,u=new Array(2),a=o):-1!==l.indexOf("android")?(i=2,u=new Array(2),a=o):(i=5,u=new Array(4),r&&(-1!==r.indexOf("mp4a.40.29")||-1!==r.indexOf("mp4a.40.5"))||!r&&o>=6?a=o-3:((r&&-1!==r.indexOf("mp4a.40.2")&&(o>=6&&1===s||/vivaldi/i.test(l))||!r&&1===s)&&(i=2,u=new Array(2)),a=o)),u[0]=i<<3,u[0]|=(14&o)>>1,u[1]|=(1&o)<<7,u[1]|=s<<3,5===i&&(u[1]|=(14&a)>>1,u[2]=(1&a)<<7,u[2]|=8,u[3]=0),{config:u,samplerate:f[o],channelCount:s,codec:"mp4a.40."+i,manifestCodec:c};e.trigger(Event.ERROR,{type:T.b.MEDIA_ERROR,details:T.a.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+o})}function i(e,t){return 255===e[t]&&240==(246&e[t+1])}function o(e,t){return 1&e[t+1]?7:9}function a(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function s(e,t){return!!(t+1<e.length&&i(e,t))}function u(e,t){if(t+1<e.length&&i(e,t)){var n=o(e,t);t+5<e.length&&(n=a(e,t));var r=t+n;if(r===e.length||r+1<e.length&&i(e,r))return!0}return!1}function l(e,t,n,i,o){if(!e.samplerate){var a=r(t,n,i,o);e.config=a.config,e.samplerate=a.samplerate,e.channelCount=a.channelCount,e.codec=a.codec,e.manifestCodec=a.manifestCodec,M.b.log("parsed codec:"+e.codec+",rate:"+a.samplerate+",nb channel:"+a.channelCount)}}function c(e){return 9216e4/e}function f(e,t,n,r,i){var s,u,l,c=e.length;if(s=o(e,t),u=a(e,t),(u-=s)>0&&t+s+u<=c)return l=n+r*i,{headerLength:s,frameLength:u,stamp:l}}function d(e,t,n,r,i){var o=f(t,n,r,i,c(e.samplerate));if(o){var a=o.stamp,s=o.headerLength,u=o.frameLength,l={unit:t.subarray(n+s,n+s+u),pts:a,dts:a};return e.samples.push(l),e.len+=u,{sample:l,length:u+s}}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var k=n(1),T=n(2),A=n(3),M=n(0),x=n(4),L=function(){function e(t,n,r){h(this,e),this.observer=t,this.config=r,this.remuxer=n}return e.prototype.resetInitSegment=function(e,t,n,r){this._audioTrack={container:"audio/adts",type:"audio",id:0,sequenceNumber:0,isAAC:!0,samples:[],len:0,manifestCodec:t,duration:r,inputTimeScale:9e4}},e.prototype.resetTimeStamp=function(){},e.probe=function(e){if(!e)return!1;for(var t=(x.a.getID3Data(e,0)||[]).length,n=e.length;t<n;t++)if(u(e,t))return M.b.log("ADTS sync word found !"),!0;return!1},e.prototype.append=function(e,t,n,r){for(var i=this._audioTrack,o=x.a.getID3Data(e,0)||[],a=x.a.getTimeStamp(o),u=a?90*a:9e4*t,c=0,f=u,h=e.length,p=o.length,v=[{pts:f,dts:f,data:o}];p<h-1;)if(s(e,p)&&p+5<h){l(i,this.observer,e,p,i.manifestCodec);var m=d(i,e,p,u,c);if(!m){M.b.log("Unable to parse AAC frame");break}p+=m.length,f=m.sample.pts,c++}else x.a.isHeader(e,p)?(o=x.a.getID3Data(e,p),v.push({pts:f,dts:f,data:o}),p+=o.length):p++;this.remuxer.remux(i,{samples:[]},{samples:v,inputTimeScale:9e4},{samples:[]},t,n,r)},e.prototype.destroy=function(){},e}(),O=Math.pow(2,32)-1,D=function(){function e(t,n){p(this,e),this.observer=t,this.remuxer=n}return e.prototype.resetTimeStamp=function(e){this.initPTS=e},e.prototype.resetInitSegment=function(t,n,r,i){if(t&&t.byteLength){var o=this.initData=e.parseInitSegment(t);null==n&&(n="mp4a.40.5"),null==r&&(r="avc1.42e01e");var a={};o.audio&&o.video?a.audiovideo={container:"video/mp4",codec:n+","+r,initSegment:i?t:null}:(o.audio&&(a.audio={container:"audio/mp4",codec:n,initSegment:i?t:null}),o.video&&(a.video={container:"video/mp4",codec:r,initSegment:i?t:null})),this.observer.trigger(k.a.FRAG_PARSING_INIT_SEGMENT,{tracks:a})}else n&&(this.audioCodec=n),r&&(this.videoCodec=r)},e.probe=function(t){return e.findBox({data:t,start:0,end:Math.min(t.length,16384)},["moof"]).length>0},e.bin2str=function(e){return String.fromCharCode.apply(null,e)},e.readUint32=function(e,t){e.data&&(t+=e.start,e=e.data);var n=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3];return n<0?4294967296+n:n},e.writeUint32=function(e,t,n){e.data&&(t+=e.start,e=e.data),e[t]=n>>24,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n},e.findBox=function(t,n){var r,i,o,a,s,u,l,c=[];if(t.data?(u=t.start,a=t.end,t=t.data):(u=0,a=t.byteLength),!n.length)return null;for(r=u;r<a;)i=e.readUint32(t,r),o=e.bin2str(t.subarray(r+4,r+8)),l=i>1?r+i:a,o===n[0]&&(1===n.length?c.push({data:t,start:r+8,end:l}):(s=e.findBox({data:t,start:r+8,end:l},n.slice(1))).length&&(c=c.concat(s))),r=l;return c},e.parseInitSegment=function(t){var n=[];return e.findBox(t,["moov","trak"]).forEach(function(t){var r=e.findBox(t,["tkhd"])[0];if(r){var i=r.data[r.start],o=0===i?12:20,a=e.readUint32(r,o),s=e.findBox(t,["mdia","mdhd"])[0];if(s){o=0===(i=s.data[s.start])?12:20;var u=e.readUint32(s,o),l=e.findBox(t,["mdia","hdlr"])[0];if(l){var c={soun:"audio",vide:"video"}[e.bin2str(l.data.subarray(l.start+8,l.start+12))];if(c){var f=e.findBox(t,["mdia","minf","stbl","stsd"]);if(f.length){f=f[0];var d=e.bin2str(f.data.subarray(f.start+12,f.start+16));M.b.log("MP4Demuxer:"+c+":"+d+" found")}n[a]={timescale:u,type:c},n[c]={timescale:u,id:a}}}}}}),n},e.getStartDTS=function(t,n){var r,i,o;return r=e.findBox(n,["moof","traf"]),i=[].concat.apply([],r.map(function(n){return e.findBox(n,["tfhd"]).map(function(r){var i,o;return i=e.readUint32(r,4),o=t[i].timescale||9e4,e.findBox(n,["tfdt"]).map(function(t){var n,r;return n=t.data[t.start],r=e.readUint32(t,4),1===n&&(r*=Math.pow(2,32),r+=e.readUint32(t,8)),r})[0]/o})})),o=Math.min.apply(null,i),isFinite(o)?o:0},e.offsetStartDTS=function(t,n,r){e.findBox(n,["moof","traf"]).map(function(n){return e.findBox(n,["tfhd"]).map(function(i){var o=e.readUint32(i,4),a=t[o].timescale||9e4;e.findBox(n,["tfdt"]).map(function(t){var n=t.data[t.start],i=e.readUint32(t,4);if(0===n)e.writeUint32(t,4,i-r*a);else{i*=Math.pow(2,32),i+=e.readUint32(t,8),i-=r*a,i=Math.max(i,0);var o=Math.floor(i/(O+1)),s=Math.floor(i%(O+1));e.writeUint32(t,4,o),e.writeUint32(t,8,s)}})})})},e.prototype.append=function(t,n,r,i){var o=this.initData;o||(this.resetInitSegment(t,this.audioCodec,this.videoCodec),o=this.initData);var a=void 0,s=this.initPTS;if(void 0===s){var u=e.getStartDTS(o,t);this.initPTS=s=u-n,this.observer.trigger(k.a.INIT_PTS_FOUND,{initPTS:s})}e.offsetStartDTS(o,t,s),a=e.getStartDTS(o,t),this.remuxer.remux(o.audio,o.video,null,null,a,r,i,t)},e.prototype.destroy=function(){},e}(),I={BitratesMap:[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],SamplingRateMap:[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],appendFrame:function(e,t,n,r,i){if(!(n+24>t.length)){var o=this.parseHeader(t,n);if(o&&n+o.frameLength<=t.length){var a=r+i*(10368e4/o.sampleRate),s={unit:t.subarray(n,n+o.frameLength),pts:a,dts:a};return e.config=[],e.channelCount=o.channelCount,e.samplerate=o.sampleRate,e.samples.push(s),e.len+=o.frameLength,{sample:s,length:o.frameLength}}}},parseHeader:function(e,t){var n=e[t+1]>>3&3,r=e[t+1]>>1&3,i=e[t+2]>>4&15,o=e[t+2]>>2&3,a=!!(2&e[t+2]);if(1!==n&&0!==i&&15!==i&&3!==o){var s=3===n?3-r:3===r?3:4,u=1e3*I.BitratesMap[14*s+i-1],l=3===n?0:2===n?1:2,c=I.SamplingRateMap[3*l+o],f=a?1:0;return{sampleRate:c,channelCount:e[t+3]>>6==3?1:2,frameLength:3===r?(3===n?12:6)*u/c+f<<2:(3===n?144:72)*u/c+f|0}}},isHeaderPattern:function(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])},isHeader:function(e,t){return!!(t+1<e.length&&this.isHeaderPattern(e,t))},probe:function(e,t){if(t+1<e.length&&this.isHeaderPattern(e,t)){var n=this.parseHeader(e,t),r=4;n&&n.frameLength&&(r=n.frameLength);var i=t+r;if(i===e.length||i+1<e.length&&this.isHeaderPattern(e,i))return!0}return!1}},R=I,N=function(){function e(t){v(this,e),this.data=t,this.bytesAvailable=t.byteLength,this.word=0,this.bitsAvailable=0}return e.prototype.loadWord=function(){var e=this.data,t=this.bytesAvailable,n=e.byteLength-t,r=new Uint8Array(4),i=Math.min(4,t);if(0===i)throw new Error("no bytes available");r.set(e.subarray(n,n+i)),this.word=new DataView(r.buffer).getUint32(0),this.bitsAvailable=8*i,this.bytesAvailable-=i},e.prototype.skipBits=function(e){var t;this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,e-=(t=e>>3)>>3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},e.prototype.readBits=function(e){var t=Math.min(this.bitsAvailable,e),n=this.word>>>32-t;return e>32&&M.b.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0?this.word<<=t:this.bytesAvailable>0&&this.loadWord(),(t=e-t)>0&&this.bitsAvailable?n<<t|this.readBits(t):n},e.prototype.skipLZ=function(){var e;for(e=0;e<this.bitsAvailable;++e)if(0!=(this.word&2147483648>>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},e.prototype.skipUEG=function(){this.skipBits(1+this.skipLZ())},e.prototype.skipEG=function(){this.skipBits(1+this.skipLZ())},e.prototype.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},e.prototype.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},e.prototype.readBoolean=function(){return 1===this.readBits(1)},e.prototype.readUByte=function(){return this.readBits(8)},e.prototype.readUShort=function(){return this.readBits(16)},e.prototype.readUInt=function(){return this.readBits(32)},e.prototype.skipScalingList=function(e){var t,n=8,r=8;for(t=0;t<e;t++)0!==r&&(r=(n+this.readEG()+256)%256),n=0===r?n:r},e.prototype.readSPS=function(){var e,t,n,r,i,o,a,s=0,u=0,l=0,c=0,f=this.readUByte.bind(this),d=this.readBits.bind(this),h=this.readUEG.bind(this),p=this.readBoolean.bind(this),v=this.skipBits.bind(this),m=this.skipEG.bind(this),g=this.skipUEG.bind(this),y=this.skipScalingList.bind(this);if(f(),e=f(),d(5),v(3),f(),g(),100===e||110===e||122===e||244===e||44===e||83===e||86===e||118===e||128===e){var b=h();if(3===b&&v(1),g(),g(),v(1),p())for(o=3!==b?8:12,a=0;a<o;a++)p()&&y(a<6?16:64)}g();var w=h();if(0===w)h();else if(1===w)for(v(1),m(),m(),t=h(),a=0;a<t;a++)m();g(),v(1),n=h(),r=h(),0===(i=d(1))&&v(1),v(1),p()&&(s=h(),u=h(),l=h(),c=h());var _=[1,1];if(p()&&p())switch(f()){case 1:_=[1,1];break;case 2:_=[12,11];break;case 3:_=[10,11];break;case 4:_=[16,11];break;case 5:_=[40,33];break;case 6:_=[24,11];break;case 7:_=[20,11];break;case 8:_=[32,11];break;case 9:_=[80,33];break;case 10:_=[18,11];break;case 11:_=[15,11];break;case 12:_=[64,33];break;case 13:_=[160,99];break;case 14:_=[4,3];break;case 15:_=[3,2];break;case 16:_=[2,1];break;case 255:_=[f()<<8|f(),f()<<8|f()]}return{width:Math.ceil(16*(n+1)-2*s-2*u),height:(2-i)*(r+1)*16-(i?2:4)*(l+c),pixelRatio:_}},e.prototype.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},e}(),C=function(){function e(t,n,r,i){m(this,e),this.decryptdata=r,this.discardEPB=i,this.decrypter=new A.a(t,n)}return e.prototype.decryptBuffer=function(e,t){this.decrypter.decrypt(e,this.decryptdata.key.buffer,this.decryptdata.iv.buffer,t)},e.prototype.decryptAacSample=function(e,t,n,r){var i=e[t].unit,o=i.subarray(16,i.length-i.length%16),a=o.buffer.slice(o.byteOffset,o.byteOffset+o.length),s=this;this.decryptBuffer(a,function(o){o=new Uint8Array(o),i.set(o,16),r||s.decryptAacSamples(e,t+1,n)})},e.prototype.decryptAacSamples=function(e,t,n){for(;;t++){if(t>=e.length)return void n();if(!(e[t].unit.length<32)){var r=this.decrypter.isSync();if(this.decryptAacSample(e,t,n,r),!r)return}}},e.prototype.getAvcEncryptedData=function(e){for(var t=16*Math.floor((e.length-48)/160)+16,n=new Int8Array(t),r=0,i=32;i<=e.length-16;i+=160,r+=16)n.set(e.subarray(i,i+16),r);return n},e.prototype.getAvcDecryptedUnit=function(e,t){t=new Uint8Array(t);for(var n=0,r=32;r<=e.length-16;r+=160,n+=16)e.set(t.subarray(n,n+16),r);return e},e.prototype.decryptAvcSample=function(e,t,n,r,i,o){var a=this.discardEPB(i.data),s=this.getAvcEncryptedData(a),u=this;this.decryptBuffer(s.buffer,function(s){i.data=u.getAvcDecryptedUnit(a,s),o||u.decryptAvcSamples(e,t,n+1,r)})},e.prototype.decryptAvcSamples=function(e,t,n,r){for(;;t++,n=0){if(t>=e.length)return void r();for(var i=e[t].units;!(n>=i.length);n++){var o=i[n];if(!(o.length<=48||1!==o.type&&5!==o.type)){var a=this.decrypter.isSync();if(this.decryptAvcSample(e,t,n,r,o,a),!a)return}}}},e}(),P=function(){function e(t,n,r,i){g(this,e),this.observer=t,this.config=r,this.typeSupported=i,this.remuxer=n,this.sampleAes=null}return e.prototype.setDecryptData=function(e){null!=e&&null!=e.key&&"SAMPLE-AES"===e.method?this.sampleAes=new C(this.observer,this.config,e,this.discardEPB):this.sampleAes=null},e.probe=function(t){var n=e._syncOffset(t);return!(n<0)&&(n&&M.b.warn("MPEG2-TS detected but first sync word found @ offset "+n+", junk ahead ?"),!0)},e._syncOffset=function(e){for(var t=Math.min(1e3,e.length-564),n=0;n<t;){if(71===e[n]&&71===e[n+188]&&71===e[n+376])return n;n++}return-1},e.prototype.resetInitSegment=function(e,t,n,r){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack={container:"video/mp2t",type:"video",id:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],len:0,dropped:0},this._audioTrack={container:"video/mp2t",type:"audio",id:-1,inputTimeScale:9e4,duration:r,sequenceNumber:0,samples:[],len:0,isAAC:!0},this._id3Track={type:"id3",id:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],len:0},this._txtTrack={type:"text",id:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],len:0},this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=t,this.videoCodec=n,this._duration=r},e.prototype.resetTimeStamp=function(){},e.prototype.append=function(t,n,r,i){var o,a,s,u,l,c=t.length,f=!1;this.contiguous=r;var d=this.pmtParsed,h=this._avcTrack,p=this._audioTrack,v=this._id3Track,m=h.id,g=p.id,y=v.id,b=this._pmtId,w=h.pesData,_=p.pesData,E=v.pesData,S=this._parsePAT,A=this._parsePMT,x=this._parsePES,L=this._parseAVCPES.bind(this),O=this._parseAACPES.bind(this),D=this._parseMPEGPES.bind(this),I=this._parseID3PES.bind(this),R=e._syncOffset(t);for(c-=(c+R)%188,o=R;o<c;o+=188)if(71===t[o]){if(a=!!(64&t[o+1]),s=((31&t[o+1])<<8)+t[o+2],(48&t[o+3])>>4>1){if((u=o+5+t[o+4])===o+188)continue}else u=o+4;switch(s){case m:a&&(w&&(l=x(w))&&L(l,!1),w={data:[],size:0}),w&&(w.data.push(t.subarray(u,o+188)),w.size+=o+188-u);break;case g:a&&(_&&(l=x(_))&&(p.isAAC?O(l):D(l)),_={data:[],size:0}),_&&(_.data.push(t.subarray(u,o+188)),_.size+=o+188-u);break;case y:a&&(E&&(l=x(E))&&I(l),E={data:[],size:0}),E&&(E.data.push(t.subarray(u,o+188)),E.size+=o+188-u);break;case 0:a&&(u+=t[u]+1),b=this._pmtId=S(t,u);break;case b:a&&(u+=t[u]+1);var N=A(t,u,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,null!=this.sampleAes);(m=N.avc)>0&&(h.id=m),(g=N.audio)>0&&(p.id=g,p.isAAC=N.isAAC),(y=N.id3)>0&&(v.id=y),f&&!d&&(M.b.log("reparse from beginning"),f=!1,o=R-188),d=this.pmtParsed=!0;break;case 17:case 8191:break;default:f=!0}}else this.observer.trigger(k.a.ERROR,{type:T.b.MEDIA_ERROR,details:T.a.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});w&&(l=x(w))?(L(l,!0),h.pesData=null):h.pesData=w,_&&(l=x(_))?(p.isAAC?O(l):D(l),p.pesData=null):(_&&_.size&&M.b.log("last AAC PES packet truncated,might overlap between fragments"),p.pesData=_),E&&(l=x(E))?(I(l),v.pesData=null):v.pesData=E,null==this.sampleAes?this.remuxer.remux(p,h,v,this._txtTrack,n,r,i):this.decryptAndRemux(p,h,v,this._txtTrack,n,r,i)},e.prototype.decryptAndRemux=function(e,t,n,r,i,o,a){if(e.samples&&e.isAAC){var s=this;this.sampleAes.decryptAacSamples(e.samples,0,function(){s.decryptAndRemuxAvc(e,t,n,r,i,o,a)})}else this.decryptAndRemuxAvc(e,t,n,r,i,o,a)},e.prototype.decryptAndRemuxAvc=function(e,t,n,r,i,o,a){if(t.samples){var s=this;this.sampleAes.decryptAvcSamples(t.samples,0,0,function(){s.remuxer.remux(e,t,n,r,i,o,a)})}else this.remuxer.remux(e,t,n,r,i,o,a)},e.prototype.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},e.prototype._parsePAT=function(e,t){return(31&e[t+10])<<8|e[t+11]},e.prototype._parsePMT=function(e,t,n,r){var i,o,a={audio:-1,avc:-1,id3:-1,isAAC:!0};for(i=t+3+((15&e[t+1])<<8|e[t+2])-4,t+=12+((15&e[t+10])<<8|e[t+11]);t<i;){switch(o=(31&e[t+1])<<8|e[t+2],e[t]){case 207:if(!r){M.b.log("unkown stream type:"+e[t]);break}case 15:-1===a.audio&&(a.audio=o);break;case 21:-1===a.id3&&(a.id3=o);break;case 219:if(!r){M.b.log("unkown stream type:"+e[t]);break}case 27:-1===a.avc&&(a.avc=o);break;case 3:case 4:n?-1===a.audio&&(a.audio=o,a.isAAC=!1):M.b.log("MPEG audio found, not supported in this browser for now");break;case 36:M.b.warn("HEVC stream type found, not supported for now");break;default:M.b.log("unkown stream type:"+e[t])}t+=5+((15&e[t+3])<<8|e[t+4])}return a},e.prototype._parsePES=function(e){var t,n,r,i,o,a,s,u,l=0,c=e.data;if(!e||0===e.size)return null;for(;c[0].length<19&&c.length>1;){var f=new Uint8Array(c[0].length+c[1].length);f.set(c[0]),f.set(c[1],c[0].length),c[0]=f,c.splice(1,1)}if(t=c[0],1===(t[0]<<16)+(t[1]<<8)+t[2]){if((r=(t[4]<<8)+t[5])&&r>e.size-6)return null;192&(n=t[7])&&((a=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2)>4294967295&&(a-=8589934592),64&n?((s=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2)>4294967295&&(s-=8589934592),a-s>54e5&&(M.b.warn(Math.round((a-s)/9e4)+"s delta between PTS and DTS, align them"),a=s)):s=a),u=(i=t[8])+9,e.size-=u,o=new Uint8Array(e.size);for(var d=0,h=c.length;d<h;d++){var p=(t=c[d]).byteLength;if(u){if(u>p){u-=p;continue}t=t.subarray(u),p-=u,u=0}o.set(t,l),l+=p}return r&&(r-=i+3),{data:o,pts:a,dts:s,len:r}}return null},e.prototype.pushAccesUnit=function(e,t){if(e.units.length&&e.frame){var n=t.samples,r=n.length;!this.config.forceKeyFrameOnDiscontinuity||!0===e.key||t.sps&&(r||this.contiguous)?(e.id=r,n.push(e)):t.dropped++}e.debug.length&&M.b.log(e.pts+"/"+e.dts+":"+e.debug)},e.prototype._parseAVCPES=function(e,t){var n,r,i,o=this,a=this._avcTrack,s=this._parseAVCNALu(e.data),u=this.avcSample,l=!1,c=this.pushAccesUnit.bind(this),f=function(e,t,n,r){return{key:e,pts:t,dts:n,units:[],debug:r}};e.data=null,u&&s.length&&!a.audFound&&(c(u,a),u=this.avcSample=f(!1,e.pts,e.dts,"")),s.forEach(function(t){switch(t.type){case 1:r=!0,u||(u=o.avcSample=f(!0,e.pts,e.dts,"")),u.frame=!0;var s=t.data;if(l&&s.length>4){var d=new N(s).readSliceType();2!==d&&4!==d&&7!==d&&9!==d||(u.key=!0)}break;case 5:r=!0,u||(u=o.avcSample=f(!0,e.pts,e.dts,"")),u.key=!0,u.frame=!0;break;case 6:r=!0,(n=new N(o.discardEPB(t.data))).readUByte();for(var h=0,p=0,v=!1,m=0;!v&&n.bytesAvailable>1;){h=0;do{h+=m=n.readUByte()}while(255===m);p=0;do{p+=m=n.readUByte()}while(255===m);if(4===h&&0!==n.bytesAvailable){if(v=!0,181===n.readUByte()&&49===n.readUShort()&&1195456820===n.readUInt()&&3===n.readUByte()){var g=n.readUByte(),y=31&g,b=[g,n.readUByte()];for(i=0;i<y;i++)b.push(n.readUByte()),b.push(n.readUByte()),b.push(n.readUByte());o._insertSampleInOrder(o._txtTrack.samples,{type:3,pts:e.pts,bytes:b})}}else if(p<n.bytesAvailable)for(i=0;i<p;i++)n.readUByte()}break;case 7:if(r=!0,l=!0,!a.sps){var w=(n=new N(t.data)).readSPS();a.width=w.width,a.height=w.height,a.pixelRatio=w.pixelRatio,a.sps=[t.data],a.duration=o._duration;var _=t.data.subarray(1,4),E="avc1.";for(i=0;i<3;i++){var S=_[i].toString(16);S.length<2&&(S="0"+S),E+=S}a.codec=E}break;case 8:r=!0,a.pps||(a.pps=[t.data]);break;case 9:r=!1,a.audFound=!0,u&&c(u,a),u=o.avcSample=f(!1,e.pts,e.dts,"");break;case 12:r=!1;break;default:r=!1,u&&(u.debug+="unknown NAL "+t.type+" ")}u&&r&&u.units.push(t)}),t&&u&&(c(u,a),this.avcSample=null)},e.prototype._insertSampleInOrder=function(e,t){var n=e.length;if(n>0){if(t.pts>=e[n-1].pts)e.push(t);else for(var r=n-1;r>=0;r--)if(t.pts<e[r].pts){e.splice(r,0,t);break}}else e.push(t)},e.prototype._getLastNalUnit=function(){var e=this.avcSample,t=void 0;if(!e||0===e.units.length){var n=this._avcTrack.samples;e=n[n.length-1]}if(e){var r=e.units;t=r[r.length-1]}return t},e.prototype._parseAVCNALu=function(e){var t,n,r,i,o=0,a=e.byteLength,s=this._avcTrack,u=s.naluState||0,l=u,c=[],f=-1;for(-1===u&&(f=0,i=31&e[0],u=0,o=1);o<a;)if(t=e[o++],u)if(1!==u)if(t)if(1===t){if(f>=0)r={data:e.subarray(f,o-u-1),type:i},c.push(r);else{var d=this._getLastNalUnit();if(d&&(l&&o<=4-l&&d.state&&(d.data=d.data.subarray(0,d.data.byteLength-l)),(n=o-u-1)>0)){var h=new Uint8Array(d.data.byteLength+n);h.set(d.data,0),h.set(e.subarray(0,n),d.data.byteLength),d.data=h}}o<a?(f=o,i=31&e[o],u=0):u=-1}else u=0;else u=3;else u=t?0:2;else u=t?0:1;if(f>=0&&u>=0&&(r={data:e.subarray(f,a),type:i,state:u},c.push(r)),0===c.length){var p=this._getLastNalUnit();if(p){var v=new Uint8Array(p.data.byteLength+e.byteLength);v.set(p.data,0),v.set(e,p.data.byteLength),p.data=v}}return s.naluState=u,c},e.prototype.discardEPB=function(e){for(var t,n,r=e.byteLength,i=[],o=1;o<r-2;)0===e[o]&&0===e[o+1]&&3===e[o+2]?(i.push(o+2),o+=2):o++;if(0===i.length)return e;t=r-i.length,n=new Uint8Array(t);var a=0;for(o=0;o<t;a++,o++)a===i[0]&&(a++,i.shift()),n[o]=e[a];return n},e.prototype._parseAACPES=function(e){var t,n,r,i,o,a=this._audioTrack,u=e.data,f=e.pts,h=this.aacOverFlow,p=this.aacLastPTS;if(h){var v=new Uint8Array(h.byteLength+u.byteLength);v.set(h,0),v.set(u,h.byteLength),u=v}for(r=0,o=u.length;r<o-1&&!s(u,r);r++);if(r){var m,g;if(r<o-1?(m="AAC PES did not start with ADTS header,offset:"+r,g=!1):(m="no ADTS header found in AAC PES",g=!0),M.b.warn("parsing error:"+m),this.observer.trigger(k.a.ERROR,{type:T.b.MEDIA_ERROR,details:T.a.FRAG_PARSING_ERROR,fatal:g,reason:m}),g)return}if(l(a,this.observer,u,r,this.audioCodec),n=0,t=c(a.samplerate),h&&p){var y=p+t;Math.abs(y-f)>1&&(M.b.log("AAC: align PTS for overlapping frames by "+Math.round((y-f)/90)),f=y)}for(;r<o;)if(s(u,r)&&r+5<o){var b=d(a,u,r,f,n);if(!b)break;r+=b.length,i=b.sample.pts,n++}else r++;h=r<o?u.subarray(r,o):null,this.aacOverFlow=h,this.aacLastPTS=i},e.prototype._parseMPEGPES=function(e){for(var t=e.data,n=t.length,r=0,i=0,o=e.pts;i<n;)if(R.isHeader(t,i)){var a=R.appendFrame(this._audioTrack,t,i,o,r);if(!a)break;i+=a.length,r++}else i++},e.prototype._parseID3PES=function(e){this._id3Track.samples.push(e)},e}(),j=function(){function e(t,n,r){y(this,e),this.observer=t,this.config=r,this.remuxer=n}return e.prototype.resetInitSegment=function(e,t,n,r){this._audioTrack={container:"audio/mpeg",type:"audio",id:-1,sequenceNumber:0,isAAC:!1,samples:[],len:0,manifestCodec:t,duration:r,inputTimeScale:9e4}},e.prototype.resetTimeStamp=function(){},e.probe=function(e){var t,n,r=x.a.getID3Data(e,0);if(r&&void 0!==x.a.getTimeStamp(r))for(t=r.length,n=Math.min(e.length-1,t+100);t<n;t++)if(R.probe(e,t))return M.b.log("MPEG Audio sync word found !"),!0;return!1},e.prototype.append=function(e,t,n,r){for(var i=x.a.getID3Data(e,0),o=90*x.a.getTimeStamp(i),a=i.length,s=e.length,u=0,l=0,c=this._audioTrack,f=[{pts:o,dts:o,data:i}];a<s;)if(R.isHeader(e,a)){var d=R.appendFrame(c,e,a,o,u);if(!d)break;a+=d.length,l=d.sample.pts,u++}else x.a.isHeader(e,a)?(i=x.a.getID3Data(e,a),f.push({pts:l,dts:l,data:i}),a+=i.length):a++;this.remuxer.remux(c,{samples:[]},{samples:f,inputTimeScale:9e4},{samples:[]},t,n,r)},e.prototype.destroy=function(){},e}(),F=function(){function e(){b(this,e)}return e.getSilentFrame=function(e,t){switch(e){case"mp4a.40.2":if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null},e}(),B=Math.pow(2,32)-1,z=function(){function e(){w(this,e)}return e.init=function(){e.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var t;for(t in e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var n=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),r=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);e.HDLR_TYPES={video:n,audio:r};var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),o=new Uint8Array([0,0,0,0,0,0,0,0]);e.STTS=e.STSC=e.STCO=o,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var a=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),u=new Uint8Array([0,0,0,1]);e.FTYP=e.box(e.types.ftyp,a,u,a,s),e.DINF=e.box(e.types.dinf,e.box(e.types.dref,i))},e.box=function(e){for(var t,n=Array.prototype.slice.call(arguments,1),r=8,i=n.length,o=i;i--;)r+=n[i].byteLength;for((t=new Uint8Array(r))[0]=r>>24&255,t[1]=r>>16&255,t[2]=r>>8&255,t[3]=255&r,t.set(e,4),i=0,r=8;i<o;i++)t.set(n[i],r),r+=n[i].byteLength;return t},e.hdlr=function(t){return e.box(e.types.hdlr,e.HDLR_TYPES[t])},e.mdat=function(t){return e.box(e.types.mdat,t)},e.mdhd=function(t,n){n*=t;var r=Math.floor(n/(B+1)),i=Math.floor(n%(B+1));return e.box(e.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,r>>24,r>>16&255,r>>8&255,255&r,i>>24,i>>16&255,i>>8&255,255&i,85,196,0,0]))},e.mdia=function(t){return e.box(e.types.mdia,e.mdhd(t.timescale,t.duration),e.hdlr(t.type),e.minf(t))},e.mfhd=function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))},e.minf=function(t){return"audio"===t.type?e.box(e.types.minf,e.box(e.types.smhd,e.SMHD),e.DINF,e.stbl(t)):e.box(e.types.minf,e.box(e.types.vmhd,e.VMHD),e.DINF,e.stbl(t))},e.moof=function(t,n,r){return e.box(e.types.moof,e.mfhd(t),e.traf(r,n))},e.moov=function(t){for(var n=t.length,r=[];n--;)r[n]=e.trak(t[n]);return e.box.apply(null,[e.types.moov,e.mvhd(t[0].timescale,t[0].duration)].concat(r).concat(e.mvex(t)))},e.mvex=function(t){for(var n=t.length,r=[];n--;)r[n]=e.trex(t[n]);return e.box.apply(null,[e.types.mvex].concat(r))},e.mvhd=function(t,n){n*=t;var r=Math.floor(n/(B+1)),i=Math.floor(n%(B+1)),o=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,r>>24,r>>16&255,r>>8&255,255&r,i>>24,i>>16&255,i>>8&255,255&i,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return e.box(e.types.mvhd,o)},e.sdtp=function(t){var n,r,i=t.samples||[],o=new Uint8Array(4+i.length);for(r=0;r<i.length;r++)n=i[r].flags,o[r+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return e.box(e.types.sdtp,o)},e.stbl=function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.STTS),e.box(e.types.stsc,e.STSC),e.box(e.types.stsz,e.STSZ),e.box(e.types.stco,e.STCO))},e.avc1=function(t){var n,r,i,o=[],a=[];for(n=0;n<t.sps.length;n++)i=(r=t.sps[n]).byteLength,o.push(i>>>8&255),o.push(255&i),o=o.concat(Array.prototype.slice.call(r));for(n=0;n<t.pps.length;n++)i=(r=t.pps[n]).byteLength,a.push(i>>>8&255),a.push(255&i),a=a.concat(Array.prototype.slice.call(r));var s=e.box(e.types.avcC,new Uint8Array([1,o[3],o[4],o[5],255,224|t.sps.length].concat(o).concat([t.pps.length]).concat(a))),u=t.width,l=t.height,c=t.pixelRatio[0],f=t.pixelRatio[1];return e.box(e.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,u>>8&255,255&u,l>>8&255,255&l,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s,e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),e.box(e.types.pasp,new Uint8Array([c>>24,c>>16&255,c>>8&255,255&c,f>>24,f>>16&255,f>>8&255,255&f])))},e.esds=function(e){var t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))},e.mp4a=function(t){var n=t.samplerate;return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]),e.box(e.types.esds,e.esds(t)))},e.mp3=function(t){var n=t.samplerate;return e.box(e.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]))},e.stsd=function(t){return"audio"===t.type?t.isAAC||"mp3"!==t.codec?e.box(e.types.stsd,e.STSD,e.mp4a(t)):e.box(e.types.stsd,e.STSD,e.mp3(t)):e.box(e.types.stsd,e.STSD,e.avc1(t))},e.tkhd=function(t){var n=t.id,r=t.duration*t.timescale,i=t.width,o=t.height,a=Math.floor(r/(B+1)),s=Math.floor(r%(B+1));return e.box(e.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,n>>24&255,n>>16&255,n>>8&255,255&n,0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a,s>>24,s>>16&255,s>>8&255,255&s,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,i>>8&255,255&i,0,0,o>>8&255,255&o,0,0]))},e.traf=function(t,n){var r=e.sdtp(t),i=t.id,o=Math.floor(n/(B+1)),a=Math.floor(n%(B+1));return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i])),e.box(e.types.tfdt,new Uint8Array([1,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,a>>24,a>>16&255,a>>8&255,255&a])),e.trun(t,r.length+16+20+8+16+8+8),r)},e.trak=function(t){return t.duration=t.duration||4294967295,e.box(e.types.trak,e.tkhd(t),e.mdia(t))},e.trex=function(t){var n=t.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},e.trun=function(t,n){var r,i,o,a,s,u,l=t.samples||[],c=l.length,f=12+16*c,d=new Uint8Array(f);for(n+=8+f,d.set([0,0,15,1,c>>>24&255,c>>>16&255,c>>>8&255,255&c,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0),r=0;r<c;r++)o=(i=l[r]).duration,a=i.size,s=i.flags,u=i.cts,d.set([o>>>24&255,o>>>16&255,o>>>8&255,255&o,a>>>24&255,a>>>16&255,a>>>8&255,255&a,s.isLeading<<2|s.dependsOn,s.isDependedOn<<6|s.hasRedundancy<<4|s.paddingValue<<1|s.isNonSync,61440&s.degradPrio,15&s.degradPrio,u>>>24&255,u>>>16&255,u>>>8&255,255&u],12+16*r);return e.box(e.types.trun,d)},e.initSegment=function(t){e.types||e.init();var n,r=e.moov(t);return(n=new Uint8Array(e.FTYP.byteLength+r.byteLength)).set(e.FTYP),n.set(r,e.FTYP.byteLength),n},e}(),U=function(){function e(t,n,r,i){_(this,e),this.observer=t,this.config=n,this.typeSupported=r;var o=navigator.userAgent;this.isSafari=i&&i.indexOf("Apple")>-1&&o&&!o.match("CriOS"),this.ISGenerated=!1}return e.prototype.destroy=function(){},e.prototype.resetTimeStamp=function(e){this._initPTS=this._initDTS=e},e.prototype.resetInitSegment=function(){this.ISGenerated=!1},e.prototype.remux=function(e,t,n,r,i,o,a){if(this.ISGenerated||this.generateIS(e,t,i),this.ISGenerated){var s=e.samples.length,u=t.samples.length,l=i,c=i;if(s&&u){var f=(e.samples[0].dts-t.samples[0].dts)/t.inputTimeScale;l+=Math.max(0,f),c+=Math.max(0,-f)}if(s){e.timescale||(M.b.warn("regenerate InitSegment as audio detected"),this.generateIS(e,t,i));var d=this.remuxAudio(e,l,o,a);if(u){var h=void 0;d&&(h=d.endPTS-d.startPTS),t.timescale||(M.b.warn("regenerate InitSegment as video detected"),this.generateIS(e,t,i)),this.remuxVideo(t,c,o,h,a)}}else{var p=void 0;u&&(p=this.remuxVideo(t,c,o,a)),p&&e.codec&&this.remuxEmptyAudio(e,l,o,p)}}n.samples.length&&this.remuxID3(n,i),r.samples.length&&this.remuxText(r,i),this.observer.trigger(k.a.FRAG_PARSED)},e.prototype.generateIS=function(e,t,n){var r,i,o=this.observer,a=e.samples,s=t.samples,u=this.typeSupported,l="audio/mp4",c={},f={tracks:c},d=void 0===this._initPTS;if(d&&(r=i=1/0),e.config&&a.length&&(e.timescale=e.samplerate,M.b.log("audio sampling rate : "+e.samplerate),e.isAAC||(u.mpeg?(l="audio/mpeg",e.codec=""):u.mp3&&(e.codec="mp3")),c.audio={container:l,codec:e.codec,initSegment:!e.isAAC&&u.mpeg?new Uint8Array:z.initSegment([e]),metadata:{channelCount:e.channelCount}},d&&(r=i=a[0].pts-e.inputTimeScale*n)),t.sps&&t.pps&&s.length){var h=t.inputTimeScale;t.timescale=h,c.video={container:"video/mp4",codec:t.codec,initSegment:z.initSegment([t]),metadata:{width:t.width,height:t.height}},d&&(r=Math.min(r,s[0].pts-h*n),i=Math.min(i,s[0].dts-h*n),this.observer.trigger(k.a.INIT_PTS_FOUND,{initPTS:r}))}Object.keys(c).length?(o.trigger(k.a.FRAG_PARSING_INIT_SEGMENT,f),this.ISGenerated=!0,d&&(this._initPTS=r,this._initDTS=i)):o.trigger(k.a.ERROR,{type:T.b.MEDIA_ERROR,details:T.a.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},e.prototype.remuxVideo=function(e,t,n,r,i){var o,a,s,u,l,c,f,d=8,h=e.timescale,p=e.samples,v=[],m=p.length,g=this._PTSNormalize,y=this._initDTS,b=this.nextAvcDts,w=this.isSafari;w&&(n|=p.length&&b&&(i&&Math.abs(t-b/h)<.1||Math.abs(p[0].pts-b-y)<h/5)),n||(b=t*h),p.forEach(function(e){e.pts=g(e.pts-y,b),e.dts=g(e.dts-y,b)}),p.sort(function(e,t){var n=e.dts-t.dts,r=e.pts-t.pts;return n||(r||e.id-t.id)});var _=p.reduce(function(e,t){return Math.max(Math.min(e,t.pts-t.dts),-18e3)},0);if(_<0){M.b.warn("PTS < DTS detected in video samples, shifting DTS by "+Math.round(_/90)+" ms to overcome this issue");for(var E=0;E<p.length;E++)p[E].dts+=_}var S=p[0];l=Math.max(S.dts,0),u=Math.max(S.pts,0);var A=Math.round((l-b)/90);n&&A&&(A>1?M.b.log("AVC:"+A+" ms hole between fragments detected,filling it"):A<-1&&M.b.log("AVC:"+-A+" ms overlapping between fragments detected"),l=b,p[0].dts=l,u=Math.max(u-A,b),p[0].pts=u,M.b.log("Video/PTS/DTS adjusted: "+Math.round(u/90)+"/"+Math.round(l/90)+",delta:"+A+" ms")),S=p[p.length-1],f=Math.max(S.dts,0),c=Math.max(S.pts,0,f),w&&(o=Math.round((f-l)/(p.length-1)));for(var x=0,L=0,O=0;O<m;O++){for(var D=p[O],I=D.units,R=I.length,N=0,C=0;C<R;C++)N+=I[C].data.length;L+=N,x+=R,D.length=N,D.dts=w?l+O*o:Math.max(D.dts,l),D.pts=Math.max(D.pts,D.dts)}var P=L+4*x+8;try{a=new Uint8Array(P)}catch(e){return void this.observer.trigger(k.a.ERROR,{type:T.b.MUX_ERROR,details:T.a.REMUX_ALLOC_ERROR,fatal:!1,bytes:P,reason:"fail allocating video mdat "+P})}var j=new DataView(a.buffer);j.setUint32(0,P),a.set(z.types.mdat,4);for(var F=0;F<m;F++){for(var B=p[F],U=B.units,G=0,W=void 0,H=0,V=U.length;H<V;H++){var Z=U[H],Y=Z.data,$=Z.data.byteLength;j.setUint32(d,$),d+=4,a.set(Y,d),d+=$,G+=4+$}if(w)W=Math.max(0,o*Math.round((B.pts-B.dts)/o));else{if(F<m-1)o=p[F+1].dts-B.dts;else{var J=this.config,K=B.dts-p[F>0?F-1:F].dts;if(J.stretchShortVideoTrack){var Q=J.maxBufferHole,X=J.maxSeekHole,q=Math.floor(Math.min(Q,X)*h),ee=(r?u+r*h:this.nextAudioPts)-B.pts;ee>q?((o=ee-K)<0&&(o=K),M.b.log("It is approximately "+ee/90+" ms to the next segment; using duration "+o/90+" ms for the last video frame.")):o=K}else o=K}W=Math.round(B.pts-B.dts)}v.push({size:G,duration:o,cts:W,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:B.key?2:1,isNonSync:B.key?0:1}})}this.nextAvcDts=f+o;var te=e.dropped;if(e.len=0,e.nbNalu=0,e.dropped=0,v.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var ne=v[0].flags;ne.dependsOn=2,ne.isNonSync=0}e.samples=v,s=z.moof(e.sequenceNumber++,l,e),e.samples=[];var re={data1:s,data2:a,startPTS:u/h,endPTS:(c+o)/h,startDTS:l/h,endDTS:this.nextAvcDts/h,type:"video",nb:v.length,dropped:te};return this.observer.trigger(k.a.FRAG_PARSING_DATA,re),re},e.prototype.remuxAudio=function(e,t,n,r){var i,o,a,s,u,l,c,f=e.inputTimeScale,d=f/e.timescale,h=(e.isAAC?1024:1152)*d,p=this._PTSNormalize,v=this._initDTS,m=!e.isAAC&&this.typeSupported.mpeg,g=e.samples,y=[],b=this.nextAudioPts;if((n|=g.length&&b&&(r&&Math.abs(t-b/f)<.1||Math.abs(g[0].pts-b-v)<20*h))||(b=t*f),g.forEach(function(e){e.pts=e.dts=p(e.pts-v,b)}),g.sort(function(e,t){return e.pts-t.pts}),r&&e.isAAC)for(var w=this.config.maxAudioFramesDrift,_=0,E=b;_<g.length;){var S,A=g[_];S=A.pts-E;var x=Math.abs(1e3*S/f);if(S<=-w*h)M.b.warn("Dropping 1 audio frame @ "+(E/f).toFixed(3)+"s due to "+Math.round(x)+" ms overlap."),g.splice(_,1),e.len-=A.unit.length;else if(S>=w*h&&x<1e4&&E){var L=Math.round(S/h);M.b.warn("Injecting "+L+" audio frame @ "+(E/f).toFixed(3)+"s due to "+Math.round(1e3*S/f)+" ms gap.");for(var O=0;O<L;O++){var D=Math.max(E,0);(a=F.getSilentFrame(e.manifestCodec||e.codec,e.channelCount))||(M.b.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),a=A.unit.subarray()),g.splice(_,0,{unit:a,pts:D,dts:D}),e.len+=a.length,E+=h,_++}A.pts=A.dts=E,E+=h,_++}else Math.abs(S),A.pts=A.dts=E,E+=h,_++}for(var I=0,R=g.length;I<R;I++){var N=g[I],C=N.unit,P=N.pts;if(void 0!==c)o.duration=Math.round((P-c)/d);else{var j=Math.round(1e3*(P-b)/f),B=0;if(n&&e.isAAC&&j){if(j>0&&j<1e4)B=Math.round((P-b)/h),M.b.log(j+" ms hole between AAC samples detected,filling it"),B>0&&((a=F.getSilentFrame(e.manifestCodec||e.codec,e.channelCount))||(a=C.subarray()),e.len+=B*a.length);else if(j<-12){M.b.log("drop overlapping AAC sample, expected/parsed/delta:"+(b/f).toFixed(3)+"s/"+(P/f).toFixed(3)+"s/"+-j+"ms"),e.len-=C.byteLength;continue}P=b}if(l=Math.max(0,P),!(e.len>0))return;var U=m?e.len:e.len+8;i=m?0:8;try{s=new Uint8Array(U)}catch(e){return void this.observer.trigger(k.a.ERROR,{type:T.b.MUX_ERROR,details:T.a.REMUX_ALLOC_ERROR,fatal:!1,bytes:U,reason:"fail allocating audio mdat "+U})}m||(new DataView(s.buffer).setUint32(0,U),s.set(z.types.mdat,4));for(var G=0;G<B;G++)(a=F.getSilentFrame(e.manifestCodec||e.codec,e.channelCount))||(M.b.log("Unable to get silent frame for given audio codec; duplicating this frame instead."),a=C.subarray()),s.set(a,i),i+=a.byteLength,o={size:a.byteLength,cts:0,duration:1024,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},y.push(o)}s.set(C,i);var W=C.byteLength;i+=W,o={size:W,cts:0,duration:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},y.push(o),c=P}var H=0,V=y.length;if(V>=2&&(H=y[V-2].duration,o.duration=H),V){this.nextAudioPts=b=c+d*H,e.len=0,e.samples=y,u=m?new Uint8Array:z.moof(e.sequenceNumber++,l/d,e),e.samples=[];var Z=l/f,Y=b/f,$={data1:u,data2:s,startPTS:Z,endPTS:Y,startDTS:Z,endDTS:Y,type:"audio",nb:V};return this.observer.trigger(k.a.FRAG_PARSING_DATA,$),$}return null},e.prototype.remuxEmptyAudio=function(e,t,n,r){var i=e.inputTimeScale,o=i/(e.samplerate?e.samplerate:i),a=this.nextAudioPts,s=(void 0!==a?a:r.startDTS*i)+this._initDTS,u=r.endDTS*i+this._initDTS,l=1024*o,c=Math.ceil((u-s)/l),f=F.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(M.b.warn("remux empty Audio"),f){for(var d=[],h=0;h<c;h++){var p=s+h*l;d.push({unit:f,pts:p,dts:p}),e.len+=f.length}e.samples=d,this.remuxAudio(e,t,n)}else M.b.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!")},e.prototype.remuxID3=function(e,t){var n,r=e.samples.length,i=e.inputTimeScale,o=this._initPTS,a=this._initDTS;if(r){for(var s=0;s<r;s++)(n=e.samples[s]).pts=(n.pts-o)/i,n.dts=(n.dts-a)/i;this.observer.trigger(k.a.FRAG_PARSING_METADATA,{samples:e.samples})}e.samples=[],t=t},e.prototype.remuxText=function(e,t){e.samples.sort(function(e,t){return e.pts-t.pts});var n,r=e.samples.length,i=e.inputTimeScale,o=this._initPTS;if(r){for(var a=0;a<r;a++)(n=e.samples[a]).pts=(n.pts-o)/i;this.observer.trigger(k.a.FRAG_PARSING_USERDATA,{samples:e.samples})}e.samples=[],t=t},e.prototype._PTSNormalize=function(e,t){var n;if(void 0===t)return e;for(n=t<e?-8589934592:8589934592;Math.abs(e-t)>4294967296;)e+=n;return e},e}(),G=function(){function e(t){E(this,e),this.observer=t}return e.prototype.destroy=function(){},e.prototype.resetTimeStamp=function(){},e.prototype.resetInitSegment=function(){},e.prototype.remux=function(e,t,n,r,i,o,a,s){var u=this.observer,l="";e&&(l+="audio"),t&&(l+="video"),u.trigger(k.a.FRAG_PARSING_DATA,{data1:s,startPTS:i,startDTS:i,type:l,nb:1,dropped:0}),u.trigger(k.a.FRAG_PARSED)},e}(),W=function(){function e(t,n,r,i){S(this,e),this.observer=t,this.typeSupported=n,this.config=r,this.vendor=i}return e.prototype.destroy=function(){var e=this.demuxer;e&&e.destroy()},e.prototype.push=function(e,t,n,r,i,o,a,s,u,l,c,f){if(e.byteLength>0&&null!=t&&null!=t.key&&"AES-128"===t.method){var d=this.decrypter;null==d&&(d=this.decrypter=new A.a(this.observer,this.config));var h,p=this;try{h=performance.now()}catch(e){h=Date.now()}d.decrypt(e,t.key.buffer,t.iv.buffer,function(e){var d;try{d=performance.now()}catch(e){d=Date.now()}p.observer.trigger(k.a.FRAG_DECRYPTED,{stats:{tstart:h,tdecrypt:d}}),p.pushDecrypted(new Uint8Array(e),t,new Uint8Array(n),r,i,o,a,s,u,l,c,f)})}else this.pushDecrypted(new Uint8Array(e),t,new Uint8Array(n),r,i,o,a,s,u,l,c,f)},e.prototype.pushDecrypted=function(e,t,n,r,i,o,a,s,u,l,c,f){var d=this.demuxer;if(!d||a&&!this.probe(e)){for(var h=this.observer,p=this.typeSupported,v=this.config,m=[{demux:P,remux:U},{demux:L,remux:U},{demux:j,remux:U},{demux:D,remux:G}],g=0,y=m.length;g<y;g++){var b=m[g],w=b.demux.probe;if(w(e)){var _=this.remuxer=new b.remux(h,v,p,this.vendor);d=new b.demux(h,_,v,p),this.probe=w;break}}if(!d)return void h.trigger(k.a.ERROR,{type:T.b.MEDIA_ERROR,details:T.a.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"});this.demuxer=d}var E=this.remuxer;(a||s)&&(d.resetInitSegment(n,r,i,l),E.resetInitSegment()),a&&(d.resetTimeStamp(f),E.resetTimeStamp(f)),"function"==typeof d.setDecryptData&&d.setDecryptData(t),d.append(e,o,u,c)},e}();t.a=W},function(e,t,n){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){var n=Pe[t];return!!n&&!0===n[e.slice(0,4)]}function a(e){return MediaSource.isTypeSupported('video/mp4;codecs="'+e+'"')}function s(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}function u(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)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(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}function d(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)}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(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}function v(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)}function m(){if("undefined"!=typeof window)return window.MediaSource||window.WebKitMediaSource}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t,n){var r=e[t],i=e[n],o=i.startPTS;isNaN(o)?i.start=n>t?r.start+r.duration:Math.max(r.start-i.duration,0):n>t?(r.duration=o-r.start,r.duration<0&&Oe.b.warn("negative duration computed for frag "+r.sn+",level "+r.level+", there should be some duration drift between playlist and fragment!")):(i.duration=r.start-o,i.duration<0&&Oe.b.warn("negative duration computed for frag "+i.sn+",level "+i.level+", there should be some duration drift between playlist and fragment!"))}function b(e,t,n,r,i,o){var a=n;if(!isNaN(t.startPTS)){var s=Math.abs(t.startPTS-n);isNaN(t.deltaPTS)?t.deltaPTS=s:t.deltaPTS=Math.max(s,t.deltaPTS),a=Math.max(n,t.startPTS),n=Math.min(n,t.startPTS),r=Math.max(r,t.endPTS),i=Math.min(i,t.startDTS),o=Math.max(o,t.endDTS)}var u=n-t.start;t.start=t.startPTS=n,t.maxStartPTS=a,t.endPTS=r,t.startDTS=i,t.endDTS=o,t.duration=r-n;var l=t.sn;if(!e||l<e.startSN||l>e.endSN)return 0;var c,f,d;for(c=l-e.startSN,(f=e.fragments)[c]=t,d=c;d>0;d--)y(f,d,d-1);for(d=c;d<f.length-1;d++)y(f,d,d+1);return e.PTSKnown=!0,u}function w(e,t){var n,r=Math.max(e.startSN,t.startSN)-t.startSN,i=Math.min(e.endSN,t.endSN)-t.startSN,o=t.startSN-e.startSN,a=e.fragments,s=t.fragments,u=0;if(i<r)t.PTSKnown=!1;else{for(var l=r;l<=i;l++){var c=a[o+l],f=s[l];f&&c&&(u=c.cc-f.cc,isNaN(c.startPTS)||(f.start=f.startPTS=c.startPTS,f.endPTS=c.endPTS,f.duration=c.duration,f.backtracked=c.backtracked,f.dropped=c.dropped,n=f))}if(u)for(Oe.b.log("discontinuity sliding from playlist, take drift into account"),l=0;l<s.length;l++)s[l].cc+=u;if(n)b(t,n,n.startPTS,n.endPTS,n.startDTS,n.endDTS);else if(o>=0&&o<a.length){var d=a[o].start;for(l=0;l<s.length;l++)s[l].start+=d}t.PTSKnown=e.PTSKnown}}function _(e,t){for(var n=null,r=0;r<e.length;r+=1){var i=e[r];if(i&&i.cc===t){n=i;break}}return n}function E(e,t){return Ye.search(e,function(e){return e.cc<t?1:e.cc>t?-1:0})}function S(e,t,n){var r=!1;return t&&t.details&&n&&(n.endCC>n.startCC||e&&e.cc<n.startCC)&&(r=!0),r}function k(e,t){var n=e.fragments,r=t.fragments;if(r.length&&n.length){var i=_(n,r[0].cc);if(i&&(!i||i.startPTS))return i;Oe.b.log("No frag in previous level to align on")}else Oe.b.log("No fragments to align")}function T(e,t){t.fragments.forEach(function(t){if(t){var n=t.start+e;t.start=t.startPTS=n,t.endPTS=n+t.duration}}),t.PTSKnown=!0}function A(e,t,n){if(S(e,t,n)){var r=k(t.details,n);r&&(Oe.b.log("Adjusting PTS using last level due to CC increase within current level"),T(r.start,n))}if(!1===n.PTSKnown&&t&&t.details){var i=t.details.programDateTime,o=(n.programDateTime-i)/1e3+t.details.fragments[0].start;isNaN(o)||(Oe.b.log("adjusting PTS using programDateTime delta, sliding:"+o.toFixed(3)),T(o,n))}}function M(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(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}function L(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)}function O(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function D(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}function I(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)}function R(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function N(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}function C(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)}function P(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function B(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}function z(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)}function U(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function G(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}function W(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)}function H(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function V(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}function Z(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)}function Y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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}function J(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)}function K(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function X(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}function q(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)}function ee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function te(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}function ne(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)}function re(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new At,this.regionList=[]}function ie(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+(0|r)/1e3}var n=e.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}function oe(){this.values=Object.create(null)}function ae(e,t,n,r){var i=r?e.split(r):[e];for(var o in i)if("string"==typeof i[o]){var a=i[o].split(n);2===a.length&&t(a[0],a[1])}}function se(e,t,n){function r(){var t=ie(e);if(null===t)throw new Error("Malformed timestamp: "+o);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function i(){e=e.replace(/^\s+/,"")}var o=e;if(i(),t.startTime=r(),i(),"--\x3e"!==e.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+o);e=e.substr(3),i(),t.endTime=r(),i(),function(e,t){var r=new oe;ae(e,function(e,t){switch(e){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===t){r.set(e,n[i].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var o=t.split(","),a=o[0];r.integer(e,a),r.percent(e,a)&&r.set("snapToLines",!1),r.alt(e,a,["auto"]),2===o.length&&r.alt("lineAlign",o[1],["start",xt,"end"]);break;case"position":o=t.split(","),r.percent(e,o[0]),2===o.length&&r.alt("positionAlign",o[1],["start",xt,"end","line-left","line-right","auto"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start",xt,"end","left","right"])}},/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical","");var i=r.get("line","auto");"auto"===i&&-1===Mt.line&&(i=-1),t.line=i,t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100),t.align=r.get("align",xt);var o=r.get("position","auto");"auto"===o&&50===Mt.position&&(o="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=o}(e,t)}function ue(e){return e.replace(/<br(?: \/)?>/gi,"\n")}function le(e,t,n,r){for(var i,o,a,s,u,l=window.VTTCue||window.TextTrackCue,c=0;c<r.rows.length;c++)if(i=r.rows[c],a=!0,s=0,u="",!i.isEmpty()){for(var f=0;f<i.chars.length;f++)i.chars[f].uchar.match(/\s/)&&a?s++:(u+=i.chars[f].uchar,a=!1);i.cueStartTime=t,t===n&&(n+=1e-4),o=new l(t,n,ue(u.trim())),s>=16?s--:s++,navigator.userAgent.match(/Firefox\//)?o.line=c+1:o.line=c>7?c-2:c+1,o.align="left",o.position=Math.max(0,Math.min(100,s/32*100+(navigator.userAgent.match(/Firefox\//)?50:0))),e.addCue(o)}}function ce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function de(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}function he(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)}function pe(e){if(e&&e.cues)for(;e.cues.length>0;)e.removeCue(e.cues[0])}function ve(e,t){return e&&e.label===t.name&&!(e.textTrack1||e.textTrack2)}function me(e,t,n,r){return Math.min(t,r)-Math.max(e,n)}function ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ye(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}function be(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)}function we(e){for(var t=[],n=0;n<e.length;n++)"subtitles"===e[n].kind&&t.push(e[n]);return t}function _e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ee(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}function Se(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)}function ke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var Te={};n.d(Te,"newCue",function(){return le});var Ae=n(6),Me=n.n(Ae),xe=n(1),Le=n(2),Oe=n(0),De="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},Ie=function(){function e(t){r(this,e),this.hls=t,this.onEvent=this.onEvent.bind(this);for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];this.handledEvents=i,this.useGenericHandler=!0,this.registerListeners()}return e.prototype.destroy=function(){this.unregisterListeners()},e.prototype.isEventHandler=function(){return"object"===De(this.handledEvents)&&this.handledEvents.length&&"function"==typeof this.onEvent},e.prototype.registerListeners=function(){this.isEventHandler()&&this.handledEvents.forEach(function(e){if("hlsEventGeneric"===e)throw new Error("Forbidden event name: "+e);this.hls.on(e,this.onEvent)},this)},e.prototype.unregisterListeners=function(){this.isEventHandler()&&this.handledEvents.forEach(function(e){this.hls.off(e,this.onEvent)},this)},e.prototype.onEvent=function(e,t){this.onEventGeneric(e,t)},e.prototype.onEventGeneric=function(e,t){try{(function(e,t){var n="on"+e.replace("hls","");if("function"!=typeof this[n])throw new Error("Event "+e+" has no generic handler in this "+this.constructor.name+" class (tried "+n+")");return this[n].bind(this,t)}).call(this,e,t).call()}catch(t){Oe.b.error("internal error happened while processing "+e+":"+t.message),this.hls.trigger(xe.a.ERROR,{type:Le.b.OTHER_ERROR,details:Le.a.INTERNAL_EXCEPTION,fatal:!1,event:e,err:t})}},e}(),Re=/^(\d+)x(\d+)$/,Ne=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,Ce=function(){function e(t){i(this,e),"string"==typeof t&&(t=e.parseAttrList(t));for(var n in t)t.hasOwnProperty(n)&&(this[n]=t[n])}return e.prototype.decimalInteger=function(e){var t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t},e.prototype.hexadecimalInteger=function(e){if(this[e]){var t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;for(var n=new Uint8Array(t.length/2),r=0;r<t.length/2;r++)n[r]=parseInt(t.slice(2*r,2*r+2),16);return n}return null},e.prototype.hexadecimalIntegerAsNumber=function(e){var t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t},e.prototype.decimalFloatingPoint=function(e){return parseFloat(this[e])},e.prototype.enumeratedString=function(e){return this[e]},e.prototype.decimalResolution=function(e){var t=Re.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}},e.parseAttrList=function(e){var t,n={};for(Ne.lastIndex=0;null!==(t=Ne.exec(e));){var r=t[2];0===r.indexOf('"')&&r.lastIndexOf('"')===r.length-1&&(r=r.slice(1,-1)),n[t[1]]=r}return n},e}(),Pe={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0}},je=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),Fe=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g,Be=/#EXT-X-MEDIA:(.*)/g,ze=new RegExp([/#EXTINF:(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/|(?!#)(\S+)/.source,/|#EXT-X-BYTERANGE:*(.+)/.source,/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/|#.*/.source].join(""),"g"),Ue=/(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE): *(\d+))|(?:#EXT-X-(TARGETDURATION): *(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DISCONTINUITY-SEQ)UENCE:(\d+))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(VERSION):(\d+))|(?:#EXT-X-(MAP):(.+))|(?:(#)(.*):(.*))|(?:(#)(.*))(?:.*)\r?\n?/,Ge=function(){function e(){l(this,e),this.method=null,this.key=null,this.iv=null,this._uri=null}return je(e,[{key:"uri",get:function(){return!this._uri&&this.reluri&&(this._uri=Me.a.buildAbsoluteURL(this.baseuri,this.reluri,{alwaysNormalize:!0})),this._uri}}]),e}(),We=function(){function e(){l(this,e),this._url=null,this._byteRange=null,this._decryptdata=null,this.tagList=[]}return e.prototype.createInitializationVector=function(e){for(var t=new Uint8Array(16),n=12;n<16;n++)t[n]=e>>8*(15-n)&255;return t},e.prototype.fragmentDecryptdataFromLevelkey=function(e,t){var n=e;return e&&e.method&&e.uri&&!e.iv&&((n=new Ge).method=e.method,n.baseuri=e.baseuri,n.reluri=e.reluri,n.iv=this.createInitializationVector(t)),n},e.prototype.cloneObj=function(e){return JSON.parse(JSON.stringify(e))},je(e,[{key:"url",get:function(){return!this._url&&this.relurl&&(this._url=Me.a.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url},set:function(e){this._url=e}},{key:"programDateTime",get:function(){return!this._programDateTime&&this.rawProgramDateTime&&(this._programDateTime=new Date(Date.parse(this.rawProgramDateTime))),this._programDateTime}},{key:"byteRange",get:function(){if(!this._byteRange){var e=this._byteRange=[];if(this.rawByteRange){var t=this.rawByteRange.split("@",2);if(1===t.length){var n=this.lastByteRangeEndOffset;e[0]=n||0}else e[0]=parseInt(t[1]);e[1]=parseInt(t[0])+e[0]}}return this._byteRange}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"decryptdata",get:function(){return this._decryptdata||(this._decryptdata=this.fragmentDecryptdataFromLevelkey(this.levelkey,this.sn)),this._decryptdata}}]),e}(),He=function(e){function t(n){l(this,t);var r=s(this,e.call(this,n,xe.a.MANIFEST_LOADING,xe.a.LEVEL_LOADING,xe.a.AUDIO_TRACK_LOADING,xe.a.SUBTITLE_TRACK_LOADING));return r.loaders={},r}return u(t,e),t.prototype.destroy=function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy()}this.loaders={},Ie.prototype.destroy.call(this)},t.prototype.onManifestLoading=function(e){this.load(e.url,{type:"manifest"})},t.prototype.onLevelLoading=function(e){this.load(e.url,{type:"level",level:e.level,id:e.id})},t.prototype.onAudioTrackLoading=function(e){this.load(e.url,{type:"audioTrack",id:e.id})},t.prototype.onSubtitleTrackLoading=function(e){this.load(e.url,{type:"subtitleTrack",id:e.id})},t.prototype.load=function(e,t){var n=this.loaders[t.type];if(n){var r=n.context;if(r&&r.url===e)return void Oe.b.trace("playlist request ongoing");Oe.b.warn("abort previous loader for type:"+t.type),n.abort()}var i=this.hls.config,o=void 0,a=void 0,s=void 0,u=void 0;"manifest"===t.type?(o=i.manifestLoadingMaxRetry,a=i.manifestLoadingTimeOut,s=i.manifestLoadingRetryDelay,u=i.manifestLoadingMaxRetryTimeout):(o=i.levelLoadingMaxRetry,a=i.levelLoadingTimeOut,s=i.levelLoadingRetryDelay,u=i.levelLoadingMaxRetryTimeout,Oe.b.log("loading playlist for "+t.type+" "+(t.level||t.id))),n=this.loaders[t.type]=t.loader=void 0!==i.pLoader?new i.pLoader(i):new i.loader(i),t.url=e,t.responseType="";var l=void 0,c=void 0;l={timeout:a,maxRetry:o,retryDelay:s,maxRetryDelay:u},c={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)},n.load(t,l,c)},t.prototype.resolve=function(e,t){return Me.a.buildAbsoluteURL(t,e,{alwaysNormalize:!0})},t.prototype.parseMasterPlaylist=function(e,t){var n=[],r=void 0;for(Fe.lastIndex=0;null!=(r=Fe.exec(e));){var i={},a=i.attrs=new Ce(r[1]);i.url=this.resolve(r[2],t);var s=a.decimalResolution("RESOLUTION");s&&(i.width=s.width,i.height=s.height),i.bitrate=a.decimalInteger("AVERAGE-BANDWIDTH")||a.decimalInteger("BANDWIDTH"),i.name=a.NAME,function(e,t){["video","audio"].forEach(function(n){var r=e.filter(function(e){return o(e,n)});if(r.length){var i=r.filter(function(e){return 0===e.lastIndexOf("avc1",0)||0===e.lastIndexOf("mp4a",0)});t[n+"Codec"]=i.length>0?i[0]:r[0],e=e.filter(function(e){return-1===r.indexOf(e)})}}),t.unknownCodecs=e}([].concat((a.CODECS||"").split(/[ ,]+/)),i),i.videoCodec&&-1!==i.videoCodec.indexOf("avc1")&&(i.videoCodec=this.avc1toavcoti(i.videoCodec)),n.push(i)}return n},t.prototype.parseMasterPlaylistMedia=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=void 0,o=[],a=0;for(Be.lastIndex=0;null!=(i=Be.exec(e));){var s={},u=new Ce(i[1]);u.TYPE===n&&(s.groupId=u["GROUP-ID"],s.name=u.NAME,s.type=n,s.default="YES"===u.DEFAULT,s.autoselect="YES"===u.AUTOSELECT,s.forced="YES"===u.FORCED,u.URI&&(s.url=this.resolve(u.URI,t)),s.lang=u.LANGUAGE,s.name||(s.name=s.lang),r&&(s.audioCodec=r),s.id=a++,o.push(s))}return o},t.prototype.avc1toavcoti=function(e){var t,n=e.split(".");return n.length>2?(t=n.shift()+".",t+=parseInt(n.shift()).toString(16),t+=("000"+parseInt(n.shift()).toString(16)).substr(-4)):t=e,t},t.prototype.parseLevelPlaylist=function(e,t,n,r){var i,o,a=0,s=0,u={type:null,version:null,url:t,fragments:[],live:!0,startSN:0},l=new Ge,c=0,f=null,d=new We;for(ze.lastIndex=0;null!==(i=ze.exec(e));){var h=i[1];if(h){d.duration=parseFloat(h);var p=(" "+i[2]).slice(1);d.title=p||null,d.tagList.push(p?["INF",h,p]:["INF",h])}else if(i[3]){if(!isNaN(d.duration)){var v=a++;d.type=r,d.start=s,d.levelkey=l,d.sn=v,d.level=n,d.cc=c,d.baseurl=t,d.relurl=(" "+i[3]).slice(1),u.fragments.push(d),f=d,s+=d.duration,d=new We}}else if(i[4]){if(d.rawByteRange=(" "+i[4]).slice(1),f){var m=f.byteRangeEndOffset;m&&(d.lastByteRangeEndOffset=m)}}else if(i[5])d.rawProgramDateTime=(" "+i[5]).slice(1),d.tagList.push(["PROGRAM-DATE-TIME",d.rawProgramDateTime]),void 0===u.programDateTime&&(u.programDateTime=new Date(new Date(Date.parse(i[5]))-1e3*s));else{for(i=i[0].match(Ue),o=1;o<i.length&&void 0===i[o];o++);var g=(" "+i[o+1]).slice(1),y=(" "+i[o+2]).slice(1);switch(i[o]){case"#":d.tagList.push(y?[g,y]:[g]);break;case"PLAYLIST-TYPE":u.type=g.toUpperCase();break;case"MEDIA-SEQUENCE":a=u.startSN=parseInt(g);break;case"TARGETDURATION":u.targetduration=parseFloat(g);break;case"VERSION":u.version=parseInt(g);break;case"EXTM3U":break;case"ENDLIST":u.live=!1;break;case"DIS":c++,d.tagList.push(["DIS"]);break;case"DISCONTINUITY-SEQ":c=parseInt(g);break;case"KEY":var b=new Ce(g),w=b.enumeratedString("METHOD"),_=b.URI,E=b.hexadecimalInteger("IV");w&&(l=new Ge,_&&["AES-128","SAMPLE-AES"].indexOf(w)>=0&&(l.method=w,l.baseuri=t,l.reluri=_,l.key=null,l.iv=E));break;case"START":var S=new Ce(g).decimalFloatingPoint("TIME-OFFSET");isNaN(S)||(u.startTimeOffset=S);break;case"MAP":var k=new Ce(g);d.relurl=k.URI,d.rawByteRange=k.BYTERANGE,d.baseurl=t,d.level=n,d.type=r,d.sn="initSegment",u.initSegment=d,d=new We;break;default:Oe.b.warn("line parsed but not handled: "+i)}}}return(d=f)&&!d.relurl&&(u.fragments.pop(),s-=d.duration),u.totalduration=s,u.averagetargetduration=s/u.fragments.length,u.endSN=a-1,u.startCC=u.fragments[0]?u.fragments[0].cc:0,u.endCC=c,u},t.prototype.loadsuccess=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=e.data,o=e.url,a=n.type,s=n.id,u=n.level,l=this.hls;if(this.loaders[a]=void 0,void 0!==o&&0!==o.indexOf("data:")||(o=n.url),t.tload=performance.now(),0===i.indexOf("#EXTM3U"))if(i.indexOf("#EXTINF:")>0){var c="audioTrack"!==a&&"subtitleTrack"!==a,f=isNaN(u)?isNaN(s)?0:s:u,d=this.parseLevelPlaylist(i,o,f,"audioTrack"===a?"audio":"subtitleTrack"===a?"subtitle":"main");d.tload=t.tload,"manifest"===a&&l.trigger(xe.a.MANIFEST_LOADED,{levels:[{url:o,details:d}],audioTracks:[],url:o,stats:t,networkDetails:r}),t.tparsed=performance.now(),d.targetduration?c?l.trigger(xe.a.LEVEL_LOADED,{details:d,level:u||0,id:s||0,stats:t,networkDetails:r}):"audioTrack"===a?l.trigger(xe.a.AUDIO_TRACK_LOADED,{details:d,id:s,stats:t,networkDetails:r}):"subtitleTrack"===a&&l.trigger(xe.a.SUBTITLE_TRACK_LOADED,{details:d,id:s,stats:t,networkDetails:r}):l.trigger(xe.a.ERROR,{type:Le.b.NETWORK_ERROR,details:Le.a.MANIFEST_PARSING_ERROR,fatal:!0,url:o,reason:"invalid targetduration",networkDetails:r})}else{var h=this.parseMasterPlaylist(i,o);if(h.length){var p=this.parseMasterPlaylistMedia(i,o,"AUDIO",h[0].audioCodec),v=this.parseMasterPlaylistMedia(i,o,"SUBTITLES");if(p.length){var m=!1;p.forEach(function(e){e.url||(m=!0)}),!1===m&&h[0].audioCodec&&!h[0].attrs.AUDIO&&(Oe.b.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),p.unshift({type:"main",name:"main"}))}l.trigger(xe.a.MANIFEST_LOADED,{levels:h,audioTracks:p,subtitles:v,url:o,stats:t,networkDetails:r})}else l.trigger(xe.a.ERROR,{type:Le.b.NETWORK_ERROR,details:Le.a.MANIFEST_PARSING_ERROR,fatal:!0,url:o,reason:"no level found in manifest",networkDetails:r})}else l.trigger(xe.a.ERROR,{type:Le.b.NETWORK_ERROR,details:Le.a.MANIFEST_PARSING_ERROR,fatal:!0,url:o,reason:"no EXTM3U delimiter",networkDetails:r})},t.prototype.loaderror=function(e,t){var n,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=t.loader;switch(t.type){case"manifest":n=Le.a.MANIFEST_LOAD_ERROR,r=!0;break;case"level":n=Le.a.LEVEL_LOAD_ERROR,r=!1;break;case"audioTrack":n=Le.a.AUDIO_TRACK_LOAD_ERROR,r=!1}o&&(o.abort(),this.loaders[t.type]=void 0),this.hls.trigger(xe.a.ERROR,{type:Le.b.NETWORK_ERROR,details:n,fatal:r,url:o.url,loader:o,response:e,context:t,networkDetails:i})},t.prototype.loadtimeout=function(e,t){var n,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=t.loader;switch(t.type){case"manifest":n=Le.a.MANIFEST_LOAD_TIMEOUT,r=!0;break;case"level":n=Le.a.LEVEL_LOAD_TIMEOUT,r=!1;break;case"audioTrack":n=Le.a.AUDIO_TRACK_LOAD_TIMEOUT,r=!1}o&&(o.abort(),this.loaders[t.type]=void 0),this.hls.trigger(xe.a.ERROR,{type:Le.b.NETWORK_ERROR,details:n,fatal:r,url:o.url,loader:o,context:t,networkDetails:i})},t}(Ie),Ve=function(e){function t(n){c(this,t);var r=f(this,e.call(this,n,xe.a.FRAG_LOADING));return r.loaders={},r}return d(t,e),t.prototype.destroy=function(){var e=this.loaders;for(var t in e){var n=e[t];n&&n.destroy()}this.loaders={},Ie.prototype.destroy.call(this)},t.prototype.onFragLoading=function(e){var t=e.frag,n=t.type,r=this.loaders[n],i=this.hls.config;t.loaded=0,r&&(Oe.b.warn("abort previous fragment loader for type:"+n),r.abort()),r=this.loaders[n]=t.loader=void 0!==i.fLoader?new i.fLoader(i):new i.loader(i);var o=void 0,a=void 0,s=void 0;o={url:t.url,frag:t,responseType:"arraybuffer",progressData:!1};var u=t.byteRangeStartOffset,l=t.byteRangeEndOffset;isNaN(u)||isNaN(l)||(o.rangeStart=u,o.rangeEnd=l),a={timeout:i.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:i.fragLoadingMaxRetryTimeout},s={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},r.load(o,a,s)},t.prototype.loadsuccess=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=e.data,o=n.frag;o.loader=void 0,this.loaders[o.type]=void 0,this.hls.trigger(xe.a.FRAG_LOADED,{payload:i,frag:o,stats:t,networkDetails:r})},t.prototype.loaderror=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=t.loader;r&&r.abort(),this.loaders[t.type]=void 0,this.hls.trigger(xe.a.ERROR,{type:Le.b.NETWORK_ERROR,details:Le.a.FRAG_LOAD_ERROR,fatal:!1,frag:t.frag,response:e,networkDetails:n})},t.prototype.loadtimeout=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=t.loader;r&&r.abort(),this.loaders[t.type]=void 0,this.hls.trigger(xe.a.ERROR,{type:Le.b.NETWORK_ERROR,details:Le.a.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t.frag,networkDetails:n})},t.prototype.loadprogress=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=t.frag;i.loaded=e.loaded,this.hls.trigger(xe.a.FRAG_LOAD_PROGRESS,{frag:i,stats:e,networkDetails:r})},t}(Ie),Ze=function(e){function t(n){h(this,t);var r=p(this,e.call(this,n,xe.a.KEY_LOADING));return r.loaders={},r.decryptkey=null,r.decrypturl=null,r}return v(t,e),t.prototype.destroy=function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy()}this.loaders={},Ie.prototype.destroy.call(this)},t.prototype.onKeyLoading=function(e){var t=e.frag,n=t.type,r=this.loaders[n],i=t.decryptdata,o=i.uri;if(o!==this.decrypturl||null===this.decryptkey){var a=this.hls.config;r&&(Oe.b.warn("abort previous key loader for type:"+n),r.abort()),t.loader=this.loaders[n]=new a.loader(a),this.decrypturl=o,this.decryptkey=null;var s=void 0,u=void 0,l=void 0;s={url:o,frag:t,responseType:"arraybuffer"},u={timeout:a.fragLoadingTimeOut,maxRetry:a.fragLoadingMaxRetry,retryDelay:a.fragLoadingRetryDelay,maxRetryDelay:a.fragLoadingMaxRetryTimeout},l={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)},t.loader.load(s,u,l)}else this.decryptkey&&(i.key=this.decryptkey,this.hls.trigger(xe.a.KEY_LOADED,{frag:t}))},t.prototype.loadsuccess=function(e,t,n){var r=n.frag;this.decryptkey=r.decryptdata.key=new Uint8Array(e.data),r.loader=void 0,this.loaders[r.type]=void 0,this.hls.trigger(xe.a.KEY_LOADED,{frag:r})},t.prototype.loaderror=function(e,t){var n=t.frag,r=n.loader;r&&r.abort(),this.loaders[t.type]=void 0,this.hls.trigger(xe.a.ERROR,{type:Le.b.NETWORK_ERROR,details:Le.a.KEY_LOAD_ERROR,fatal:!1,frag:n,response:e})},t.prototype.loadtimeout=function(e,t){var n=t.frag,r=n.loader;r&&r.abort(),this.loaders[t.type]=void 0,this.hls.trigger(xe.a.ERROR,{type:Le.b.NETWORK_ERROR,details:Le.a.KEY_LOAD_TIMEOUT,fatal:!1,frag:n})},t}(Ie),Ye={search:function(e,t){for(var n=0,r=e.length-1,i=null,o=null;n<=r;){var a=t(o=e[i=(n+r)/2|0]);if(a>0)n=i+1;else{if(!(a<0))return o;r=i-1}}return null}},$e={isBuffered:function(e,t){if(e)for(var n=e.buffered,r=0;r<n.length;r++)if(t>=n.start(r)&&t<=n.end(r))return!0;return!1},bufferInfo:function(e,t,n){if(e){var r,i=e.buffered,o=[];for(r=0;r<i.length;r++)o.push({start:i.start(r),end:i.end(r)});return this.bufferedInfo(o,t,n)}return{len:0,start:t,end:t,nextStart:void 0}},bufferedInfo:function(e,t,n){var r,i,o,a,s,u=[];for(e.sort(function(e,t){var n=e.start-t.start;return n||t.end-e.end}),s=0;s<e.length;s++){var l=u.length;if(l){var c=u[l-1].end;e[s].start-c<n?e[s].end>c&&(u[l-1].end=e[s].end):u.push(e[s])}else u.push(e[s])}for(s=0,r=0,i=o=t;s<u.length;s++){var f=u[s].start,d=u[s].end;if(t+n>=f&&t<d)i=f,r=(o=d)-t;else if(t+n<f){a=f;break}}return{len:r,start:i,end:o,nextStart:a}}},Je=n(7),Ke=n(5),Qe=n.n(Ke),Xe=n(9),qe=n.n(Xe),et=m(),tt=function(){function e(t,n){g(this,e),this.hls=t,this.id=n;var r=this.observer=new Qe.a,i=t.config;r.trigger=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];r.emit.apply(r,[e,e].concat(n))},r.off=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];r.removeListener.apply(r,[e].concat(n))};var o=function(e,n){(n=n||{}).frag=this.frag,n.id=this.id,t.trigger(e,n)}.bind(this);r.on(xe.a.FRAG_DECRYPTED,o),r.on(xe.a.FRAG_PARSING_INIT_SEGMENT,o),r.on(xe.a.FRAG_PARSING_DATA,o),r.on(xe.a.FRAG_PARSED,o),r.on(xe.a.ERROR,o),r.on(xe.a.FRAG_PARSING_METADATA,o),r.on(xe.a.FRAG_PARSING_USERDATA,o),r.on(xe.a.INIT_PTS_FOUND,o);var a={mp4:et.isTypeSupported("video/mp4"),mpeg:et.isTypeSupported("audio/mpeg"),mp3:et.isTypeSupported('audio/mp4; codecs="mp3"')},s=navigator.vendor;if(i.enableWorker&&"undefined"!=typeof Worker){Oe.b.log("demuxing in webworker");var u=void 0;try{u=this.w=qe()(10),this.onwmsg=this.onWorkerMessage.bind(this),u.addEventListener("message",this.onwmsg),u.onerror=function(e){t.trigger(xe.a.ERROR,{type:Le.b.OTHER_ERROR,details:Le.a.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",err:{message:e.message+" ("+e.filename+":"+e.lineno+")"}})},u.postMessage({cmd:"init",typeSupported:a,vendor:s,id:n,config:JSON.stringify(i)})}catch(e){Oe.b.error("error while initializing DemuxerWorker, fallback on DemuxerInline"),u&&URL.revokeObjectURL(u.objectURL),this.demuxer=new Je.a(r,a,i,s),this.w=void 0}}else this.demuxer=new Je.a(r,a,i,s)}return e.prototype.destroy=function(){var e=this.w;if(e)e.removeEventListener("message",this.onwmsg),e.terminate(),this.w=null;else{var t=this.demuxer;t&&(t.destroy(),this.demuxer=null)}var n=this.observer;n&&(n.removeAllListeners(),this.observer=null)},e.prototype.push=function(e,t,n,r,i,o,a,s){var u=this.w,l=isNaN(i.startDTS)?i.start:i.startDTS,c=i.decryptdata,f=this.frag,d=!(f&&i.cc===f.cc),h=!(f&&i.level===f.level),p=f&&i.sn===f.sn+1,v=!h&&p;if(d&&Oe.b.log(this.id+":discontinuity detected"),h&&Oe.b.log(this.id+":switch detected"),this.frag=i,u)u.postMessage({cmd:"demux",data:e,decryptdata:c,initSegment:t,audioCodec:n,videoCodec:r,timeOffset:l,discontinuity:d,trackSwitch:h,contiguous:v,duration:o,accurateTimeOffset:a,defaultInitPTS:s},e instanceof ArrayBuffer?[e]:[]);else{var m=this.demuxer;m&&m.push(e,c,t,n,r,l,d,h,v,o,a,s)}},e.prototype.onWorkerMessage=function(e){var t=e.data,n=this.hls;switch(t.event){case"init":URL.revokeObjectURL(this.w.objectURL);break;case xe.a.FRAG_PARSING_DATA:t.data.data1=new Uint8Array(t.data1),t.data2&&(t.data.data2=new Uint8Array(t.data2));default:t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,n.trigger(t.event,t.data)}},e}(),nt={toString:function(e){for(var t="",n=e.length,r=0;r<n;r++)t+="["+e.start(r).toFixed(3)+","+e.end(r).toFixed(3)+"]";return t}},rt=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),it={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_LEVEL:"WAITING_LEVEL",PARSING:"PARSING",PARSED:"PARSED",BUFFER_FLUSHING:"BUFFER_FLUSHING",ENDED:"ENDED",ERROR:"ERROR"},ot=function(e){function t(n){M(this,t);var r=x(this,e.call(this,n,xe.a.MEDIA_ATTACHED,xe.a.MEDIA_DETACHING,xe.a.MANIFEST_LOADING,xe.a.MANIFEST_PARSED,xe.a.LEVEL_LOADED,xe.a.KEY_LOADED,xe.a.FRAG_LOADED,xe.a.FRAG_LOAD_EMERGENCY_ABORTED,xe.a.FRAG_PARSING_INIT_SEGMENT,xe.a.FRAG_PARSING_DATA,xe.a.FRAG_PARSED,xe.a.ERROR,xe.a.AUDIO_TRACK_SWITCHING,xe.a.AUDIO_TRACK_SWITCHED,xe.a.BUFFER_CREATED,xe.a.BUFFER_APPENDED,xe.a.BUFFER_FLUSHED));return r.config=n.config,r.audioCodecSwap=!1,r.ticks=0,r._state=it.STOPPED,r.ontick=r.tick.bind(r),r}return L(t,e),t.prototype.destroy=function(){this.stopLoad(),this.timer&&(clearInterval(this.timer),this.timer=null),Ie.prototype.destroy.call(this),this.state=it.STOPPED},t.prototype.startLoad=function(e){if(this.levels){var t=this.lastCurrentTime,n=this.hls;if(this.stopLoad(),this.timer||(this.timer=setInterval(this.ontick,100)),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var r=n.startLevel;-1===r&&(r=0,this.bitrateTest=!0),this.level=n.nextLoadLevel=r,this.loadedmetadata=!1}t>0&&-1===e&&(Oe.b.log("override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t),this.state=it.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this.forceStartLoad=!0,this.state=it.STOPPED},t.prototype.stopLoad=function(){var e=this.fragCurrent;e&&(e.loader&&e.loader.abort(),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=it.STOPPED,this.forceStartLoad=!1},t.prototype.tick=function(){1===++this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(this.tick,1),this.ticks=0)},t.prototype.doTick=function(){switch(this.state){case it.ERROR:break;case it.BUFFER_FLUSHING:this.fragLoadError=0;break;case it.IDLE:this._doTickIdle();break;case it.WAITING_LEVEL:var e=this.levels[this.level];e&&e.details&&(this.state=it.IDLE);break;case it.FRAG_LOADING_WAITING_RETRY:var t=performance.now(),n=this.retryDate;(!n||t>=n||this.media&&this.media.seeking)&&(Oe.b.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=it.IDLE);break;case it.ERROR:case it.STOPPED:case it.FRAG_LOADING:case it.PARSING:case it.PARSED:case it.ENDED:}this._checkBuffer(),this._checkFragmentChanged()},t.prototype._doTickIdle=function(){var e=this.hls,t=e.config,n=this.media;if(void 0!==this.levelLastLoaded&&(n||!this.startFragRequested&&t.startFragPrefetch)){var r=void 0;r=this.loadedmetadata?n.currentTime:this.nextLoadPosition;var i=e.nextLoadLevel,o=this.levels[i];if(o){var a=o.bitrate,s=void 0;s=a?Math.max(8*t.maxBufferSize/a,t.maxBufferLength):t.maxBufferLength,s=Math.min(s,t.maxMaxBufferLength);var u=$e.bufferInfo(this.mediaBuffer?this.mediaBuffer:n,r,t.maxBufferHole),l=u.len;if(!(l>=s)){Oe.b.trace("buffer length of "+l.toFixed(3)+" is below max of "+s.toFixed(3)+". checking for more payload ..."),this.level=e.nextLoadLevel=i;var c=o.details;if(void 0===c||c.live&&this.levelLastLoaded!==i)this.state=it.WAITING_LEVEL;else{var f=this.fragPrevious;if(!c.live&&f&&!f.backtracked&&f.sn===c.endSN&&!u.nextStart&&Math.min(n.duration,f.start+f.duration)-Math.max(u.end,f.start)<=Math.max(.2,f.duration)){var d={};return this.altAudio&&(d.type="video"),this.hls.trigger(xe.a.BUFFER_EOS,d),void(this.state=it.ENDED)}this._fetchPayloadOrEos(r,u,c)}}}}},t.prototype._fetchPayloadOrEos=function(e,t,n){var r=this.fragPrevious,i=this.level,o=n.fragments,a=o.length;if(0!==a){var s=o[0].start,u=o[a-1].start+o[a-1].duration,l=t.end,c=void 0;if(n.initSegment&&!n.initSegment.data)c=n.initSegment;else if(n.live){var f=this.config.initialLiveManifestSize;if(a<f)return void Oe.b.warn("Can not start playback of a level, reason: not enough fragments "+a+" < "+f);if(null===(c=this._ensureFragmentAtLivePoint(n,l,s,u,r,o,a)))return}else l<s&&(c=o[0]);c||(c=this._findFragment(s,r,a,o,l,u,n)),c&&this._loadFragmentOrKey(c,i,n,e,l)}},t.prototype._ensureFragmentAtLivePoint=function(e,t,n,r,i,o,a){var s=this.hls.config,u=this.media,l=void 0,c=void 0!==s.liveMaxLatencyDuration?s.liveMaxLatencyDuration:s.liveMaxLatencyDurationCount*e.targetduration;if(t<Math.max(n-s.maxFragLookUpTolerance,r-c)){var f=this.liveSyncPosition=this.computeLivePosition(n,e);Oe.b.log("buffer end: "+t.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+f.toFixed(3)),t=f,u&&u.readyState&&u.duration>f&&(u.currentTime=f),this.nextLoadPosition=f}if(e.PTSKnown&&t>r&&u&&u.readyState)return null;if(this.startFragRequested&&!e.PTSKnown){if(i){var d=i.sn+1;if(d>=e.startSN&&d<=e.endSN){var h=o[d-e.startSN];i.cc===h.cc&&(l=h,Oe.b.log("live playlist, switching playlist, load frag with next SN: "+l.sn))}l||(l=Ye.search(o,function(e){return i.cc-e.cc}))&&Oe.b.log("live playlist, switching playlist, load frag with same CC: "+l.sn)}l||(l=o[Math.min(a-1,Math.round(a/2))],Oe.b.log("live playlist, switching playlist, unknown, load middle frag : "+l.sn))}return l},t.prototype._findFragment=function(e,t,n,r,i,o,a){var s=this.hls.config,u=void 0,l=void 0,c=s.maxFragLookUpTolerance,f=t?r[t.sn-r[0].sn+1]:void 0,d=function(e){var t=Math.min(c,e.duration+(e.deltaPTS?e.deltaPTS:0));return e.start+e.duration-t<=i?1:e.start-t>i&&e.start?-1:0};if(i<o?(i>o-c&&(c=0),l=f&&!d(f)?f:Ye.search(r,d)):l=r[n-1],l){var h=(u=l).sn-a.startSN,p=t&&u.level===t.level,v=r[h-1],m=r[h+1];if(t&&u.sn===t.sn)if(p&&!u.backtracked)if(u.sn<a.endSN){var g=t.deltaPTS;g&&g>s.maxBufferHole&&t.dropped&&h?(u=v,Oe.b.warn("SN just loaded, with large PTS gap between audio and video, maybe frag is not starting with a keyframe ? load previous one to try to overcome this"),t.loadCounter--):(u=m,Oe.b.log("SN just loaded, load next one: "+u.sn))}else u=null;else u.backtracked&&(m&&m.backtracked?(Oe.b.warn("Already backtracked from fragment "+m.sn+", will not backtrack to fragment "+u.sn+". Loading fragment "+m.sn),u=m):(Oe.b.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),u.dropped=0,v?(v.loadCounter&&v.loadCounter--,(u=v).backtracked=!0):h&&(u=null)))}return u},t.prototype._loadFragmentOrKey=function(e,t,n,r,i){var o=this.hls,a=o.config;if(!e.decryptdata||null==e.decryptdata.uri||null!=e.decryptdata.key){if(Oe.b.log("Loading "+e.sn+" of ["+n.startSN+" ,"+n.endSN+"],level "+t+", currentTime:"+r.toFixed(3)+",bufferEnd:"+i.toFixed(3)),void 0!==this.fragLoadIdx?this.fragLoadIdx++:this.fragLoadIdx=0,e.loadCounter){e.loadCounter++;var s=a.fragLoadingLoopThreshold;if(e.loadCounter>s&&Math.abs(this.fragLoadIdx-e.loadIdx)<s)return void o.trigger(xe.a.ERROR,{type:Le.b.MEDIA_ERROR,details:Le.a.FRAG_LOOP_LOADING_ERROR,fatal:!1,frag:e})}else e.loadCounter=1;return e.loadIdx=this.fragLoadIdx,e.autoLevel=o.autoLevelEnabled,e.bitrateTest=this.bitrateTest,this.fragCurrent=e,this.startFragRequested=!0,isNaN(e.sn)||e.bitrateTest||(this.nextLoadPosition=e.start+e.duration),o.trigger(xe.a.FRAG_LOADING,{frag:e}),this.demuxer||(this.demuxer=new tt(o,"main")),void(this.state=it.FRAG_LOADING)}Oe.b.log("Loading key for "+e.sn+" of ["+n.startSN+" ,"+n.endSN+"],level "+t),this.state=it.KEY_LOADING,o.trigger(xe.a.KEY_LOADING,{frag:e})},t.prototype.getBufferedFrag=function(e){return Ye.search(this._bufferedFrags,function(t){return e<t.startPTS?-1:e>t.endPTS?1:0})},t.prototype.followingBufferedFrag=function(e){return e?this.getBufferedFrag(e.endPTS+.5):null},t.prototype._checkFragmentChanged=function(){var e,t,n=this.media;if(n&&n.readyState&&!1===n.seeking&&((t=n.currentTime)>n.playbackRate*this.lastCurrentTime&&(this.lastCurrentTime=t),$e.isBuffered(n,t)?e=this.getBufferedFrag(t):$e.isBuffered(n,t+.1)&&(e=this.getBufferedFrag(t+.1)),e)){var r=e;if(r!==this.fragPlaying){this.hls.trigger(xe.a.FRAG_CHANGED,{frag:r});var i=r.level;this.fragPlaying&&this.fragPlaying.level===i||this.hls.trigger(xe.a.LEVEL_SWITCHED,{level:i}),this.fragPlaying=r}}},t.prototype.immediateLevelSwitch=function(){if(Oe.b.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var e=this.media,t=void 0;e?(t=e.paused,e.pause()):t=!0,this.previouslyPaused=t}var n=this.fragCurrent;n&&n.loader&&n.loader.abort(),this.fragCurrent=null,void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},t.prototype.immediateLevelSwitchEnd=function(){var e=this.media;e&&e.buffered.length&&(this.immediateSwitch=!1,$e.isBuffered(e,e.currentTime)&&(e.currentTime-=1e-4),this.previouslyPaused||e.play())},t.prototype.nextLevelSwitch=function(){var e=this.media;if(e&&e.readyState){var t=void 0,n=void 0,r=void 0;if(void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold),(n=this.getBufferedFrag(e.currentTime))&&n.startPTS>1&&this.flushMainBuffer(0,n.startPTS-1),e.paused)t=0;else{var i=this.hls.nextLoadLevel,o=this.levels[i],a=this.fragLastKbps;t=a&&this.fragCurrent?this.fragCurrent.duration*o.bitrate/(1e3*a)+1:0}if((r=this.getBufferedFrag(e.currentTime+t))&&(r=this.followingBufferedFrag(r))){var s=this.fragCurrent;s&&s.loader&&s.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(r.maxStartPTS,Number.POSITIVE_INFINITY)}}},t.prototype.flushMainBuffer=function(e,t){this.state=it.BUFFER_FLUSHING;var n={startOffset:e,endOffset:t};this.altAudio&&(n.type="video"),this.hls.trigger(xe.a.BUFFER_FLUSHING,n)},t.prototype.onMediaAttached=function(e){var t=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),t.addEventListener("seeked",this.onvseeked),t.addEventListener("ended",this.onvended);var n=this.config;this.levels&&n.autoStartLoad&&this.hls.startLoad(n.startPosition)},t.prototype.onMediaDetaching=function(){var e=this.media;e&&e.ended&&(Oe.b.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var t=this.levels;t&&t.forEach(function(e){e.details&&e.details.fragments.forEach(function(e){e.loadCounter=void 0,e.backtracked=void 0})}),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("seeked",this.onvseeked),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()},t.prototype.onMediaSeeking=function(){var e=this.media,t=e?e.currentTime:void 0,n=this.config;isNaN(t)||Oe.b.log("media seeking to "+t.toFixed(3));var r=this.mediaBuffer?this.mediaBuffer:e,i=$e.bufferInfo(r,t,this.config.maxBufferHole);if(this.state===it.FRAG_LOADING){var o=this.fragCurrent;if(0===i.len&&o){var a=n.maxFragLookUpTolerance,s=o.start-a,u=o.start+o.duration+a;t<s||t>u?(o.loader&&(Oe.b.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),o.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=it.IDLE):Oe.b.log("seeking outside of buffer but within currently loaded fragment range")}}else this.state===it.ENDED&&(0===i.len&&(this.fragPrevious=0),this.state=it.IDLE);e&&(this.lastCurrentTime=t),this.state!==it.FRAG_LOADING&&void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*n.fragLoadingLoopThreshold),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=t),this.tick()},t.prototype.onMediaSeeked=function(){var e=this.media,t=e?e.currentTime:void 0;isNaN(t)||Oe.b.log("media seeked to "+t.toFixed(3)),this.tick()},t.prototype.onMediaEnded=function(){Oe.b.log("media ended"),this.startPosition=this.lastCurrentTime=0},t.prototype.onManifestLoading=function(){Oe.b.log("trigger BUFFER_RESET"),this.hls.trigger(xe.a.BUFFER_RESET),this._bufferedFrags=[],this.stalled=!1,this.startPosition=this.lastCurrentTime=0},t.prototype.onManifestParsed=function(e){var t,n=!1,r=!1;e.levels.forEach(function(e){(t=e.audioCodec)&&(-1!==t.indexOf("mp4a.40.2")&&(n=!0),-1!==t.indexOf("mp4a.40.5")&&(r=!0))}),this.audioCodecSwitch=n&&r,this.audioCodecSwitch&&Oe.b.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=e.levels,this.startFragRequested=!1;var i=this.config;(i.autoStartLoad||this.forceStartLoad)&&this.hls.startLoad(i.startPosition)},t.prototype.onLevelLoaded=function(e){var t=e.details,n=e.level,r=this.levels[this.levelLastLoaded],i=this.levels[n],o=t.totalduration,a=0;if(Oe.b.log("level "+n+" loaded ["+t.startSN+","+t.endSN+"],duration:"+o),t.live){var s=i.details;s&&t.fragments.length>0?(w(s,t),a=t.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(a,s),t.PTSKnown&&!isNaN(a)?Oe.b.log("live playlist sliding:"+a.toFixed(3)):(Oe.b.log("live playlist - outdated PTS, unknown sliding"),A(this.fragPrevious,r,t))):(Oe.b.log("live playlist - first load, unknown sliding"),t.PTSKnown=!1,A(this.fragPrevious,r,t))}else t.PTSKnown=!1;if(i.details=t,this.levelLastLoaded=n,this.hls.trigger(xe.a.LEVEL_UPDATED,{details:t,level:n}),!1===this.startFragRequested){if(-1===this.startPosition||-1===this.lastCurrentTime){var u=t.startTimeOffset;isNaN(u)?t.live?(this.startPosition=this.computeLivePosition(a,t),Oe.b.log("configure startPosition to "+this.startPosition)):this.startPosition=0:(u<0&&(Oe.b.log("negative start time offset "+u+", count from end of last fragment"),u=a+o+u),Oe.b.log("start time offset found in playlist, adjust startPosition to "+u),this.startPosition=u),this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}this.state===it.WAITING_LEVEL&&(this.state=it.IDLE),this.tick()},t.prototype.onKeyLoaded=function(){this.state===it.KEY_LOADING&&(this.state=it.IDLE,this.tick())},t.prototype.onFragLoaded=function(e){var t=this.fragCurrent,n=e.frag;if(this.state===it.FRAG_LOADING&&t&&"main"===n.type&&n.level===t.level&&n.sn===t.sn){var r=e.stats,i=this.levels[t.level],o=i.details;if(Oe.b.log("Loaded  "+t.sn+" of ["+o.startSN+" ,"+o.endSN+"],level "+t.level),this.bitrateTest=!1,this.stats=r,!0===n.bitrateTest&&this.hls.nextLoadLevel)this.state=it.IDLE,this.startFragRequested=!1,r.tparsed=r.tbuffered=performance.now(),this.hls.trigger(xe.a.FRAG_BUFFERED,{stats:r,frag:t,id:"main"}),this.tick();else if("initSegment"===n.sn)this.state=it.IDLE,r.tparsed=r.tbuffered=performance.now(),o.initSegment.data=e.payload,this.hls.trigger(xe.a.FRAG_BUFFERED,{stats:r,frag:t,id:"main"}),this.tick();else{this.state=it.PARSING;var a=o.totalduration,s=t.level,u=t.sn,l=this.config.defaultAudioCodec||i.audioCodec;this.audioCodecSwap&&(Oe.b.log("swapping playlist audio codec"),void 0===l&&(l=this.lastAudioCodec),l&&(l=-1!==l.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5")),this.pendingBuffering=!0,this.appended=!1,Oe.b.log("Parsing "+u+" of ["+o.startSN+" ,"+o.endSN+"],level "+s+", cc "+t.cc);var c=this.demuxer;c||(c=this.demuxer=new tt(this.hls,"main"));var f=this.media,d=!(f&&f.seeking)&&(o.PTSKnown||!o.live),h=o.initSegment?o.initSegment.data:[];c.push(e.payload,h,l,i.videoCodec,t,a,d,void 0)}}this.fragLoadError=0},t.prototype.onFragParsingInitSegment=function(e){var t=this.fragCurrent,n=e.frag;if(t&&"main"===e.id&&n.sn===t.sn&&n.level===t.level&&this.state===it.PARSING){var r,i,o=e.tracks;if(o.audio&&this.altAudio&&delete o.audio,i=o.audio){var a=this.levels[this.level].audioCodec,s=navigator.userAgent.toLowerCase();a&&this.audioCodecSwap&&(Oe.b.log("swapping playlist audio codec"),a=-1!==a.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),this.audioCodecSwitch&&1!==i.metadata.channelCount&&-1===s.indexOf("firefox")&&(a="mp4a.40.5"),-1!==s.indexOf("android")&&"audio/mpeg"!==i.container&&(a="mp4a.40.2",Oe.b.log("Android: force audio codec to "+a)),i.levelCodec=a,i.id=e.id}(i=o.video)&&(i.levelCodec=this.levels[this.level].videoCodec,i.id=e.id),this.hls.trigger(xe.a.BUFFER_CODECS,o);for(r in o){i=o[r],Oe.b.log("main track:"+r+",container:"+i.container+",codecs[level/parsed]=["+i.levelCodec+"/"+i.codec+"]");var u=i.initSegment;u&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(xe.a.BUFFER_APPENDING,{type:r,data:u,parent:"main",content:"initSegment"}))}this.tick()}},t.prototype.onFragParsingData=function(e){var t=this,n=this.fragCurrent,r=e.frag;if(n&&"main"===e.id&&r.sn===n.sn&&r.level===n.level&&("audio"!==e.type||!this.altAudio)&&this.state===it.PARSING){var i=this.levels[this.level],o=n;if(isNaN(e.endPTS)&&(e.endPTS=e.startPTS+n.duration,e.endDTS=e.startDTS+n.duration),Oe.b.log("Parsed "+e.type+",PTS:["+e.startPTS.toFixed(3)+","+e.endPTS.toFixed(3)+"],DTS:["+e.startDTS.toFixed(3)+"/"+e.endDTS.toFixed(3)+"],nb:"+e.nb+",dropped:"+(e.dropped||0)),"video"===e.type)if(o.dropped=e.dropped,o.dropped)if(o.backtracked)Oe.b.warn("Already backtracked on this fragment, appending with the gap");else{var a=i.details;if(!a||o.sn!==a.startSN)return Oe.b.warn("missing video frame(s), backtracking fragment"),o.backtracked=!0,this.nextLoadPosition=e.startPTS,this.state=it.IDLE,this.fragPrevious=o,void this.tick();Oe.b.warn("missing video frame(s) on first frag, appending with gap")}else o.backtracked=!1;var s=b(i.details,o,e.startPTS,e.endPTS,e.startDTS,e.endDTS),u=this.hls;u.trigger(xe.a.LEVEL_PTS_UPDATED,{details:i.details,level:this.level,drift:s,type:e.type,start:e.startPTS,end:e.endPTS}),[e.data1,e.data2].forEach(function(n){n&&n.length&&t.state===it.PARSING&&(t.appended=!0,t.pendingBuffering=!0,u.trigger(xe.a.BUFFER_APPENDING,{type:e.type,data:n,parent:"main",content:"data"}))}),this.tick()}},t.prototype.onFragParsed=function(e){var t=this.fragCurrent,n=e.frag;t&&"main"===e.id&&n.sn===t.sn&&n.level===t.level&&this.state===it.PARSING&&(this.stats.tparsed=performance.now(),this.state=it.PARSED,this._checkAppendedParsed())},t.prototype.onAudioTrackSwitching=function(e){var t=!!e.url,n=e.id;if(!t){if(this.mediaBuffer!==this.media){Oe.b.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var r=this.fragCurrent;r.loader&&(Oe.b.log("switching to main audio track, cancel main fragment load"),r.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=it.IDLE}var i=this.hls;i.trigger(xe.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),i.trigger(xe.a.AUDIO_TRACK_SWITCHED,{id:n}),this.altAudio=!1}},t.prototype.onAudioTrackSwitched=function(e){var t=e.id,n=!!this.hls.audioTracks[t].url;if(n){var r=this.videoBuffer;r&&this.mediaBuffer!==r&&(Oe.b.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=r)}this.altAudio=n,this.tick()},t.prototype.onBufferCreated=function(e){var t=e.tracks,n=void 0,r=void 0,i=!1;for(var o in t){var a=t[o];"main"===a.id?(r=o,n=a,"video"===o&&(this.videoBuffer=t[o].buffer)):i=!0}i&&n?(Oe.b.log("alternate track found, use "+r+".buffered to schedule main fragment loading"),this.mediaBuffer=n.buffer):this.mediaBuffer=this.media},t.prototype.onBufferAppended=function(e){if("main"===e.parent){var t=this.state;t!==it.PARSING&&t!==it.PARSED||(this.pendingBuffering=e.pending>0,this._checkAppendedParsed())}},t.prototype._checkAppendedParsed=function(){if(!(this.state!==it.PARSED||this.appended&&this.pendingBuffering)){var e=this.fragCurrent;if(e){var t=this.mediaBuffer?this.mediaBuffer:this.media;Oe.b.log("main buffered : "+nt.toString(t.buffered));var n=this._bufferedFrags.filter(function(e){return $e.isBuffered(t,(e.startPTS+e.endPTS)/2)});n.push(e),this._bufferedFrags=n.sort(function(e,t){return e.startPTS-t.startPTS}),this.fragPrevious=e;var r=this.stats;r.tbuffered=performance.now(),this.fragLastKbps=Math.round(8*r.total/(r.tbuffered-r.tfirst)),this.hls.trigger(xe.a.FRAG_BUFFERED,{stats:r,frag:e,id:"main"}),this.state=it.IDLE}this.tick()}},t.prototype.onError=function(e){var t=e.frag||this.fragCurrent;if(!t||"main"===t.type){var n=!!this.media&&$e.isBuffered(this.media,this.media.currentTime)&&$e.isBuffered(this.media,this.media.currentTime+.5);switch(e.details){case Le.a.FRAG_LOAD_ERROR:case Le.a.FRAG_LOAD_TIMEOUT:case Le.a.KEY_LOAD_ERROR:case Le.a.KEY_LOAD_TIMEOUT:if(!e.fatal)if(this.fragLoadError+1<=this.config.fragLoadingMaxRetry){var r=Math.min(Math.pow(2,this.fragLoadError)*this.config.fragLoadingRetryDelay,this.config.fragLoadingMaxRetryTimeout);t.loadCounter=0,Oe.b.warn("mediaController: frag loading failed, retry in "+r+" ms"),this.retryDate=performance.now()+r,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.fragLoadError++,this.state=it.FRAG_LOADING_WAITING_RETRY}else Oe.b.error("mediaController: "+e.details+" reaches max retry, redispatch as fatal ..."),e.fatal=!0,this.state=it.ERROR;break;case Le.a.FRAG_LOOP_LOADING_ERROR:e.fatal||(n?(this._reduceMaxBufferLength(t.duration),this.state=it.IDLE):t.autoLevel&&0!==t.level||(e.fatal=!0,this.state=it.ERROR));break;case Le.a.LEVEL_LOAD_ERROR:case Le.a.LEVEL_LOAD_TIMEOUT:this.state!==it.ERROR&&(e.fatal?(this.state=it.ERROR,Oe.b.warn("streamController: "+e.details+",switch to "+this.state+" state ...")):e.levelRetry||this.state!==it.WAITING_LEVEL||(this.state=it.IDLE));break;case Le.a.BUFFER_FULL_ERROR:"main"!==e.parent||this.state!==it.PARSING&&this.state!==it.PARSED||(n?(this._reduceMaxBufferLength(this.config.maxBufferLength),this.state=it.IDLE):(Oe.b.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)))}}},t.prototype._reduceMaxBufferLength=function(e){var t=this.config;t.maxMaxBufferLength>=e&&(t.maxMaxBufferLength/=2,Oe.b.warn("main:reduce max buffer length to "+t.maxMaxBufferLength+"s"),void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*t.fragLoadingLoopThreshold))},t.prototype._checkBuffer=function(){var e=this.media,t=this.config;if(e&&e.readyState){var n=e.currentTime,r=this.mediaBuffer?this.mediaBuffer:e,i=r.buffered;if(!this.loadedmetadata&&i.length){this.loadedmetadata=!0;var o=e.seeking?n:this.startPosition,a=$e.isBuffered(r,o),s=i.start(0),u=!a&&Math.abs(o-s)<t.maxSeekHole;(n!==o||u)&&(Oe.b.log("target start position:"+o),u&&(o=s,Oe.b.log("target start position not buffered, seek to buffered.start(0) "+o)),Oe.b.log("adjust currentTime from "+n+" to "+o),e.currentTime=o)}else if(this.immediateSwitch)this.immediateLevelSwitchEnd();else{var l=$e.bufferInfo(e,n,0),c=!(e.paused||e.ended||0===e.buffered.length);if(n!==this.lastCurrentTime)this.stallReported&&(Oe.b.warn("playback not stuck anymore @"+n+", after "+Math.round(performance.now()-this.stalled)+"ms"),this.stallReported=!1),this.stalled=void 0,this.nudgeRetry=0;else if(c){var f=performance.now(),d=this.hls;if(this.stalled){var h=f-this.stalled,p=l.len,v=this.nudgeRetry||0;if(p<=.5&&h>1e3*t.lowBufferWatchdogPeriod){this.stallReported||(this.stallReported=!0,Oe.b.warn("playback stalling in low buffer @"+n),d.trigger(xe.a.ERROR,{type:Le.b.MEDIA_ERROR,details:Le.a.BUFFER_STALLED_ERROR,fatal:!1,buffer:p}));var m=l.nextStart,g=m-n;if(m&&g<t.maxSeekHole&&g>0){this.nudgeRetry=++v;var y=v*t.nudgeOffset;Oe.b.log("adjust currentTime from "+e.currentTime+" to next buffered @ "+m+" + nudge "+y),e.currentTime=m+y,this.stalled=void 0,d.trigger(xe.a.ERROR,{type:Le.b.MEDIA_ERROR,details:Le.a.BUFFER_SEEK_OVER_HOLE,fatal:!1,hole:m+y-n})}}else if(p>.5&&h>1e3*t.highBufferWatchdogPeriod)if(this.stallReported||(this.stallReported=!0,Oe.b.warn("playback stalling in high buffer @"+n),d.trigger(xe.a.ERROR,{type:Le.b.MEDIA_ERROR,details:Le.a.BUFFER_STALLED_ERROR,fatal:!1,buffer:p})),this.stalled=void 0,this.nudgeRetry=++v,v<t.nudgeMaxRetry){var b=e.currentTime,w=b+v*t.nudgeOffset;Oe.b.log("adjust currentTime from "+b+" to "+w),e.currentTime=w,d.trigger(xe.a.ERROR,{type:Le.b.MEDIA_ERROR,details:Le.a.BUFFER_NUDGE_ON_STALL,fatal:!1})}else Oe.b.error("still stuck in high buffer @"+n+" after "+t.nudgeMaxRetry+", raise fatal error"),d.trigger(xe.a.ERROR,{type:Le.b.MEDIA_ERROR,details:Le.a.BUFFER_STALLED_ERROR,fatal:!0})}else this.stalled=f,this.stallReported=!1}}}},t.prototype.onFragLoadEmergencyAborted=function(){this.state=it.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tick()},t.prototype.onBufferFlushed=function(){var e=this.mediaBuffer?this.mediaBuffer:this.media;this._bufferedFrags=this._bufferedFrags.filter(function(t){return $e.isBuffered(e,(t.startPTS+t.endPTS)/2)}),void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold),this.state=it.IDLE,this.fragPrevious=null},t.prototype.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},t.prototype.computeLivePosition=function(e,t){var n=void 0!==this.config.liveSyncDuration?this.config.liveSyncDuration:this.config.liveSyncDurationCount*t.targetduration;return e+Math.max(0,t.totalduration-n)},rt(t,[{key:"state",set:function(e){if(this.state!==e){var t=this.state;this._state=e,Oe.b.log("main stream:"+t+"->"+e),this.hls.trigger(xe.a.STREAM_STATE_TRANSITION,{previousState:t,nextState:e})}},get:function(){return this._state}},{key:"currentLevel",get:function(){var e=this.media;if(e){var t=this.getBufferedFrag(e.currentTime);if(t)return t.level}return-1}},{key:"nextBufferedFrag",get:function(){var e=this.media;return e?this.followingBufferedFrag(this.getBufferedFrag(e.currentTime)):null}},{key:"nextLevel",get:function(){var e=this.nextBufferedFrag;return e?e.level:-1}},{key:"liveSyncPosition",get:function(){return this._liveSyncPosition},set:function(e){this._liveSyncPosition=e}}]),t}(Ie),at=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),st=function(e){function t(n){O(this,t);var r=D(this,e.call(this,n,xe.a.MANIFEST_LOADED,xe.a.LEVEL_LOADED,xe.a.FRAG_LOADED,xe.a.ERROR));return r._manualLevel=-1,r.timer=null,r}return I(t,e),t.prototype.destroy=function(){this.cleanTimer(),this._manualLevel=-1},t.prototype.cleanTimer=function(){null!==this.timer&&(clearTimeout(this.timer),this.timer=null)},t.prototype.startLoad=function(){var e=this._levels;this.canload=!0,this.levelRetryCount=0,e&&e.forEach(function(e){e.loadError=0;var t=e.details;t&&t.live&&(e.details=void 0)}),this.timer&&this.tick()},t.prototype.stopLoad=function(){this.canload=!1},t.prototype.onManifestLoaded=function(e){var t=[],n=void 0,r={},i=null,o=!1,s=!1,u=/chrome|firefox/.test(navigator.userAgent.toLowerCase());if(e.levels.forEach(function(e){e.loadError=0,e.fragmentError=!1,o=o||!!e.videoCodec,s=s||!!e.audioCodec||!(!e.attrs||!e.attrs.AUDIO),!0===u&&e.audioCodec&&-1!==e.audioCodec.indexOf("mp4a.40.34")&&(e.audioCodec=void 0),void 0===(i=r[e.bitrate])?(e.url=[e.url],e.urlId=0,r[e.bitrate]=e,t.push(e)):i.url.push(e.url)}),!0===o&&!0===s&&(t=t.filter(function(e){return!!e.videoCodec})),(t=t.filter(function(e){var t=e.audioCodec,n=e.videoCodec;return(!t||a(t))&&(!n||a(n))})).length>0){n=t[0].bitrate,t.sort(function(e,t){return e.bitrate-t.bitrate}),this._levels=t;for(var l=0;l<t.length;l++)if(t[l].bitrate===n){this._firstLevel=l,Oe.b.log("manifest loaded,"+t.length+" level(s) found, first bitrate:"+n);break}this.hls.trigger(xe.a.MANIFEST_PARSED,{levels:t,firstLevel:this._firstLevel,stats:e.stats,audio:s,video:o,altAudio:e.audioTracks.length>0})}else this.hls.trigger(xe.a.ERROR,{type:Le.b.MEDIA_ERROR,details:Le.a.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:this.hls.url,reason:"no level with compatible codecs found in manifest"})},t.prototype.setLevelInternal=function(e){var t=this._levels,n=this.hls;if(e>=0&&e<t.length){if(this.cleanTimer(),this._level!==e){Oe.b.log("switching to level "+e),this._level=e;var r=t[e];r.level=e,n.trigger(xe.a.LEVEL_SWITCH,r),n.trigger(xe.a.LEVEL_SWITCHING,r)}var i=t[e],o=i.details;if(!o||!0===o.live){var a=i.urlId;n.trigger(xe.a.LEVEL_LOADING,{url:i.url[a],level:e,id:a})}}else n.trigger(xe.a.ERROR,{type:Le.b.OTHER_ERROR,details:Le.a.LEVEL_SWITCH_ERROR,level:e,fatal:!1,reason:"invalid level idx"})},t.prototype.onError=function(e){var t=this;if(!0!==e.fatal){var n=e.details,r=!1,i=!1,o=void 0,a=void 0,s=this.hls.config;switch(n){case Le.a.FRAG_LOAD_ERROR:case Le.a.FRAG_LOAD_TIMEOUT:case Le.a.FRAG_LOOP_LOADING_ERROR:case Le.a.KEY_LOAD_ERROR:case Le.a.KEY_LOAD_TIMEOUT:o=e.frag.level,i=!0;break;case Le.a.LEVEL_LOAD_ERROR:case Le.a.LEVEL_LOAD_TIMEOUT:o=e.context.level,r=!0;break;case Le.a.REMUX_ALLOC_ERROR:o=e.level}if(void 0!==o)if(a=this._levels[o],a.loadError++,a.fragmentError=i,!0===i){var u=a.url.length;u>1&&a.loadError<u?(a.urlId=(a.urlId+1)%u,a.details=void 0,Oe.b.warn("level controller,"+n+" for level "+o+": switching to redundant stream id "+a.urlId)):-1===this._manualLevel&&0!==o?(Oe.b.warn("level controller,"+n+": switch-down for next fragment"),this.hls.nextAutoLevel=o-1):(Oe.b.warn("level controller, "+n+": reload a fragment"),this._level=void 0)}else if(!0===r)if(this.levelRetryCount+1<=s.levelLoadingMaxRetry){var l=Math.min(Math.pow(2,this.levelRetryCount)*s.levelLoadingRetryDelay,s.levelLoadingMaxRetryTimeout);this.timer=setTimeout(function(){return t.tick()},l),e.levelRetry=!0,this.levelRetryCount++,Oe.b.warn("level controller,"+n+", retry in "+l+" ms, current retry count is "+this.levelRetryCount)}else Oe.b.error("cannot recover "+n+" error"),this._level=void 0,this.cleanTimer(),e.fatal=!0}else e.type===Le.b.NETWORK_ERROR&&this.cleanTimer()},t.prototype.onFragLoaded=function(e){var t=e.frag;if(void 0!==t&&"main"===t.type){var n=this._levels[t.level];void 0!==n&&(n.fragmentError=!1,n.loadError=0,this.levelRetryCount=0)}},t.prototype.onLevelLoaded=function(e){var t=this,n=e.level;if(n===this._level){var r=this._levels[n];!1===r.fragmentError&&(r.loadError=0,this.levelRetryCount=0);var i=e.details;if(i.live){var o=1e3*(i.averagetargetduration?i.averagetargetduration:i.targetduration),a=r.details;a&&i.endSN===a.endSN&&(o/=2,Oe.b.log("same live playlist, reload twice faster")),o-=performance.now()-e.stats.trequest,o=Math.max(1e3,Math.round(o)),Oe.b.log("live playlist, reload in "+o+" ms"),this.timer=setTimeout(function(){return t.tick()},o)}else this.cleanTimer()}},t.prototype.tick=function(){var e=this._level;if(void 0!==e&&this.canload){var t=this._levels[e];if(t&&t.url){var n=t.urlId;this.hls.trigger(xe.a.LEVEL_LOADING,{url:t.url[n],level:e,id:n})}}},at(t,[{key:"levels",get:function(){return this._levels}},{key:"level",get:function(){return this._level},set:function(e){var t=this._levels;t&&(e=Math.min(e,t.length-1),this._level===e&&void 0!==t[e].details||this.setLevelInternal(e))}},{key:"manualLevel",get:function(){return this._manualLevel},set:function(e){this._manualLevel=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(e){this._firstLevel=e}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var e=this.hls.config.startLevel;return void 0!==e?e:this._firstLevel}return this._startLevel},set:function(e){this._startLevel=e}},{key:"nextLoadLevel",get:function(){return-1!==this._manualLevel?this._manualLevel:this.hls.nextAutoLevel},set:function(e){this.level=e,-1===this._manualLevel&&(this.hls.nextAutoLevel=e)}}]),t}(Ie),ut=n(4),lt=function(e){function t(n){R(this,t);var r=N(this,e.call(this,n,xe.a.MEDIA_ATTACHED,xe.a.MEDIA_DETACHING,xe.a.FRAG_PARSING_METADATA));return r.id3Track=void 0,r.media=void 0,r}return C(t,e),t.prototype.destroy=function(){Ie.prototype.destroy.call(this)},t.prototype.onMediaAttached=function(e){this.media=e.media,this.media},t.prototype.onMediaDetaching=function(){this.media=void 0},t.prototype.onFragParsingMetadata=function(e){var t=e.frag,n=e.samples;this.id3Track||(this.id3Track=this.media.addTextTrack("metadata","id3"),this.id3Track.mode="hidden");for(var r=window.WebKitDataCue||window.VTTCue||window.TextTrackCue,i=0;i<n.length;i++){var o=ut.a.getID3Frames(n[i].data);if(o){var a=n[i].pts,s=i<n.length-1?n[i+1].pts:t.endPTS;a===s&&(s+=1e-4);for(var u=0;u<o.length;u++){var l=o[u];if(!ut.a.isTimeStampFrame(l)){var c=new r(a,s,"");c.value=l,this.id3Track.addCue(c)}}}}},t}(Ie),ct=function(){function e(t){P(this,e),this.alpha_=t?Math.exp(Math.log(.5)/t):0,this.estimate_=0,this.totalWeight_=0}return e.prototype.sample=function(e,t){var n=Math.pow(this.alpha_,e);this.estimate_=t*(1-n)+n*this.estimate_,this.totalWeight_+=e},e.prototype.getTotalWeight=function(){return this.totalWeight_},e.prototype.getEstimate=function(){if(this.alpha_){var e=1-Math.pow(this.alpha_,this.totalWeight_);return this.estimate_/e}return this.estimate_},e}(),ft=function(){function e(t,n,r,i){j(this,e),this.hls=t,this.defaultEstimate_=i,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new ct(n),this.fast_=new ct(r)}return e.prototype.sample=function(e,t){var n=8e3*t/(e=Math.max(e,this.minDelayMs_)),r=e/1e3;this.fast_.sample(r,n),this.slow_.sample(r,n)},e.prototype.canEstimate=function(){var e=this.fast_;return e&&e.getTotalWeight()>=this.minWeight_},e.prototype.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},e.prototype.destroy=function(){},e}(),dt=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),ht=function(e){function t(n){F(this,t);var r=B(this,e.call(this,n,xe.a.FRAG_LOADING,xe.a.FRAG_LOADED,xe.a.FRAG_BUFFERED,xe.a.ERROR));return r.lastLoadedFragLevel=0,r._nextAutoLevel=-1,r.hls=n,r.timer=null,r._bwEstimator=null,r.onCheck=r._abandonRulesCheck.bind(r),r}return z(t,e),t.prototype.destroy=function(){this.clearTimer(),Ie.prototype.destroy.call(this)},t.prototype.onFragLoading=function(e){var t=e.frag;if("main"===t.type){if(this.timer||(this.timer=setInterval(this.onCheck,100)),!this._bwEstimator){var n=this.hls,r=e.frag.level,i=n.levels[r].details.live,o=n.config,a=void 0,s=void 0;i?(a=o.abrEwmaFastLive,s=o.abrEwmaSlowLive):(a=o.abrEwmaFastVoD,s=o.abrEwmaSlowVoD),this._bwEstimator=new ft(n,s,a,o.abrEwmaDefaultEstimate)}this.fragCurrent=t}},t.prototype._abandonRulesCheck=function(){var e=this.hls,t=e.media,n=this.fragCurrent,r=n.loader,i=e.minAutoLevel;if(!r||r.stats&&r.stats.aborted)return Oe.b.warn("frag loader destroy or aborted, disarm abandonRules"),void this.clearTimer();var o=r.stats;if(t&&o&&(!t.paused&&0!==t.playbackRate||!t.readyState)&&n.autoLevel&&n.level){var a=performance.now()-o.trequest,s=Math.abs(t.playbackRate);if(a>500*n.duration/s){var u=e.levels,l=Math.max(1,o.bw?o.bw/8:1e3*o.loaded/a),c=u[n.level],f=c.realBitrate?Math.max(c.realBitrate,c.bitrate):c.bitrate,d=o.total?o.total:Math.max(o.loaded,Math.round(n.duration*f/8)),h=t.currentTime,p=(d-o.loaded)/l,v=($e.bufferInfo(t,h,e.config.maxBufferHole).end-h)/s;if(v<2*n.duration/s&&p>v){var m=void 0,g=void 0;for(g=n.level-1;g>i;g--){var y=u[g].realBitrate?Math.max(u[g].realBitrate,u[g].bitrate):u[g].bitrate;if((m=n.duration*y/(6.4*l))<v)break}m<p&&(Oe.b.warn("loading too slow, abort fragment loading and switch to level "+g+":fragLoadedDelay["+g+"]<fragLoadedDelay["+(n.level-1)+"];bufferStarvationDelay:"+m.toFixed(1)+"<"+p.toFixed(1)+":"+v.toFixed(1)),e.nextLoadLevel=g,this._bwEstimator.sample(a,o.loaded),r.abort(),this.clearTimer(),e.trigger(xe.a.FRAG_LOAD_EMERGENCY_ABORTED,{frag:n,stats:o}))}}}},t.prototype.onFragLoaded=function(e){var t=e.frag;if("main"===t.type&&!isNaN(t.sn)){if(this.clearTimer(),this.lastLoadedFragLevel=t.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var n=this.hls.levels[t.level],r=(n.loaded?n.loaded.bytes:0)+e.stats.loaded,i=(n.loaded?n.loaded.duration:0)+e.frag.duration;n.loaded={bytes:r,duration:i},n.realBitrate=Math.round(8*r/i)}if(e.frag.bitrateTest){var o=e.stats;o.tparsed=o.tbuffered=o.tload,this.onFragBuffered(e)}}},t.prototype.onFragBuffered=function(e){var t=e.stats,n=e.frag;if(!(!0===t.aborted||1!==n.loadCounter||"main"!==n.type||isNaN(n.sn)||n.bitrateTest&&t.tload!==t.tbuffered)){var r=t.tparsed-t.trequest;Oe.b.log("latency/loading/parsing/append/kbps:"+Math.round(t.tfirst-t.trequest)+"/"+Math.round(t.tload-t.tfirst)+"/"+Math.round(t.tparsed-t.tload)+"/"+Math.round(t.tbuffered-t.tparsed)+"/"+Math.round(8*t.loaded/(t.tbuffered-t.trequest))),this._bwEstimator.sample(r,t.loaded),t.bwEstimate=this._bwEstimator.getEstimate(),n.bitrateTest?this.bitrateTestDelay=r/1e3:this.bitrateTestDelay=0}},t.prototype.onError=function(e){switch(e.details){case Le.a.FRAG_LOAD_ERROR:case Le.a.FRAG_LOAD_TIMEOUT:this.clearTimer()}},t.prototype.clearTimer=function(){clearInterval(this.timer),this.timer=null},t.prototype._findBestLevel=function(e,t,n,r,i,o,a,s,u){for(var l=i;l>=r;l--){var c=u[l].details,f=c?c.totalduration/c.fragments.length:t,d=!!c&&c.live,h=void 0;h=l<=e?a*n:s*n;var p=u[l].realBitrate?Math.max(u[l].realBitrate,u[l].bitrate):u[l].bitrate,v=p*f/h;if(Oe.b.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+l+"/"+Math.round(h)+"/"+p+"/"+f+"/"+o+"/"+v),h>p&&(!v||d&&!this.bitrateTestDelay||v<o))return l}return-1},dt(t,[{key:"nextAutoLevel",get:function(){var e=this._nextAutoLevel,t=this._bwEstimator;if(!(-1===e||t&&t.canEstimate()))return e;var n=this._nextABRAutoLevel;return-1!==e&&(n=Math.min(e,n)),n},set:function(e){this._nextAutoLevel=e}},{key:"_nextABRAutoLevel",get:function(){var e=this.hls,t=e.maxAutoLevel,n=e.levels,r=e.config,i=e.minAutoLevel,o=e.media,a=this.lastLoadedFragLevel,s=this.fragCurrent?this.fragCurrent.duration:0,u=o?o.currentTime:0,l=o&&0!==o.playbackRate?Math.abs(o.playbackRate):1,c=this._bwEstimator?this._bwEstimator.getEstimate():r.abrEwmaDefaultEstimate,f=($e.bufferInfo(o,u,r.maxBufferHole).end-u)/l,d=this._findBestLevel(a,s,c,i,t,f,r.abrBandWidthFactor,r.abrBandWidthUpFactor,n);if(d>=0)return d;Oe.b.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var h=s?Math.min(s,r.maxStarvationDelay):r.maxStarvationDelay,p=r.abrBandWidthFactor,v=r.abrBandWidthUpFactor;if(0===f){var m=this.bitrateTestDelay;m&&(h=(s?Math.min(s,r.maxLoadingDelay):r.maxLoadingDelay)-m,Oe.b.trace("bitrate test took "+Math.round(1e3*m)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*h)+" ms"),p=v=1)}return d=this._findBestLevel(a,s,c,i,t,f+h,p,v,n),Math.max(d,0)}}]),t}(Ie),pt=m(),vt=function(e){function t(n){U(this,t);var r=G(this,e.call(this,n,xe.a.MEDIA_ATTACHING,xe.a.MEDIA_DETACHING,xe.a.MANIFEST_PARSED,xe.a.BUFFER_RESET,xe.a.BUFFER_APPENDING,xe.a.BUFFER_CODECS,xe.a.BUFFER_EOS,xe.a.BUFFER_FLUSHING,xe.a.LEVEL_PTS_UPDATED,xe.a.LEVEL_UPDATED));return r._msDuration=null,r._levelDuration=null,r.onsbue=r.onSBUpdateEnd.bind(r),r.onsbe=r.onSBUpdateError.bind(r),r.pendingTracks={},r.tracks={},r}return W(t,e),t.prototype.destroy=function(){Ie.prototype.destroy.call(this)},t.prototype.onLevelPtsUpdated=function(e){var t=e.type,n=this.tracks.audio;if("audio"===t&&n&&"audio/mpeg"===n.container){var r=this.sourceBuffer.audio;if(Math.abs(r.timestampOffset-e.start)>.1){var i=r.updating;try{r.abort()}catch(e){i=!0,Oe.b.warn("can not abort audio buffer: "+e)}i?this.audioTimestampOffset=e.start:(Oe.b.warn("change mpeg audio timestamp offset from "+r.timestampOffset+" to "+e.start),r.timestampOffset=e.start)}}},t.prototype.onManifestParsed=function(e){var t=e.audio,n=e.video||e.levels.length&&e.audio,r=0;e.altAudio&&(t||n)&&(r=(t?1:0)+(n?1:0),Oe.b.log(r+" sourceBuffer(s) expected")),this.sourceBufferNb=r},t.prototype.onMediaAttaching=function(e){var t=this.media=e.media;if(t){var n=this.mediaSource=new pt;this.onmso=this.onMediaSourceOpen.bind(this),this.onmse=this.onMediaSourceEnded.bind(this),this.onmsc=this.onMediaSourceClose.bind(this),n.addEventListener("sourceopen",this.onmso),n.addEventListener("sourceended",this.onmse),n.addEventListener("sourceclose",this.onmsc),t.src=URL.createObjectURL(n)}},t.prototype.onMediaDetaching=function(){Oe.b.log("media source detaching");var e=this.mediaSource;if(e){if("open"===e.readyState)try{e.endOfStream()}catch(e){Oe.b.warn("onMediaDetaching:"+e.message+" while calling endOfStream")}e.removeEventListener("sourceopen",this.onmso),e.removeEventListener("sourceended",this.onmse),e.removeEventListener("sourceclose",this.onmsc),this.media&&(URL.revokeObjectURL(this.media.src),this.media.removeAttribute("src"),this.media.load()),this.mediaSource=null,this.media=null,this.pendingTracks={},this.tracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.onmso=this.onmse=this.onmsc=null,this.hls.trigger(xe.a.MEDIA_DETACHED)},t.prototype.onMediaSourceOpen=function(){Oe.b.log("media source opened"),this.hls.trigger(xe.a.MEDIA_ATTACHED,{media:this.media});var e=this.mediaSource;e&&e.removeEventListener("sourceopen",this.onmso),this.checkPendingTracks()},t.prototype.checkPendingTracks=function(){var e=this.pendingTracks,t=Object.keys(e).length;t&&(this.sourceBufferNb<=t||0===this.sourceBufferNb)&&(this.createSourceBuffers(e),this.pendingTracks={},this.doAppending())},t.prototype.onMediaSourceClose=function(){Oe.b.log("media source closed")},t.prototype.onMediaSourceEnded=function(){Oe.b.log("media source ended")},t.prototype.onSBUpdateEnd=function(){if(this.audioTimestampOffset){var e=this.sourceBuffer.audio;Oe.b.warn("change mpeg audio timestamp offset from "+e.timestampOffset+" to "+this.audioTimestampOffset),e.timestampOffset=this.audioTimestampOffset,delete this.audioTimestampOffset}this._needsFlush&&this.doFlush(),this._needsEos&&this.checkEos(),this.appending=!1;var t=this.parent,n=this.segments.reduce(function(e,n){return n.parent===t?e+1:e},0);this.hls.trigger(xe.a.BUFFER_APPENDED,{parent:t,pending:n}),this._needsFlush||this.doAppending(),this.updateMediaElementDuration()},t.prototype.onSBUpdateError=function(e){Oe.b.error("sourceBuffer error:",e),this.hls.trigger(xe.a.ERROR,{type:Le.b.MEDIA_ERROR,details:Le.a.BUFFER_APPENDING_ERROR,fatal:!1})},t.prototype.onBufferReset=function(){var e=this.sourceBuffer;for(var t in e){var n=e[t];try{this.mediaSource.removeSourceBuffer(n),n.removeEventListener("updateend",this.onsbue),n.removeEventListener("error",this.onsbe)}catch(e){}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0},t.prototype.onBufferCodecs=function(e){if(0===Object.keys(this.sourceBuffer).length){for(var t in e)this.pendingTracks[t]=e[t];var n=this.mediaSource;n&&"open"===n.readyState&&this.checkPendingTracks()}},t.prototype.createSourceBuffers=function(e){var t=this.sourceBuffer,n=this.mediaSource;for(var r in e)if(!t[r]){var i=e[r],o=i.levelCodec||i.codec,a=i.container+";codecs="+o;Oe.b.log("creating sourceBuffer("+a+")");try{var s=t[r]=n.addSourceBuffer(a);s.addEventListener("updateend",this.onsbue),s.addEventListener("error",this.onsbe),this.tracks[r]={codec:o,container:i.container},i.buffer=s}catch(e){Oe.b.error("error while trying to add sourceBuffer:"+e.message),this.hls.trigger(xe.a.ERROR,{type:Le.b.MEDIA_ERROR,details:Le.a.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:e,mimeType:a})}}this.hls.trigger(xe.a.BUFFER_CREATED,{tracks:e})},t.prototype.onBufferAppending=function(e){this._needsFlush||(this.segments?this.segments.push(e):this.segments=[e],this.doAppending())},t.prototype.onBufferAppendFail=function(e){Oe.b.error("sourceBuffer error:",e.event),this.hls.trigger(xe.a.ERROR,{type:Le.b.MEDIA_ERROR,details:Le.a.BUFFER_APPENDING_ERROR,fatal:!1})},t.prototype.onBufferEos=function(e){var t=this.sourceBuffer,n=e.type;for(var r in t)n&&r!==n||t[r].ended||(t[r].ended=!0,Oe.b.log(r+" sourceBuffer now EOS"));this.checkEos()},t.prototype.checkEos=function(){var e=this.sourceBuffer,t=this.mediaSource;if(t&&"open"===t.readyState){for(var n in e){var r=e[n];if(!r.ended)return;if(r.updating)return void(this._needsEos=!0)}Oe.b.log("all media data available, signal endOfStream() to MediaSource and stop loading fragment");try{t.endOfStream()}catch(e){Oe.b.warn("exception while calling mediaSource.endOfStream()")}this._needsEos=!1}else this._needsEos=!1},t.prototype.onBufferFlushing=function(e){this.flushRange.push({start:e.startOffset,end:e.endOffset,type:e.type}),this.flushBufferCounter=0,this.doFlush()},t.prototype.onLevelUpdated=function(e){var t=e.details;0!==t.fragments.length&&(this._levelDuration=t.totalduration+t.fragments[0].start,this.updateMediaElementDuration())},t.prototype.updateMediaElementDuration=function(){var e=this.media,t=this.mediaSource,n=this.sourceBuffer,r=this._levelDuration;if(null!==r&&e&&t&&n&&0!==e.readyState&&"open"===t.readyState){for(var i in n)if(n[i].updating)return;null===this._msDuration&&(this._msDuration=t.duration);var o=e.duration;(r>this._msDuration&&r>o||o===1/0||isNaN(o))&&(Oe.b.log("Updating mediasource duration to "+r.toFixed(3)),this._msDuration=t.duration=r)}},t.prototype.doFlush=function(){for(;this.flushRange.length;){var e=this.flushRange[0];if(!this.flushBuffer(e.start,e.end,e.type))return void(this._needsFlush=!0);this.flushRange.shift(),this.flushBufferCounter=0}if(0===this.flushRange.length){this._needsFlush=!1;var t=0,n=this.sourceBuffer;try{for(var r in n)t+=n[r].buffered.length}catch(e){Oe.b.error("error while accessing sourceBuffer.buffered")}this.appended=t,this.hls.trigger(xe.a.BUFFER_FLUSHED)}},t.prototype.doAppending=function(){var e=this.hls,t=this.sourceBuffer,n=this.segments;if(Object.keys(t).length){if(this.media.error)return this.segments=[],void Oe.b.error("trying to append although a media error occured, flush segment and abort");if(this.appending)return;if(n&&n.length){var r=n.shift();try{var i=t[r.type];i?i.updating?n.unshift(r):(i.ended=!1,this.parent=r.parent,i.appendBuffer(r.data),this.appendError=0,this.appended++,this.appending=!0):this.onSBUpdateEnd()}catch(t){Oe.b.error("error while trying to append buffer:"+t.message),n.unshift(r);var o={type:Le.b.MEDIA_ERROR,parent:r.parent};if(22===t.code)return this.segments=[],o.details=Le.a.BUFFER_FULL_ERROR,o.fatal=!1,void e.trigger(xe.a.ERROR,o);if(this.appendError?this.appendError++:this.appendError=1,o.details=Le.a.BUFFER_APPEND_ERROR,this.appendError>e.config.appendErrorMaxRetry)return Oe.b.log("fail "+e.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),n=[],o.fatal=!0,void e.trigger(xe.a.ERROR,o);o.fatal=!1,e.trigger(xe.a.ERROR,o)}}}},t.prototype.flushBuffer=function(e,t,n){var r,i,o,a,s,u,l=this.sourceBuffer;if(Object.keys(l).length){if(Oe.b.log("flushBuffer,pos/start/end: "+this.media.currentTime.toFixed(3)+"/"+e+"/"+t),this.flushBufferCounter<this.appended){for(var c in l)if(!n||c===n){if(r=l[c],r.ended=!1,r.updating)return Oe.b.warn("cannot flush, sb updating in progress"),!1;try{for(i=0;i<r.buffered.length;i++)if(o=r.buffered.start(i),a=r.buffered.end(i),-1!==navigator.userAgent.toLowerCase().indexOf("firefox")&&t===Number.POSITIVE_INFINITY?(s=e,u=t):(s=Math.max(o,e),u=Math.min(a,t)),Math.min(u,a)-s>.5)return this.flushBufferCounter++,Oe.b.log("flush "+c+" ["+s+","+u+"], of ["+o+","+a+"], pos:"+this.media.currentTime),r.remove(s,u),!1}catch(e){Oe.b.warn("exception while accessing sourcebuffer, it might have been removed from MediaSource")}}}else Oe.b.warn("abort flushing too many retries");Oe.b.log("buffer flushed")}return!0},t}(Ie),mt=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),gt=function(e){function t(n){return H(this,t),V(this,e.call(this,n,xe.a.FPS_DROP_LEVEL_CAPPING,xe.a.MEDIA_ATTACHING,xe.a.MANIFEST_PARSED))}return Z(t,e),t.prototype.destroy=function(){this.hls.config.capLevelToPlayerSize&&(this.media=this.restrictedLevels=null,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(this.timer=clearInterval(this.timer)))},t.prototype.onFpsDropLevelCapping=function(e){t.isLevelAllowed(e.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(e.droppedLevel)},t.prototype.onMediaAttaching=function(e){this.media=e.media instanceof HTMLVideoElement?e.media:null},t.prototype.onManifestParsed=function(e){var t=this.hls;this.restrictedLevels=[],t.config.capLevelToPlayerSize&&(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.levels=e.levels,t.firstLevel=this.getMaxLevel(e.firstLevel),clearInterval(this.timer),this.timer=setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},t.prototype.detectPlayerSize=function(){if(this.media){var e=this.levels?this.levels.length:0;if(e){var t=this.hls;t.autoLevelCapping=this.getMaxLevel(e-1),t.autoLevelCapping>this.autoLevelCapping&&t.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}},t.prototype.getMaxLevel=function(e){var n=this;if(!this.levels)return-1;var r=this.levels.filter(function(r,i){return t.isLevelAllowed(i,n.restrictedLevels)&&i<=e});return t.getMaxLevelByMediaSize(r,this.mediaWidth,this.mediaHeight)},t.isLevelAllowed=function(e){return-1===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).indexOf(e)},t.getMaxLevelByMediaSize=function(e,t,n){if(!e||e&&!e.length)return-1;for(var r=e.length-1,i=0;i<e.length;i+=1){var o=e[i];if((o.width>=t||o.height>=n)&&function(e,t){return!t||e.width!==t.width||e.height!==t.height}(o,e[i+1])){r=i;break}}return r},mt(t,[{key:"mediaWidth",get:function(){var e=void 0,n=this.media;return n&&(e=n.width||n.clientWidth||n.offsetWidth,e*=t.contentScaleFactor),e}},{key:"mediaHeight",get:function(){var e=void 0,n=this.media;return n&&(e=n.height||n.clientHeight||n.offsetHeight,e*=t.contentScaleFactor),e}}],[{key:"contentScaleFactor",get:function(){var e=1;try{e=window.devicePixelRatio}catch(e){}return e}}]),t}(Ie),yt=function(e){function t(n){return Y(this,t),$(this,e.call(this,n,xe.a.MEDIA_ATTACHING))}return J(t,e),t.prototype.destroy=function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1},t.prototype.onMediaAttaching=function(e){var t=this.hls.config;t.capLevelOnFPSDrop&&("function"==typeof(this.video=e.media instanceof HTMLVideoElement?e.media:null).getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),t.fpsDroppedMonitoringPeriod))},t.prototype.checkFPS=function(e,t,n){var r=performance.now();if(t){if(this.lastTime){var i=r-this.lastTime,o=n-this.lastDroppedFrames,a=t-this.lastDecodedFrames,s=1e3*o/i,u=this.hls;if(u.trigger(xe.a.FPS_DROP,{currentDropped:o,currentDecoded:a,totalDroppedFrames:n}),s>0&&o>u.config.fpsDroppedMonitoringThreshold*a){var l=u.currentLevel;Oe.b.warn("drop FPS ratio greater than max allowed value for currentLevel: "+l),l>0&&(-1===u.autoLevelCapping||u.autoLevelCapping>=l)&&(l-=1,u.trigger(xe.a.FPS_DROP_LEVEL_CAPPING,{level:l,droppedLevel:u.currentLevel}),u.autoLevelCapping=l,u.streamController.nextLevelSwitch())}}this.lastTime=r,this.lastDroppedFrames=n,this.lastDecodedFrames=t}},t.prototype.checkFPSInterval=function(){var e=this.video;if(e)if(this.isVideoPlaybackQualityAvailable){var t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)},t}(Ie),bt=function(){function e(t){K(this,e),t&&t.xhrSetup&&(this.xhrSetup=t.xhrSetup)}return e.prototype.destroy=function(){this.abort(),this.loader=null},e.prototype.abort=function(){var e=this.loader;e&&4!==e.readyState&&(this.stats.aborted=!0,e.abort()),window.clearTimeout(this.requestTimeout),this.requestTimeout=null,window.clearTimeout(this.retryTimeout),this.retryTimeout=null},e.prototype.load=function(e,t,n){this.context=e,this.config=t,this.callbacks=n,this.stats={trequest:performance.now(),retry:0},this.retryDelay=t.retryDelay,this.loadInternal()},e.prototype.loadInternal=function(){var e,t=this.context;e=this.loader=new XMLHttpRequest;var n=this.stats;n.tfirst=0,n.loaded=0;var r=this.xhrSetup;try{if(r)try{r(e,t.url)}catch(n){e.open("GET",t.url,!0),r(e,t.url)}e.readyState||e.open("GET",t.url,!0)}catch(n){return void this.callbacks.onError({code:e.status,text:n.message},t,e)}t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),e.send()},e.prototype.readystatechange=function(e){var t=e.currentTarget,n=t.readyState,r=this.stats,i=this.context,o=this.config;if(!r.aborted&&n>=2)if(window.clearTimeout(this.requestTimeout),0===r.tfirst&&(r.tfirst=Math.max(performance.now(),r.trequest)),4===n){var a=t.status;if(a>=200&&a<300){r.tload=Math.max(r.tfirst,performance.now());var s=void 0,u=void 0;u="arraybuffer"===i.responseType?(s=t.response).byteLength:(s=t.responseText).length,r.loaded=r.total=u;var l={url:t.responseURL,data:s};this.callbacks.onSuccess(l,r,i,t)}else r.retry>=o.maxRetry||a>=400&&a<499?(Oe.b.error(a+" while loading "+i.url),this.callbacks.onError({code:a,text:t.statusText},i,t)):(Oe.b.warn(a+" while loading "+i.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,o.maxRetryDelay),r.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),o.timeout)},e.prototype.loadtimeout=function(){Oe.b.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context,null)},e.prototype.loadprogress=function(e){var t=e.currentTarget,n=this.stats;n.loaded=e.loaded,e.lengthComputable&&(n.total=e.total);var r=this.callbacks.onProgress;r&&r(n,this.context,null,t)},e}(),wt=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),_t=function(e){function t(n){Q(this,t);var r=X(this,e.call(this,n,xe.a.MANIFEST_LOADING,xe.a.MANIFEST_LOADED,xe.a.AUDIO_TRACK_LOADED,xe.a.ERROR));return r.ticks=0,r.ontick=r.tick.bind(r),r}return q(t,e),t.prototype.destroy=function(){this.cleanTimer(),Ie.prototype.destroy.call(this)},t.prototype.cleanTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},t.prototype.tick=function(){1===++this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(this.tick,1),this.ticks=0)},t.prototype.doTick=function(){this.updateTrack(this.trackId)},t.prototype.onError=function(e){e.fatal&&e.type===Le.b.NETWORK_ERROR&&this.cleanTimer()},t.prototype.onManifestLoading=function(){this.tracks=[],this.trackId=-1},t.prototype.onManifestLoaded=function(e){var t=this,n=e.audioTracks||[],r=!1;this.tracks=n,this.hls.trigger(xe.a.AUDIO_TRACKS_UPDATED,{audioTracks:n});var i=0;n.forEach(function(e){if(e.default&&!r)return t.audioTrack=i,void(r=!0);i++}),!1===r&&n.length&&(Oe.b.log("no default audio track defined, use first audio track as default"),this.audioTrack=0)},t.prototype.onAudioTrackLoaded=function(e){e.id<this.tracks.length&&(Oe.b.log("audioTrack "+e.id+" loaded"),this.tracks[e.id].details=e.details,e.details.live&&!this.timer&&(this.timer=setInterval(this.ontick,1e3*e.details.targetduration)),!e.details.live&&this.timer&&this.cleanTimer())},t.prototype.setAudioTrackInternal=function(e){if(e>=0&&e<this.tracks.length){this.cleanTimer(),this.trackId=e,Oe.b.log("switching to audioTrack "+e);var t=this.tracks[e],n=this.hls,r=t.type,i=t.url,o={id:e,type:r,url:i};n.trigger(xe.a.AUDIO_TRACK_SWITCH,o),n.trigger(xe.a.AUDIO_TRACK_SWITCHING,o);var a=t.details;!i||void 0!==a&&!0!==a.live||(Oe.b.log("(re)loading playlist for audioTrack "+e),n.trigger(xe.a.AUDIO_TRACK_LOADING,{url:i,id:e}))}},t.prototype.updateTrack=function(e){if(e>=0&&e<this.tracks.length){this.cleanTimer(),this.trackId=e,Oe.b.log("updating audioTrack "+e);var t=this.tracks[e],n=t.url,r=t.details;!n||void 0!==r&&!0!==r.live||(Oe.b.log("(re)loading playlist for audioTrack "+e),this.hls.trigger(xe.a.AUDIO_TRACK_LOADING,{url:n,id:e}))}},wt(t,[{key:"audioTracks",get:function(){return this.tracks}},{key:"audioTrack",get:function(){return this.trackId},set:function(e){this.trackId===e&&void 0!==this.tracks[e].details||this.setAudioTrackInternal(e)}}]),t}(Ie),Et=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),St={STOPPED:"STOPPED",STARTING:"STARTING",IDLE:"IDLE",PAUSED:"PAUSED",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BUFFER_FLUSHING:"BUFFER_FLUSHING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS"},kt=function(e){function t(n){ee(this,t);var r=te(this,e.call(this,n,xe.a.MEDIA_ATTACHED,xe.a.MEDIA_DETACHING,xe.a.AUDIO_TRACKS_UPDATED,xe.a.AUDIO_TRACK_SWITCHING,xe.a.AUDIO_TRACK_LOADED,xe.a.KEY_LOADED,xe.a.FRAG_LOADED,xe.a.FRAG_PARSING_INIT_SEGMENT,xe.a.FRAG_PARSING_DATA,xe.a.FRAG_PARSED,xe.a.ERROR,xe.a.BUFFER_CREATED,xe.a.BUFFER_APPENDED,xe.a.BUFFER_FLUSHED,xe.a.INIT_PTS_FOUND));return r.config=n.config,r.audioCodecSwap=!1,r.ticks=0,r._state=St.STOPPED,r.ontick=r.tick.bind(r),r.initPTS=[],r.waitingFragment=null,r.videoTrackCC=null,r}return ne(t,e),t.prototype.destroy=function(){this.stopLoad(),this.timer&&(clearInterval(this.timer),this.timer=null),Ie.prototype.destroy.call(this),this.state=St.STOPPED},t.prototype.onInitPtsFound=function(e){var t=e.id,n=e.frag.cc,r=e.initPTS;"main"===t&&(this.initPTS[n]=r,this.videoTrackCC=n,Oe.b.log("InitPTS for cc:"+n+" found from video track:"+r),this.state===St.WAITING_INIT_PTS&&this.tick())},t.prototype.startLoad=function(e){if(this.tracks){var t=this.lastCurrentTime;this.stopLoad(),this.timer||(this.timer=setInterval(this.ontick,100)),this.fragLoadError=0,t>0&&-1===e?(Oe.b.log("audio:override startPosition with lastCurrentTime @"+t.toFixed(3)),this.state=St.IDLE):(this.lastCurrentTime=this.startPosition?this.startPosition:e,this.state=St.STARTING),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=e,this.state=St.STOPPED},t.prototype.stopLoad=function(){var e=this.fragCurrent;e&&(e.loader&&e.loader.abort(),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=St.STOPPED},t.prototype.tick=function(){1===++this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(this.tick,1),this.ticks=0)},t.prototype.doTick=function(){var e,t,n,r=this.hls,i=r.config;switch(this.state){case St.ERROR:case St.PAUSED:case St.BUFFER_FLUSHING:break;case St.STARTING:this.state=St.WAITING_TRACK,this.loadedmetadata=!1;break;case St.IDLE:var o=this.tracks;if(!o)break;if(!this.media&&(this.startFragRequested||!i.startFragPrefetch))break;if(this.loadedmetadata)e=this.media.currentTime;else if(void 0===(e=this.nextLoadPosition))break;var a=this.mediaBuffer?this.mediaBuffer:this.media,s=this.videoBuffer?this.videoBuffer:this.media,u=$e.bufferInfo(a,e,i.maxBufferHole),l=$e.bufferInfo(s,e,i.maxBufferHole),c=u.len,f=u.end,d=this.fragPrevious,h=Math.max(i.maxBufferLength,l.len),p=this.audioSwitch,v=this.trackId;if((c<h||p)&&v<o.length){if(void 0===(n=o[v].details)){this.state=St.WAITING_TRACK;break}if(!p&&!n.live&&d&&d.sn===n.endSN&&(!this.media.seeking||this.media.duration-f<d.duration/2)){this.hls.trigger(xe.a.BUFFER_EOS,{type:"audio"}),this.state=St.ENDED;break}var m=n.fragments,g=m.length,y=m[0].start,b=m[g-1].start+m[g-1].duration,w=void 0;if(p)if(n.live&&!n.PTSKnown)Oe.b.log("switching audiotrack, live stream, unknown PTS,load first fragment"),f=0;else if(f=e,n.PTSKnown&&e<y){if(!(u.end>y||u.nextStart))return;Oe.b.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=y+.05}if(n.initSegment&&!n.initSegment.data)w=n.initSegment;else if(f<=y){if(w=m[0],null!==this.videoTrackCC&&w.cc!==this.videoTrackCC&&(w=E(m,this.videoTrackCC)),n.live&&w.loadIdx&&w.loadIdx===this.fragLoadIdx){var _=u.nextStart?u.nextStart:y;return Oe.b.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(_+.05)),void(this.media.currentTime=_+.05)}}else{var S=void 0,k=i.maxFragLookUpTolerance,T=d?m[d.sn-m[0].sn+1]:void 0,A=function(e){var t=Math.min(k,e.duration);return e.start+e.duration-t<=f?1:e.start-t>f&&e.start?-1:0};f<b?(f>b-k&&(k=0),S=T&&!A(T)?T:Ye.search(m,A)):S=m[g-1],S&&(w=S,y=S.start,d&&w.level===d.level&&w.sn===d.sn&&(w.sn<n.endSN?(w=m[w.sn+1-n.startSN],Oe.b.log("SN just loaded, load next one: "+w.sn)):w=null))}if(w)if(w.decryptdata&&null!=w.decryptdata.uri&&null==w.decryptdata.key)Oe.b.log("Loading key for "+w.sn+" of ["+n.startSN+" ,"+n.endSN+"],track "+v),this.state=St.KEY_LOADING,r.trigger(xe.a.KEY_LOADING,{frag:w});else{if(Oe.b.log("Loading "+w.sn+", cc: "+w.cc+" of ["+n.startSN+" ,"+n.endSN+"],track "+v+", currentTime:"+e+",bufferEnd:"+f.toFixed(3)),void 0!==this.fragLoadIdx?this.fragLoadIdx++:this.fragLoadIdx=0,w.loadCounter){w.loadCounter++;var M=i.fragLoadingLoopThreshold;if(w.loadCounter>M&&Math.abs(this.fragLoadIdx-w.loadIdx)<M)return void r.trigger(xe.a.ERROR,{type:Le.b.MEDIA_ERROR,details:Le.a.FRAG_LOOP_LOADING_ERROR,fatal:!1,frag:w})}else w.loadCounter=1;w.loadIdx=this.fragLoadIdx,this.fragCurrent=w,this.startFragRequested=!0,isNaN(w.sn)||(this.nextLoadPosition=w.start+w.duration),r.trigger(xe.a.FRAG_LOADING,{frag:w}),this.state=St.FRAG_LOADING}}break;case St.WAITING_TRACK:(t=this.tracks[this.trackId])&&t.details&&(this.state=St.IDLE);break;case St.FRAG_LOADING_WAITING_RETRY:var x=performance.now(),L=this.retryDate,O=(a=this.media)&&a.seeking;(!L||x>=L||O)&&(Oe.b.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=St.IDLE);break;case St.WAITING_INIT_PTS:var D=this.videoTrackCC;if(void 0===this.initPTS[D])break;var I=this.waitingFragment;if(I){var R=I.frag.cc;D!==R?(t=this.tracks[this.trackId]).details&&t.details.live&&(Oe.b.warn("Waiting fragment CC ("+R+") does not match video track CC ("+D+")"),this.waitingFragment=null,this.state=St.IDLE):(this.state=St.FRAG_LOADING,this.onFragLoaded(this.waitingFragment),this.waitingFragment=null)}else this.state=St.IDLE;break;case St.STOPPED:case St.FRAG_LOADING:case St.PARSING:case St.PARSED:case St.ENDED:}},t.prototype.onMediaAttached=function(e){var t=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),t.addEventListener("ended",this.onvended);var n=this.config;this.tracks&&n.autoStartLoad&&this.startLoad(n.startPosition)},t.prototype.onMediaDetaching=function(){var e=this.media;e&&e.ended&&(Oe.b.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var t=this.tracks;t&&t.forEach(function(e){e.details&&e.details.fragments.forEach(function(e){e.loadCounter=void 0})}),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1,this.stopLoad()},t.prototype.onMediaSeeking=function(){this.state===St.ENDED&&(this.state=St.IDLE),this.media&&(this.lastCurrentTime=this.media.currentTime),void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold),this.tick()},t.prototype.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},t.prototype.onAudioTracksUpdated=function(e){Oe.b.log("audio tracks updated"),this.tracks=e.audioTracks},t.prototype.onAudioTrackSwitching=function(e){var t=!!e.url;this.trackId=e.id,this.fragCurrent=null,this.state=St.PAUSED,this.waitingFragment=null,t?this.timer||(this.timer=setInterval(this.ontick,100)):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),t&&(this.audioSwitch=!0,this.state=St.IDLE,void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold)),this.tick()},t.prototype.onAudioTrackLoaded=function(e){var t=e.details,n=e.id,r=this.tracks[n],i=t.totalduration,o=0;if(Oe.b.log("track "+n+" loaded ["+t.startSN+","+t.endSN+"],duration:"+i),t.live){var a=r.details;a&&t.fragments.length>0?(w(a,t),o=t.fragments[0].start,t.PTSKnown?Oe.b.log("live audio playlist sliding:"+o.toFixed(3)):Oe.b.log("live audio playlist - outdated PTS, unknown sliding")):(t.PTSKnown=!1,Oe.b.log("live audio playlist - first load, unknown sliding"))}else t.PTSKnown=!1;if(r.details=t,!this.startFragRequested){if(-1===this.startPosition){var s=t.startTimeOffset;isNaN(s)?this.startPosition=0:(Oe.b.log("start time offset found in playlist, adjust startPosition to "+s),this.startPosition=s)}this.nextLoadPosition=this.startPosition}this.state===St.WAITING_TRACK&&(this.state=St.IDLE),this.tick()},t.prototype.onKeyLoaded=function(){this.state===St.KEY_LOADING&&(this.state=St.IDLE,this.tick())},t.prototype.onFragLoaded=function(e){var t=this.fragCurrent,n=e.frag;if(this.state===St.FRAG_LOADING&&t&&"audio"===n.type&&n.level===t.level&&n.sn===t.sn){var r=this.tracks[this.trackId],i=r.details,o=i.totalduration,a=t.level,s=t.sn,u=t.cc,l=this.config.defaultAudioCodec||r.audioCodec||"mp4a.40.2",c=this.stats=e.stats;if("initSegment"===s)this.state=St.IDLE,c.tparsed=c.tbuffered=performance.now(),i.initSegment.data=e.payload,this.hls.trigger(xe.a.FRAG_BUFFERED,{stats:c,frag:t,id:"audio"}),this.tick();else{this.state=St.PARSING,this.appended=!1,this.demuxer||(this.demuxer=new tt(this.hls,"audio"));var f=this.initPTS[u],d=i.initSegment?i.initSegment.data:[];if(i.initSegment||void 0!==f){this.pendingBuffering=!0,Oe.b.log("Demuxing "+s+" of ["+i.startSN+" ,"+i.endSN+"],track "+a);this.demuxer.push(e.payload,d,l,null,t,o,!1,f)}else Oe.b.log("unknown video PTS for continuity counter "+u+", waiting for video PTS before demuxing audio frag "+s+" of ["+i.startSN+" ,"+i.endSN+"],track "+a),this.waitingFragment=e,this.state=St.WAITING_INIT_PTS}}this.fragLoadError=0},t.prototype.onFragParsingInitSegment=function(e){var t=this.fragCurrent,n=e.frag;if(t&&"audio"===e.id&&n.sn===t.sn&&n.level===t.level&&this.state===St.PARSING){var r=e.tracks,i=void 0;if(r.video&&delete r.video,i=r.audio){i.levelCodec=i.codec,i.id=e.id,this.hls.trigger(xe.a.BUFFER_CODECS,r),Oe.b.log("audio track:audio,container:"+i.container+",codecs[level/parsed]=["+i.levelCodec+"/"+i.codec+"]");var o=i.initSegment;if(o){var a={type:"audio",data:o,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[a]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(xe.a.BUFFER_APPENDING,a))}this.tick()}}},t.prototype.onFragParsingData=function(e){var t=this,n=this.fragCurrent,r=e.frag;if(n&&"audio"===e.id&&"audio"===e.type&&r.sn===n.sn&&r.level===n.level&&this.state===St.PARSING){var i=this.trackId,o=this.tracks[i],a=this.hls;isNaN(e.endPTS)&&(e.endPTS=e.startPTS+n.duration,e.endDTS=e.startDTS+n.duration),Oe.b.log("parsed "+e.type+",PTS:["+e.startPTS.toFixed(3)+","+e.endPTS.toFixed(3)+"],DTS:["+e.startDTS.toFixed(3)+"/"+e.endDTS.toFixed(3)+"],nb:"+e.nb),b(o.details,n,e.startPTS,e.endPTS);var s=this.audioSwitch,u=this.media,l=!1;if(s&&u)if(u.readyState){var c=u.currentTime;Oe.b.log("switching audio track : currentTime:"+c),c>=e.startPTS&&(Oe.b.log("switching audio track : flushing all audio"),this.state=St.BUFFER_FLUSHING,a.trigger(xe.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),l=!0,this.audioSwitch=!1,a.trigger(xe.a.AUDIO_TRACK_SWITCHED,{id:i}))}else this.audioSwitch=!1,a.trigger(xe.a.AUDIO_TRACK_SWITCHED,{id:i});var f=this.pendingData;this.audioSwitch||([e.data1,e.data2].forEach(function(t){t&&t.length&&f.push({type:e.type,data:t,parent:"audio",content:"data"})}),!l&&f.length&&(f.forEach(function(e){t.state===St.PARSING&&(t.pendingBuffering=!0,t.hls.trigger(xe.a.BUFFER_APPENDING,e))}),this.pendingData=[],this.appended=!0)),this.tick()}},t.prototype.onFragParsed=function(e){var t=this.fragCurrent,n=e.frag;t&&"audio"===e.id&&n.sn===t.sn&&n.level===t.level&&this.state===St.PARSING&&(this.stats.tparsed=performance.now(),this.state=St.PARSED,this._checkAppendedParsed())},t.prototype.onBufferCreated=function(e){var t=e.tracks.audio;t&&(this.mediaBuffer=t.buffer,this.loadedmetadata=!0),e.tracks.video&&(this.videoBuffer=e.tracks.video.buffer)},t.prototype.onBufferAppended=function(e){if("audio"===e.parent){var t=this.state;t!==St.PARSING&&t!==St.PARSED||(this.pendingBuffering=e.pending>0,this._checkAppendedParsed())}},t.prototype._checkAppendedParsed=function(){if(!(this.state!==St.PARSED||this.appended&&this.pendingBuffering)){var e=this.fragCurrent,t=this.stats,n=this.hls;if(e){this.fragPrevious=e,t.tbuffered=performance.now(),n.trigger(xe.a.FRAG_BUFFERED,{stats:t,frag:e,id:"audio"});var r=this.mediaBuffer?this.mediaBuffer:this.media;Oe.b.log("audio buffered : "+nt.toString(r.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,n.trigger(xe.a.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=St.IDLE}this.tick()}},t.prototype.onError=function(e){var t=e.frag;if(!t||"audio"===t.type)switch(e.details){case Le.a.FRAG_LOAD_ERROR:case Le.a.FRAG_LOAD_TIMEOUT:if(!e.fatal){var n=this.fragLoadError;n?n++:n=1;var r=this.config;if(n<=r.fragLoadingMaxRetry){this.fragLoadError=n,t.loadCounter=0;var i=Math.min(Math.pow(2,n-1)*r.fragLoadingRetryDelay,r.fragLoadingMaxRetryTimeout);Oe.b.warn("audioStreamController: frag loading failed, retry in "+i+" ms"),this.retryDate=performance.now()+i,this.state=St.FRAG_LOADING_WAITING_RETRY}else Oe.b.error("audioStreamController: "+e.details+" reaches max retry, redispatch as fatal ..."),e.fatal=!0,this.state=St.ERROR}break;case Le.a.FRAG_LOOP_LOADING_ERROR:case Le.a.AUDIO_TRACK_LOAD_ERROR:case Le.a.AUDIO_TRACK_LOAD_TIMEOUT:case Le.a.KEY_LOAD_ERROR:case Le.a.KEY_LOAD_TIMEOUT:this.state!==St.ERROR&&(this.state=e.fatal?St.ERROR:St.IDLE,Oe.b.warn("audioStreamController: "+e.details+" while loading frag,switch to "+this.state+" state ..."));break;case Le.a.BUFFER_FULL_ERROR:if("audio"===e.parent&&(this.state===St.PARSING||this.state===St.PARSED)){var o=this.mediaBuffer,a=this.media.currentTime;if(o&&$e.isBuffered(o,a)&&$e.isBuffered(o,a+.5)){var s=this.config;s.maxMaxBufferLength>=s.maxBufferLength&&(s.maxMaxBufferLength/=2,Oe.b.warn("audio:reduce max buffer length to "+s.maxMaxBufferLength+"s"),this.fragLoadIdx+=2*s.fragLoadingLoopThreshold),this.state=St.IDLE}else Oe.b.warn("buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=St.BUFFER_FLUSHING,this.hls.trigger(xe.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"})}}},t.prototype.onBufferFlushed=function(){var e=this,t=this.pendingData;t&&t.length?(Oe.b.log("appending pending audio data on Buffer Flushed"),t.forEach(function(t){e.hls.trigger(xe.a.BUFFER_APPENDING,t)}),this.appended=!0,this.pendingData=[],this.state=St.PARSED):(this.state=St.IDLE,this.fragPrevious=null,this.tick())},Et(t,[{key:"state",set:function(e){if(this.state!==e){var t=this.state;this._state=e,Oe.b.log("audio stream:"+t+"->"+e)}},get:function(){return this._state}}]),t}(Ie),Tt=function(){function e(e){return"string"==typeof e&&(!!o[e.toLowerCase()]&&e.toLowerCase())}function t(e){return"string"==typeof e&&(!!a[e.toLowerCase()]&&e.toLowerCase())}function n(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}function r(r,o,a){var s=this,u=function(){if("undefined"!=typeof navigator)return/MSIE\s8\.0/.test(navigator.userAgent)}(),l={};u?s=document.createElement("custom"):l.enumerable=!0,s.hasBeenReset=!1;var c="",f=!1,d=r,h=o,p=a,v=null,m="",g=!0,y="auto",b="start",w=50,_="middle",E=50,S="middle";if(Object.defineProperty(s,"id",n({},l,{get:function(){return c},set:function(e){c=""+e}})),Object.defineProperty(s,"pauseOnExit",n({},l,{get:function(){return f},set:function(e){f=!!e}})),Object.defineProperty(s,"startTime",n({},l,{get:function(){return d},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");d=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"endTime",n({},l,{get:function(){return h},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");h=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"text",n({},l,{get:function(){return p},set:function(e){p=""+e,this.hasBeenReset=!0}})),Object.defineProperty(s,"region",n({},l,{get:function(){return v},set:function(e){v=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"vertical",n({},l,{get:function(){return m},set:function(t){var n=e(t);if(!1===n)throw new SyntaxError("An invalid or illegal string was specified.");m=n,this.hasBeenReset=!0}})),Object.defineProperty(s,"snapToLines",n({},l,{get:function(){return g},set:function(e){g=!!e,this.hasBeenReset=!0}})),Object.defineProperty(s,"line",n({},l,{get:function(){return y},set:function(e){if("number"!=typeof e&&e!==i)throw new SyntaxError("An invalid number or illegal string was specified.");y=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"lineAlign",n({},l,{get:function(){return b},set:function(e){var n=t(e);if(!n)throw new SyntaxError("An invalid or illegal string was specified.");b=n,this.hasBeenReset=!0}})),Object.defineProperty(s,"position",n({},l,{get:function(){return w},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");w=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",n({},l,{get:function(){return _},set:function(e){var n=t(e);if(!n)throw new SyntaxError("An invalid or illegal string was specified.");_=n,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",n({},l,{get:function(){return E},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");E=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",n({},l,{get:function(){return S},set:function(e){var n=t(e);if(!n)throw new SyntaxError("An invalid or illegal string was specified.");S=n,this.hasBeenReset=!0}})),s.displayState=void 0,u)return s}if("undefined"!=typeof window&&window.VTTCue)return window.VTTCue;var i="auto",o={"":!0,lr:!0,rl:!0},a={start:!0,middle:!0,end:!0,left:!0,right:!0};return r.prototype.getCueAsHTML=function(){return window.WebVTT.convertCueToDOMTree(window,this.text)},r}(),At=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}};oe.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var Mt=new Tt(0,0,0),xt="middle"===Mt.align?"middle":"center";re.prototype={parse:function(e){function t(){var e=n.buffer,t=0;for(e=ue(e);t<e.length&&"\r"!==e[t]&&"\n"!==e[t];)++t;var r=e.substr(0,t);return"\r"===e[t]&&++t,"\n"===e[t]&&++t,n.buffer=e.substr(t),r}var n=this;e&&(n.buffer+=n.decoder.decode(e,{stream:!0}));try{var r;if("INITIAL"===n.state){if(!/\r\n|\n/.test(n.buffer))return this;var i=(r=t()).match(/^(ï»¿)?WEBVTT([ \t].*)?$/);if(!i||!i[0])throw new Error("Malformed WebVTT signature.");n.state="HEADER"}for(var o=!1;n.buffer;){if(!/\r\n|\n/.test(n.buffer))return this;switch(o?o=!1:r=t(),n.state){case"HEADER":/:/.test(r)?function(e){ae(e,function(e,t){switch(e){case"Region":console.log("parse region",t)}},/:/)}(r):r||(n.state="ID");continue;case"NOTE":r||(n.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(r)){n.state="NOTE";break}if(!r)continue;if(n.cue=new Tt(0,0,""),n.state="CUE",-1===r.indexOf("--\x3e")){n.cue.id=r;continue}case"CUE":try{se(r,n.cue,n.regionList)}catch(e){n.cue=null,n.state="BADCUE";continue}n.state="CUETEXT";continue;case"CUETEXT":var a=-1!==r.indexOf("--\x3e");if(!r||a&&(o=!0)){n.oncue&&n.oncue(n.cue),n.cue=null,n.state="ID";continue}n.cue.text&&(n.cue.text+="\n"),n.cue.text+=r;continue;case"BADCUE":r||(n.state="ID");continue}}}catch(e){"CUETEXT"===n.state&&n.cue&&n.oncue&&n.oncue(n.cue),n.cue=null,n.state="INITIAL"===n.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new Error("Malformed WebVTT signature.")}catch(e){throw e}return e.onflush&&e.onflush(),this}};var Lt=re,Ot={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},Dt=function(e){var t=e;return Ot.hasOwnProperty(e)&&(t=Ot[e]),String.fromCharCode(t)},It=15,Rt=100,Nt={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},Ct={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Pt={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},jt={25:2,26:4,29:6,30:8,31:10,27:13,28:15},Ft=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],Bt={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(e){this.time=e},log:function(e,t){var n=this.verboseFilter[e];this.verboseLevel>=n&&console.log(this.time+" ["+e+"] "+t)}},zt=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].toString(16));return t},Ut=function(){function e(t,n,r,i,o){ce(this,e),this.foreground=t||"white",this.underline=n||!1,this.italics=r||!1,this.background=i||"black",this.flash=o||!1}return e.prototype.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},e.prototype.setStyles=function(e){for(var t=["foreground","underline","italics","background","flash"],n=0;n<t.length;n++){var r=t[n];e.hasOwnProperty(r)&&(this[r]=e[r])}},e.prototype.isDefault=function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},e.prototype.equals=function(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash},e.prototype.copy=function(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash},e.prototype.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},e}(),Gt=function(){function e(t,n,r,i,o,a){ce(this,e),this.uchar=t||" ",this.penState=new Ut(n,r,i,o,a)}return e.prototype.reset=function(){this.uchar=" ",this.penState.reset()},e.prototype.setChar=function(e,t){this.uchar=e,this.penState.copy(t)},e.prototype.setPenState=function(e){this.penState.copy(e)},e.prototype.equals=function(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)},e.prototype.copy=function(e){this.uchar=e.uchar,this.penState.copy(e.penState)},e.prototype.isEmpty=function(){return" "===this.uchar&&this.penState.isDefault()},e}(),Wt=function(){function e(){ce(this,e),this.chars=[];for(var t=0;t<Rt;t++)this.chars.push(new Gt);this.pos=0,this.currPenState=new Ut}return e.prototype.equals=function(e){for(var t=!0,n=0;n<Rt;n++)if(!this.chars[n].equals(e.chars[n])){t=!1;break}return t},e.prototype.copy=function(e){for(var t=0;t<Rt;t++)this.chars[t].copy(e.chars[t])},e.prototype.isEmpty=function(){for(var e=!0,t=0;t<Rt;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e},e.prototype.setCursor=function(e){this.pos!==e&&(this.pos=e),this.pos<0?(Bt.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>Rt&&(Bt.log("ERROR","Too large cursor position "+this.pos),this.pos=Rt)},e.prototype.moveCursor=function(e){var t=this.pos+e;if(e>1)for(var n=this.pos+1;n<t+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(t)},e.prototype.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},e.prototype.insertChar=function(e){e>=144&&this.backSpace();var t=Dt(e);this.pos>=Rt?Bt.log("ERROR","Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1))},e.prototype.clearFromPos=function(e){var t;for(t=e;t<Rt;t++)this.chars[t].reset()},e.prototype.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},e.prototype.clearToEndOfRow=function(){this.clearFromPos(this.pos)},e.prototype.getTextString=function(){for(var e=[],t=!0,n=0;n<Rt;n++){var r=this.chars[n].uchar;" "!==r&&(t=!1),e.push(r)}return t?"":e.join("")},e.prototype.setPenStyles=function(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)},e}(),Ht=function(){function e(){ce(this,e),this.rows=[];for(var t=0;t<It;t++)this.rows.push(new Wt);this.currRow=It-1,this.nrRollUpRows=null,this.reset()}return e.prototype.reset=function(){for(var e=0;e<It;e++)this.rows[e].clear();this.currRow=It-1},e.prototype.equals=function(e){for(var t=!0,n=0;n<It;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t},e.prototype.copy=function(e){for(var t=0;t<It;t++)this.rows[t].copy(e.rows[t])},e.prototype.isEmpty=function(){for(var e=!0,t=0;t<It;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e},e.prototype.backSpace=function(){this.rows[this.currRow].backSpace()},e.prototype.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},e.prototype.insertChar=function(e){this.rows[this.currRow].insertChar(e)},e.prototype.setPen=function(e){this.rows[this.currRow].setPenStyles(e)},e.prototype.moveCursor=function(e){this.rows[this.currRow].moveCursor(e)},e.prototype.setCursor=function(e){Bt.log("INFO","setCursor: "+e),this.rows[this.currRow].setCursor(e)},e.prototype.setPAC=function(e){Bt.log("INFO","pacData = "+JSON.stringify(e));var t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(var n=0;n<It;n++)this.rows[n].clear();var r=this.currRow+1-this.nrRollUpRows,i=this.lastOutputScreen;if(i){var o=i.rows[r].cueStartTime;if(o&&o<Bt.time)for(var a=0;a<this.nrRollUpRows;a++)this.rows[t-this.nrRollUpRows+a+1].copy(i.rows[r+a])}}this.currRow=t;var s=this.rows[this.currRow];if(null!==e.indent){var u=e.indent,l=Math.max(u-1,0);s.setCursor(e.indent),e.color=s.chars[l].penState.foreground}var c={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(c)},e.prototype.setBkgData=function(e){Bt.log("INFO","bkgData = "+JSON.stringify(e)),this.backSpace(),this.setPen(e),this.insertChar(32)},e.prototype.setRollUpRows=function(e){this.nrRollUpRows=e},e.prototype.rollUp=function(){if(null!==this.nrRollUpRows){Bt.log("TEXT",this.getDisplayText());var e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),Bt.log("INFO","Rolling up")}else Bt.log("DEBUG","roll_up but nrRollUpRows not set yet")},e.prototype.getDisplayText=function(e){e=e||!1;for(var t=[],n="",r=-1,i=0;i<It;i++){var o=this.rows[i].getTextString();o&&(r=i+1,e?t.push("Row "+r+": '"+o+"'"):t.push(o.trim()))}return t.length>0&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n},e.prototype.getTextAndFormat=function(){return this.rows},e}(),Vt=function(){function e(t,n){ce(this,e),this.chNr=t,this.outputFilter=n,this.mode=null,this.verbose=0,this.displayedMemory=new Ht,this.nonDisplayedMemory=new Ht,this.lastOutputScreen=new Ht,this.currRollUpRow=this.displayedMemory.rows[It-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}return e.prototype.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[It-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null},e.prototype.getHandler=function(){return this.outputFilter},e.prototype.setHandler=function(e){this.outputFilter=e},e.prototype.setPAC=function(e){this.writeScreen.setPAC(e)},e.prototype.setBkgData=function(e){this.writeScreen.setBkgData(e)},e.prototype.setMode=function(e){e!==this.mode&&(this.mode=e,Bt.log("INFO","MODE="+e),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)},e.prototype.insertChars=function(e){for(var t=0;t<e.length;t++)this.writeScreen.insertChar(e[t]);var n=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";Bt.log("INFO",n+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(Bt.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},e.prototype.ccRCL=function(){Bt.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},e.prototype.ccBS=function(){Bt.log("INFO","BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},e.prototype.ccAOF=function(){},e.prototype.ccAON=function(){},e.prototype.ccDER=function(){Bt.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},e.prototype.ccRU=function(e){Bt.log("INFO","RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)},e.prototype.ccFON=function(){Bt.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})},e.prototype.ccRDC=function(){Bt.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},e.prototype.ccTR=function(){Bt.log("INFO","TR"),this.setMode("MODE_TEXT")},e.prototype.ccRTD=function(){Bt.log("INFO","RTD"),this.setMode("MODE_TEXT")},e.prototype.ccEDM=function(){Bt.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate()},e.prototype.ccCR=function(){Bt.log("CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate()},e.prototype.ccENM=function(){Bt.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},e.prototype.ccEOC=function(){if(Bt.log("INFO","EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,Bt.log("TEXT","DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate()},e.prototype.ccTO=function(e){Bt.log("INFO","TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)},e.prototype.ccMIDROW=function(e){var t={flash:!1};if(t.underline=e%2==1,t.italics=e>=46,t.italics)t.foreground="white";else{var n=Math.floor(e/2)-16,r=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=r[n]}Bt.log("INFO","MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},e.prototype.outputDataUpdate=function(){var e=Bt.time;null!==e&&this.outputFilter&&(this.outputFilter.updateData&&this.outputFilter.updateData(e,this.displayedMemory),null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))},e.prototype.cueSplitAtTime=function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))},e}(),Zt=function(){function e(t,n,r){ce(this,e),this.field=t||1,this.outputs=[n,r],this.channels=[new Vt(1,n),new Vt(2,r)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.bufferedData=[],this.startTime=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}}return e.prototype.getHandler=function(e){return this.channels[e].getHandler()},e.prototype.setHandler=function(e,t){this.channels[e].setHandler(t)},e.prototype.addData=function(e,t){var n,r,i,o=!1;this.lastTime=e,Bt.setTime(e);for(var a=0;a<t.length;a+=2)r=127&t[a],i=127&t[a+1],0!==r||0!==i?(Bt.log("DATA","["+zt([t[a],t[a+1]])+"] -> ("+zt([r,i])+")"),(n=this.parseCmd(r,i))||(n=this.parseMidrow(r,i)),n||(n=this.parsePAC(r,i)),n||(n=this.parseBackgroundAttributes(r,i)),n||(o=this.parseChars(r,i))&&(this.currChNr&&this.currChNr>=0?this.channels[this.currChNr-1].insertChars(o):Bt.log("WARNING","No channel found yet. TEXT-MODE?")),n?this.dataCounters.cmd+=2:o?this.dataCounters.char+=2:(this.dataCounters.other+=2,Bt.log("WARNING","Couldn't parse cleaned data "+zt([r,i])+" orig: "+zt([t[a],t[a+1]])))):this.dataCounters.padding+=2},e.prototype.parseCmd=function(e,t){var n=null,r=(20===e||28===e)&&32<=t&&t<=47,i=(23===e||31===e)&&33<=t&&t<=35;if(!r&&!i)return!1;if(e===this.lastCmdA&&t===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,Bt.log("DEBUG","Repeated command ("+zt([e,t])+") is dropped"),!0;n=20===e||23===e?1:2;var o=this.channels[n-1];return 20===e||28===e?32===t?o.ccRCL():33===t?o.ccBS():34===t?o.ccAOF():35===t?o.ccAON():36===t?o.ccDER():37===t?o.ccRU(2):38===t?o.ccRU(3):39===t?o.ccRU(4):40===t?o.ccFON():41===t?o.ccRDC():42===t?o.ccTR():43===t?o.ccRTD():44===t?o.ccEDM():45===t?o.ccCR():46===t?o.ccENM():47===t&&o.ccEOC():o.ccTO(t-32),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=n,!0},e.prototype.parseMidrow=function(e,t){var n=null;return(17===e||25===e)&&32<=t&&t<=47&&((n=17===e?1:2)!==this.currChNr?(Bt.log("ERROR","Mismatch channel in midrow parsing"),!1):(this.channels[n-1].ccMIDROW(t),Bt.log("DEBUG","MIDROW ("+zt([e,t])+")"),!0))},e.prototype.parsePAC=function(e,t){var n=null,r=null,i=(17<=e&&e<=23||25<=e&&e<=31)&&64<=t&&t<=127,o=(16===e||24===e)&&64<=t&&t<=95;if(!i&&!o)return!1;if(e===this.lastCmdA&&t===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,!0;n=e<=23?1:2,r=64<=t&&t<=95?1===n?Nt[e]:Pt[e]:1===n?Ct[e]:jt[e];var a=this.interpretPAC(r,t);return this.channels[n-1].setPAC(a),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=n,!0},e.prototype.interpretPAC=function(e,t){var n=t,r={color:null,italics:!1,indent:null,underline:!1,row:e};return n=t>95?t-96:t-64,r.underline=1==(1&n),n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=4*Math.floor((n-16)/2),r},e.prototype.parseChars=function(e,t){var n=null,r=null,i=null;if(e>=25?(n=2,i=e-8):(n=1,i=e),17<=i&&i<=19){var o=t;o=17===i?t+80:18===i?t+112:t+144,Bt.log("INFO","Special char '"+Dt(o)+"' in channel "+n),r=[o]}else 32<=e&&e<=127&&(r=0===t?[e]:[e,t]);if(r){var a=zt(r);Bt.log("DEBUG","Char codes =  "+a.join(",")),this.lastCmdA=null,this.lastCmdB=null}return r},e.prototype.parseBackgroundAttributes=function(e,t){var n,r,i,o=(16===e||24===e)&&32<=t&&t<=47,a=(23===e||31===e)&&45<=t&&t<=47;return!(!o&&!a)&&(n={},16===e||24===e?(r=Math.floor((t-32)/2),n.background=Ft[r],t%2==1&&(n.background=n.background+"_semi")):45===t?n.background="transparent":(n.foreground="black",47===t&&(n.underline=!0)),i=e<24?1:2,this.channels[i-1].setBkgData(n),this.lastCmdA=null,this.lastCmdB=null,!0)},e.prototype.reset=function(){for(var e=0;e<this.channels.length;e++)this.channels[e]&&this.channels[e].reset();this.lastCmdA=null,this.lastCmdB=null},e.prototype.cueSplitAtTime=function(e){for(var t=0;t<this.channels.length;t++)this.channels[t]&&this.channels[t].cueSplitAtTime(e)},e}(),Yt=function(e,t,n){return e.substr(n||0,t.length)===t},$t=function(e){var t=parseInt(e.substr(-3)),n=parseInt(e.substr(-6,2)),r=parseInt(e.substr(-9,2)),i=e.length>9?parseInt(e.substr(0,e.indexOf(":"))):0;return isNaN(t)||isNaN(n)||isNaN(r)||isNaN(i)?-1:(t+=1e3*n,t+=6e4*r,t+=36e5*i)},Jt=function(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return(t>>>0).toString()},Kt=function(e,t,n){var r=e[t],i=e[r.prevCC];if(!i||!i.new&&r.new)return e.ccOffset=e.presentationOffset=r.start,void(r.new=!1);for(;i&&i.new;)e.ccOffset+=r.start-i.start,r.new=!1,i=e[(r=i).prevCC];e.presentationOffset=n},Qt={parse:function(e,t,n,r,i,o){var a=/\r\n|\n\r|\n|\r/g,s=new Uint8Array(e).reduce(function(e,t){return e+String.fromCharCode(t)},"").trim().replace(a,"\n").split("\n"),u="00:00.000",l=0,c=0,f=0,d=[],h=void 0,p=!0,v=new Lt;v.oncue=function(e){var t=n[r],i=n.ccOffset;t&&t.new&&(void 0!==c?i=n.ccOffset=t.start:Kt(n,r,f)),f&&(i=f+n.ccOffset-n.presentationOffset),e.startTime+=i-c,e.endTime+=i-c,e.id=Jt(e.startTime)+Jt(e.endTime)+Jt(e.text),e.text=decodeURIComponent(escape(e.text)),e.endTime>0&&d.push(e)},v.onparsingerror=function(e){h=e},v.onflush=function(){h&&o?o(h):i(d)},s.forEach(function(e){if(p){if(Yt(e,"X-TIMESTAMP-MAP=")){p=!1,e.substr(16).split(",").forEach(function(e){Yt(e,"LOCAL:")?u=e.substr(6):Yt(e,"MPEGTS:")&&(l=parseInt(e.substr(7)))});try{l-=t=t<0?t+8589934592:t,c=$t(u)/1e3,f=l/9e4,-1===c&&(h=new Error("Malformed X-TIMESTAMP-MAP: "+e))}catch(t){h=new Error("Malformed X-TIMESTAMP-MAP: "+e)}return}""===e&&(p=!1)}v.parse(e+"\n")}),v.flush()}},Xt=function(e){function t(n){fe(this,t);var r=de(this,e.call(this,n,xe.a.MEDIA_ATTACHING,xe.a.MEDIA_DETACHING,xe.a.FRAG_PARSING_USERDATA,xe.a.FRAG_DECRYPTED,xe.a.MANIFEST_LOADING,xe.a.MANIFEST_LOADED,xe.a.FRAG_LOADED,xe.a.LEVEL_SWITCHING,xe.a.INIT_PTS_FOUND));if(r.hls=n,r.config=n.config,r.enabled=!0,r.Cues=n.config.cueHandler,r.textTracks=[],r.tracks=[],r.unparsedVttFrags=[],r.initPTS=void 0,r.cueRanges=[],r.config.enableCEA708Captions){var i=r,o=function(e,t){var n=null;try{n=new window.Event("addtrack")}catch(e){(n=document.createEvent("Event")).initEvent("addtrack",!1,!1)}n.track=e,t.dispatchEvent(n)},a={newCue:function(e,t,n){if(!i.textTrack1){var r=i.getExistingTrack("1");if(r)i.textTrack1=r,pe(i.textTrack1),o(i.textTrack1,i.media);else{var a=i.createTextTrack("captions",i.config.captionsTextTrack1Label,i.config.captionsTextTrack1LanguageCode);a&&(a.textTrack1=!0,i.textTrack1=a)}}i.addCues("textTrack1",e,t,n)}},s={newCue:function(e,t,n){if(!i.textTrack2){var r=i.getExistingTrack("2");if(r)i.textTrack2=r,pe(i.textTrack2),o(i.textTrack2,i.media);else{var a=i.createTextTrack("captions",i.config.captionsTextTrack2Label,i.config.captionsTextTrack1LanguageCode);a&&(a.textTrack2=!0,i.textTrack2=a)}}i.addCues("textTrack2",e,t,n)}};r.cea608Parser=new Zt(0,a,s)}return r}return he(t,e),t.prototype.addCues=function(e,t,n,r){for(var i=this.cueRanges,o=!1,a=i.length;a--;){var s=i[a],u=me(s[0],s[1],t,n);if(u>=0&&(s[0]=Math.min(s[0],t),s[1]=Math.max(s[1],n),o=!0,u/(n-t)>.5))return}o||i.push([t,n]),this.Cues.newCue(this[e],t,n,r)},t.prototype.onInitPtsFound=function(e){var t=this;void 0===this.initPTS&&(this.initPTS=e.initPTS),this.unparsedVttFrags.length&&(this.unparsedVttFrags.forEach(function(e){t.onFragLoaded(e)}),this.unparsedVttFrags=[])},t.prototype.getExistingTrack=function(e){var t=this.media;if(t)for(var n=0;n<t.textTracks.length;n++){var r=t.textTracks[n];if(!0===r["textTrack"+e])return r}return null},t.prototype.createTextTrack=function(e,t,n){var r=this.media;if(r)return r.addTextTrack(e,t,n)},t.prototype.destroy=function(){Ie.prototype.destroy.call(this)},t.prototype.onMediaAttaching=function(e){this.media=e.media},t.prototype.onMediaDetaching=function(){pe(this.textTrack1),pe(this.textTrack2)},t.prototype.onManifestLoading=function(){this.lastSn=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0};var e=this.media;if(e){var t=e.textTracks;if(t)for(var n=0;n<t.length;n++)pe(t[n])}},t.prototype.onManifestLoaded=function(e){var t=this;if(this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=void 0,this.cueRanges=[],this.config.enableWebVTT){this.tracks=e.subtitles||[];var n=this.media?this.media.textTracks:[];this.tracks.forEach(function(e,r){var i=void 0;if(r<n.length){var o=n[r];ve(o,e)&&(i=o)}i||(i=t.createTextTrack("subtitles",e.name,e.lang)),i.mode=e.default?"showing":"hidden",t.textTracks.push(i)})}},t.prototype.onLevelSwitching=function(){this.enabled="NONE"!==this.hls.currentLevel.closedCaptions},t.prototype.onFragLoaded=function(e){var t=e.frag,n=e.payload;if("main"===t.type){var r=t.sn;if(r!==this.lastSn+1){var i=this.cea608Parser;i&&i.reset()}this.lastSn=r}else if("subtitle"===t.type)if(n.byteLength){if(void 0===this.initPTS)return void this.unparsedVttFrags.push(e);var o=t.decryptdata;null!=o&&null!=o.key&&"AES-128"===o.method||this._parseVTTs(t,n)}else this.hls.trigger(xe.a.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t})},t.prototype._parseVTTs=function(e,t){var n=this.vttCCs;n[e.cc]||(n[e.cc]={start:e.start,prevCC:this.prevCC,new:!0},this.prevCC=e.cc);var r=this.textTracks,i=this.hls;Qt.parse(t,this.initPTS,n,e.cc,function(t){var n=r[e.trackId];t.forEach(function(e){if(!n.cues.getCueById(e.id))try{n.addCue(e)}catch(r){var t=new window.TextTrackCue(e.startTime,e.endTime,e.text);t.id=e.id,n.addCue(t)}}),i.trigger(xe.a.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},function(t){Oe.b.log("Failed to parse VTT cue: "+t),i.trigger(xe.a.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e})})},t.prototype.onFragDecrypted=function(e){var t=e.payload,n=e.frag;if("subtitle"===n.type){if(void 0===this.initPTS)return void this.unparsedVttFrags.push(e);this._parseVTTs(n,t)}},t.prototype.onFragParsingUserdata=function(e){if(this.enabled&&this.config.enableCEA708Captions)for(var t=0;t<e.samples.length;t++){var n=this.extractCea608Data(e.samples[t].bytes);this.cea608Parser.addData(e.samples[t].pts,n)}},t.prototype.extractCea608Data=function(e){for(var t,n,r,i,o,a=31&e[0],s=2,u=[],l=0;l<a;l++)t=e[s++],n=127&e[s++],r=127&e[s++],i=0!=(4&t),o=3&t,0===n&&0===r||i&&0===o&&(u.push(n),u.push(r));return u},t}(Ie),qt=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),en=function(e){function t(n){ge(this,t);var r=ye(this,e.call(this,n,xe.a.MEDIA_ATTACHED,xe.a.MEDIA_DETACHING,xe.a.MANIFEST_LOADING,xe.a.MANIFEST_LOADED,xe.a.SUBTITLE_TRACK_LOADED));return r.tracks=[],r.trackId=-1,r.media=void 0,r.subtitleDisplay=!1,r}return be(t,e),t.prototype._onTextTracksChanged=function(){if(this.media){for(var e=-1,t=we(this.media.textTracks),n=0;n<t.length;n++)"showing"===t[n].mode&&(e=n);this.subtitleTrack=e}},t.prototype.destroy=function(){Ie.prototype.destroy.call(this)},t.prototype.onMediaAttached=function(e){var t=this;this.media=e.media,this.media&&(this.trackChangeListener=this._onTextTracksChanged.bind(this),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.subtitlePollingInterval=setInterval(function(){t.trackChangeListener()},500):this.media.textTracks.addEventListener("change",this.trackChangeListener))},t.prototype.onMediaDetaching=function(){this.media&&(this.useTextTrackPolling?clearInterval(this.subtitlePollingInterval):this.media.textTracks.removeEventListener("change",this.trackChangeListener),this.media=void 0)},t.prototype.onManifestLoading=function(){this.tracks=[],this.trackId=-1},t.prototype.onManifestLoaded=function(e){var t=this,n=e.subtitles||[],r=!1;this.tracks=n,this.trackId=-1,this.hls.trigger(xe.a.SUBTITLE_TRACKS_UPDATED,{subtitleTracks:n}),n.forEach(function(e){e.default&&(t.subtitleTrack=e.id,r=!0)})},t.prototype.onTick=function(){var e=this.trackId,t=this.tracks[e];if(t){var n=t.details;void 0!==n&&!0!==n.live||(Oe.b.log("(re)loading playlist for subtitle track "+e),this.hls.trigger(xe.a.SUBTITLE_TRACK_LOADING,{url:t.url,id:e}))}},t.prototype.onSubtitleTrackLoaded=function(e){var t=this;e.id<this.tracks.length&&(Oe.b.log("subtitle track "+e.id+" loaded"),this.tracks[e.id].details=e.details,e.details.live&&!this.timer&&(this.timer=setInterval(function(){t.onTick()},1e3*e.details.targetduration,this)),!e.details.live&&this.timer&&(clearInterval(this.timer),this.timer=null))},t.prototype.setSubtitleTrackInternal=function(e){if(!(e<-1||e>=this.tracks.length)){this.timer&&(clearInterval(this.timer),this.timer=null);var t=we(this.media.textTracks);if(-1!==this.trackId&&this.subtitleDisplay&&(t[this.trackId].mode="hidden"),this.trackId=e,Oe.b.log("switching to subtitle track "+e),this.hls.trigger(xe.a.SUBTITLE_TRACK_SWITCH,{id:e}),-1!==e){var n=this.tracks[e];this.subtitleDisplay&&(t[e].mode="showing");var r=n.details;void 0!==r&&!0!==r.live||(Oe.b.log("(re)loading playlist for subtitle track "+e),this.hls.trigger(xe.a.SUBTITLE_TRACK_LOADING,{url:n.url,id:e}))}}},qt(t,[{key:"subtitleTracks",get:function(){return this.tracks}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(e){this.trackId!==e&&this.setSubtitleTrackInternal(e)}}]),t}(Ie),tn=n(3),nn={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING"},rn=function(e){function t(n){_e(this,t);var r=Ee(this,e.call(this,n,xe.a.MEDIA_ATTACHED,xe.a.ERROR,xe.a.KEY_LOADED,xe.a.FRAG_LOADED,xe.a.SUBTITLE_TRACKS_UPDATED,xe.a.SUBTITLE_TRACK_SWITCH,xe.a.SUBTITLE_TRACK_LOADED,xe.a.SUBTITLE_FRAG_PROCESSED));return r.config=n.config,r.vttFragSNsProcessed={},r.vttFragQueues=void 0,r.currentlyProcessing=null,r.state=nn.STOPPED,r.currentTrackId=-1,r.ticks=0,r.decrypter=new tn.a(n.observer,n.config),r}return Se(t,e),t.prototype.destroy=function(){Ie.prototype.destroy.call(this),this.state=nn.STOPPED},t.prototype.clearVttFragQueues=function(){var e=this;this.vttFragQueues={},this.tracks.forEach(function(t){e.vttFragQueues[t.id]=[]})},t.prototype.nextFrag=function(){if(null===this.currentlyProcessing&&this.currentTrackId>-1&&this.vttFragQueues[this.currentTrackId].length){var e=this.currentlyProcessing=this.vttFragQueues[this.currentTrackId].shift();this.fragCurrent=e,this.hls.trigger(xe.a.FRAG_LOADING,{frag:e}),this.state=nn.FRAG_LOADING}},t.prototype.onSubtitleFragProcessed=function(e){e.success&&this.vttFragSNsProcessed[e.frag.trackId].push(e.frag.sn),this.currentlyProcessing=null,this.state=nn.IDLE,this.nextFrag()},t.prototype.onMediaAttached=function(){this.state=nn.IDLE},t.prototype.onError=function(e){var t=e.frag;t&&"subtitle"!==t.type||this.currentlyProcessing&&(this.currentlyProcessing=null,this.nextFrag())},t.prototype.tick=function(){var e=this;1===++this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(function(){e.tick()},1),this.ticks=0)},t.prototype.doTick=function(){var e=this;switch(this.state){case nn.IDLE:var t=this.tracks,n=this.currentTrackId,r=this.vttFragSNsProcessed[n],i=this.vttFragQueues[n],o=this.currentlyProcessing?this.currentlyProcessing.sn:-1,a=function(e){return r.indexOf(e.sn)>-1},s=function(e){return i.some(function(t){return t.sn===e.sn})};if(!t)break;var u;if(n<t.length&&(u=t[n].details),void 0===u)break;u.fragments.forEach(function(t){a(t)||t.sn===o||s(t)||(t.decryptdata&&null!=t.decryptdata.uri&&null==t.decryptdata.key?(Oe.b.log("Loading key for "+t.sn),e.state=nn.KEY_LOADING,e.hls.trigger(xe.a.KEY_LOADING,{frag:t})):(t.trackId=n,i.push(t),e.nextFrag()))})}},t.prototype.onSubtitleTracksUpdated=function(e){var t=this;Oe.b.log("subtitle tracks updated"),this.tracks=e.subtitleTracks,this.clearVttFragQueues(),this.vttFragSNsProcessed={},this.tracks.forEach(function(e){t.vttFragSNsProcessed[e.id]=[]})},t.prototype.onSubtitleTrackSwitch=function(e){this.currentTrackId=e.id,this.clearVttFragQueues()},t.prototype.onSubtitleTrackLoaded=function(){this.tick()},t.prototype.onKeyLoaded=function(){this.state===nn.KEY_LOADING&&(this.state=nn.IDLE,this.tick())},t.prototype.onFragLoaded=function(e){var t=this.fragCurrent,n=e.frag.decryptdata,r=e.frag,i=this.hls;if(this.state===nn.FRAG_LOADING&&t&&"subtitle"===e.frag.type&&t.sn===e.frag.sn&&e.payload.byteLength>0&&null!=n&&null!=n.key&&"AES-128"===n.method){var o;try{o=performance.now()}catch(e){o=Date.now()}this.decrypter.decrypt(e.payload,n.key.buffer,n.iv.buffer,function(e){var t;try{t=performance.now()}catch(e){t=Date.now()}i.trigger(xe.a.FRAG_DECRYPTED,{frag:r,payload:e,stats:{tstart:o,tdecrypt:t}})})}},t}(Ie),on={autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,maxBufferSize:6e7,maxBufferHole:.5,maxSeekHole:2,lowBufferWatchdogPeriod:.5,highBufferWatchdogPeriod:3,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,fragLoadingLoopThreshold:3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:bt,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,fetchSetup:void 0,abrController:ht,bufferController:vt,capLevelController:gt,fpsController:yt,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0};on.subtitleStreamController=rn,on.subtitleTrackController=en,on.timelineController=Xt,on.cueHandler=Te,on.enableCEA708Captions=!0,on.enableWebVTT=!0,on.captionsTextTrack1Label="English",on.captionsTextTrack1LanguageCode="en",on.captionsTextTrack2Label="Spanish",on.captionsTextTrack2LanguageCode="es",on.audioStreamController=kt,on.audioTrackController=_t;var an=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),sn=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ke(this,e);var r=e.DefaultConfig;if((n.liveSyncDurationCount||n.liveMaxLatencyDurationCount)&&(n.liveSyncDuration||n.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");for(var i in r)i in n||(n[i]=r[i]);if(void 0!==n.liveMaxLatencyDurationCount&&n.liveMaxLatencyDurationCount<=n.liveSyncDurationCount)throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be gt "liveSyncDurationCount"');if(void 0!==n.liveMaxLatencyDuration&&(n.liveMaxLatencyDuration<=n.liveSyncDuration||void 0===n.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be gt "liveSyncDuration"');Object(Oe.a)(n.debug),this.config=n,this._autoLevelCapping=-1;var o=this.observer=new Qe.a;o.trigger=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o.emit.apply(o,[e,e].concat(n))},o.off=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o.removeListener.apply(o,[e].concat(n))},this.on=o.on.bind(o),this.off=o.off.bind(o),this.trigger=o.trigger.bind(o);var a=this.abrController=new n.abrController(this),s=new n.bufferController(this),u=new n.capLevelController(this),l=new n.fpsController(this),c=new He(this),f=new Ve(this),d=new Ze(this),h=new lt(this),p=[this.levelController=new st(this),this.streamController=new ot(this)],v=n.audioStreamController;v&&p.push(new v(this)),this.networkControllers=p;var m=[c,f,d,a,s,u,l,h];if(v=n.audioTrackController){var g=new v(this);this.audioTrackController=g,m.push(g)}if(v=n.subtitleTrackController){var y=new v(this);this.subtitleTrackController=y,m.push(y)}[n.subtitleStreamController,n.timelineController].forEach(function(e){e&&m.push(new e(t))}),this.coreComponents=m}return e.isSupported=function(){var e=m(),t=window.SourceBuffer||window.WebKitSourceBuffer,n=e&&"function"==typeof e.isTypeSupported&&e.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),r=!t||t.prototype&&"function"==typeof t.prototype.appendBuffer&&"function"==typeof t.prototype.remove;return n&&r},an(e,null,[{key:"version",get:function(){return"0.8.5"}},{key:"Events",get:function(){return xe.a}},{key:"ErrorTypes",get:function(){return Le.b}},{key:"ErrorDetails",get:function(){return Le.a}},{key:"DefaultConfig",get:function(){return e.defaultConfig?e.defaultConfig:on},set:function(t){e.defaultConfig=t}}]),e.prototype.destroy=function(){Oe.b.log("destroy"),this.trigger(xe.a.DESTROYING),this.detachMedia(),this.coreComponents.concat(this.networkControllers).forEach(function(e){e.destroy()}),this.url=null,this.observer.removeAllListeners(),this._autoLevelCapping=-1},e.prototype.attachMedia=function(e){Oe.b.log("attachMedia"),this.media=e,this.trigger(xe.a.MEDIA_ATTACHING,{media:e})},e.prototype.detachMedia=function(){Oe.b.log("detachMedia"),this.trigger(xe.a.MEDIA_DETACHING),this.media=null},e.prototype.loadSource=function(e){e=Me.a.buildAbsoluteURL(window.location.href,e,{alwaysNormalize:!0}),Oe.b.log("loadSource:"+e),this.url=e,this.trigger(xe.a.MANIFEST_LOADING,{url:e})},e.prototype.startLoad=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;Oe.b.log("startLoad("+e+")"),this.networkControllers.forEach(function(t){t.startLoad(e)})},e.prototype.stopLoad=function(){Oe.b.log("stopLoad"),this.networkControllers.forEach(function(e){e.stopLoad()})},e.prototype.swapAudioCodec=function(){Oe.b.log("swapAudioCodec"),this.streamController.swapAudioCodec()},e.prototype.recoverMediaError=function(){Oe.b.log("recoverMediaError");var e=this.media;this.detachMedia(),this.attachMedia(e)},an(e,[{key:"levels",get:function(){return this.levelController.levels}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(e){Oe.b.log("set currentLevel:"+e),this.loadLevel=e,this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(e){Oe.b.log("set nextLevel:"+e),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(e){Oe.b.log("set loadLevel:"+e),this.levelController.manualLevel=e}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(e){this.levelController.nextLoadLevel=e}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(e){Oe.b.log("set firstLevel:"+e),this.levelController.firstLevel=e}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(e){Oe.b.log("set startLevel:"+e);var t=this;-1!==e&&(e=Math.max(e,t.minAutoLevel)),t.levelController.startLevel=e}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(e){Oe.b.log("set autoLevelCapping:"+e),this._autoLevelCapping=e}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){for(var e=this,t=e.levels,n=e.config.minAutoBitrate,r=t?t.length:0,i=0;i<r;i++)if((t[i].realBitrate?Math.max(t[i].realBitrate,t[i].bitrate):t[i].bitrate)>n)return i;return 0}},{key:"maxAutoLevel",get:function(){var e=this,t=e.levels,n=e.autoLevelCapping;return-1===n&&t&&t.length?t.length-1:n}},{key:"nextAutoLevel",get:function(){var e=this;return Math.min(Math.max(e.abrController.nextAutoLevel,e.minAutoLevel),e.maxAutoLevel)},set:function(e){var t=this;t.abrController.nextAutoLevel=Math.max(t.minAutoLevel,e)}},{key:"audioTracks",get:function(){var e=this.audioTrackController;return e?e.audioTracks:[]}},{key:"audioTrack",get:function(){var e=this.audioTrackController;return e?e.audioTrack:-1},set:function(e){var t=this.audioTrackController;t&&(t.audioTrack=e)}},{key:"liveSyncPosition",get:function(){return this.streamController.liveSyncPosition}},{key:"subtitleTracks",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTrack:-1},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}},{key:"subtitleDisplay",get:function(){var e=this.subtitleTrackController;return!!e&&e.subtitleDisplay},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}}]),e}();t.default=sn},function(e,t,n){function r(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t.oe=function(e){throw console.error(e),e};var r=t(t.s=ENTRY_MODULE);return r.default||r}function i(e){return(e+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function o(e){var t=[],n=e.toString(),r=n.match(/^function\s?\(\w+,\s*\w+,\s*(\w+)\)/);if(!r)return t;for(var o,a=r[1],s=new RegExp("(\\\\n|\\W)"+i(a)+"\\((/\\*.*?\\*/)?s?.*?([\\.|\\-|\\w|/|@]+).*?\\)","g");o=s.exec(n);)t.push(o[3]);return t}function a(e,t){for(var n=[t],r=[],i={};n.length;){var a=n.pop();if(!i[a]&&e[a]){i[a]=!0,r.push(a);var s=o(e[a]);n=n.concat(s)}}return r}e.exports=function(e,t){t=t||{};var i=n.m,o=t.all?Object.keys(i):a(i,e),s="("+r.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+o.map(function(e){return JSON.stringify(e)+": "+i[e].toString()}).join(",")+"})(self);",u=new window.Blob([s],{type:"text/javascript"});if(t.bare)return u;var l=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(u),c=new window.Worker(l);return c.objectURL=l,c}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),i=n(1),o=n(0),a=n(5),s=n.n(a);t.default=function(e){var t=new s.a;t.trigger=function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];t.emit.apply(t,[e,e].concat(r))},t.off=function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];t.removeListener.apply(t,[e].concat(r))};var n=function(t,n){e.postMessage({event:t,data:n})};e.addEventListener("message",function(i){var a=i.data;switch(a.cmd){case"init":var s=JSON.parse(a.config);e.demuxer=new r.a(t,a.typeSupported,s,a.vendor);try{Object(o.a)(!0===s.debug)}catch(e){console.warn("demuxerWorker: unable to enable logs")}n("init",null);break;case"demux":e.demuxer.push(a.data,a.decryptdata,a.initSegment,a.audioCodec,a.videoCodec,a.timeOffset,a.discontinuity,a.trackSwitch,a.contiguous,a.duration,a.accurateTimeOffset,a.defaultInitPTS)}}),t.on(i.a.FRAG_DECRYPTED,n),t.on(i.a.FRAG_PARSING_INIT_SEGMENT,n),t.on(i.a.FRAG_PARSED,n),t.on(i.a.ERROR,n),t.on(i.a.FRAG_PARSING_METADATA,n),t.on(i.a.FRAG_PARSING_USERDATA,n),t.on(i.a.INIT_PTS_FOUND,n),t.on(i.a.FRAG_PARSING_DATA,function(t,n){var r=[],i={event:t,data:n};n.data1&&(i.data1=n.data1.buffer,r.push(n.data1.buffer),delete n.data1),n.data2&&(i.data2=n.data2.buffer,r.push(n.data2.buffer),delete n.data2),e.postMessage(i,r)})}}]).default})})),Qm={type:"vod",autoPlay:!1,box:"hls",lockInternalProperty:!1,debug:!0,enableWorker:!0},Xm=function(e){function t(e,n){Xr(this,t);var r=Vo(this,(t.__proto__||Qr(t)).call(this));return r.tag="HLS-player",r.video=e,r.box="hls",r.config=T({},Qm,n),r.hls=new Km,r.bindEvents(r.hls),r.attachMedia(),r}return ea(t,Ou),ca(t,null,[{key:"isSupport",value:function(){return Km.isSupported()}},{key:"version",get:function(){return"1.0.6"}}]),ca(t,[{key:"internalPropertyHandle",value:function(){if(la){var e=this,t=la(HTMLMediaElement.prototype,"currentTime");Object.defineProperty(this.video,"currentTime",{get:function(){return t.get.call(e.video)},set:function(n){if(e.currentTimeLock)return t.set.call(e.video,n);throw new Error("can not set currentTime by youself")}})}}},{key:"bindEvents",value:function(e){var t=this;e&&(e.on(Km.Events.ERROR,function(e,t){}),e.on(Km.Events.LEVEL,function(e,t){})),this.video&&this.config.lockInternalProperty&&this.video.addEventListener("canplay",function(){t.internalPropertyHandle()})}},{key:"load",value:function(){this.hls.loadSource(this.config.src)}},{key:"attachMedia",value:function(){this.hls.attachMedia(this.video)}},{key:"play",value:function(){return this.video.play()}},{key:"destroy",value:function(){return this.hls.destroy()}},{key:"seek",value:function(e){this.currentTimeLock=!0,this._seek(e),this.currentTimeLock=!1}},{key:"_seek",value:function(e){this.video.currentTime=e}},{key:"pause",value:function(){return this.video.pause()}},{key:"refresh",value:function(){this.hls.stopLoad(),this.hls.loadSource(this.config.src)}}]),t}(),qm=e(t(function(e,t){!function(t,n){e.exports=n()}(0,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=9)}([function(e,t,n){!function(e,n){n(t)}(0,function(e){function t(e){return e&&e.__esModule?e.default:e}function n(e,t){return t={exports:{}},e(t,t.exports),t.exports}function r(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)&&!r(e)}function a(e,t){var n=e.__evt_id;n||(Object.defineProperty(e,"__evt_id",{writable:!0,enumerable:!1,configurable:!0}),n=e.__evt_id=++nn.count);var r=n+"_"+t,i=nn[r];return i||(i=nn[r]=[]),i}function s(e,t,n){var r=Ut(null);r.type=t,r.target=e,n&&Ft(r,o(n)?n:{data:n}),a(e,t).forEach(function(t){(t[1]||t[0]).apply(e,[r])})}function u(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments[4];i(r)&&!o&&(o=r,r=void 0);var s=[n,void 0,r];r&&!o&&(o=function(){l(e,t,n,r);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];n.apply(e,o)}),o&&(s[1]=o),a(e,t).push(s)}function l(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=a(e,t);if(n||r){var o=-1,s=void 0;return i.find(function(e,t){if((!n||e[0]===n)&&(!r||e[2]))return o=t,s=e[1],!0}),-1!==o&&i.splice(o,1),s}i.length=0}var c=Math.ceil,f=Math.floor,d=function(e){return isNaN(e=+e)?0:(e>0?f:c)(e)},h=function(e){if(void 0==e)throw TypeError("Can't call method on  "+e);return e},p=n(function(e){var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)}),v=n(function(e){var t=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=t)}),m=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e},g=function(e,t,n){if(m(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}},y=function(e){return"object"==typeof e?null!==e:"function"==typeof e},b=function(e){if(!y(e))throw TypeError(e+" is not an object!");return e},w=function(e){try{return!!e()}catch(e){return!0}},_=!w(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),E=p.document,S=y(E)&&y(E.createElement),k=function(e){return S?E.createElement(e):{}},T=!_&&!w(function(){return 7!=Object.defineProperty(k("div"),"a",{get:function(){return 7}}).a}),A=function(e,t){if(!y(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!y(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!y(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!y(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},M=Object.defineProperty,x={f:_?Object.defineProperty:function(e,t,n){if(b(e),t=A(t,!0),b(n),T)try{return M(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},L=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},O=_?function(e,t,n){return x.f(e,t,L(1,n))}:function(e,t,n){return e[t]=n,e},D=function(e,t,n){var r,i,o,a=e&D.F,s=e&D.G,u=e&D.S,l=e&D.P,c=e&D.B,f=e&D.W,d=s?v:v[t]||(v[t]={}),h=d.prototype,m=s?p:u?p[t]:(p[t]||{}).prototype;s&&(n=t);for(r in n)(i=!a&&m&&void 0!==m[r])&&r in d||(o=i?m[r]:n[r],d[r]=s&&"function"!=typeof m[r]?n[r]:c&&i?g(o,p):f&&m[r]==o?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(o):l&&"function"==typeof o?g(Function.call,o):o,l&&((d.virtual||(d.virtual={}))[r]=o,e&D.R&&h&&!h[r]&&O(h,r,o)))};D.F=1,D.G=2,D.S=4,D.P=8,D.B=16,D.W=32,D.U=64,D.R=128;var I=D,R=O,N={}.hasOwnProperty,C=function(e,t){return N.call(e,t)},P={},j={}.toString,F=function(e){return j.call(e).slice(8,-1)},B=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==F(e)?e.split(""):Object(e)},z=function(e){return B(h(e))},U=Math.min,G=function(e){return e>0?U(d(e),9007199254740991):0},W=Math.max,H=Math.min,V=function(e,t){return(e=d(e))<0?W(e+t,0):H(e,t)},Z=p["__core-js_shared__"]||(p["__core-js_shared__"]={}),Y=function(e){return Z[e]||(Z[e]={})},$=0,J=Math.random(),K=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++$+J).toString(36))},Q=Y("keys"),X=function(e){return Q[e]||(Q[e]=K(e))},q=function(e){return function(t,n,r){var i,o=z(t),a=G(o.length),s=V(r,a);if(e&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}}(!1),ee=X("IE_PROTO"),te=function(e,t){var n,r=z(e),i=0,o=[];for(n in r)n!=ee&&C(r,n)&&o.push(n);for(;t.length>i;)C(r,n=t[i++])&&(~q(o,n)||o.push(n));return o},ne="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),re=Object.keys||function(e){return te(e,ne)},ie=_?Object.defineProperties:function(e,t){b(e);for(var n,r=re(t),i=r.length,o=0;i>o;)x.f(e,n=r[o++],t[n]);return e},oe=p.document&&document.documentElement,ae=X("IE_PROTO"),se=function(){},ue=function(){var e,t=k("iframe"),n=ne.length;for(t.style.display="none",oe.appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),ue=e.F;n--;)delete ue.prototype[ne[n]];return ue()},le=Object.create||function(e,t){var n;return null!==e?(se.prototype=b(e),n=new se,se.prototype=null,n[ae]=e):n=ue(),void 0===t?n:ie(n,t)},ce=n(function(e){var t=Y("wks"),n=p.Symbol,r="function"==typeof n;(e.exports=function(e){return t[e]||(t[e]=r&&n[e]||(r?n:K)("Symbol."+e))}).store=t}),fe=x.f,de=ce("toStringTag"),he=function(e,t,n){e&&!C(e=n?e:e.prototype,de)&&fe(e,de,{configurable:!0,value:t})},pe={};O(pe,ce("iterator"),function(){return this});var ve=function(e,t,n){e.prototype=le(pe,{next:L(1,n)}),he(e,t+" Iterator")},me=function(e){return Object(h(e))},ge=X("IE_PROTO"),ye=Object.prototype,be=Object.getPrototypeOf||function(e){return e=me(e),C(e,ge)?e[ge]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?ye:null},we=ce("iterator"),_e=!([].keys&&"next"in[].keys()),Ee=function(){return this},Se=function(e,t,n,r,i,o,a){ve(n,t,r);var s,u,l,c=function(e){if(!_e&&e in p)return p[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},f=t+" Iterator",d="values"==i,h=!1,p=e.prototype,v=p[we]||p["@@iterator"]||i&&p[i],m=v||c(i),g=i?d?c("entries"):m:void 0,y="Array"==t?p.entries||v:v;if(y&&(l=be(y.call(new e)))!==Object.prototype&&he(l,f,!0),d&&v&&"values"!==v.name&&(h=!0,m=function(){return v.call(this)}),a&&(_e||h||!p[we])&&O(p,we,m),P[t]=m,P[f]=Ee,i)if(s={values:d?m:c("values"),keys:o?m:c("keys"),entries:g},a)for(u in s)u in p||R(p,u,s[u]);else I(I.P+I.F*(_e||h),t,s);return s},ke=function(e){return function(t,n){var r,i,o=String(h(t)),a=d(n),s=o.length;return a<0||a>=s?e?"":void 0:(r=o.charCodeAt(a))<55296||r>56319||a+1===s||(i=o.charCodeAt(a+1))<56320||i>57343?e?o.charAt(a):r:e?o.slice(a,a+2):i-56320+(r-55296<<10)+65536}}(!0);Se(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=ke(t,n),this._i+=e.length,{value:e,done:!1})});var Te=function(){},Ae=function(e,t){return{value:t,done:!!e}};Se(Array,"Array",function(e,t){this._t=z(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,Ae(1)):"keys"==t?Ae(0,n):"values"==t?Ae(0,e[n]):Ae(0,[n,e[n]])},"values");P.Arguments=P.Array,Te(),Te(),Te();for(var Me=ce("toStringTag"),xe=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],Le=0;Le<5;Le++){var Oe=xe[Le],De=p[Oe],Ie=De&&De.prototype;Ie&&!Ie[Me]&&O(Ie,Me,Oe),P[Oe]=P.Array}var Re={f:ce},Ne=Re.f("iterator"),Ce=n(function(e){e.exports={default:Ne,__esModule:!0}}),Pe=n(function(e){var t=K("meta"),n=x.f,r=0,i=Object.isExtensible||function(){return!0},o=!w(function(){return i(Object.preventExtensions({}))}),a=function(e){n(e,t,{value:{i:"O"+ ++r,w:{}}})},s=e.exports={KEY:t,NEED:!1,fastKey:function(e,n){if(!y(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!C(e,t)){if(!i(e))return"F";if(!n)return"E";a(e)}return e[t].i},getWeak:function(e,n){if(!C(e,t)){if(!i(e))return!0;if(!n)return!1;a(e)}return e[t].w},onFreeze:function(e){return o&&s.NEED&&i(e)&&!C(e,t)&&a(e),e}}}),je=x.f,Fe=function(e){var t=v.Symbol||(v.Symbol={});"_"==e.charAt(0)||e in t||je(t,e,{value:Re.f(e)})},Be=function(e,t){for(var n,r=z(e),i=re(r),o=i.length,a=0;o>a;)if(r[n=i[a++]]===t)return n},ze={f:Object.getOwnPropertySymbols},Ue={f:{}.propertyIsEnumerable},Ge=function(e){var t=re(e),n=ze.f;if(n)for(var r,i=n(e),o=Ue.f,a=0;i.length>a;)o.call(e,r=i[a++])&&t.push(r);return t},We=Array.isArray||function(e){return"Array"==F(e)},He=ne.concat("length","prototype"),Ve={f:Object.getOwnPropertyNames||function(e){return te(e,He)}},Ze=Ve.f,Ye={}.toString,$e="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Je=function(e){try{return Ze(e)}catch(e){return $e.slice()}},Ke={f:function(e){return $e&&"[object Window]"==Ye.call(e)?Je(e):Ze(z(e))}},Qe=Object.getOwnPropertyDescriptor,Xe={f:_?Qe:function(e,t){if(e=z(e),t=A(t,!0),T)try{return Qe(e,t)}catch(e){}if(C(e,t))return L(!Ue.f.call(e,t),e[t])}},qe=Pe.KEY,et=Xe.f,tt=x.f,nt=Ke.f,rt=p.Symbol,it=p.JSON,ot=it&&it.stringify,at=ce("_hidden"),st=ce("toPrimitive"),ut={}.propertyIsEnumerable,lt=Y("symbol-registry"),ct=Y("symbols"),ft=Y("op-symbols"),dt=Object.prototype,ht="function"==typeof rt,pt=p.QObject,vt=!pt||!pt.prototype||!pt.prototype.findChild,mt=_&&w(function(){return 7!=le(tt({},"a",{get:function(){return tt(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=et(dt,t);r&&delete dt[t],tt(e,t,n),r&&e!==dt&&tt(dt,t,r)}:tt,gt=function(e){var t=ct[e]=le(rt.prototype);return t._k=e,t},yt=ht&&"symbol"==typeof rt.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof rt},bt=function(e,t,n){return e===dt&&bt(ft,t,n),b(e),t=A(t,!0),b(n),C(ct,t)?(n.enumerable?(C(e,at)&&e[at][t]&&(e[at][t]=!1),n=le(n,{enumerable:L(0,!1)})):(C(e,at)||tt(e,at,L(1,{})),e[at][t]=!0),mt(e,t,n)):tt(e,t,n)},wt=function(e,t){b(e);for(var n,r=Ge(t=z(t)),i=0,o=r.length;o>i;)bt(e,n=r[i++],t[n]);return e},_t=function(e){var t=ut.call(this,e=A(e,!0));return!(this===dt&&C(ct,e)&&!C(ft,e))&&(!(t||!C(this,e)||!C(ct,e)||C(this,at)&&this[at][e])||t)},Et=function(e,t){if(e=z(e),t=A(t,!0),e!==dt||!C(ct,t)||C(ft,t)){var n=et(e,t);return!n||!C(ct,t)||C(e,at)&&e[at][t]||(n.enumerable=!0),n}},St=function(e){for(var t,n=nt(z(e)),r=[],i=0;n.length>i;)C(ct,t=n[i++])||t==at||t==qe||r.push(t);return r},kt=function(e){for(var t,n=e===dt,r=nt(n?ft:z(e)),i=[],o=0;r.length>o;)!C(ct,t=r[o++])||n&&!C(dt,t)||i.push(ct[t]);return i};ht||(R((rt=function(){if(this instanceof rt)throw TypeError("Symbol is not a constructor!");var e=K(arguments.length>0?arguments[0]:void 0),t=function(n){this===dt&&t.call(ft,n),C(this,at)&&C(this[at],e)&&(this[at][e]=!1),mt(this,e,L(1,n))};return _&&vt&&mt(dt,e,{configurable:!0,set:t}),gt(e)}).prototype,"toString",function(){return this._k}),Xe.f=Et,x.f=bt,Ve.f=Ke.f=St,Ue.f=_t,ze.f=kt,Re.f=function(e){return gt(ce(e))}),I(I.G+I.W+I.F*!ht,{Symbol:rt});for(var Tt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),At=0;Tt.length>At;)ce(Tt[At++]);for(var Tt=re(ce.store),At=0;Tt.length>At;)Fe(Tt[At++]);I(I.S+I.F*!ht,"Symbol",{for:function(e){return C(lt,e+="")?lt[e]:lt[e]=rt(e)},keyFor:function(e){if(yt(e))return Be(lt,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){vt=!0},useSimple:function(){vt=!1}}),I(I.S+I.F*!ht,"Object",{create:function(e,t){return void 0===t?le(e):wt(le(e),t)},defineProperty:bt,defineProperties:wt,getOwnPropertyDescriptor:Et,getOwnPropertyNames:St,getOwnPropertySymbols:kt}),it&&I(I.S+I.F*(!ht||w(function(){var e=rt();return"[null]"!=ot([e])||"{}"!=ot({a:e})||"{}"!=ot(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!yt(e)){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);return"function"==typeof(t=r[1])&&(n=t),!n&&We(t)||(t=function(e,t){if(n&&(t=n.call(this,e,t)),!yt(t))return t}),r[1]=t,ot.apply(it,r)}}}),rt.prototype[st]||O(rt.prototype,st,rt.prototype.valueOf),he(rt,"Symbol"),he(Math,"Math",!0),he(p.JSON,"JSON",!0),Fe("asyncIterator"),Fe("observable");var Mt=v.Symbol,xt=n(function(e){e.exports={default:Mt,__esModule:!0}}),Lt=t(n(function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=n(Ce),i=n(xt),o="function"==typeof i.default&&"symbol"==typeof r.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(r.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)}})),Ot=t(n(function(e,t){t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}}));I(I.S+I.F*!_,"Object",{defineProperty:x.f});var Dt=v.Object,It=function(e,t,n){return Dt.defineProperty(e,t,n)},Rt=n(function(e){e.exports={default:It,__esModule:!0}}),Nt=t(n(function(e,t){t.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(Rt);t.default=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),(0,n.default)(e,i.key,i)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()})),Ct=Object.assign,Pt=!Ct||w(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=Ct({},e)[n]||Object.keys(Ct({},t)).join("")!=r})?function(e,t){for(var n=me(e),r=arguments.length,i=1,o=ze.f,a=Ue.f;r>i;)for(var s,u=B(arguments[i++]),l=o?re(u).concat(o(u)):re(u),c=l.length,f=0;c>f;)a.call(u,s=l[f++])&&(n[s]=u[s]);return n}:Ct;I(I.S+I.F,"Object",{assign:Pt});var jt=v.Object.assign,Ft=t(n(function(e){e.exports={default:jt,__esModule:!0}}));I(I.S,"Object",{create:le});var Bt=v.Object,zt=function(e,t){return Bt.create(e,t)},Ut=t(n(function(e){e.exports={default:zt,__esModule:!0}}));!function(e,t){var n=(v.Object||{})[e]||Object[e],r={};r[e]=t(n),I(I.S+I.F*w(function(){n(1)}),"Object",r)}("keys",function(){return function(e){return re(me(e))}});var Gt=v.Object.keys,Wt=(n(function(e){e.exports={default:Gt,__esModule:!0}}),Math.floor);I(I.S,"Number",{isInteger:function(e){return!y(e)&&isFinite(e)&&Wt(e)===e}});var Ht=v.Number.isInteger,Vt=(n(function(e){e.exports={default:Ht,__esModule:!0}}),"\t\n\v\f\r   ᠎             　\u2028\u2029\ufeff"),Zt="["+Vt+"]",Yt=RegExp("^"+Zt+Zt+"*"),$t=RegExp(Zt+Zt+"*$"),Jt=function(e,t,n){var r={},i=w(function(){return!!Vt[e]()||"​"!="​"[e]()}),o=r[e]=i?t(Kt):Vt[e];n&&(r[n]=o),I(I.P+I.F*i,"String",r)},Kt=Jt.trim=function(e,t){return e=String(h(e)),1&t&&(e=e.replace(Yt,"")),2&t&&(e=e.replace($t,"")),e},Qt=Jt,Xt=p.parseFloat,qt=Qt.trim,en=1/Xt(Vt+"-0")!=-1/0?function(e){var t=qt(String(e),3),n=Xt(t);return 0===n&&"-"==t.charAt(0)?-0:n}:Xt;I(I.S+I.F*(Number.parseFloat!=en),"Number",{parseFloat:en});var tn=parseFloat,nn=(n(function(e){e.exports={default:tn,__esModule:!0}}),Ut(null));nn.count=0;var rn=function(){function e(t,n){var r=this;if(Ot(this,e),Object.defineProperty(this,"__target",{writable:!0,enumerable:!1,configurable:!0}),this.__target=this,t){if("object"!==(void 0===t?"undefined":Lt(t)))throw new Error("CusEvent target are not object");this.__target=t,n&&["on","once","off","emit"].forEach(function(e){t[e]=r[e]})}}return Nt(e,[{key:"on",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return u(this.__target,e,t,n),this}},{key:"once",value:function(e,t){return this.on(e,t,!0)}},{key:"off",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return l(this.__target,e,t,n),this}},{key:"emit",value:function(e,t){return s(this.__target,e,{data:t}),this}}]),e}();e.emitEventCache=s,e.addEventCache=u,e.removeEventCache=l,e.CustEvent=rn,Object.defineProperty(e,"__esModule",{value:!0})})},function(e,t,n){!function(t,n){e.exports=n()}(0,function(){function e(e){return e&&e.__esModule?e.default:e}function t(e,t){return t={exports:{}},e(t,t.exports),t.exports}function n(e){return"string"==typeof e||e instanceof String}function r(e,t){if(!n(e))throw new TypeError("Log's method only acccept string as argument, but not "+e+" in "+(void 0===e?"undefined":Dt(e)));return n(t)?"["+(e=Zt.FORCE_GLOBAL_TAG?Zt.GLOBAL_TAG:e||Zt.GLOBAL_TAG)+"] > "+t:"["+Zt.GLOBAL_TAG+"] > "+e}var i=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")}})),o=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)}),a=t(function(e){var t=e.exports={version:"2.5.0"};"number"==typeof __e&&(__e=t)}),s=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e},u=function(e,t,n){if(s(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}},l=function(e){return"object"==typeof e?null!==e:"function"==typeof e},c=function(e){if(!l(e))throw TypeError(e+" is not an object!");return e},f=function(e){try{return!!e()}catch(e){return!0}},d=!f(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),h=o.document,p=l(h)&&l(h.createElement),v=function(e){return p?h.createElement(e):{}},m=!d&&!f(function(){return 7!=Object.defineProperty(v("div"),"a",{get:function(){return 7}}).a}),g=function(e,t){if(!l(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!l(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!l(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!l(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},y=Object.defineProperty,b={f:d?Object.defineProperty:function(e,t,n){if(c(e),t=g(t,!0),c(n),m)try{return y(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},w=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},_=d?function(e,t,n){return b.f(e,t,w(1,n))}:function(e,t,n){return e[t]=n,e},E=function(e,t,n){var r,i,s,l=e&E.F,c=e&E.G,f=e&E.S,d=e&E.P,h=e&E.B,p=e&E.W,v=c?a:a[t]||(a[t]={}),m=v.prototype,g=c?o:f?o[t]:(o[t]||{}).prototype;c&&(n=t);for(r in n)(i=!l&&g&&void 0!==g[r])&&r in v||(s=i?g[r]:n[r],v[r]=c&&"function"!=typeof g[r]?n[r]:h&&i?u(s,o):p&&g[r]==s?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(s):d&&"function"==typeof s?u(Function.call,s):s,d&&((v.virtual||(v.virtual={}))[r]=s,e&E.R&&m&&!m[r]&&_(m,r,s)))};E.F=1,E.G=2,E.S=4,E.P=8,E.B=16,E.W=32,E.U=64,E.R=128;var S=E;S(S.S+S.F*!d,"Object",{defineProperty:b.f});var k=a.Object,T=function(e,t,n){return k.defineProperty(e,t,n)},A=t(function(e){e.exports={default:T,__esModule:!0}}),M=e(t(function(e,t){t.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(A);t.default=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),(0,n.default)(e,i.key,i)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()})),x=Math.ceil,L=Math.floor,O=function(e){return isNaN(e=+e)?0:(e>0?L:x)(e)},D=function(e){if(void 0==e)throw TypeError("Can't call method on  "+e);return e},I=_,R={}.hasOwnProperty,N=function(e,t){return R.call(e,t)},C={},P={}.toString,j=function(e){return P.call(e).slice(8,-1)},F=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==j(e)?e.split(""):Object(e)},B=function(e){return F(D(e))},z=Math.min,U=function(e){return e>0?z(O(e),9007199254740991):0},G=Math.max,W=Math.min,H=function(e,t){return(e=O(e))<0?G(e+t,0):W(e,t)},V=o["__core-js_shared__"]||(o["__core-js_shared__"]={}),Z=function(e){return V[e]||(V[e]={})},Y=0,$=Math.random(),J=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++Y+$).toString(36))},K=Z("keys"),Q=function(e){return K[e]||(K[e]=J(e))},X=function(e){return function(t,n,r){var i,o=B(t),a=U(o.length),s=H(r,a);if(e&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}}(!1),q=Q("IE_PROTO"),ee=function(e,t){var n,r=B(e),i=0,o=[];for(n in r)n!=q&&N(r,n)&&o.push(n);for(;t.length>i;)N(r,n=t[i++])&&(~X(o,n)||o.push(n));return o},te="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),ne=Object.keys||function(e){return ee(e,te)},re=d?Object.defineProperties:function(e,t){c(e);for(var n,r=ne(t),i=r.length,o=0;i>o;)b.f(e,n=r[o++],t[n]);return e},ie=o.document,oe=ie&&ie.documentElement,ae=Q("IE_PROTO"),se=function(){},ue=function(){var e,t=v("iframe"),n=te.length;for(t.style.display="none",oe.appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),ue=e.F;n--;)delete ue.prototype[te[n]];return ue()},le=Object.create||function(e,t){var n;return null!==e?(se.prototype=c(e),n=new se,se.prototype=null,n[ae]=e):n=ue(),void 0===t?n:re(n,t)},ce=t(function(e){var t=Z("wks"),n=o.Symbol,r="function"==typeof n;(e.exports=function(e){return t[e]||(t[e]=r&&n[e]||(r?n:J)("Symbol."+e))}).store=t}),fe=b.f,de=ce("toStringTag"),he=function(e,t,n){e&&!N(e=n?e:e.prototype,de)&&fe(e,de,{configurable:!0,value:t})},pe={};_(pe,ce("iterator"),function(){return this});var ve=function(e,t,n){e.prototype=le(pe,{next:w(1,n)}),he(e,t+" Iterator")},me=function(e){return Object(D(e))},ge=Q("IE_PROTO"),ye=Object.prototype,be=Object.getPrototypeOf||function(e){return e=me(e),N(e,ge)?e[ge]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?ye:null},we=ce("iterator"),_e=!([].keys&&"next"in[].keys()),Ee=function(){return this},Se=function(e,t,n,r,i,o,a){ve(n,t,r);var s,u,l,c=function(e){if(!_e&&e in p)return p[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},f=t+" Iterator",d="values"==i,h=!1,p=e.prototype,v=p[we]||p["@@iterator"]||i&&p[i],m=v||c(i),g=i?d?c("entries"):m:void 0,y="Array"==t?p.entries||v:v;if(y&&(l=be(y.call(new e)))!==Object.prototype&&l.next&&he(l,f,!0),d&&v&&"values"!==v.name&&(h=!0,m=function(){return v.call(this)}),a&&(_e||h||!p[we])&&_(p,we,m),C[t]=m,C[f]=Ee,i)if(s={values:d?m:c("values"),keys:o?m:c("keys"),entries:g},a)for(u in s)u in p||I(p,u,s[u]);else S(S.P+S.F*(_e||h),t,s);return s},ke=function(e){return function(t,n){var r,i,o=String(D(t)),a=O(n),s=o.length;return a<0||a>=s?e?"":void 0:(r=o.charCodeAt(a))<55296||r>56319||a+1===s||(i=o.charCodeAt(a+1))<56320||i>57343?e?o.charAt(a):r:e?o.slice(a,a+2):i-56320+(r-55296<<10)+65536}}(!0);Se(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=ke(t,n),this._i+=e.length,{value:e,done:!1})});var Te=function(){},Ae=function(e,t){return{value:t,done:!!e}};Se(Array,"Array",function(e,t){this._t=B(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,Ae(1)):"keys"==t?Ae(0,n):"values"==t?Ae(0,e[n]):Ae(0,[n,e[n]])},"values");C.Arguments=C.Array,Te(),Te(),Te();for(var Me=ce("toStringTag"),xe="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),Le=0;Le<xe.length;Le++){var Oe=xe[Le],De=o[Oe],Ie=De&&De.prototype;Ie&&!Ie[Me]&&_(Ie,Me,Oe),C[Oe]=C.Array}var Re={f:ce},Ne=Re.f("iterator"),Ce=t(function(e){e.exports={default:Ne,__esModule:!0}}),Pe=t(function(e){var t=J("meta"),n=b.f,r=0,i=Object.isExtensible||function(){return!0},o=!f(function(){return i(Object.preventExtensions({}))}),a=function(e){n(e,t,{value:{i:"O"+ ++r,w:{}}})},s=e.exports={KEY:t,NEED:!1,fastKey:function(e,n){if(!l(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!N(e,t)){if(!i(e))return"F";if(!n)return"E";a(e)}return e[t].i},getWeak:function(e,n){if(!N(e,t)){if(!i(e))return!0;if(!n)return!1;a(e)}return e[t].w},onFreeze:function(e){return o&&s.NEED&&i(e)&&!N(e,t)&&a(e),e}}}),je=b.f,Fe=function(e){var t=a.Symbol||(a.Symbol={});"_"==e.charAt(0)||e in t||je(t,e,{value:Re.f(e)})},Be=function(e,t){for(var n,r=B(e),i=ne(r),o=i.length,a=0;o>a;)if(r[n=i[a++]]===t)return n},ze={f:Object.getOwnPropertySymbols},Ue={f:{}.propertyIsEnumerable},Ge=function(e){var t=ne(e),n=ze.f;if(n)for(var r,i=n(e),o=Ue.f,a=0;i.length>a;)o.call(e,r=i[a++])&&t.push(r);return t},We=Array.isArray||function(e){return"Array"==j(e)},He=te.concat("length","prototype"),Ve={f:Object.getOwnPropertyNames||function(e){return ee(e,He)}},Ze=Ve.f,Ye={}.toString,$e="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Je=function(e){try{return Ze(e)}catch(e){return $e.slice()}},Ke={f:function(e){return $e&&"[object Window]"==Ye.call(e)?Je(e):Ze(B(e))}},Qe=Object.getOwnPropertyDescriptor,Xe={f:d?Qe:function(e,t){if(e=B(e),t=g(t,!0),m)try{return Qe(e,t)}catch(e){}if(N(e,t))return w(!Ue.f.call(e,t),e[t])}},qe=Pe.KEY,et=Xe.f,tt=b.f,nt=Ke.f,rt=o.Symbol,it=o.JSON,ot=it&&it.stringify,at=ce("_hidden"),st=ce("toPrimitive"),ut={}.propertyIsEnumerable,lt=Z("symbol-registry"),ct=Z("symbols"),ft=Z("op-symbols"),dt=Object.prototype,ht="function"==typeof rt,pt=o.QObject,vt=!pt||!pt.prototype||!pt.prototype.findChild,mt=d&&f(function(){return 7!=le(tt({},"a",{get:function(){return tt(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=et(dt,t);r&&delete dt[t],tt(e,t,n),r&&e!==dt&&tt(dt,t,r)}:tt,gt=function(e){var t=ct[e]=le(rt.prototype);return t._k=e,t},yt=ht&&"symbol"==typeof rt.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof rt},bt=function(e,t,n){return e===dt&&bt(ft,t,n),c(e),t=g(t,!0),c(n),N(ct,t)?(n.enumerable?(N(e,at)&&e[at][t]&&(e[at][t]=!1),n=le(n,{enumerable:w(0,!1)})):(N(e,at)||tt(e,at,w(1,{})),e[at][t]=!0),mt(e,t,n)):tt(e,t,n)},wt=function(e,t){c(e);for(var n,r=Ge(t=B(t)),i=0,o=r.length;o>i;)bt(e,n=r[i++],t[n]);return e},_t=function(e){var t=ut.call(this,e=g(e,!0));return!(this===dt&&N(ct,e)&&!N(ft,e))&&(!(t||!N(this,e)||!N(ct,e)||N(this,at)&&this[at][e])||t)},Et=function(e,t){if(e=B(e),t=g(t,!0),e!==dt||!N(ct,t)||N(ft,t)){var n=et(e,t);return!n||!N(ct,t)||N(e,at)&&e[at][t]||(n.enumerable=!0),n}},St=function(e){for(var t,n=nt(B(e)),r=[],i=0;n.length>i;)N(ct,t=n[i++])||t==at||t==qe||r.push(t);return r},kt=function(e){for(var t,n=e===dt,r=nt(n?ft:B(e)),i=[],o=0;r.length>o;)!N(ct,t=r[o++])||n&&!N(dt,t)||i.push(ct[t]);return i};ht||(I((rt=function(){if(this instanceof rt)throw TypeError("Symbol is not a constructor!");var e=J(arguments.length>0?arguments[0]:void 0),t=function(n){this===dt&&t.call(ft,n),N(this,at)&&N(this[at],e)&&(this[at][e]=!1),mt(this,e,w(1,n))};return d&&vt&&mt(dt,e,{configurable:!0,set:t}),gt(e)}).prototype,"toString",function(){return this._k}),Xe.f=Et,b.f=bt,Ve.f=Ke.f=St,Ue.f=_t,ze.f=kt,Re.f=function(e){return gt(ce(e))}),S(S.G+S.W+S.F*!ht,{Symbol:rt});for(var Tt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),At=0;Tt.length>At;)ce(Tt[At++]);for(var Mt=ne(ce.store),xt=0;Mt.length>xt;)Fe(Mt[xt++]);S(S.S+S.F*!ht,"Symbol",{for:function(e){return N(lt,e+="")?lt[e]:lt[e]=rt(e)},keyFor:function(e){if(yt(e))return Be(lt,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){vt=!0},useSimple:function(){vt=!1}}),S(S.S+S.F*!ht,"Object",{create:function(e,t){return void 0===t?le(e):wt(le(e),t)},defineProperty:bt,defineProperties:wt,getOwnPropertyDescriptor:Et,getOwnPropertyNames:St,getOwnPropertySymbols:kt}),it&&S(S.S+S.F*(!ht||f(function(){var e=rt();return"[null]"!=ot([e])||"{}"!=ot({a:e})||"{}"!=ot(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!yt(e)){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);return"function"==typeof(t=r[1])&&(n=t),!n&&We(t)||(t=function(e,t){if(n&&(t=n.call(this,e,t)),!yt(t))return t}),r[1]=t,ot.apply(it,r)}}}),rt.prototype[st]||_(rt.prototype,st,rt.prototype.valueOf),he(rt,"Symbol"),he(Math,"Math",!0),he(o.JSON,"JSON",!0),Fe("asyncIterator"),Fe("observable");var Lt=a.Symbol,Ot=t(function(e){e.exports={default:Lt,__esModule:!0}}),Dt=e(t(function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=n(Ce),i=n(Ot),o="function"==typeof i.default&&"symbol"==typeof r.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(r.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)}}));!function(e,t){var n=(a.Object||{})[e]||Object[e],r={};r[e]=t(n),S(S.S+S.F*f(function(){n(1)}),"Object",r)}("keys",function(){return function(e){return ne(me(e))}});var It=a.Object.keys,Rt=(t(function(e){e.exports={default:It,__esModule:!0}}),Math.floor);S(S.S,"Number",{isInteger:function(e){return!l(e)&&isFinite(e)&&Rt(e)===e}});var Nt=a.Number.isInteger,Ct=(t(function(e){e.exports={default:Nt,__esModule:!0}}),"\t\n\v\f\r   ᠎             　\u2028\u2029\ufeff"),Pt="["+Ct+"]",jt=RegExp("^"+Pt+Pt+"*"),Ft=RegExp(Pt+Pt+"*$"),Bt=function(e,t,n){var r={},i=f(function(){return!!Ct[e]()||"​"!="​"[e]()}),o=r[e]=i?t(zt):Ct[e];n&&(r[n]=o),S(S.P+S.F*i,"String",r)},zt=Bt.trim=function(e,t){return e=String(D(e)),1&t&&(e=e.replace(jt,"")),2&t&&(e=e.replace(Ft,"")),e},Ut=Bt,Gt=o.parseFloat,Wt=Ut.trim,Ht=1/Gt(Ct+"-0")!=-1/0?function(e){var t=Wt(String(e),3),n=Gt(t);return 0===n&&"-"==t.charAt(0)?-0:n}:Gt;S(S.S+S.F*(Number.parseFloat!=Ht),"Number",{parseFloat:Ht});var Vt=parseFloat,Zt=(t(function(e){e.exports={default:Vt,__esModule:!0}}),function(){function e(){i(this,e)}return M(e,null,[{key:"error",value:function(t,n){e.ENABLE_ERROR&&(console.error||console.warn||console.log)(r(t,n))}},{key:"info",value:function(t,n){e.ENABLE_INFO&&(console.info||console.log)(r(t,n))}},{key:"warn",value:function(t,n){e.ENABLE_WARN&&(console.warn||console.log)(r(t,n))}},{key:"debug",value:function(t,n){e.ENABLE_DEBUG&&(console.debug||console.log)(r(t,n))}},{key:"verbose",value:function(t,n){e.ENABLE_VERBOSE}}]),e}());return Zt.GLOBAL_TAG="chimee",Zt.FORCE_GLOBAL_TAG=!1,Zt.ENABLE_ERROR=!0,Zt.ENABLE_INFO=!0,Zt.ENABLE_WARN=!0,Zt.ENABLE_DEBUG=!0,Zt.ENABLE_VERBOSE=!0,Zt})},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t={},n=void 0;return n=-1!==e.to?"bytes="+e.from.toString()+"-"+e.to.toString():"bytes="+e.from.toString()+"-",t.Range=n,{headers:t}}},function(e,t,n){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(t){r(this,e),this.type=t}},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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}function a(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)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=r(n(15)),l=r(n(16)),c=r(n(17)),f=r(n(18)),d=n(0),h=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.loader=null,n.config={},Object.assign(n.config,e),n.bufferSize=3145728,n.cacheBuffer=new ArrayBuffer(n.bufferSize),n.cacheRemain=0,n.stashByteStart=0,n.enableStash=!0,n.stashSize=393216,n.resumeFrom=0,n.currentRange={},n.totalReceive=0,n.seekPonit=0,n.timer=null,n.webSocketURLReg=/wss?:\/\/(.+?)\//,n.selectLoader(),n.loader.on("end",function(){var e=n.cacheBuffer.slice(0,n.cacheRemain);n.arrivalDataCallback(e,n.stashByteStart)}),n}return a(t,d.CustEvent),s(t,[{key:"selectLoader",value:function(){var e=this.config,t=this.config.src;this.webSocketURLReg.test(t)?this.loader=new c.default(t,e):u.default.isSupport()?this.loader=new u.default(t,e):f.default.isSupport()?this.loader=new f.default(t,e):l.default.isSupport()&&(this.loader=new l.default(t,e)),this.loader.arrivalDataCallback=this.onLoaderChunkArrival.bind(this)}},{key:"onLoaderChunkArrival",value:function(e,t,n){if(n&&(this.seekPonit=n),this.arrivalDataCallback)if(this.totalReceive+=e.byteLength,0===this.cacheRemain&&0===this.stashByteStart&&(this.stashByteStart=t),this.cacheRemain+e.byteLength<=this.stashSize)new Uint8Array(this.cacheBuffer,0,this.stashSize).set(new Uint8Array(e),this.cacheRemain),this.cacheRemain+=e.byteLength;else{var r=new Uint8Array(this.cacheBuffer,0,this.bufferSize);if(this.cacheRemain>0){var i=this.cacheBuffer.slice(0,this.cacheRemain),o=0;if(this.seekPonit?(o=this.arrivalDataCallback(i,this.stashByteStart,this.seekPonit),this.seekPonit=0):o=this.arrivalDataCallback(i,this.stashByteStart),o<i.byteLength){if(o>0){var a=new Uint8Array(i,o);r.set(a,0),this.cacheRemain=a.byteLength,this.stashByteStart+=o}}else this.cacheRemain=0,this.stashByteStart+=o;this.cacheRemain+e.byteLength>this.bufferSize&&(this.expandBuffer(this.cacheRemain+e.byteLength),r=new Uint8Array(this.cacheBuffer,0,this.bufferSize)),r.set(new Uint8Array(e),this.cacheRemain),this.cacheRemain+=e.byteLength}else{var s=0;if(this.seekPonit?(s=this.arrivalDataCallback(e,t,this.seekPonit),this.seekPonit=0):s=this.arrivalDataCallback(e,t),s<e.byteLength){var u=e.byteLength-s;u>this.bufferSize&&(this.expandBuffer(u),r=new Uint8Array(this.cacheBuffer,0,this.bufferSize)),r.set(new Uint8Array(e,s),0),this.cacheRemain+=u,this.stashByteStart=t+s}}}}},{key:"initCacheBuffer",value:function(){this.cacheBuffer=new ArrayBuffer(this.bufferSize)}},{key:"expandBuffer",value:function(e){var t=this.bufferSize;t<e&&(t=e),this.cacheBuffer=new ArrayBuffer(t),this.bufferSize=t}},{key:"pause",value:function(){this.loader.pause()}},{key:"open",value:function(e){void 0===e&&(e=0),this.loader.open({from:e,to:-1})}},{key:"resume",value:function(){this.paused=!1;var e=this.totalReceive;this.open(e)}},{key:"seek",value:function(e,t,n){this.totalReceive=e,this.loader.open({from:e,to:-1},n)}},{key:"destroy",value:function(){this.pause()}}]),t}();t.default=h},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function i(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}function o(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)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=r(n(20)),l=r(n(6)),c=r(n(8)),f=r(n(26)),d=n(0),h=(r(n(3)),function(){function e(t){a(this,e),this._config={_isLive:!1},this._config=Object.assign(this._config,t),this.onInitSegment=null,this.onMediaSegment=null,this.onMediaInfo=null,this.seekCallBack=null,this.loadmetadata=!1,this.ftyp_moov=null,this.ftyp_moov_v=null,this.ftyp_moov_a=null,this.metaSuccRun=!1,this.metas=[],this.parseChunk=null,this.hasVideo=!1,this.hasAudio=!1,this._error=null,this._pendingResolveSeekPoint=-1,this._tempBaseTime=0,this.setflvBase=this.setflvBasefrist,l.default._onTrackMetadata=this.Metadata.bind(this),l.default._onMediaInfo=this.metaSucc.bind(this),l.default._onDataAvailable=this.onDataAvailable.bind(this),l.default._onError=this.error.bind(this),this.m4mof=new f.default(this._config),this.m4mof.onMediaSegment=this.onMdiaSegment.bind(this)}return s(e,[{key:"seek",value:function(e){this.setflvBase=this.setflvBasefrist,void 0!=e&&0!=e||(e=0,this._pendingResolveSeekPoint=-1),this._tempBaseTime!=e&&(this._tempBaseTime=e,l.default._timestampBase=e,this.m4mof.seek(e),this.m4mof.insertDiscontinuity(),this._pendingResolveSeekPoint=e)}},{key:"setflvBasefrist",value:function(e,t){var n=0;try{n=u.default.setFlv(new Uint8Array(e))}catch(e){this.error(e)}if(0==u.default.arrTag.length)return n;if(u.default.arrTag.length>0){l.default.hasAudio=this.hasAudio=u.default._hasAudio,l.default.hasVideo=this.hasVideo=u.default._hasVideo,0!=this._tempBaseTime&&this._tempBaseTime==u.default.arrTag[0].getTime()&&(l.default._timestampBase=0);try{l.default.moofTag(u.default.arrTag)}catch(e){this.error(e)}this.setflvBase=this.setflvBaseUsually}return n}},{key:"setflvBaseUsually",value:function(e,t){var n=0;try{n=u.default.setFlv(new Uint8Array(e))}catch(e){this.error(e)}if(u.default.arrTag.length>0)try{l.default.moofTag(u.default.arrTag)}catch(e){this.error(e)}return n}},{key:"onMdiaSegment",value:function(e,t){if(this.onMediaSegment&&this.onMediaSegment(e,new Uint8Array(t.data)),-1!=this._pendingResolveSeekPoint&&"video"==e){var n=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=-1,this.seekCallBack&&this.seekCallBack(n)}}},{key:"Metadata",value:function(e,t){switch(e){case"video":if(this.metas.push(["video",t]),this.m4mof._videoMeta=t,this.hasVideo&&!this.hasAudio)return void this.metaSucc();break;case"audio":if(this.metas.push(["audio",t]),this.m4mof._audioMeta=t,!this.hasVideo&&this.hasAudio)return void this.metaSucc()}this.hasVideo&&this.hasAudio&&this.metas.length>1&&this.metaSucc()}},{key:"metaSucc",value:function(e){var t=this;this.onMediaInfo&&e&&this.onMediaInfo(e||l.default._mediaInfo,{hasAudio:this.hasAudio,hasVideo:this.hasVideo}),0!=this.metas.length?e||(this.metas.length>1?this.metas.map(function(e){"video"==e[0]?t.ftyp_moov_v=c.default.generateInitSegment([e[1]]):t.ftyp_moov_a=c.default.generateInitSegment([e[1]])}):this.ftyp_moov=c.default.generateInitSegment([this.metas[0][1]]),this.onInitSegment&&0==this.loadmetadata&&(this.ftyp_moov?this.onInitSegment(this.ftyp_moov):this.onInitSegment(this.ftyp_moov_v,this.ftyp_moov_a),this.loadmetadata=!0)):this.metaSuccRun=!0}},{key:"onDataAvailable",value:function(e,t){try{this.m4mof.remux(e,t)}catch(e){this.error(e)}}},{key:"setflv",value:function(e,t){return this.setflvBase(e,t)}},{key:"setflvloc",value:function(e){u.default.setFlv(new Uint8Array(e));if(u.default.arrTag.length>0)return u.default.arrTag}},{key:"error",value:function(e){this._error&&this._error(e)}}]),e}()),p=function(e){function t(e){a(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.f2m=new h(e),n.f2m._error=n.error.bind(n),n._onInitSegment=null,n._onMediaSegment=null,n._onMediaInfo=null,n._seekCallBack=null,n}return o(t,d.CustEvent),s(t,[{key:"error",value:function(e){this.emit("error",e.type)}},{key:"seek",value:function(e){this.f2m.seek(e)}},{key:"setflv",value:function(e){return this.f2m.setflv(e,0)}},{key:"setflvloc",value:function(e){return this.f2m.setflvloc(e)}},{key:"onInitSegment",set:function(e){this._onInitSegment=e,this.f2m.onInitSegment=e}},{key:"onMediaSegment",set:function(e){this._onMediaSegment=e,this.f2m.onMediaSegment=e}},{key:"onMediaInfo",set:function(e){this._onMediaInfo=e,this.f2m.onMediaInfo=e}},{key:"seekCallBack",set:function(e){this._seekCallBack=e,this.f2m.seekCallBack=e}}]),t}();t.default=p},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var 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},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=r(n(22)),u=r(n(25)),l=r(n(7)),c=r(n(3)),f=function(){function e(){i(this,e),this.TAG=this.constructor.name,this._config={},this._onError=null,this._onMediaInfo=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=0,this._firstParse=!0,this._dispatch=!1,this._hasAudio=!1,this._hasVideo=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new u.default,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._videoTrack={type:"video",id:1,sequenceNumber:0,addcoefficient:2,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,addcoefficient:2,samples:[],length:0},this._littleEndian=function(){var e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}()}return a(e,[{key:"onMediaInfo",value:function(e){this._onMediaInfo=e}},{key:"parseMetadata",value:function(e){var t=s.default.parseMetadata(e);this._parseScriptData(t)}},{key:"_parseScriptData",value:function(e){var t=e;if(t.hasOwnProperty("onMetaData")){this._metadata,this._metadata=t;var n=this._metadata.onMetaData;if("boolean"==typeof n.hasAudio&&(this._hasAudio=n.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),"boolean"==typeof n.hasVideo&&(this._hasVideo=n.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),"number"==typeof n.audiodatarate&&(this._mediaInfo.audioDataRate=n.audiodatarate),"number"==typeof n.videodatarate&&(this._mediaInfo.videoDataRate=n.videodatarate),"number"==typeof n.width&&(this._mediaInfo.width=n.width),"number"==typeof n.height&&(this._mediaInfo.height=n.height),"number"==typeof n.duration){if(!this._durationOverrided){var r=Math.floor(n.duration*this._timescale);this._duration=r,this._mediaInfo.duration=r}}else this._mediaInfo.duration=0;if("number"==typeof n.framerate){var i=Math.floor(1e3*n.framerate);if(i>0){var a=i/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=a,this._referenceFrameRate.fps_num=i,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=a}}if("object"===o(n.keyframes)){this._mediaInfo.hasKeyframesIndex=!0;var s=n.keyframes;s.times=n.times,s.filepositions=n.filepositions,this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(s),n.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;return this._dispatch=!1,this._mediaInfo.metadata=n,this._mediaInfo}}},{key:"_parseKeyframesIndex",value:function(e){for(var t=[],n=[],r=1;r<e.times.length;r++){var i=this._timestampBase+Math.floor(1e3*e.times[r]);t.push(i),n.push(e.filepositions[r])}return{times:t,filepositions:n}}},{key:"moofTag",value:function(e){for(var t=0;t<e.length;t++)this._dispatch=!0,this.parseChunks(e[t]);this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack)}},{key:"parseChunks",value:function(e){switch(e.tagType){case 8:this._parseAudioData(e.body.buffer,0,e.body.length,e.getTime());break;case 9:this._parseVideoData(e.body.buffer,0,e.body.length,e.getTime(),0);break;case 18:this.parseMetadata(e.body)}}},{key:"_parseVideoData",value:function(e,t,n,r,i){if(r==this._timestampBase&&0!=this._timestampBase)throw new c.default(r,this._timestampBase,"夭寿啦这个视频不是从0开始");if(n<=1)console.log(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");else{var o=new Uint8Array(e,t,n)[0],a=(240&o)>>>4,s=15&o;7===s?this._parseAVCVideoPacket(e,t+1,n-1,r,i,a):this._onError&&this._onError("Flv: Unsupported codec in video frame: "+s)}}},{key:"_parseAVCVideoPacket",value:function(e,t,n,r,i,o){if(n<4)console.log(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");else{var a=this._littleEndian,s=new DataView(e,t,n),u=s.getUint8(0),l=16777215&s.getUint32(0,!a);if(0===u)this._parseAVCDecoderConfigurationRecord(e,t+4,n-4);else if(1===u)this._parseAVCVideoData(e,t+4,n-4,r,i,o,l);else if(2!==u)return void this._onError("Flv: Invalid video packet type "+u)}}},{key:"_parseAVCDecoderConfigurationRecord",value:function(e,t,n){if(n<7)console.log(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");else{var r=this._videoMetadata,i=this._videoTrack,o=this._littleEndian,a=new DataView(e,t,n);r?r.avcc:((r=this._videoMetadata={}).type="video",r.id=i.id,r.timescale=this._timescale,r.duration=this._duration);var s=a.getUint8(0),u=a.getUint8(1);a.getUint8(2),a.getUint8(3);if(1===s&&0!==u)if(this._naluLengthSize=1+(3&a.getUint8(4)),3===this._naluLengthSize||4===this._naluLengthSize){var c=31&a.getUint8(5);if(0===c||c>1)this._onError(DemuxErrors.FORMAT_ERROR,"Flv: Invalid H264 SPS count: "+c);else{for(var f=6,d=0;d<c;d++){var h=a.getUint16(f,!o);if(f+=2,0!==h){var p=new Uint8Array(e,t+f,h);f+=h;var v=l.default.parseSPS(p);r.codecWidth=v.codec_size.width,r.codecHeight=v.codec_size.height,r.presentWidth=v.present_size.width,r.presentHeight=v.present_size.height,r.config=v,r.profile=v.profile_string,r.level=v.level_string,r.bitDepth=v.bit_depth,r.chromaFormat=v.chroma_format,r.sarRatio=v.sar_ratio,r.frameRate=v.frame_rate,!1!==v.frame_rate.fixed&&0!==v.frame_rate.fps_num&&0!==v.frame_rate.fps_den||(r.frameRate=this._referenceFrameRate);var m=r.frameRate.fps_den,g=r.frameRate.fps_num;r.refSampleDuration=Math.floor(r.timescale*(m/g));for(var y=p.subarray(1,4),b="avc1.",w=0;w<3;w++){var _=y[w].toString(16);_.length<2&&(_="0"+_),b+=_}r.codec=b;var E=this._mediaInfo;E.width=r.codecWidth,E.height=r.codecHeight,E.fps=r.frameRate.fps,E.profile=r.profile,E.level=r.level,E.chromaFormat=v.chroma_format_string,E.sarNum=r.sarRatio.width,E.sarDen=r.sarRatio.height,E.videoCodec=b,E.meta=r,E.hasAudio?null!=E.audioCodec&&(E.mimeType='video/x-flv; codecs="'+E.videoCodec+","+E.audioCodec+'"'):E.mimeType='video/x-flv; codecs="'+E.videoCodec+'"',E.isComplete()&&this._onMediaInfo(E)}}var S=a.getUint8(f);if(0===S||S>1)this._onError(DemuxErrors.FORMAT_ERROR,"Flv: Invalid H264 PPS count: "+S);else{f++;for(var k=0;k<S;k++){var T=a.getUint16(f,!o);f+=2,0!==T&&(f+=T)}r.avcc=new Uint8Array(n),r.avcc.set(new Uint8Array(e,t,n),0),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",r)}}}else this._onError(DemuxErrors.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: "+(this._naluLengthSize-1));else this._onError(DemuxErrors.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord")}}},{key:"timestampBase",value:function(e){this._timestampBase=e}},{key:"_parseAVCVideoData",value:function(e,t,n,r,i,o,a){for(var s=this._littleEndian,u=new DataView(e,t,n),l=[],c=0,f=0,d=this._naluLengthSize,h=this._timestampBase+r,p=1===o;f<n;){if(f+4>=n){console.log(this.TAG,"Malformed Nalu near timestamp "+h+", offset = "+f+", dataSize = "+n);break}var v=u.getUint32(f,!s);if(3===d&&(v>>>=8),v>n-d)return void console.log(this.TAG,"Malformed Nalus near timestamp "+h+", NaluSize > DataSize!");var m=31&u.getUint8(f+d);5===m&&(p=!0);var g=new Uint8Array(e,t+f,d+v),y={type:m,data:g};l.push(y),c+=g.byteLength,f+=d+v}if(l.length){var b=this._videoTrack,w={units:l,length:c,isKeyframe:p,dts:h,cts:a,pts:h+a};p&&(w.fileposition=i),b.samples.push(w),b.length+=c}}},{key:"_parseAudioData",value:function(e,t,n,r){if(r==this._timestampBase&&0!=this._timestampBase&&console.log(r,this._timestampBase,"夭寿啦这个视频不是从0开始"),n<=1)console.log(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");else{var i=this._audioMetadata,o=this._audioTrack;if(!i||!i.codec){(i=this._audioMetadata={}).type="audio",i.id=o.id,i.timescale=this._timescale,i.duration=this._duration;this._littleEndian;var a=new DataView(e,t,n).getUint8(0),s=a>>>4;if(10!==s)return void this._onError(DemuxErrors.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+s);var u=0,l=(12&a)>>>2,c=[5500,11025,22050,44100,48e3];if(!(l<c.length))return void this._onError(DemuxErrors.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+l);u=c[l];var f=1&a;i.audioSampleRate=u,i.channelCount=0===f?1:2,i.refSampleDuration=Math.floor(1024/i.audioSampleRate*i.timescale),i.codec="mp4a.40.5"}var d=this._parseAACAudioData(e,t+1,n-1);if(void 0!=d){if(0===d.packetType){i.config;var h=d.data;i.audioSampleRate=h.samplingRate,i.channelCount=h.channelCount,i.codec=h.codec,i.config=h.config,i.refSampleDuration=Math.floor(1024/i.audioSampleRate*i.timescale),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",i);var p=this._mediaInfo;return p.audioCodec="mp4a.40."+h.originalAudioObjectType,p.audioSampleRate=i.audioSampleRate,p.audioChannelCount=i.channelCount,p.hasVideo?null!=p.videoCodec&&(p.mimeType='video/x-flv; codecs="'+p.videoCodec+","+p.audioCodec+'"'):p.mimeType='video/x-flv; codecs="'+p.audioCodec+'"',void(p.isComplete()&&this._onMediaInfo(p))}if(1===d.packetType){var v=this._timestampBase+r,m={unit:d.data,dts:v,pts:v};o.samples.push(m),o.length+=d.data.length}else console.log(this.TAG,"Flv: Unsupported AAC data type "+d.packetType)}}}},{key:"_parseAACAudioData",value:function(e,t,n){if(!(n<=1)){var r={},i=new Uint8Array(e,t,n);return r.packetType=i[0],0===i[0]?r.data=this._parseAACAudioSpecificConfig(e,t+1,n-1):r.data=i.subarray(1),r}console.log(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!")}},{key:"_parseAACAudioSpecificConfig",value:function(e,t,n){var r=new Uint8Array(e,t,n),i=null,o=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],a=0,s=0,u=0,l=null;if(a=s=r[0]>>>3,(u=(7&r[0])<<1|r[1]>>>7)<0||u>=o.length)this._onError(DemuxErrors.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");else{var c=o[u],f=(120&r[1])>>>3;if(!(f<0||f>=8)){5===a&&(l=(7&r[1])<<1|r[2]>>>7,(124&r[2])>>>2);var d=self.navigator.userAgent.toLowerCase();return-1!==d.indexOf("firefox")?u>=6?(a=5,i=new Array(4),l=u-3):(a=2,i=new Array(2),l=u):-1!==d.indexOf("android")?(a=2,i=new Array(2),l=u):(a=5,l=u,i=new Array(4),u>=6?l=u-3:1===f&&(a=2,i=new Array(2),l=u)),i[0]=a<<3,i[0]|=(15&u)>>>1,i[1]=(15&u)<<7,i[1]|=(15&f)<<3,5===a&&(i[1]|=(15&l)>>>1,i[2]=(1&l)<<7,i[2]|=8,i[3]=0),{config:i,samplingRate:c,channelCount:f,codec:"mp4a.40."+a,originalAudioObjectType:s}}this._onError(DemuxErrors.FORMAT_ERROR,"Flv: AAC invalid channel configuration")}}},{key:"_isInitialMetadataDispatched",value:function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!this._hasAudio&&this._hasVideo?this._videoInitialMetadataDispatched:void 0}},{key:"hasAudio",set:function(e){this._mediaInfo.hasAudio=this._hasAudio=e}},{key:"hasVideo",set:function(e){this._mediaInfo.hasVideo=this._hasVideo=e}}]),e}();t.default=new f},function(e,t,n){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(e){return e&&e.__esModule?e:{default:e}}(n(24)),a=function(){function e(){r(this,e)}return i(e,null,[{key:"_ebsp2rbsp",value:function(e){for(var t=e,n=t.byteLength,r=new Uint8Array(n),i=0,o=0;o<n;o++)o>=2&&3===t[o]&&0===t[o-1]&&0===t[o-2]||(r[i]=t[o],i++);return new Uint8Array(r.buffer,0,i)}},{key:"parseSPS",value:function(t){var n=e._ebsp2rbsp(t),r=new o.default(n);r.readByte();var i=r.readByte();r.readByte();var a=r.readByte();r.readUEG();var s=e.getProfileString(i),u=e.getLevelString(a),l=1,c=420,f=[0,420,422,444],d=8;if((100===i||110===i||122===i||244===i||44===i||83===i||86===i||118===i||128===i||138===i||144===i)&&(3===(l=r.readUEG())&&r.readBits(1),l<=3&&(c=f[l]),d=r.readUEG()+8,r.readUEG(),r.readBits(1),r.readBool()))for(var h=3!==l?8:12,p=0;p<h;p++)r.readBool()&&(p<6?e._skipScalingList(r,16):e._skipScalingList(r,64));r.readUEG();var v=r.readUEG();if(0===v)r.readUEG();else if(1===v){r.readBits(1),r.readSEG(),r.readSEG();for(var m=r.readUEG(),g=0;g<m;g++)r.readSEG()}r.readUEG(),r.readBits(1);var y=r.readUEG(),b=r.readUEG(),w=r.readBits(1);0===w&&r.readBits(1),r.readBits(1);var _=0,E=0,S=0,k=0;r.readBool()&&(_=r.readUEG(),E=r.readUEG(),S=r.readUEG(),k=r.readUEG());var T=1,A=1,M=0,x=!0,L=0,O=0;if(r.readBool()){if(r.readBool()){var D=r.readByte(),I=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],R=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];D>0&&D<16?(T=I[D-1],A=R[D-1]):255===D&&(T=r.readByte()<<8|r.readByte(),A=r.readByte()<<8|r.readByte())}if(r.readBool()&&r.readBool(),r.readBool()&&(r.readBits(4),r.readBool()&&r.readBits(24)),r.readBool()&&(r.readUEG(),r.readUEG()),r.readBool()){var N=r.readBits(32),C=r.readBits(32);x=r.readBool(),M=(L=C)/(O=2*N)}}var P=1;1===T&&1===A||(P=T/A);var j=0,F=0;0===l?(j=1,F=2-w):(j=3===l?1:2,F=(1===l?2:1)*(2-w));var B=16*(y+1),z=16*(b+1)*(2-w);B-=(_+E)*j,z-=(S+k)*F;var U=Math.ceil(B*P);return r.destroy(),r=null,{profile_string:s,level_string:u,bit_depth:d,chroma_format:c,chroma_format_string:e.getChromaFormatString(c),frame_rate:{fixed:x,fps:M,fps_den:O,fps_num:L},sar_ratio:{width:T,height:A},codec_size:{width:B,height:z},present_size:{width:U,height:z}}}},{key:"_skipScalingList",value:function(e,t){for(var n=8,r=8,i=0;i<t;i++)0!==r&&(r=(n+e.readSEG()+256)%256),n=0===r?n:r}},{key:"getProfileString",value:function(e){switch(e){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}}},{key:"getLevelString",value:function(e){return(e/10).toFixed(1)}},{key:"getChromaFormatString",value:function(e){switch(e){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}]),e}();t.default=a},function(e,t,n){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(){r(this,e)}return i(e,null,[{key:"init",value:function(){e.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};for(var t in e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var n=e.constants={};n.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),n.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),n.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),n.STSC=n.STCO=n.STTS,n.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),n.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),n.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),n.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),n.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),n.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}},{key:"box",value:function(e){for(var t=8,n=null,r=Array.prototype.slice.call(arguments,1),i=r.length,o=0;o<i;o++)t+=r[o].byteLength;(n=new Uint8Array(t))[0]=t>>>24&255,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n.set(e,4);for(var a=8,s=0;s<i;s++)n.set(r[s],a),a+=r[s].byteLength;return n}},{key:"generateInitSegment",value:function(t){t.constructor!=Array&&(t=[t]);var n=e.box(e.types.ftyp,e.constants.FTYP),r=e.moov(t),i=new Uint8Array(n.byteLength+r.byteLength);return i.set(n,0),i.set(r,n.byteLength),i}},{key:"moov",value:function(t){var n=e.mvhd(t[0].timescale,t[0].duration),r=e.trak(t[0]),i=void 0;t.length>1&&(i=e.trak(t[1]));var o=e.mvex(t);return t.length>1?e.box(e.types.moov,n,r,i,o):e.box(e.types.moov,n,r,o)}},{key:"mvhd",value:function(t,n){return e.box(e.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}},{key:"trak",value:function(t){return e.box(e.types.trak,e.tkhd(t),e.mdia(t))}},{key:"tkhd",value:function(t){var n=t.id,r=t.duration,i=t.presentWidth,o=t.presentHeight;return e.box(e.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,i>>>8&255,255&i,0,0,o>>>8&255,255&o,0,0]))}},{key:"mdia",value:function(t){return e.box(e.types.mdia,e.mdhd(t),e.hdlr(t),e.minf(t))}},{key:"mdhd",value:function(t){var n=t.timescale,r=t.duration;return e.box(e.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,r>>>24&255,r>>>16&255,r>>>8&255,255&r,85,196,0,0]))}},{key:"hdlr",value:function(t){var n=null;return n="audio"===t.type?e.constants.HDLR_AUDIO:e.constants.HDLR_VIDEO,e.box(e.types.hdlr,n)}},{key:"minf",value:function(t){var n=null;return n="audio"===t.type?e.box(e.types.smhd,e.constants.SMHD):e.box(e.types.vmhd,e.constants.VMHD),e.box(e.types.minf,n,e.dinf(),e.stbl(t))}},{key:"dinf",value:function(){return e.box(e.types.dinf,e.box(e.types.dref,e.constants.DREF))}},{key:"stbl",value:function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.constants.STTS),e.box(e.types.stsc,e.constants.STSC),e.box(e.types.stsz,e.constants.STSZ),e.box(e.types.stco,e.constants.STCO))}},{key:"stsd",value:function(t){return"audio"===t.type?e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp4a(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.avc1(t))}},{key:"mp4a",value:function(t){var n=t.channelCount,r=t.audioSampleRate,i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n,0,16,0,0,0,0,r>>>8&255,255&r,0,0]);return e.box(e.types.mp4a,i,e.esds(t))}},{key:"esds",value:function(t){var n=t.config,r=n.length,i=new Uint8Array([0,0,0,0,3,23+r,0,1,0,4,15+r,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([r]).concat(n).concat([6,1,2]));return e.box(e.types.esds,i)}},{key:"avc1",value:function(t){var n=t.avcc,r=t.codecWidth,i=t.codecHeight,o=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,r>>>8&255,255&r,i>>>8&255,255&i,0,72,0,0,0,72,0,0,0,0,0,0,0,1,4,103,49,49,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return e.box(e.types.avc1,o,e.box(e.types.avcC,n))}},{key:"mvex",value:function(t){return t.length>1?e.box(e.types.mvex,e.trex(t[0]),e.trex(t[1])):e.box(e.types.mvex,e.trex(t[0]))}},{key:"trex",value:function(t){var n=t.id,r=new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return e.box(e.types.trex,r)}},{key:"moof",value:function(t,n){return e.box(e.types.moof,e.mfhd(t.sequenceNumber),e.traf(t,n))}},{key:"mfhd",value:function(t){var n=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t]);return e.box(e.types.mfhd,n)}},{key:"traf",value:function(t,n){var r=t.id,i=e.box(e.types.tfhd,new Uint8Array([0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r])),o=e.box(e.types.tfdt,new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n])),a=e.sdtp(t),s=e.trun(t,a.byteLength+16+16+8+16+8+8);return e.box(e.types.traf,i,o,s,a)}},{key:"sdtp",value:function(t){for(var n=t.samples||[],r=n.length,i=new Uint8Array(4+r),o=0;o<r;o++){var a=n[o].flags;i[o+4]=a.isLeading<<6|a.dependsOn<<4|a.isDependedOn<<2|a.hasRedundancy}return e.box(e.types.sdtp,i)}},{key:"trun",value:function(t,n){var r=t.samples||[],i=r.length,o=12+16*i,a=new Uint8Array(o);n+=8+o,a.set([0,0,15,1,i>>>24&255,i>>>16&255,i>>>8&255,255&i,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0);for(var s=0;s<i;s++){var u=r[s].duration,l=r[s].size,c=r[s].flags,f=r[s].cts;a.set([u>>>24&255,u>>>16&255,u>>>8&255,255&u,l>>>24&255,l>>>16&255,l>>>8&255,255&l,c.isLeading<<2|c.dependsOn,c.isDependedOn<<6|c.hasRedundancy<<4|c.isNonSync,0,0,f>>>24&255,f>>>16&255,f>>>8&255,255&f],12+16*s)}return e.box(e.types.trun,a)}},{key:"mdat",value:function(t){return e.box(e.types.mdat,t)}}]),e}();o.init(),t.default=o},function(e,t,n){e.exports=n(10)},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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}function a(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)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(11),l=r(n(13)),c=r(n(14)),f=r(n(31)),d=function(e){function t(e,n){i(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.tag="flv-player",r.video=e,r.box="flv",r.timer=null,r.config=(0,u.deepAssign)({},f.default,n),r.requestSetTime=!1,r.bindEvents(),r.attachMedia(),r}return a(t,u.CustEvent),s(t,null,[{key:"isSupport",value:function(){var e=(new u.UAParser).getBrowser();return!("Safari"===e.name&&parseInt(e.major)<10)&&!(!window.MediaSource||!window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.640020,mp4a.40.2"'))}},{key:"version",get:function(){return __VERSION__}}]),s(t,[{key:"internalPropertyHandle",value:function(){if(Object.getOwnPropertyDescriptor){var e=this,t=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"currentTime");Object.defineProperty(this.video,"currentTime",{get:function(){return t.get.call(e.video)},set:function(n){if(e.currentTimeLock)return t.set.call(e.video,n);throw new Error("can not set currentTime by youself")}})}}},{key:"bindEvents",value:function(){var e=this;this.video&&this.video.addEventListener("canplay",function(){e.config.isLive&&e.config.autoplay&&e.video.play(),e.config.lockInternalProperty&&e.internalPropertyHandle()})}},{key:"attachMedia",value:function(){var e=this;this.mediaSource=new l.default(this.video,this.config),this.mediaSource.on("error",function(){e.transmuxer&&e.transmuxer.pause()}),this.mediaSource.on("bufferFull",function(){e.pauseTransmuxer()}),this.mediaSource.on("updateend",function(){e.onmseUpdateEnd()})}},{key:"load",value:function(e){var t=this;e&&(this.config.src=e),this.transmuxer=new c.default(this.mediaSource,this.config),this.transmuxer.on("mediaSegment",function(e){t.mediaSource.emit("mediaSegment",e.data)}),this.transmuxer.on("mediaSegmentInit",function(e){t.mediaSource.emit("mediaSegmentInit",e.data)}),this.transmuxer.on("error",function(e){t.emit("error",e.data),t.transmuxer.pause()}),this.transmuxer.on("mediaInfo",function(e){t.mediaInfo||(t.mediaInfo=e,t.emit("mediaInfo",e),t.mediaSource.init(e),t.video.src=URL.createObjectURL(t.mediaSource.mediaSource),t.video.addEventListener("seeking",(0,u.throttle)(t._seek.bind(t),200,{leading:!1})))}),this.transmuxer.loadSource()}},{key:"isTimeinBuffered",value:function(e){for(var t=this.video.buffered,n=0;n<t.length;n++){var r=t.start(n),i=t.end(n);if(e>=r&&e<i)return!0}return!1}},{key:"getCurrentBufferEnd",value:function(){for(var e=this.video.buffered,t=this.video.currentTime,n=0;n<e.length;n++){var r=e.start(n),i=e.end(n);if(r<=t&&t<i)return i}}},{key:"_seek",value:function(e){this.currentTimeLock=!0;var t=e&&!isNaN(e)?e:this.video.currentTime;if(this.requestSetTime)return this.requestSetTime=!1,void(this.currentTimeLock=!1);if(this.isTimeinBuffered(t)){if(this.config.alwaysSeekKeyframe){var n=this.transmuxer.getNearlestKeyframe(Math.floor(1e3*t));n&&(this.requestSetTime=!0,this.video.currentTime=n.keyframetime/1e3)}}else{this.transmuxer.pause();var r=this.transmuxer.getNearlestKeyframe(Math.floor(1e3*t));t=r.keyframetime/1e3,this.transmuxer.seek(r),this.mediaSource.seek(t),this.requestSetTime=!0,this.video.currentTime=t,window.clearInterval(this.timer),this.timer=null}return this.currentTimeLock=!1,t}},{key:"onmseUpdateEnd",value:function(){this.config.isLive||this.getCurrentBufferEnd()>=this.video.currentTime+this.config.lazyLoadMaxDuration&&null===this.timer&&this.pauseTransmuxer()}},{key:"heartbeat",value:function(){for(var e=this.video.currentTime,t=this.video.buffered,n=!1,r=0;r<t.length;r++){var i=t.start(r),o=t.end(r);if(e>=i&&e<o){e>=o-this.config.lazyLoadRecoverDuration&&(n=!0);break}}n&&(window.clearInterval(this.timer),this.timer=null,u.Log.verbose(this.tag,"Continue loading from paused position"),this.transmuxer.resume(),this.mediaSource.resume())}},{key:"pauseTransmuxer",value:function(){this.transmuxer.pause(),this.timer||(this.timer=setInterval(this.heartbeat.bind(this),1e3))}},{key:"resume",value:function(){this._seek(0)}},{key:"destroy",value:function(){this.video&&(URL.revokeObjectURL(this.video.src),this.video.src="",this.video.removeAttribute("src"),this.transmuxer.destroy(),this.transmuxer=null,this.mediaSource.destroy(),this.mediaSource=null)}},{key:"seek",value:function(e){return this._seek(e)}},{key:"play",value:function(){return this.video.play()}},{key:"pause",value:function(){return this.video.pause()}},{key:"refresh",value:function(){this.transmuxer.refresh()}}]),t}();t.default=d},function(e,t,n){(function(e){!function(e,n){n(t)}(0,function(t){function n(e){return e&&e.__esModule?e.default:e}function r(e,t){return t={exports:{}},e(t,t.exports),t.exports}function i(e){return void 0===e||null===e}function o(e){return Array.isArray(e)}function a(e){return"function"==typeof e}function s(e){return Object(e)===e&&"[object Object]"===String(e)&&!a(e)&&!o(e)}function u(e){return"number"==typeof e}function l(e){return e instanceof Blob}function c(e){return"string"==typeof e||e instanceof String}function f(e){return"boolean"==typeof e}function d(e){return i(e)||f(e)||c(e)||u(e)}function h(e){return!!("object"===("undefined"==typeof Node?"undefined":Nn(Node))?e instanceof Node:e&&"object"===(void 0===e?"undefined":Nn(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName)}function p(e){function t(n,r,i){if(o(n)||s(n)){r=r||(s(n)?{}:[]);for(var a in n)r[a]=t(n[a],r[a],a);return r}return e(n,r,i)}return t}function v(e,t){return e.replace(/(^|[^a-zA-Z]+)([a-zA-Z])/g,function(e,n,r,i){return t||0!==i?r.toUpperCase():r.toLowerCase()})}function m(){return(65536*(1+Math.random())|0).toString(16).substring(1)}function g(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r}),this.resolve=X(t),this.reject=X(n)}function y(e,t,n){var r=e;if(t+n<r.length){for(;n--;)if(128!=(192&r[++t]))return!1;return!0}return!1}function b(e,t){var n=t,r=(e=""+(e||"")).length;return(((t=(t||r)-r)>0?e.repeat?"0".repeat(t):new Array(t+1).join("0"):"")+e).slice(0,n)}function w(e,t){var n=e.__evt_id;n||(Object.defineProperty(e,"__evt_id",{writable:!0,enumerable:!1,configurable:!0}),n=e.__evt_id=++ci.count);var r=n+"_"+t,i=ci[r];return i||(i=ci[r]=[]),i}function _(e,t,n){var r=li(null);r.type=t,r.target=e,n&&ai(r,s(n)?n:{data:n}),w(e,t).forEach(function(t){(t[1]||t[0]).apply(e,[r])})}function E(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments[4];a(r)&&!i&&(i=r,r=void 0);var o=[n,void 0,r];r&&!i&&(i=function(){S(e,t,n,r);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];n.apply(e,o)}),i&&(o[1]=i),w(e,t).push(o)}function S(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=w(e,t);if(n||r){var o=-1,a=void 0;return i.find(function(e,t){if((!n||e[0]===n)&&(!r||e[2]))return o=t,a=e[1],!0}),-1!==o&&i.splice(o,1),a}i.length=0}function k(e,t){var n=e.__evt_id;n||(Object.defineProperty(e,"__evt_id",{writable:!0,enumerable:!1,configurable:!0}),n=e.__evt_id=++di.count);var r=n+"_"+t,i=di[r];return i||(i=di[r]=[]),i}function T(e,t,n){var r=li(null);r.type=t,r.target=e,n&&ai(r,s(n)?n:{data:n}),k(e,t).forEach(function(t){(t[1]||t[0]).apply(e,[r])})}function A(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments[4];a(r)&&!i&&(i=r,r=void 0);var o=[n,void 0,r];r&&!i&&(i=function(){M(e,t,n,r);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];n.apply(e,o)}),i&&(o[1]=i),k(e,t).push(o)}function M(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=k(e,t);if(n||r){var o=-1,a=void 0;return i.find(function(e,t){if((!n||e[0]===n)&&(!r||e[2]))return o=t,a=e[1],!0}),-1!==o&&i.splice(o,1),a}i.length=0}function x(e){return Tt(e)}function L(e,t){return e.getAttribute(t)}function O(e,t,n){void 0===n?e.removeAttribute(t):e.setAttribute(t,n)}function D(e,t){if(t&&(t=t.trim())){var n=t.split(/\s+/);if(e.classList)n.forEach(function(t){return e.classList.add(t)});else{var r=" "+(e.className||"")+" ";n.forEach(function(e){-1===r.indexOf(" "+e+" ")&&(r+=" "+e)}),e.className=r.trim()}}}function I(e,t){if(t&&(t=t.trim())){var n=t.split(/\s+/);if(e.classList)n.forEach(function(t){return e.classList.remove(t)});else{var r=" "+e.className+" ";n.forEach(function(e){for(var t=" "+e+" ";-1!==r.indexOf(t);)r=r.replace(t," ")}),e.className=r.trim()}}}function R(e,t){return new RegExp("(?:^|\\s)"+t+"(?=\\s|$)").test(e.className)}function N(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(r){var o=M(e,t+"_once",n);o&&(n=o)}e.removeEventListener(t,n,i)}function C(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(r){var o=n;A(e,t+"_once",o,n=function(){for(var a=arguments.length,s=Array(a),u=0;u<a;u++)s[u]=arguments[u];o.apply(this,s),N(e,t,n,r,i)})}e.addEventListener(t,n,i)}function P(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=function(n){var i=G(n.target||n.srcElement,e,!0),o=z(t,e,!0).find(function(e){return i.find(function(t){return e===t})});o&&r.apply(o,arguments)};A(e,n+"_delegate_"+t,r,o),e.addEventListener(n,o,i)}function j(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=M(e,n+"_delegate_"+t,r);o&&e.removeEventListener(n,o,i)}function F(e,t){return(e.currentStyle||document.defaultView.getComputedStyle(e,null))[t]||e.style[t]}function B(e,t,n){if(s(t))for(var r in t)B(e,r,t[r]);else e.style[t]=n}function z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,n=arguments[2],r=t.querySelectorAll(e);return n?Tt(r):r}function U(e){e.parentNode.removeChild(e)}function G(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments[2],r=arguments[3],i=[];for(n&&i.push(e);e&&e.parentNode!==t;)(e=e.parentNode)&&i.push(e);return r&&i.push(t),i}function W(e,t){return e.constructor===mi?e:new mi(e,t)}function H(e,t){if(!c(e))throw new TypeError("Log's method only acccept string as argument, but not "+e+" in "+(void 0===e?"undefined":Nn(e)));return c(t)?"["+(e=gi.FORCE_GLOBAL_TAG?gi.GLOBAL_TAG:e||gi.GLOBAL_TAG)+"] > "+t:"["+gi.GLOBAL_TAG+"] > "+e}var V="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},Z=Math.ceil,Y=Math.floor,$=function(e){return isNaN(e=+e)?0:(e>0?Y:Z)(e)},J=function(e){if(void 0==e)throw TypeError("Can't call method on  "+e);return e},K=r(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)}),Q=r(function(e){var t=e.exports={version:"2.5.0"};"number"==typeof __e&&(__e=t)}),X=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e},q=function(e,t,n){if(X(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}},ee=function(e){return"object"==typeof e?null!==e:"function"==typeof e},te=function(e){if(!ee(e))throw TypeError(e+" is not an object!");return e},ne=function(e){try{return!!e()}catch(e){return!0}},re=!ne(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),ie=K.document,oe=ee(ie)&&ee(ie.createElement),ae=function(e){return oe?ie.createElement(e):{}},se=!re&&!ne(function(){return 7!=Object.defineProperty(ae("div"),"a",{get:function(){return 7}}).a}),ue=function(e,t){if(!ee(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!ee(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!ee(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!ee(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},le=Object.defineProperty,ce={f:re?Object.defineProperty:function(e,t,n){if(te(e),t=ue(t,!0),te(n),se)try{return le(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},fe=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},de=re?function(e,t,n){return ce.f(e,t,fe(1,n))}:function(e,t,n){return e[t]=n,e},he=function(e,t,n){var r,i,o,a=e&he.F,s=e&he.G,u=e&he.S,l=e&he.P,c=e&he.B,f=e&he.W,d=s?Q:Q[t]||(Q[t]={}),h=d.prototype,p=s?K:u?K[t]:(K[t]||{}).prototype;s&&(n=t);for(r in n)(i=!a&&p&&void 0!==p[r])&&r in d||(o=i?p[r]:n[r],d[r]=s&&"function"!=typeof p[r]?n[r]:c&&i?q(o,K):f&&p[r]==o?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(o):l&&"function"==typeof o?q(Function.call,o):o,l&&((d.virtual||(d.virtual={}))[r]=o,e&he.R&&h&&!h[r]&&de(h,r,o)))};he.F=1,he.G=2,he.S=4,he.P=8,he.B=16,he.W=32,he.U=64,he.R=128;var pe=he,ve=de,me={}.hasOwnProperty,ge=function(e,t){return me.call(e,t)},ye={},be={}.toString,we=function(e){return be.call(e).slice(8,-1)},_e=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==we(e)?e.split(""):Object(e)},Ee=function(e){return _e(J(e))},Se=Math.min,ke=function(e){return e>0?Se($(e),9007199254740991):0},Te=Math.max,Ae=Math.min,Me=function(e,t){return(e=$(e))<0?Te(e+t,0):Ae(e,t)},xe=K["__core-js_shared__"]||(K["__core-js_shared__"]={}),Le=function(e){return xe[e]||(xe[e]={})},Oe=0,De=Math.random(),Ie=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++Oe+De).toString(36))},Re=Le("keys"),Ne=function(e){return Re[e]||(Re[e]=Ie(e))},Ce=function(e){return function(t,n,r){var i,o=Ee(t),a=ke(o.length),s=Me(r,a);if(e&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}}(!1),Pe=Ne("IE_PROTO"),je=function(e,t){var n,r=Ee(e),i=0,o=[];for(n in r)n!=Pe&&ge(r,n)&&o.push(n);for(;t.length>i;)ge(r,n=t[i++])&&(~Ce(o,n)||o.push(n));return o},Fe="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),Be=Object.keys||function(e){return je(e,Fe)},ze=re?Object.defineProperties:function(e,t){te(e);for(var n,r=Be(t),i=r.length,o=0;i>o;)ce.f(e,n=r[o++],t[n]);return e},Ue=K.document,Ge=Ue&&Ue.documentElement,We=Ne("IE_PROTO"),He=function(){},Ve=function(){var e,t=ae("iframe"),n=Fe.length;for(t.style.display="none",Ge.appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),Ve=e.F;n--;)delete Ve.prototype[Fe[n]];return Ve()},Ze=Object.create||function(e,t){var n;return null!==e?(He.prototype=te(e),n=new He,He.prototype=null,n[We]=e):n=Ve(),void 0===t?n:ze(n,t)},Ye=r(function(e){var t=Le("wks"),n=K.Symbol,r="function"==typeof n;(e.exports=function(e){return t[e]||(t[e]=r&&n[e]||(r?n:Ie)("Symbol."+e))}).store=t}),$e=ce.f,Je=Ye("toStringTag"),Ke=function(e,t,n){e&&!ge(e=n?e:e.prototype,Je)&&$e(e,Je,{configurable:!0,value:t})},Qe={};de(Qe,Ye("iterator"),function(){return this});var Xe=function(e,t,n){e.prototype=Ze(Qe,{next:fe(1,n)}),Ke(e,t+" Iterator")},qe=function(e){return Object(J(e))},et=Ne("IE_PROTO"),tt=Object.prototype,nt=Object.getPrototypeOf||function(e){return e=qe(e),ge(e,et)?e[et]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?tt:null},rt=Ye("iterator"),it=!([].keys&&"next"in[].keys()),ot=function(){return this},at=function(e,t,n,r,i,o,a){Xe(n,t,r);var s,u,l,c=function(e){if(!it&&e in p)return p[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},f=t+" Iterator",d="values"==i,h=!1,p=e.prototype,v=p[rt]||p["@@iterator"]||i&&p[i],m=v||c(i),g=i?d?c("entries"):m:void 0,y="Array"==t?p.entries||v:v;if(y&&(l=nt(y.call(new e)))!==Object.prototype&&l.next&&Ke(l,f,!0),d&&v&&"values"!==v.name&&(h=!0,m=function(){return v.call(this)}),a&&(it||h||!p[rt])&&de(p,rt,m),ye[t]=m,ye[f]=ot,i)if(s={values:d?m:c("values"),keys:o?m:c("keys"),entries:g},a)for(u in s)u in p||ve(p,u,s[u]);else pe(pe.P+pe.F*(it||h),t,s);return s},st=function(e){return function(t,n){var r,i,o=String(J(t)),a=$(n),s=o.length;return a<0||a>=s?e?"":void 0:(r=o.charCodeAt(a))<55296||r>56319||a+1===s||(i=o.charCodeAt(a+1))<56320||i>57343?e?o.charAt(a):r:e?o.slice(a,a+2):i-56320+(r-55296<<10)+65536}}(!0);at(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=st(t,n),this._i+=e.length,{value:e,done:!1})});var ut=function(e,t,n,r){try{return r?t(te(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&te(i.call(e)),t}},lt=Ye("iterator"),ct=Array.prototype,ft=function(e){return void 0!==e&&(ye.Array===e||ct[lt]===e)},dt=function(e,t,n){t in e?ce.f(e,t,fe(0,n)):e[t]=n},ht=Ye("toStringTag"),pt="Arguments"==we(function(){return arguments}()),vt=function(e,t){try{return e[t]}catch(e){}},mt=function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=vt(t=Object(e),ht))?n:pt?we(t):"Object"==(r=we(t))&&"function"==typeof t.callee?"Arguments":r},gt=Ye("iterator"),yt=Q.getIteratorMethod=function(e){if(void 0!=e)return e[gt]||e["@@iterator"]||ye[mt(e)]},bt=Ye("iterator"),wt=!1;try{var _t=[7][bt]();_t.return=function(){wt=!0},Array.from(_t,function(){throw 2})}catch(e){}var Et=function(e,t){if(!t&&!wt)return!1;var n=!1;try{var r=[7],i=r[bt]();i.next=function(){return{done:n=!0}},r[bt]=function(){return i},e(r)}catch(e){}return n};pe(pe.S+pe.F*!Et(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,r,i,o=qe(e),a="function"==typeof this?this:Array,s=arguments.length,u=s>1?arguments[1]:void 0,l=void 0!==u,c=0,f=yt(o);if(l&&(u=q(u,s>2?arguments[2]:void 0,2)),void 0==f||a==Array&&ft(f))for(n=new a(t=ke(o.length));t>c;c++)dt(n,c,l?u(o[c],c):o[c]);else for(i=f.call(o),n=new a;!(r=i.next()).done;c++)dt(n,c,l?ut(i,u,[r.value,c],!0):r.value);return n.length=c,n}});var St=Q.Array.from,kt=r(function(e){e.exports={default:St,__esModule:!0}}),Tt=n(kt),At=n(r(function(e,t){t.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(kt);t.default=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(0,n.default)(e)}})),Mt=function(){},xt=function(e,t){return{value:t,done:!!e}};at(Array,"Array",function(e,t){this._t=Ee(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,xt(1)):"keys"==t?xt(0,n):"values"==t?xt(0,e[n]):xt(0,[n,e[n]])},"values");ye.Arguments=ye.Array,Mt(),Mt(),Mt();for(var Lt=Ye("toStringTag"),Ot="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),Dt=0;Dt<Ot.length;Dt++){var It=Ot[Dt],Rt=K[It],Nt=Rt&&Rt.prototype;Nt&&!Nt[Lt]&&de(Nt,Lt,It),ye[It]=ye.Array}var Ct={f:Ye},Pt=Ct.f("iterator"),jt=r(function(e){e.exports={default:Pt,__esModule:!0}}),Ft=r(function(e){var t=Ie("meta"),n=ce.f,r=0,i=Object.isExtensible||function(){return!0},o=!ne(function(){return i(Object.preventExtensions({}))}),a=function(e){n(e,t,{value:{i:"O"+ ++r,w:{}}})},s=e.exports={KEY:t,NEED:!1,fastKey:function(e,n){if(!ee(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!ge(e,t)){if(!i(e))return"F";if(!n)return"E";a(e)}return e[t].i},getWeak:function(e,n){if(!ge(e,t)){if(!i(e))return!0;if(!n)return!1;a(e)}return e[t].w},onFreeze:function(e){return o&&s.NEED&&i(e)&&!ge(e,t)&&a(e),e}}}),Bt=ce.f,zt=function(e){var t=Q.Symbol||(Q.Symbol={});"_"==e.charAt(0)||e in t||Bt(t,e,{value:Ct.f(e)})},Ut=function(e,t){for(var n,r=Ee(e),i=Be(r),o=i.length,a=0;o>a;)if(r[n=i[a++]]===t)return n},Gt={f:Object.getOwnPropertySymbols},Wt={f:{}.propertyIsEnumerable},Ht=function(e){var t=Be(e),n=Gt.f;if(n)for(var r,i=n(e),o=Wt.f,a=0;i.length>a;)o.call(e,r=i[a++])&&t.push(r);return t},Vt=Array.isArray||function(e){return"Array"==we(e)},Zt=Fe.concat("length","prototype"),Yt={f:Object.getOwnPropertyNames||function(e){return je(e,Zt)}},$t=Yt.f,Jt={}.toString,Kt="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Qt=function(e){try{return $t(e)}catch(e){return Kt.slice()}},Xt={f:function(e){return Kt&&"[object Window]"==Jt.call(e)?Qt(e):$t(Ee(e))}},qt=Object.getOwnPropertyDescriptor,en={f:re?qt:function(e,t){if(e=Ee(e),t=ue(t,!0),se)try{return qt(e,t)}catch(e){}if(ge(e,t))return fe(!Wt.f.call(e,t),e[t])}},tn=Ft.KEY,nn=en.f,rn=ce.f,on=Xt.f,an=K.Symbol,sn=K.JSON,un=sn&&sn.stringify,ln=Ye("_hidden"),cn=Ye("toPrimitive"),fn={}.propertyIsEnumerable,dn=Le("symbol-registry"),hn=Le("symbols"),pn=Le("op-symbols"),vn=Object.prototype,mn="function"==typeof an,gn=K.QObject,yn=!gn||!gn.prototype||!gn.prototype.findChild,bn=re&&ne(function(){return 7!=Ze(rn({},"a",{get:function(){return rn(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=nn(vn,t);r&&delete vn[t],rn(e,t,n),r&&e!==vn&&rn(vn,t,r)}:rn,wn=function(e){var t=hn[e]=Ze(an.prototype);return t._k=e,t},_n=mn&&"symbol"==typeof an.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof an},En=function(e,t,n){return e===vn&&En(pn,t,n),te(e),t=ue(t,!0),te(n),ge(hn,t)?(n.enumerable?(ge(e,ln)&&e[ln][t]&&(e[ln][t]=!1),n=Ze(n,{enumerable:fe(0,!1)})):(ge(e,ln)||rn(e,ln,fe(1,{})),e[ln][t]=!0),bn(e,t,n)):rn(e,t,n)},Sn=function(e,t){te(e);for(var n,r=Ht(t=Ee(t)),i=0,o=r.length;o>i;)En(e,n=r[i++],t[n]);return e},kn=function(e){var t=fn.call(this,e=ue(e,!0));return!(this===vn&&ge(hn,e)&&!ge(pn,e))&&(!(t||!ge(this,e)||!ge(hn,e)||ge(this,ln)&&this[ln][e])||t)},Tn=function(e,t){if(e=Ee(e),t=ue(t,!0),e!==vn||!ge(hn,t)||ge(pn,t)){var n=nn(e,t);return!n||!ge(hn,t)||ge(e,ln)&&e[ln][t]||(n.enumerable=!0),n}},An=function(e){for(var t,n=on(Ee(e)),r=[],i=0;n.length>i;)ge(hn,t=n[i++])||t==ln||t==tn||r.push(t);return r},Mn=function(e){for(var t,n=e===vn,r=on(n?pn:Ee(e)),i=[],o=0;r.length>o;)!ge(hn,t=r[o++])||n&&!ge(vn,t)||i.push(hn[t]);return i};mn||(ve((an=function(){if(this instanceof an)throw TypeError("Symbol is not a constructor!");var e=Ie(arguments.length>0?arguments[0]:void 0),t=function(n){this===vn&&t.call(pn,n),ge(this,ln)&&ge(this[ln],e)&&(this[ln][e]=!1),bn(this,e,fe(1,n))};return re&&yn&&bn(vn,e,{configurable:!0,set:t}),wn(e)}).prototype,"toString",function(){return this._k}),en.f=Tn,ce.f=En,Yt.f=Xt.f=An,Wt.f=kn,Gt.f=Mn,Ct.f=function(e){return wn(Ye(e))}),pe(pe.G+pe.W+pe.F*!mn,{Symbol:an});for(var xn="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Ln=0;xn.length>Ln;)Ye(xn[Ln++]);for(var On=Be(Ye.store),Dn=0;On.length>Dn;)zt(On[Dn++]);pe(pe.S+pe.F*!mn,"Symbol",{for:function(e){return ge(dn,e+="")?dn[e]:dn[e]=an(e)},keyFor:function(e){if(_n(e))return Ut(dn,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){yn=!0},useSimple:function(){yn=!1}}),pe(pe.S+pe.F*!mn,"Object",{create:function(e,t){return void 0===t?Ze(e):Sn(Ze(e),t)},defineProperty:En,defineProperties:Sn,getOwnPropertyDescriptor:Tn,getOwnPropertyNames:An,getOwnPropertySymbols:Mn}),sn&&pe(pe.S+pe.F*(!mn||ne(function(){var e=an();return"[null]"!=un([e])||"{}"!=un({a:e})||"{}"!=un(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!_n(e)){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);return"function"==typeof(t=r[1])&&(n=t),!n&&Vt(t)||(t=function(e,t){if(n&&(t=n.call(this,e,t)),!_n(t))return t}),r[1]=t,un.apply(sn,r)}}}),an.prototype[cn]||de(an.prototype,cn,an.prototype.valueOf),Ke(an,"Symbol"),Ke(Math,"Math",!0),Ke(K.JSON,"JSON",!0),zt("asyncIterator"),zt("observable");var In=Q.Symbol,Rn=r(function(e){e.exports={default:In,__esModule:!0}}),Nn=n(r(function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=n(jt),i=n(Rn),o="function"==typeof i.default&&"symbol"==typeof r.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(r.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)}}));!function(e,t){var n=(Q.Object||{})[e]||Object[e],r={};r[e]=t(n),pe(pe.S+pe.F*ne(function(){n(1)}),"Object",r)}("keys",function(){return function(e){return Be(qe(e))}});var Cn=Q.Object.keys,Pn=n(r(function(e){e.exports={default:Cn,__esModule:!0}})),jn=Math.floor;pe(pe.S,"Number",{isInteger:function(e){return!ee(e)&&isFinite(e)&&jn(e)===e}});var Fn=Q.Number.isInteger,Bn=n(r(function(e){e.exports={default:Fn,__esModule:!0}})),zn="\t\n\v\f\r   ᠎             　\u2028\u2029\ufeff",Un="["+zn+"]",Gn=RegExp("^"+Un+Un+"*"),Wn=RegExp(Un+Un+"*$"),Hn=function(e,t,n){var r={},i=ne(function(){return!!zn[e]()||"​"!="​"[e]()}),o=r[e]=i?t(Vn):zn[e];n&&(r[n]=o),pe(pe.P+pe.F*i,"String",r)},Vn=Hn.trim=function(e,t){return e=String(J(e)),1&t&&(e=e.replace(Gn,"")),2&t&&(e=e.replace(Wn,"")),e},Zn=Hn,Yn=K.parseFloat,$n=Zn.trim,Jn=1/Yn(zn+"-0")!=-1/0?function(e){var t=$n(String(e),3),n=Yn(t);return 0===n&&"-"==t.charAt(0)?-0:n}:Yn;pe(pe.S+pe.F*(Number.parseFloat!=Jn),"Number",{parseFloat:Jn});var Kn,Qn,Xn,qn=parseFloat,er=n(r(function(e){e.exports={default:qn,__esModule:!0}})),tr=p(function(e){return e}),nr=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e},rr=r(function(e){var t={},n={},r=e.exports=function(e,r,i,o,a){var s,u,l,c,f=a?function(){return e}:yt(e),d=q(i,o,r?2:1),h=0;if("function"!=typeof f)throw TypeError(e+" is not iterable!");if(ft(f)){for(s=ke(e.length);s>h;h++)if((c=r?d(te(u=e[h])[0],u[1]):d(e[h]))===t||c===n)return c}else for(l=f.call(e);!(u=l.next()).done;)if((c=ut(l,d,u.value,r))===t||c===n)return c};r.BREAK=t,r.RETURN=n}),ir=Ye("species"),or=function(e,t){var n,r=te(e).constructor;return void 0===r||void 0==(n=te(r)[ir])?t:X(n)},ar=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)},sr=K.process,ur=K.setImmediate,lr=K.clearImmediate,cr=K.MessageChannel,fr=K.Dispatch,dr=0,hr={},pr=function(){var e=+this;if(hr.hasOwnProperty(e)){var t=hr[e];delete hr[e],t()}},vr=function(e){pr.call(e.data)};ur&&lr||(ur=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return hr[++dr]=function(){ar("function"==typeof e?e:Function(e),t)},Kn(dr),dr},lr=function(e){delete hr[e]},"process"==we(sr)?Kn=function(e){sr.nextTick(q(pr,e,1))}:fr&&fr.now?Kn=function(e){fr.now(q(pr,e,1))}:cr?(Xn=(Qn=new cr).port2,Qn.port1.onmessage=vr,Kn=q(Xn.postMessage,Xn,1)):K.addEventListener&&"function"==typeof postMessage&&!K.importScripts?(Kn=function(e){K.postMessage(e+"","*")},K.addEventListener("message",vr,!1)):Kn="onreadystatechange"in ae("script")?function(e){Ge.appendChild(ae("script")).onreadystatechange=function(){Ge.removeChild(this),pr.call(e)}}:function(e){setTimeout(q(pr,e,1),0)});var mr,gr,yr,br,wr={set:ur,clear:lr},_r=wr.set,Er=K.MutationObserver||K.WebKitMutationObserver,Sr=K.process,kr=K.Promise,Tr="process"==we(Sr),Ar={f:function(e){return new g(e)}},Mr=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}},xr=function(e,t){var n=Ar.f(e);return(0,n.resolve)(t),n.promise},Lr=Ye("species"),Or=wr.set,Dr=function(){var e,t,n,r=function(){var r,i;for(Tr&&(r=Sr.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(Tr)n=function(){Sr.nextTick(r)};else if(Er){var i=!0,o=document.createTextNode("");new Er(r).observe(o,{characterData:!0}),n=function(){o.data=i=!i}}else if(kr&&kr.resolve){var a=kr.resolve();n=function(){a.then(r)}}else n=function(){_r.call(K,r)};return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}(),Ir=K.TypeError,Rr=K.process,Nr=K.Promise,Cr="process"==mt(Rr),Pr=function(){},jr=gr=Ar.f,Fr=!!function(){try{var e=Nr.resolve(1),t=(e.constructor={})[Ye("species")]=function(e){e(Pr,Pr)};return(Cr||"function"==typeof PromiseRejectionEvent)&&e.then(Pr)instanceof t}catch(e){}}(),Br=function(e,t){return e===t||e===Nr&&t===br},zr=function(e){var t;return!(!ee(e)||"function"!=typeof(t=e.then))&&t},Ur=function(e,t){if(!e._n){e._n=!0;var n=e._c;Dr(function(){for(var r=e._v,i=1==e._s,o=0;n.length>o;)!function(t){var n,o,a=i?t.ok:t.fail,s=t.resolve,u=t.reject,l=t.domain;try{a?(i||(2==e._h&&Hr(e),e._h=1),!0===a?n=r:(l&&l.enter(),n=a(r),l&&l.exit()),n===t.promise?u(Ir("Promise-chain cycle")):(o=zr(n))?o.call(n,s,u):s(n)):u(r)}catch(e){u(e)}}(n[o++]);e._c=[],e._n=!1,t&&!e._h&&Gr(e)})}},Gr=function(e){Or.call(K,function(){var t,n,r,i=e._v,o=Wr(e);if(o&&(t=Mr(function(){Cr?Rr.emit("unhandledRejection",i,e):(n=K.onunhandledrejection)?n({promise:e,reason:i}):(r=K.console)&&r.error&&r.error("Unhandled promise rejection",i)}),e._h=Cr||Wr(e)?2:1),e._a=void 0,o&&t.e)throw t.v})},Wr=function(e){if(1==e._h)return!1;for(var t,n=e._a||e._c,r=0;n.length>r;)if((t=n[r++]).fail||!Wr(t.promise))return!1;return!0},Hr=function(e){Or.call(K,function(){var t;Cr?Rr.emit("rejectionHandled",e):(t=K.onrejectionhandled)&&t({promise:e,reason:e._v})})},Vr=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()),Ur(t,!0))},Zr=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw Ir("Promise can't be resolved itself");(t=zr(e))?Dr(function(){var r={_w:n,_d:!1};try{t.call(e,q(Zr,r,1),q(Vr,r,1))}catch(e){Vr.call(r,e)}}):(n._v=e,n._s=1,Ur(n,!1))}catch(e){Vr.call({_w:n,_d:!1},e)}}};Fr||(Nr=function(e){nr(this,Nr,"Promise","_h"),X(e),mr.call(this);try{e(q(Zr,this,1),q(Vr,this,1))}catch(e){Vr.call(this,e)}},(mr=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=function(e,t,n){for(var r in t)n&&e[r]?e[r]=t[r]:de(e,r,t[r]);return e}(Nr.prototype,{then:function(e,t){var n=jr(or(this,Nr));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=Cr?Rr.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&Ur(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),yr=function(){var e=new mr;this.promise=e,this.resolve=q(Zr,e,1),this.reject=q(Vr,e,1)},Ar.f=jr=function(e){return Br(Nr,e)?new yr(e):gr(e)}),pe(pe.G+pe.W+pe.F*!Fr,{Promise:Nr}),Ke(Nr,"Promise"),function(e){var t="function"==typeof Q[e]?Q[e]:K[e];re&&t&&!t[Lr]&&ce.f(t,Lr,{configurable:!0,get:function(){return this}})}("Promise"),br=Q.Promise,pe(pe.S+pe.F*!Fr,"Promise",{reject:function(e){var t=jr(this);return(0,t.reject)(e),t.promise}}),pe(pe.S+!0*pe.F,"Promise",{resolve:function(e){return e instanceof Nr&&Br(e.constructor,this)?e:xr(this,e)}}),pe(pe.S+pe.F*!(Fr&&Et(function(e){Nr.all(e).catch(Pr)})),"Promise",{all:function(e){var t=this,n=jr(t),r=n.resolve,i=n.reject,o=Mr(function(){var n=[],o=0,a=1;rr(e,!1,function(e){var s=o++,u=!1;n.push(void 0),a++,t.resolve(e).then(function(e){u||(u=!0,n[s]=e,--a||r(n))},i)}),--a||r(n)});return o.e&&i(o.v),n.promise},race:function(e){var t=this,n=jr(t),r=n.reject,i=Mr(function(){rr(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}}),pe(pe.P+pe.R,"Promise",{finally:function(e){var t=or(this,Q.Promise||K.Promise),n="function"==typeof e;return this.then(n?function(n){return xr(t,e()).then(function(){return n})}:e,n?function(n){return xr(t,e()).then(function(){throw n})}:e)}}),pe(pe.S,"Promise",{try:function(e){var t=Ar.f(this),n=Mr(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}});var Yr=Q.Promise,$r=n(r(function(e){e.exports={default:Yr,__esModule:!0}})),Jr="undefined"!=typeof window&&"[object Object]"!==Object.prototype.toString.call(window),Kr=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||function(e){return setTimeout(e,17)},Qr=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.msCancelAnimationFrame||window.oCancelAnimationFrame||function(e){clearTimeout(e)},Xr=n(r(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")}}));pe(pe.S+pe.F*!re,"Object",{defineProperty:ce.f});var qr=Q.Object,ei=function(e,t,n){return qr.defineProperty(e,t,n)},ti=r(function(e){e.exports={default:ei,__esModule:!0}}),ni=n(r(function(e,t){t.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(ti);t.default=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),(0,n.default)(e,i.key,i)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()})),ri=Object.assign,ii=!ri||ne(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=ri({},e)[n]||Object.keys(ri({},t)).join("")!=r})?function(e,t){for(var n=qe(e),r=arguments.length,i=1,o=Gt.f,a=Wt.f;r>i;)for(var s,u=_e(arguments[i++]),l=o?Be(u).concat(o(u)):Be(u),c=l.length,f=0;c>f;)a.call(u,s=l[f++])&&(n[s]=u[s]);return n}:ri;pe(pe.S+pe.F,"Object",{assign:ii});var oi=Q.Object.assign,ai=n(r(function(e){e.exports={default:oi,__esModule:!0}}));pe(pe.S,"Object",{create:Ze});var si=Q.Object,ui=function(e,t){return si.create(e,t)},li=n(r(function(e){e.exports={default:ui,__esModule:!0}})),ci=li(null);ci.count=0;var fi=function(){function e(t,n){var r=this;if(Xr(this,e),Object.defineProperty(this,"__target",{writable:!0,enumerable:!1,configurable:!0}),this.__target=this,t){if("object"!==(void 0===t?"undefined":Nn(t)))throw new Error("CusEvent target are not object");this.__target=t,n&&["on","once","off","emit"].forEach(function(e){t[e]=r[e]})}}return ni(e,[{key:"on",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return E(this.__target,e,t,n),this}},{key:"once",value:function(e,t){return this.on(e,t,!0)}},{key:"off",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return S(this.__target,e,t,n),this}},{key:"emit",value:function(e,t){return _(this.__target,e,{data:t}),this}}]),e}(),di=li(null);di.count=0;(function(){function e(t,n){var r=this;if(Xr(this,e),Object.defineProperty(this,"__target",{writable:!0,enumerable:!1,configurable:!0}),this.__target=this,t){if("object"!==(void 0===t?"undefined":Nn(t)))throw new Error("CusEvent target are not object");this.__target=t,n&&["on","once","off","emit"].forEach(function(e){t[e]=r[e]})}}ni(e,[{key:"on",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return A(this.__target,e,t,n),this}},{key:"once",value:function(e,t){return this.on(e,t,!0)}},{key:"off",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return M(this.__target,e,t,n),this}},{key:"emit",value:function(e,t){return T(this.__target,e,{data:t}),this}}])})(),"undefined"!=typeof window&&Object.prototype.toString.call(window);var hi=document.createElement("div"),pi="innerText";"textContent"in hi&&(pi="textContent");var vi=Array.prototype,mi=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;Xr(this,e);var r=this;r.selector=t;var i=void 0;t&&t.constructor===NodeList?i=x(t):o(t)?i=t:c(t)?0===t.indexOf("<")?(hi.innerHTML=t,i=z("*",hi,!0)):i=z(t,n,!0):i=[t],ai(r,i),r.length=i.length}return ni(e,[{key:"each",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return vi.forEach.apply(this,t),this}},{key:"push",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return vi.push.apply(this,t),this}},{key:"splice",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return W(vi.splice.apply(this,t))}},{key:"find",value:function(e){var t=[];this.each(function(n){t=t.concat(z(e,n,!0))});var n=W(t);return n.parent=this,n.selector=e,n}},{key:"append",value:function(e){var t=W(e),n=this[0];return t.each(function(e){return n.appendChild(e)}),this}},{key:"appendTo",value:function(e){return W(e).append(this),this}},{key:"text",value:function(e){return 0===arguments.length?this[0][pi]:this.each(function(t){t[pi]=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?L(this[0],e):this.each(function(n){return O(n,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(n){(n.dataset||(n.dataset={}))[e]=t})}},{key:"css",value:function(e,t){return 1!==arguments.length||s(e)?this.each(function(n){return B(n,e,t)}):F(this[0],e)}},{key:"addClass",value:function(e){return this.each(function(t){return D(t,e)})}},{key:"removeClass",value:function(e){return this.each(function(t){return I(t,e)})}},{key:"hasClass",value:function(e){return R(this[0],e)}},{key:"on",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.each(function(i){return C(i,e,t,n,r)})}},{key:"off",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.each(function(i){return N(i,e,t,n,r)})}},{key:"delegate",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.each(function(i){return P(i,e,t,n,r)})}},{key:"undelegate",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.each(function(i){return j(i,e,t,n,r)})}},{key:"remove",value:function(){return this.each(function(e){return U(e)})}}]),e}(),gi=function(){function e(){Xr(this,e)}return ni(e,null,[{key:"error",value:function(t,n){e.ENABLE_ERROR&&(console.error||console.warn||console.log)(H(t,n))}},{key:"info",value:function(t,n){e.ENABLE_INFO&&(console.info||console.log)(H(t,n))}},{key:"warn",value:function(t,n){e.ENABLE_WARN&&(console.warn||console.log)(H(t,n))}},{key:"debug",value:function(t,n){e.ENABLE_DEBUG&&(console.debug||console.log)(H(t,n))}},{key:"verbose",value:function(t,n){e.ENABLE_VERBOSE&&console.log(H(t,n))}}]),e}();gi.GLOBAL_TAG="chimee",gi.FORCE_GLOBAL_TAG=!1,gi.ENABLE_ERROR=!0,gi.ENABLE_INFO=!0,gi.ENABLE_WARN=!0,gi.ENABLE_DEBUG=!0,gi.ENABLE_VERBOSE=!0;var yi=r(function(e,t){!function(n,r){var i="model",o="name",a="type",s="vendor",u="version",l="mobile",c="tablet",f={extend:function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},has:function(e,t){return"string"==typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return"string"==typeof e?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},d={rgx:function(e,t){for(var n,r,i,o,a,s,u=0;u<t.length&&!a;){var l=t[u],c=t[u+1];for(n=r=0;n<l.length&&!a;)if(a=l[n++].exec(e))for(i=0;i<c.length;i++)s=a[++r],"object"==typeof(o=c[i])&&o.length>0?2==o.length?"function"==typeof o[1]?this[o[0]]=o[1].call(this,s):this[o[0]]=o[1]:3==o.length?"function"!=typeof o[1]||o[1].exec&&o[1].test?this[o[0]]=s?s.replace(o[1],o[2]):void 0:this[o[0]]=s?o[1].call(this,s,o[2]):void 0:4==o.length&&(this[o[0]]=s?o[3].call(this,s.replace(o[1],o[2])):void 0):this[o]=s||void 0;u+=2}},str:function(e,t){for(var n in t)if("object"==typeof t[n]&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(f.has(t[n][r],e))return"?"===n?void 0:n}else if(f.has(t[n],e))return"?"===n?void 0:n;return e}},h={browser:{oldsafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{amazon:{model:{"Fire Phone":["SD","KF"]}},sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2000:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}},p={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[o,u],[/(opios)[\/\s]+([\w\.]+)/i],[[o,"Opera Mini"],u],[/\s(opr)\/([\w\.]+)/i],[[o,"Opera"],u],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]+)*/i,/(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?([\w\.]*)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]+)*/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser)\/([\w\.-]+)/i],[o,u],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[o,"IE"],u],[/(edge)\/((\d+)?[\w\.]+)/i],[o,u],[/(yabrowser)\/([\w\.]+)/i],[[o,"Yandex"],u],[/(puffin)\/([\w\.]+)/i],[[o,"Puffin"],u],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[o,"UCBrowser"],u],[/(comodo_dragon)\/([\w\.]+)/i],[[o,/_/g," "],u],[/(micromessenger)\/([\w\.]+)/i],[[o,"WeChat"],u],[/(QQ)\/([\d\.]+)/i],[o,u],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[o,u],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[u,[o,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[u,[o,"Facebook"]],[/(headlesschrome) ([\w\.]+)/i],[u,[o,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[o,/(.+)/,"$1 WebView"],u],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[o,/(.+(?:g|us))(.+)/,"$1 $2"],u],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[u,[o,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[o,u],[/(dolfin)\/([\w\.]+)/i],[[o,"Dolphin"],u],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[o,"Chrome"],u],[/(coast)\/([\w\.]+)/i],[[o,"Opera Coast"],u],[/fxios\/([\w\.-]+)/i],[u,[o,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[u,[o,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[u,o],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[o,[u,d.str,h.browser.oldsafari.version]],[/(konqueror)\/([\w\.]+)/i,/(webkit|khtml)\/([\w\.]+)/i],[o,u],[/(navigator|netscape)\/([\w\.-]+)/i],[[o,"Netscape"],u],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix)\/([\w\.-]+)/i,/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]+)*/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[o,u]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",f.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/windows\s(ce|mobile);\sppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[["architecture",/ower/,"",f.lowerize]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+;))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[["architecture",f.lowerize]]],device:[[/\((ipad|playbook);[\w\s\);-]+(rim|apple)/i],[i,s,[a,c]],[/applecoremedia\/[\w\.]+ \((ipad)/],[i,[s,"Apple"],[a,c]],[/(apple\s{0,1}tv)/i],[[i,"Apple TV"],[s,"Apple"]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[s,i,[a,c]],[/(kf[A-z]+)\sbuild\/[\w\.]+.*silk\//i],[i,[s,"Amazon"],[a,c]],[/(sd|kf)[0349hijorstuw]+\sbuild\/[\w\.]+.*silk\//i],[[i,d.str,h.device.amazon.model],[s,"Amazon"],[a,l]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[i,s,[a,l]],[/\((ip[honed|\s\w*]+);/i],[i,[s,"Apple"],[a,l]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]+)*/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[s,i,[a,l]],[/\(bb10;\s(\w+)/i],[i,[s,"BlackBerry"],[a,l]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone)/i],[i,[s,"Asus"],[a,c]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[s,"Sony"],[i,"Xperia Tablet"],[a,c]],[/android.+\s([c-g]\d{4}|so[-l]\w+)\sbuild\//i],[i,[s,"Sony"],[a,l]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[s,i,[a,"console"]],[/android.+;\s(shield)\sbuild/i],[i,[s,"Nvidia"],[a,"console"]],[/(playstation\s[34portablevi]+)/i],[i,[s,"Sony"],[a,"console"]],[/(sprint\s(\w+))/i],[[s,d.str,h.device.sprint.vendor],[i,d.str,h.device.sprint.model],[a,l]],[/(lenovo)\s?(S(?:5000|6000)+(?:[-][\w+]))/i],[s,i,[a,c]],[/(htc)[;_\s-]+([\w\s]+(?=\))|\w+)*/i,/(zte)-(\w+)*/i,/(alcatel|geeksphone|lenovo|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]+)*/i],[s,[i,/_/g," "],[a,l]],[/(nexus\s9)/i],[i,[s,"HTC"],[a,c]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p)/i],[i,[s,"Huawei"],[a,l]],[/(microsoft);\s(lumia[\s\w]+)/i],[s,i,[a,l]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[i,[s,"Microsoft"],[a,"console"]],[/(kin\.[onetw]{3})/i],[[i,/\./g," "],[s,"Microsoft"],[a,l]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?(:?\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w+)*/i,/(XT\d{3,4}) build\//i,/(nexus\s6)/i],[i,[s,"Motorola"],[a,l]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[i,[s,"Motorola"],[a,c]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[s,f.trim],[i,f.trim],[a,"smarttv"]],[/hbbtv.+maple;(\d+)/i],[[i,/^/,"SmartTV"],[s,"Samsung"],[a,"smarttv"]],[/\(dtv[\);].+(aquos)/i],[i,[s,"Sharp"],[a,"smarttv"]],[/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[s,"Samsung"],i,[a,c]],[/smart-tv.+(samsung)/i],[s,[a,"smarttv"],i],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)*/i,/sec-((sgh\w+))/i],[[s,"Samsung"],i,[a,l]],[/sie-(\w+)*/i],[i,[s,"Siemens"],[a,l]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]+)*/i],[[s,"Nokia"],i,[a,l]],[/android\s3\.[\s\w;-]{10}(a\d{3})/i],[i,[s,"Acer"],[a,c]],[/android.+([vl]k\-?\d{3})\s+build/i],[i,[s,"LG"],[a,c]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[s,"LG"],i,[a,c]],[/(lg) netcast\.tv/i],[s,i,[a,"smarttv"]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w+)*/i,/android.+lg(\-?[\d\w]+)\s+build/i],[i,[s,"LG"],[a,l]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[i,[s,"Lenovo"],[a,c]],[/linux;.+((jolla));/i],[s,i,[a,l]],[/((pebble))app\/[\d\.]+\s/i],[s,i,[a,"wearable"]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[s,i,[a,l]],[/crkey/i],[[i,"Chromecast"],[s,"Google"]],[/android.+;\s(glass)\s\d/i],[i,[s,"Google"],[a,"wearable"]],[/android.+;\s(pixel c)\s/i],[i,[s,"Google"],[a,c]],[/android.+;\s(pixel xl|pixel)\s/i],[i,[s,"Google"],[a,l]],[/android.+(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i,/android.+(mi[\s\-_]*(?:one|one[\s_]plus|note lte)?[\s_]*(?:\d\w)?)\s+build/i],[[i,/_/g," "],[s,"Xiaomi"],[a,l]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[i,[s,"Meizu"],[a,c]],[/android.+a000(1)\s+build/i],[i,[s,"OnePlus"],[a,l]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[i,[s,"RCA"],[a,c]],[/android.+[;\/]\s*(Venue[\d\s]*)\s+build/i],[i,[s,"Dell"],[a,c]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[i,[s,"Verizon"],[a,c]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[s,"Barnes & Noble"],i,[a,c]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[i,[s,"NuVision"],[a,c]],[/android.+[;\/]\s*(zte)?.+(k\d{2})\s+build/i],[[s,"ZTE"],i,[a,c]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[i,[s,"Swiss"],[a,l]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[i,[s,"Swiss"],[a,c]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[i,[s,"Zeki"],[a,c]],[/(android).+[;\/]\s+([YR]\d{2}x?.*)\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(.+)\s+build/i],[[s,"Dragon Touch"],i,[a,c]],[/android.+[;\/]\s*(NS-?.+)\s+build/i],[i,[s,"Insignia"],[a,c]],[/android.+[;\/]\s*((NX|Next)-?.+)\s+build/i],[i,[s,"NextBook"],[a,c]],[/android.+[;\/]\s*(Xtreme\_?)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[s,"Voice"],i,[a,l]],[/android.+[;\/]\s*(LVTEL\-?)?(V1[12])\s+build/i],[[s,"LvTel"],i,[a,l]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[i,[s,"Envizen"],[a,c]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(.*\b)\s+build/i],[s,i,[a,c]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[i,[s,"MachSpeed"],[a,c]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[s,i,[a,c]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[i,[s,"Rotor"],[a,c]],[/android.+(KS(.+))\s+build/i],[i,[s,"Amazon"],[a,c]],[/android.+(Gigaset)[\s\-]+(Q.+)\s+build/i],[s,i,[a,c]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[a,f.lowerize],s,i],[/(android.+)[;\/].+build/i],[i,[s,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[u,[o,"EdgeHTML"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[o,u],[/rv\:([\w\.]+).*(gecko)/i],[u,o]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[o,u],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s]+\w)*/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[o,[u,d.str,h.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[o,"Windows"],[u,d.str,h.os.windows.version]],[/\((bb)(10);/i],[[o,"BlackBerry"],u],[/(blackberry)\w*\/?([\w\.]+)*/i,/(tizen)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|contiki)[\/\s-]?([\w\.]+)*/i,/linux;.+(sailfish);/i],[o,u],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]+)*/i],[[o,"Symbian"],u],[/\((series40);/i],[o],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[o,"Firefox OS"],u],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w+)*/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]+)*/i,/(hurd|linux)\s?([\w\.]+)*/i,/(gnu)\s?([\w\.]+)*/i],[o,u],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[o,"Chromium OS"],u],[/(sunos)\s?([\w\.]+\d)*/i],[[o,"Solaris"],u],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]+)*/i],[o,u],[/(haiku)\s(\w+)/i],[o,u],[/cfnetwork\/.+darwin/i,/ip[honead]+(?:.*os\s([\w]+)*\slike\smac|;\sopera)/i],[[u,/_/g,"."],[o,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]+\w)*/i,/(macintosh|mac(?=_powerpc)\s)/i],[[o,"Mac OS"],[u,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]+)*/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.]*)*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms)/i,/(unix)\s?([\w\.]+)*/i],[o,u]]},v=function(e,t){this[o]=e,this[u]=t},m=function(e){this.architecture=e},g=function(e,t,n){this[s]=e,this[i]=t,this[a]=n},y=v,b=v,w=function(e,t){if("object"==typeof e&&(t=e,e=void 0),!(this instanceof w))return new w(e,t).getResult();var r=e||(n&&n.navigator&&n.navigator.userAgent?n.navigator.userAgent:""),i=t?f.extend(p,t):p,o=new v,a=new m,s=new g,u=new y,l=new b;return this.getBrowser=function(){return d.rgx.call(o,r,i.browser),o.major=f.major(o.version),o},this.getCPU=function(){return d.rgx.call(a,r,i.cpu),a},this.getDevice=function(){return d.rgx.call(s,r,i.device),s},this.getEngine=function(){return d.rgx.call(u,r,i.engine),u},this.getOS=function(){return d.rgx.call(l,r,i.os),l},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(e){return r=e,o=new v,a=new m,s=new g,u=new y,l=new b,this},this};w.VERSION="0.7.14",w.BROWSER={NAME:o,MAJOR:"major",VERSION:u},w.CPU={ARCHITECTURE:"architecture"},w.DEVICE={MODEL:i,VENDOR:s,TYPE:a,CONSOLE:"console",MOBILE:l,SMARTTV:"smarttv",TABLET:c,WEARABLE:"wearable",EMBEDDED:"embedded"},w.ENGINE={NAME:o,VERSION:u},w.OS={NAME:o,VERSION:u},e.exports&&(t=e.exports=w),t.UAParser=w;var _=n&&(n.jQuery||n.Zepto);if(void 0!==_){var E=new w;_.ua=E.getResult(),_.ua.get=function(){return E.getUA()},_.ua.set=function(e){E.setUA(e);var t=E.getResult();for(var n in t)_.ua[n]=t[n]}}}("object"==typeof window?window:V)});t.Log=gi,t.UAParser=yi,t.genTraversalHandler=p,t.deepClone=function(e){if(d(e))throw new TypeError("deepClone only accept non primitive type");return tr(e)},t.deepAssign=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length<2)throw new Error("deepAssign accept two and more argument");for(var r=t.length-1;r>-1;r--)if(d(t[r]))throw new TypeError("deepAssign only accept non primitive type");var i=t.shift();return t.forEach(function(e){return tr(e,i)}),i},t.camelize=v,t.hypenate=function(e){return v(e).replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})},t.bind=function(e,t){return e.bind?e.bind(t):e.apply?function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return e.apply(t,r)}:function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return e.call.apply(e,[t].concat(At(r)))}},t.uuid=function(){return m()+m()+"-"+m()+"-"+m()+"-"+m()+"-"+m()+m()+m()},t.S4=m,t.rand=function(e){for(var t="";t.length<e;)t+=m();return t.slice(0,e)},t.getDeepProperty=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.throwError,a=void 0!==r&&r,s=n.backup;if(c(t)&&(t=t.split(".")),!o(t))throw new TypeError("keys of getDeepProperty must be string or Array<string>");for(var u=[],l=e,f=0,d=t.length;f<d;f++){var h=t[f];if(i(l)){if(a)throw new Error("obj"+(u.length>0?"."+u.join("."):" itself")+" is "+l);return s}l=l[h],u.push(h)}return l},t.isVoid=i,t.isArray=o,t.isFunction=a,t.isObject=s,t.isNumber=u,t.isNumeric=function(e){return!o(e)&&e-er(e)+1>=0},t.isInteger=function(e){return Bn(e)},t.isEmpty=function(e){return o(e)?0===e.length:s(e)?0===Pn(e).length:!e},t.isEvent=function(e){return e instanceof Event||e.originalEvent instanceof Event},t.isBlob=l,t.isFile=function(e){return l(e)&&c(e.name)},t.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},t.isString=c,t.isBoolean=f,t.isPromise=function(e){return!!e&&("object"===(void 0===e?"undefined":Nn(e))||"function"==typeof e)&&"function"==typeof e.then},t.isPrimitive=d,t.isUrl=function(e){return c(e)&&!!e.match(/^((https?|ftp|rtsp|mms):\/\/)(([0-9a-z_!~*'().&=+$%-]+: )?[0-9a-z_!~*'().&=+$%-]+@)?(([0-9]{1,3}\.){3}[0-9]{1,3}|([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6}|localhost)(:[0-9]{1,4})?((\/?)|(\/[0-9a-z_!~*'().;?:@&=+$,%#-]+)+\/?)$/i)},t.isNode=h,t.isElement=function(e){return!!("object"===("undefined"==typeof HTMLElement?"undefined":Nn(HTMLElement))?e instanceof HTMLElement:e&&"object"===(void 0===e?"undefined":Nn(e))&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName)},t.isChildNode=function(e,t){return!(!h(e)||!h(t))&&t.parentNode===e},t.isPosterityNode=function(e,t){if(!h(e)||!h(t))return!1;for(;t.parentNode;)if((t=t.parentNode)===e)return!0;return!1},t.isHTMLString=function(e){return/<[^>]+?>/.test(e)},t.isError=function(e){return e instanceof Error},t.inBrowser=Jr,t.makeArray=function(e){return Tt(e)},t.transObjectAttrIntoArray=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e,t){return+e-+t};return Pn(e).sort(t).reduce(function(t,n){return t.concat(e[n])},[])},t.runRejectableQueue=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new $r(function(t,r){!function i(o){if(!(o>=e.length)){var s=a(e[o])?e[o].apply(e,At(n)):e[o];return!1===s?r("stop"):$r.resolve(s).then(function(){return i(o+1)}).catch(function(e){return r(e||"stop")})}t()}(0)})},t.runStoppableQueue=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return function t(r){return r>=e.length||!1!==(a(e[r])?e[r].apply(e,At(n)):e[r])&&t(++r)}(0)},t.decodeUTF8=function(e){for(var t=[],n=e,r=0,i=e.length;r<i;)if(n[r]<128)t.push(String.fromCharCode(n[r])),++r;else{if(n[r]<192);else if(n[r]<224){if(y(n,r,1)){var o=(31&n[r])<<6|63&n[r+1];if(o>=128){t.push(String.fromCharCode(65535&o)),r+=2;continue}}}else if(n[r]<240){if(y(n,r,2)){var a=(15&n[r])<<12|(63&n[r+1])<<6|63&n[r+2];if(a>=2048&&55296!=(63488&a)){t.push(String.fromCharCode(65535&a)),r+=3;continue}}}else if(n[r]<248&&y(n,r,3)){var s=(7&n[r])<<18|(63&n[r+1])<<12|(63&n[r+2])<<6|63&n[r+3];if(s>65536&&s<1114112){s-=65536,t.push(String.fromCharCode(s>>>10|55296)),t.push(String.fromCharCode(1023&s|56320)),r+=4;continue}}t.push(String.fromCharCode(65533)),++r}return t.join("")},t.debounce=function(e,t,n){var r=void 0,i=void 0,o=void 0,a=void 0,s=void 0,u=function u(){var l=new Date-a;l<t&&l>=0?r=setTimeout(u,t-l):(r=null,n||(s=e.apply(o,i),r||(o=i=null)))};return function(){o=this,i=arguments,a=new Date;var l=n&&!r;return r||(r=setTimeout(u,t)),l&&(s=e.apply(o,i),o=i=null),s}},t.throttle=function(e,t,n,r){var i=void 0,o=void 0,a=void 0,s=null,u=0;n||(n={});var l=function(){u=!1===n.leading?0:new Date-0,s=null,a=e.apply(i,o),s||(i=o=null)};return t=t||0,function(){var c=new Date;u||!1!==n.leading||(u=c);var f=t-(c-u);return i=r||this,o=arguments,f<=0||f>t?(s&&(clearTimeout(s),s=null),u=c,a=e.apply(i,o),s||(i=o=null)):s||!1===n.trailing||(s=setTimeout(l,f)),a}},t.raf=Kr,t.caf=Qr,t.strRepeat=b,t.formatTime=function(e){var t=Math.floor(e/3600);e=Math.floor(e%3600);var n=b(Math.floor(e/60),2),r=b(e=Math.floor(e%60),2);return t>=1?t+":"+n+":"+r:n+":"+r},t.appendCSS=function(e){var t=document,n=t.querySelector("style");if(!n){n=t.createElement("style");var r=t.querySelector("head");r&&r.appendChild(n)}return n.appendChild(t.createTextNode(e)),n},t.formatDate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yyyy-MM-dd hh:mm:ss.i",n=e.getFullYear().toString(),r={M:e.getMonth()+1,d:e.getDate(),h:e.getHours(),m:e.getMinutes(),s:e.getSeconds(),i:e.getMilliseconds()};t=t.replace(/(y+)/gi,function(e,t){return n.substr(4-Math.min(4,t.length))});for(var i in r)!function(e){t=t.replace(new RegExp("("+e+"+)","g"),function(t,n){return(r[e]<10&&n.length>1?"0":"")+r[e]})}(i);return t},t.getLocalStorage=function(e){try{return window.localStorage.getItem(e)}catch(n){try{var t=document.cookie.match(new RegExp("(^| )"+e+"=([^;]*)(;|$)"));return o(t)?unescape(t[2]):""}catch(e){return""}}},t.setLocalStorage=function(e,t){try{window.localStorage.setItem(e,t)}catch(r){var n=new Date;n.setTime(n.getTime()+2592e7);try{document.cookie=e+"="+escape(t)+";expires="+n.toUTCString()+";path=/;"}catch(e){}}},t.emitEventCache=_,t.addEventCache=E,t.removeEventCache=S,t.CustEvent=fi,t.getAttr=L,t.setAttr=O,t.addClassName=D,t.removeClassName=I,t.hasClassName=R,t.removeEvent=N,t.addEvent=C,t.addDelegate=P,t.removeDelegate=j,t.getStyle=F,t.setStyle=B,t.query=z,t.removeEl=U,t.findParents=G,t.$=W,t.NodeWrap=mi,Object.defineProperty(t,"__esModule",{value:!0})})}).call(t,n(12))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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}function o(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)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),u=function(e){return e&&e.__esModule?e:{default:e}}(n(1)),l=function(e){function t(e,n){r(this,t);var o=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return o.video=e,o.config=n,o.tag="mse-controller",o.e={onSourceOpen:o.onSourceOpen.bind(o),onSourceEnded:o.onSourceEnded.bind(o),onSourceClose:o.onSourceClose.bind(o),onSourceBufferError:o.onSourceBufferError.bind(o)},o.hasVideo=!0,o.hasAudio=!0,o.removeRangesList={video:[],audio:[]},o.removeBucketing=!1,o.timer={video:null,audio:null},window.queue=o.queue={video:[],audio:[]},o.sourceBuffer={video:null,audio:null},o.mimeCodec={video:null,audio:null},o.sourceBufferEvent(),o}return o(t,s.CustEvent),a(t,[{key:"init",value:function(e){if(this.mediaSource)throw u.default.Error(this.tag,"MediaSource has been attached to an HTMLMediaElement!"),new Error("MediaSource has been attached to an HTMLMediaElement!");e.data.hasAudio?this.mimeCodec.audio='video/mp4; codecs="'+e.data.audioCodec:this.hasAudio=!1,e.data.hasVideo?this.mimeCodec.video='video/mp4; codecs="'+e.data.videoCodec:this.hasVideo=!1;var t=this.mediaSource=new window.MediaSource;t.addEventListener("sourceopen",this.e.onSourceOpen),t.addEventListener("sourceended",this.e.onSourceEnded),t.addEventListener("sourceclose",this.e.onSourceClose)}},{key:"onSourceOpen",value:function(){u.default.verbose(this.tag,"MediaSource onSourceOpen"),this.mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this.hasAudio&&this.addSourceBuffer("audio"),this.hasVideo&&this.addSourceBuffer("video"),this.hasQueueList()&&this.doUpdate(),this.emit("source_open")}},{key:"addSourceBuffer",value:function(e){var t=this;this.sourceBuffer[e]=this.mediaSource.addSourceBuffer(this.mimeCodec[e]),u.default.verbose(this.tag,"add sourcebuffer "+e);var n=this.sourceBuffer[e];n.addEventListener("error",this.e.onSourceBufferError),n.addEventListener("abort",function(){return u.default.verbose(t.tag,"sourceBuffer: abort")}),n.addEventListener("updateend",function(){t.hasRemoveList()?(t.removeRangesList.video.length&&t.cleanRangesList("video"),t.removeRangesList.audio.length&&t.cleanRangesList("audio")):t.hasQueueList()&&t.doUpdate(),t.emit("updateend")})}},{key:"hasRemoveList",value:function(){return this.removeRangesList.video.length||this.removeRangesList.audio.length}},{key:"hasQueueList",value:function(){return this.queue.video.length||this.queue.audio.length}},{key:"doUpdate",value:function(){for(var e in this.queue)if(this.queue[e].length>0&&!this.sourceBuffer[e].updating){var t=this.queue[e].shift();this.appendBuffer(t,e)}}},{key:"sourceBufferEvent",value:function(){var e=this;this.on("mediaSegment",function(t){var n=t.data,r=n.type;e.needCleanupSourceBuffer(r)&&e.doCleanupSourceBuffer(r),!e.sourceBuffer[r]||e.sourceBuffer[r].updating||e.queue[r].length>0?e.queue[r].push(n.data):e.appendBuffer(n.data,r)}),this.on("mediaSegmentInit",function(t){var n=t.data,r=n.type;e.queue[r].push(n.data)})}},{key:"needCleanupSourceBuffer",value:function(e){var t=this.video.currentTime,n=this.video.buffered;return n.length>=1&&t-n.start(0)>=this.config.autoCleanupMaxBackwardDuration}},{key:"doCleanupSourceBuffer",value:function(e){u.default.verbose(this.tag,"docleanBuffer");for(var t=this.video.currentTime,n=this.sourceBuffer[e].buffered,r=!1,i=0;i<n.length;i++){var o=n.start(i),a=n.end(i);if(o<=t&&t<a+3&&t-o>=this.config.autoCleanupMaxBackwardDuration){r=!0;var s=t-this.config.autoCleanupMinBackwardDuration;this.removeRangesList[e].push({start:o,end:s})}}r&&!this.sourceBuffer[e].updating&&this.cleanRangesList(e)}},{key:"cleanRangesList",value:function(e){if(!this.sourceBuffer[e].updating)for(var t=this.sourceBuffer[e];this.removeRangesList[e].length&&!t.updating;){var n=this.removeRangesList[e].shift();t.remove(n.start,n.end)}}},{key:"appendBuffer",value:function(e,t){try{this.sourceBuffer[t].appendBuffer(e.buffer)}catch(n){console.log("appendBuffer error",n),this.queue[t].unshift(e),22===n.code?(u.default.verbose(this.tag,"MediaSource bufferFull"),this.emit("bufferFull")):this.emit("error",n.message)}}},{key:"onSourceEnded",value:function(){u.default.verbose(this.tag,"MediaSource onSourceEnded")}},{key:"onSourceClose",value:function(){u.default.verbose(this.tag,"MediaSource onSourceClose"),this.mediaSource&&null!==this.e&&(this.mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this.mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this.mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}},{key:"onSourceBufferError",value:function(e){this.emit("error",e),u.default.error(this.tag,"SourceBuffer Error: "+e)}},{key:"seek",value:function(){for(var e in this.sourceBuffer){var t=this.sourceBuffer[e];try{t.abort()}catch(e){u.default.error(this.tag,e.message)}this.queue[e]=[];for(var n=0;n<t.buffered.length;n++){var r=t.buffered.start(n),i=t.buffered.end(n);this.removeRangesList[e].push({start:r,end:i})}t.updating||this.cleanRangesList(e)}}},{key:"resume",value:function(){this.doUpdate()}},{key:"destroy",value:function(){if(this.mediaSource){var e=this.mediaSource;this.queue=[],this.sourceBuffer={video:null,audio:null},this.mimeCodec={video:null,audio:null};var t=this.sourceBuffer;if(t&&("closed"!==e.readyState&&(e.removeSourceBuffer(t),t.removeEventListener("error",this.e.onSourceBufferError),t.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)),this.sourceBuffer=null),"open"===e.readyState)try{e.endOfStream()}catch(e){u.default.e(this.tag,e.message)}e.removeEventListener("sourceopen",this.e.onSourceOpen),e.removeEventListener("sourceended",this.e.onSourceEnded),e.removeEventListener("sourceclose",this.e.onSourceClose),this.mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)}}]),t}();t.default=l},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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}function a(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)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=r(n(4)),l=n(0),c=r(n(1)),f=r(n(19)),d=r(n(5)),h=function(e){function t(e,n){i(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.config={},r.tag="transmuxer",r.loader=null,r.CPU=null,r.keyframePoint=!1,r.w=null,Object.assign(r.config,n),r.config.webWorker&&(r.w=(0,f.default)(30),r.w.addEventListener("message",function(e){r.parseCallback.call(r,e.data)}),r.w.postMessage({cmd:"init",data:n})),r}return a(t,l.CustEvent),s(t,[{key:"loadSource",value:function(){this.config.webWorker?this.w.postMessage({cmd:"loadSource"}):(this.loader=new u.default(this.config),this.loader.arrivalDataCallback=this.arrivalDataCallback.bind(this),this.loader.open())}},{key:"arrivalDataCallback",value:function(e,t,n){var r=this;return this.CPU||(this.CPU=new d.default,this.CPU.onInitSegment=this.onRemuxerInitSegmentArrival.bind(this),this.CPU.onMediaSegment=this.onRemuxerMediaSegmentArrival.bind(this),this.CPU.onError=this.onCPUError.bind(this),this.CPU.onMediaInfo=this.onMediaInfo.bind(this),this.CPU.on("error",function(e){r.emit("error",e.data)})),n&&this.CPU.seek(n),this.CPU.setflv(e)}},{key:"parseCallback",value:function(e){switch(e.cmd){case"mediaSegmentInit":this.emit("mediaSegmentInit",e.source);break;case"mediaSegment":this.emit("mediaSegment",e.source);break;case"mediainfo":this.mediaInfo=e.source,this.emit("mediaInfo",e.source)}}},{key:"onDemuxError",value:function(e,t){c.default.error(this.tag,"DemuxError: type = "+e+", info = "+t),this.emit("DemuxError",e,t)}},{key:"onMediaInfo",value:function(e){this.mediaInfo=e,this.emit("mediaInfo",e)}},{key:"onRemuxerInitSegmentArrival",value:function(e,t){this.emit("mediaSegmentInit",{type:"video",data:e}),t&&this.emit("mediaSegmentInit",{type:"audio",data:t})}},{key:"onRemuxerMediaSegmentArrival",value:function(e,t){this.emit("mediaSegment",{type:e,data:t})}},{key:"onCPUError",value:function(e){this.emit("ERROR",e.data)}},{key:"getMediaInfo",value:function(){return this.mediaInfo}},{key:"pause",value:function(){this.config.webWorker?this.w.postMessage({cmd:"pause"}):this.loader.pause()}},{key:"resume",value:function(){this.config.webWorker?this.w.postMessage({cmd:"resume"}):this.loader.resume()}},{key:"isSeekable",value:function(){return this.mediaInfo.hasKeyframesIndex}},{key:"seek",value:function(e){if(!this.isSeekable())return this.emit("error","这个flv视频不支持seek"),!1;this.config.webWorker?this.w.postMessage({cmd:"seek",keyframe:e}):(this.loader=new u.default(this.config),this.loader.arrivalDataCallback=this.arrivalDataCallback.bind(this),this.loader.seek(e.keyframePoint,!1,e.keyframetime))}},{key:"refresh",value:function(){this.config.webWorker?this.w.postMessage({cmd:"refresh"}):(this.pause(),this.loader=new u.default(this.config),this.loader.arrivalDataCallback=this.arrivalDataCallback.bind(this),this.loader.open())}},{key:"destroy",value:function(){this.config.webWorker?this.w.postMessage({cmd:"destroy"}):(this.loader.destroy(),this.loader=null,this.CPU=null)}},{key:"getNearlestKeyframe",value:function(e){if(this.mediaInfo&&this.mediaInfo.keyframesIndex){var t=this.mediaInfo.keyframesIndex.times,n=this.mediaInfo.keyframesIndex.filepositions;return function e(r,i){var o=r.length,a=Math.floor(o/2);if(1===o){var s=t.indexOf(r[0]);return{keyframetime:r[0],keyframePoint:n[s]}}if(r[a]>i)return e(r.slice(0,a),i);if(r[a]<i)return e(r.slice(a),i);var u=t.indexOf(r[0]);return{keyframetime:r[0],keyframePoint:n[u]}}(t,e)}return 0}}]),t}();t.default=h},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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}function a(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)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=r(n(2)),l=n(0),c=r(n(1)),f=function(e){function t(e,n){i(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.tag="fetch",r.fetching=!1,r.config=n,r.range={from:0,to:5e5},r.src=e,r.totalRange=null,r.block=5e5,r.reader=null,r.requestAbort=!1,r.arrivalDataCallback=null,r.bytesStart=0,r}return a(t,l.CustEvent),s(t,null,[{key:"isSupport",value:function(){return!(!self.fetch||!self.ReadableStream)}}]),s(t,[{key:"open",value:function(e,t){var n=this;this.requestAbort=!1;var r=new Headers,i=e||{from:0,to:-1};if(!this.config.isLive){this.range.from=i.from,this.range.to=i.to;var o=(0,u.default)(i).headers;for(var a in o)r.append(a,o[a])}t&&(this.bytesStart=0),this.bytesStart=e.from;var s={method:"GET",headers:r,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};fetch(this.src,s).then(function(e){if(e.ok){var r=e.body.getReader();return n.pump(r,t)}})}},{key:"pause",value:function(){this.requestAbort=!0}},{key:"pump",value:function(e,t){var n=this;return e.read().then(function(r){if(!r.done){if(!0===n.requestAbort)return n.requestAbort=!1,e.cancel();var i=r.value.buffer;return n.arrivalDataCallback&&(n.arrivalDataCallback(i,n.bytesStart,t),n.bytesStart+=i.byteLength),n.pump(e)}c.default.verbose(n.tag,"load end")}).catch(function(e){n.emit("error",e.message)})}}]),t}();t.default=f},function(e,t,n){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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}function o(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)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function(e){return e&&e.__esModule?e:{default:e}}(n(2)),u=n(0),l=function(e){function t(e,n){r(this,t);var o=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return o.tag="RangeLoader",o.xhr=null,o.src=e,o.totalLength=null,o.chunkSizeKB=393216,o.range={},o.bytesStart=0,o}return o(t,u.CustEvent),a(t,null,[{key:"isSupport",value:function(){try{var e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="arraybuffer","arraybuffer"===e.responseType}catch(e){return!1}}}]),a(t,[{key:"open",value:function(e){var t=this.xhr=new XMLHttpRequest;t.open("GET",this.src,!0),t.responseType="arraybuffer",t.onreadystatechange=this.onReadyStateChange.bind(this),t.onprogress=this.onProgress.bind(this),t.onload=this.onLoad.bind(this),t.onerror=this.onXhrError.bind(this);var n=e||{from:0,to:-1};this.range.from=n.from,this.range.to=n.to;var r=(0,s.default)(n).headers;for(var i in r)t.setRequestHeader(i,r[i]);t.send()}},{key:"abort",value:function(){this.xhr.onreadystatechange=null,this.xhr.onprogress=null,this.xhr.onload=null,this.xhr.onerror=null,this.xhr.abort(),this.xhr=null}},{key:"destroy",value:function(){this.xhr&&(this.abort(),this.xhr.onreadystatechange=null,this.xhr.onprogress=null,this.xhr.onload=null,this.xhr.onerror=null,this.xhr=null),this.totalLength=null,this.bytesStart=null,this.range={}}},{key:"onReadyStateChange",value:function(e){var t=this.xhr;if(2===t.readyState&&t.status<200&&t.status>299){var n={from:this.range.from,to:this.range.to,url:this.src,msg:"http Error: http code "+t.status};this.emit(this.tag,n)}}},{key:"onProgress",value:function(e){this.totalLength||(this.totalLength=e.total,this.abort(),this.open({from:0,to:this.chunkSizeKB}))}},{key:"onLoad",value:function(e){if(this.totalLength&&(this.range.to,this.totalLength,this.arrivalDataCallback)){var t=e.target.response;this.arrivalDataCallback(t,this.bytesStart),this.bytesStart+=t.byteLength}}},{key:"onXhrError",value:function(e){var t={from:this.range.from,to:this.range.to,url:this.src,msg:e.constructor.name+" "+e.type};this.emit(this.tag,t)}}]),t}();t.default=l},function(e,t,n){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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}function o(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)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),u=function(e){function t(e,n){r(this,t);var o=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return o.tag="WebSocket",o.src=e,o._ws=null,o._requestAbort=!1,o._receivedLength=0,o}return o(t,s.CustEvent),a(t,null,[{key:"isSupported",value:function(){try{return void 0!==window.WebSocket}catch(e){return!1}}}]),a(t,[{key:"destroy",value:function(){this._ws&&this.abort()}},{key:"open",value:function(e,t){try{var n=this._ws=new self.WebSocket(this.src);n.binaryType="arraybuffer",n.onopen=this.onWebSocketOpen.bind(this),n.onclose=this.onWebSocketClose.bind(this),n.onmessage=this.onWebSocketMessage.bind(this),n.onerror=this.onWebSocketError.bind(this)}catch(e){var r={code:e.code,msg:e.message};if(!this._onError)throw new Error(r.msg);this._onError("Exception",r)}}},{key:"abort",value:function(){var e=this._ws;!e||0!==e.readyState&&1!==e.readyState||(this._requestAbort=!0,e.close()),this._ws=null}},{key:"onWebSocketClose",value:function(e){!0!==this._requestAbort?this.emit("end"):this._requestAbort=!1}},{key:"onWebSocketMessage",value:function(e){var t=this;if(e.data instanceof ArrayBuffer)this.dispatchArrayBuffer(e.data);else if(e.data instanceof Blob){var n=new FileReader;n.onload=function(){t.dispatchArrayBuffer(n.result)},n.readAsArrayBuffer(e.data)}else{var r={code:-1,msg:"Unsupported WebSocket message type: "+e.data.constructor.name};if(!this._onError)throw new Error(r.msg);this._onError("Exception",r)}}},{key:"dispatchArrayBuffer",value:function(e){var t=e,n=this.receivedLength;this.receivedLength+=t.byteLength,this.arrivalDataCallback&&this.arrivalDataCallback(t,n,this.receivedLength)}},{key:"onWebSocketError",value:function(e){var t={code:e.code,msg:e.message};if(!this._onError)throw new Error(t.msg);this._onError("Exception",t)}}]),t}();t.default=u},function(e,t,n){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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}function o(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)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function(e){return e&&e.__esModule?e:{default:e}}(n(2)),u=n(0),l=function(e){function t(e,n){r(this,t);var o=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return o.tag="mozChunkLoader",o.xhr=null,o.src=e,o.config=n,o.totalLength=null,o.chunkSizeKB=393216,o.range={},o.bytesStart=0,o}return o(t,u.CustEvent),a(t,null,[{key:"isSupport",value:function(){try{var e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="moz-chunked-arraybuffer","moz-chunked-arraybuffer"===e.responseType}catch(e){return!1}}}]),a(t,[{key:"open",value:function(e){var t=this.xhr=new XMLHttpRequest;if(t.open("GET",this.src,!0),t.responseType="moz-chunked-arraybuffer",t.onreadystatechange=this.onReadyStateChange.bind(this),t.onprogress=this.onProgress.bind(this),t.onload=this.onLoadEnd.bind(this),t.onerror=this.onXhrError.bind(this),!this.config.isLive){var n=e||{from:0,to:-1};this.range.from=n.from,this.range.to=n.to;var r=(0,s.default)(n).headers;for(var i in r)t.setRequestHeader(i,r[i])}t.send()}},{key:"abort",value:function(){this.xhr.onreadystatechange=null,this.xhr.onprogress=null,this.xhr.onload=null,this.xhr.onerror=null,this.xhr.abort(),this.xhr=null}},{key:"destroy",value:function(){this.xhr&&(this.abort(),this.xhr.onreadystatechange=null,this.xhr.onprogress=null,this.xhr.onload=null,this.xhr.onerror=null,this.xhr=null),this.totalLength=null,this.bytesStart=null,this.range={}}},{key:"onReadyStateChange",value:function(e){var t=this.xhr;if(2===t.readyState&&t.status<200&&t.status>299){var n={from:this.range.from,to:this.range.to,url:this.src,msg:"http Error: http code "+t.status};this.emit(this.tag,n)}}},{key:"onProgress",value:function(e){this.totalLength||(this.totalLength=e.total,null!==e.total&&0!==e.total&&(this.totalLength=e.total));var t=e.target.response;this.arrivalDataCallback(t,this.bytesStart),this.bytesStart+=t.byteLength}},{key:"onLoadEnd",value:function(e){this.emit(this.tag,"video load end")}},{key:"onXhrError",value:function(e){var t={from:this.range.from,to:this.range.to,url:this.src,msg:e.constructor.name+" "+e.type};this.emit(this.tag,t)}}]),t}();t.default=l},function(e,t,n){function r(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t.oe=function(e){throw console.error(e),e};var r=t(t.s=ENTRY_MODULE);return r.default||r}function i(e){return(e+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function o(e,t,r){var o={};o[r]=[];var a=t.toString(),s=a.match(/^function\s?\(\w+,\s*\w+,\s*(\w+)\)/);if(!s)return o;for(var c,f=s[1],d=new RegExp("(\\\\n|\\W)"+i(f)+l,"g");c=d.exec(a);)"dll-reference"!==c[3]&&o[r].push(c[3]);for(d=new RegExp("\\("+i(f)+'\\("(dll-reference\\s('+u+'))"\\)\\)'+l,"g");c=d.exec(a);)e[c[2]]||(o[r].push(c[1]),e[c[2]]=n(c[1]).m),o[c[2]]=o[c[2]]||[],o[c[2]].push(c[4]);return o}function a(e){return Object.keys(e).reduce(function(t,n){return t||e[n].length>0},!1)}function s(e,t){for(var n={main:[t]},r={main:[]},i={main:{}};a(n);)for(var s=Object.keys(n),u=0;u<s.length;u++){var l=s[u],c=n[l].pop();if(i[l]=i[l]||{},!i[l][c]&&e[l][c]){i[l][c]=!0,r[l]=r[l]||[],r[l].push(c);for(var f=o(e,e[l][c],l),d=Object.keys(f),h=0;h<d.length;h++)n[d[h]]=n[d[h]]||[],n[d[h]]=n[d[h]].concat(f[d[h]])}}return r}var u="[\\.|\\-|\\+|\\w|/|@]+",l="\\((/\\*.*?\\*/)?s?.*?("+u+").*?\\)";e.exports=function(e,t){t=t||{};var i={main:n.m},o=t.all?{main:Object.keys(i)}:s(i,e),a="";Object.keys(o).filter(function(e){return"main"!==e}).forEach(function(e){for(var t=0;o[e][t];)t++;o[e].push(t),i[e][t]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",a=a+"var "+e+" = ("+r.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+o[e].map(function(t){return JSON.stringify(t)+": "+i[e][t].toString()}).join(",")+"});\n"}),a=a+"("+r.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+o.main.map(function(e){return JSON.stringify(e)+": "+i.main[e].toString()}).join(",")+"})(self);";var u=new window.Blob([a],{type:"text/javascript"});if(t.bare)return u;var l=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(u),c=new window.Worker(l);return c.objectURL=l,c}},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=r(n(21)),s=r(n(6)),u=r(n(3)),l=function(){function e(){i(this,e),this.tempUint8=new Uint8Array,this.arrTag=[],this.index=0,this.tempArr=[],this.stop=!1,this.offset=0,this.frist=!0,this._hasAudio=!1,this._hasVideo=!1}return o(e,[{key:"setFlv",value:function(e){return this.stop=!1,this.arrTag=[],this.index=0,this.tempUint8=e,this.tempUint8.length>13&&70==this.tempUint8[0]&&76==this.tempUint8[1]&&86==this.tempUint8[2]?(this.probe(this.tempUint8.buffer),this.read(9),this.read(4),this.parse(),this.frist=!1,this.offset):this.frist?this.offset:this.parse()}},{key:"probe",value:function(e){var t=new Uint8Array(e),n={match:!1};if(70!==t[0]||76!==t[1]||86!==t[2]||1!==t[3])return n;var r=(4&t[4])>>>2!=0,i=0!=(1&t[4]);return r||i?(this._hasAudio=s.default._hasAudio=r,this._hasVideo=s.default._hasVideo=i,{match:!0,hasAudioTrack:r,hasVideoTrack:i}):n}},{key:"parse",value:function(){for(;this.index<this.tempUint8.length&&!this.stop;){this.offset=this.index;var e=new a.default;if(this.tempUint8.length-this.index>=11){if(e.tagType=this.read(1)[0],e.dataSize=this.read(3),e.Timestamp=this.read(4),e.StreamID=this.read(3),18!=e.tagType&&8!=e.tagType&&9!=e.tagType)throw new u.default("wrong tagType"+e.tagType);this.tempUint8.length-this.index>=this.getBodySum(e.dataSize)+4?(e.body=this.read(this.getBodySum(e.dataSize)),9==e.tagType&&this._hasVideo&&this.arrTag.push(e),8==e.tagType&&this._hasAudio&&this.arrTag.push(e),18==e.tagType&&0==this.arrTag.length&&this.arrTag.push(e),e.size=this.read(4),this.offset=this.index):this.stop=!0}else this.stop=!0}return this.offset}},{key:"read",value:function(e){var t=this.tempUint8.slice(this.index,this.index+e);return this.index+=e,t}},{key:"getBodySum",value:function(e){var t="";return t+=1==e[0].toString(16).length?"0"+e[0].toString(16):e[0].toString(16),t+=1==e[1].toString(16).length?"0"+e[1].toString(16):e[1].toString(16),t+=1==e[2].toString(16).length?"0"+e[2].toString(16):e[2].toString(16),parseInt(t,16)}}]),e}();t.default=new l},function(e,t,n){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(){r(this,e),this.tagType=-1,this.dataSize=-1,this.Timestamp=-1,this.StreamID=-1,this.body=-1,this.time=-1,this.arr=[],this.size=-1}return i(e,[{key:"getTime",value:function(){this.arr=[];for(var e=0;e<this.Timestamp.length;e++)this.arr.push(1==this.Timestamp[e].toString(16).length?"0"+this.Timestamp[e].toString(16):this.Timestamp[e].toString(16));this.arr.pop();var t=this.arr.join("");return this.time=parseInt(t,16),parseInt(t,16)}}]),e}();t.default=o},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=r(n(23)),s=(r(n(7)),function(){var e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}()),u=function(){function e(){i(this,e)}return o(e,null,[{key:"parseObject",value:function(t,n,r){var i=e.parseString(t,n,r),o=e.parseScript(t,n+i.size),a=o.objectEnd;return{data:{name:i.data,value:o.data},size:o.size,objectEnd:a}}},{key:"parseVariable",value:function(t,n,r){return e.parseObject(t,n,r)}},{key:"parseLongString",value:function(e,t,n){var r=new DataView(e,t).getUint32(0,!s),i=void 0;return i=r>0?(0,a.default)(new Uint8Array(e,t+4,r)):"",{data:i,size:4+r}}},{key:"parseDate",value:function(e,t,n){var r=new DataView(e,t),i=r.getFloat64(0,!s);return i+=60*r.getInt16(8,!s)*1e3,{data:new Date(i),size:10}}},{key:"parseString",value:function(e,t,n){var r=new DataView(e,t).getUint16(0,!s),i=void 0;return i=r>0?(0,a.default)(new Uint8Array(e,t+2,r)):"",{data:i,size:2+r}}},{key:"parseMetadata",value:function(t){var n=e.parseScript(t,0),r=e.parseScript(t,n.size,t.length-n.size),i={};return i[n.data]=r.data,i}},{key:"parseScript",value:function(t,n,r){var i=n,o=new Uint8Array(t).buffer,a=new DataView(o,0,r),u=null,l=a.getUint8(i);switch(i+=1,l){case 0:u=a.getFloat64(i,!s),i+=8;break;case 1:u=!!a.getUint8(i),i+=1;break;case 2:var c=e.parseString(o,i);u=c.data,i+=c.size;break;case 3:u={};var f=0;for(9==(16777215&a.getUint32(r-4,!s))&&(f=3);i<r-4;){var d=e.parseObject(o,i,r-n-f);if(d.objectEnd)break;u[d.data.name]=d.data.value,i=d.size}i<=r-3&&9===(16777215&v.getUint32(i-1,!s))&&(i+=3);break;case 8:u={},i+=4;for(9==(16777215&a.getUint32(r-4,!s))&&3;i<r-8;){var h=e.parseVariable(o,i);if(h.objectEnd)break;u[h.data.name]=h.data.value,i=h.size}i<=r-3&&9===(16777215&a.getUint32(i-1,!s))&&(i+=3);break;case 9:u=void 0,i=1,!0;break;case 10:u=[];var p=a.getUint32(i,!s);i+=4;for(var m=0;m<p;m++){var g=e.parseScript(o,i);u.push(g.data),i=g.size}break;case 11:var y=e.parseDate(o,i+1,r-1);u=y.data,i+=y.size;break;case 12:var b=e.parseString(o,i+1,r-1);u=b.data,i+=b.size;break;default:i=r,console.log("AMF","Unsupported AMF value type "+l)}return{data:u,size:i}}}]),e}();t.default=u},function(e,t,n){function r(e,t,n){var r=e;if(t+n<r.length){for(;n--;)if(128!=(192&r[++t]))return!1;return!0}return!1}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){for(var t=[],n=e,i=0,o=e.length;i<o;)if(n[i]<128)t.push(String.fromCharCode(n[i])),++i;else{if(n[i]<192);else if(n[i]<224){if(r(n,i,1)){var a=(31&n[i])<<6|63&n[i+1];if(a>=128){t.push(String.fromCharCode(65535&a)),i+=2;continue}}}else if(n[i]<240){if(r(n,i,2)){var s=(15&n[i])<<12|(63&n[i+1])<<6|63&n[i+2];if(s>=2048&&55296!=(63488&s)){t.push(String.fromCharCode(65535&s)),i+=3;continue}}}else if(n[i]<248&&r(n,i,3)){var u=(7&n[i])<<18|(63&n[i+1])<<12|(63&n[i+2])<<6|63&n[i+3];if(u>65536&&u<1114112){u-=65536,t.push(String.fromCharCode(u>>>10|55296)),t.push(String.fromCharCode(1023&u|56320)),i+=4;continue}}t.push(String.fromCharCode(65533)),++i}return t.join("")}},function(e,t,n){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t){r(this,e),this.TAG=this.constructor.name,this._buffer=t,this._buffer_index=0,this._total_bytes=t.byteLength,this._total_bits=8*t.byteLength,this._current_word=0,this._current_word_bits_left=0}return i(e,[{key:"destroy",value:function(){this._buffer=null}},{key:"_fillCurrentWord",value:function(){var e=this._total_bytes-this._buffer_index;if(e<=0)throw new IllegalStateException("ExpGolomb: _fillCurrentWord() but no bytes available");var t=Math.min(4,e),n=new Uint8Array(4);n.set(this._buffer.subarray(this._buffer_index,this._buffer_index+t)),this._current_word=new DataView(n.buffer).getUint32(0,!1),this._buffer_index+=t,this._current_word_bits_left=8*t}},{key:"readBits",value:function(e){if(e>32)throw new InvalidArgumentException("ExpGolomb: readBits() bits exceeded max 32bits!");if(e<=this._current_word_bits_left){var t=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,t}var n=this._current_word_bits_left?this._current_word:0;n>>>=32-this._current_word_bits_left;var r=e-this._current_word_bits_left;this._fillCurrentWord();var i=Math.min(r,this._current_word_bits_left),o=this._current_word>>>32-i;return this._current_word<<=i,this._current_word_bits_left-=i,n=n<<i|o}},{key:"readBool",value:function(){return 1===this.readBits(1)}},{key:"readByte",value:function(){return this.readBits(8)}},{key:"_skipLeadingZero",value:function(){var e=void 0;for(e=0;e<this._current_word_bits_left;e++)if(0!=(this._current_word&2147483648>>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()}},{key:"readUEG",value:function(){var e=this._skipLeadingZero();return this.readBits(e+1)-1}},{key:"readSEG",value:function(){var e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)}}]),e}();t.default=o},function(e,t,n){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(){r(this,e),this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}return i(e,[{key:"isComplete",value:function(){var e=!1===this.hasAudio||!0===this.hasAudio&&null!=this.audioCodec&&null!=this.audioSampleRate&&null!=this.audioChannelCount,t=!1===this.hasVideo||!0===this.hasVideo&&null!=this.videoCodec&&null!=this.width&&null!=this.height&&null!=this.fps&&null!=this.profile&&null!=this.level&&null!=this.chromaFormat&&null!=this.sarNum&&null!=this.sarDen;return null!=this.mimeType&&null!=this.duration&&null!=this.metadata&&null!=this.hasKeyframesIndex&&e&&t}},{key:"isSeekable",value:function(){return!0===this.hasKeyframesIndex}}]),e}();t.default=o},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=r(n(27)),s=r(n(28)),u=r(n(8)),l=n(29),c=function(){function e(t){i(this,e),this.TAG="MP4Remuxer",this._config=t,this._isLive=!0===t.isLive,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new l.MediaSegmentInfoList("audio"),this._videoSegmentInfoList=new l.MediaSegmentInfoList("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!(!s.default.chrome||!(s.default.version.major<50||50===s.default.version.major&&s.default.version.build<2661)),this._fillSilentAfterSeek=s.default.msedge||s.default.msie,this._mp3UseMpegAudio=!s.default.firefox}return o(e,[{key:"destroy",value:function(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null}},{key:"bindDataSource",value:function(e){return e.onDataAvailable=this.remux.bind(this),e.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}},{key:"insertDiscontinuity",value:function(){this._audioNextDts=this._videoNextDts=void 0}},{key:"seek",value:function(e){this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}},{key:"remux",value:function(e,t){if(!this._onMediaSegment)throw new IllegalStateException("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(e,t),this._remuxVideo(t),this._remuxAudio(e)}},{key:"_onTrackMetadataReceived",value:function(e,t){var n=null,r="mp4",i=t.codec;if("audio"===e)this._audioMeta=t,"mp3"===t.codec&&this._mp3UseMpegAudio?(r="mpeg",i="",n=new Uint8Array):n=u.default.generateInitSegment(t);else{if("video"!==e)return;this._videoMeta=t,n=u.default.generateInitSegment(t)}if(!this._onInitSegment)throw new IllegalStateException("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(e,{type:e,data:n.buffer,codec:i,container:e+"/"+r,mediaDuration:t.duration})}},{key:"_calculateDtsBase",value:function(e,t){this._dtsBaseInited||(e.samples&&e.samples.length&&(this._audioDtsBase=e.samples[0].dts),t.samples&&t.samples.length&&(this._videoDtsBase=t.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)}},{key:"_remuxAudio",value:function(e){if(null!=this._audioMeta){var t=e,n=t.samples,r=void 0,i=-1,o=-1,s=this._audioMeta.refSampleDuration,c="mp3"===this._audioMeta.codec&&this._mp3UseMpegAudio,f=this._dtsBaseInited&&void 0===this._audioNextDts,d=!1;if(n&&0!==n.length){var h=0,p=null,v=0;c?(h=0,v=t.length):(h=8,v=8+t.length);var m=n[0].dts-this._dtsBase;if(this._audioNextDts)r=m-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())r=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&"mp3"!==this._audioMeta.originalCodec&&(d=!0);else{var g=this._audioSegmentInfoList.getLastSampleBefore(m);if(null!=g){var y=m-(g.originalDts+g.duration);y<=3&&(y=0),r=m-(g.dts+g.duration+y)}else r=0}if(d){var b=m-r,w=this._videoSegmentInfoList.getLastSegmentBefore(m);if(null!=w&&w.beginDts<b){var _=a.default.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(_){var E=w.beginDts,S=b-w.beginDts;Log.v(this.TAG,"InsertPrefixSilentAudio: dts: "+E+", duration: "+S),n.unshift({unit:_,dts:E,pts:E}),v+=_.byteLength}}else d=!1}for(var k=[],T=0;T<n.length;T++){var A=n[T],M=A.unit,x=A.dts-this._dtsBase,L=x-r;-1===i&&(i=L);var O=0,D=!1,I=null;if((O=T!==n.length-1?n[T+1].dts-this._dtsBase-r-L:k.length>=1?k[k.length-1].duration:Math.floor(s))>1.5*s&&"mp3"!==this._audioMeta.codec){D=!0;var R=Math.abs(O-s),N=Math.ceil(R/s),C=L+s,P=a.default.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);null==P&&(P=M),I=[];for(var j=0;j<N;j++){var F=Math.round(C);if(I.length>0){var B=I[I.length-1];B.duration=F-B.dts}var z={dts:F,pts:F,cts:0,unit:P,size:P.byteLength,duration:0,originalDts:x,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};I.push(z),v+=M.byteLength,C+=s}var U=I[I.length-1];U.duration=L+O-U.dts,O=Math.round(s)}k.push({dts:L,pts:L,cts:0,unit:A.unit,size:A.unit.byteLength,duration:O,originalDts:x,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),D&&k.push.apply(k,I)}c?p=new Uint8Array(v):((p=new Uint8Array(v))[0]=v>>>24&255,p[1]=v>>>16&255,p[2]=v>>>8&255,p[3]=255&v,p.set(u.default.types.mdat,4));for(var G=0;G<k.length;G++){var W=k[G].unit;p.set(W,h),h+=W.byteLength}var H=k[k.length-1];o=H.dts+H.duration,this._audioNextDts=o;var V=new l.MediaSegmentInfo;V.beginDts=i,V.endDts=o,V.beginPts=i,V.endPts=o,V.originalBeginDts=k[0].originalDts,V.originalEndDts=H.originalDts+H.duration,V.firstSample=new l.SampleInfo(k[0].dts,k[0].pts,k[0].duration,k[0].originalDts,!1),V.lastSample=new l.SampleInfo(H.dts,H.pts,H.duration,H.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(V),t.samples=k,t.sequenceNumber++;var Z=null;Z=c?new Uint8Array:u.default.moof(t,i),t.samples=[],t.length=0;var Y={type:"audio",data:this._mergeBoxes(Z,p).buffer,sampleCount:k.length,info:V};c&&f&&(Y.timestampOffset=i),this._onMediaSegment("audio",Y)}}}},{key:"_remuxVideo",value:function(e){if(null!=this._videoMeta){var t=e,n=t.samples,r=void 0,i=-1,o=-1,a=-1,s=-1;if(n&&0!==n.length){var c=8,f=8+e.length,d=new Uint8Array(f);d[0]=f>>>24&255,d[1]=f>>>16&255,d[2]=f>>>8&255,d[3]=255&f,d.set(u.default.types.mdat,4);var h=n[0].dts-this._dtsBase;if(this._videoNextDts)r=h-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())r=0;else{var p=this._videoSegmentInfoList.getLastSampleBefore(h);if(null!=p){var v=h-(p.originalDts+p.duration);v<=3&&(v=0),r=h-(p.dts+p.duration+v)}else r=0}for(var m=new l.MediaSegmentInfo,g=[],y=0;y<n.length;y++){var b=n[y],w=b.dts-this._dtsBase,_=b.isKeyframe,E=w-r,S=b.cts,k=E+S;-1===i&&(i=E,a=k);var T=0;if(T=y!==n.length-1?n[y+1].dts-this._dtsBase-r-E:g.length>=1?g[g.length-1].duration:Math.floor(this._videoMeta.refSampleDuration),_){var A=new l.SampleInfo(E,k,T,b.dts,!0);A.fileposition=b.fileposition,m.appendSyncPoint(A)}g.push({dts:E,pts:k,cts:S,units:b.units,size:b.length,isKeyframe:_,duration:T,originalDts:w,flags:{isLeading:0,dependsOn:_?2:1,isDependedOn:_?1:0,hasRedundancy:0,isNonSync:_?0:1}})}for(var M=0;M<g.length;M++)for(var x=g[M].units;x.length;){var L=x.shift().data;d.set(L,c),c+=L.byteLength}var O=g[g.length-1];if(o=O.dts+O.duration,s=O.pts+O.duration,this._videoNextDts=o,m.beginDts=i,m.endDts=o,m.beginPts=a,m.endPts=s,m.originalBeginDts=g[0].originalDts,m.originalEndDts=O.originalDts+O.duration,m.firstSample=new l.SampleInfo(g[0].dts,g[0].pts,g[0].duration,g[0].originalDts,g[0].isKeyframe),m.lastSample=new l.SampleInfo(O.dts,O.pts,O.duration,O.originalDts,O.isKeyframe),this._isLive||this._videoSegmentInfoList.append(m),t.samples=g,t.sequenceNumber++,this._forceFirstIDR){var D=g[0].flags;D.dependsOn=2,D.isNonSync=0}var I=u.default.moof(t,i);t.samples=[],t.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(I,d).buffer,sampleCount:g.length,info:m})}}}},{key:"_mergeBoxes",value:function(e,t){var n=new Uint8Array(e.byteLength+t.byteLength);return n.set(e,0),n.set(t,e.byteLength),n}},{key:"onInitSegment",get:function(){return this._onInitSegment},set:function(e){this._onInitSegment=e}},{key:"onMediaSegment",get:function(){return this._onMediaSegment},set:function(e){this._onMediaSegment=e}}]),e}();t.default=c},function(e,t,n){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(){r(this,e)}return i(e,null,[{key:"getSilentFrame",value:function(e){return 1===e?new Uint8Array([0,200,0,128,35,128]):2===e?new Uint8Array([33,0,73,144,2,25,0,35,128]):3===e?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]):4===e?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]):5===e?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]):6===e?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]):null}}]),e}();t.default=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r={};!function(){var e=self.navigator.userAgent.toLowerCase(),t=/(edge)\/([\w.]+)/.exec(e)||/(opr)[\/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(iemobile)[\/]([\w.]+)/.exec(e)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[],n=/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(android)/.exec(e)||/(windows)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||[],i={browser:t[5]||t[3]||t[1]||"",version:t[2]||t[4]||"0",majorVersion:t[4]||t[2]||"0",platform:n[0]||""},o={};if(i.browser){o[i.browser]=!0;var a=i.majorVersion.split(".");o.version={major:parseInt(i.majorVersion,10),string:i.version},a.length>1&&(o.version.minor=parseInt(a[1],10)),a.length>2&&(o.version.build=parseInt(a[2],10))}i.platform&&(o[i.platform]=!0),(o.chrome||o.opr||o.safari)&&(o.webkit=!0),(o.rv||o.iemobile)&&(o.rv&&delete o.rv,i.browser="msie",o.msie=!0);o.edge&&(delete o.edge,i.browser="msedge",o.msedge=!0);o.opr&&(i.browser="opera",o.opera=!0);o.safari&&o.android&&(i.browser="android",o.android=!0);o.name=i.browser,o.platform=i.platform;for(var s in r)r.hasOwnProperty(s)&&delete r[s];Object.assign(r,o)}(),t.default=r},function(e,t,n){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.SampleInfo=function e(t,n,i,o,a){r(this,e),this.dts=t,this.pts=n,this.duration=i,this.originalDts=o,this.isSyncPoint=a,this.fileposition=null},t.MediaSegmentInfo=function(){function e(){r(this,e),this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}return i(e,[{key:"appendSyncPoint",value:function(e){e.isSyncPoint=!0,this.syncPoints.push(e)}}]),e}(),t.IDRSampleList=function(){function e(){r(this,e),this._list=[]}return i(e,[{key:"clear",value:function(){this._list=[]}},{key:"appendArray",value:function(e){var t=this._list;0!==e.length&&(t.length>0&&e[0].originalDts<t[t.length-1].originalDts&&this.clear(),Array.prototype.push.apply(t,e))}},{key:"getLastSyncPointBeforeDts",value:function(e){if(0==this._list.length)return null;var t=this._list,n=0,r=t.length-1,i=0,o=0,a=r;for(e<t[0].dts&&(n=0,o=a+1);o<=a;){if((i=o+Math.floor((a-o)/2))===r||e>=t[i].dts&&e<t[i+1].dts){n=i;break}t[i].dts<e?o=i+1:a=i-1}return this._list[n]}}]),e}(),t.MediaSegmentInfoList=function(){function e(t){r(this,e),this._type=t,this._list=[],this._lastAppendLocation=-1}return i(e,[{key:"isEmpty",value:function(){return 0===this._list.length}},{key:"clear",value:function(){this._list=[],this._lastAppendLocation=-1}},{key:"_searchNearestSegmentBefore",value:function(e){var t=this._list;if(0===t.length)return-2;var n=t.length-1,r=0,i=0,o=n,a=0;if(e<t[0].originalBeginDts)return a=-1;for(;i<=o;){if((r=i+Math.floor((o-i)/2))===n||e>t[r].lastSample.originalDts&&e<t[r+1].originalBeginDts){a=r;break}t[r].originalBeginDts<e?i=r+1:o=r-1}return a}},{key:"_searchNearestSegmentAfter",value:function(e){return this._searchNearestSegmentBefore(e)+1}},{key:"append",value:function(e){var t=this._list,n=e,r=this._lastAppendLocation,i=0;-1!==r&&r<t.length&&n.originalBeginDts>=t[r].lastSample.originalDts&&(r===t.length-1||r<t.length-1&&n.originalBeginDts<t[r+1].originalBeginDts)?i=r+1:t.length>0&&(i=this._searchNearestSegmentBefore(n.originalBeginDts)+1),this._lastAppendLocation=i,this._list.splice(i,0,n)}},{key:"getLastSegmentBefore",value:function(e){var t=this._searchNearestSegmentBefore(e);return t>=0?this._list[t]:null}},{key:"getLastSampleBefore",value:function(e){var t=this.getLastSegmentBefore(e);return null!=t?t.lastSample:null}},{key:"getLastSyncPointBefore",value:function(e){for(var t=this._searchNearestSegmentBefore(e),n=this._list[t].syncPoints;0===n.length&&t>0;)t--,n=this._list[t].syncPoints;return n.length>0?n[n.length-1]:null}},{key:"type",get:function(){return this._type}},{key:"length",get:function(){return this._list.length}}]),e}()},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(){(d=new i.default).onInitSegment=n,d.onMediaSegment=r,d.onError=a,d.onMediaInfo=s,d.on("error",function(e){self.postMessage({cmd:"error",source:e.data})})}function n(e,t){self.postMessage({cmd:"mediaSegmentInit",source:{type:"video",data:e}}),t&&self.postMessage({cmd:"mediaSegmentInit",source:{type:"audio",data:t}})}function r(e,t){self.postMessage({cmd:"mediaSegment",source:{type:e,data:t}})}function a(e){self.postMessage({cmd:"error",source:e})}function s(e){self.postMessage({cmd:"mediainfo",source:e})}function u(e){h.pause(),(h=new o.default(p)).arrivalDataCallback=f,h.seek(e.keyframePoint,!1,e.keyframetime)}function l(){h.pause(),(h=new o.default(p)).arrivalDataCallback=f,h.open()}function c(){h.destroy(),h=null,d=null}function f(e,n,r){return d||t(),r&&d.seek(r),d.setflv(e)}var d=null,h=null,p={};e.addEventListener("message",function(e){switch(e.data.cmd){case"init":p=e.data.data;break;case"loadSource":(h=new o.default(p)).arrivalDataCallback=f,h.open();break;case"pause":h.pause();break;case"seek":u(e.data.keyframe);break;case"resume":h.resume();break;case"refresh":l();break;case"destroy":c()}})};var i=r(n(5)),o=r(n(4))},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default={isLive:!1,box:"flv",seekInKeyframe:!0,alwaysSeekKeyframe:!0,lazyLoadMaxDuration:120,lazyLoadRecoverDuration:30,lockInternalProperty:!1,debug:!0,webWorker:!1,autoCleanupSourceBuffer:!0,autoCleanupMaxBackwardDuration:30,autoCleanupMinBackwardDuration:30}}]).default})}));!function(e,t){if("undefined"==typeof document)return t;e=e||"";var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}(".chimee-container container{position:relative;display:block;width:100%;height:100%}.chimee-container video{display:block;width:100%;height:100%;background:#000;outline:0}.chimee-container video:focus{outline:0}.chimee-container chimee-center-state-loading{box-sizing:initial}",void 0),hd.install(nm),hd.install(Dm),hd.install(zm),hd.install(Jm);var eg=function(e){function t(e){if(Xr(this,t),!w(e))throw new TypeError("You must pass an Object as config when you new ChimeePlayer");e.plugin=e.plugin||e.plugins,y(e.plugin)||(e.plugin=[]);var n=[nm.name,Dm.name,zm.name,Jm.name],r=e.plugin.map(function(e){return w(e)?e.name:e});n.forEach(function(t){r.indexOf(t)>-1||e.plugin.push(t)}),w(e.preset)||(e.preset={hls:Xm,flv:qm});var i=Vo(this,(t.__proto__||Qr(t)).call(this,e));return i.on("play",function(){return i.chimeeContextmenu.updatemenu([{text:"暂停",action:"pause"}])}),i.on("pause",function(){return i.chimeeContextmenu.updatemenu([{text:"播放",action:"play"}])}),i}return ea(t,hd),t}();return eg.popupFactory=Om,eg});
  