biliob/Web/js/chimee.browser.min.js
2024-11-08 18:12:02 +08:00

8 lines
158 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* Minified by jsDelivr using Terser v3.14.1.
* Original file: /npm/chimee@0.12.0/lib/index.browser.js
*
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Chimee=t()}(this,function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e,t){return e(t={exports:{}},t.exports),t.exports}var r=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)}),i=n(function(e){var t=e.exports={version:"2.6.11"};"number"==typeof __e&&(__e=t)}),o=(i.version,function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}),a=function(e,t,n){if(o(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)}},u=function(e){return"object"==typeof e?null!==e:"function"==typeof e},s=function(e){if(!u(e))throw TypeError(e+" is not an object!");return e},c=function(e){try{return!!e()}catch(e){return!0}},l=!c(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),f=r.document,d=u(f)&&u(f.createElement),h=function(e){return d?f.createElement(e):{}},p=!l&&!c(function(){return 7!=Object.defineProperty(h("div"),"a",{get:function(){return 7}}).a}),v=function(e,t){if(!u(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!u(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!u(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!u(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},y=Object.defineProperty,g={f:l?Object.defineProperty:function(e,t,n){if(s(e),t=v(t,!0),s(n),p)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}},m=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},w=l?function(e,t,n){return g.f(e,t,m(1,n))}:function(e,t,n){return e[t]=n,e},b={}.hasOwnProperty,_=function(e,t){return b.call(e,t)},E=function(e,t,n){var o,u,s,c=e&E.F,l=e&E.G,f=e&E.S,d=e&E.P,h=e&E.B,p=e&E.W,v=l?i:i[t]||(i[t]={}),y=v.prototype,g=l?r:f?r[t]:(r[t]||{}).prototype;for(o in l&&(n=t),n)(u=!c&&g&&void 0!==g[o])&&_(v,o)||(s=u?g[o]:n[o],v[o]=l&&"function"!=typeof g[o]?n[o]:h&&u?a(s,r):p&&g[o]==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?a(Function.call,s):s,d&&((v.virtual||(v.virtual={}))[o]=s,e&E.R&&y&&!y[o]&&w(y,o,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 k=E;k(k.S+k.F*!l,"Object",{defineProperty:g.f});var x=i.Object,O=function(e,t,n){return x.defineProperty(e,t,n)},S=n(function(e){e.exports={default:O,__esModule:!0}}),P=t(S),T={}.toString,A=function(e){return T.call(e).slice(8,-1)},j=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==A(e)?e.split(""):Object(e)},L=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},M=function(e){return j(L(e))},C={f:{}.propertyIsEnumerable},N=Object.getOwnPropertyDescriptor,z={f:l?N:function(e,t){if(e=M(e),t=v(t,!0),p)try{return N(e,t)}catch(e){}if(_(e,t))return m(!C.f.call(e,t),e[t])}},F=function(e,t){var n=(i.Object||{})[e]||Object[e],r={};r[e]=t(n),k(k.S+k.F*c(function(){n(1)}),"Object",r)},I=z.f;F("getOwnPropertyDescriptor",function(){return function(e,t){return I(M(e),t)}});var R=i.Object,$=function(e,t){return R.getOwnPropertyDescriptor(e,t)},V=n(function(e){e.exports={default:$,__esModule:!0}}),D=t(V),K=function(e){return Object(L(e))},B=n(function(e){var t=r["__core-js_shared__"]||(r["__core-js_shared__"]={});(e.exports=function(e,n){return t[e]||(t[e]=void 0!==n?n:{})})("versions",[]).push({version:i.version,mode:"pure",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}),W=0,G=Math.random(),q=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++W+G).toString(36))},H=B("keys"),U=function(e){return H[e]||(H[e]=q(e))},Y=U("IE_PROTO"),Q=Object.prototype,Z=Object.getPrototypeOf||function(e){return e=K(e),_(e,Y)?e[Y]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?Q:null};F("getPrototypeOf",function(){return function(e){return Z(K(e))}});var J,X=i.Object.getPrototypeOf,ee=n(function(e){e.exports={default:X,__esModule:!0}}),te=t(ee),ne=Math.ceil,re=Math.floor,ie=function(e){return isNaN(e=+e)?0:(e>0?re:ne)(e)},oe=w,ae={},ue=Math.min,se=function(e){return e>0?ue(ie(e),9007199254740991):0},ce=Math.max,le=Math.min,fe=(J=!1,function(e,t,n){var r,i=M(e),o=se(i.length),a=function(e,t){return(e=ie(e))<0?ce(e+t,0):le(e,t)}(n,o);if(J&&t!=t){for(;o>a;)if((r=i[a++])!=r)return!0}else for(;o>a;a++)if((J||a in i)&&i[a]===t)return J||a||0;return!J&&-1}),de=U("IE_PROTO"),he=function(e,t){var n,r=M(e),i=0,o=[];for(n in r)n!=de&&_(r,n)&&o.push(n);for(;t.length>i;)_(r,n=t[i++])&&(~fe(o,n)||o.push(n));return o},pe="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),ve=Object.keys||function(e){return he(e,pe)},ye=l?Object.defineProperties:function(e,t){s(e);for(var n,r=ve(t),i=r.length,o=0;i>o;)g.f(e,n=r[o++],t[n]);return e},ge=r.document,me=ge&&ge.documentElement,we=U("IE_PROTO"),be=function(){},_e=function(){var e,t=h("iframe"),n=pe.length;for(t.style.display="none",me.appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),_e=e.F;n--;)delete _e.prototype[pe[n]];return _e()},Ee=Object.create||function(e,t){var n;return null!==e?(be.prototype=s(e),n=new be,be.prototype=null,n[we]=e):n=_e(),void 0===t?n:ye(n,t)},ke=n(function(e){var t=B("wks"),n=r.Symbol,i="function"==typeof n;(e.exports=function(e){return t[e]||(t[e]=i&&n[e]||(i?n:q)("Symbol."+e))}).store=t}),xe=g.f,Oe=ke("toStringTag"),Se=function(e,t,n){e&&!_(e=n?e:e.prototype,Oe)&&xe(e,Oe,{configurable:!0,value:t})},Pe={};w(Pe,ke("iterator"),function(){return this});var Te,Ae=function(e,t,n){e.prototype=Ee(Pe,{next:m(1,n)}),Se(e,t+" Iterator")},je=ke("iterator"),Le=!([].keys&&"next"in[].keys()),Me=function(){return this},Ce=function(e,t,n,r,i,o,a){Ae(n,t,r);var u,s,c,l=function(e){if(!Le&&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[je]||p["@@iterator"]||i&&p[i],y=v||l(i),g=i?d?l("entries"):y:void 0,m="Array"==t&&p.entries||v;if(m&&(c=Z(m.call(new e)))!==Object.prototype&&c.next&&Se(c,f,!0),d&&v&&"values"!==v.name&&(h=!0,y=function(){return v.call(this)}),a&&(Le||h||!p[je])&&w(p,je,y),ae[t]=y,ae[f]=Me,i)if(u={values:d?y:l("values"),keys:o?y:l("keys"),entries:g},a)for(s in u)s in p||oe(p,s,u[s]);else k(k.P+k.F*(Le||h),t,u);return u},Ne=(Te=!0,function(e,t){var n,r,i=String(L(e)),o=ie(t),a=i.length;return o<0||o>=a?Te?"":void 0:(n=i.charCodeAt(o))<55296||n>56319||o+1===a||(r=i.charCodeAt(o+1))<56320||r>57343?Te?i.charAt(o):n:Te?i.slice(o,o+2):r-56320+(n-55296<<10)+65536});Ce(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=Ne(t,n),this._i+=e.length,{value:e,done:!1})});var ze=function(e,t){return{value:t,done:!!e}};Ce(Array,"Array",function(e,t){this._t=M(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,ze(1)):ze(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values");ae.Arguments=ae.Array;for(var Fe=ke("toStringTag"),Ie="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(","),Re=0;Re<Ie.length;Re++){var $e=Ie[Re],Ve=r[$e],De=Ve&&Ve.prototype;De&&!De[Fe]&&w(De,Fe,$e),ae[$e]=ae.Array}var Ke={f:ke},Be=Ke.f("iterator"),We=n(function(e){e.exports={default:Be,__esModule:!0}});t(We);var Ge=n(function(e){var t=q("meta"),n=g.f,r=0,i=Object.isExtensible||function(){return!0},o=!c(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(!u(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!_(e,t)){if(!i(e))return"F";if(!n)return"E";a(e)}return e[t].i},getWeak:function(e,n){if(!_(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)&&!_(e,t)&&a(e),e}}}),qe=(Ge.KEY,Ge.NEED,Ge.fastKey,Ge.getWeak,Ge.onFreeze,g.f),He=function(e){var t=i.Symbol||(i.Symbol={});"_"==e.charAt(0)||e in t||qe(t,e,{value:Ke.f(e)})},Ue={f:Object.getOwnPropertySymbols},Ye=Array.isArray||function(e){return"Array"==A(e)},Qe=pe.concat("length","prototype"),Ze={f:Object.getOwnPropertyNames||function(e){return he(e,Qe)}},Je=Ze.f,Xe={}.toString,et="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],tt={f:function(e){return et&&"[object Window]"==Xe.call(e)?function(e){try{return Je(e)}catch(e){return et.slice()}}(e):Je(M(e))}},nt=Ge.KEY,rt=z.f,it=g.f,ot=tt.f,at=r.Symbol,ut=r.JSON,st=ut&&ut.stringify,ct=ke("_hidden"),lt=ke("toPrimitive"),ft={}.propertyIsEnumerable,dt=B("symbol-registry"),ht=B("symbols"),pt=B("op-symbols"),vt=Object.prototype,yt="function"==typeof at&&!!Ue.f,gt=r.QObject,mt=!gt||!gt.prototype||!gt.prototype.findChild,wt=l&&c(function(){return 7!=Ee(it({},"a",{get:function(){return it(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=rt(vt,t);r&&delete vt[t],it(e,t,n),r&&e!==vt&&it(vt,t,r)}:it,bt=function(e){var t=ht[e]=Ee(at.prototype);return t._k=e,t},_t=yt&&"symbol"==typeof at.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof at},Et=function(e,t,n){return e===vt&&Et(pt,t,n),s(e),t=v(t,!0),s(n),_(ht,t)?(n.enumerable?(_(e,ct)&&e[ct][t]&&(e[ct][t]=!1),n=Ee(n,{enumerable:m(0,!1)})):(_(e,ct)||it(e,ct,m(1,{})),e[ct][t]=!0),wt(e,t,n)):it(e,t,n)},kt=function(e,t){s(e);for(var n,r=function(e){var t=ve(e),n=Ue.f;if(n)for(var r,i=n(e),o=C.f,a=0;i.length>a;)o.call(e,r=i[a++])&&t.push(r);return t}(t=M(t)),i=0,o=r.length;o>i;)Et(e,n=r[i++],t[n]);return e},xt=function(e){var t=ft.call(this,e=v(e,!0));return!(this===vt&&_(ht,e)&&!_(pt,e))&&(!(t||!_(this,e)||!_(ht,e)||_(this,ct)&&this[ct][e])||t)},Ot=function(e,t){if(e=M(e),t=v(t,!0),e!==vt||!_(ht,t)||_(pt,t)){var n=rt(e,t);return!n||!_(ht,t)||_(e,ct)&&e[ct][t]||(n.enumerable=!0),n}},St=function(e){for(var t,n=ot(M(e)),r=[],i=0;n.length>i;)_(ht,t=n[i++])||t==ct||t==nt||r.push(t);return r},Pt=function(e){for(var t,n=e===vt,r=ot(n?pt:M(e)),i=[],o=0;r.length>o;)!_(ht,t=r[o++])||n&&!_(vt,t)||i.push(ht[t]);return i};yt||(oe((at=function(){if(this instanceof at)throw TypeError("Symbol is not a constructor!");var e=q(arguments.length>0?arguments[0]:void 0),t=function(n){this===vt&&t.call(pt,n),_(this,ct)&&_(this[ct],e)&&(this[ct][e]=!1),wt(this,e,m(1,n))};return l&&mt&&wt(vt,e,{configurable:!0,set:t}),bt(e)}).prototype,"toString",function(){return this._k}),z.f=Ot,g.f=Et,Ze.f=tt.f=St,C.f=xt,Ue.f=Pt,Ke.f=function(e){return bt(ke(e))}),k(k.G+k.W+k.F*!yt,{Symbol:at});for(var Tt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),At=0;Tt.length>At;)ke(Tt[At++]);for(var jt=ve(ke.store),Lt=0;jt.length>Lt;)He(jt[Lt++]);k(k.S+k.F*!yt,"Symbol",{for:function(e){return _(dt,e+="")?dt[e]:dt[e]=at(e)},keyFor:function(e){if(!_t(e))throw TypeError(e+" is not a symbol!");for(var t in dt)if(dt[t]===e)return t},useSetter:function(){mt=!0},useSimple:function(){mt=!1}}),k(k.S+k.F*!yt,"Object",{create:function(e,t){return void 0===t?Ee(e):kt(Ee(e),t)},defineProperty:Et,defineProperties:kt,getOwnPropertyDescriptor:Ot,getOwnPropertyNames:St,getOwnPropertySymbols:Pt});var Mt=c(function(){Ue.f(1)});k(k.S+k.F*Mt,"Object",{getOwnPropertySymbols:function(e){return Ue.f(K(e))}}),ut&&k(k.S+k.F*(!yt||c(function(){var e=at();return"[null]"!=st([e])||"{}"!=st({a:e})||"{}"!=st(Object(e))})),"JSON",{stringify:function(e){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=t=r[1],(u(t)||void 0!==e)&&!_t(e))return Ye(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!_t(t))return t}),r[1]=t,st.apply(ut,r)}}),at.prototype[lt]||w(at.prototype,lt,at.prototype.valueOf),Se(at,"Symbol"),Se(Math,"Math",!0),Se(r.JSON,"JSON",!0),He("asyncIterator"),He("observable");var Ct=i.Symbol,Nt=n(function(e){e.exports={default:Ct,__esModule:!0}});t(Nt);var zt=n(function(e,t){t.__esModule=!0;var n=o(We),r=o(Nt),i="function"==typeof r.default&&"symbol"==typeof n.default?function(e){return typeof e}:function(e){return e&&"function"==typeof r.default&&e.constructor===r.default&&e!==r.default.prototype?"symbol":typeof e};function o(e){return e&&e.__esModule?e:{default:e}}t.default="function"==typeof r.default&&"symbol"===i(n.default)?function(e){return void 0===e?"undefined":i(e)}:function(e){return e&&"function"==typeof r.default&&e.constructor===r.default&&e!==r.default.prototype?"symbol":void 0===e?"undefined":i(e)}}),Ft=t(zt),It=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")}})),Rt=t(n(function(e,t){t.__esModule=!0;var n,r=(n=zt)&&n.__esModule?n:{default:n};t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,r.default)(t))&&"function"!=typeof t?e:t}})),$t=t(n(function(e,t){t.__esModule=!0;var n=i(ee),r=i(V);function i(e){return e&&e.__esModule?e:{default:e}}t.default=function e(t,i,o){null===t&&(t=Function.prototype);var a=(0,r.default)(t,i);if(void 0===a){var u=(0,n.default)(t);return null===u?void 0:e(u,i,o)}if("value"in a)return a.value;var s=a.get;return void 0!==s?s.call(o):void 0}})),Vt=t(n(function(e,t){t.__esModule=!0;var n,r=(n=S)&&n.__esModule?n:{default:n};t.default=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),(0,r.default)(e,i.key,i)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()})),Dt=function(e,t){if(s(e),!u(t)&&null!==t)throw TypeError(t+": can't set as prototype!")},Kt={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,n){try{(n=a(Function.call,z.f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,r){return Dt(e,r),t?e.__proto__=r:n(e,r),e}}({},!1):void 0),check:Dt};k(k.S,"Object",{setPrototypeOf:Kt.set});var Bt=i.Object.setPrototypeOf,Wt=n(function(e){e.exports={default:Bt,__esModule:!0}});t(Wt),k(k.S,"Object",{create:Ee});var Gt=i.Object,qt=function(e,t){return Gt.create(e,t)},Ht=n(function(e){e.exports={default:qt,__esModule:!0}}),Ut=t(Ht),Yt=t(n(function(e,t){t.__esModule=!0;var n=o(Wt),r=o(Ht),i=o(zt);function o(e){return e&&e.__esModule?e:{default:e}}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,i.default)(t)));e.prototype=(0,r.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(n.default?(0,n.default)(e,t):e.__proto__=t)}})),Qt=ke("toStringTag"),Zt="Arguments"==A(function(){return arguments}()),Jt=function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),Qt))?n:Zt?A(t):"Object"==(r=A(t))&&"function"==typeof t.callee?"Arguments":r},Xt=ke("iterator"),en=i.isIterable=function(e){var t=Object(e);return void 0!==t[Xt]||"@@iterator"in t||ae.hasOwnProperty(Jt(t))},tn=n(function(e){e.exports={default:en,__esModule:!0}});t(tn);var nn,rn=ke("iterator"),on=i.getIteratorMethod=function(e){if(null!=e)return e[rn]||e["@@iterator"]||ae[Jt(e)]},an=i.getIterator=function(e){var t=on(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return s(t.call(e))},un=n(function(e){e.exports={default:an,__esModule:!0}}),sn=t(un),cn=t(n(function(e,t){t.__esModule=!0;var n=i(tn),r=i(un);function i(e){return e&&e.__esModule?e:{default:e}}t.default=function(){return function(e,t){if(Array.isArray(e))return e;if((0,n.default)(Object(e)))return function(e,t){var n=[],i=!0,o=!1,a=void 0;try{for(var u,s=(0,r.default)(e);!(i=(u=s.next()).done)&&(n.push(u.value),!t||n.length!==t);i=!0);}catch(e){o=!0,a=e}finally{try{!i&&s.return&&s.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()})),ln=C.f,fn=(nn=!0,function(e){for(var t,n=M(e),r=ve(n),i=r.length,o=0,a=[];i>o;)t=r[o++],l&&!ln.call(n,t)||a.push(nn?[t,n[t]]:n[t]);return a});k(k.S,"Object",{entries:function(e){return fn(e)}});var dn=i.Object.entries,hn=t(n(function(e){e.exports={default:dn,__esModule:!0}}));F("keys",function(){return function(e){return ve(K(e))}});var pn=i.Object.keys,vn=t(n(function(e){e.exports={default:pn,__esModule:!0}})),yn=n(function(e){!function(t){var n,r=Object.prototype,i=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag",c=t.regeneratorRuntime;if(c)e.exports=c;else{(c=t.regeneratorRuntime=e.exports).wrap=w;var l="suspendedStart",f="suspendedYield",d="executing",h="completed",p={},v={};v[a]=function(){return this};var y=Object.getPrototypeOf,g=y&&y(y(j([])));g&&g!==r&&i.call(g,a)&&(v=g);var m=k.prototype=_.prototype=Object.create(v);E.prototype=m.constructor=k,k.constructor=E,k[s]=E.displayName="GeneratorFunction",c.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===E||"GeneratorFunction"===(t.displayName||t.name))},c.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,k):(e.__proto__=k,s in e||(e[s]="GeneratorFunction")),e.prototype=Object.create(m),e},c.awrap=function(e){return{__await:e}},x(O.prototype),O.prototype[u]=function(){return this},c.AsyncIterator=O,c.async=function(e,t,n,r){var i=new O(w(e,t,n,r));return c.isGeneratorFunction(t)?i:i.next().then(function(e){return e.done?e.value:i.next()})},x(m),m[s]="Generator",m[a]=function(){return this},m.toString=function(){return"[object Generator]"},c.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},c.values=j,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(T),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=n)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,i){return u.type="throw",u.arg=e,t.next=r,i&&(t.method="next",t.arg=n),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=n),p}}}function w(e,t,n,r){var i=t&&t.prototype instanceof _?t:_,o=Object.create(i.prototype),a=new A(r||[]);return o._invoke=function(e,t,n){var r=l;return function(i,o){if(r===d)throw new Error("Generator is already running");if(r===h){if("throw"===i)throw o;return L()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var u=S(a,n);if(u){if(u===p)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var s=b(e,t,n);if("normal"===s.type){if(r=n.done?h:f,s.arg===p)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=h,n.method="throw",n.arg=s.arg)}}}(e,n,a),o}function b(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function _(){}function E(){}function k(){}function x(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function O(e){var t;this._invoke=function(n,r){function o(){return new Promise(function(t,o){!function t(n,r,o,a){var u=b(e[n],e,r);if("throw"!==u.type){var s=u.arg,c=s.value;return c&&"object"==typeof c&&i.call(c,"__await")?Promise.resolve(c.__await).then(function(e){t("next",e,o,a)},function(e){t("throw",e,o,a)}):Promise.resolve(c).then(function(e){s.value=e,o(s)},a)}a(u.arg)}(n,r,t,o)})}return t=t?t.then(o,o):o()}}function S(e,t){var r=e.iterator[t.method];if(r===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=n,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var i=b(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,p;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=n),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function j(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(i.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=n,t.done=!0,t};return o.next=o}}return{next:L}}function L(){return{value:n,done:!0}}}(function(){return this}()||Function("return this")())}),gn=function(){return this}()||Function("return this")(),mn=gn.regeneratorRuntime&&Object.getOwnPropertyNames(gn).indexOf("regeneratorRuntime")>=0,wn=mn&&gn.regeneratorRuntime;gn.regeneratorRuntime=void 0;var bn=yn;if(mn)gn.regeneratorRuntime=wn;else try{delete gn.regeneratorRuntime}catch(e){gn.regeneratorRuntime=void 0}var _n,En,kn,xn=bn,On=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e},Sn=function(e,t,n,r){try{return r?t(s(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&s(i.call(e)),t}},Pn=ke("iterator"),Tn=Array.prototype,An=function(e){return void 0!==e&&(ae.Array===e||Tn[Pn]===e)},jn=n(function(e){var t={},n={},r=e.exports=function(e,r,i,o,u){var c,l,f,d,h=u?function(){return e}:on(e),p=a(i,o,r?2:1),v=0;if("function"!=typeof h)throw TypeError(e+" is not iterable!");if(An(h)){for(c=se(e.length);c>v;v++)if((d=r?p(s(l=e[v])[0],l[1]):p(e[v]))===t||d===n)return d}else for(f=h.call(e);!(l=f.next()).done;)if((d=Sn(f,p,l.value,r))===t||d===n)return d};r.BREAK=t,r.RETURN=n}),Ln=ke("species"),Mn=function(e,t){var n,r=s(e).constructor;return void 0===r||null==(n=s(r)[Ln])?t:o(n)},Cn=r.process,Nn=r.setImmediate,zn=r.clearImmediate,Fn=r.MessageChannel,In=r.Dispatch,Rn=0,$n={},Vn=function(){var e=+this;if($n.hasOwnProperty(e)){var t=$n[e];delete $n[e],t()}},Dn=function(e){Vn.call(e.data)};Nn&&zn||(Nn=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return $n[++Rn]=function(){!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])}e.apply(n,t)}("function"==typeof e?e:Function(e),t)},_n(Rn),Rn},zn=function(e){delete $n[e]},"process"==A(Cn)?_n=function(e){Cn.nextTick(a(Vn,e,1))}:In&&In.now?_n=function(e){In.now(a(Vn,e,1))}:Fn?(kn=(En=new Fn).port2,En.port1.onmessage=Dn,_n=a(kn.postMessage,kn,1)):r.addEventListener&&"function"==typeof postMessage&&!r.importScripts?(_n=function(e){r.postMessage(e+"","*")},r.addEventListener("message",Dn,!1)):_n="onreadystatechange"in h("script")?function(e){me.appendChild(h("script")).onreadystatechange=function(){me.removeChild(this),Vn.call(e)}}:function(e){setTimeout(a(Vn,e,1),0)});var Kn={set:Nn,clear:zn},Bn=Kn.set,Wn=r.MutationObserver||r.WebKitMutationObserver,Gn=r.process,qn=r.Promise,Hn="process"==A(Gn);function Un(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=o(t),this.reject=o(n)}var Yn={f:function(e){return new Un(e)}},Qn=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}},Zn=r.navigator,Jn=Zn&&Zn.userAgent||"",Xn=function(e,t){if(s(e),u(t)&&t.constructor===e)return t;var n=Yn.f(e);return(0,n.resolve)(t),n.promise},er=function(e,t,n){for(var r in t)n&&e[r]?e[r]=t[r]:w(e,r,t[r]);return e},tr=ke("species"),nr=function(e){var t="function"==typeof i[e]?i[e]:r[e];l&&t&&!t[tr]&&g.f(t,tr,{configurable:!0,get:function(){return this}})},rr=ke("iterator"),ir=!1;try{[7][rr]().return=function(){ir=!0}}catch(e){}var or,ar,ur,sr,cr=function(e,t){if(!t&&!ir)return!1;var n=!1;try{var r=[7],i=r[rr]();i.next=function(){return{done:n=!0}},r[rr]=function(){return i},e(r)}catch(e){}return n},lr=Kn.set,fr=function(){var e,t,n,i=function(){var r,i;for(Hn&&(r=Gn.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(Hn)n=function(){Gn.nextTick(i)};else if(!Wn||r.navigator&&r.navigator.standalone)if(qn&&qn.resolve){var o=qn.resolve(void 0);n=function(){o.then(i)}}else n=function(){Bn.call(r,i)};else{var a=!0,u=document.createTextNode("");new Wn(i).observe(u,{characterData:!0}),n=function(){u.data=a=!a}}return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}(),dr=r.TypeError,hr=r.process,pr=hr&&hr.versions,vr=pr&&pr.v8||"",yr=r.Promise,gr="process"==Jt(hr),mr=function(){},wr=ar=Yn.f,br=!!function(){try{var e=yr.resolve(1),t=(e.constructor={})[ke("species")]=function(e){e(mr,mr)};return(gr||"function"==typeof PromiseRejectionEvent)&&e.then(mr)instanceof t&&0!==vr.indexOf("6.6")&&-1===Jn.indexOf("Chrome/66")}catch(e){}}(),_r=function(e){var t;return!(!u(e)||"function"!=typeof(t=e.then))&&t},Er=function(e,t){if(!e._n){e._n=!0;var n=e._c;fr(function(){for(var r=e._v,i=1==e._s,o=0,a=function(t){var n,o,a,u=i?t.ok:t.fail,s=t.resolve,c=t.reject,l=t.domain;try{u?(i||(2==e._h&&Or(e),e._h=1),!0===u?n=r:(l&&l.enter(),n=u(r),l&&(l.exit(),a=!0)),n===t.promise?c(dr("Promise-chain cycle")):(o=_r(n))?o.call(n,s,c):s(n)):c(r)}catch(e){l&&!a&&l.exit(),c(e)}};n.length>o;)a(n[o++]);e._c=[],e._n=!1,t&&!e._h&&kr(e)})}},kr=function(e){lr.call(r,function(){var t,n,i,o=e._v,a=xr(e);if(a&&(t=Qn(function(){gr?hr.emit("unhandledRejection",o,e):(n=r.onunhandledrejection)?n({promise:e,reason:o}):(i=r.console)&&i.error&&i.error("Unhandled promise rejection",o)}),e._h=gr||xr(e)?2:1),e._a=void 0,a&&t.e)throw t.v})},xr=function(e){return 1!==e._h&&0===(e._a||e._c).length},Or=function(e){lr.call(r,function(){var t;gr?hr.emit("rejectionHandled",e):(t=r.onrejectionhandled)&&t({promise:e,reason:e._v})})},Sr=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()),Er(t,!0))},Pr=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw dr("Promise can't be resolved itself");(t=_r(e))?fr(function(){var r={_w:n,_d:!1};try{t.call(e,a(Pr,r,1),a(Sr,r,1))}catch(e){Sr.call(r,e)}}):(n._v=e,n._s=1,Er(n,!1))}catch(e){Sr.call({_w:n,_d:!1},e)}}};br||(yr=function(e){On(this,yr,"Promise","_h"),o(e),or.call(this);try{e(a(Pr,this,1),a(Sr,this,1))}catch(e){Sr.call(this,e)}},(or=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=er(yr.prototype,{then:function(e,t){var n=wr(Mn(this,yr));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=gr?hr.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&Er(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),ur=function(){var e=new or;this.promise=e,this.resolve=a(Pr,e,1),this.reject=a(Sr,e,1)},Yn.f=wr=function(e){return e===yr||e===sr?new ur(e):ar(e)}),k(k.G+k.W+k.F*!br,{Promise:yr}),Se(yr,"Promise"),nr("Promise"),sr=i.Promise,k(k.S+k.F*!br,"Promise",{reject:function(e){var t=wr(this);return(0,t.reject)(e),t.promise}}),k(k.S+!0*k.F,"Promise",{resolve:function(e){return Xn(this===sr?yr:this,e)}}),k(k.S+k.F*!(br&&cr(function(e){yr.all(e).catch(mr)})),"Promise",{all:function(e){var t=this,n=wr(t),r=n.resolve,i=n.reject,o=Qn(function(){var n=[],o=0,a=1;jn(e,!1,function(e){var u=o++,s=!1;n.push(void 0),a++,t.resolve(e).then(function(e){s||(s=!0,n[u]=e,--a||r(n))},i)}),--a||r(n)});return o.e&&i(o.v),n.promise},race:function(e){var t=this,n=wr(t),r=n.reject,i=Qn(function(){jn(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}}),k(k.P+k.R,"Promise",{finally:function(e){var t=Mn(this,i.Promise||r.Promise),n="function"==typeof e;return this.then(n?function(n){return Xn(t,e()).then(function(){return n})}:e,n?function(n){return Xn(t,e()).then(function(){throw n})}:e)}}),k(k.S,"Promise",{try:function(e){var t=Yn.f(this),n=Qn(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}});var Tr=i.Promise,Ar=n(function(e){e.exports={default:Tr,__esModule:!0}}),jr=t(Ar),Lr=t(n(function(e,t){t.__esModule=!0;var n,r=(n=Ar)&&n.__esModule?n:{default:n};t.default=function(e){return function(){var t=e.apply(this,arguments);return new r.default(function(e,n){return function i(o,a){try{var u=t[o](a),s=u.value}catch(e){return void n(e)}if(!u.done)return r.default.resolve(s).then(function(e){i("next",e)},function(e){i("throw",e)});e(s)}("next")})}}})),Mr=Object.assign,Cr=!Mr||c(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=Mr({},e)[n]||Object.keys(Mr({},t)).join("")!=r})?function(e,t){for(var n=K(e),r=arguments.length,i=1,o=Ue.f,a=C.f;r>i;)for(var u,s=j(arguments[i++]),c=o?ve(s).concat(o(s)):ve(s),f=c.length,d=0;f>d;)u=c[d++],l&&!a.call(s,u)||(n[u]=s[u]);return n}:Mr;k(k.S+k.F,"Object",{assign:Cr});var Nr=i.Object.assign,zr=t(n(function(e){e.exports={default:Nr,__esModule:!0}})),Fr=Math.floor;k(k.S,"Number",{isInteger:function(e){return!u(e)&&isFinite(e)&&Fr(e)===e}});var Ir=i.Number.isInteger,Rr=t(n(function(e){e.exports={default:Ir,__esModule:!0}})),$r="\t\n\v\f\r    \u2028\u2029\ufeff",Vr="["+$r+"]",Dr=RegExp("^"+Vr+Vr+"*"),Kr=RegExp(Vr+Vr+"*$"),Br=function(e,t,n){var r={},i=c(function(){return!!$r[e]()||"…"!="…"[e]()}),o=r[e]=i?t(Wr):$r[e];n&&(r[n]=o),k(k.P+k.F*i,"String",r)},Wr=Br.trim=function(e,t){return e=String(L(e)),1&t&&(e=e.replace(Dr,"")),2&t&&(e=e.replace(Kr,"")),e},Gr=Br,qr=r.parseFloat,Hr=Gr.trim,Ur=1/qr($r+"-0")!=-1/0?function(e){var t=Hr(String(e),3),n=qr(t);return 0===n&&"-"==t.charAt(0)?-0:n}:qr;k(k.S+k.F*(Number.parseFloat!=Ur),"Number",{parseFloat:Ur});var Yr=i.Number.parseFloat,Qr=t(n(function(e){e.exports={default:Yr,__esModule:!0}}));function Zr(e){return void 0!==e}function Jr(e){return null==e}function Xr(e){return Array.isArray(e)}function ei(e){return"function"==typeof e}function ti(e){return Object(e)===e&&"[object Object]"===String(e)&&!ei(e)&&!Xr(e)}function ni(e){return"number"==typeof e}function ri(e){return Rr(e)}function ii(e){return Xr(e)?0===e.length:ti(e)?0===vn(e).length:!e}function oi(e){return e instanceof Event||(e&&e.originalEvent)instanceof Event}function ai(e){return"string"==typeof e||e instanceof String}function ui(e){return"boolean"==typeof e}function si(e){return!!e&&("object"===(void 0===e?"undefined":Ft(e))||"function"==typeof e)&&"function"==typeof e.then}function ci(e){return Jr(e)||ui(e)||ai(e)||ni(e)}function li(e){return!!("object"===("undefined"==typeof Node?"undefined":Ft(Node))?e instanceof Node:e&&"object"===(void 0===e?"undefined":Ft(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName)}function fi(e){return!!("object"===("undefined"==typeof HTMLElement?"undefined":Ft(HTMLElement))?e instanceof HTMLElement:e&&"object"===(void 0===e?"undefined":Ft(e))&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName)}function di(e,t){if(!li(e)||!li(t))return!1;for(;t.parentNode;)if((t=t.parentNode)===e)return!0;return!1}function hi(e){return e instanceof Error}function pi(e,t){if(!ai(e))throw new TypeError("Log's method only acccept string as argument, but not "+e+" in "+(void 0===e?"undefined":Ft(e)));return ai(t)?"["+(e=vi.FORCE_GLOBAL_TAG?vi.GLOBAL_TAG:e||vi.GLOBAL_TAG)+"] > "+t:"["+vi.GLOBAL_TAG+"] > "+e}var vi=function(){function e(){It(this,e)}return Vt(e,null,[{key:"error",value:function(t,n){e.ENABLE_ERROR&&(console.error||console.warn||console.log).call(console,pi(t,n))}},{key:"info",value:function(t,n){e.ENABLE_INFO&&(console.info||console.log).call(console,pi(t,n))}},{key:"warn",value:function(t,n){e.ENABLE_WARN&&(console.warn||console.log).call(console,pi(t,n))}},{key:"debug",value:function(t,n){e.ENABLE_DEBUG&&(console.debug||console.log).call(console,pi(t,n))}},{key:"verbose",value:function(t,n){e.ENABLE_VERBOSE&&console.log(pi(t,n))}}]),e}();vi.GLOBAL_TAG="chimee",vi.FORCE_GLOBAL_TAG=!1,vi.ENABLE_ERROR=!0,vi.ENABLE_INFO=!0,vi.ENABLE_WARN=!0,vi.ENABLE_DEBUG=!0,vi.ENABLE_VERBOSE=!0;n(function(t,n){!function(e,r){var i="model",o="name",a="type",u="vendor",s="version",c="mobile",l="tablet",f="smarttv",d={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,"")}},h={rgx:function(e,t){for(var n,r,i,o,a,u,s=0;s<t.length&&!a;){var c=t[s],l=t[s+1];for(n=r=0;n<c.length&&!a;)if(a=c[n++].exec(e))for(i=0;i<l.length;i++)u=a[++r],"object"==typeof(o=l[i])&&o.length>0?2==o.length?"function"==typeof o[1]?this[o[0]]=o[1].call(this,u):this[o[0]]=o[1]:3==o.length?"function"!=typeof o[1]||o[1].exec&&o[1].test?this[o[0]]=u?u.replace(o[1],o[2]):void 0:this[o[0]]=u?o[1].call(this,u,o[2]):void 0:4==o.length&&(this[o[0]]=u?o[3].call(this,u.replace(o[1],o[2])):void 0):this[o]=u||void 0;s+=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(d.has(t[n][r],e))return"?"===n?void 0:n}else if(d.has(t[n],e))return"?"===n?void 0:n;return e}},p={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"}}}},v={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[o,s],[/(opios)[\/\s]+([\w\.]+)/i],[[o,"Opera Mini"],s],[/\s(opr)\/([\w\.]+)/i],[[o,"Opera"],s],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(bidubrowser|baidubrowser)[\/\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|quark|qupzilla|falkon)\/([\w\.-]+)/i],[o,s],[/(konqueror)\/([\w\.]+)/i],[[o,"Konqueror"],s],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[o,"IE"],s],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[o,"Edge"],s],[/(yabrowser)\/([\w\.]+)/i],[[o,"Yandex"],s],[/(Avast)\/([\w\.]+)/i],[[o,"Avast Secure Browser"],s],[/(AVG)\/([\w\.]+)/i],[[o,"AVG Secure Browser"],s],[/(puffin)\/([\w\.]+)/i],[[o,"Puffin"],s],[/(focus)\/([\w\.]+)/i],[[o,"Firefox Focus"],s],[/(opt)\/([\w\.]+)/i],[[o,"Opera Touch"],s],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[o,"UCBrowser"],s],[/(comodo_dragon)\/([\w\.]+)/i],[[o,/_/g," "],s],[/(windowswechat qbcore)\/([\w\.]+)/i],[[o,"WeChat(Win) Desktop"],s],[/(micromessenger)\/([\w\.]+)/i],[[o,"WeChat"],s],[/(brave)\/([\w\.]+)/i],[[o,"Brave"],s],[/(qqbrowserlite)\/([\w\.]+)/i],[o,s],[/(QQ)\/([\d\.]+)/i],[o,s],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[o,s],[/(baiduboxapp)[\/\s]?([\w\.]+)/i],[o,s],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[o,s],[/(MetaSr)[\/\s]?([\w\.]+)/i],[o],[/(LBBROWSER)/i],[o],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[s,[o,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[s,[o,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[o,s],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[s,[o,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[o,/(.+)/,"$1 WebView"],s],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[o,/(.+(?:g|us))(.+)/,"$1 $2"],s],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[s,[o,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[o,"Sailfish Browser"],s],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[o,s],[/(dolfin)\/([\w\.]+)/i],[[o,"Dolphin"],s],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[o,"360 Browser"]],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[o,"Chrome"],s],[/(coast)\/([\w\.]+)/i],[[o,"Opera Coast"],s],[/fxios\/([\w\.-]+)/i],[s,[o,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[s,[o,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[s,o],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[o,"GSA"],s],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[o,[s,h.str,p.browser.oldsafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[o,s],[/(navigator|netscape)\/([\w\.-]+)/i],[[o,"Netscape"],s],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\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,s]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",d.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/windows\s(ce|mobile);\sppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[["architecture",/ower/,"",d.lowerize]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[["architecture",d.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[i,u,[a,l]],[/applecoremedia\/[\w\.]+ \((ipad)/],[i,[u,"Apple"],[a,l]],[/(apple\s{0,1}tv)/i],[[i,"Apple TV"],[u,"Apple"],[a,f]],[/(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],[u,i,[a,l]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[i,[u,"Amazon"],[a,l]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[i,h.str,p.device.amazon.model],[u,"Amazon"],[a,c]],[/android.+aft([bms])\sbuild/i],[i,[u,"Amazon"],[a,f]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[i,u,[a,c]],[/\((ip[honed|\s\w*]+);/i],[i,[u,"Apple"],[a,c]],[/(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],[u,i,[a,c]],[/\(bb10;\s(\w+)/i],[i,[u,"BlackBerry"],[a,c]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[i,[u,"Asus"],[a,l]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[u,"Sony"],[i,"Xperia Tablet"],[a,l]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[i,[u,"Sony"],[a,c]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[u,i,[a,"console"]],[/android.+;\s(shield)\sbuild/i],[i,[u,"Nvidia"],[a,"console"]],[/(playstation\s[34portablevi]+)/i],[i,[u,"Sony"],[a,"console"]],[/(sprint\s(\w+))/i],[[u,h.str,p.device.sprint.vendor],[i,h.str,p.device.sprint.model],[a,c]],[/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[u,[i,/_/g," "],[a,c]],[/(nexus\s9)/i],[i,[u,"HTC"],[a,l]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p|vog-l29|ane-lx1|eml-l29)/i],[i,[u,"Huawei"],[a,c]],[/android.+(bah2?-a?[lw]\d{2})/i],[i,[u,"Huawei"],[a,l]],[/(microsoft);\s(lumia[\s\w]+)/i],[u,i,[a,c]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[i,[u,"Microsoft"],[a,"console"]],[/(kin\.[onetw]{3})/i],[[i,/\./g," "],[u,"Microsoft"],[a,c]],[/\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,[u,"Motorola"],[a,c]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[i,[u,"Motorola"],[a,l]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[u,d.trim],[i,d.trim],[a,f]],[/hbbtv.+maple;(\d+)/i],[[i,/^/,"SmartTV"],[u,"Samsung"],[a,f]],[/\(dtv[\);].+(aquos)/i],[i,[u,"Sharp"],[a,f]],[/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],[[u,"Samsung"],i,[a,l]],[/smart-tv.+(samsung)/i],[u,[a,f],i],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[u,"Samsung"],i,[a,c]],[/sie-(\w*)/i],[i,[u,"Siemens"],[a,c]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[u,"Nokia"],i,[a,c]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[i,[u,"Acer"],[a,l]],[/android.+([vl]k\-?\d{3})\s+build/i],[i,[u,"LG"],[a,l]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[u,"LG"],i,[a,l]],[/(lg) netcast\.tv/i],[u,i,[a,f]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[i,[u,"LG"],[a,c]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[u,i,[a,l]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[i,[u,"Lenovo"],[a,l]],[/(lenovo)[_\s-]?([\w-]+)/i],[u,i,[a,c]],[/linux;.+((jolla));/i],[u,i,[a,c]],[/((pebble))app\/[\d\.]+\s/i],[u,i,[a,"wearable"]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[u,i,[a,c]],[/crkey/i],[[i,"Chromecast"],[u,"Google"],[a,f]],[/android.+;\s(glass)\s\d/i],[i,[u,"Google"],[a,"wearable"]],[/android.+;\s(pixel c)[\s)]/i],[i,[u,"Google"],[a,l]],[/android.+;\s(pixel( [23])?( xl)?)[\s)]/i],[i,[u,"Google"],[a,c]],[/android.+;\s(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i,/android.+(mi[\s\-_]*(?:a\d|one|one[\s_]plus|note lte)?[\s_]*(?:\d?\w?)[\s_]*(?:plus)?)\s+build/i,/android.+(redmi[\s\-_]*(?:note)?(?:[\s_]*[\w\s]+))\s+build/i],[[i,/_/g," "],[u,"Xiaomi"],[a,c]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i],[[i,/_/g," "],[u,"Xiaomi"],[a,l]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[i,[u,"Meizu"],[a,c]],[/(mz)-([\w-]{2,})/i],[[u,"Meizu"],i,[a,c]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[i,[u,"OnePlus"],[a,c]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[i,[u,"RCA"],[a,l]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[i,[u,"Dell"],[a,l]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[i,[u,"Verizon"],[a,l]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[u,"Barnes & Noble"],i,[a,l]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[i,[u,"NuVision"],[a,l]],[/android.+;\s(k88)\sbuild/i],[i,[u,"ZTE"],[a,l]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[i,[u,"Swiss"],[a,c]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[i,[u,"Swiss"],[a,l]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[i,[u,"Zeki"],[a,l]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[u,"Dragon Touch"],i,[a,l]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[i,[u,"Insignia"],[a,l]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[i,[u,"NextBook"],[a,l]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[u,"Voice"],i,[a,c]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[u,"LvTel"],i,[a,c]],[/android.+;\s(PH-1)\s/i],[i,[u,"Essential"],[a,c]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[i,[u,"Envizen"],[a,l]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[u,i,[a,l]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[i,[u,"MachSpeed"],[a,l]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[u,i,[a,l]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[i,[u,"Rotor"],[a,l]],[/android.+(KS(.+))\s+build/i],[i,[u,"Amazon"],[a,l]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[u,i,[a,l]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[a,d.lowerize],u,i],[/[\s\/\(](smart-?tv)[;\)]/i],[[a,f]],[/(android[\w\.\s\-]{0,9});.+build/i],[i,[u,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[s,[o,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[s,[o,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[o,s],[/rv\:([\w\.]{1,9}).+(gecko)/i],[s,o]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[o,s],[/(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,[s,h.str,p.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[o,"Windows"],[s,h.str,p.os.windows.version]],[/\((bb)(10);/i],[[o,"BlackBerry"],s],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i],[o,s],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[o,"Symbian"],s],[/\((series40);/i],[o],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[o,"Firefox OS"],s],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|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,s],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[o,"Chromium OS"],s],[/(sunos)\s?([\w\.\d]*)/i],[[o,"Solaris"],s],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[o,s],[/(haiku)\s(\w+)/i],[o,s],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[s,/_/g,"."],[o,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[o,"Mac OS"],[s,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[o,s]]},y=function(t,n){if("object"==typeof t&&(n=t,t=void 0),!(this instanceof y))return new y(t,n).getResult();var r=t||(e&&e.navigator&&e.navigator.userAgent?e.navigator.userAgent:""),i=n?d.extend(v,n):v;return this.getBrowser=function(){var e={name:void 0,version:void 0};return h.rgx.call(e,r,i.browser),e.major=d.major(e.version),e},this.getCPU=function(){var e={architecture:void 0};return h.rgx.call(e,r,i.cpu),e},this.getDevice=function(){var e={vendor:void 0,model:void 0,type:void 0};return h.rgx.call(e,r,i.device),e},this.getEngine=function(){var e={name:void 0,version:void 0};return h.rgx.call(e,r,i.engine),e},this.getOS=function(){var e={name:void 0,version:void 0};return h.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};y.VERSION="0.7.21",y.BROWSER={NAME:o,MAJOR:"major",VERSION:s},y.CPU={ARCHITECTURE:"architecture"},y.DEVICE={MODEL:i,VENDOR:u,TYPE:a,CONSOLE:"console",MOBILE:c,SMARTTV:f,TABLET:l,WEARABLE:"wearable",EMBEDDED:"embedded"},y.ENGINE={NAME:o,VERSION:s},y.OS={NAME:o,VERSION:s},t.exports&&(n=t.exports=y),n.UAParser=y;var g=e&&(e.jQuery||e.Zepto);if(g&&!g.ua){var m=new y;g.ua=m.getResult(),g.ua.get=function(){return m.getUA()},g.ua.set=function(e){m.setUA(e);var t=m.getResult();for(var n in t)g.ua[n]=t[n]}}}("object"==typeof window?window:e)}).UAParser;var yi=function(e,t,n){t in e?g.f(e,t,m(0,n)):e[t]=n};k(k.S+k.F*!cr(function(e){}),"Array",{from:function(e){var t,n,r,i,o=K(e),u="function"==typeof this?this:Array,s=arguments.length,c=s>1?arguments[1]:void 0,l=void 0!==c,f=0,d=on(o);if(l&&(c=a(c,s>2?arguments[2]:void 0,2)),null==d||u==Array&&An(d))for(n=new u(t=se(o.length));t>f;f++)yi(n,f,l?c(o[f],f):o[f]);else for(i=d.call(o),n=new u;!(r=i.next()).done;f++)yi(n,f,l?Sn(i,c,[r.value,f],!0):r.value);return n.length=f,n}});var gi=i.Array.from,mi=n(function(e){e.exports={default:gi,__esModule:!0}}),wi=t(mi),bi=t(n(function(e,t){t.__esModule=!0;var n,r=(n=mi)&&n.__esModule?n:{default:n};t.default=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return(0,r.default)(e)}}));var _i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e,t,n){e[t]=n};return function n(r,i,o){if(Xr(r)||ti(r)){for(var a in i=ci(i)?ti(r)?{}:[]:i,r)t(i,a,n(r[a],i[a],a));return i}return e(r,i,o)}}(function(e){return e});function Ei(e){if(ci(e))throw new TypeError("deepClone only accept non primitive type");return _i(e)}function ki(){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(ci(t[r]))throw new TypeError("deepAssign only accept non primitive type");var i=t.shift();return t.forEach(function(e){return _i(e,i)}),i}function xi(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 Oi(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(bi(r)))}}var Si="undefined"!=typeof window&&"[object Object]"!==Object.prototype.toString.call(window);function Pi(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e,t){return+e-+t};return vn(e).sort(t).reduce(function(t,n){return t.concat(e[n])},[])}function Ti(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 jr(function(t,r){!function i(o){if(!(o>=e.length)){var a=ei(e[o])?e[o].apply(e,bi(n)):e[o];return!1===a?r("stop"):jr.resolve(a).then(function(){return i(o+1)}).catch(function(e){return r(e||"stop")})}t()}(0)})}function Ai(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!==(ei(e[r])?e[r].apply(e,bi(n)):e[r])&&t(++r)}(0)}Si&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),Si&&(window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.msCancelAnimationFrame||window.oCancelAnimationFrame);var ji=Ut(null);function Li(e,t){var n=e.__evt_id;n||(Object.defineProperty(e,"__evt_id",{writable:!0,enumerable:!1,configurable:!0}),n=e.__evt_id=++ji.count);var r=n+"_"+t,i=ji[r];return i||(i=ji[r]=[]),i}function Mi(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments[4];ei(r)&&!i&&(i=r,r=void 0);var o=[n,void 0,r];r&&!i&&(i=function(){Ci(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),Li(e,t).push(o)}function Ci(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=Li(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}ji.count=0;var Ni=function(){function e(t,n){var r=this;if(It(this,e),Object.defineProperty(this,"__target",{writable:!0,enumerable:!1,configurable:!0}),this.__target=this,t){if("object"!==(void 0===t?"undefined":Ft(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 Vt(e,[{key:"on",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Mi(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 Ci(this.__target,e,t,n),this}},{key:"emit",value:function(e,t){return function(e,t,n){var r=Ut(null);r.type=t,r.target=e,n&&zr(r,ti(n)?n:{data:n}),Li(e,t).forEach(function(t){(t[1]||t[0]).apply(e,[r])})}(this.__target,e,{data:t}),this}}]),e}(),zi=Si?document.createElement("div"):{},Fi="innerText";"textContent"in zi&&(Fi="textContent");var Ii=Array.prototype;function Ri(e,t){return e.getAttribute(t)}function $i(e,t,n){void 0===n?e.removeAttribute(t):e.setAttribute(t,n)}function Vi(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()}}}var Di=!1;try{var Ki=Object.defineProperty({},"passive",{get:function(){Di=!0}});Si&&window.addEventListener("test",null,Ki)}catch(e){console.error(e)}function Bi(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(void 0!==i&&!ui(i)&&Di&&(i={passive:!0}),r){var o=Ci(e,t+"_once",n);o&&(n=o)}e.removeEventListener(t,n,i)}function Wi(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(void 0!==i&&!ui(i)&&Di&&(i={passive:!0}),r){var o=n;n=function(){for(var a=arguments.length,u=Array(a),s=0;s<a;s++)u[s]=arguments[s];o.apply(this,u),Bi(e,t,n,r,i)},Mi(e,t+"_once",o,n)}e.addEventListener(t,n,i)}function Gi(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];void 0!==i&&!ui(i)&&Di&&(i={passive:!0});var o=function(n){var i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments[2],r=arguments[3],i=[];n&&i.push(e);for(;e&&e.parentNode!==t;)(e=e.parentNode)&&i.push(e);r&&i.push(t);return i}(n.target||n.srcElement,e,!0),o=Ui(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)};Mi(e,n+"_delegate_"+t,r,o),e.addEventListener(n,o,i)}function qi(e,t){return(e.currentStyle||document.defaultView.getComputedStyle(e,null))[t]||e.style[t]}function Hi(e,t,n){if(ti(t))for(var r in t)Hi(e,r,t[r]);else e.style[t]=n}function Ui(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,n=arguments[2],r=t.querySelectorAll(e);return n?wi(r):r}var Yi=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;It(this,e);this.selector=t;var r=void 0;t&&t.constructor===NodeList?r=wi(t):Xr(t)?r=t:ai(t)?0===t.indexOf("<")?(zi.innerHTML=t,r=Ui("*",zi,!0)):r=Ui(t,n,!0):r=[t],zr(this,r),this.length=r.length}return Vt(e,[{key:"each",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ii.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 Ii.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 Qi(Ii.splice.apply(this,t))}},{key:"find",value:function(e){var t=[];this.each(function(n){t=t.concat(Ui(e,n,!0))});var n=Qi(t);return n.parent=this,n.selector=e,n}},{key:"append",value:function(e){var t=Qi(e),n=this[0];return t.each(function(e){return n.appendChild(e)}),this}},{key:"appendTo",value:function(e){return Qi(e).append(this),this}},{key:"text",value:function(e){return 0===arguments.length?this[0][Fi]:this.each(function(t){t[Fi]=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?Ri(this[0],e):this.each(function(n){return $i(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||ti(e)?this.each(function(n){return Hi(n,e,t)}):qi(this[0],e)}},{key:"addClass",value:function(e){return this.each(function(t){return Vi(t,e)})}},{key:"removeClass",value:function(e){return this.each(function(t){return function(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()}}}(t,e)})}},{key:"hasClass",value:function(e){return t=this[0],new RegExp("(?:^|\\s)"+e+"(?=\\s|$)").test(t.className);var t}},{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 Wi(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 Bi(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 Gi(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 function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];void 0!==i&&!ui(i)&&Di&&(i={passive:!0});var o=Ci(e,n+"_delegate_"+t,r);o&&e.removeEventListener(n,o,i)}(i,e,t,n,r)})}},{key:"remove",value:function(){return this.each(function(e){return function(e){e.parentNode.removeChild(e)}(e)})}}]),e}();function Qi(e,t){return e.constructor===Yi?e:new Yi(e,t)}var Zi=0,Ji=function(e){function t(e,n,r){It(this,t);var i=Rt(this,(t.__proto__||te(t)).call(this));if(!fi(e))throw new Error("You must pass in an legal video element but not "+(void 0===e?"undefined":Ft(e)));return i.video=e,i.config=n,i.customConfig=r,i}return Yt(t,Ni),Vt(t,null,[{key:"isSupport",value:function(){return!0}}]),Vt(t,[{key:"load",value:function(e){this.video.setAttribute("src",e),this.video.src=e}},{key:"startLoad",value:function(e){var t=this.video.currentTime||Zi;this.load(e),this.seek(t)}},{key:"stopLoad",value:function(){Zi=this.video.currentTime,this.video.src="",this.video.removeAttribute("src")}},{key:"destroy",value:function(){fi(this.video)&&this.stopLoad()}},{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.video.currentTime=e}}]),t}(),Xi={flv:".flv",hls:".m3u8",native:".mp4"};function eo(e){var t=e.src,n=e.box;if(ai(n)&&n)return n;for(var r in t=t.toLowerCase(),Xi){var i=Xi[r];if(t.indexOf(i)>-1)return r}return"native"}var to=function(){function e(t,n){if(It(this,e),!fi(t))throw new Error("You must pass in an video element to the chimee-kernel");this.config=n,this.videoElement=t,this.initVideoKernel()}return Vt(e,[{key:"destroy",value:function(){this.videoKernel.destroy()}},{key:"initVideoKernel",value:function(){var e=this.config,t=eo(e);this.box=t;var n=this.chooseVideoKernel(this.box,e.preset);if(!ei(n))throw new Error("We can't find video kernel for "+t+". Please check your config and make sure it's installed or provided");var r=e.presetConfig[this.box];r&&ki(e,r),this.videoKernel=new n(this.videoElement,e,r)}},{key:"chooseVideoKernel",value:function(e,t){switch(e){case"native":return Ji;case"mp4":return this.getMp4Kernel(t.mp4);case"flv":case"hls":return t[e];default:throw new Error("We currently do not support box "+e+", please contact us through https://github.com/Chimeejs/chimee/issues.")}}},{key:"getMp4Kernel",value:function(e){var t=e&&ei(e.isSupport);return t&&e.isSupport()?e:(t&&vi.warn("chimee","mp4 decode is not support in this browser, we will switch to the native video kernel"),this.box="native",Ji)}},{key:"attachMedia",value:function(){this.videoKernel.attachMedia()}},{key:"load",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.src;this.config.src=e,this.videoKernel.load(e)}},{key:"startLoad",value:function(){if(!ei(this.videoKernel.startLoad))throw new Error("This video kernel do not support startLoad, please contact us on https://github.com/Chimeejs/chimee/issues");this.videoKernel.startLoad(this.config.src)}},{key:"stopLoad",value:function(){ei(this.videoKernel.stopLoad)&&this.videoKernel.stopLoad()}},{key:"play",value:function(){this.videoKernel.play()}},{key:"pause",value:function(){this.videoKernel.pause()}},{key:"seek",value:function(e){ni(e)?this.videoKernel.seek(e):vi.error("chimee","When you try to seek, you must offer us a number, but not "+(void 0===e?"undefined":Ft(e)))}},{key:"refresh",value:function(){this.videoKernel.refresh()}},{key:"on",value:function(e,t){this.videoKernel.on(e,t)}},{key:"off",value:function(e,t){this.videoKernel.off(e,t)}},{key:"currentTime",get:function(){return this.videoElement.currentTime||0}}]),e}(),no=r.Reflect,ro=no&&no.ownKeys||function(e){var t=Ze.f(s(e)),n=Ue.f;return n?t.concat(n(e)):t};k(k.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n,r=M(e),i=z.f,o=ro(r),a={},u=0;o.length>u;)void 0!==(n=i(r,t=o[u++]))&&yi(a,t,n);return a}});var io=i.Object.getOwnPropertyDescriptors,oo=t(n(function(e){e.exports={default:io,__esModule:!0}})),ao=i.Object.getOwnPropertySymbols,uo=t(n(function(e){e.exports={default:ao,__esModule:!0}}));F("getOwnPropertyNames",function(){return tt.f});var so=i.Object,co=function(e){return so.getOwnPropertyNames(e)},lo=t(n(function(e){e.exports={default:co,__esModule:!0}}));function fo(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(bi(r)))}}function ho(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(ai(t)&&(t=t.split(".")),!Xr(t))throw new TypeError("keys of getDeepProperty must be string or Array<string>");for(var a=[],u=e,s=0,c=t.length;s<c;s++){var l=t[s];if(Jr(u)){if(i)throw new Error("obj"+(a.length>0?"."+a.join("."):" itself")+" is "+u);return o}u=u[l],a.push(l)}return u}var po=ke("species"),vo=function(e,t){return new(function(e){var t;return Ye(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!Ye(t.prototype)||(t=void 0),u(t)&&null===(t=t[po])&&(t=void 0)),void 0===t?Array:t}(e))(t)},yo=function(e,t){var n=1==e,r=2==e,i=3==e,o=4==e,u=6==e,s=5==e||u,c=t||vo;return function(t,l,f){for(var d,h,p=K(t),v=j(p),y=a(l,f,3),g=se(v.length),m=0,w=n?c(t,g):r?c(t,0):void 0;g>m;m++)if((s||m in v)&&(h=y(d=v[m],m,p),e))if(n)w[m]=h;else if(h)switch(e){case 3:return!0;case 5:return d;case 6:return m;case 2:w.push(d)}else if(o)return!1;return u?-1:i||o?o:w}},go=function(e,t){if(!u(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e},mo=Ge.getWeak,wo=yo(5),bo=yo(6),_o=0,Eo=function(e){return e._l||(e._l=new ko)},ko=function(){this.a=[]},xo=function(e,t){return wo(e.a,function(e){return e[0]===t})};ko.prototype={get:function(e){var t=xo(this,e);if(t)return t[1]},has:function(e){return!!xo(this,e)},set:function(e,t){var n=xo(this,e);n?n[1]=t:this.a.push([e,t])},delete:function(e){var t=bo(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}};var Oo={getConstructor:function(e,t,n,r){var i=e(function(e,o){On(e,i,t,"_i"),e._t=t,e._i=_o++,e._l=void 0,null!=o&&jn(o,n,e[r],e)});return er(i.prototype,{delete:function(e){if(!u(e))return!1;var n=mo(e);return!0===n?Eo(go(this,t)).delete(e):n&&_(n,this._i)&&delete n[this._i]},has:function(e){if(!u(e))return!1;var n=mo(e);return!0===n?Eo(go(this,t)).has(e):n&&_(n,this._i)}}),i},def:function(e,t,n){var r=mo(s(t),!0);return!0===r?Eo(e).set(t,n):r[e._i]=n,e},ufstore:Eo},So=g.f,Po=yo(0),To=function(e,t,n,i,o,a){var s=r[e],f=s,d=o?"set":"add",h=f&&f.prototype,p={};return l&&"function"==typeof f&&(a||h.forEach&&!c(function(){(new f).entries().next()}))?(f=t(function(t,n){On(t,f,e,"_c"),t._c=new s,null!=n&&jn(n,o,t[d],t)}),Po("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(e){var t="add"==e||"set"==e;e in h&&(!a||"clear"!=e)&&w(f.prototype,e,function(n,r){if(On(this,f,e),!t&&a&&!u(n))return"get"==e&&void 0;var i=this._c[e](0===n?0:n,r);return t?this:i})}),a||So(f.prototype,"size",{get:function(){return this._c.size}})):(f=i.getConstructor(t,e,o,d),er(f.prototype,n),Ge.NEED=!0),Se(f,e),p[e]=f,k(k.G+k.W+k.F,p),a||i.setStrong(f,e,o),f},Ao=(n(function(e){var t,n=yo(0),i=go,o=!r.ActiveXObject&&"ActiveXObject"in r,a=Ge.getWeak,s=Object.isExtensible,c=Oo.ufstore,l=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},f={get:function(e){if(u(e)){var t=a(e);return!0===t?c(go(this,"WeakMap")).get(e):t?t[this._i]:void 0}},set:function(e,t){return Oo.def(go(this,"WeakMap"),e,t)}},d=e.exports=To("WeakMap",l,f,Oo,!0,!0);i&&o&&(t=Oo.getConstructor(l,"WeakMap"),Cr(t.prototype,f),Ge.NEED=!0,n(["delete","has","get","set"],function(e){var n=d.prototype,r=n[e];oe(n,e,function(n,i){if(u(n)&&!s(n)){this._f||(this._f=new t);var o=this._f[e](n,i);return"set"==e?this:o}return r.call(this,n,i)})}))}),function(e){k(k.S,e,{of:function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];return new this(t)}})});Ao("WeakMap");var jo=function(e){k(k.S,e,{from:function(e){var t,n,r,i,u=arguments[1];return o(this),(t=void 0!==u)&&o(u),null==e?new this:(n=[],t?(r=0,i=a(u,arguments[2],2),jn(e,!1,function(e){n.push(i(e,r++))})):jn(e,!1,n.push,n),new this(n))}})};jo("WeakMap");var Lo=i.WeakMap,Mo=t(n(function(e){e.exports={default:Lo,__esModule:!0}})),Co=t(n(function(e,t){t.__esModule=!0;var n,r=(n=S)&&n.__esModule?n:{default:n};t.default=function(e,t,n){return t in e?(0,r.default)(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}})),No=Ge.onFreeze;F("preventExtensions",function(e){return function(t){return e&&u(t)?e(No(t)):t}});var zo=i.Object.preventExtensions;t(n(function(e){e.exports={default:zo,__esModule:!0}}));var Fo=D;function Io(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 Ro(e){return!!e&&(ei(e.get)||ei(e.set))&&ui(e.configurable)&&ui(e.enumerable)&&void 0===e.writable}function $o(e){return!!e&&ei(e.initializer)&&ui(e.configurable)&&ui(e.enumerable)&&ui(e.writable)}function Vo(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"You must pass me an array of function";if(!Xr(e)||e.length<1)throw new TypeError(t);if(1===e.length){if(!ei(e[0]))throw new TypeError(t);return e[0]}return e.reduce(function(e,n){if(!ei(n)||!ei(e))throw new TypeError(t);return function(t){return fo(n,this)(fo(e,this)(t))}})}function Do(e){if(ei(console.warn))return console.warn(e);console.log(e)}var Ko=function(){var e=lo,t=uo;return ei(t)?function(n){return wi(e(n).concat(t(n)))}:e}();var Bo=ei(oo)?oo:function(e){return Ko(e).reduce(function(t,n){return t[n]=Fo(e,n),t},{})};function Wo(){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(!ei(e))throw new TypeError('Decorators must be a function, but not "'+e+'" in '+(void 0===e?"undefined":Ft(e)))}),1===t.length?t[0]:function(e,n,r){return t.reduce(function(t,r){return r(e,n,t)},r)}}function Go(){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]:{},i=r.preGet,o=void 0!==i&&i,a=r.preSet,u=void 0===a||a;if(!(ei(t)||ei(n)||Xr(t)&&t.length>0||Xr(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 s="@accessor only accept function or array of function as getter/setter";return t=Xr(t)?Vo(t,s):t,n=Xr(n)?Vo(n,s):n,function(e,r,i){var a=i||{},s=a.configurable,c=void 0===s||s,l=a.enumerable,f=void 0===l||l,d=ei(t),h=ei(n),p=function(e){return d?fo(t,this)(e):e},v=function(e){return h?fo(n,this)(e):e};if(Ro(i)){var y=i.get,g=i.set,m=ei(y),w=ei(g);return!m&&d&&Do("You are trying to set getter via @accessor on "+r+" without getter. That's not a good idea."),!w&&h&&Do("You are trying to set setter via @accessor on "+r+" without setter. That's not a good idea."),{get:m||d?function(){var e=this,t=fo(p,this),n=function(){return m?fo(y,e)():void 0};return(o?[t,n]:[n,t]).reduce(function(e,t){return t(e)},void 0)}:void 0,set:w||h?function(e){var t=this,n=fo(v,this),r=function(e){return w?fo(g,t)(e):e};return(u?[n,r]:[r,n]).reduce(function(e,t){return t(e)},e)}:void 0,configurable:c,enumerable:f}}if($o(i)){var b=i.initializer,_=void 0,E=!1;return{get:function(){var e=fo(p,this);return E?e(_):(_=fo(b,this)(),E=!0,e(_))},set:function(e){var t=fo(v,this);return _=u?t(e):e,E=!0,u||t(_),_},configurable:c,enumerable:f}}var k=(i||{}).value;return{get:function(){return fo(p,this)(k)},set:function(e){var t=fo(v,this);return k=u?t(e):e,u||t(k),k},configurable:c,enumerable:f}}}function qo(){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&&Io(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(!ei(t[r]))throw new TypeError("@before only accept function parameter");return function(e,n,r){var i=r||{},o=i.value,a=i.configurable,u=i.enumerable,s=i.writable;if(!ei(o))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),i=0;i<n;i++)r[i]=arguments[i];var a=t.reduce(function(t,n){var r=fo(n,e).apply(void 0,bi(t));return void 0===r?t:Xr(r)?r:[r]},r);return fo(o,this).apply(void 0,bi(a))},configurable:a,enumerable:u,writable:s}}}function Ho(){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&&Io(t[2]))throw new Error("You may use @initialize straightly, @initialize return decorators, you need to call it");var r=Vo(t,"@initialize only accept function parameter");return function(e,t,n){if(void 0===n)return{value:fo(r,e)(),configurable:!0,writable:!0,enumerable:!0};if(Ro(n)){var i=!1;return Go({get:function(e){return i?e:fo(r,this)(e)},set:n.set?function(e){return i=!0,e}:void 0})(e,t,n)}if($o(n)){var o=n.initializer;return{initializer:function(){return fo(r,this)(fo(o,this)())},configurable:n.configurable,writable:n.writable,enumerable:n.enumerable}}return{value:fo(r,this)(n.value),writable:n.writable,configurable:n.configurable,enumerable:n.enumerable}}}var Uo=D,Yo=P;function Qo(e,t,n,r,i,o){var a=n.configurable,u=n.enumerable,s=o.force,c=o.omit,l=Uo(r,i);if(void 0!==l){if(c)return;if(!s)throw new Error('"'+t+'" is an existing property, if you want to override it, please set "force" true in @alias option.');if(!l.configurable)throw new Error('property "'+t+'" is unconfigurable.')}Yo(r,i,{get:function(){return e[t]},set:function(n){return e[t]=n,t},configurable:a,enumerable:u})}function Zo(e,t,n){if(2===arguments.length?ai(e)&&(n=t,t=e,e=void 0):1===arguments.length&&(t=e,e=void 0),!ai(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&&ci(e))throw new TypeError(r);var i=ti(n)?n:{force:!1,omit:!1},o=i.force,a=i.omit;return function(n,i,u){function s(e,t,n){var i=ci(e)?t:e,o=n.split("."),a=o.slice(-1),u=cn(a,1)[0];if(ci(i=ho(i,o.slice(0,-1),{throwError:!0})))throw new TypeError(r);return{target:i,name:u}}if($o(u=u||{value:void 0,configurable:!0,writable:!0,enumerable:!0}))return Ho(function(n){var r=s(e,this,t),c=r.target,l=r.name;return Qo(this,i,u,c,l,{force:o,omit:a}),n})(n,i,u);if(Ro(u)){var c=void 0,l=function(n){if(c)return n;var r=s(e,this,t),l=r.target,f=r.name;return Qo(this,i,u,l,f,{force:o,omit:a}),c=!0,n};return Go({get:l,set:l})(n,i,u)}var f=s(e,n,t),d=f.target,h=f.name;return Qo(n,i,u,d,h,{force:o,omit:a}),u}}var Jo=P;var Xo=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.requirement,r=t.customArgs,i=void 0!==r&&r;return function(){for(var t=arguments.length,r=Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},u=a.exclude,s=void 0===u?[]:u,c=a.include,l=void 0===c?[]:c,f=a.construct,d=void 0!==f&&f,h=a.self,p=void 0!==h&&h;if(!Xr(s))throw new TypeError("options.exclude must be an array");if(!Xr(l))throw new TypeError("options.include must be an array");return function(t){var o=ei(t);if(!p&&!o)throw new TypeError("@"+e.name+"Class can only be used on class");if(p&&ci(t))throw new TypeError("@"+e.name+"Class must be used on non-primitive type value in 'self' mode");var a=p?t:t.prototype;if(Jr(a))throw new Error("The prototype of the "+t.name+" is empty, please check it");var u=Bo(a);Ko(a).concat(l).forEach(function(t){var c=u[t];"constructor"===t&&!d||p&&o&&["name","length","prototype"].indexOf(t)>-1||s.indexOf(t)>-1||ei(n)&&!1===n(a,t,c,{self:p})||Jo(a,t,(i?e.apply(void 0,bi(r)):e)(a,t,c))})}}}(ta,{requirement:function(e,t,n){return function(e){return!!e&&e.hasOwnProperty("value")&&ui(e.configurable)&&ui(e.enumerable)&&ui(e.writable)}(n)&&ei(n.value)}}),ea=void 0;function ta(e,t,n){if(1===arguments.length)return Xo()(e);var r=n||{},i=r.value,o=r.configurable;if(!ei(i))throw new TypeError('@autobind can only be used on functions, not "'+i+'" in '+(void 0===i?"undefined":Ft(i))+' on property "'+t+'"');var a,u=e.constructor;return{configurable:o,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(bi(t)))};return this===e?i:this.constructor!==u&&te(this).constructor===u?i:this.constructor!==u&&t in this.constructor.prototype?function(e,t){if(void 0===Mo)throw new Error("Using @autobind on "+t.name+"() requires WeakMap support due to its use of super."+t.name+"()");ea||(ea=new Mo),!1===ea.has(e)&&ea.set(e,new Mo);var n=ea.get(e);return!1===n.has(t)&&n.set(t,fo(t,e)),n.get(t)}(this,i):(P(this,t,{configurable:!0,writable:!0,enumerable:!1,value:r}),r)},set:(a=t,function(e){return P(this,a,{configurable:!0,writable:!0,enumerable:!0,value:e}),e})}}var na=P;function ra(e,t,n){if(void 0===n)return Do("You are using @frozen on an undefined property. This property will become a frozen undefined forever, which is meaningless"),{value:void 0,writable:!1,enumerable:!1,configurable:!1};if(n.enumerable=!1,n.configurable=!1,Ro(n)){var r=n.get;return n.set=void 0,ei(r)?{get:function(){var e=fo(r,this)();return na(this,t,{value:e,writable:!1,configurable:!1,enumerable:!1}),e},set:void 0,configurable:!1,enumerable:!1}:void Do("You are using @frozen on one accessor descriptor without getter. This property will become a frozen undefined finally.Which maybe meaningless.")}return n.writable=!1,n}var ia=D,oa=P;function aa(e,t,n){return void 0===n?{value:void 0,enumerable:!1,configurable:!0,writable:!0}:(n.enumerable=!1,n)}var ua=P,sa=D;function ca(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.self,i=void 0!==r&&r,o=n.omit,a=void 0!==o&&o,u=ei(t);if(u||Xr(t)){if(!ei(e))throw new TypeError("If you want to decorator class, you must pass it a legal class");if(u)t(e);else for(var s=0,c=t.length;s<c;s++){var l=t[s];if(!ei(l))throw new TypeError("If you want to decorate an class, you must pass it function or array of function");l(e)}return e}if(!i&&!ei(e))throw new TypeError("applyDecorators only accept class as first arguments. If you want to modify instance, you should set options.self true.");if(i&&ci(e))throw new TypeError("We can't apply docorators on a primitive value, even in self mode");if(!ti(t))throw new TypeError("applyDecorators only accept object as second arguments");var f=i?e:e.prototype;if(Jr(f))throw new Error("The class muse have a prototype, please take a check");for(var d in t){var h=t[d],p=Xr(h)?h:[h],v=void 0;try{v=Wo.apply(void 0,bi(p))}catch(e){throw Do(e&&e.message),new Error("The decorators set on props must be Function or Array of Function")}var y=sa(f,d);if(!y||y.configurable)ua(f,d,v(f,d,y));else if(!a)throw new Error(d+" of "+f+" is unconfigurable")}return e}var la=["push","pop","unshift","shift","splice","sort","reverse"];function fa(e,t,n){var r,i=n.diff,o=n.operationPrefix,a={},u=!1,s=new Proxy(e,{get:function(e,n,r){var s=e[n];if(Xr(e)&&la.indexOf(n)>-1)return function(){u=!0,fo(s,r).apply(void 0,arguments),u=!1,t()};if(!0===a[n])return s;if(ti(s)||Xr(s)){var c=a[n]||fa(s,t,{diff:i,operationPrefix:o});return a[n]=c,c}return a[n]=!0,s},set:function(e,n,r){var s=e[n],c=ti(r)||Xr(r)?fa(r,t,{diff:i,operationPrefix:o}):r;return e[n]=c,a[n]=!0,!!(u||i&&s===c)||(t(),!0)},deleteProperty:function(e,n){return delete e[n],delete a[n],!!u||(t(),!0)}}),c=(Co(r={},o+"set",[Ho(function(e){return function(e,t){s[e]=t}}),aa]),Co(r,o+"del",[Ho(function(e){return function(e){delete s[e]}}),aa]),r);return ca(s,c,{self:!0}),s}function da(e,t,n){var r,i=this,o=n.operationPrefix,a=n.diff,u={},s=!1;function c(e){var n=void 0;return e.reduce(function(e,r){return e[r]=[Go({set:function(e){return n=this[r],e}}),Go({get:function(e){return u[r]?e:((ti(e)||Xr(e))&&da(e,t,{operationPrefix:o,diff:a}),u[r]=!0,e)},set:function(e){return(ti(e)||Xr(e))&&da(e,t,{operationPrefix:o,diff:a}),u[r]=!0,s||a&&n===e||t(),e}},{preSet:!1})],e},{})}var l=c(Ko(e));if(ca(e,l,{self:!0,omit:!0}),Xr(e)){var f=la.reduce(function(n,r){return n[r]=[Ho(function(n){return n=ei(n)?n:Array.prototype[r],function(){var r=e.length;if(s=!0,fo(n,e).apply(void 0,arguments),s=!1,r<e.length){var i=c(new Array(e.length-r).fill(1).map(function(e,t){return(t+r).toString()}));ca(e,i,{self:!0,omit:!0})}t()}}),aa],n},{});ca(e,f,{self:!0})}var d=(Co(r={},o+"set",[Ho(function(t){return function(n,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=o.disable,u=o.isNewVal;if(u=u||-1===Ko(e).indexOf(n),ei(t)&&fo(t,i)(n,r,{disable:!0,isNewVal:u}),u){var s=c([n]);ca(e,s,{self:!0,omit:!0})}a||(e[n]=r)}}),aa]),Co(r,o+"del",[Ho(function(n){return function(r){ei(n)?fo(n,i)(r):delete e[r],t()}}),aa]),r);return ca(e,d,{self:!0}),e}function ha(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.other,r=t.backup;if(!ei(e)&&!ai(e))throw new TypeError("@runnable only accept Function or String");return function(t,i,o){var a=o||{},u=a.value,s=a.configurable;if(!ei(u))throw new TypeError("@runnable can only be used on method, but not "+u+' on property "'+i+'".');var c=ei(e)?e:function(){var t=e.split(".");return ho(ci(n)?this:n,t)};return r=ei(r)?r:function(){},{value:function(){return!0===fo(c,this).apply(void 0,arguments)?fo(u,this).apply(void 0,arguments):fo(r,this).apply(void 0,arguments)},enumerable:!1,configurable:s,writable:!1}}}function pa(e,t,n){return void 0===n?{value:void 0,enumerable:!0,configurable:!0,writable:!0}:(n.configurable=!0,n)}function va(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=ai(t[0])?t.shift():"";return t.unshift(function(e){return ai(e)?e:r}),Go({set:t,get:t})}function ya(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=!!ui(t[0])&&t.shift();return t.unshift(function(e){return ui(e)?e:r}),Go({set:t,get:t})}function ga(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=ni(t[0])?t.shift():0;return t.unshift(function(e){return ni(e)?e:r}),Go({set:t,get:t})}var ma=i.JSON||(i.JSON={stringify:JSON.stringify}),wa=function(e){return ma.stringify.apply(ma,arguments)},ba=t(n(function(e){e.exports={default:wa,__esModule:!0}})),_a=["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","enterpictureinpicture","leavepictureinpicture"],Ea=["buffered","currentSrc","duration","error","ended","networkState","paused","readyState","seekable","sinkId","controlsList","tabIndex","dataset","offsetHeight","offsetLeft","offsetParent","offsetTop","offsetWidth"],ka=["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","mousewheel","contextmenu","touchstart","touchmove","touchend","fullscreen"],xa=["fullscreenchange"],Oa=["wheel","mousewheel","touchstart","touchmove"],Sa=["silentLoad","fullscreen"],Pa=["mouseenter","mouseleave"],Ta=["play","pause","seek","startLoad","stopLoad"],Aa={load:"load",enterpictureinpicture:"requestPictureInPicture",leavepictureinpicture:"exitPictureInPicture"},ja=["mediaInfo","heartbeat","error"],La=["focus","fullscreen","requestFullscreen","exitFullscreen"],Ma=["canPlayType","captureStream","setSinkId"];function Ca(e,t){if(!ai(e))throw new TypeError("key parameter must be String");if(!ei(t))throw new TypeError("fn parameter must be Function")}function Na(){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)}k(k.S,"Number",{isNaN:function(e){return e!=e}});var za,Fa,Ia,Ra,$a,Va,Da,Ka,Ba,Wa,Ga=i.Number.isNaN,qa=t(n(function(e){e.exports={default:Ga,__esModule:!0}}));function Ha(e,t,n,r){n&&P(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function Ua(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 Ya(e){return ai(e)?e:void 0}function Qa(e){return Go({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 Za(e){var t=ti(e)?e:{set:e,get:e,isBoolean:!1},n=t.set,r=t.get,i=t.isBoolean;return Go({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}},{preSet:!1})}function Ja(e,t){return Go({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 Xa(e){return Go({get:function(t){if(!this.dispatcher.videoConfigReady||!this.inited)return t;var n,r=this.dom.getAttr("video",e),i=this.dom.videoElement[e];return!Xr(n=r)&&n-Qr(n)+1>=0&&ni(i)?i:r||void 0},set:function(t){if(!this.dispatcher.videoConfigReady)return t;var n=void 0;return void 0===t||ni(t)?n=t:ai(t)&&!qa(parseFloat(t))&&(n=t),this.dom.setAttr("video",e,n),n}})}var eu,tu,nu,ru,iu,ou,au,uu,su,cu,lu,fu,du,hu,pu,vu,yu,gu,mu,wu,bu,_u={src:[va(),Go({set:function(e){return this.dispatcher.readySync&&this.autoload&&e!==this.src&&(this.needToLoadSrc=!0),e}}),Go({set:function(e){return this.needToLoadSrc&&(this.needToLoadSrc=!1,this.dispatcher.binder.emit({name:"load",target:"plugin",id:"dispatcher"},e)),e}},{preSet:!1})],autoload:ya(),autoplay:[ya(),Qa("autoplay")],controls:[ya(),Qa("controls")],width:[Xa("width")],height:[Xa("height")],crossOrigin:[Go({set:Ya}),Za({set:"crossorigin",get:"crossOrigin"})],loop:[ya(),Qa("loop")],defaultMuted:[ya(),Za({get:"defaultMuted",set:"muted",isBoolean:!0})],muted:[ya(),Qa("muted")],preload:[Go({set:function(e){return["none","auto","metadata",""].indexOf(e)>-1?e:"none"}},{preSet:!0}),Za("preload")],poster:[va(),Go({get:function(e){return this.dispatcher.videoConfigReady&&this.inited?this.dom.videoElement.poster:e},set:function(e){return this.dispatcher.videoConfigReady?(e.length&&this.dom.setAttr("video","poster",e),e):e}})],playsInline:[Go({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-playsinline",t),e}}),ya()],x5VideoPlayerFullscreen:[Go({set:function(e){return!!e},get:function(e){return!!e}}),Ja("x5-video-player-fullscreen",!0)],x5VideoOrientation:[Go({set:Ya}),Ja("x5-video-orientation")],x5VideoPlayerType:[Go({set:function(e){if(!this.dispatcher.videoConfigReady)return e;var t="h5-page"===e?"h5-page":void 0;return this.dom.setAttr("video","x5-video-player-type",t),e},get:function(e){return this.dispatcher.videoConfigReady&&e||(this.dom.getAttr("video","x5-video-player-type")?"h5-page":void 0)}})],xWebkitAirplay:[Go({set:function(e){return!!e},get:function(e){return!!e}}),Ja("x-webkit-airplay",!0)],playbackRate:[ga(1),Qa("playbackRate")],defaultPlaybackRate:[Qa("defaultPlaybackRate"),ga(1)],disableRemotePlayback:[ya(),Qa("disableRemotePlayback")],volume:[ga(1),Qa("volume")]},Eu=(za=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=!!ui(t[0])&&t.shift();return t.unshift(function(e){return ui(e)?e:r}),Ho.apply(void 0,t)}(),Fa=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=ai(t[0])?t.shift():"";return t.unshift(function(e){return ai(e)?e:r}),Ho.apply(void 0,t)}(function(e){return e.toLocaleLowerCase()}),Ia=function(){function e(t,n){It(this,e),Ha(this,"needToLoadSrc",Ra,this),Ha(this,"changeWatchable",$a,this),Ha(this,"inited",Va,this),this.src="",Ha(this,"isLive",Da,this),Ha(this,"box",Ka,this),this.preset={},this.presetConfig={},this.autoload=!0,this.autoplay=!1,this.controls=!1,this.width="100%",this.height="100%",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.x5VideoPlayerType=void 0,this.xWebkitAirplay=!1,this.playbackRate=1,this.defaultPlaybackRate=1,this.disableRemotePlayback=!1,this.volume=1,Ha(this,"_kernelProperty",Ba,this),Ha(this,"_realDomAttr",Wa,this),ca(this,_u,{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}),ki(this,n)}return Vt(e,[{key:"init",value:function(){var e=this;this._realDomAttr.forEach(function(t){e[t]=e[t]}),this.inited=!0}}]),e}(),Ra=Ua(Ia.prototype,"needToLoadSrc",[aa],{enumerable:!0,initializer:function(){return!1}}),$a=Ua(Ia.prototype,"changeWatchable",[aa],{enumerable:!0,initializer:function(){return!0}}),Va=Ua(Ia.prototype,"inited",[aa],{enumerable:!0,initializer:function(){return!1}}),Da=Ua(Ia.prototype,"isLive",[za,pa],{enumerable:!0,initializer:function(){return!1}}),Ka=Ua(Ia.prototype,"box",[Fa,pa],{enumerable:!0,initializer:function(){return""}}),Ba=Ua(Ia.prototype,"_kernelProperty",[ra],{enumerable:!0,initializer:function(){return["isLive","box","preset","kernels","presetConfig"]}}),Wa=Ua(Ia.prototype,"_realDomAttr",[ra],{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","x5VideoPlayerType"]}}),Ia);function ku(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}var xu,Ou,Su,Pu,Tu,Au,ju,Lu,Mu=(eu=Xo(),tu=Zo("silentLoad"),nu=Zo("fullScreen"),ru=Zo("$fullScreen"),iu=Zo("fullscreen"),ou=Zo("emit"),au=Zo("emitSync"),uu=Zo("on"),su=Zo("addEventListener"),cu=qo(Ca),lu=Zo("off"),fu=Zo("removeEventListener"),du=qo(Ca),hu=Zo("once"),pu=qo(Ca),vu=Zo("css"),yu=qo(Na),gu=Zo("attr"),mu=qo(Na),eu((ku((bu=function(){function e(){It(this,e),this.__events={},this.__unwatchHandlers=[]}return Vt(e,[{key:"__wrapAsVideo",value:function(e){var t=this;Ea.forEach(function(e){P(t,e,{get:function(){return this.__dispatcher.dom.videoElement[e]},set:void 0,configurable:!1,enumerable:!1})}),Ma.forEach(function(e){P(t,e,{get:function(){var t=this.__dispatcher.dom.videoElement;return Oi(t[e],t)},set:void 0,configurable:!1,enumerable:!1})}),ca(this,e._realDomAttr.concat(e._kernelProperty).reduce(function(t,n){return t[n]=[Go({get:function(){return e[n]},set:function(t){return e[n]=t,t}}),aa],t},{}),{self:!0}),Ta.forEach(function(e){P(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 jr(function(n){var i,o=t.__id;t.__dispatcher.binder.once({id:o,name:"_"+e,fn:n}),(i=t.__dispatcher.binder)[/^(seek)$/.test(e)?"emitSync":"emit"].apply(i,[{target:"video",name:e,id:o}].concat(bi(r)))})},configurable:!0,enumerable:!1,writable:!0})}),La.forEach(function(e){"fullscreen"!==e&&P(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,u=r.other,s=r.proxy,c=void 0!==s&&s;if(!ai(e)&&!Xr(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":Ft(e)));var l=!0,f=function e(){l=!1;var t=n.__unwatchHandlers.indexOf(e);t>-1&&n.__unwatchHandlers.splice(t,1)},d=ai(e)?e.split("."):e,h=d.pop(),p=this.__dispatcher.videoConfig;return ca(0===d.length&&!u&&p._realDomAttr.indexOf(h)>-1?p:["isFullscreen","fullscreenElement"].indexOf(h)>-1?this.__dispatcher.dom:function(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(ai(t)&&(t=t.split(".")),!Xr(t))throw new TypeError("keys of getDeepProperty must be string or Array<string>");for(var a=[],u=e,s=0,c=t.length;s<c;s++){var l=t[s];if(Jr(u)){if(i)throw new Error("obj"+(a.length>0?"."+a.join("."):" itself")+" is "+u);return o}u=u[l],a.push(l)}return u}(u||this,d,{throwError:!0}),Co({},h,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=ti(t[t.length-1])?t[t.length-1]:{},i=r.deep,o=r.omit,a=r.other,u=r.operationPrefix,s=void 0===u?"__":u,c=r.diff,l=void 0===c||c,f=r.proxy;if("function"!=typeof Proxy&&(f=!1,Do("You browser do not support Proxy, we will fall back into observe mode.")),!t.length)throw new TypeError("You must pass a function or a string to find the hanlder function.");if(void 0!==a&&ci(a))throw new TypeError("If you want us to trigger function on the other instance, you must pass in a legal instance");if(!ai(s))throw new TypeError("operationPrefix must be an string");return function(e,n,r){var u=t.reduce(function(n,r,i){if(!ai(r)&&!ei(r)){if(!i||i!==t.length-1)throw new TypeError("You can only pass function or string as handler");return n}return n.push(ai(r)?function(t,n){var i=ho(a||e,r);if(ei(i))return fo(i,this)(t,n);if(!o)throw new Error("You pass in a function for us to trigger, please ensure the property to be a function or set omit flag true")}:r),n},[]),c=function(e,t){var n=this;u.forEach(function(r){return fo(r,n)(e,t)})},d=!1,h=void 0,p=void 0,v=void 0;return Wo(Go({set:function(e){var t=this;h=this[n],v=void 0;var r=function(){return fo(c,t)(p,h)};return i&&(ti(e)||Xr(e))?f?fa(e,r,{diff:l,operationPrefix:s}):da(e,r,{operationPrefix:s,diff:l}):e},get:function(e){var t=this;if(v)return v;if(!d){d=!0;var n=function(){return fo(c,t)(p,h)};if(i&&(ti(e)||Xr(e))){if(f)return v=fa(e,n,{diff:l,operationPrefix:s}),h=v,p=v,v;da(e,n,{operationPrefix:s,diff:l})}h=e,p=e}return e}},{preSet:!0}),Go({set:function(e){return p=e,l&&h===e||fo(c,this)(p,h),h=e,e}},{preSet:!1}))(e,n,r)}}(function(){!l||this instanceof Eu&&!this.dispatcher.changeWatchable||Oi(t,this).apply(void 0,arguments)},{deep:i,diff:a,proxy:c})),{self:!0}),this.__unwatchHandlers.push(f),f}},{key:"$set",value:function(e,t,n){if(!ti(e)&&!Xr(e))throw new TypeError("$set only support Array or Object, but not "+e+", whose type is "+(void 0===e?"undefined":Ft(e)));if(!ei(e.__set))return vi.warn("chimee",ba(e)+" has not been deep watch. There is no need to use $set."),void(e[t]=n);e.__set(t,n)}},{key:"$del",value:function(e,t){if(!ti(e)&&!Xr(e))throw new TypeError("$del only support Array or Object, but not "+e+", whose type is "+(void 0===e?"undefined":Ft(e)));if(!ei(e.__del))return vi.warn("chimee",ba(e)+" has not been deep watch. There is no need to use $del."),void delete e[t];e.__del(t)}},{key:"load",value:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return new jr(function(t){var r;e.__dispatcher.binder.once({id:e.__id,name:"_load",target:"plugin",fn:t}),(r=e.__dispatcher.binder).emit.apply(r,[{name:"load",target:"plugin",id:e.__id}].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.binder.emit({name:"silentLoad",target:"video",id:this.__id}).then(function(){var t;return(t=e.__dispatcher).silentLoad.apply(t,n)}).then(function(t){e.__dispatcher.binder.trigger({name:"silentLoad",target:"video",id:e.__id},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.binder.emitSync({name:"fullscreen",id:this.__id,target:"video-dom"},e,t))return!1;var n=this.__dispatcher.dom.fullscreen(e,t);return this.__dispatcher.binder.triggerSync({name:"fullscreen",id:this.__id,target:"video-dom"},e,t),n}},{key:"$emit",value:function(e){var t,n=void 0;if(ti(e)&&ai(e.name)&&ai(e.target)&&(n=e.target,e=e.name),!ai(e))throw new TypeError("emit key parameter must be String");ka.indexOf(e.replace(/^\w_/,""))>-1&&vi.warn("plugin","You are try to emit "+e+" event. As emit is wrapped in Promise. It make you can't use event.preventDefault and event.stopPropagation. So we advice you to use emitSync");for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return(t=this.__dispatcher.binder).emit.apply(t,[{name:e,id:this.__id,target:n}].concat(bi(i)))}},{key:"$emitSync",value:function(e){var t,n=void 0;if(ti(e)&&ai(e.name)&&ai(e.target)&&(n=e.target,e=e.name),!ai(e))throw new TypeError("emitSync key parameter must be String");for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return(t=this.__dispatcher.binder).emitSync.apply(t,[{name:e,id:this.__id,target:n}].concat(bi(i)))}},{key:"$on",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=zr({},n,{name:e,id:this.__id,fn:t});this.__dispatcher.binder.on(r),this.__addEvents(e,t)}},{key:"$off",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=zr({},n,{name:e,id:this.__id,fn:t});this.__dispatcher.binder.off(r),this.__removeEvents(e,t)}},{key:"$once",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this,i=function n(){Oi(t,this).apply(void 0,arguments),r.__removeEvents(e,n)};r.__addEvents(e,i);var o=zr({},n,{name:e,id:this.__id,fn:i});this.__dispatcher.binder.once(o)}},{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 vi.warn("chimee",this.__id+" is tring to set attribute on video before video inited. Please wait until the inited event has benn trigger"),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:"requestPictureInPicture",value:function(){return this.__dispatcher.binder.emit({target:"video",name:"enterpictureinpicture",id:this.__id})}},{key:"exitPictureInPicture",value:function(){return this.__dispatcher.binder.emit({target:"video",name:"leavepictureinpicture",id:this.__id})}},{key:"__addEvents",value:function(e,t){this.__events[e]=this.__events[e]||[],this.__events[e].push(t)}},{key:"__removeEvents",value:function(e,t){if(!ii(this.__events[e])){var n=this.__events[e].indexOf(t);n<0||(this.__events[e].splice(n,1),ii(this.__events[e])&&delete this.__events[e])}}},{key:"__destroy",value:function(){var e=this;this.__unwatchHandlers.forEach(function(e){return e()}),vn(this.__events).forEach(function(t){Xr(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.binder.emitSync({name:"seek",target:"video",id:this.__id},e)}},{key:"inPictureInPictureMode",get:function(){return this.__dispatcher.inPictureInPictureMode}},{key:"pictureInPictureWindow",get:function(){return window.__chimee_picture_in_picture_window}},{key:"$plugins",get:function(){return this.__dispatcher.plugins}},{key:"$pluginOrder",get:function(){return this.__dispatcher.order}},{key:"$wrapper",get:function(){return this.__dispatcher.dom.wrapper}},{key:"$container",get:function(){return this.__dispatcher.dom.container}},{key:"$video",get:function(){return this.__dispatcher.dom.videoElement}},{key:"isFullscreen",get:function(){return this.__dispatcher.dom.isFullscreen}},{key:"fullscreenElement",get:function(){return this.__dispatcher.dom.fullscreenElement}},{key:"container",get:function(){return this.__dispatcher.containerConfig},set:function(e){if(!ti(e))throw new Error("The config of container must be Object, but not "+(void 0===e?"undefined":Ft(e))+".");return ki(this.__dispatcher.containerConfig,e),this.__dispatcher.container}},{key:"videoRequireGuardedAttributes",get:function(){return this.__dispatcher.dom.videoRequireGuardedAttributes}}]),e}()).prototype,"$silentLoad",[tu],D(bu.prototype,"$silentLoad"),bu.prototype),ku(bu.prototype,"$fullscreen",[nu,ru,iu],D(bu.prototype,"$fullscreen"),bu.prototype),ku(bu.prototype,"$emit",[ou],D(bu.prototype,"$emit"),bu.prototype),ku(bu.prototype,"$emitSync",[au],D(bu.prototype,"$emitSync"),bu.prototype),ku(bu.prototype,"$on",[uu,su,cu],D(bu.prototype,"$on"),bu.prototype),ku(bu.prototype,"$off",[lu,fu,du],D(bu.prototype,"$off"),bu.prototype),ku(bu.prototype,"$once",[hu,pu],D(bu.prototype,"$once"),bu.prototype),ku(bu.prototype,"$css",[vu,yu],D(bu.prototype,"$css"),bu.prototype),ku(bu.prototype,"$attr",[gu,mu],D(bu.prototype,"$attr"),bu.prototype),ku(bu.prototype,"inPictureInPictureMode",[aa],D(bu.prototype,"inPictureInPictureMode"),bu.prototype),ku(bu.prototype,"pictureInPictureWindow",[aa],D(bu.prototype,"pictureInPictureWindow"),bu.prototype),ku(bu.prototype,"$plugins",[aa],D(bu.prototype,"$plugins"),bu.prototype),ku(bu.prototype,"$pluginOrder",[aa],D(bu.prototype,"$pluginOrder"),bu.prototype),ku(bu.prototype,"$wrapper",[aa],D(bu.prototype,"$wrapper"),bu.prototype),ku(bu.prototype,"$container",[aa],D(bu.prototype,"$container"),bu.prototype),ku(bu.prototype,"$video",[aa],D(bu.prototype,"$video"),bu.prototype),wu=bu))||wu),Cu=Xo()(xu=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,u=void 0===a||a,s=e.beforeCreate,c=e.create,l=e.init,f=e.inited,d=e.destroy,h=e.events,p=void 0===h?{}:h,v=e.data,y=void 0===v?{}:v,g=e.computed,m=void 0===g?{}:g,w=e.methods,b=void 0===w?{}:w,_=e.el,E=e.penetrate,k=void 0!==E&&E,x=e.inner,O=void 0===x||x,S=e.autoFocus,T=e.className,A=arguments[1],j=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{name:r};It(this,t);var L=Rt(this,(t.__proto__||te(t)).call(this));if(L.destroyed=!1,L.VERSION="0.12.0",L.__operable=!0,L.__level=0,ii(A))throw vi.error("Dispatcher.plugin","lack of dispatcher. Do you forget to pass arguments to super in plugin?"),new TypeError("lack of dispatcher");if(!ai(n))throw new TypeError("id of PluginConfig must be string");L.__id=n,L.__dispatcher=A,L.$videoConfig=L.__dispatcher.videoConfig,L.__wrapAsVideo(L.$videoConfig),L.beforeCreate=L.beforeCreate||s;try{ei(L.beforeCreate)&&L.beforeCreate({events:p,data:y,computed:m,methods:b},j)}catch(e){L.$throwError(e)}if(!ii(b)&&ti(b)&&vn(b).forEach(function(e){var t=b[e];if(!ei(t))throw new TypeError("plugins methods must be Function");P(L,e,{value:Oi(t,L),writable:!0,enumerable:!1,configurable:!0})}),!ii(p)&&ti(p)&&vn(p).forEach(function(e){if(!ei(p[e]))throw new TypeError("plugins events hook must bind with Function");L.$on(e,p[e])}),!ii(y)&&ti(y)&&ki(L,y),!ii(m)&&ti(m)){var M=vn(m).reduce(function(e,t){var n=m[t];return ei(n)?(e[t]=Go({get:n}),e):ti(n)&&(ei(n.get)||ei(n.set))?(e[t]=Go(n),e):(vi.warn("Dispatcher.plugin","Wrong computed member '"+t+"' defination in Plugin "+r),e)},{});ca(L,M,{self:!0})}L.create=L.create||c,L.init=L.init||l,L.inited=L.inited||f,L.destroy=L.destroy||d,L.$dom=L.__dispatcher.dom.insertPlugin(L.__id,_,{penetrate:k,inner:O,className:T}),L.$autoFocus=ui(S)?S:O,L.$inner=O,L.$penetrate=k,ca(L,{$inner:ra,$penetrate:ra},{self:!0}),L.$operable=ui(j.operable)?j.operable:u,L.__level=ri(j.level)?j.level:o,L.$config=j;try{ei(L.create)&&L.create()}catch(e){L.$throwError(e)}return L}return Yt(t,Mu),Vt(t,[{key:"__init",value:function(e){try{ei(this.init)&&this.init(e)}catch(e){this.$throwError(e)}}},{key:"__inited",value:function(){var e=this,t=void 0;try{t=ei(this.inited)&&this.inited()}catch(e){this.$throwError(e)}return this.readySync=!si(t),this.ready=this.readySync?jr.resolve(this):t.then(function(){return e.readySync=!0,e}).catch(function(t){return hi(t)?e.$throwError(t):jr.reject(t)}),this.readySync?this: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(){this.destroyed||(ei(this.destroy)&&this.destroy(),$t(t.prototype.__proto__||te(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){ui(e)&&(this.$dom.style.pointerEvents=e?"auto":"none",this.__operable=e)},get:function(){return this.__operable}},{key:"$level",set:function(e){ri(e)&&(this.__level=e,this.__dispatcher._sortZIndex())},get:function(){return this.__level}},{key:"$autoFocus",get:function(){return this.__autoFocus},set:function(e){this.__autoFocus=e,this.__dispatcher.dom._autoFocusToVideo(this.$dom,!e)}}]),t}())||xu,Nu=["","o","ms","moz","webkit","webkitCurrent"],zu=[["",""],["exit","cancel"],["screen","Screen"]],Fu={position:"fixed",zIndex:"2147483647",left:0,top:0,right:0,bottom:0,overflow:"hidden",width:"100%",height:"100%"},Iu=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],Ru=["fullscreenerror","webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"],$u="undefined"!=typeof document;function Vu(e,t,n){if(ti(t))for(var r in t)Vu(e,r,t[r]);else e.style[t]=n}function Du(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};ti(t)&&(n=t),ai(e)&&(t=e);var r=n.keyOnly,i=void 0!==r&&r;if(!$u)return i?"":void 0;if(fi(e)||(e=document),!ai(t))throw new Error("You must pass in a string as name, but not "+(void 0===t?"undefined":Ft(t))+".");for(var o=0;o<zu.length;o++){t=t.replace(zu[o][0],zu[o][1]);for(var a=0;a<Nu.length;a++){var u=0===a?t:Nu[a]+t.charAt(0).toUpperCase()+t.substr(1);if(void 0!==e[u])return i?u:e[u]}}return i?"":void 0}function Ku(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,u=void 0;if(ei(Event)?u=new Event(t,{bubbles:i,cancelable:a}):$u&&document.createEvent?(u=document.createEvent("HTMLEvents")).initEvent(t,!0,!0):$u&&document.createEventObject&&((u=document.createEventObject()).eventType=t,u.eventName=t),!ti(u)&&!oi(u))throw new Error("We can't create an object on this browser, please report to author");e.dispatchEvent?e.dispatchEvent(u):e.fireEvent?e.fireEvent("on"+u.eventType,u):e[t]?e[t]():e["on"+t]&&e["on"+t]()}function Bu(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}var Wu,Gu,qu,Hu,Uu,Yu,Qu,Zu=Du("fullscreenEnabled"),Ju=!1,Xu=new(Ou=Xo(),Su=Zo("requestFullscreen"),Pu=Zo("exitFullscreen"),Tu=Zo("addEventListener"),Au=Zo("removeEventListener"),Ou((Bu((Lu=function(){function e(){It(this,e),this._fullscreenElement=null,this.isNativelySupport=Zr(Du("fullscreenElement"))&&(!Zr(Zu)||!0===Zu),this._openKey=$u?Du(document.body||document.documentElement,"requestFullscreen",{keyOnly:!0}):"",this._exitKey=Du("exitFullscreen",{keyOnly:!0}),this._useStyleFirst=!1,this.hasUsedStyle=!1}return Vt(e,[{key:"open",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).force,n=void 0!==t&&t;if(!fi(e))throw new Error("You should passed in a legal element to requestFullScreen, but not "+(void 0===e?"undefined":Ft(e))+".");if(!di(document,e))throw new Error("You must pass in a HTML element in document.");var r=this.fullscreenElement;if(r&&r!==e){if(!n)return Ku(document,"fullscreenerror"),!1;this.exit()}if(!this.useStyleFirst){if(this.isNativelySupport)return ei(e[this._openKey])&&e[this._openKey](),!0;if(e instanceof HTMLVideoElement&&e.webkitSupportsFullscreen&&ei(e.webkitEnterFullscreen))return e.webkitEnterFullscreen(),this._fullscreenElement=e,!0}return this._savedStyles=vn(Fu).reduce(function(t,n){return t[n]=e.style[n],t},{}),Vu(e,Fu),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,this.hasUsedStyle=!0,Ku(e,"fullscreenchange"),!0}},{key:"exit",value:function(){if(!this.isFullscreen)return!1;if(this.isNativelySupport&&!this.useStyleFirst&&!this.hasUsedStyle)return document[this._exitKey](),!0;var e=this._fullscreenElement;return Vu(e,this._savedStyles),document.body&&(document.body.style.overflow=this._bodyOverflow),document.documentElement&&(document.documentElement.style.overflow=this._htmlOverflow),this._fullscreenElement=null,this._savedStyles={},Ku(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){if("fullscreenchange"!==n&&"fullscreenerror"!==n&&"esfullscreenmethodchange"!==n)throw new Error(this.constructor.name+' only handle "fullscreenchange", "fullscreenerror" and "esfullscreenmethodchange" event, but not '+n+". Pleas pass in an right event name.");if(!ei(r))throw new Error("You must pass in an legal function, but not "+(void 0===r?"undefined":Ft(r))+".");if(!fi(e)&&e!==document)throw new Error("You should passed in a legal element, but not "+(void 0===e?"undefined":Ft(e))+".");("fullscreenchange"===n?Iu:"fullscreenerror"===n?Ru:[n]).forEach(function(n){e[t](n,r)})}},{key:"useStyleFirst",get:function(){return Ju},set:function(e){return(e=!!e)===Ju?e:(Ju=e,Ku(document,"esfullscreenmethodchange"),e)}},{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 fi(this.fullscreenElement)}}]),e}()).prototype,"open",[Su],D(Lu.prototype,"open"),Lu.prototype),Bu(Lu.prototype,"exit",[Pu],D(Lu.prototype,"exit"),Lu.prototype),Bu(Lu.prototype,"on",[Tu],D(Lu.prototype,"on"),Lu.prototype),Bu(Lu.prototype,"off",[Au],D(Lu.prototype,"off"),Lu.prototype),ju=Lu))||ju);function es(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 ts(e){if("video"===e&&(e="videoElement"),!fi(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 ns(e,t,n){if(!ai(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":Ft(t)));if(!ai(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":Ft(e)));return[e,t,n]}var rs=(Wu=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).other;if(!ei(e)&&!si(e)&&!ai(e))throw new TypeError("@waitUntil only accept Function, Promise or String");return function(n,r,i){var o=i||{},a=o.value,u=o.configurable;if(!ei(a))throw new TypeError("@waituntil can only be used on function, but not "+a+' on property "'+r+'"');var s=!1,c=[],l=si(e)?function(){return e}:ei(e)?e:function(){var n=e.split("."),r=n.slice(-1),i=ci(t)?this:t;if(!s){var o=ho(i,n.slice(0,-1));if(Jr(o))return o;var a=ia(o,r),u=function(e){if(!0===e)for(;c.length>0;)c[0](),c.shift();return e},l=Io(a)?Go({set:u})(o,r,a):Go({set:u})(o,r,{value:void 0,configurable:!0,enumerable:!0,writable:!0});oa(o,r,l),s=!0}return ho(i,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=fo(a,this),o=fo(l,this).apply(void 0,n);return si(o)?jr.resolve(o).then(function(){return fo(a,e).apply(void 0,n)}):!0===o?fo(a,this).apply(void 0,n):new jr(function(e){c.push(function(){i.apply(void 0,n),e()})})},enumerable:!1,configurable:u,writable:!1}}}("__dispatcher.videoConfigReady"),Gu=qo(ns,ts),qu=qo(ns,ts),Hu=qo(ns,ts),Uu=qo(ns,ts),Yu=qo(ts),es((Qu=function(){function e(t,n){It(this,e),this.plugins={},this.originHTML="",this.__mouseInVideo=!1,this.destroyed=!1,this.__videoExtendedNodes=[],this.isFullscreen=!1,this.fullscreenElement=void 0;var r=(t||{}).wrapper;if(this.__dispatcher=n,!fi(r)&&!ai(r))throw new TypeError("Wrapper can only be string or HTMLElement, but not "+(void 0===r?"undefined":Ft(r)));var i=Qi(r);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),this._fullscreenMonitor(),Xu.on("fullscreenchange",this._fullscreenMonitor);var a=Xr(t.videoRequiredGuardedAttributes)?t.videoRequiredGuardedAttributes:[];a.indexOf("style")<0&&a.unshift("style"),this.videoRequireGuardedAttributes=a}return Vt(e,[{key:"mouseInVideo",get:function(){return this.__mouseInVideo},set:function(e){this.__mouseInVideo=!!e}},{key:"videoExtendedNodes",get:function(){return this.__videoExtendedNodes}}]),Vt(e,[{key:"installVideo",value:function(e){if(this.__videoExtendedNodes.push(e),$i(e,"tabindex",-1),this._autoFocusToVideo(e),fi(this.container)){var t=this.container;0===t.childNodes.length?t.appendChild(e):t.insertBefore(e,t.childNodes[0])}else e.parentElement&&fi(e.parentElement)&&e.parentElement!==this.wrapper?this.container=e.parentElement:(this.container=document.createElement("container"),Qi(this.container).append(e));return this.container.parentElement!==this.wrapper&&Qi(this.wrapper).append(this.container),this.videoElement=e,e}},{key:"removeVideo",value:function(){var e=this.videoElement;return this._autoFocusToVideo(this.videoElement,!1),this.__dispatcher.binder&&this.__dispatcher.binder.bindEventOnVideo(e,!0),Qi(e).remove(),delete this.videoElement,e}},{key:"insertPlugin",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!ai(e))throw new TypeError("insertPlugin id parameter must be string");if(fi(this.plugins[e])&&(vi.warn("Dispatcher.dom","Plugin "+e+" have already had a dom node. Now it will be replaced"),this.removePlugin(e)),ai(t))if(/<[^>]+?>/.test(t)){var r=document.createElement("div");r.innerHTML=t,t=r.children[0]}else t=document.createElement(function(e){return xi(e).replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}(t));else ti(t)&&(n=t);var i=n,o=i.inner,a=i.penetrate,u=n.className,s=t&&fi(t)?t:document.createElement("div");Xr(u)&&(u=u.join(" ")),ai(u)&&Vi(s,u),this.plugins[e]=s;var c=o?this.container:this.wrapper,l=o?this.videoElement:this.container;return a&&(this.__dispatcher.binder.bindEventOnPenetrateNode(s),this.__videoExtendedNodes.push(s)),c.lastChild===l?(c.appendChild(s),s):(c.insertBefore(s,l.nextSibling),s)}},{key:"removePlugin",value:function(e){if(ai(e)){var t=this.plugins[e];fi(t)&&(t.parentNode&&t.parentNode.removeChild(t),this._autoFocusToVideo(t,!0));var n=(ec.getPluginConfig(e)||{}).penetrate;void 0!==n&&n&&this.__dispatcher.binder.bindEventOnPenetrateNode(t,!0),delete this.plugins[e]}}},{key:"setPluginsZIndex",value:function(e){var t=this;e.forEach(function(e,n){return Hi(e.match(/^(videoElement|container)$/)?t[e]:t.plugins[e],"z-index",++n)})}},{key:"setAttr",value:function(e,t,n){$i(this[e],t,n)}},{key:"getAttr",value:function(e,t){return Ri(this[e],t)}},{key:"setStyle",value:function(e,t,n){Hi(this[e],t,n)}},{key:"getStyle",value:function(e,t){return qi(this[e],t)}},{key:"requestFullscreen",value:function(e){return Xu.open(this[e])}},{key:"exitFullscreen",value:function(){return Xu.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(bi(r))):this.exitFullscreen.apply(this,bi(r))}},{key:"focus",value:function(){this.videoElement.focus()}},{key:"isNodeInsideVideo",value:function(e){return this.__videoExtendedNodes.indexOf(e)>-1||this.__videoExtendedNodes.reduce(function(t,n){return t||di(n,e)},!1)}},{key:"migrateVideoRequiredGuardedAttributes",value:function(e){var t=this;this.videoRequireGuardedAttributes.map(function(e){return[e,Ri(t.videoElement,e)]}).forEach(function(t){var n=cn(t,2),r=n[0],i=n[1];return $i(e,r,i)})}},{key:"destroy",value:function(){this.removeVideo(),Xu.off("fullscreenchange",this._fullscreenMonitor),this.wrapper.innerHTML=this.originHTML,delete this.wrapper,delete this.plugins,this.destroyed=!0}},{key:"_autoFocusToVideo",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];fi(e)&&((t?Bi:Wi)(e,"mouseup",this._focusToVideo,!1,!0),(t?Bi:Wi)(e,"touchend",this._focusToVideo,!1,!0))}},{key:"_focusToVideo",value:function(){var e=window.scrollX,t=window.scrollY;ei(this.videoElement.focus)&&this.videoElement.focus(),window.scrollTo(e,t)}},{key:"_fullscreenMonitor",value:function(e){var t=Xu.fullscreenElement,n=this.isFullscreen;!t||!di(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),oi(e)&&n!==this.isFullscreen&&this.__dispatcher.binder.triggerSync({name:"fullscreenchange",target:"esFullscreen",id:"dispatcher"},e)}}]),e}()).prototype,"setAttr",[Wu,Gu],D(Qu.prototype,"setAttr"),Qu.prototype),es(Qu.prototype,"getAttr",[qu],D(Qu.prototype,"getAttr"),Qu.prototype),es(Qu.prototype,"setStyle",[Hu],D(Qu.prototype,"setStyle"),Qu.prototype),es(Qu.prototype,"getStyle",[Uu],D(Qu.prototype,"getStyle"),Qu.prototype),es(Qu.prototype,"requestFullscreen",[Yu],D(Qu.prototype,"requestFullscreen"),Qu.prototype),es(Qu.prototype,"_focusToVideo",[ta],D(Qu.prototype,"_focusToVideo"),Qu.prototype),es(Qu.prototype,"_fullscreenMonitor",[ta],D(Qu.prototype,"_fullscreenMonitor"),Qu.prototype),Qu),is={width:"100%",height:"100%",position:"relative",display:"block"},os=function e(t,n,r){var i=this;It(this,e),this.__dispatcher=t,this.__target=n,["width","height","position","display"].forEach(function(e){P(i,e,{get:function(){return this.__dispatcher.dom.getStyle(this.__target,e)},set:function(t){if(ni(t)&&(t+="px"),!ai(t))throw new Error("The value of "+e+" in "+this.__target+"Config must be string, but not "+(void 0===t?"undefined":Ft(t))+".");this.__dispatcher.dom.setStyle(this.__target,e,t)},configurable:!0,enumerable:!0})}),ki(this,r)},as=g.f,us=Ge.fastKey,ss=l?"_s":"size",cs=function(e,t){var n,r=us(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n},ls={getConstructor:function(e,t,n,r){var i=e(function(e,o){On(e,i,t,"_i"),e._t=t,e._i=Ee(null),e._f=void 0,e._l=void 0,e[ss]=0,null!=o&&jn(o,n,e[r],e)});return er(i.prototype,{clear:function(){for(var e=go(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[ss]=0},delete:function(e){var n=go(this,t),r=cs(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[ss]--}return!!r},forEach:function(e){go(this,t);for(var n,r=a(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!!cs(go(this,t),e)}}),l&&as(i.prototype,"size",{get:function(){return go(this,t)[ss]}}),i},def:function(e,t,n){var r,i,o=cs(e,t);return o?o.v=n:(e._l=o={i:i=us(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[ss]++,"F"!==i&&(e._i[i]=o)),e},getEntry:cs,setStrong:function(e,t,n){Ce(e,t,function(e,n){this._t=go(e,t),this._k=n,this._l=void 0},function(){for(var e=this._k,t=this._l;t&&t.r;)t=t.p;return this._t&&(this._l=t=t?t.n:this._t._f)?ze(0,"keys"==e?t.k:"values"==e?t.v:[t.k,t.v]):(this._t=void 0,ze(1))},n?"entries":"values",!n,!0),nr(t)}};To("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=ls.getEntry(go(this,"Map"),e);return t&&t.v},set:function(e,t){return ls.def(go(this,"Map"),0===e?0:e,t)}},ls,!0);k(k.P+k.R,"Map",{toJSON:function(e){return function(){if(Jt(this)!=e)throw TypeError(e+"#toJSON isn't generic");return jn(this,!1,(n=[]).push,n,t),n;var t,n}}("Map")}),Ao("Map"),jo("Map");var fs,ds,hs,ps,vs,ys=i.Map,gs=t(n(function(e){e.exports={default:ys,__esModule:!0}}));function ms(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}var ws=/^(before|after|_)/;function bs(e){return!e.match(ws)||(vi.warn("bus",'Secondary Event "'+e+'" could not be call straightly by API.'),!1)}var _s,Es,ks,xs,Os,Ss,Ps,Ts,As,js,Ls,Ms,Cs=(fs=ha(bs),ds=ha(bs,{backup:function(){return!1}}),hs=ha(bs),ps=ha(bs,{backup:function(){return!1}}),ms((vs=function(){function e(t,n){It(this,e),this.events={},this.onceMap={},this.__dispatcher=t,this.__kind=n}return Vt(e,[{key:"on",value:function(e,t,n,r){this._addEvent([t,r,e],n)}},{key:"off",value:function(e,t,n,r){var i=[t,r,e];if(!this._removeEvent(i,n)){var o=this._getHandlerFromOnceMap(i,n);ei(o)&&this._removeEvent(i,o)&&this._removeFromOnceMap(i,n,o)}}},{key:"once",value:function(e,t,n,r){var i=this,o=[t,r,e],a=function e(){Oi(n,this).apply(void 0,arguments),i._removeEvent(o,e),i._removeFromOnceMap(o,n,e)};this._addEvent(o,a),this._addToOnceMap(o,n,a)}},{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(ii(o))return Sa.indexOf(e)>-1?jr.resolve():this._eventProcessor.apply(this,[e,{sync:!1}].concat(bi(r)));var a=this._getEventQueue(o.before,this.__dispatcher.order);return Ti.apply(void 0,[a].concat(bi(r))).then(function(){if(!(Sa.indexOf(e)>-1))return t._eventProcessor.apply(t,[e,{sync:!1}].concat(bi(r)))}).catch(function(e){return hi(e)&&t.__dispatcher.throwError(e),jr.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(ii(t))return Sa.indexOf(e)>-1||this._eventProcessor.apply(this,[e,{sync:!0}].concat(bi(r)));var o=this._getEventQueue(t.before,this.__dispatcher.order);return Ai.apply(void 0,[o].concat(bi(r)))&&(Sa.indexOf(e)>-1||this._eventProcessor.apply(this,[e,{sync:!0}].concat(bi(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(ii(o))return jr.resolve(!0);var a=this._getEventQueue(o.main,this.__dispatcher.order);return Ti.apply(void 0,[a].concat(bi(r))).then(function(){var e=t._getEventQueue(o.after,t.__dispatcher.order);return Ti.apply(void 0,[e].concat(bi(r)))}).then(function(){return t._runSideEffectEvent.apply(t,[e,t.__dispatcher.order].concat(bi(r)))}).catch(function(n){return hi(n)&&t.__dispatcher.throwError(n),t._runSideEffectEvent.apply(t,[e,t.__dispatcher.order].concat(bi(r)))})}},{key:"triggerSync",value:function(e){var t=this.events[e];if(ii(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 u=Ai.apply(void 0,[n].concat(bi(o)))&&Ai.apply(void 0,[r].concat(bi(o)));return this._runSideEffectEvent.apply(this,[e,this.__dispatcher.order].concat(bi(o))),u}},{key:"destroy",value:function(){delete this.events,delete this.__dispatcher}},{key:"_addEvent",value:function(e,t){var n=(e=Ei(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=Ei(e)).pop(),r=this.events,i=[],o=0,a=e.length;o<a;o++){var u=r[e[o]];if(ii(u))return;i.push([r,e[o]]),r=u}var s=r[n]||[],c=s.indexOf(t),l=c>-1;if(l&&s.splice(c,1),s.length<1){delete r[n];for(var f=i.length-1;f>-1;f--){var d=cn(i[f],2),h=d[0],p=d[1];if(!ii(h[p]))break;delete h[p]}}return l}},{key:"_addToOnceMap",value:function(e,t,n){var r=e.join("-"),i=this.onceMap[r]=this.onceMap[r]||new gs;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),ii(o)&&i.delete(t)}},{key:"_getHandlerFromOnceMap",value:function(e,t){var n=e.join("-"),r=this.onceMap[n];if(!Jr(r)&&r.has(t))return r.get(t)[0]}},{key:"_getEventStage",value:function(e){var t=e.match(ws),n=t&&t[0]||"main";return t&&(e=xi(e.replace(ws,""))),{stage:n,key:e}}},{key:"_getEventQueue",value:function(e,t){var n=this;return t=Xr(t)?t.concat(["_vm"]):["_vm"],ii(e)?[]:t.reduce(function(t,r){return ii(e[r])||!Xr(e[r])||!n.__dispatcher.plugins[r]&&"_vm"!==r?t:t.concat(e[r].map(function(e){return Oi(e,n.__dispatcher.plugins[r]||n.__dispatcher.vm)}))},[])}},{key:"_eventProcessor",value:function(e,t){for(var n=t.sync,r=Ta.indexOf(e)>-1,i=La.indexOf(e)>-1,o=Boolean(Aa[e]),a=arguments.length,u=Array(a>2?a-2:0),s=2;s<a;s++)u[s-2]=arguments[s];if(r||i||o){var c,l;if(o)(c=this.__dispatcher)[Aa[e]].apply(c,bi(u));else(l=this.__dispatcher[r?"kernel":"dom"])[e].apply(l,bi(u));if(_a.indexOf(e)>-1||ka.indexOf(e)>-1)return!0}return this[n?"triggerSync":"trigger"].apply(this,[e].concat(bi(u)))}},{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!ii(o)&&(this._getEventQueue(o._,t).forEach(function(e){return e.apply(void 0,bi(r))}),!0)}}]),e}()).prototype,"emit",[fs],D(vs.prototype,"emit"),vs.prototype),ms(vs.prototype,"emitSync",[ds],D(vs.prototype,"emitSync"),vs.prototype),ms(vs.prototype,"trigger",[hs],D(vs.prototype,"trigger"),vs.prototype),ms(vs.prototype,"triggerSync",[ps],D(vs.prototype,"triggerSync"),vs.prototype),vs);function Ns(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}var zs=/^(before|after|_)/;function Fs(e){var t=e.name,n=e.target,r=e.stage,i=function(e){var t=new RegExp("^(c|w)_");if(e.match(t)){var n=e.replace(t,""),r=0===e.indexOf("c")?"container":"wrapper";return vi.warn("We no longer support event names like "+e+". Please use "+n+" and options like { target: '"+r+"' } instead"),{name:n,target:r}}return"error"===e&&{name:"error",target:"kernel"}}(t);i&&(t=i.name,n=i.target);var o=function(e){var t=e.match(zs),n=t&&t[0]||"main";return t&&(e=xi(e.replace(zs,""))),{name:e,stage:n}}(t),a=o.stage;return t=o.name,n||(n=function(e){return _a.indexOf(e)>-1?"video":ja.indexOf(e)>-1?"kernel":ka.indexOf(e)>-1?"video-dom":xa.indexOf(e)>-1?"esFullscreen":"plugin"}(t)),{name:t,stage:r||a,target:n}}function Is(e){var t=e.id,n=e.fn,r=Fs(e),i=r.name,o=r.target,a=r.stage;if(!ei(n))throw new Error("You must provide a function to handle with event "+i+", but not "+(void 0===n?"undefined":Ft(n)));return{id:t,fn:n,name:i,target:o,stage:a}}function Rs(e){var t=e.id,n=e.name;return n&&ai(n)&&!zs.test(n)?!(!t||!ai(t))||(vi.error("You must provide the id of emitter"),!1):(vi.error("You must provide a legal event name, which is string and could not started with before/after/_"),!1)}function $s(e){e.target=Fs(e).target;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(bi(n))}var Vs,Ds,Ks,Bs,Ws,Gs,qs,Hs=(_s=qo(Is),Es=qo(Is),ks=qo(Is),xs=ha(Rs),Os=qo($s),Ss=ha(Rs,{backup:function(){return!1}}),Ps=qo($s),Ts=ha(Rs),As=qo($s),js=ha(Rs,{backup:function(){return!1}}),Ls=qo($s),Ns((Ms=function(){function e(t){It(this,e),this.__dispatcher=t,this.kinds=["kernel","container","wrapper","video","video-dom","plugin","esFullscreen"],this.buses={},this.bindedEventNames={},this.bindedEventInfo={},this.pendingEventsInfo={};var n=!0,r=!1,i=void 0;try{for(var o,a=sn(this.kinds);!(n=(o=a.next()).done);n=!0){var u=o.value;this.bindedEventNames[u]=[],this.bindedEventInfo[u]=[],this.pendingEventsInfo[u]=[],this.buses[u]=new Cs(t,u)}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}}return Vt(e,[{key:"on",value:function(e){var t=e.target,n=e.id,r=e.name,i=e.fn,o=e.stage;return this._addEventListenerOnTarget({name:r,target:t,id:n}),this.buses[t].on(n,r,i,o)}},{key:"off",value:function(e){var t=e.target,n=e.id,r=e.name,i=e.fn,o=e.stage,a=this.buses[t].off(n,r,i,o);return this._removeEventListenerOnTargetWhenIsUseless({name:r,target:t}),a}},{key:"once",value:function(e){var t=e.target,n=e.id,r=e.name,i=e.fn,o=e.stage;return this.buses[t].once(n,r,i,o)}},{key:"emit",value:function(e){for(var t,n=e.target,r=e.name,i=arguments.length,o=Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];return(t=this.buses[n]).emit.apply(t,[r].concat(bi(o)))}},{key:"emitSync",value:function(e){for(var t,n=e.target,r=e.name,i=arguments.length,o=Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];return(t=this.buses[n]).emitSync.apply(t,[r].concat(bi(o)))}},{key:"trigger",value:function(e){for(var t,n=e.target,r=e.name,i=arguments.length,o=Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];return(t=this.buses[n]).trigger.apply(t,[r].concat(bi(o)))}},{key:"triggerSync",value:function(e){for(var t,n=e.target,r=e.name,i=arguments.length,o=Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];return(t=this.buses[n]).triggerSync.apply(t,[r].concat(bi(o)))}},{key:"bindEventOnPenetrateNode",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.bindedEventInfo["video-dom"].forEach(function(r){var i=cn(r,2),o=i[0],a=i[1];n?Bi(e,o,a):t._addEventOnDom(e,o,a)})}},{key:"bindEventOnVideo",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.bindedEventInfo["video-dom"].concat(this.bindedEventInfo.video).forEach(function(r){var i=cn(r,2),o=i[0],a=i[1];n?Bi(e,o,a):t._addEventOnDom(e,o,a)})}},{key:"listenOnMouseMoveEvent",value:function(e){var t=this,n=this.__dispatcher.dom,r="video-dom",i="_vm";Pa.forEach(function(o){var a=function(){for(var e=arguments.length,a=Array(e),u=0;u<e;u++)a[u]=arguments[u];var s=a[0],c=s.toElement,l=s.currentTarget,f=s.relatedTarget,d=s.type,h=c||f;return n.mouseInVideo&&"mouseleave"===d&&!n.isNodeInsideVideo(h)?(n.mouseInVideo=!1,t.triggerSync.apply(t,[{target:r,name:o,id:i}].concat(a))):!n.mouseInVideo&&"mouseenter"===d&&n.isNodeInsideVideo(l)?(n.mouseInVideo=!0,t.triggerSync.apply(t,[{target:r,name:o,id:i}].concat(a))):void 0};t._addEventOnDom(e,o,a),t.bindedEventNames[r].indexOf(o)<0&&(t.bindedEventNames[r].push(o),t.bindedEventInfo[r].push([o,a]))})}},{key:"migrateKernelEvent",value:function(e,t){this.bindedEventInfo.kernel.forEach(function(n){var r=cn(n,2),i=r[0],o=r[1];e.off(i,o),t.on(i,o)})}},{key:"destroy",value:function(){var e=this;this.kinds.forEach(function(t){if("kernel"===t)e.bindedEventInfo.kernel.forEach(function(t){var n=cn(t,2),r=n[0],i=n[1];e.__dispatcher.kernel.off(r,i)});else{var n=e._getTargetDom(t);e.bindedEventInfo[t].forEach(function(r){var i=cn(r,2),o=i[0],a=i[1];Bi(n,o,a),"video-dom"===t&&e.__dispatcher.dom.videoExtendedNodes.forEach(function(e){return Bi(e,o,a)})})}e.bindedEventInfo.kernel=[],e.bindedEventNames.kernel=[]})}},{key:"_addEventOnDom",value:function(e,t,n){if(Oa.indexOf(t)>-1)return Wi(e,t,n,!1,{passive:!0});Wi(e,t,n)}},{key:"_addEventListenerOnTarget",value:function(e){var t=this,n=e.name,r=e.target,i=e.id;if(this._isEventNeedToBeHandled(r,n)){var o=void 0;if(!(this.bindedEventNames[r].indexOf(n)>-1)){var a=this._getTargetDom(r);if("kernel"===r){if(!this.__dispatcher.kernel)return void this.addPendingEvent(r,n,i);o=function(){for(var e=arguments.length,i=Array(e),o=0;o<e;o++)i[o]=arguments[o];return t.triggerSync.apply(t,[{target:r,name:n,id:"kernel"}].concat(i))},this.__dispatcher.kernel.on(n,o)}else"container"===r||"wrapper"===r?(o=function(){for(var e=arguments.length,i=Array(e),o=0;o<e;o++)i[o]=arguments[o];return t.triggerSync.apply(t,[{target:r,name:n,id:r}].concat(i))},this._addEventOnDom(a,n,o)):"video"===r?(o=function(){for(var e=arguments.length,i=Array(e),o=0;o<e;o++)i[o]=arguments[o];return t.trigger.apply(t,[{target:r,name:n,id:r}].concat(i))},this._addEventOnDom(a,n,o)):"video-dom"===r&&(o=function(){for(var e=arguments.length,i=Array(e),o=0;o<e;o++)i[o]=arguments[o];return t.triggerSync.apply(t,[{target:r,name:n,id:r}].concat(i))},this.__dispatcher.dom.videoExtendedNodes.forEach(function(e){return t._addEventOnDom(e,n,o)}),this._addEventOnDom(a,n,o));this.bindedEventNames[r].push(n),this.bindedEventInfo[r].push([n,o])}}}},{key:"_removeEventListenerOnTargetWhenIsUseless",value:function(e){var t=e.name,n=e.target;if(this._isEventNeedToBeHandled(n,t)){var r=this.bindedEventNames[n],i=r.indexOf(t);if(!(i<0)&&ii(this.buses[n].events[t])){var o=this.bindedEventInfo[n],a=void 0,u=void 0;for(u=0;u<o.length;u++)if(o[u][0]===t){a=o[u][1];break}if(ei(a)){if("kernel"===n)this.__dispatcher.kernel.off(t,a);else Bi(this._getTargetDom(n),t,a),"video-dom"===n&&this.__dispatcher.dom.videoExtendedNodes.forEach(function(e){Bi(e,t,a)});o.splice(u,1),r.splice(i,1)}}}}},{key:"_getTargetDom",value:function(e){var t=void 0;switch(e){case"container":case"wrapper":t=this.__dispatcher.dom[e];break;default:t=this.__dispatcher.dom.videoElement}return t}},{key:"_isEventNeedToBeHandled",value:function(e,t){return"plugin"!==e&&"esFullscreen"!==e&&(Pa.indexOf(t)<0||"video"!==e)}},{key:"addPendingEvent",value:function(e,t,n){this.pendingEventsInfo[e].push([t,n])}},{key:"applyPendingEvents",value:function(e){for(var t=this.pendingEventsInfo[e],n=t.splice(0,t.length);n.length;){var r=n.pop(),i=cn(r,2),o=i[0],a=i[1];this._addEventListenerOnTarget({name:o,target:e,id:a})}}}]),e}()).prototype,"on",[_s],D(Ms.prototype,"on"),Ms.prototype),Ns(Ms.prototype,"off",[Es],D(Ms.prototype,"off"),Ms.prototype),Ns(Ms.prototype,"once",[ks],D(Ms.prototype,"once"),Ms.prototype),Ns(Ms.prototype,"emit",[xs,Os],D(Ms.prototype,"emit"),Ms.prototype),Ns(Ms.prototype,"emitSync",[Ss,Ps],D(Ms.prototype,"emitSync"),Ms.prototype),Ns(Ms.prototype,"trigger",[Ts,As],D(Ms.prototype,"trigger"),Ms.prototype),Ns(Ms.prototype,"triggerSync",[js,Ls],D(Ms.prototype,"triggerSync"),Ms.prototype),Ms);function Us(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}var Ys={},Qs={};function Zs(e){if(!ai(e))throw new Error("Plugin's name must be a string, but not \""+e+'" in '+(void 0===e?"undefined":Ft(e)));return xi(e)}var Js,Xs,ec=(Vs=qo(Zs),Ds=qo(Zs),Ks=qo(function(e){if(ei(e)){if(!(e.prototype instanceof Cu))throw new TypeError("Your are trying to install plugin "+e.name+", but it's not extends from Chimee.plugin.")}else{if(!ti(e)||ii(e))throw new TypeError("plugin's config must be an Object, but not \""+e+'" in '+(void 0===e?"undefined":Ft(e)));var t=e.name;if(!ai(t)||t.length<1)throw new TypeError('plugin must have a legal namea, but not "'+t+'" in '+(void 0===t?"undefined":Ft(t)))}}),Bs=qo(Zs),Ws=qo(Zs),Gs=qo(Zs),Us((qs=function(){function e(t,n){var r=this;if(It(this,e),this.plugins={},this.order=[],this.readySync=!1,this.zIndexMap={inner:[],outer:[]},this.changeWatchable=!0,this.kernelEventHandlerList=[],!ti(t))throw new TypeError('UserConfig must be an Object, but not "'+t+'" in '+(void 0===t?"undefined":Ft(t)));this.dom=new rs(t,this),this.vm=n,this.videoConfigReady=!1,this.videoConfig=new Eu(this,t),Xr(t.plugins)&&!Xr(t.plugin)&&(t.plugin=t.plugins,delete t.plugins),this.binder=new Hs(this),this.binder.listenOnMouseMoveEvent(this.dom.videoElement),this._initUserPlugin(t.plugin);var i=ki({},is,t.container||{});if(this.order.forEach(function(e){return r.plugins[e].__init(r.videoConfig,i)}),this.videoConfigReady=!0,this.videoConfig.init(),this.containerConfig=new os(this,"container",i),this.kernel=this._createKernel(this.dom.videoElement,this.videoConfig),this.binder.applyPendingEvents("kernel"),t.noDefaultContextMenu){var o=t.noDefaultContextMenu,a="container"===o||"wrapper"===o?o:"video-dom";this.binder.on({target:a,id:"_vm",name:"contextmenu",fn:function(e){return e.preventDefault()},stage:"main"})}var u=[];this.order.forEach(function(e){var t=r.plugins[e].__inited();si(t)&&u.push(t)}),this.readySync=0===u.length,this.ready=this.readySync?jr.resolve():jr.all(u).then(function(){r.readySync=!0,r.onReady()}),this.readySync&&this.onReady()}return Vt(e,[{key:"onReady",value:function(){this.binder.trigger({target:"plugin",name:"ready",id:"dispatcher"}),this._autoloadVideoSrcAtFirst()}},{key:"use",value:function(t){if(ai(t)&&(t={name:t,alias:void 0}),!ti(t)||ti(t)&&!ai(t.name))throw new TypeError("pluginConfig do not match requirement");ai(t.alias)||(t.alias=void 0);var n=t,r=n.name,i=n.alias;t.name=i||r,delete t.alias;var o=xi(r),a=xi(i||r),u=t,s=e.getPluginConfig(o);if(ii(s))throw new TypeError("You have not installed plugin "+o);ti(s)&&(s.id=a);var c=ei(s)?new s({id:a},this,u):new Cu(s,this,u);return this.plugins[a]=c,P(this.vm,a,{value:c,configurable:!0,enumerable:!1,writable:!1}),this.order.push(a),this._sortZIndex(),this.videoConfigReady&&c.__inited(),c.ready}},{key:"unuse",value:function(e){var t=this.plugins[e];if(ti(t)&&ei(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:"hasUsed",value:function(e){return ti(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,u=n.repeatTimes,s=void 0===u?0:u,c=n.increment,l=void 0===c?0:c,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,y=void 0===v?this.videoConfig.kernels:v,g=n.preset,m=void 0===g?this.videoConfig.preset:g,w=n.immediate||d,b={isLive:d,box:p,src:e,kernels:y,preset:m};return Ti(new Array(s+1).fill(1).map(function(e,r){return function(){return new jr(function(e,o){n.abort&&o({error:!0,message:"user abort the mission"});var u=document.createElement("video"),c=t.kernel.currentTime+i+l*r;u.muted=!0;var f=!1,h=void 0,p=void 0,v=void 0,y=void 0,g=function n(){var r=t.kernel.currentTime;if(a<=0&&r>=c||a>0&&(Math.abs(c-r)<=a&&f||r-c>a))return Bi(t.dom.videoElement,"timeupdate",n),Bi(u,"error",p,!0),f?o({error:!1,video:u,kernel:h}):(Bi(u,"canplay",v,!0),Bi(u,"loadedmetadata",y,!0),h.destroy(),e())};v=function(){if(f=!0,w)return Bi(t.dom.videoElement,"timeupdate",g),Bi(u,"error",p,!0),o({error:!1,video:u,kernel:h})},y=function(){d||h.seek(w?t.kernel.currentTime:c)},p=function(n){Bi(u,"canplay",v,!0),Bi(u,"loadedmetadata",y,!0),Bi(t.dom.videoElement,"timeupdate",g),h.off("error",p);var i=void 0;if(!ii(n.data)&&n.data.errmsg){var a=n.data.errmsg;vi.error("chimee's silentload bump into a kernel error",a),i=new Error(a)}else i=ii(u.error)?new Error("unknow video error"):new Error(u.error.message),vi.error("chimee's silentload",i.message);return h.destroy(),t._silentLoadTempKernel=void 0,r===s?o(i):e(i)},Wi(u,"canplay",v,!0),Wi(u,"loadedmetadata",y,!0),Wi(u,"error",p,!0),h=t._createKernel(u,b),t._silentLoadTempKernel=h,h.on("error",p),Wi(t.dom.videoElement,"timeupdate",g),h.load()})}})).then(function(){var t="The silentLoad for "+e+" timed out. Please set a longer duration or check your network";return vi.warn("chimee's silentLoad",t),jr.reject(new Error(t))}).catch(function(e){if(hi(e))return jr.reject(e);if(e.error)return vi.warn("chimee's silentLoad",e.message),jr.reject(new Error(e.message));var r=e.video,i=e.kernel;return n.abort?(i.destroy(),jr.reject(new Error("user abort the mission"))):t.dom.videoElement.paused?(t.switchKernel({video:r,kernel:i,config:b}),jr.resolve()):new jr(function(e){Wi(r,"play",function(){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]:{},n=ai(e)?e:ti(e)&&ai(e.src)?e.src:"";ti(e)&&(delete e.src,t=e);var r=this.kernel.box,i=this.videoConfig,o=t,a=o.isLive,u=void 0===a?i.isLive:a,s=o.box,c=void 0===s?eo({src:n,box:i.box}):s,l=o.preset,f=void 0===l?i.preset:l,d=o.kernels,h=void 0===d?i.kernels:d;if("native"!==c||c!==r||!ii(t)){var p=document.createElement("video"),v={isLive:u,box:c,preset:f,src:n,kernels:h},y=this._createKernel(p,v);this.switchKernel({video:p,kernel:y,config:v,notifyChange:!0})}var g=this.videoConfig.autoload;this._changeUnwatchable(this.videoConfig,"autoload",!1),this.videoConfig.src=n||this.videoConfig.src,this.kernel.load(this.videoConfig.src),this._changeUnwatchable(this.videoConfig,"autoload",g)}},{key:"switchKernel",value:function(e){var t=this,n=e.video,r=e.kernel,i=e.config,o=e.notifyChange,a=this.kernel,u=Ei(this.videoConfig);this.dom.migrateVideoRequiredGuardedAttributes(n),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]=u[e])}),this.videoConfig.changeWatchable=!0,this.binder.migrateKernelEvent(a,r),this.kernel=r,this._silentLoadTempKernel=void 0;var s=i.isLive,c=i.box,l=i.preset,f=i.kernels;zr(this.videoConfig,{isLive:s,box:c,preset:l,kernels:f}),a.destroy(),o?this.binder&&this.binder.bindEventOnVideo&&this.binder.bindEventOnVideo(n):setTimeout(function(){t.binder&&t.binder.bindEventOnVideo&&t.binder.bindEventOnVideo(n)}),this.inPictureInPictureMode&&this.exitPictureInPicture()}},{key:"requestPictureInPicture",value:function(){var t=Lr(xn.mark(function t(){var n,r,i;return xn.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!("pictureInPictureEnabled"in document)){t.next=8;break}if(!this.inPictureInPictureMode){t.next=3;break}return t.abrupt("return",jr.resolve(window.__chimee_picture_in_picture_window));case 3:return t.next=5,this.dom.videoElement.requestPictureInPicture();case 5:return n=t.sent,window.__chimee_picture_in_picture_window=n,t.abrupt("return",n);case 8:return t.next=10,Promise.resolve().then(function(){return Yc});case 10:return r=t.sent,i=r.default,e.hasInstalled(i.name)||e.install(i),this.hasUsed(i.name)||this.use(i.name),t.abrupt("return",this.plugins.pictureInPicture.requestPictureInPicture());case 15:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"exitPictureInPicture",value:function(){return"pictureInPictureEnabled"in document&&this.inPictureInPictureMode?(window.__chimee_picture_in_picture_window=void 0,document.exitPictureInPicture()):this.plugins.pictureInPicture&&this.plugins.pictureInPicture.exitPictureInPicture()}},{key:"destroy",value:function(){for(var e in this.plugins)this.unuse(e);this.binder.destroy(),delete this.binder,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 Xr(t)||(vi.warn("Dispatcher",'UserConfig.plugin can only by an Array, but not "'+t+'" in '+(void 0===t?"undefined":Ft(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(ii(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=Pi(n),o=Pi(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 ii(n)?0:n.$level}},{key:"_autoloadVideoSrcAtFirst",value:function(){if(this.videoConfig.autoload){if(!this.videoConfig.src)return void vi.warn("You have not set the src, so you better set autoload to be false. Accroding to https://github.com/Chimeejs/chimee/blob/master/doc/zh-cn/chimee-api.md#src.");this.binder.emit({name:"load",target:"plugin",id:"dispatcher"},{src: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;ii(n)&&!ii(r)&&vi.warn("preset will be deprecated in next major version, please use kernels instead.");var i={},o={};return Xr(n)&&(o=n.reduce(function(e,t){if(ai(t)){var n=Qs[t];return ei(n)?(e[t]=n,e):(vi.warn("You have not installed kernel for "+t+"."),e)}if(ti(t)){var r=t.name,o=t.handler;if(ai(o)){var a=Qs[o];return ei(a)?(e[o]=a,i[o]=t,e):(vi.warn("You have not installed kernel for "+o+"."),e)}if(ei(o)){var u=r||o.name;return e[u]=o,i[u]=t,e}return vi.warn("When you pass in an SingleKernelConfig in Array, you must clarify it's handler, we only support handler in string or function but not "+(void 0===o?"undefined":Ft(o))),e}return vi.warn("If you pass in kernels as array, you must pass in kernels in string or function, but not "+(void 0===t?"undefined":Ft(t))),e},{})),ti(n)&&vn(n).forEach(function(e){var t=n[e];if(!ei(t)){if(ti(t)){var r=t.handler;if(ai(r)){var a=Qs[r];return ei(a)?(o[e]=a,void(i[e]=t)):void vi.warn("You have not installed kernel for "+r+".")}return ei(r)?(o[e]=r,void(i[e]=t)):void vi.warn("When you pass in an SingleKernelConfig in Object, you must clarify it's handler, we only support handler in string or function but not "+(void 0===r?"undefined":Ft(r)))}return vi.warn("If you pass in kernels as object, you must pass in kernels in string or function, but not "+(void 0===t?"undefined":Ft(t))),n}o[e]=t}),t.preset=zr(o,r),t.presetConfig=i,new to(e,t)}},{key:"inPictureInPictureMode",get:function(){return"pictureInPictureEnabled"in document?this.dom.videoElement===document.pictureInPictureElement:Boolean(this.plugins.pictureInPicture&&this.plugins.pictureInPicture.isShown)}}],[{key:"install",value:function(e){var t=e.name,n=xi(t);ii(Ys[n])||vi.warn("Dispatcher","You have installed "+t+" again. And the older one will be replaced");var r=ei(e)?e:ki({id:n},e);return Ys[n]=r,n}},{key:"hasInstalled",value:function(e){return!ii(Ys[e])}},{key:"uninstall",value:function(e){delete Ys[e]}},{key:"getPluginConfig",value:function(e){return Ys[e]}},{key:"installKernel",value:function(e,t){(ti(e)?hn(e):[[e,t]]).forEach(function(e){var t=cn(e,2),n=t[0],r=t[1];if(!ei(r))throw new Error("The kernel you install on "+n+" must be a Function, but not "+(void 0===r?"undefined":Ft(r)));ei(Qs[n])&&vi.warn("You have alrady install a kernel on "+n+", and now we will replace it"),Qs[n]=r})}},{key:"uninstallKernel",value:function(e){delete Qs[e]}},{key:"hasInstalledKernel",value:function(e){return ei(Qs[e])}}]),e}()).prototype,"unuse",[Vs],D(qs.prototype,"unuse"),qs.prototype),Us(qs.prototype,"hasUsed",[Ds],D(qs.prototype,"hasUsed"),qs.prototype),Us(qs.prototype,"throwError",[ta],D(qs.prototype,"throwError"),qs.prototype),Us(qs.prototype,"inPictureInPictureMode",[aa],D(qs.prototype,"inPictureInPictureMode"),qs.prototype),Us(qs,"install",[Ks],D(qs,"install"),qs),Us(qs,"hasInstalled",[Bs],D(qs,"hasInstalled"),qs),Us(qs,"uninstall",[Ws],D(qs,"uninstall"),qs),Us(qs,"getPluginConfig",[Gs],D(qs,"getPluginConfig"),qs),qs);var tc,nc,rc,ic,oc,ac,uc=(Js=function(){function e(){var t,n,r,i;It(this,e),this.log={error:!0,info:!0,warn:!0,debug:!0,verbose:!0},t=this,n="_silent",i=this,(r=Xs)&&P(t,n,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(i):void 0}),this.errorHandler=void 0;var o=vn(this.log).reduce(function(e,t){return e[t]=Go({get:function(){return vi["ENABLE_"+t.toUpperCase()]},set:function(e){return vi["ENABLE_"+t.toUpperCase()]=e,!0===e&&(this.silent=!1),e}}),e},{});ca(this.log,o,{self:!0})}return Vt(e,[{key:"silent",get:function(){return this._silent},set:function(e){var t=this;e=!!e,this._silent=e,vn(this.log).forEach(function(n){t.log[n]=!e})}},{key:"useStyleFullscreen",get:function(){return Xu.useStyleFirst},set:function(e){Xu.useStyleFirst=!!e}}]),e}(),tc=Js.prototype,nc="_silent",rc=[aa],ic={enumerable:!0,initializer:function(){return!1}},ac={},Object.keys(ic).forEach(function(e){ac[e]=ic[e]}),ac.enumerable=!!ac.enumerable,ac.configurable=!!ac.configurable,("value"in ac||ac.initializer)&&(ac.writable=!0),ac=rc.slice().reverse().reduce(function(e,t){return t(tc,nc,e)||e},ac),oc&&void 0!==ac.initializer&&(ac.value=ac.initializer?ac.initializer.call(oc):void 0,ac.initializer=void 0),void 0===ac.initializer&&(Object.defineProperty(tc,nc,ac),ac=null),Xs=ac,Js),sc=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)}),cc=n(function(e){var t=e.exports={version:"2.6.11"};"number"==typeof __e&&(__e=t)}),lc=(cc.version,function(e){return"object"==typeof e?null!==e:"function"==typeof e}),fc=function(e){if(!lc(e))throw TypeError(e+" is not an object!");return e},dc=function(e){try{return!!e()}catch(e){return!0}},hc=!dc(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),pc=sc.document,vc=lc(pc)&&lc(pc.createElement),yc=!hc&&!dc(function(){return 7!=Object.defineProperty((e="div",vc?pc.createElement(e):{}),"a",{get:function(){return 7}}).a;var e}),gc=Object.defineProperty,mc={f:hc?Object.defineProperty:function(e,t,n){if(fc(e),t=function(e,t){if(!lc(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!lc(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!lc(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!lc(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}(t,!0),fc(n),yc)try{return gc(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}},wc=hc?function(e,t,n){return mc.f(e,t,function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}(1,n))}:function(e,t,n){return e[t]=n,e},bc={}.hasOwnProperty,_c=function(e,t){return bc.call(e,t)},Ec=0,kc=Math.random(),xc=n(function(e){var t=sc["__core-js_shared__"]||(sc["__core-js_shared__"]={});(e.exports=function(e,n){return t[e]||(t[e]=void 0!==n?n:{})})("versions",[]).push({version:cc.version,mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})})("native-function-to-string",Function.toString),Oc=n(function(e){var t,n="Symbol(".concat(void 0===(t="src")?"":t,")_",(++Ec+kc).toString(36)),r=(""+xc).split("toString");cc.inspectSource=function(e){return xc.call(e)},(e.exports=function(e,t,i,o){var a="function"==typeof i;a&&(_c(i,"name")||wc(i,"name",t)),e[t]!==i&&(a&&(_c(i,n)||wc(i,n,e[t]?""+e[t]:r.join(String(t)))),e===sc?e[t]=i:o?e[t]?e[t]=i:wc(e,t,i):(delete e[t],wc(e,t,i)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[n]||xc.call(this)})}),Sc=function(e,t,n){if(function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!")}(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)}},Pc=function(e,t,n){var r,i,o,a,u=e&Pc.F,s=e&Pc.G,c=e&Pc.S,l=e&Pc.P,f=e&Pc.B,d=s?sc:c?sc[t]||(sc[t]={}):(sc[t]||{}).prototype,h=s?cc:cc[t]||(cc[t]={}),p=h.prototype||(h.prototype={});for(r in s&&(n=t),n)o=((i=!u&&d&&void 0!==d[r])?d:n)[r],a=f&&i?Sc(o,sc):l&&"function"==typeof o?Sc(Function.call,o):o,d&&Oc(d,r,o,e&Pc.U),h[r]!=o&&wc(h,r,a),l&&p[r]!=o&&(p[r]=o)};sc.core=cc,Pc.F=1,Pc.G=2,Pc.S=4,Pc.P=8,Pc.B=16,Pc.W=32,Pc.U=64,Pc.R=128;Pc(Pc.G,{global:sc});var Tc,Ac,jc,Lc,Mc,Cc,Nc,zc,Fc,Ic,Rc,$c,Vc,Dc,Kc,Bc,Wc=cc.global;function Gc(e,t,n,r){n&&P(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function qc(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}var Hc=Xo()((Bc=Kc=function(e){function t(e){It(this,t);var n=Rt(this,(t.__proto__||te(t)).call(this));if(n.destroyed=!1,Gc(n,"__id",jc,n),Gc(n,"version",Lc,n),Gc(n,"config",Mc,n),Wc.Object.defineProperty||vi.error("Chimee","We detect that this browser lack of Object.defineProperty. Chimee can't run on this browser"),Wc.Promise||vi.error("Chimee","We detect that this browser lack of Promise. If you are running Chimee in old browser. Please make sure you have import polyfill such as babel-polyfill."),ai(e)||fi(e))e={wrapper:e,controls:!0};else{if(!ti(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 ec(e,n),n.ready=n.__dispatcher.ready,n.readySync=n.__dispatcher.readySync,n.__wrapAsVideo(n.__dispatcher.videoConfig),n}return Yt(t,Mu),Vt(t,null,[{key:"registerEvents",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=e.target;if(!t||!ai(t))throw new Error("The event name must be a string, but not "+(void 0===t?"undefined":Ft(t)));if(!n||!ai(n))throw new Error("The event target must be a string, but not "+(void 0===n?"undefined":Ft(n)));"kernel"===n&&ja.push(t)}}]),Vt(t,[{key:"destroy",value:function(){this.destroyed||($t(t.prototype.__proto__||te(t.prototype),"__destroy",this).call(this),this.__dispatcher.destroy(),Object.defineProperty(this,"__dispatcher",{get:function(){throw new Error("This instance has been destroyed.")},enumerable:!0,configurable:!0}),this.destroyed=!0)}},{key:"use",value:function(e){return this.__dispatcher.use(e)}},{key:"unuse",value:function(e){return this.__dispatcher.unuse(e)}},{key:"__throwError",value:function(e){ai(e)&&(e=new Error(e));var n=this.config.errorHandler||t.config.errorHandler;if(ei(n))return n(e);if(!t.config.silent){if(hi(e))throw e;console.error(e)}}}]),t}(),Kc.plugin=Cu,Kc.config=new uc,Kc.install=ec.install,Kc.uninstall=ec.uninstall,Kc.hasInstalled=ec.hasInstalled,Kc.installKernel=ec.installKernel,Kc.uninstallKernel=ec.uninstallKernel,Kc.hasInstalledKernel=ec.hasInstalledKernel,Kc.getPluginConfig=ec.getPluginConfig,jc=qc((Ac=Bc).prototype,"__id",[ra],{enumerable:!0,initializer:function(){return"_vm"}}),Lc=qc(Ac.prototype,"version",[ra],{enumerable:!0,initializer:function(){return"0.12.0"}}),Mc=qc(Ac.prototype,"config",[ra],{enumerable:!0,initializer:function(){return{errorHandler:void 0}}}),qc(Ac,"plugin",[ra],(Cc=(Cc=D(Ac,"plugin"))?Cc.value:void 0,{enumerable:!0,configurable:!0,writable:!0,initializer:function(){return Cc}}),Ac),qc(Ac,"config",[ra],(Nc=(Nc=D(Ac,"config"))?Nc.value:void 0,{enumerable:!0,configurable:!0,writable:!0,initializer:function(){return Nc}}),Ac),qc(Ac,"install",[ra],(zc=(zc=D(Ac,"install"))?zc.value:void 0,{enumerable:!0,configurable:!0,writable:!0,initializer:function(){return zc}}),Ac),qc(Ac,"uninstall",[ra],(Fc=(Fc=D(Ac,"uninstall"))?Fc.value:void 0,{enumerable:!0,configurable:!0,writable:!0,initializer:function(){return Fc}}),Ac),qc(Ac,"hasInstalled",[ra],(Ic=(Ic=D(Ac,"hasInstalled"))?Ic.value:void 0,{enumerable:!0,configurable:!0,writable:!0,initializer:function(){return Ic}}),Ac),qc(Ac,"installKernel",[ra],(Rc=(Rc=D(Ac,"installKernel"))?Rc.value:void 0,{enumerable:!0,configurable:!0,writable:!0,initializer:function(){return Rc}}),Ac),qc(Ac,"uninstallKernel",[ra],($c=($c=D(Ac,"uninstallKernel"))?$c.value:void 0,{enumerable:!0,configurable:!0,writable:!0,initializer:function(){return $c}}),Ac),qc(Ac,"hasInstalledKernel",[ra],(Vc=(Vc=D(Ac,"hasInstalledKernel"))?Vc.value:void 0,{enumerable:!0,configurable:!0,writable:!0,initializer:function(){return Vc}}),Ac),qc(Ac,"getPluginConfig",[ra],(Dc=(Dc=D(Ac,"getPluginConfig"))?Dc.value:void 0,{enumerable:!0,configurable:!0,writable:!0,initializer:function(){return Dc}}),Ac),Tc=Ac))||Tc,Uc=function(e){function t(e){var n;It(this,t);for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];var a=Rt(this,(n=t.__proto__||te(t)).call.apply(n,[this,zr(e,{el:document.createElement("canvas"),penetrate:!0,inner:!1})].concat(bi(i))));return a.isShown=!1,a.hasStopRender=!0,a.myStyle={position:"fixed",top:"",left:"",right:0,bottom:0,width:277,height:156},a}return Yt(t,Cu),Vt(t,[{key:"create",value:function(){Vi(this.$dom,"chimee-plugin-picture-in-picture"),this.getContext()}},{key:"inited",value:function(){this.setStyle()}},{key:"show",value:function(){Hi(this.$dom,"display","block"),this.isShown=!0}},{key:"hide",value:function(){Hi(this.$dom,"display","none"),this.isShown=!1}},{key:"closeCurrentPicture",value:function(){window.__chimee_picture_in_picture&&window.__chimee_picture_in_picture.plugin&&window.__chimee_picture_in_picture.plugin.exitPictureInPicture()}},{key:"requestPictureInPicture",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).autoplay,t=void 0!==e&&e;this.closeCurrentPicture(),this.show(),this.poller(this.render),t&&this.paused?this.play():t||this.paused||this.pause(),window.__chimee_picture_in_picture={plugin:this,window:this.$dom,element:this.$video}}},{key:"exitPictureInPicture",value:function(){this.hide(),window.__chimee_picture_in_picture={}}},{key:"getContext",value:function(){this.ctx=this.$dom.getContext("2d")}},{key:"poller",value:function(e){var t=this;requestAnimationFrame(function(){e.call(t),t.isShown?(t.poller(e),t.hasStopRender=!1):t.hasStopRender=!0})}},{key:"render",value:function(){this.isShown&&this.ctx.drawImage(this.$video,0,0,this.myStyle.width,this.myStyle.height)}},{key:"setStyle",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t in zr(this.myStyle,e),this.$dom.setAttribute("width",this.myStyle.width.toString()),this.$dom.setAttribute("height",this.myStyle.height.toString()),this.myStyle)if("width"!==t&&"height"!==t){var n=this.myStyle[t];Hi(this.$dom,t,n)}}}]),t}(),Yc=Object.freeze({default:Uc});return Hc});
//# sourceMappingURL=/sm/706d34f95f12bb108aa7c7538eb04ab562fe7fd79417fd4cd19e11dc000a5e89.map