@volcengine/veplayer 2.10.2 → 2.11.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var check=function(e){return e&&e.Math==Math&&e},global$o=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof commonjsGlobal&&commonjsGlobal)||function(){return this}()||commonjsGlobal||Function("return this")(),fails$A=function(e){try{return!!e()}catch(e){return!0}},fails$z=fails$A,functionBindNative=!fails$z((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),NATIVE_BIND$4=functionBindNative,FunctionPrototype$3=Function.prototype,apply$6=FunctionPrototype$3.apply,call$r=FunctionPrototype$3.call,functionApply="object"==typeof Reflect&&Reflect.apply||(NATIVE_BIND$4?call$r.bind(apply$6):function(){return call$r.apply(apply$6,arguments)}),NATIVE_BIND$3=functionBindNative,FunctionPrototype$2=Function.prototype,call$q=FunctionPrototype$2.call,uncurryThisWithBind=NATIVE_BIND$3&&FunctionPrototype$2.bind.bind(call$q,call$q),functionUncurryThis=NATIVE_BIND$3?uncurryThisWithBind:function(e){return function(){return call$q.apply(e,arguments)}},uncurryThis$C=functionUncurryThis,toString$h=uncurryThis$C({}.toString),stringSlice$5=uncurryThis$C("".slice),classofRaw$2=function(e){return stringSlice$5(toString$h(e),8,-1)},classofRaw$1=classofRaw$2,uncurryThis$B=functionUncurryThis,functionUncurryThisClause=function(e){if("Function"===classofRaw$1(e))return uncurryThis$B(e)},documentAll$2="object"==typeof document&&document.all,IS_HTMLDDA=void 0===documentAll$2&&void 0!==documentAll$2,documentAll_1={all:documentAll$2,IS_HTMLDDA:IS_HTMLDDA},$documentAll$1=documentAll_1,documentAll$1=$documentAll$1.all,isCallable$p=$documentAll$1.IS_HTMLDDA?function(e){return"function"==typeof e||e===documentAll$1}:function(e){return"function"==typeof e},objectGetOwnPropertyDescriptor={},fails$y=fails$A,descriptors=!fails$y((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),NATIVE_BIND$2=functionBindNative,call$p=Function.prototype.call,functionCall=NATIVE_BIND$2?call$p.bind(call$p):function(){return call$p.apply(call$p,arguments)},objectPropertyIsEnumerable={},$propertyIsEnumerable$2={}.propertyIsEnumerable,getOwnPropertyDescriptor$b=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$b&&!$propertyIsEnumerable$2.call({1:2},1);objectPropertyIsEnumerable.f=NASHORN_BUG?function(e){var t=getOwnPropertyDescriptor$b(this,e);return!!t&&t.enumerable}:$propertyIsEnumerable$2;var match,version$1,createPropertyDescriptor$8=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},uncurryThis$A=functionUncurryThis,fails$x=fails$A,classof$f=classofRaw$2,$Object$4=Object,split$3=uncurryThis$A("".split),indexedObject=fails$x((function(){return!$Object$4("z").propertyIsEnumerable(0)}))?function(e){return"String"==classof$f(e)?split$3(e,""):$Object$4(e)}:$Object$4,isNullOrUndefined$6=function(e){return null==e},isNullOrUndefined$5=isNullOrUndefined$6,$TypeError$k=TypeError,requireObjectCoercible$8=function(e){if(isNullOrUndefined$5(e))throw $TypeError$k("Can't call method on "+e);return e},IndexedObject$3=indexedObject,requireObjectCoercible$7=requireObjectCoercible$8,toIndexedObject$c=function(e){return IndexedObject$3(requireObjectCoercible$7(e))},isCallable$o=isCallable$p,$documentAll=documentAll_1,documentAll=$documentAll.all,isObject$m=$documentAll.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:isCallable$o(e)||e===documentAll}:function(e){return"object"==typeof e?null!==e:isCallable$o(e)},path$r={},path$q=path$r,global$n=global$o,isCallable$n=isCallable$p,aFunction=function(e){return isCallable$n(e)?e:void 0},getBuiltIn$h=function(e,t){return arguments.length<2?aFunction(path$q[e])||aFunction(global$n[e]):path$q[e]&&path$q[e][t]||global$n[e]&&global$n[e][t]},uncurryThis$z=functionUncurryThis,objectIsPrototypeOf=uncurryThis$z({}.isPrototypeOf),engineUserAgent="undefined"!=typeof navigator&&String(navigator.userAgent)||"",global$m=global$o,userAgent$6=engineUserAgent,process$4=global$m.process,Deno$1=global$m.Deno,versions=process$4&&process$4.versions||Deno$1&&Deno$1.version,v8=versions&&versions.v8;v8&&(version$1=(match=v8.split("."))[0]>0&&match[0]<4?1:+(match[0]+match[1])),!version$1&&userAgent$6&&(!(match=userAgent$6.match(/Edge\/(\d+)/))||match[1]>=74)&&(match=userAgent$6.match(/Chrome\/(\d+)/))&&(version$1=+match[1]);var engineV8Version=version$1,V8_VERSION$3=engineV8Version,fails$w=fails$A,global$l=global$o,$String$5=global$l.String,symbolConstructorDetection=!!Object.getOwnPropertySymbols&&!fails$w((function(){var e=Symbol();return!$String$5(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&V8_VERSION$3&&V8_VERSION$3<41})),NATIVE_SYMBOL$5=symbolConstructorDetection,useSymbolAsUid=NATIVE_SYMBOL$5&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,getBuiltIn$g=getBuiltIn$h,isCallable$m=isCallable$p,isPrototypeOf$p=objectIsPrototypeOf,USE_SYMBOL_AS_UID$1=useSymbolAsUid,$Object$3=Object,isSymbol$6=USE_SYMBOL_AS_UID$1?function(e){return"symbol"==typeof e}:function(e){var t=getBuiltIn$g("Symbol");return isCallable$m(t)&&isPrototypeOf$p(t.prototype,$Object$3(e))},$String$4=String,tryToString$7=function(e){try{return $String$4(e)}catch(e){return"Object"}},isCallable$l=isCallable$p,tryToString$6=tryToString$7,$TypeError$j=TypeError,aCallable$j=function(e){if(isCallable$l(e))return e;throw $TypeError$j(tryToString$6(e)+" is not a function")},aCallable$i=aCallable$j,isNullOrUndefined$4=isNullOrUndefined$6,getMethod$3=function(e,t){var r=e[t];return isNullOrUndefined$4(r)?void 0:aCallable$i(r)},call$o=functionCall,isCallable$k=isCallable$p,isObject$l=isObject$m,$TypeError$i=TypeError,ordinaryToPrimitive$1=function(e,t){var r,n;if("string"===t&&isCallable$k(r=e.toString)&&!isObject$l(n=call$o(r,e)))return n;if(isCallable$k(r=e.valueOf)&&!isObject$l(n=call$o(r,e)))return n;if("string"!==t&&isCallable$k(r=e.toString)&&!isObject$l(n=call$o(r,e)))return n;throw $TypeError$i("Can't convert object to primitive value")},shared$7={exports:{}},isPure=!0,global$k=global$o,defineProperty$f=Object.defineProperty,defineGlobalProperty$1=function(e,t){try{defineProperty$f(global$k,e,{value:t,configurable:!0,writable:!0})}catch(r){global$k[e]=t}return t},global$j=global$o,defineGlobalProperty=defineGlobalProperty$1,SHARED="__core-js_shared__",store$4=global$j[SHARED]||defineGlobalProperty(SHARED,{}),sharedStore=store$4,store$3=sharedStore;(shared$7.exports=function(e,t){return store$3[e]||(store$3[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.2",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"});var sharedExports=shared$7.exports,requireObjectCoercible$6=requireObjectCoercible$8,$Object$2=Object,toObject$d=function(e){return $Object$2(requireObjectCoercible$6(e))},uncurryThis$y=functionUncurryThis,toObject$c=toObject$d,hasOwnProperty$1=uncurryThis$y({}.hasOwnProperty),hasOwnProperty_1=Object.hasOwn||function(e,t){return hasOwnProperty$1(toObject$c(e),t)},uncurryThis$x=functionUncurryThis,id$1=0,postfix=Math.random(),toString$g=uncurryThis$x(1..toString),uid$4=function(e){return"Symbol("+(void 0===e?"":e)+")_"+toString$g(++id$1+postfix,36)},global$i=global$o,shared$6=sharedExports,hasOwn$k=hasOwnProperty_1,uid$3=uid$4,NATIVE_SYMBOL$4=symbolConstructorDetection,USE_SYMBOL_AS_UID=useSymbolAsUid,Symbol$5=global$i.Symbol,WellKnownSymbolsStore$2=shared$6("wks"),createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$5.for||Symbol$5:Symbol$5&&Symbol$5.withoutSetter||uid$3,wellKnownSymbol$q=function(e){return hasOwn$k(WellKnownSymbolsStore$2,e)||(WellKnownSymbolsStore$2[e]=NATIVE_SYMBOL$4&&hasOwn$k(Symbol$5,e)?Symbol$5[e]:createWellKnownSymbol("Symbol."+e)),WellKnownSymbolsStore$2[e]},call$n=functionCall,isObject$k=isObject$m,isSymbol$5=isSymbol$6,getMethod$2=getMethod$3,ordinaryToPrimitive=ordinaryToPrimitive$1,wellKnownSymbol$p=wellKnownSymbol$q,$TypeError$h=TypeError,TO_PRIMITIVE=wellKnownSymbol$p("toPrimitive"),toPrimitive$7=function(e,t){if(!isObject$k(e)||isSymbol$5(e))return e;var r,n=getMethod$2(e,TO_PRIMITIVE);if(n){if(void 0===t&&(t="default"),r=call$n(n,e,t),!isObject$k(r)||isSymbol$5(r))return r;throw $TypeError$h("Can't convert object to primitive value")}return void 0===t&&(t="number"),ordinaryToPrimitive(e,t)},toPrimitive$6=toPrimitive$7,isSymbol$4=isSymbol$6,toPropertyKey$4=function(e){var t=toPrimitive$6(e,"string");return isSymbol$4(t)?t:t+""},global$h=global$o,isObject$j=isObject$m,document$3=global$h.document,EXISTS$1=isObject$j(document$3)&&isObject$j(document$3.createElement),documentCreateElement$1=function(e){return EXISTS$1?document$3.createElement(e):{}},DESCRIPTORS$l=descriptors,fails$v=fails$A,createElement$1=documentCreateElement$1,ie8DomDefine=!DESCRIPTORS$l&&!fails$v((function(){return 7!=Object.defineProperty(createElement$1("div"),"a",{get:function(){return 7}}).a})),DESCRIPTORS$k=descriptors,call$m=functionCall,propertyIsEnumerableModule$2=objectPropertyIsEnumerable,createPropertyDescriptor$7=createPropertyDescriptor$8,toIndexedObject$b=toIndexedObject$c,toPropertyKey$3=toPropertyKey$4,hasOwn$j=hasOwnProperty_1,IE8_DOM_DEFINE$1=ie8DomDefine,$getOwnPropertyDescriptor$2=Object.getOwnPropertyDescriptor;objectGetOwnPropertyDescriptor.f=DESCRIPTORS$k?$getOwnPropertyDescriptor$2:function(e,t){if(e=toIndexedObject$b(e),t=toPropertyKey$3(t),IE8_DOM_DEFINE$1)try{return $getOwnPropertyDescriptor$2(e,t)}catch(e){}if(hasOwn$j(e,t))return createPropertyDescriptor$7(!call$m(propertyIsEnumerableModule$2.f,e,t),e[t])};var fails$u=fails$A,isCallable$j=isCallable$p,replacement=/#|\.prototype\./,isForced$2=function(e,t){var r=data[normalize(e)];return r==POLYFILL||r!=NATIVE&&(isCallable$j(t)?fails$u(t):!!t)},normalize=isForced$2.normalize=function(e){return String(e).replace(replacement,".").toLowerCase()},data=isForced$2.data={},NATIVE=isForced$2.NATIVE="N",POLYFILL=isForced$2.POLYFILL="P",isForced_1=isForced$2,uncurryThis$w=functionUncurryThisClause,aCallable$h=aCallable$j,NATIVE_BIND$1=functionBindNative,bind$q=functionUncurryThisClause(functionUncurryThisClause.bind),functionBindContext=function(e,t){return aCallable$h(e),void 0===t?e:NATIVE_BIND$1?bind$q(e,t):function(){return e.apply(t,arguments)}},objectDefineProperty={},DESCRIPTORS$j=descriptors,fails$t=fails$A,v8PrototypeDefineBug=DESCRIPTORS$j&&fails$t((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),isObject$i=isObject$m,$String$3=String,$TypeError$g=TypeError,anObject$g=function(e){if(isObject$i(e))return e;throw $TypeError$g($String$3(e)+" is not an object")},DESCRIPTORS$i=descriptors,IE8_DOM_DEFINE=ie8DomDefine,V8_PROTOTYPE_DEFINE_BUG$1=v8PrototypeDefineBug,anObject$f=anObject$g,toPropertyKey$2=toPropertyKey$4,$TypeError$f=TypeError,$defineProperty$1=Object.defineProperty,$getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,ENUMERABLE="enumerable",CONFIGURABLE$1="configurable",WRITABLE="writable";objectDefineProperty.f=DESCRIPTORS$i?V8_PROTOTYPE_DEFINE_BUG$1?function(e,t,r){if(anObject$f(e),t=toPropertyKey$2(t),anObject$f(r),"function"==typeof e&&"prototype"===t&&"value"in r&&WRITABLE in r&&!r[WRITABLE]){var n=$getOwnPropertyDescriptor$1(e,t);n&&n[WRITABLE]&&(e[t]=r.value,r={configurable:CONFIGURABLE$1 in r?r[CONFIGURABLE$1]:n[CONFIGURABLE$1],enumerable:ENUMERABLE in r?r[ENUMERABLE]:n[ENUMERABLE],writable:!1})}return $defineProperty$1(e,t,r)}:$defineProperty$1:function(e,t,r){if(anObject$f(e),t=toPropertyKey$2(t),anObject$f(r),IE8_DOM_DEFINE)try{return $defineProperty$1(e,t,r)}catch(e){}if("get"in r||"set"in r)throw $TypeError$f("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var DESCRIPTORS$h=descriptors,definePropertyModule$4=objectDefineProperty,createPropertyDescriptor$6=createPropertyDescriptor$8,createNonEnumerableProperty$9=DESCRIPTORS$h?function(e,t,r){return definePropertyModule$4.f(e,t,createPropertyDescriptor$6(1,r))}:function(e,t,r){return e[t]=r,e},global$g=global$o,apply$5=functionApply,uncurryThis$v=functionUncurryThisClause,isCallable$i=isCallable$p,getOwnPropertyDescriptor$a=objectGetOwnPropertyDescriptor.f,isForced$1=isForced_1,path$p=path$r,bind$p=functionBindContext,createNonEnumerableProperty$8=createNonEnumerableProperty$9,hasOwn$i=hasOwnProperty_1,wrapConstructor=function(e){var t=function(r,n,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,n)}return new e(r,n,i)}return apply$5(e,this,arguments)};return t.prototype=e.prototype,t},_export=function(e,t){var r,n,i,o,a,s,l,c,u,p=e.target,f=e.global,h=e.stat,d=e.proto,y=f?global$g:h?global$g[p]:(global$g[p]||{}).prototype,g=f?path$p:path$p[p]||createNonEnumerableProperty$8(path$p,p,{})[p],$=g.prototype;for(o in t)n=!(r=isForced$1(f?o:p+(h?".":"#")+o,e.forced))&&y&&hasOwn$i(y,o),s=g[o],n&&(l=e.dontCallGetSet?(u=getOwnPropertyDescriptor$a(y,o))&&u.value:y[o]),a=n&&l?l:t[o],n&&typeof s==typeof a||(c=e.bind&&n?bind$p(a,global$g):e.wrap&&n?wrapConstructor(a):d&&isCallable$i(a)?uncurryThis$v(a):a,(e.sham||a&&a.sham||s&&s.sham)&&createNonEnumerableProperty$8(c,"sham",!0),createNonEnumerableProperty$8(g,o,c),d&&(hasOwn$i(path$p,i=p+"Prototype")||createNonEnumerableProperty$8(path$p,i,{}),createNonEnumerableProperty$8(path$p[i],o,a),e.real&&$&&(r||!$[o])&&createNonEnumerableProperty$8($,o,a)))},classof$e=classofRaw$2,isArray$c=Array.isArray||function(e){return"Array"==classof$e(e)},ceil$1=Math.ceil,floor$3=Math.floor,mathTrunc=Math.trunc||function(e){var t=+e;return(t>0?floor$3:ceil$1)(t)},trunc2=mathTrunc,toIntegerOrInfinity$6=function(e){var t=+e;return t!=t||0===t?0:trunc2(t)},toIntegerOrInfinity$5=toIntegerOrInfinity$6,min$4=Math.min,toLength$3=function(e){return e>0?min$4(toIntegerOrInfinity$5(e),9007199254740991):0},toLength$2=toLength$3,lengthOfArrayLike$c=function(e){return toLength$2(e.length)},$TypeError$e=TypeError,MAX_SAFE_INTEGER$1=9007199254740991,doesNotExceedSafeInteger$3=function(e){if(e>MAX_SAFE_INTEGER$1)throw $TypeError$e("Maximum allowed index exceeded");return e},toPropertyKey$1=toPropertyKey$4,definePropertyModule$3=objectDefineProperty,createPropertyDescriptor$5=createPropertyDescriptor$8,createProperty$6=function(e,t,r){var n=toPropertyKey$1(t);n in e?definePropertyModule$3.f(e,n,createPropertyDescriptor$5(0,r)):e[n]=r},wellKnownSymbol$o=wellKnownSymbol$q,TO_STRING_TAG$4=wellKnownSymbol$o("toStringTag"),test$2={};test$2[TO_STRING_TAG$4]="z";var toStringTagSupport="[object z]"===String(test$2),TO_STRING_TAG_SUPPORT$2=toStringTagSupport,isCallable$h=isCallable$p,classofRaw=classofRaw$2,wellKnownSymbol$n=wellKnownSymbol$q,TO_STRING_TAG$3=wellKnownSymbol$n("toStringTag"),$Object$1=Object,CORRECT_ARGUMENTS="Arguments"==classofRaw(function(){return arguments}()),tryGet=function(e,t){try{return e[t]}catch(e){}},classof$d=TO_STRING_TAG_SUPPORT$2?classofRaw:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=tryGet(t=$Object$1(e),TO_STRING_TAG$3))?r:CORRECT_ARGUMENTS?classofRaw(t):"Object"==(n=classofRaw(t))&&isCallable$h(t.callee)?"Arguments":n},uncurryThis$u=functionUncurryThis,isCallable$g=isCallable$p,store$2=sharedStore,functionToString=uncurryThis$u(Function.toString);isCallable$g(store$2.inspectSource)||(store$2.inspectSource=function(e){return functionToString(e)});var inspectSource$2=store$2.inspectSource,uncurryThis$t=functionUncurryThis,fails$s=fails$A,isCallable$f=isCallable$p,classof$c=classof$d,getBuiltIn$f=getBuiltIn$h,inspectSource$1=inspectSource$2,noop=function(){},empty=[],construct$7=getBuiltIn$f("Reflect","construct"),constructorRegExp=/^\s*(?:class|function)\b/,exec$4=uncurryThis$t(constructorRegExp.exec),INCORRECT_TO_STRING=!constructorRegExp.exec(noop),isConstructorModern=function(e){if(!isCallable$f(e))return!1;try{return construct$7(noop,empty,e),!0}catch(e){return!1}},isConstructorLegacy=function(e){if(!isCallable$f(e))return!1;switch(classof$c(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return INCORRECT_TO_STRING||!!exec$4(constructorRegExp,inspectSource$1(e))}catch(e){return!0}};isConstructorLegacy.sham=!0;var isConstructor$4=!construct$7||fails$s((function(){var e;return isConstructorModern(isConstructorModern.call)||!isConstructorModern(Object)||!isConstructorModern((function(){e=!0}))||e}))?isConstructorLegacy:isConstructorModern,isArray$b=isArray$c,isConstructor$3=isConstructor$4,isObject$h=isObject$m,wellKnownSymbol$m=wellKnownSymbol$q,SPECIES$5=wellKnownSymbol$m("species"),$Array$3=Array,arraySpeciesConstructor$1=function(e){var t;return isArray$b(e)&&(t=e.constructor,(isConstructor$3(t)&&(t===$Array$3||isArray$b(t.prototype))||isObject$h(t)&&null===(t=t[SPECIES$5]))&&(t=void 0)),void 0===t?$Array$3:t},arraySpeciesConstructor=arraySpeciesConstructor$1,arraySpeciesCreate$3=function(e,t){return new(arraySpeciesConstructor(e))(0===t?0:t)},fails$r=fails$A,wellKnownSymbol$l=wellKnownSymbol$q,V8_VERSION$2=engineV8Version,SPECIES$4=wellKnownSymbol$l("species"),arrayMethodHasSpeciesSupport$5=function(e){return V8_VERSION$2>=51||!fails$r((function(){var t=[];return(t.constructor={})[SPECIES$4]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},$$1i=_export,fails$q=fails$A,isArray$a=isArray$c,isObject$g=isObject$m,toObject$b=toObject$d,lengthOfArrayLike$b=lengthOfArrayLike$c,doesNotExceedSafeInteger$2=doesNotExceedSafeInteger$3,createProperty$5=createProperty$6,arraySpeciesCreate$2=arraySpeciesCreate$3,arrayMethodHasSpeciesSupport$4=arrayMethodHasSpeciesSupport$5,wellKnownSymbol$k=wellKnownSymbol$q,V8_VERSION$1=engineV8Version,IS_CONCAT_SPREADABLE=wellKnownSymbol$k("isConcatSpreadable"),IS_CONCAT_SPREADABLE_SUPPORT=V8_VERSION$1>=51||!fails$q((function(){var e=[];return e[IS_CONCAT_SPREADABLE]=!1,e.concat()[0]!==e})),isConcatSpreadable=function(e){if(!isObject$g(e))return!1;var t=e[IS_CONCAT_SPREADABLE];return void 0!==t?!!t:isArray$a(e)},FORCED$a=!IS_CONCAT_SPREADABLE_SUPPORT||!arrayMethodHasSpeciesSupport$4("concat");$$1i({target:"Array",proto:!0,arity:1,forced:FORCED$a},{concat:function(e){var t,r,n,i,o,a=toObject$b(this),s=arraySpeciesCreate$2(a,0),l=0;for(t=-1,n=arguments.length;t<n;t++)if(isConcatSpreadable(o=-1===t?a:arguments[t]))for(i=lengthOfArrayLike$b(o),doesNotExceedSafeInteger$2(l+i),r=0;r<i;r++,l++)r in o&&createProperty$5(s,l,o[r]);else doesNotExceedSafeInteger$2(l+1),createProperty$5(s,l++,o);return s.length=l,s}});var classof$b=classof$d,$String$2=String,toString$f=function(e){if("Symbol"===classof$b(e))throw TypeError("Cannot convert a Symbol value to a string");return $String$2(e)},objectDefineProperties={},toIntegerOrInfinity$4=toIntegerOrInfinity$6,max$3=Math.max,min$3=Math.min,toAbsoluteIndex$4=function(e,t){var r=toIntegerOrInfinity$4(e);return r<0?max$3(r+t,0):min$3(r,t)},toIndexedObject$a=toIndexedObject$c,toAbsoluteIndex$3=toAbsoluteIndex$4,lengthOfArrayLike$a=lengthOfArrayLike$c,createMethod$6=function(e){return function(t,r,n){var i,o=toIndexedObject$a(t),a=lengthOfArrayLike$a(o),s=toAbsoluteIndex$3(n,a);if(e&&r!=r){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===r)return e||s||0;return!e&&-1}},arrayIncludes$1={includes:createMethod$6(!0),indexOf:createMethod$6(!1)},hiddenKeys$6={},uncurryThis$s=functionUncurryThis,hasOwn$h=hasOwnProperty_1,toIndexedObject$9=toIndexedObject$c,indexOf$7=arrayIncludes$1.indexOf,hiddenKeys$5=hiddenKeys$6,push$i=uncurryThis$s([].push),objectKeysInternal=function(e,t){var r,n=toIndexedObject$9(e),i=0,o=[];for(r in n)!hasOwn$h(hiddenKeys$5,r)&&hasOwn$h(n,r)&&push$i(o,r);for(;t.length>i;)hasOwn$h(n,r=t[i++])&&(~indexOf$7(o,r)||push$i(o,r));return o},enumBugKeys$3=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$1=objectKeysInternal,enumBugKeys$2=enumBugKeys$3,objectKeys$4=Object.keys||function(e){return internalObjectKeys$1(e,enumBugKeys$2)},DESCRIPTORS$g=descriptors,V8_PROTOTYPE_DEFINE_BUG=v8PrototypeDefineBug,definePropertyModule$2=objectDefineProperty,anObject$e=anObject$g,toIndexedObject$8=toIndexedObject$c,objectKeys$3=objectKeys$4;objectDefineProperties.f=DESCRIPTORS$g&&!V8_PROTOTYPE_DEFINE_BUG?Object.defineProperties:function(e,t){anObject$e(e);for(var r,n=toIndexedObject$8(t),i=objectKeys$3(t),o=i.length,a=0;o>a;)definePropertyModule$2.f(e,r=i[a++],n[r]);return e};var activeXDocument,getBuiltIn$e=getBuiltIn$h,html$2=getBuiltIn$e("document","documentElement"),shared$5=sharedExports,uid$2=uid$4,keys$d=shared$5("keys"),sharedKey$4=function(e){return keys$d[e]||(keys$d[e]=uid$2(e))},anObject$d=anObject$g,definePropertiesModule$1=objectDefineProperties,enumBugKeys$1=enumBugKeys$3,hiddenKeys$4=hiddenKeys$6,html$1=html$2,documentCreateElement=documentCreateElement$1,sharedKey$3=sharedKey$4,GT=">",LT="<",PROTOTYPE$1="prototype",SCRIPT="script",IE_PROTO$1=sharedKey$3("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return LT+SCRIPT+GT+e+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(e){e.write(scriptTag("")),e.close();var t=e.parentWindow.Object;return e=null,t},NullProtoObjectViaIFrame=function(){var e,t=documentCreateElement("iframe"),r="java"+SCRIPT+":";return t.style.display="none",html$1.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(scriptTag("document.F=Object")),e.close(),e.F},NullProtoObject=function(){try{activeXDocument=new ActiveXObject("htmlfile")}catch(e){}NullProtoObject="undefined"!=typeof document?document.domain&&activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame():NullProtoObjectViaActiveX(activeXDocument);for(var e=enumBugKeys$1.length;e--;)delete NullProtoObject[PROTOTYPE$1][enumBugKeys$1[e]];return NullProtoObject()};hiddenKeys$4[IE_PROTO$1]=!0;var objectCreate$1=Object.create||function(e,t){var r;return null!==e?(EmptyConstructor[PROTOTYPE$1]=anObject$d(e),r=new EmptyConstructor,EmptyConstructor[PROTOTYPE$1]=null,r[IE_PROTO$1]=e):r=NullProtoObject(),void 0===t?r:definePropertiesModule$1.f(r,t)},objectGetOwnPropertyNames={},internalObjectKeys=objectKeysInternal,enumBugKeys=enumBugKeys$3,hiddenKeys$3=enumBugKeys.concat("length","prototype");objectGetOwnPropertyNames.f=Object.getOwnPropertyNames||function(e){return internalObjectKeys(e,hiddenKeys$3)};var objectGetOwnPropertyNamesExternal={},toAbsoluteIndex$2=toAbsoluteIndex$4,lengthOfArrayLike$9=lengthOfArrayLike$c,createProperty$4=createProperty$6,$Array$2=Array,max$2=Math.max,arraySliceSimple=function(e,t,r){for(var n=lengthOfArrayLike$9(e),i=toAbsoluteIndex$2(t,n),o=toAbsoluteIndex$2(void 0===r?n:r,n),a=$Array$2(max$2(o-i,0)),s=0;i<o;i++,s++)createProperty$4(a,s,e[i]);return a.length=s,a},classof$a=classofRaw$2,toIndexedObject$7=toIndexedObject$c,$getOwnPropertyNames$1=objectGetOwnPropertyNames.f,arraySlice$7=arraySliceSimple,windowNames="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],getWindowNames=function(e){try{return $getOwnPropertyNames$1(e)}catch(e){return arraySlice$7(windowNames)}};objectGetOwnPropertyNamesExternal.f=function(e){return windowNames&&"Window"==classof$a(e)?getWindowNames(e):$getOwnPropertyNames$1(toIndexedObject$7(e))};var objectGetOwnPropertySymbols={};objectGetOwnPropertySymbols.f=Object.getOwnPropertySymbols;var createNonEnumerableProperty$7=createNonEnumerableProperty$9,defineBuiltIn$8=function(e,t,r,n){return n&&n.enumerable?e[t]=r:createNonEnumerableProperty$7(e,t,r),e},defineProperty$e=objectDefineProperty,defineBuiltInAccessor$5=function(e,t,r){return defineProperty$e.f(e,t,r)},wellKnownSymbolWrapped={},wellKnownSymbol$j=wellKnownSymbol$q;wellKnownSymbolWrapped.f=wellKnownSymbol$j;var set$7,get$9,has$2,path$o=path$r,hasOwn$g=hasOwnProperty_1,wrappedWellKnownSymbolModule$1=wellKnownSymbolWrapped,defineProperty$d=objectDefineProperty.f,wellKnownSymbolDefine=function(e){var t=path$o.Symbol||(path$o.Symbol={});hasOwn$g(t,e)||defineProperty$d(t,e,{value:wrappedWellKnownSymbolModule$1.f(e)})},call$l=functionCall,getBuiltIn$d=getBuiltIn$h,wellKnownSymbol$i=wellKnownSymbol$q,defineBuiltIn$7=defineBuiltIn$8,symbolDefineToPrimitive=function(){var e=getBuiltIn$d("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=wellKnownSymbol$i("toPrimitive");t&&!t[n]&&defineBuiltIn$7(t,n,(function(e){return call$l(r,this)}),{arity:1})},TO_STRING_TAG_SUPPORT$1=toStringTagSupport,classof$9=classof$d,objectToString$1=TO_STRING_TAG_SUPPORT$1?{}.toString:function(){return"[object "+classof$9(this)+"]"},TO_STRING_TAG_SUPPORT=toStringTagSupport,defineProperty$c=objectDefineProperty.f,createNonEnumerableProperty$6=createNonEnumerableProperty$9,hasOwn$f=hasOwnProperty_1,toString$e=objectToString$1,wellKnownSymbol$h=wellKnownSymbol$q,TO_STRING_TAG$2=wellKnownSymbol$h("toStringTag"),setToStringTag$9=function(e,t,r,n){if(e){var i=r?e:e.prototype;hasOwn$f(i,TO_STRING_TAG$2)||defineProperty$c(i,TO_STRING_TAG$2,{configurable:!0,value:t}),n&&!TO_STRING_TAG_SUPPORT&&createNonEnumerableProperty$6(i,"toString",toString$e)}},global$f=global$o,isCallable$e=isCallable$p,WeakMap$1=global$f.WeakMap,weakMapBasicDetection=isCallable$e(WeakMap$1)&&/native code/.test(String(WeakMap$1)),NATIVE_WEAK_MAP=weakMapBasicDetection,global$e=global$o,isObject$f=isObject$m,createNonEnumerableProperty$5=createNonEnumerableProperty$9,hasOwn$e=hasOwnProperty_1,shared$4=sharedStore,sharedKey$2=sharedKey$4,hiddenKeys$2=hiddenKeys$6,OBJECT_ALREADY_INITIALIZED="Object already initialized",TypeError$5=global$e.TypeError,WeakMap=global$e.WeakMap,enforce=function(e){return has$2(e)?get$9(e):set$7(e,{})},getterFor=function(e){return function(t){var r;if(!isObject$f(t)||(r=get$9(t)).type!==e)throw TypeError$5("Incompatible receiver, "+e+" required");return r}};if(NATIVE_WEAK_MAP||shared$4.state){var store$1=shared$4.state||(shared$4.state=new WeakMap);store$1.get=store$1.get,store$1.has=store$1.has,store$1.set=store$1.set,set$7=function(e,t){if(store$1.has(e))throw TypeError$5(OBJECT_ALREADY_INITIALIZED);return t.facade=e,store$1.set(e,t),t},get$9=function(e){return store$1.get(e)||{}},has$2=function(e){return store$1.has(e)}}else{var STATE=sharedKey$2("state");hiddenKeys$2[STATE]=!0,set$7=function(e,t){if(hasOwn$e(e,STATE))throw TypeError$5(OBJECT_ALREADY_INITIALIZED);return t.facade=e,createNonEnumerableProperty$5(e,STATE,t),t},get$9=function(e){return hasOwn$e(e,STATE)?e[STATE]:{}},has$2=function(e){return hasOwn$e(e,STATE)}}var internalState={set:set$7,get:get$9,has:has$2,enforce:enforce,getterFor:getterFor},bind$o=functionBindContext,uncurryThis$r=functionUncurryThis,IndexedObject$2=indexedObject,toObject$a=toObject$d,lengthOfArrayLike$8=lengthOfArrayLike$c,arraySpeciesCreate$1=arraySpeciesCreate$3,push$h=uncurryThis$r([].push),createMethod$5=function(e){var t=1==e,r=2==e,n=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(l,c,u,p){for(var f,h,d=toObject$a(l),y=IndexedObject$2(d),g=bind$o(c,u),$=lengthOfArrayLike$8(y),v=0,_=p||arraySpeciesCreate$1,m=t?_(l,$):r||a?_(l,0):void 0;$>v;v++)if((s||v in y)&&(h=g(f=y[v],v,d),e))if(t)m[v]=h;else if(h)switch(e){case 3:return!0;case 5:return f;case 6:return v;case 2:push$h(m,f)}else switch(e){case 4:return!1;case 7:push$h(m,f)}return o?-1:n||i?i:m}},arrayIteration={forEach:createMethod$5(0),map:createMethod$5(1),filter:createMethod$5(2),some:createMethod$5(3),every:createMethod$5(4),find:createMethod$5(5),findIndex:createMethod$5(6),filterReject:createMethod$5(7)},$$1h=_export,global$d=global$o,call$k=functionCall,uncurryThis$q=functionUncurryThis,DESCRIPTORS$f=descriptors,NATIVE_SYMBOL$3=symbolConstructorDetection,fails$p=fails$A,hasOwn$d=hasOwnProperty_1,isPrototypeOf$o=objectIsPrototypeOf,anObject$c=anObject$g,toIndexedObject$6=toIndexedObject$c,toPropertyKey=toPropertyKey$4,$toString$2=toString$f,createPropertyDescriptor$4=createPropertyDescriptor$8,nativeObjectCreate=objectCreate$1,objectKeys$2=objectKeys$4,getOwnPropertyNamesModule$2=objectGetOwnPropertyNames,getOwnPropertyNamesExternal=objectGetOwnPropertyNamesExternal,getOwnPropertySymbolsModule$3=objectGetOwnPropertySymbols,getOwnPropertyDescriptorModule$3=objectGetOwnPropertyDescriptor,definePropertyModule$1=objectDefineProperty,definePropertiesModule=objectDefineProperties,propertyIsEnumerableModule$1=objectPropertyIsEnumerable,defineBuiltIn$6=defineBuiltIn$8,defineBuiltInAccessor$4=defineBuiltInAccessor$5,shared$3=sharedExports,sharedKey$1=sharedKey$4,hiddenKeys$1=hiddenKeys$6,uid$1=uid$4,wellKnownSymbol$g=wellKnownSymbol$q,wrappedWellKnownSymbolModule=wellKnownSymbolWrapped,defineWellKnownSymbol$l=wellKnownSymbolDefine,defineSymbolToPrimitive$1=symbolDefineToPrimitive,setToStringTag$8=setToStringTag$9,InternalStateModule$7=internalState,$forEach$1=arrayIteration.forEach,HIDDEN=sharedKey$1("hidden"),SYMBOL="Symbol",PROTOTYPE="prototype",setInternalState$7=InternalStateModule$7.set,getInternalState$2=InternalStateModule$7.getterFor(SYMBOL),ObjectPrototype$2=Object[PROTOTYPE],$Symbol=global$d.Symbol,SymbolPrototype=$Symbol&&$Symbol[PROTOTYPE],TypeError$4=global$d.TypeError,QObject=global$d.QObject,nativeGetOwnPropertyDescriptor$1=getOwnPropertyDescriptorModule$3.f,nativeDefineProperty=definePropertyModule$1.f,nativeGetOwnPropertyNames=getOwnPropertyNamesExternal.f,nativePropertyIsEnumerable=propertyIsEnumerableModule$1.f,push$g=uncurryThis$q([].push),AllSymbols=shared$3("symbols"),ObjectPrototypeSymbols=shared$3("op-symbols"),WellKnownSymbolsStore$1=shared$3("wks"),USE_SETTER=!QObject||!QObject[PROTOTYPE]||!QObject[PROTOTYPE].findChild,setSymbolDescriptor=DESCRIPTORS$f&&fails$p((function(){return 7!=nativeObjectCreate(nativeDefineProperty({},"a",{get:function(){return nativeDefineProperty(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=nativeGetOwnPropertyDescriptor$1(ObjectPrototype$2,t);n&&delete ObjectPrototype$2[t],nativeDefineProperty(e,t,r),n&&e!==ObjectPrototype$2&&nativeDefineProperty(ObjectPrototype$2,t,n)}:nativeDefineProperty,wrap=function(e,t){var r=AllSymbols[e]=nativeObjectCreate(SymbolPrototype);return setInternalState$7(r,{type:SYMBOL,tag:e,description:t}),DESCRIPTORS$f||(r.description=t),r},$defineProperty=function(e,t,r){e===ObjectPrototype$2&&$defineProperty(ObjectPrototypeSymbols,t,r),anObject$c(e);var n=toPropertyKey(t);return anObject$c(r),hasOwn$d(AllSymbols,n)?(r.enumerable?(hasOwn$d(e,HIDDEN)&&e[HIDDEN][n]&&(e[HIDDEN][n]=!1),r=nativeObjectCreate(r,{enumerable:createPropertyDescriptor$4(0,!1)})):(hasOwn$d(e,HIDDEN)||nativeDefineProperty(e,HIDDEN,createPropertyDescriptor$4(1,{})),e[HIDDEN][n]=!0),setSymbolDescriptor(e,n,r)):nativeDefineProperty(e,n,r)},$defineProperties=function(e,t){anObject$c(e);var r=toIndexedObject$6(t),n=objectKeys$2(r).concat($getOwnPropertySymbols(r));return $forEach$1(n,(function(t){DESCRIPTORS$f&&!call$k($propertyIsEnumerable$1,r,t)||$defineProperty(e,t,r[t])})),e},$create=function(e,t){return void 0===t?nativeObjectCreate(e):$defineProperties(nativeObjectCreate(e),t)},$propertyIsEnumerable$1=function(e){var t=toPropertyKey(e),r=call$k(nativePropertyIsEnumerable,this,t);return!(this===ObjectPrototype$2&&hasOwn$d(AllSymbols,t)&&!hasOwn$d(ObjectPrototypeSymbols,t))&&(!(r||!hasOwn$d(this,t)||!hasOwn$d(AllSymbols,t)||hasOwn$d(this,HIDDEN)&&this[HIDDEN][t])||r)},$getOwnPropertyDescriptor=function(e,t){var r=toIndexedObject$6(e),n=toPropertyKey(t);if(r!==ObjectPrototype$2||!hasOwn$d(AllSymbols,n)||hasOwn$d(ObjectPrototypeSymbols,n)){var i=nativeGetOwnPropertyDescriptor$1(r,n);return!i||!hasOwn$d(AllSymbols,n)||hasOwn$d(r,HIDDEN)&&r[HIDDEN][n]||(i.enumerable=!0),i}},$getOwnPropertyNames=function(e){var t=nativeGetOwnPropertyNames(toIndexedObject$6(e)),r=[];return $forEach$1(t,(function(e){hasOwn$d(AllSymbols,e)||hasOwn$d(hiddenKeys$1,e)||push$g(r,e)})),r},$getOwnPropertySymbols=function(e){var t=e===ObjectPrototype$2,r=nativeGetOwnPropertyNames(t?ObjectPrototypeSymbols:toIndexedObject$6(e)),n=[];return $forEach$1(r,(function(e){!hasOwn$d(AllSymbols,e)||t&&!hasOwn$d(ObjectPrototype$2,e)||push$g(n,AllSymbols[e])})),n};NATIVE_SYMBOL$3||(defineBuiltIn$6(SymbolPrototype=($Symbol=function(){if(isPrototypeOf$o(SymbolPrototype,this))throw TypeError$4("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?$toString$2(arguments[0]):void 0,t=uid$1(e),r=function(e){this===ObjectPrototype$2&&call$k(r,ObjectPrototypeSymbols,e),hasOwn$d(this,HIDDEN)&&hasOwn$d(this[HIDDEN],t)&&(this[HIDDEN][t]=!1),setSymbolDescriptor(this,t,createPropertyDescriptor$4(1,e))};return DESCRIPTORS$f&&USE_SETTER&&setSymbolDescriptor(ObjectPrototype$2,t,{configurable:!0,set:r}),wrap(t,e)})[PROTOTYPE],"toString",(function(){return getInternalState$2(this).tag})),defineBuiltIn$6($Symbol,"withoutSetter",(function(e){return wrap(uid$1(e),e)})),propertyIsEnumerableModule$1.f=$propertyIsEnumerable$1,definePropertyModule$1.f=$defineProperty,definePropertiesModule.f=$defineProperties,getOwnPropertyDescriptorModule$3.f=$getOwnPropertyDescriptor,getOwnPropertyNamesModule$2.f=getOwnPropertyNamesExternal.f=$getOwnPropertyNames,getOwnPropertySymbolsModule$3.f=$getOwnPropertySymbols,wrappedWellKnownSymbolModule.f=function(e){return wrap(wellKnownSymbol$g(e),e)},DESCRIPTORS$f&&defineBuiltInAccessor$4(SymbolPrototype,"description",{configurable:!0,get:function(){return getInternalState$2(this).description}})),$$1h({global:!0,constructor:!0,wrap:!0,forced:!NATIVE_SYMBOL$3,sham:!NATIVE_SYMBOL$3},{Symbol:$Symbol}),$forEach$1(objectKeys$2(WellKnownSymbolsStore$1),(function(e){defineWellKnownSymbol$l(e)})),$$1h({target:SYMBOL,stat:!0,forced:!NATIVE_SYMBOL$3},{useSetter:function(){USE_SETTER=!0},useSimple:function(){USE_SETTER=!1}}),$$1h({target:"Object",stat:!0,forced:!NATIVE_SYMBOL$3,sham:!DESCRIPTORS$f},{create:$create,defineProperty:$defineProperty,defineProperties:$defineProperties,getOwnPropertyDescriptor:$getOwnPropertyDescriptor}),$$1h({target:"Object",stat:!0,forced:!NATIVE_SYMBOL$3},{getOwnPropertyNames:$getOwnPropertyNames}),defineSymbolToPrimitive$1(),setToStringTag$8($Symbol,SYMBOL),hiddenKeys$1[HIDDEN]=!0;var NATIVE_SYMBOL$2=symbolConstructorDetection,symbolRegistryDetection=NATIVE_SYMBOL$2&&!!Symbol.for&&!!Symbol.keyFor,$$1g=_export,getBuiltIn$c=getBuiltIn$h,hasOwn$c=hasOwnProperty_1,toString$d=toString$f,shared$2=sharedExports,NATIVE_SYMBOL_REGISTRY$1=symbolRegistryDetection,StringToSymbolRegistry=shared$2("string-to-symbol-registry"),SymbolToStringRegistry$1=shared$2("symbol-to-string-registry");$$1g({target:"Symbol",stat:!0,forced:!NATIVE_SYMBOL_REGISTRY$1},{for:function(e){var t=toString$d(e);if(hasOwn$c(StringToSymbolRegistry,t))return StringToSymbolRegistry[t];var r=getBuiltIn$c("Symbol")(t);return StringToSymbolRegistry[t]=r,SymbolToStringRegistry$1[r]=t,r}});var $$1f=_export,hasOwn$b=hasOwnProperty_1,isSymbol$3=isSymbol$6,tryToString$5=tryToString$7,shared$1=sharedExports,NATIVE_SYMBOL_REGISTRY=symbolRegistryDetection,SymbolToStringRegistry=shared$1("symbol-to-string-registry");$$1f({target:"Symbol",stat:!0,forced:!NATIVE_SYMBOL_REGISTRY},{keyFor:function(e){if(!isSymbol$3(e))throw TypeError(tryToString$5(e)+" is not a symbol");if(hasOwn$b(SymbolToStringRegistry,e))return SymbolToStringRegistry[e]}});var uncurryThis$p=functionUncurryThis,arraySlice$6=uncurryThis$p([].slice),uncurryThis$o=functionUncurryThis,isArray$9=isArray$c,isCallable$d=isCallable$p,classof$8=classofRaw$2,toString$c=toString$f,push$f=uncurryThis$o([].push),getJsonReplacerFunction=function(e){if(isCallable$d(e))return e;if(isArray$9(e)){for(var t=e.length,r=[],n=0;n<t;n++){var i=e[n];"string"==typeof i?push$f(r,i):"number"!=typeof i&&"Number"!=classof$8(i)&&"String"!=classof$8(i)||push$f(r,toString$c(i))}var o=r.length,a=!0;return function(e,t){if(a)return a=!1,t;if(isArray$9(this))return t;for(var n=0;n<o;n++)if(r[n]===e)return t}}},$$1e=_export,getBuiltIn$b=getBuiltIn$h,apply$4=functionApply,call$j=functionCall,uncurryThis$n=functionUncurryThis,fails$o=fails$A,isCallable$c=isCallable$p,isSymbol$2=isSymbol$6,arraySlice$5=arraySlice$6,getReplacerFunction=getJsonReplacerFunction,NATIVE_SYMBOL$1=symbolConstructorDetection,$String$1=String,$stringify=getBuiltIn$b("JSON","stringify"),exec$3=uncurryThis$n(/./.exec),charAt$5=uncurryThis$n("".charAt),charCodeAt$2=uncurryThis$n("".charCodeAt),replace$5=uncurryThis$n("".replace),numberToString$1=uncurryThis$n(1..toString),tester=/[\uD800-\uDFFF]/g,low=/^[\uD800-\uDBFF]$/,hi=/^[\uDC00-\uDFFF]$/,WRONG_SYMBOLS_CONVERSION=!NATIVE_SYMBOL$1||fails$o((function(){var e=getBuiltIn$b("Symbol")();return"[null]"!=$stringify([e])||"{}"!=$stringify({a:e})||"{}"!=$stringify(Object(e))})),ILL_FORMED_UNICODE=fails$o((function(){return'"\\udf06\\ud834"'!==$stringify("\udf06\ud834")||'"\\udead"'!==$stringify("\udead")})),stringifyWithSymbolsFix=function(e,t){var r=arraySlice$5(arguments),n=getReplacerFunction(t);if(isCallable$c(n)||void 0!==e&&!isSymbol$2(e))return r[1]=function(e,t){if(isCallable$c(n)&&(t=call$j(n,this,$String$1(e),t)),!isSymbol$2(t))return t},apply$4($stringify,null,r)},fixIllFormed=function(e,t,r){var n=charAt$5(r,t-1),i=charAt$5(r,t+1);return exec$3(low,e)&&!exec$3(hi,i)||exec$3(hi,e)&&!exec$3(low,n)?"\\u"+numberToString$1(charCodeAt$2(e,0),16):e};$stringify&&$$1e({target:"JSON",stat:!0,arity:3,forced:WRONG_SYMBOLS_CONVERSION||ILL_FORMED_UNICODE},{stringify:function(e,t,r){var n=arraySlice$5(arguments),i=apply$4(WRONG_SYMBOLS_CONVERSION?stringifyWithSymbolsFix:$stringify,null,n);return ILL_FORMED_UNICODE&&"string"==typeof i?replace$5(i,tester,fixIllFormed):i}});var $$1d=_export,NATIVE_SYMBOL=symbolConstructorDetection,fails$n=fails$A,getOwnPropertySymbolsModule$2=objectGetOwnPropertySymbols,toObject$9=toObject$d,FORCED$9=!NATIVE_SYMBOL||fails$n((function(){getOwnPropertySymbolsModule$2.f(1)}));$$1d({target:"Object",stat:!0,forced:FORCED$9},{getOwnPropertySymbols:function(e){var t=getOwnPropertySymbolsModule$2.f;return t?t(toObject$9(e)):[]}});var defineWellKnownSymbol$k=wellKnownSymbolDefine;defineWellKnownSymbol$k("asyncIterator");var defineWellKnownSymbol$j=wellKnownSymbolDefine;defineWellKnownSymbol$j("hasInstance");var defineWellKnownSymbol$i=wellKnownSymbolDefine;defineWellKnownSymbol$i("isConcatSpreadable");var defineWellKnownSymbol$h=wellKnownSymbolDefine;defineWellKnownSymbol$h("iterator");var defineWellKnownSymbol$g=wellKnownSymbolDefine;defineWellKnownSymbol$g("match");var defineWellKnownSymbol$f=wellKnownSymbolDefine;defineWellKnownSymbol$f("matchAll");var defineWellKnownSymbol$e=wellKnownSymbolDefine;defineWellKnownSymbol$e("replace");var defineWellKnownSymbol$d=wellKnownSymbolDefine;defineWellKnownSymbol$d("search");var defineWellKnownSymbol$c=wellKnownSymbolDefine;defineWellKnownSymbol$c("species");var defineWellKnownSymbol$b=wellKnownSymbolDefine;defineWellKnownSymbol$b("split");var defineWellKnownSymbol$a=wellKnownSymbolDefine,defineSymbolToPrimitive=symbolDefineToPrimitive;defineWellKnownSymbol$a("toPrimitive"),defineSymbolToPrimitive();var getBuiltIn$a=getBuiltIn$h,defineWellKnownSymbol$9=wellKnownSymbolDefine,setToStringTag$7=setToStringTag$9;defineWellKnownSymbol$9("toStringTag"),setToStringTag$7(getBuiltIn$a("Symbol"),"Symbol");var defineWellKnownSymbol$8=wellKnownSymbolDefine;defineWellKnownSymbol$8("unscopables");var global$c=global$o,setToStringTag$6=setToStringTag$9;setToStringTag$6(global$c.JSON,"JSON",!0);var IteratorPrototype$1,PrototypeOfArrayIteratorPrototype,arrayIterator,path$n=path$r,symbol$5=path$n.Symbol,iterators={},DESCRIPTORS$e=descriptors,hasOwn$a=hasOwnProperty_1,FunctionPrototype$1=Function.prototype,getDescriptor=DESCRIPTORS$e&&Object.getOwnPropertyDescriptor,EXISTS=hasOwn$a(FunctionPrototype$1,"name"),PROPER=EXISTS&&"something"===function(){}.name,CONFIGURABLE=EXISTS&&(!DESCRIPTORS$e||DESCRIPTORS$e&&getDescriptor(FunctionPrototype$1,"name").configurable),functionName={EXISTS:EXISTS,PROPER:PROPER,CONFIGURABLE:CONFIGURABLE},fails$m=fails$A,correctPrototypeGetter=!fails$m((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),hasOwn$9=hasOwnProperty_1,isCallable$b=isCallable$p,toObject$8=toObject$d,sharedKey=sharedKey$4,CORRECT_PROTOTYPE_GETTER$1=correctPrototypeGetter,IE_PROTO=sharedKey("IE_PROTO"),$Object=Object,ObjectPrototype$1=$Object.prototype,objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER$1?$Object.getPrototypeOf:function(e){var t=toObject$8(e);if(hasOwn$9(t,IE_PROTO))return t[IE_PROTO];var r=t.constructor;return isCallable$b(r)&&t instanceof r?r.prototype:t instanceof $Object?ObjectPrototype$1:null},fails$l=fails$A,isCallable$a=isCallable$p,isObject$e=isObject$m,create$c=objectCreate$1,getPrototypeOf$9=objectGetPrototypeOf,defineBuiltIn$5=defineBuiltIn$8,wellKnownSymbol$f=wellKnownSymbol$q,ITERATOR$8=wellKnownSymbol$f("iterator"),BUGGY_SAFARI_ITERATORS$1=!1;[].keys&&("next"in(arrayIterator=[].keys())?(PrototypeOfArrayIteratorPrototype=getPrototypeOf$9(getPrototypeOf$9(arrayIterator)))!==Object.prototype&&(IteratorPrototype$1=PrototypeOfArrayIteratorPrototype):BUGGY_SAFARI_ITERATORS$1=!0);var NEW_ITERATOR_PROTOTYPE=!isObject$e(IteratorPrototype$1)||fails$l((function(){var e={};return IteratorPrototype$1[ITERATOR$8].call(e)!==e}));isCallable$a((IteratorPrototype$1=NEW_ITERATOR_PROTOTYPE?{}:create$c(IteratorPrototype$1))[ITERATOR$8])||defineBuiltIn$5(IteratorPrototype$1,ITERATOR$8,(function(){return this}));var iteratorsCore={IteratorPrototype:IteratorPrototype$1,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1},IteratorPrototype=iteratorsCore.IteratorPrototype,create$b=objectCreate$1,createPropertyDescriptor$3=createPropertyDescriptor$8,setToStringTag$5=setToStringTag$9,Iterators$5=iterators,returnThis$1=function(){return this},iteratorCreateConstructor=function(e,t,r,n){var i=t+" Iterator";return e.prototype=create$b(IteratorPrototype,{next:createPropertyDescriptor$3(+!n,r)}),setToStringTag$5(e,i,!1,!0),Iterators$5[i]=returnThis$1,e},uncurryThis$m=functionUncurryThis,aCallable$g=aCallable$j,functionUncurryThisAccessor=function(e,t,r){try{return uncurryThis$m(aCallable$g(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}},isCallable$9=isCallable$p,$String=String,$TypeError$d=TypeError,aPossiblePrototype$1=function(e){if("object"==typeof e||isCallable$9(e))return e;throw $TypeError$d("Can't set "+$String(e)+" as a prototype")},uncurryThisAccessor=functionUncurryThisAccessor,anObject$b=anObject$g,aPossiblePrototype=aPossiblePrototype$1,objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=uncurryThisAccessor(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return anObject$b(r),aPossiblePrototype(n),t?e(r,n):r.__proto__=n,r}}():void 0),$$1c=_export,call$i=functionCall,FunctionName=functionName,createIteratorConstructor$1=iteratorCreateConstructor,getPrototypeOf$8=objectGetPrototypeOf,setToStringTag$4=setToStringTag$9,defineBuiltIn$4=defineBuiltIn$8,wellKnownSymbol$e=wellKnownSymbol$q,Iterators$4=iterators,IteratorsCore=iteratorsCore,PROPER_FUNCTION_NAME$1=FunctionName.PROPER;FunctionName.CONFIGURABLE,IteratorsCore.IteratorPrototype;var BUGGY_SAFARI_ITERATORS=IteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$7=wellKnownSymbol$e("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis=function(){return this},iteratorDefine=function(e,t,r,n,i,o,a){createIteratorConstructor$1(r,t,n);var s,l,c,u=function(e){if(e===i&&y)return y;if(!BUGGY_SAFARI_ITERATORS&&e in h)return h[e];switch(e){case KEYS:case VALUES:case ENTRIES:return function(){return new r(this,e)}}return function(){return new r(this)}},p=t+" Iterator",f=!1,h=e.prototype,d=h[ITERATOR$7]||h["@@iterator"]||i&&h[i],y=!BUGGY_SAFARI_ITERATORS&&d||u(i),g="Array"==t&&h.entries||d;if(g&&(s=getPrototypeOf$8(g.call(new e)))!==Object.prototype&&s.next&&(setToStringTag$4(s,p,!0,!0),Iterators$4[p]=returnThis),PROPER_FUNCTION_NAME$1&&i==VALUES&&d&&d.name!==VALUES&&(f=!0,y=function(){return call$i(d,this)}),i)if(l={values:u(VALUES),keys:o?y:u(KEYS),entries:u(ENTRIES)},a)for(c in l)(BUGGY_SAFARI_ITERATORS||f||!(c in h))&&defineBuiltIn$4(h,c,l[c]);else $$1c({target:t,proto:!0,forced:BUGGY_SAFARI_ITERATORS||f},l);return a&&h[ITERATOR$7]!==y&&defineBuiltIn$4(h,ITERATOR$7,y,{name:i}),Iterators$4[t]=y,l},createIterResultObject$3=function(e,t){return{value:e,done:t}},toIndexedObject$5=toIndexedObject$c,Iterators$3=iterators,InternalStateModule$6=internalState;objectDefineProperty.f;var defineIterator$2=iteratorDefine,createIterResultObject$2=createIterResultObject$3,ARRAY_ITERATOR="Array Iterator",setInternalState$6=InternalStateModule$6.set,getInternalState$1=InternalStateModule$6.getterFor(ARRAY_ITERATOR);defineIterator$2(Array,"Array",(function(e,t){setInternalState$6(this,{type:ARRAY_ITERATOR,target:toIndexedObject$5(e),index:0,kind:t})}),(function(){var e=getInternalState$1(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,createIterResultObject$2(void 0,!0)):createIterResultObject$2("keys"==r?n:"values"==r?t[n]:[n,t[n]],!1)}),"values"),Iterators$3.Arguments=Iterators$3.Array;var domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},DOMIterables$2=domIterables,global$b=global$o,classof$7=classof$d,createNonEnumerableProperty$4=createNonEnumerableProperty$9,Iterators$2=iterators,wellKnownSymbol$d=wellKnownSymbol$q,TO_STRING_TAG$1=wellKnownSymbol$d("toStringTag");for(var COLLECTION_NAME in DOMIterables$2){var Collection=global$b[COLLECTION_NAME],CollectionPrototype=Collection&&Collection.prototype;CollectionPrototype&&classof$7(CollectionPrototype)!==TO_STRING_TAG$1&&createNonEnumerableProperty$4(CollectionPrototype,TO_STRING_TAG$1,COLLECTION_NAME),Iterators$2[COLLECTION_NAME]=Iterators$2.Array}var parent$2c=symbol$5,symbol$4=parent$2c,defineWellKnownSymbol$7=wellKnownSymbolDefine;defineWellKnownSymbol$7("dispose");var parent$2b=symbol$4,symbol$3=parent$2b,defineWellKnownSymbol$6=wellKnownSymbolDefine;defineWellKnownSymbol$6("asyncDispose");var $$1b=_export,getBuiltIn$9=getBuiltIn$h,uncurryThis$l=functionUncurryThis,Symbol$4=getBuiltIn$9("Symbol"),keyFor2=Symbol$4.keyFor,thisSymbolValue$1=uncurryThis$l(Symbol$4.prototype.valueOf);$$1b({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==keyFor2(thisSymbolValue$1(e))}catch(e){return!1}}});for(var $$1a=_export,shared=sharedExports,getBuiltIn$8=getBuiltIn$h,uncurryThis$k=functionUncurryThis,isSymbol$1=isSymbol$6,wellKnownSymbol$c=wellKnownSymbol$q,Symbol$3=getBuiltIn$8("Symbol"),$isWellKnown=Symbol$3.isWellKnown,getOwnPropertyNames4=getBuiltIn$8("Object","getOwnPropertyNames"),thisSymbolValue=uncurryThis$k(Symbol$3.prototype.valueOf),WellKnownSymbolsStore=shared("wks"),i=0,symbolKeys=getOwnPropertyNames4(Symbol$3),symbolKeysLength=symbolKeys.length;i<symbolKeysLength;i++)try{var symbolKey=symbolKeys[i];isSymbol$1(Symbol$3[symbolKey])&&wellKnownSymbol$c(symbolKey)}catch(e){}$$1a({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if($isWellKnown&&$isWellKnown(e))return!0;try{for(var t=thisSymbolValue(e),r=0,n=getOwnPropertyNames4(WellKnownSymbolsStore),i=n.length;r<i;r++)if(WellKnownSymbolsStore[n[r]]==t)return!0}catch(e){}return!1}});var defineWellKnownSymbol$5=wellKnownSymbolDefine;defineWellKnownSymbol$5("matcher");var defineWellKnownSymbol$4=wellKnownSymbolDefine;defineWellKnownSymbol$4("metadataKey");var defineWellKnownSymbol$3=wellKnownSymbolDefine;defineWellKnownSymbol$3("observable");var defineWellKnownSymbol$2=wellKnownSymbolDefine;defineWellKnownSymbol$2("metadata");var defineWellKnownSymbol$1=wellKnownSymbolDefine;defineWellKnownSymbol$1("patternMatch");var defineWellKnownSymbol=wellKnownSymbolDefine;defineWellKnownSymbol("replaceAll");var parent$2a=symbol$3,symbol$2=parent$2a,symbol$1=symbol$2,_Symbol=getDefaultExportFromCjs(symbol$1),uncurryThis$j=functionUncurryThis,toIntegerOrInfinity$3=toIntegerOrInfinity$6,toString$b=toString$f,requireObjectCoercible$5=requireObjectCoercible$8,charAt$4=uncurryThis$j("".charAt),charCodeAt$1=uncurryThis$j("".charCodeAt),stringSlice$4=uncurryThis$j("".slice),createMethod$4=function(e){return function(t,r){var n,i,o=toString$b(requireObjectCoercible$5(t)),a=toIntegerOrInfinity$3(r),s=o.length;return a<0||a>=s?e?"":void 0:(n=charCodeAt$1(o,a))<55296||n>56319||a+1===s||(i=charCodeAt$1(o,a+1))<56320||i>57343?e?charAt$4(o,a):n:e?stringSlice$4(o,a,a+2):i-56320+(n-55296<<10)+65536}},stringMultibyte={codeAt:createMethod$4(!1),charAt:createMethod$4(!0)},charAt$3=stringMultibyte.charAt,toString$a=toString$f,InternalStateModule$5=internalState,defineIterator$1=iteratorDefine,createIterResultObject$1=createIterResultObject$3,STRING_ITERATOR="String Iterator",setInternalState$5=InternalStateModule$5.set,getInternalState=InternalStateModule$5.getterFor(STRING_ITERATOR);defineIterator$1(String,"String",(function(e){setInternalState$5(this,{type:STRING_ITERATOR,string:toString$a(e),index:0})}),(function(){var e,t=getInternalState(this),r=t.string,n=t.index;return n>=r.length?createIterResultObject$1(void 0,!0):(e=charAt$3(r,n),t.index+=e.length,createIterResultObject$1(e,!1))}));var WrappedWellKnownSymbolModule$1=wellKnownSymbolWrapped,iterator$5=WrappedWellKnownSymbolModule$1.f("iterator"),parent$29=iterator$5,iterator$4=parent$29,parent$28=iterator$4,iterator$3=parent$28,parent$27=iterator$3,iterator$2=parent$27,iterator$1=iterator$2,_Symbol$iterator=getDefaultExportFromCjs(iterator$1);function _typeof$1(e){return(_typeof$1="function"==typeof _Symbol&&"symbol"==typeof _Symbol$iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof _Symbol&&e.constructor===_Symbol&&e!==_Symbol.prototype?"symbol":typeof e})(e)}var defineProperty$b={exports:{}},$$19=_export,DESCRIPTORS$d=descriptors,defineProperty$a=objectDefineProperty.f;$$19({target:"Object",stat:!0,forced:Object.defineProperty!==defineProperty$a,sham:!DESCRIPTORS$d},{defineProperty:defineProperty$a});var path$m=path$r,Object$4=path$m.Object,defineProperty$9=defineProperty$b.exports=function(e,t,r){return Object$4.defineProperty(e,t,r)};Object$4.defineProperty.sham&&(defineProperty$9.sham=!0);var definePropertyExports=defineProperty$b.exports,parent$26=definePropertyExports,defineProperty$8=parent$26,parent$25=defineProperty$8,defineProperty$7=parent$25,parent$24=defineProperty$7,defineProperty$6=parent$24,defineProperty$5=defineProperty$6,_Object$defineProperty=getDefaultExportFromCjs(defineProperty$5),$$18=_export,DESCRIPTORS$c=descriptors,create$a=objectCreate$1;$$18({target:"Object",stat:!0,sham:!DESCRIPTORS$c},{create:create$a});var path$l=path$r,Object$3=path$l.Object,create$9=function(e,t){return Object$3.create(e,t)},parent$23=create$9,create$8=parent$23,parent$22=create$8,create$7=parent$22,parent$21=create$7,create$6=parent$21,create$5=create$6,_Object$create=getDefaultExportFromCjs(create$5),$$17=_export,fails$k=fails$A,toObject$7=toObject$d,nativeGetPrototypeOf=objectGetPrototypeOf,CORRECT_PROTOTYPE_GETTER=correctPrototypeGetter,FAILS_ON_PRIMITIVES$2=fails$k((function(){nativeGetPrototypeOf(1)}));$$17({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$2,sham:!CORRECT_PROTOTYPE_GETTER},{getPrototypeOf:function(e){return nativeGetPrototypeOf(toObject$7(e))}});var path$k=path$r,getPrototypeOf$7=path$k.Object.getPrototypeOf,parent$20=getPrototypeOf$7,getPrototypeOf$6=parent$20,parent$1$=getPrototypeOf$6,getPrototypeOf$5=parent$1$,parent$1_=getPrototypeOf$5,getPrototypeOf$4=parent$1_,getPrototypeOf$3=getPrototypeOf$4,_Object$getPrototypeOf=getDefaultExportFromCjs(getPrototypeOf$3),fails$j=fails$A,arrayMethodIsStrict$5=function(e,t){var r=[][e];return!!r&&fails$j((function(){r.call(null,t||function(){return 1},1)}))},$forEach=arrayIteration.forEach,arrayMethodIsStrict$4=arrayMethodIsStrict$5,STRICT_METHOD$2=arrayMethodIsStrict$4("forEach"),arrayForEach=STRICT_METHOD$2?[].forEach:function(e){return $forEach(this,e,arguments.length>1?arguments[1]:void 0)},$$16=_export,forEach$7=arrayForEach;$$16({target:"Array",proto:!0,forced:[].forEach!=arrayForEach},{forEach:arrayForEach});var path$j=path$r,entryVirtual$m=function(e){return path$j[e+"Prototype"]},entryVirtual$l=entryVirtual$m,forEach$6=entryVirtual$l("Array").forEach,parent$1Z=forEach$6,forEach$5=parent$1Z,classof$6=classof$d,hasOwn$8=hasOwnProperty_1,isPrototypeOf$n=objectIsPrototypeOf,method$j=forEach$5,ArrayPrototype$g=Array.prototype,DOMIterables$1={DOMTokenList:!0,NodeList:!0},forEach$4=function(e){var t=e.forEach;return e===ArrayPrototype$g||isPrototypeOf$n(ArrayPrototype$g,e)&&t===ArrayPrototype$g.forEach||hasOwn$8(DOMIterables$1,classof$6(e))?method$j:t},parent$1Y=forEach$4,forEach$3=parent$1Y,parent$1X=forEach$3,forEach$2=parent$1X,forEach$1=forEach$2,_forEachInstanceProperty=getDefaultExportFromCjs(forEach$1),DESCRIPTORS$b=descriptors,isArray$8=isArray$c,$TypeError$c=TypeError,getOwnPropertyDescriptor$9=Object.getOwnPropertyDescriptor,SILENT_ON_NON_WRITABLE_LENGTH_SET=DESCRIPTORS$b&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),arraySetLength=SILENT_ON_NON_WRITABLE_LENGTH_SET?function(e,t){if(isArray$8(e)&&!getOwnPropertyDescriptor$9(e,"length").writable)throw $TypeError$c("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},$$15=_export,toObject$6=toObject$d,lengthOfArrayLike$7=lengthOfArrayLike$c,setArrayLength$1=arraySetLength,doesNotExceedSafeInteger$1=doesNotExceedSafeInteger$3,fails$i=fails$A,INCORRECT_TO_LENGTH=fails$i((function(){return 4294967297!==[].push.call({length:4294967296},1)})),properErrorOnNonWritableLength=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},FORCED$8=INCORRECT_TO_LENGTH||!properErrorOnNonWritableLength();$$15({target:"Array",proto:!0,arity:1,forced:FORCED$8},{push:function(e){var t=toObject$6(this),r=lengthOfArrayLike$7(t),n=arguments.length;doesNotExceedSafeInteger$1(r+n);for(var i=0;i<n;i++)t[r]=arguments[i],r++;return setArrayLength$1(t,r),r}});var entryVirtual$k=entryVirtual$m,push$e=entryVirtual$k("Array").push,isPrototypeOf$m=objectIsPrototypeOf,method$i=push$e,ArrayPrototype$f=Array.prototype,push$d=function(e){var t=e.push;return e===ArrayPrototype$f||isPrototypeOf$m(ArrayPrototype$f,e)&&t===ArrayPrototype$f.push?method$i:t},parent$1W=push$d,push$c=parent$1W,parent$1V=push$c,push$b=parent$1V,parent$1U=push$b,push$a=parent$1U,push$9=push$a,_pushInstanceProperty=getDefaultExportFromCjs(push$9),$$14=_export,setPrototypeOf$7=objectSetPrototypeOf;$$14({target:"Object",stat:!0},{setPrototypeOf:setPrototypeOf$7});var path$i=path$r,setPrototypeOf$6=path$i.Object.setPrototypeOf,parent$1T=setPrototypeOf$6,setPrototypeOf$5=parent$1T,parent$1S=setPrototypeOf$5,setPrototypeOf$4=parent$1S,parent$1R=setPrototypeOf$4,setPrototypeOf$3=parent$1R,setPrototypeOf$2=setPrototypeOf$3,_Object$setPrototypeOf=getDefaultExportFromCjs(setPrototypeOf$2),getBuiltIn$7=getBuiltIn$h,uncurryThis$i=functionUncurryThis,getOwnPropertyNamesModule$1=objectGetOwnPropertyNames,getOwnPropertySymbolsModule$1=objectGetOwnPropertySymbols,anObject$a=anObject$g,concat$9=uncurryThis$i([].concat),ownKeys$4=getBuiltIn$7("Reflect","ownKeys")||function(e){var t=getOwnPropertyNamesModule$1.f(anObject$a(e)),r=getOwnPropertySymbolsModule$1.f;return r?concat$9(t,r(e)):t},hasOwn$7=hasOwnProperty_1,ownKeys$3=ownKeys$4,getOwnPropertyDescriptorModule$2=objectGetOwnPropertyDescriptor,definePropertyModule=objectDefineProperty,copyConstructorProperties$1=function(e,t,r){for(var n=ownKeys$3(t),i=definePropertyModule.f,o=getOwnPropertyDescriptorModule$2.f,a=0;a<n.length;a++){var s=n[a];hasOwn$7(e,s)||r&&hasOwn$7(r,s)||i(e,s,o(t,s))}},isObject$d=isObject$m,createNonEnumerableProperty$3=createNonEnumerableProperty$9,installErrorCause$1=function(e,t){isObject$d(t)&&"cause"in t&&createNonEnumerableProperty$3(e,"cause",t.cause)},uncurryThis$h=functionUncurryThis,$Error$1=Error,replace$4=uncurryThis$h("".replace),TEST=String($Error$1("zxcasd").stack),V8_OR_CHAKRA_STACK_ENTRY=/\n\s*at [^:]*:[^\n]*/,IS_V8_OR_CHAKRA_STACK=V8_OR_CHAKRA_STACK_ENTRY.test(TEST),errorStackClear=function(e,t){if(IS_V8_OR_CHAKRA_STACK&&"string"==typeof e&&!$Error$1.prepareStackTrace)for(;t--;)e=replace$4(e,V8_OR_CHAKRA_STACK_ENTRY,"");return e},fails$h=fails$A,createPropertyDescriptor$2=createPropertyDescriptor$8,errorStackInstallable=!fails$h((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",createPropertyDescriptor$2(1,7)),7!==e.stack)})),createNonEnumerableProperty$2=createNonEnumerableProperty$9,clearErrorStack=errorStackClear,ERROR_STACK_INSTALLABLE=errorStackInstallable,captureStackTrace=Error.captureStackTrace,errorStackInstall=function(e,t,r,n){ERROR_STACK_INSTALLABLE&&(captureStackTrace?captureStackTrace(e,t):createNonEnumerableProperty$2(e,"stack",clearErrorStack(r,n)))},wellKnownSymbol$b=wellKnownSymbol$q,Iterators$1=iterators,ITERATOR$6=wellKnownSymbol$b("iterator"),ArrayPrototype$e=Array.prototype,isArrayIteratorMethod$2=function(e){return void 0!==e&&(Iterators$1.Array===e||ArrayPrototype$e[ITERATOR$6]===e)},classof$5=classof$d,getMethod$1=getMethod$3,isNullOrUndefined$3=isNullOrUndefined$6,Iterators=iterators,wellKnownSymbol$a=wellKnownSymbol$q,ITERATOR$5=wellKnownSymbol$a("iterator"),getIteratorMethod$a=function(e){if(!isNullOrUndefined$3(e))return getMethod$1(e,ITERATOR$5)||getMethod$1(e,"@@iterator")||Iterators[classof$5(e)]},call$h=functionCall,aCallable$f=aCallable$j,anObject$9=anObject$g,tryToString$4=tryToString$7,getIteratorMethod$9=getIteratorMethod$a,$TypeError$b=TypeError,getIterator$3=function(e,t){var r=arguments.length<2?getIteratorMethod$9(e):t;if(aCallable$f(r))return anObject$9(call$h(r,e));throw $TypeError$b(tryToString$4(e)+" is not iterable")},call$g=functionCall,anObject$8=anObject$g,getMethod=getMethod$3,iteratorClose$2=function(e,t,r){var n,i;anObject$8(e);try{if(!(n=getMethod(e,"return"))){if("throw"===t)throw r;return r}n=call$g(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return anObject$8(n),r},bind$n=functionBindContext,call$f=functionCall,anObject$7=anObject$g,tryToString$3=tryToString$7,isArrayIteratorMethod$1=isArrayIteratorMethod$2,lengthOfArrayLike$6=lengthOfArrayLike$c,isPrototypeOf$l=objectIsPrototypeOf,getIterator$2=getIterator$3,getIteratorMethod$8=getIteratorMethod$a,iteratorClose$1=iteratorClose$2,$TypeError$a=TypeError,Result=function(e,t){this.stopped=e,this.result=t},ResultPrototype=Result.prototype,iterate$l=function(e,t,r){var n,i,o,a,s,l,c,u=r&&r.that,p=!(!r||!r.AS_ENTRIES),f=!(!r||!r.IS_RECORD),h=!(!r||!r.IS_ITERATOR),d=!(!r||!r.INTERRUPTED),y=bind$n(t,u),g=function(e){return n&&iteratorClose$1(n,"normal",e),new Result(!0,e)},$=function(e){return p?(anObject$7(e),d?y(e[0],e[1],g):y(e[0],e[1])):d?y(e,g):y(e)};if(f)n=e.iterator;else if(h)n=e;else{if(!(i=getIteratorMethod$8(e)))throw $TypeError$a(tryToString$3(e)+" is not iterable");if(isArrayIteratorMethod$1(i)){for(o=0,a=lengthOfArrayLike$6(e);a>o;o++)if((s=$(e[o]))&&isPrototypeOf$l(ResultPrototype,s))return s;return new Result(!1)}n=getIterator$2(e,i)}for(l=f?e.next:n.next;!(c=call$f(l,n)).done;){try{s=$(c.value)}catch(e){iteratorClose$1(n,"throw",e)}if("object"==typeof s&&s&&isPrototypeOf$l(ResultPrototype,s))return s}return new Result(!1)},toString$9=toString$f,normalizeStringArgument$1=function(e,t){return void 0===e?arguments.length<2?"":t:toString$9(e)},$$13=_export,isPrototypeOf$k=objectIsPrototypeOf,getPrototypeOf$2=objectGetPrototypeOf,setPrototypeOf$1=objectSetPrototypeOf,copyConstructorProperties=copyConstructorProperties$1,create$4=objectCreate$1,createNonEnumerableProperty$1=createNonEnumerableProperty$9,createPropertyDescriptor$1=createPropertyDescriptor$8,installErrorCause=installErrorCause$1,installErrorStack=errorStackInstall,iterate$k=iterate$l,normalizeStringArgument=normalizeStringArgument$1,wellKnownSymbol$9=wellKnownSymbol$q,TO_STRING_TAG=wellKnownSymbol$9("toStringTag"),$Error=Error,push$8=[].push,$AggregateError=function(e,t){var r,n=isPrototypeOf$k(AggregateErrorPrototype,this);setPrototypeOf$1?r=setPrototypeOf$1($Error(),n?getPrototypeOf$2(this):AggregateErrorPrototype):(r=n?this:create$4(AggregateErrorPrototype),createNonEnumerableProperty$1(r,TO_STRING_TAG,"Error")),void 0!==t&&createNonEnumerableProperty$1(r,"message",normalizeStringArgument(t)),installErrorStack(r,$AggregateError,r.stack,1),arguments.length>2&&installErrorCause(r,arguments[2]);var i=[];return iterate$k(e,push$8,{that:i}),createNonEnumerableProperty$1(r,"errors",i),r};setPrototypeOf$1?setPrototypeOf$1($AggregateError,$Error):copyConstructorProperties($AggregateError,$Error,{name:!0});var AggregateErrorPrototype=$AggregateError.prototype=create$4($Error.prototype,{constructor:createPropertyDescriptor$1(1,$AggregateError),message:createPropertyDescriptor$1(1,""),name:createPropertyDescriptor$1(1,"AggregateError")});$$13({global:!0,constructor:!0,arity:2},{AggregateError:$AggregateError});var $location,defer,channel,port,classof$4=classofRaw$2,engineIsNode="undefined"!=typeof process&&"process"==classof$4(process),getBuiltIn$6=getBuiltIn$h,defineBuiltInAccessor$3=defineBuiltInAccessor$5,wellKnownSymbol$8=wellKnownSymbol$q,DESCRIPTORS$a=descriptors,SPECIES$3=wellKnownSymbol$8("species"),setSpecies$2=function(e){var t=getBuiltIn$6(e);DESCRIPTORS$a&&t&&!t[SPECIES$3]&&defineBuiltInAccessor$3(t,SPECIES$3,{configurable:!0,get:function(){return this}})},isPrototypeOf$j=objectIsPrototypeOf,$TypeError$9=TypeError,anInstance$5=function(e,t){if(isPrototypeOf$j(t,e))return e;throw $TypeError$9("Incorrect invocation")},isConstructor$2=isConstructor$4,tryToString$2=tryToString$7,$TypeError$8=TypeError,aConstructor$3=function(e){if(isConstructor$2(e))return e;throw $TypeError$8(tryToString$2(e)+" is not a constructor")},anObject$6=anObject$g,aConstructor$2=aConstructor$3,isNullOrUndefined$2=isNullOrUndefined$6,wellKnownSymbol$7=wellKnownSymbol$q,SPECIES$2=wellKnownSymbol$7("species"),speciesConstructor$2=function(e,t){var r,n=anObject$6(e).constructor;return void 0===n||isNullOrUndefined$2(r=anObject$6(n)[SPECIES$2])?t:aConstructor$2(r)},$TypeError$7=TypeError,validateArgumentsLength$4=function(e,t){if(e<t)throw $TypeError$7("Not enough arguments");return e},userAgent$5=engineUserAgent,engineIsIos=/(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$5),global$a=global$o,apply$3=functionApply,bind$m=functionBindContext,isCallable$8=isCallable$p,hasOwn$6=hasOwnProperty_1,fails$g=fails$A,html=html$2,arraySlice$4=arraySlice$6,createElement=documentCreateElement$1,validateArgumentsLength$3=validateArgumentsLength$4,IS_IOS$1=engineIsIos,IS_NODE$4=engineIsNode,set$6=global$a.setImmediate,clear=global$a.clearImmediate,process$3=global$a.process,Dispatch=global$a.Dispatch,Function$1=global$a.Function,MessageChannel=global$a.MessageChannel,String$1=global$a.String,counter=0,queue$2={},ONREADYSTATECHANGE="onreadystatechange";fails$g((function(){$location=global$a.location}));var run=function(e){if(hasOwn$6(queue$2,e)){var t=queue$2[e];delete queue$2[e],t()}},runner=function(e){return function(){run(e)}},eventListener=function(e){run(e.data)},globalPostMessageDefer=function(e){global$a.postMessage(String$1(e),$location.protocol+"//"+$location.host)};set$6&&clear||(set$6=function(e){validateArgumentsLength$3(arguments.length,1);var t=isCallable$8(e)?e:Function$1(e),r=arraySlice$4(arguments,1);return queue$2[++counter]=function(){apply$3(t,void 0,r)},defer(counter),counter},clear=function(e){delete queue$2[e]},IS_NODE$4?defer=function(e){process$3.nextTick(runner(e))}:Dispatch&&Dispatch.now?defer=function(e){Dispatch.now(runner(e))}:MessageChannel&&!IS_IOS$1?(port=(channel=new MessageChannel).port2,channel.port1.onmessage=eventListener,defer=bind$m(port.postMessage,port)):global$a.addEventListener&&isCallable$8(global$a.postMessage)&&!global$a.importScripts&&$location&&"file:"!==$location.protocol&&!fails$g(globalPostMessageDefer)?(defer=globalPostMessageDefer,global$a.addEventListener("message",eventListener,!1)):defer=ONREADYSTATECHANGE in createElement("script")?function(e){html.appendChild(createElement("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this),run(e)}}:function(e){setTimeout(runner(e),0)});var task$1={set:set$6,clear:clear},Queue$2=function(){this.head=null,this.tail=null};Queue$2.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var notify$1,toggle,node,promise$6,then,queue$1=Queue$2,userAgent$4=engineUserAgent,engineIsIosPebble=/ipad|iphone|ipod/i.test(userAgent$4)&&"undefined"!=typeof Pebble,userAgent$3=engineUserAgent,engineIsWebosWebkit=/web0s(?!.*chrome)/i.test(userAgent$3),global$9=global$o,bind$l=functionBindContext,getOwnPropertyDescriptor$8=objectGetOwnPropertyDescriptor.f,macrotask=task$1.set,Queue$1=queue$1,IS_IOS=engineIsIos,IS_IOS_PEBBLE=engineIsIosPebble,IS_WEBOS_WEBKIT=engineIsWebosWebkit,IS_NODE$3=engineIsNode,MutationObserver=global$9.MutationObserver||global$9.WebKitMutationObserver,document$2=global$9.document,process$2=global$9.process,Promise$1=global$9.Promise,queueMicrotaskDescriptor=getOwnPropertyDescriptor$8(global$9,"queueMicrotask"),microtask$1=queueMicrotaskDescriptor&&queueMicrotaskDescriptor.value;if(!microtask$1){var queue=new Queue$1,flush=function(){var e,t;for(IS_NODE$3&&(e=process$2.domain)&&e.exit();t=queue.get();)try{t()}catch(e){throw queue.head&&notify$1(),e}e&&e.enter()};IS_IOS||IS_NODE$3||IS_WEBOS_WEBKIT||!MutationObserver||!document$2?!IS_IOS_PEBBLE&&Promise$1&&Promise$1.resolve?((promise$6=Promise$1.resolve(void 0)).constructor=Promise$1,then=bind$l(promise$6.then,promise$6),notify$1=function(){then(flush)}):IS_NODE$3?notify$1=function(){process$2.nextTick(flush)}:(macrotask=bind$l(macrotask,global$9),notify$1=function(){macrotask(flush)}):(toggle=!0,node=document$2.createTextNode(""),new MutationObserver(flush).observe(node,{characterData:!0}),notify$1=function(){node.data=toggle=!toggle}),microtask$1=function(e){queue.head||notify$1(),queue.add(e)}}var microtask_1=microtask$1,hostReportErrors$1=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}},perform$6=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},global$8=global$o,promiseNativeConstructor=global$8.Promise,engineIsDeno="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,IS_DENO$1=engineIsDeno,IS_NODE$2=engineIsNode,engineIsBrowser=!IS_DENO$1&&!IS_NODE$2&&"object"==typeof window&&"object"==typeof document,global$7=global$o,NativePromiseConstructor$5=promiseNativeConstructor,isCallable$7=isCallable$p,isForced=isForced_1,inspectSource=inspectSource$2,wellKnownSymbol$6=wellKnownSymbol$q,IS_BROWSER=engineIsBrowser,IS_DENO=engineIsDeno,V8_VERSION=engineV8Version,NativePromisePrototype$2=NativePromiseConstructor$5&&NativePromiseConstructor$5.prototype,SPECIES$1=wellKnownSymbol$6("species"),SUBCLASSING=!1,NATIVE_PROMISE_REJECTION_EVENT$1=isCallable$7(global$7.PromiseRejectionEvent),FORCED_PROMISE_CONSTRUCTOR$5=isForced("Promise",(function(){var e=inspectSource(NativePromiseConstructor$5),t=e!==String(NativePromiseConstructor$5);if(!t&&66===V8_VERSION)return!0;if(!NativePromisePrototype$2.catch||!NativePromisePrototype$2.finally)return!0;if(!V8_VERSION||V8_VERSION<51||!/native code/.test(e)){var r=new NativePromiseConstructor$5((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[SPECIES$1]=n,!(SUBCLASSING=r.then((function(){}))instanceof n))return!0}return!t&&(IS_BROWSER||IS_DENO)&&!NATIVE_PROMISE_REJECTION_EVENT$1})),promiseConstructorDetection={CONSTRUCTOR:FORCED_PROMISE_CONSTRUCTOR$5,REJECTION_EVENT:NATIVE_PROMISE_REJECTION_EVENT$1,SUBCLASSING:SUBCLASSING},newPromiseCapability$2={},aCallable$e=aCallable$j,$TypeError$6=TypeError,PromiseCapability=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw $TypeError$6("Bad Promise constructor");t=e,r=n})),this.resolve=aCallable$e(t),this.reject=aCallable$e(r)};newPromiseCapability$2.f=function(e){return new PromiseCapability(e)};var $$12=_export,IS_NODE$1=engineIsNode,global$6=global$o,call$e=functionCall,defineBuiltIn$3=defineBuiltIn$8,setToStringTag$3=setToStringTag$9,setSpecies$1=setSpecies$2,aCallable$d=aCallable$j,isCallable$6=isCallable$p,isObject$c=isObject$m,anInstance$4=anInstance$5,speciesConstructor$1=speciesConstructor$2,task=task$1.set,microtask=microtask_1,hostReportErrors=hostReportErrors$1,perform$5=perform$6,Queue=queue$1,InternalStateModule$4=internalState,NativePromiseConstructor$4=promiseNativeConstructor,PromiseConstructorDetection=promiseConstructorDetection,newPromiseCapabilityModule$6=newPromiseCapability$2,PROMISE="Promise",FORCED_PROMISE_CONSTRUCTOR$4=PromiseConstructorDetection.CONSTRUCTOR,NATIVE_PROMISE_REJECTION_EVENT=PromiseConstructorDetection.REJECTION_EVENT;PromiseConstructorDetection.SUBCLASSING;var Internal,OwnPromiseCapability,PromiseWrapper,getInternalPromiseState=InternalStateModule$4.getterFor(PROMISE),setInternalState$4=InternalStateModule$4.set,NativePromisePrototype$1=NativePromiseConstructor$4&&NativePromiseConstructor$4.prototype,PromiseConstructor=NativePromiseConstructor$4,PromisePrototype=NativePromisePrototype$1,TypeError$3=global$6.TypeError,document$1=global$6.document,process$1=global$6.process,newPromiseCapability$1=newPromiseCapabilityModule$6.f,newGenericPromiseCapability=newPromiseCapability$1,DISPATCH_EVENT=!!(document$1&&document$1.createEvent&&global$6.dispatchEvent),UNHANDLED_REJECTION="unhandledrejection",REJECTION_HANDLED="rejectionhandled",PENDING=0,FULFILLED=1,REJECTED=2,HANDLED=1,UNHANDLED=2,isThenable=function(e){var t;return!(!isObject$c(e)||!isCallable$6(t=e.then))&&t},callReaction=function(e,t){var r,n,i,o=t.value,a=t.state==FULFILLED,s=a?e.ok:e.fail,l=e.resolve,c=e.reject,u=e.domain;try{s?(a||(t.rejection===UNHANDLED&&onHandleUnhandled(t),t.rejection=HANDLED),!0===s?r=o:(u&&u.enter(),r=s(o),u&&(u.exit(),i=!0)),r===e.promise?c(TypeError$3("Promise-chain cycle")):(n=isThenable(r))?call$e(n,r,l,c):l(r)):c(o)}catch(e){u&&!i&&u.exit(),c(e)}},notify=function(e,t){e.notified||(e.notified=!0,microtask((function(){for(var r,n=e.reactions;r=n.get();)callReaction(r,e);e.notified=!1,t&&!e.rejection&&onUnhandled(e)})))},dispatchEvent=function(e,t,r){var n,i;DISPATCH_EVENT?((n=document$1.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),global$6.dispatchEvent(n)):n={promise:t,reason:r},!NATIVE_PROMISE_REJECTION_EVENT&&(i=global$6["on"+e])?i(n):e===UNHANDLED_REJECTION&&hostReportErrors("Unhandled promise rejection",r)},onUnhandled=function(e){call$e(task,global$6,(function(){var t,r=e.facade,n=e.value;if(isUnhandled(e)&&(t=perform$5((function(){IS_NODE$1?process$1.emit("unhandledRejection",n,r):dispatchEvent(UNHANDLED_REJECTION,r,n)})),e.rejection=IS_NODE$1||isUnhandled(e)?UNHANDLED:HANDLED,t.error))throw t.value}))},isUnhandled=function(e){return e.rejection!==HANDLED&&!e.parent},onHandleUnhandled=function(e){call$e(task,global$6,(function(){var t=e.facade;IS_NODE$1?process$1.emit("rejectionHandled",t):dispatchEvent(REJECTION_HANDLED,t,e.value)}))},bind$k=function(e,t,r){return function(n){e(t,n,r)}},internalReject=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=REJECTED,notify(e,!0))},internalResolve=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw TypeError$3("Promise can't be resolved itself");var n=isThenable(t);n?microtask((function(){var r={done:!1};try{call$e(n,t,bind$k(internalResolve,r,e),bind$k(internalReject,r,e))}catch(t){internalReject(r,t,e)}})):(e.value=t,e.state=FULFILLED,notify(e,!1))}catch(t){internalReject({done:!1},t,e)}}};FORCED_PROMISE_CONSTRUCTOR$4&&(PromisePrototype=(PromiseConstructor=function(e){anInstance$4(this,PromisePrototype),aCallable$d(e),call$e(Internal,this);var t=getInternalPromiseState(this);try{e(bind$k(internalResolve,t),bind$k(internalReject,t))}catch(e){internalReject(t,e)}}).prototype,(Internal=function(e){setInternalState$4(this,{type:PROMISE,done:!1,notified:!1,parent:!1,reactions:new Queue,rejection:!1,state:PENDING,value:void 0})}).prototype=defineBuiltIn$3(PromisePrototype,"then",(function(e,t){var r=getInternalPromiseState(this),n=newPromiseCapability$1(speciesConstructor$1(this,PromiseConstructor));return r.parent=!0,n.ok=!isCallable$6(e)||e,n.fail=isCallable$6(t)&&t,n.domain=IS_NODE$1?process$1.domain:void 0,r.state==PENDING?r.reactions.add(n):microtask((function(){callReaction(n,r)})),n.promise})),OwnPromiseCapability=function(){var e=new Internal,t=getInternalPromiseState(e);this.promise=e,this.resolve=bind$k(internalResolve,t),this.reject=bind$k(internalReject,t)},newPromiseCapabilityModule$6.f=newPromiseCapability$1=function(e){return e===PromiseConstructor||e===PromiseWrapper?new OwnPromiseCapability(e):newGenericPromiseCapability(e)}),$$12({global:!0,constructor:!0,wrap:!0,forced:FORCED_PROMISE_CONSTRUCTOR$4},{Promise:PromiseConstructor}),setToStringTag$3(PromiseConstructor,PROMISE,!1,!0),setSpecies$1(PROMISE);var wellKnownSymbol$5=wellKnownSymbol$q,ITERATOR$4=wellKnownSymbol$5("iterator"),SAFE_CLOSING=!1;try{var called=0,iteratorWithReturn={next:function(){return{done:!!called++}},return:function(){SAFE_CLOSING=!0}};iteratorWithReturn[ITERATOR$4]=function(){return this},Array.from(iteratorWithReturn,(function(){throw 2}))}catch(e){}var checkCorrectnessOfIteration$2=function(e,t){if(!t&&!SAFE_CLOSING)return!1;var r=!1;try{var n={};n[ITERATOR$4]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},NativePromiseConstructor$3=promiseNativeConstructor,checkCorrectnessOfIteration$1=checkCorrectnessOfIteration$2,FORCED_PROMISE_CONSTRUCTOR$3=promiseConstructorDetection.CONSTRUCTOR,promiseStaticsIncorrectIteration=FORCED_PROMISE_CONSTRUCTOR$3||!checkCorrectnessOfIteration$1((function(e){NativePromiseConstructor$3.all(e).then(void 0,(function(){}))})),$$11=_export,call$d=functionCall,aCallable$c=aCallable$j,newPromiseCapabilityModule$5=newPromiseCapability$2,perform$4=perform$6,iterate$j=iterate$l,PROMISE_STATICS_INCORRECT_ITERATION$3=promiseStaticsIncorrectIteration;$$11({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$3},{all:function(e){var t=this,r=newPromiseCapabilityModule$5.f(t),n=r.resolve,i=r.reject,o=perform$4((function(){var r=aCallable$c(t.resolve),o=[],a=0,s=1;iterate$j(e,(function(e){var l=a++,c=!1;s++,call$d(r,t,e).then((function(e){c||(c=!0,o[l]=e,--s||n(o))}),i)})),--s||n(o)}));return o.error&&i(o.value),r.promise}});var $$10=_export,FORCED_PROMISE_CONSTRUCTOR$2=promiseConstructorDetection.CONSTRUCTOR,NativePromiseConstructor$2=promiseNativeConstructor;promiseNativeConstructor&&promiseNativeConstructor.prototype,$$10({target:"Promise",proto:!0,forced:FORCED_PROMISE_CONSTRUCTOR$2,real:!0},{catch:function(e){return this.then(void 0,e)}});var $$$=_export,call$c=functionCall,aCallable$b=aCallable$j,newPromiseCapabilityModule$4=newPromiseCapability$2,perform$3=perform$6,iterate$i=iterate$l,PROMISE_STATICS_INCORRECT_ITERATION$2=promiseStaticsIncorrectIteration;$$$({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$2},{race:function(e){var t=this,r=newPromiseCapabilityModule$4.f(t),n=r.reject,i=perform$3((function(){var i=aCallable$b(t.resolve);iterate$i(e,(function(e){call$c(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}});var $$_=_export,call$b=functionCall,newPromiseCapabilityModule$3=newPromiseCapability$2,FORCED_PROMISE_CONSTRUCTOR$1=promiseConstructorDetection.CONSTRUCTOR;$$_({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR$1},{reject:function(e){var t=newPromiseCapabilityModule$3.f(this);return call$b(t.reject,void 0,e),t.promise}});var anObject$5=anObject$g,isObject$b=isObject$m,newPromiseCapability=newPromiseCapability$2,promiseResolve$2=function(e,t){if(anObject$5(e),isObject$b(t)&&t.constructor===e)return t;var r=newPromiseCapability.f(e);return(0,r.resolve)(t),r.promise},$$Z=_export,getBuiltIn$5=getBuiltIn$h,IS_PURE$1=isPure,NativePromiseConstructor$1=promiseNativeConstructor,FORCED_PROMISE_CONSTRUCTOR=promiseConstructorDetection.CONSTRUCTOR,promiseResolve$1=promiseResolve$2,PromiseConstructorWrapper=getBuiltIn$5("Promise"),CHECK_WRAPPER=!FORCED_PROMISE_CONSTRUCTOR;$$Z({target:"Promise",stat:!0,forced:IS_PURE$1},{resolve:function(e){return promiseResolve$1(CHECK_WRAPPER&&this===PromiseConstructorWrapper?NativePromiseConstructor$1:this,e)}});var $$Y=_export,call$a=functionCall,aCallable$a=aCallable$j,newPromiseCapabilityModule$2=newPromiseCapability$2,perform$2=perform$6,iterate$h=iterate$l,PROMISE_STATICS_INCORRECT_ITERATION$1=promiseStaticsIncorrectIteration;$$Y({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$1},{allSettled:function(e){var t=this,r=newPromiseCapabilityModule$2.f(t),n=r.resolve,i=r.reject,o=perform$2((function(){var r=aCallable$a(t.resolve),i=[],o=0,a=1;iterate$h(e,(function(e){var s=o++,l=!1;a++,call$a(r,t,e).then((function(e){l||(l=!0,i[s]={status:"fulfilled",value:e},--a||n(i))}),(function(e){l||(l=!0,i[s]={status:"rejected",reason:e},--a||n(i))}))})),--a||n(i)}));return o.error&&i(o.value),r.promise}});var $$X=_export,call$9=functionCall,aCallable$9=aCallable$j,getBuiltIn$4=getBuiltIn$h,newPromiseCapabilityModule$1=newPromiseCapability$2,perform$1=perform$6,iterate$g=iterate$l,PROMISE_STATICS_INCORRECT_ITERATION=promiseStaticsIncorrectIteration,PROMISE_ANY_ERROR="No one promise resolved";$$X({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION},{any:function(e){var t=this,r=getBuiltIn$4("AggregateError"),n=newPromiseCapabilityModule$1.f(t),i=n.resolve,o=n.reject,a=perform$1((function(){var n=aCallable$9(t.resolve),a=[],s=0,l=1,c=!1;iterate$g(e,(function(e){var u=s++,p=!1;l++,call$9(n,t,e).then((function(e){p||c||(c=!0,i(e))}),(function(e){p||c||(p=!0,a[u]=e,--l||o(new r(a,PROMISE_ANY_ERROR)))}))})),--l||o(new r(a,PROMISE_ANY_ERROR))}));return a.error&&o(a.value),n.promise}});var $$W=_export,NativePromiseConstructor=promiseNativeConstructor,fails$f=fails$A,getBuiltIn$3=getBuiltIn$h,isCallable$5=isCallable$p,speciesConstructor=speciesConstructor$2,promiseResolve=promiseResolve$2,NativePromisePrototype=NativePromiseConstructor&&NativePromiseConstructor.prototype,NON_GENERIC=!!NativePromiseConstructor&&fails$f((function(){NativePromisePrototype.finally.call({then:function(){}},(function(){}))}));$$W({target:"Promise",proto:!0,real:!0,forced:NON_GENERIC},{finally:function(e){var t=speciesConstructor(this,getBuiltIn$3("Promise")),r=isCallable$5(e);return this.then(r?function(r){return promiseResolve(t,e()).then((function(){return r}))}:e,r?function(r){return promiseResolve(t,e()).then((function(){throw r}))}:e)}});var path$h=path$r,promise$5=path$h.Promise,parent$1Q=promise$5,promise$4=parent$1Q,parent$1P=promise$4,promise$3=parent$1P,$$V=_export,newPromiseCapabilityModule=newPromiseCapability$2,perform=perform$6;$$V({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=newPromiseCapabilityModule.f(this),r=perform(e);return(r.error?t.reject:t.resolve)(r.value),t.promise}});var parent$1O=promise$3,promise$2=parent$1O,promise$1=promise$2,_Promise$1=getDefaultExportFromCjs(promise$1),$$U=_export,uncurryThis$g=functionUncurryThis,isArray$7=isArray$c,nativeReverse=uncurryThis$g([].reverse),test$1=[1,2];$$U({target:"Array",proto:!0,forced:String(test$1)===String(test$1.reverse())},{reverse:function(){return isArray$7(this)&&(this.length=this.length),nativeReverse(this)}});var entryVirtual$j=entryVirtual$m,reverse$6=entryVirtual$j("Array").reverse,isPrototypeOf$i=objectIsPrototypeOf,method$h=reverse$6,ArrayPrototype$d=Array.prototype,reverse$5=function(e){var t=e.reverse;return e===ArrayPrototype$d||isPrototypeOf$i(ArrayPrototype$d,e)&&t===ArrayPrototype$d.reverse?method$h:t},parent$1N=reverse$5,reverse$4=parent$1N,parent$1M=reverse$4,reverse$3=parent$1M,parent$1L=reverse$3,reverse$2=parent$1L,reverse$1=reverse$2,_reverseInstanceProperty=getDefaultExportFromCjs(reverse$1),$$T=_export,isArray$6=isArray$c,isConstructor$1=isConstructor$4,isObject$a=isObject$m,toAbsoluteIndex$1=toAbsoluteIndex$4,lengthOfArrayLike$5=lengthOfArrayLike$c,toIndexedObject$4=toIndexedObject$c,createProperty$3=createProperty$6,wellKnownSymbol$4=wellKnownSymbol$q,arrayMethodHasSpeciesSupport$3=arrayMethodHasSpeciesSupport$5,nativeSlice=arraySlice$6,HAS_SPECIES_SUPPORT$3=arrayMethodHasSpeciesSupport$3("slice"),SPECIES=wellKnownSymbol$4("species"),$Array$1=Array,max$1=Math.max;$$T({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$3},{slice:function(e,t){var r,n,i,o=toIndexedObject$4(this),a=lengthOfArrayLike$5(o),s=toAbsoluteIndex$1(e,a),l=toAbsoluteIndex$1(void 0===t?a:t,a);if(isArray$6(o)&&(r=o.constructor,(isConstructor$1(r)&&(r===$Array$1||isArray$6(r.prototype))||isObject$a(r)&&null===(r=r[SPECIES]))&&(r=void 0),r===$Array$1||void 0===r))return nativeSlice(o,s,l);for(n=new(void 0===r?$Array$1:r)(max$1(l-s,0)),i=0;s<l;s++,i++)s in o&&createProperty$3(n,i,o[s]);return n.length=i,n}});var entryVirtual$i=entryVirtual$m,slice$6=entryVirtual$i("Array").slice,isPrototypeOf$h=objectIsPrototypeOf,method$g=slice$6,ArrayPrototype$c=Array.prototype,slice$5=function(e){var t=e.slice;return e===ArrayPrototype$c||isPrototypeOf$h(ArrayPrototype$c,e)&&t===ArrayPrototype$c.slice?method$g:t},parent$1K=slice$5,slice$4=parent$1K,parent$1J=slice$4,slice$3=parent$1J,parent$1I=slice$3,slice$2=parent$1I,slice$1=slice$2,_sliceInstanceProperty=getDefaultExportFromCjs(slice$1);function _regeneratorRuntime(){_regeneratorRuntime=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=_Object$defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof _Symbol?_Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,r){return _Object$defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function c(e,t,r,i){var o=t&&t.prototype instanceof f?t:f,a=_Object$create(o.prototype),s=new P(i||[]);return n(a,"_invoke",{value:m(e,r,s)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var p={};function f(){}function h(){}function d(){}var y={};l(y,o,(function(){return this}));var g=_Object$getPrototypeOf&&_Object$getPrototypeOf(_Object$getPrototypeOf(T([])));g&&g!==t&&r.call(g,o)&&(y=g);var $=d.prototype=f.prototype=_Object$create(y);function v(e){var t;_forEachInstanceProperty(t=["next","throw","return"]).call(t,(function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(n,o,a,s){var l=u(e[n],e,o);if("throw"!==l.type){var c=l.arg,p=c.value;return p&&"object"==_typeof$1(p)&&r.call(p,"__await")?t.resolve(p.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(p).then((function(e){c.value=e,a(c)}),(function(e){return i("throw",e,a,s)}))}s(l.arg)}var o;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return o=o?o.then(n,n):n()}})}function m(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=E(a,r);if(s){if(s===p)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===p)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function E(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var i=u(n,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=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function S(e){var t,r={tryLoc:e[0]};1 in e&&(r.catchLoc=e[1]),2 in e&&(r.finallyLoc=e[2],r.afterLoc=e[3]),_pushInstanceProperty(t=this.tryEntries).call(t,r)}function b(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],_forEachInstanceProperty(e).call(e,S,this),this.reset(!0)}function T(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:I}}function I(){return{value:void 0,done:!0}}return h.prototype=d,n($,"constructor",{value:d,configurable:!0}),n(d,"constructor",{value:h,configurable:!0}),h.displayName=l(d,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return _Object$setPrototypeOf?_Object$setPrototypeOf(e,d):(e.__proto__=d,l(e,s,"GeneratorFunction")),e.prototype=_Object$create($),e},e.awrap=function(e){return{__await:e}},v(_.prototype),l(_.prototype,a,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,i,o){void 0===o&&(o=_Promise$1);var a=new _(c(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},v($),l($,s,"Generator"),l($,o,(function(){return this})),l($,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)_pushInstanceProperty(r).call(r,n);return _reverseInstanceProperty(r).call(r),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=T,P.prototype={constructor:P,reset:function(e){var t;if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,_forEachInstanceProperty(t=this.tryEntries).call(t,b),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+_sliceInstanceProperty(n).call(n,1))&&(this[n]=void 0)},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 n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;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 r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),b(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;b(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:T(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function asyncGeneratorStep(e,t,r,n,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void r(e)}s.done?t(l):_Promise$1.resolve(l).then(n,i)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new _Promise$1((function(n,i){var o=e.apply(t,r);function a(e){asyncGeneratorStep(o,n,i,a,s,"next",e)}function s(e){asyncGeneratorStep(o,n,i,a,s,"throw",e)}a(void 0)}))}}var Codec=function(e){return e.H265="h265",e.H264="h264",e}(Codec||{}),DecodeType=function(e){return e.Software="software",e.Hardware="hardware",e}(DecodeType||{}),$$S=_export,isArray$5=isArray$c;$$S({target:"Array",stat:!0},{isArray:isArray$5});var path$g=path$r,isArray$4=path$g.Array.isArray,parent$1H=isArray$4,isArray$3=parent$1H,parent$1G=isArray$3,isArray$2=parent$1G,parent$1F=isArray$2,isArray$1=parent$1F,isArray2=isArray$1,_Array$isArray=getDefaultExportFromCjs(isArray2);function _arrayLikeToArray$1(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _arrayWithoutHoles$1(e){if(_Array$isArray(e))return _arrayLikeToArray$1(e)}var getIteratorMethod$7=getIteratorMethod$a,getIteratorMethod_1=getIteratorMethod$7,parent$1E=getIteratorMethod_1,getIteratorMethod$6=parent$1E,parent$1D=getIteratorMethod$6,getIteratorMethod$5=parent$1D,parent$1C=getIteratorMethod$5,getIteratorMethod$4=parent$1C,getIteratorMethod$3=getIteratorMethod$4,_getIteratorMethod$1=getDefaultExportFromCjs(getIteratorMethod$3),anObject$4=anObject$g,iteratorClose=iteratorClose$2,callWithSafeIterationClosing$1=function(e,t,r,n){try{return n?t(anObject$4(r)[0],r[1]):t(r)}catch(t){iteratorClose(e,"throw",t)}},bind$j=functionBindContext,call$8=functionCall,toObject$5=toObject$d,callWithSafeIterationClosing=callWithSafeIterationClosing$1,isArrayIteratorMethod=isArrayIteratorMethod$2,isConstructor3=isConstructor$4,lengthOfArrayLike$4=lengthOfArrayLike$c,createProperty$2=createProperty$6,getIterator$1=getIterator$3,getIteratorMethod$2=getIteratorMethod$a,$Array=Array,arrayFrom$1=function(e){var t=toObject$5(e),r=isConstructor3(this),n=arguments.length,i=n>1?arguments[1]:void 0,o=void 0!==i;o&&(i=bind$j(i,n>2?arguments[2]:void 0));var a,s,l,c,u,p,f=getIteratorMethod$2(t),h=0;if(!f||this===$Array&&isArrayIteratorMethod(f))for(a=lengthOfArrayLike$4(t),s=r?new this(a):$Array(a);a>h;h++)p=o?i(t[h],h):t[h],createProperty$2(s,h,p);else for(u=(c=getIterator$1(t,f)).next,s=r?new this:[];!(l=call$8(u,c)).done;h++)p=o?callWithSafeIterationClosing(c,i,[l.value,h],!0):l.value,createProperty$2(s,h,p);return s.length=h,s},$$R=_export,from$7=arrayFrom$1,checkCorrectnessOfIteration=checkCorrectnessOfIteration$2,INCORRECT_ITERATION=!checkCorrectnessOfIteration((function(e){Array.from(e)}));$$R({target:"Array",stat:!0,forced:INCORRECT_ITERATION},{from:from$7});var path$f=path$r,from$6=path$f.Array.from,parent$1B=from$6,from$5=parent$1B,parent$1A=from$5,from$4=parent$1A,parent$1z=from$4,from$3=parent$1z,from$2=from$3,_Array$from=getDefaultExportFromCjs(from$2);function _iterableToArray$1(e){if(void 0!==_Symbol&&null!=_getIteratorMethod$1(e)||null!=e["@@iterator"])return _Array$from(e)}function _unsupportedIterableToArray$1(e,t){var r;if(e){if("string"==typeof e)return _arrayLikeToArray$1(e,t);var n=_sliceInstanceProperty(r=Object.prototype.toString.call(e)).call(r,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?_Array$from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray$1(e,t):void 0}}function _nonIterableSpread$1(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _toConsumableArray$1(e){return _arrayWithoutHoles$1(e)||_iterableToArray$1(e)||_unsupportedIterableToArray$1(e)||_nonIterableSpread$1()}function _classCallCheck$1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var WrappedWellKnownSymbolModule=wellKnownSymbolWrapped,toPrimitive$5=WrappedWellKnownSymbolModule.f("toPrimitive"),parent$1y=toPrimitive$5,toPrimitive$4=parent$1y,parent$1x=toPrimitive$4,toPrimitive$3=parent$1x,parent$1w=toPrimitive$3,toPrimitive$2=parent$1w,toPrimitive$1=toPrimitive$2,_Symbol$toPrimitive$1=getDefaultExportFromCjs(toPrimitive$1);function _toPrimitive$1(e,t){if("object"!==_typeof$1(e)||null===e)return e;var r=e[_Symbol$toPrimitive$1];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==_typeof$1(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _toPropertyKey$1(e){var t=_toPrimitive$1(e,"string");return"symbol"===_typeof$1(t)?t:String(t)}function _defineProperties$1(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),_Object$defineProperty(e,_toPropertyKey$1(n.key),n)}}function _createClass$1(e,t,r){return t&&_defineProperties$1(e.prototype,t),r&&_defineProperties$1(e,r),_Object$defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty$1(e,t,r){return(t=_toPropertyKey$1(t))in e?_Object$defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var path$e=path$r,getOwnPropertySymbols$5=path$e.Object.getOwnPropertySymbols,parent$1v=getOwnPropertySymbols$5,getOwnPropertySymbols$4=parent$1v,parent$1u=getOwnPropertySymbols$4,getOwnPropertySymbols$3=parent$1u,parent$1t=getOwnPropertySymbols$3,getOwnPropertySymbols$2=parent$1t,getOwnPropertySymbols$1=getOwnPropertySymbols$2,_Object$getOwnPropertySymbols=getDefaultExportFromCjs(getOwnPropertySymbols$1),$$Q=_export,uncurryThis$f=functionUncurryThisClause,$indexOf=arrayIncludes$1.indexOf,arrayMethodIsStrict$3=arrayMethodIsStrict$5,nativeIndexOf=uncurryThis$f([].indexOf),NEGATIVE_ZERO$1=!!nativeIndexOf&&1/nativeIndexOf([1],1,-0)<0,FORCED$7=NEGATIVE_ZERO$1||!arrayMethodIsStrict$3("indexOf");$$Q({target:"Array",proto:!0,forced:FORCED$7},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return NEGATIVE_ZERO$1?nativeIndexOf(this,e,t)||0:$indexOf(this,e,t)}});var entryVirtual$h=entryVirtual$m,indexOf$6=entryVirtual$h("Array").indexOf,isPrototypeOf$g=objectIsPrototypeOf,method$f=indexOf$6,ArrayPrototype$b=Array.prototype,indexOf$5=function(e){var t=e.indexOf;return e===ArrayPrototype$b||isPrototypeOf$g(ArrayPrototype$b,e)&&t===ArrayPrototype$b.indexOf?method$f:t},parent$1s=indexOf$5,indexOf$4=parent$1s,parent$1r=indexOf$4,indexOf$3=parent$1r,parent$1q=indexOf$3,indexOf$2=parent$1q,indexOf$1=indexOf$2,_indexOfInstanceProperty=getDefaultExportFromCjs(indexOf$1),$$P=_export,toObject$4=toObject$d,nativeKeys=objectKeys$4,fails$e=fails$A,FAILS_ON_PRIMITIVES$1=fails$e((function(){nativeKeys(1)}));$$P({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$1},{keys:function(e){return nativeKeys(toObject$4(e))}});var path$d=path$r,keys$c=path$d.Object.keys,parent$1p=keys$c,keys$b=parent$1p,parent$1o=keys$b,keys$a=parent$1o,parent$1n=keys$a,keys$9=parent$1n,keys$8=keys$9,_Object$keys$1=getDefaultExportFromCjs(keys$8);function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var r,n,i={},o=_Object$keys$1(e);for(n=0;n<o.length;n++)r=o[n],_indexOfInstanceProperty(t).call(t,r)>=0||(i[r]=e[r]);return i}function _objectWithoutProperties(e,t){if(null==e)return{};var r,n,i=_objectWithoutPropertiesLoose(e,t);if(_Object$getOwnPropertySymbols){var o=_Object$getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],_indexOfInstanceProperty(t).call(t,r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var $$O=_export,$filter=arrayIteration.filter,arrayMethodHasSpeciesSupport$2=arrayMethodHasSpeciesSupport$5,HAS_SPECIES_SUPPORT$2=arrayMethodHasSpeciesSupport$2("filter");$$O({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$2},{filter:function(e){return $filter(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$g=entryVirtual$m,filter$6=entryVirtual$g("Array").filter,isPrototypeOf$f=objectIsPrototypeOf,method$e=filter$6,ArrayPrototype$a=Array.prototype,filter$5=function(e){var t=e.filter;return e===ArrayPrototype$a||isPrototypeOf$f(ArrayPrototype$a,e)&&t===ArrayPrototype$a.filter?method$e:t},parent$1m=filter$5,filter$4=parent$1m,parent$1l=filter$4,filter$3=parent$1l,parent$1k=filter$3,filter$2=parent$1k,filter$1=filter$2,_filterInstanceProperty=getDefaultExportFromCjs(filter$1),getOwnPropertyDescriptor$7={exports:{}},$$N=_export,fails$d=fails$A,toIndexedObject$3=toIndexedObject$c,nativeGetOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,DESCRIPTORS$9=descriptors,FORCED$6=!DESCRIPTORS$9||fails$d((function(){nativeGetOwnPropertyDescriptor(1)}));$$N({target:"Object",stat:!0,forced:FORCED$6,sham:!DESCRIPTORS$9},{getOwnPropertyDescriptor:function(e,t){return nativeGetOwnPropertyDescriptor(toIndexedObject$3(e),t)}});var path$c=path$r,Object$2=path$c.Object,getOwnPropertyDescriptor$6=getOwnPropertyDescriptor$7.exports=function(e,t){return Object$2.getOwnPropertyDescriptor(e,t)};Object$2.getOwnPropertyDescriptor.sham&&(getOwnPropertyDescriptor$6.sham=!0);var getOwnPropertyDescriptorExports=getOwnPropertyDescriptor$7.exports,parent$1j=getOwnPropertyDescriptorExports,getOwnPropertyDescriptor$5=parent$1j,parent$1i=getOwnPropertyDescriptor$5,getOwnPropertyDescriptor$4=parent$1i,parent$1h=getOwnPropertyDescriptor$4,getOwnPropertyDescriptor$3=parent$1h,getOwnPropertyDescriptor$2=getOwnPropertyDescriptor$3,_Object$getOwnPropertyDescriptor=getDefaultExportFromCjs(getOwnPropertyDescriptor$2),$$M=_export,DESCRIPTORS$8=descriptors,ownKeys$2=ownKeys$4,toIndexedObject$2=toIndexedObject$c,getOwnPropertyDescriptorModule$1=objectGetOwnPropertyDescriptor,createProperty$1=createProperty$6;$$M({target:"Object",stat:!0,sham:!DESCRIPTORS$8},{getOwnPropertyDescriptors:function(e){for(var t,r,n=toIndexedObject$2(e),i=getOwnPropertyDescriptorModule$1.f,o=ownKeys$2(n),a={},s=0;o.length>s;)void 0!==(r=i(n,t=o[s++]))&&createProperty$1(a,t,r);return a}});var path$b=path$r,getOwnPropertyDescriptors$5=path$b.Object.getOwnPropertyDescriptors,parent$1g=getOwnPropertyDescriptors$5,getOwnPropertyDescriptors$4=parent$1g,parent$1f=getOwnPropertyDescriptors$4,getOwnPropertyDescriptors$3=parent$1f,parent$1e=getOwnPropertyDescriptors$3,getOwnPropertyDescriptors$2=parent$1e,getOwnPropertyDescriptors$1=getOwnPropertyDescriptors$2,_Object$getOwnPropertyDescriptors$1=getDefaultExportFromCjs(getOwnPropertyDescriptors$1),defineProperties$7={exports:{}},$$L=_export,DESCRIPTORS$7=descriptors,defineProperties$6=objectDefineProperties.f;$$L({target:"Object",stat:!0,forced:Object.defineProperties!==defineProperties$6,sham:!DESCRIPTORS$7},{defineProperties:defineProperties$6});var path$a=path$r,Object$1=path$a.Object,defineProperties$5=defineProperties$7.exports=function(e,t){return Object$1.defineProperties(e,t)};Object$1.defineProperties.sham&&(defineProperties$5.sham=!0);var definePropertiesExports=defineProperties$7.exports,parent$1d=definePropertiesExports,defineProperties$4=parent$1d,parent$1c=defineProperties$4,defineProperties$3=parent$1c,parent$1b=defineProperties$3,defineProperties$2=parent$1b,defineProperties$1=defineProperties$2,_Object$defineProperties=getDefaultExportFromCjs(defineProperties$1);function ownKeys$1(e,t){var r=_Object$keys$1(e);if(_Object$getOwnPropertySymbols){var n=_Object$getOwnPropertySymbols(e);t&&(n=_filterInstanceProperty(n).call(n,(function(t){return _Object$getOwnPropertyDescriptor(e,t).enumerable}))),_pushInstanceProperty(r).apply(r,n)}return r}function _objectSpread2$1(e){for(var t=1;t<arguments.length;t++){var r,n,i=null!=arguments[t]?arguments[t]:{};t%2?_forEachInstanceProperty(r=ownKeys$1(Object(i),!0)).call(r,(function(t){_defineProperty$1(e,t,i[t])})):_Object$getOwnPropertyDescriptors$1?_Object$defineProperties(e,_Object$getOwnPropertyDescriptors$1(i)):_forEachInstanceProperty(n=ownKeys$1(Object(i))).call(n,(function(t){_Object$defineProperty(e,t,_Object$getOwnPropertyDescriptor(i,t))}))}return e}var entryVirtual$f=entryVirtual$m,concat$8=entryVirtual$f("Array").concat,isPrototypeOf$e=objectIsPrototypeOf,method$d=concat$8,ArrayPrototype$9=Array.prototype,concat$7=function(e){var t=e.concat;return e===ArrayPrototype$9||isPrototypeOf$e(ArrayPrototype$9,e)&&t===ArrayPrototype$9.concat?method$d:t},parent$1a=concat$7,concat$6=parent$1a,parent$19=concat$6,concat$5=parent$19,parent$18=concat$5,concat$4=parent$18,concat$3=concat$4,concat$2=concat$3,_concatInstanceProperty2=getDefaultExportFromCjs(concat$2),$$K=_export,$find=arrayIteration.find,FIND="find",SKIPS_HOLES$1=!0;FIND in[]&&Array(1)[FIND]((function(){SKIPS_HOLES$1=!1})),$$K({target:"Array",proto:!0,forced:SKIPS_HOLES$1},{find:function(e){return $find(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$e=entryVirtual$m,find$7=entryVirtual$e("Array").find,isPrototypeOf$d=objectIsPrototypeOf,method$c=find$7,ArrayPrototype$8=Array.prototype,find$6=function(e){var t=e.find;return e===ArrayPrototype$8||isPrototypeOf$d(ArrayPrototype$8,e)&&t===ArrayPrototype$8.find?method$c:t},parent$17=find$6,find$5=parent$17,parent$16=find$5,find$4=parent$16,parent$15=find$4,find$3=parent$15,find$2=find$3,find$1=find$2,_findInstanceProperty2=getDefaultExportFromCjs(find$1),internalMetadata={exports:{}},fails$c=fails$A,arrayBufferNonExtensible=fails$c((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),fails$b=fails$A,isObject$9=isObject$m,classof$3=classofRaw$2,ARRAY_BUFFER_NON_EXTENSIBLE=arrayBufferNonExtensible,$isExtensible=Object.isExtensible,FAILS_ON_PRIMITIVES=fails$b((function(){$isExtensible(1)})),objectIsExtensible=FAILS_ON_PRIMITIVES||ARRAY_BUFFER_NON_EXTENSIBLE?function(e){return!!isObject$9(e)&&((!ARRAY_BUFFER_NON_EXTENSIBLE||"ArrayBuffer"!=classof$3(e))&&(!$isExtensible||$isExtensible(e)))}:$isExtensible,fails$a=fails$A,freezing=!fails$a((function(){return Object.isExtensible(Object.preventExtensions({}))})),$$J=_export,uncurryThis$e=functionUncurryThis,hiddenKeys=hiddenKeys$6,isObject$8=isObject$m,hasOwn$5=hasOwnProperty_1,defineProperty$4=objectDefineProperty.f,getOwnPropertyNamesModule=objectGetOwnPropertyNames,getOwnPropertyNamesExternalModule=objectGetOwnPropertyNamesExternal,isExtensible2=objectIsExtensible,uid=uid$4,FREEZING=freezing,REQUIRED=!1,METADATA=uid("meta"),id=0,setMetadata=function(e){defineProperty$4(e,METADATA,{value:{objectID:"O"+id++,weakData:{}}})},fastKey$1=function(e,t){if(!isObject$8(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!hasOwn$5(e,METADATA)){if(!isExtensible2(e))return"F";if(!t)return"E";setMetadata(e)}return e[METADATA].objectID},getWeakData=function(e,t){if(!hasOwn$5(e,METADATA)){if(!isExtensible2(e))return!0;if(!t)return!1;setMetadata(e)}return e[METADATA].weakData},onFreeze=function(e){return FREEZING&&REQUIRED&&isExtensible2(e)&&!hasOwn$5(e,METADATA)&&setMetadata(e),e},enable=function(){meta.enable=function(){},REQUIRED=!0;var e=getOwnPropertyNamesModule.f,t=uncurryThis$e([].splice),r={};r[METADATA]=1,e(r).length&&(getOwnPropertyNamesModule.f=function(r){for(var n=e(r),i=0,o=n.length;i<o;i++)if(n[i]===METADATA){t(n,i,1);break}return n},$$J({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:getOwnPropertyNamesExternalModule.f}))},meta=internalMetadata.exports={enable:enable,fastKey:fastKey$1,getWeakData:getWeakData,onFreeze:onFreeze};hiddenKeys[METADATA]=!0;var internalMetadataExports=internalMetadata.exports,$$I=_export,global$5=global$o,InternalMetadataModule=internalMetadataExports,fails$9=fails$A,createNonEnumerableProperty=createNonEnumerableProperty$9,iterate$f=iterate$l,anInstance$3=anInstance$5,isCallable$4=isCallable$p,isObject$7=isObject$m,setToStringTag$2=setToStringTag$9,defineProperty$3=objectDefineProperty.f,forEach2=arrayIteration.forEach,DESCRIPTORS$6=descriptors,InternalStateModule$3=internalState,setInternalState$3=InternalStateModule$3.set,internalStateGetterFor$1=InternalStateModule$3.getterFor,collection$1=function(e,t,r){var n,i=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),a=i?"set":"add",s=global$5[e],l=s&&s.prototype,c={};if(DESCRIPTORS$6&&isCallable$4(s)&&(o||l.forEach&&!fails$9((function(){(new s).entries().next()})))){var u=(n=t((function(t,r){setInternalState$3(anInstance$3(t,u),{type:e,collection:new s}),null!=r&&iterate$f(r,t[a],{that:t,AS_ENTRIES:i})}))).prototype,p=internalStateGetterFor$1(e);forEach2(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in l)||o&&"clear"==e||createNonEnumerableProperty(u,e,(function(r,n){var i=p(this).collection;if(!t&&o&&!isObject$7(r))return"get"==e&&void 0;var a=i[e](0===r?0:r,n);return t?this:a}))})),o||defineProperty$3(u,"size",{configurable:!0,get:function(){return p(this).collection.size}})}else n=r.getConstructor(t,e,i,a),InternalMetadataModule.enable();return setToStringTag$2(n,e,!1,!0),c[e]=n,$$I({global:!0,forced:!0},c),o||r.setStrong(n,e,i),n},defineBuiltIn$2=defineBuiltIn$8,defineBuiltIns$2=function(e,t,r){for(var n in t)r&&r.unsafe&&e[n]?e[n]=t[n]:defineBuiltIn$2(e,n,t[n],r);return e},create$3=objectCreate$1,defineBuiltInAccessor$2=defineBuiltInAccessor$5,defineBuiltIns$1=defineBuiltIns$2,bind$i=functionBindContext,anInstance$2=anInstance$5,isNullOrUndefined$1=isNullOrUndefined$6,iterate$e=iterate$l,defineIterator=iteratorDefine,createIterResultObject=createIterResultObject$3,setSpecies=setSpecies$2,DESCRIPTORS$5=descriptors,fastKey=internalMetadataExports.fastKey,InternalStateModule$2=internalState,setInternalState$2=InternalStateModule$2.set,internalStateGetterFor=InternalStateModule$2.getterFor,collectionStrong$1={getConstructor:function(e,t,r,n){var i=e((function(e,i){anInstance$2(e,o),setInternalState$2(e,{type:t,index:create$3(null),first:void 0,last:void 0,size:0}),DESCRIPTORS$5||(e.size=0),isNullOrUndefined$1(i)||iterate$e(i,e[n],{that:e,AS_ENTRIES:r})})),o=i.prototype,a=internalStateGetterFor(t),s=function(e,t,r){var n,i,o=a(e),s=l(e,t);return s?s.value=r:(o.last=s={index:i=fastKey(t,!0),key:t,value:r,previous:n=o.last,next:void 0,removed:!1},o.first||(o.first=s),n&&(n.next=s),DESCRIPTORS$5?o.size++:e.size++,"F"!==i&&(o.index[i]=s)),e},l=function(e,t){var r,n=a(e),i=fastKey(t);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key==t)return r};return defineBuiltIns$1(o,{clear:function(){for(var e=a(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,DESCRIPTORS$5?e.size=0:this.size=0},delete:function(e){var t=this,r=a(t),n=l(t,e);if(n){var i=n.next,o=n.previous;delete r.index[n.index],n.removed=!0,o&&(o.next=i),i&&(i.previous=o),r.first==n&&(r.first=i),r.last==n&&(r.last=o),DESCRIPTORS$5?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=a(this),n=bind$i(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!l(this,e)}}),defineBuiltIns$1(o,r?{get:function(e){var t=l(this,e);return t&&t.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),DESCRIPTORS$5&&defineBuiltInAccessor$2(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(e,t,r){var n=t+" Iterator",i=internalStateGetterFor(t),o=internalStateGetterFor(n);defineIterator(e,t,(function(e,t){setInternalState$2(this,{type:n,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?createIterResultObject("keys"==t?r.key:"values"==t?r.value:[r.key,r.value],!1):(e.target=void 0,createIterResultObject(void 0,!0))}),r?"entries":"values",!r,!0),setSpecies(t)}},collection=collection$1,collectionStrong=collectionStrong$1;collection("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),collectionStrong);var path$9=path$r,map$c=path$9.Map,parent$14=map$c,map$b=parent$14,parent$13=map$b,map$a=parent$13,bind$h=functionBindContext,call$7=functionCall,aCallable$8=aCallable$j,aConstructor$1=aConstructor$3,isNullOrUndefined=isNullOrUndefined$6,iterate$d=iterate$l,push$7=[].push,collectionFrom=function(e){var t,r,n,i,o=arguments.length,a=o>1?arguments[1]:void 0;return aConstructor$1(this),(t=void 0!==a)&&aCallable$8(a),isNullOrUndefined(e)?new this:(r=[],t?(n=0,i=bind$h(a,o>2?arguments[2]:void 0),iterate$d(e,(function(e){call$7(push$7,r,i(e,n++))}))):iterate$d(e,push$7,{that:r}),new this(r))},$$H=_export,from$1=collectionFrom;$$H({target:"Map",stat:!0,forced:!0},{from:from$1});var arraySlice$3=arraySlice$6,collectionOf=function(){return new this(arraySlice$3(arguments))},$$G=_export,of2=collectionOf;$$G({target:"Map",stat:!0,forced:!0},{of:of2});var tryToString$1=tryToString$7,aMap$e=function(e){if("object"==typeof e&&"size"in e&&"has"in e&&"get"in e&&"set"in e&&"delete"in e&&"entries"in e)return e;throw TypeError(tryToString$1(e)+" is not a map")},caller$1=function(e,t){return 1==t?function(t,r){return t[e](r)}:function(t,r,n){return t[e](r,n)}},getBuiltIn$2=getBuiltIn$h,caller=caller$1,Map$5=getBuiltIn$2("Map"),mapHelpers={Map:Map$5,set:caller("set",2),get:caller("get",1),has:caller("has",1),remove:caller("delete",1),proto:Map$5.prototype},$$F=_export,aMap$d=aMap$e,remove=mapHelpers.remove;$$F({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=aMap$d(this),r=!0,n=0,i=arguments.length;n<i;n++)e=remove(t,arguments[n]),r=r&&e;return!!r}});var $$E=_export,aMap$c=aMap$e,MapHelpers$4=mapHelpers,get$8=MapHelpers$4.get,has$1=MapHelpers$4.has,set$5=MapHelpers$4.set;$$E({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var r,n,i=aMap$c(this);return has$1(i,e)?(r=get$8(i,e),"update"in t&&(r=t.update(r,e,i),set$5(i,e,r)),r):(n=t.insert(e,i),set$5(i,e,n),n)}});var call$6=functionCall,iterateSimple$1=function(e,t,r){for(var n,i,o=r||e.next;!(n=call$6(o,e)).done;)if(void 0!==(i=t(n.value)))return i},iterateSimple=iterateSimple$1,mapIterate=function(e,t,r){return r?iterateSimple(e.entries(),(function(e){return t(e[1],e[0])})):e.forEach(t)},$$D=_export,bind$g=functionBindContext,aMap$b=aMap$e,iterate$c=mapIterate;$$D({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=aMap$b(this),r=bind$g(e,arguments.length>1?arguments[1]:void 0);return!1!==iterate$c(t,(function(e,n){if(!r(e,n,t))return!1}),!0)}});var $$C=_export,bind$f=functionBindContext,aMap$a=aMap$e,MapHelpers$3=mapHelpers,iterate$b=mapIterate,Map$4=MapHelpers$3.Map,set$4=MapHelpers$3.set;$$C({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=aMap$a(this),r=bind$f(e,arguments.length>1?arguments[1]:void 0),n=new Map$4;return iterate$b(t,(function(e,i){r(e,i,t)&&set$4(n,i,e)})),n}});var $$B=_export,bind$e=functionBindContext,aMap$9=aMap$e,iterate$a=mapIterate;$$B({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=aMap$9(this),r=bind$e(e,arguments.length>1?arguments[1]:void 0),n=iterate$a(t,(function(e,n){if(r(e,n,t))return{value:e}}),!0);return n&&n.value}});var $$A=_export,bind$d=functionBindContext,aMap$8=aMap$e,iterate$9=mapIterate;$$A({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=aMap$8(this),r=bind$d(e,arguments.length>1?arguments[1]:void 0),n=iterate$9(t,(function(e,n){if(r(e,n,t))return{key:n}}),!0);return n&&n.key}});var $$z=_export,call$5=functionCall,uncurryThis$d=functionUncurryThis,isCallable$3=isCallable$p,aCallable$7=aCallable$j,iterate$8=iterate$l,Map$3=mapHelpers.Map,push$6=uncurryThis$d([].push);$$z({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){var r=new(isCallable$3(this)?this:Map$3);aCallable$7(t);var n=aCallable$7(r.has),i=aCallable$7(r.get),o=aCallable$7(r.set);return iterate$8(e,(function(e){var a=t(e);call$5(n,r,a)?push$6(call$5(i,r,a),e):call$5(o,r,a,[e])})),r}});var sameValueZero$1=function(e,t){return e===t||e!=e&&t!=t},$$y=_export,sameValueZero=sameValueZero$1,aMap$7=aMap$e,iterate$7=mapIterate;$$y({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===iterate$7(aMap$7(this),(function(t){if(sameValueZero(t,e))return!0}),!0)}});var $$x=_export,call$4=functionCall,iterate$6=iterate$l,isCallable$2=isCallable$p,aCallable$6=aCallable$j,Map$2=mapHelpers.Map;$$x({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var r=new(isCallable$2(this)?this:Map$2);aCallable$6(t);var n=aCallable$6(r.set);return iterate$6(e,(function(e){call$4(n,r,t(e),e)})),r}});var $$w=_export,aMap$6=aMap$e,iterate$5=mapIterate;$$w({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=iterate$5(aMap$6(this),(function(t,r){if(t===e)return{key:r}}),!0);return t&&t.key}});var $$v=_export,bind$c=functionBindContext,aMap$5=aMap$e,MapHelpers$2=mapHelpers,iterate$4=mapIterate,Map$1=MapHelpers$2.Map,set$3=MapHelpers$2.set;$$v({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=aMap$5(this),r=bind$c(e,arguments.length>1?arguments[1]:void 0),n=new Map$1;return iterate$4(t,(function(e,i){set$3(n,r(e,i,t),e)})),n}});var $$u=_export,bind$b=functionBindContext,aMap$4=aMap$e,MapHelpers$1=mapHelpers,iterate$3=mapIterate,Map=MapHelpers$1.Map,set$2=MapHelpers$1.set;$$u({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=aMap$4(this),r=bind$b(e,arguments.length>1?arguments[1]:void 0),n=new Map;return iterate$3(t,(function(e,i){set$2(n,i,r(e,i,t))})),n}});var $$t=_export,aMap$3=aMap$e,iterate$2=iterate$l,set$1=mapHelpers.set;$$t({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=aMap$3(this),r=arguments.length,n=0;n<r;)iterate$2(arguments[n++],(function(e,r){set$1(t,e,r)}),{AS_ENTRIES:!0});return t}});var $$s=_export,aCallable$5=aCallable$j,aMap$2=aMap$e,iterate$1=mapIterate,$TypeError$5=TypeError;$$s({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=aMap$2(this),r=arguments.length<2,n=r?void 0:arguments[1];if(aCallable$5(e),iterate$1(t,(function(i,o){r?(r=!1,n=i):n=e(n,i,o,t)})),r)throw $TypeError$5("Reduce of empty map with no initial value");return n}});var $$r=_export,bind$a=functionBindContext,aMap$1=aMap$e,iterate=mapIterate;$$r({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=aMap$1(this),r=bind$a(e,arguments.length>1?arguments[1]:void 0);return!0===iterate(t,(function(e,n){if(r(e,n,t))return!0}),!0)}});var $$q=_export,aCallable$4=aCallable$j,aMap=aMap$e,MapHelpers=mapHelpers,$TypeError$4=TypeError,get$7=MapHelpers.get,has=MapHelpers.has,set=MapHelpers.set;$$q({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var r=aMap(this),n=arguments.length;aCallable$4(t);var i=has(r,e);if(!i&&n<3)throw $TypeError$4("Updating absent value");var o=i?get$7(r,e):aCallable$4(n>2?arguments[2]:void 0)(e,r);return set(r,e,t(o,e,r)),r}});var call$3=functionCall,aCallable$3=aCallable$j,isCallable$1=isCallable$p,anObject$3=anObject$g,$TypeError$3=TypeError,mapUpsert=function(e,t){var r,n=anObject$3(this),i=aCallable$3(n.get),o=aCallable$3(n.has),a=aCallable$3(n.set),s=arguments.length>2?arguments[2]:void 0;if(!isCallable$1(t)&&!isCallable$1(s))throw $TypeError$3("At least one callback required");return call$3(o,n,e)?(r=call$3(i,n,e),isCallable$1(t)&&(r=t(r),call$3(a,n,e,r))):isCallable$1(s)&&(r=s(),call$3(a,n,e,r)),r},$$p=_export,upsert$1=mapUpsert;$$p({target:"Map",proto:!0,real:!0,forced:!0},{upsert:upsert$1});var $$o=_export,upsert2=mapUpsert;$$o({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:upsert2});var parent$12=map$a,map$9=parent$12,map$8=map$9,_Map$1=getDefaultExportFromCjs(map$8),map$7=map$8,_Map=getDefaultExportFromCjs(map$7),$$n=_export,$map=arrayIteration.map,arrayMethodHasSpeciesSupport$1=arrayMethodHasSpeciesSupport$5,HAS_SPECIES_SUPPORT$1=arrayMethodHasSpeciesSupport$1("map");$$n({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$1},{map:function(e){return $map(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$d=entryVirtual$m,map$6=entryVirtual$d("Array").map,isPrototypeOf$c=objectIsPrototypeOf,method$b=map$6,ArrayPrototype$7=Array.prototype,map$5=function(e){var t=e.map;return e===ArrayPrototype$7||isPrototypeOf$c(ArrayPrototype$7,e)&&t===ArrayPrototype$7.map?method$b:t},parent$11=map$5,map$4=parent$11,parent$10=map$4,map$3=parent$10,parent$$=map$3,map$2=parent$$,map$1=map$2,map2=map$1,_mapInstanceProperty=getDefaultExportFromCjs(map2),promise=promise$1,_Promise=getDefaultExportFromCjs(promise),indexOf2=indexOf$1,_indexOfInstanceProperty2=getDefaultExportFromCjs(indexOf2),keys$7=keys$8,_Object$keys=getDefaultExportFromCjs(keys$7),slice2=slice$1,_sliceInstanceProperty2=getDefaultExportFromCjs(slice2),tryToString=tryToString$7,$TypeError$2=TypeError,deletePropertyOrThrow$2=function(e,t){if(!delete e[t])throw $TypeError$2("Cannot delete property "+tryToString(t)+" of "+tryToString(e))},$$m=_export,toObject$3=toObject$d,toAbsoluteIndex=toAbsoluteIndex$4,toIntegerOrInfinity$2=toIntegerOrInfinity$6,lengthOfArrayLike$3=lengthOfArrayLike$c,setArrayLength=arraySetLength,doesNotExceedSafeInteger=doesNotExceedSafeInteger$3,arraySpeciesCreate=arraySpeciesCreate$3,createProperty=createProperty$6,deletePropertyOrThrow$1=deletePropertyOrThrow$2,arrayMethodHasSpeciesSupport=arrayMethodHasSpeciesSupport$5,HAS_SPECIES_SUPPORT=arrayMethodHasSpeciesSupport("splice"),max=Math.max,min$2=Math.min;$$m({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT},{splice:function(e,t){var r,n,i,o,a,s,l=toObject$3(this),c=lengthOfArrayLike$3(l),u=toAbsoluteIndex(e,c),p=arguments.length;for(0===p?r=n=0:1===p?(r=0,n=c-u):(r=p-2,n=min$2(max(toIntegerOrInfinity$2(t),0),c-u)),doesNotExceedSafeInteger(c+r-n),i=arraySpeciesCreate(l,n),o=0;o<n;o++)(a=u+o)in l&&createProperty(i,o,l[a]);if(i.length=n,r<n){for(o=u;o<c-n;o++)s=o+r,(a=o+n)in l?l[s]=l[a]:deletePropertyOrThrow$1(l,s);for(o=c;o>c-n+r;o--)deletePropertyOrThrow$1(l,o-1)}else if(r>n)for(o=c-n;o>u;o--)s=o+r-1,(a=o+n-1)in l?l[s]=l[a]:deletePropertyOrThrow$1(l,s);for(o=0;o<r;o++)l[o+u]=arguments[o+2];return setArrayLength(l,c-n+r),i}});var entryVirtual$c=entryVirtual$m,splice$7=entryVirtual$c("Array").splice,isPrototypeOf$b=objectIsPrototypeOf,method$a=splice$7,ArrayPrototype$6=Array.prototype,splice$6=function(e){var t=e.splice;return e===ArrayPrototype$6||isPrototypeOf$b(ArrayPrototype$6,e)&&t===ArrayPrototype$6.splice?method$a:t},parent$_=splice$6,splice$5=parent$_,parent$Z=splice$5,splice$4=parent$Z,parent$Y=splice$4,splice$3=parent$Y,splice$2=splice$3,splice$1=splice$2,_spliceInstanceProperty2=getDefaultExportFromCjs(splice$1),$$l=_export;$$l({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var path$8=path$r,isNan$5=path$8.Number.isNaN,parent$X=isNan$5,isNan$4=parent$X,parent$W=isNan$4,isNan$3=parent$W,parent$V=isNan$3,isNan$2=parent$V,isNan$1=isNan$2,isNan=isNan$1,_Number$isNaN=getDefaultExportFromCjs(isNan),whitespaces$4="\t\n\v\f\r                 \u2028\u2029\ufeff",uncurryThis$c=functionUncurryThis,requireObjectCoercible$4=requireObjectCoercible$8,toString$8=toString$f,whitespaces$3=whitespaces$4,replace$3=uncurryThis$c("".replace),ltrim=RegExp("^["+whitespaces$3+"]+"),rtrim=RegExp("(^|[^"+whitespaces$3+"])["+whitespaces$3+"]+$"),createMethod$3=function(e){return function(t){var r=toString$8(requireObjectCoercible$4(t));return 1&e&&(r=replace$3(r,ltrim,"")),2&e&&(r=replace$3(r,rtrim,"$1")),r}},stringTrim={start:createMethod$3(1),end:createMethod$3(2),trim:createMethod$3(3)},global$4=global$o,fails$8=fails$A,uncurryThis$b=functionUncurryThis,toString$7=toString$f,trim$8=stringTrim.trim,whitespaces$2=whitespaces$4,$parseInt$1=global$4.parseInt,Symbol$2=global$4.Symbol,ITERATOR$3=Symbol$2&&Symbol$2.iterator,hex=/^[+-]?0x/i,exec$2=uncurryThis$b(hex.exec),FORCED$5=8!==$parseInt$1(whitespaces$2+"08")||22!==$parseInt$1(whitespaces$2+"0x16")||ITERATOR$3&&!fails$8((function(){$parseInt$1(Object(ITERATOR$3))})),numberParseInt=FORCED$5?function(e,t){var r=trim$8(toString$7(e));return $parseInt$1(r,t>>>0||(exec$2(hex,r)?16:10))}:$parseInt$1,$$k=_export,$parseInt=numberParseInt;$$k({global:!0,forced:parseInt!=numberParseInt},{parseInt:numberParseInt});var path$7=path$r,_parseInt$5=path$7.parseInt,parent$U=_parseInt$5,_parseInt$4=parent$U,parent$T=_parseInt$4,_parseInt$3=parent$T,parent$S=_parseInt$3,_parseInt$2=parent$S,_parseInt$1=_parseInt$2,_parseInt=_parseInt$1,_parseInt2=getDefaultExportFromCjs(_parseInt),entryVirtual$b=entryVirtual$m,keys$6=entryVirtual$b("Array").keys,parent$R=keys$6,keys$5=parent$R,classof$2=classof$d,hasOwn$4=hasOwnProperty_1,isPrototypeOf$a=objectIsPrototypeOf,method$9=keys$5,ArrayPrototype$5=Array.prototype,DOMIterables={DOMTokenList:!0,NodeList:!0},keys$4=function(e){var t=e.keys;return e===ArrayPrototype$5||isPrototypeOf$a(ArrayPrototype$5,e)&&t===ArrayPrototype$5.keys||hasOwn$4(DOMIterables,classof$2(e))?method$9:t},parent$Q=keys$4,keys$3=parent$Q,parent$P=keys$3,keys$2=parent$P,keys$1=keys$2,keys3=keys$1,_keysInstanceProperty2=getDefaultExportFromCjs(keys3),filter3=filter$1,_filterInstanceProperty2=getDefaultExportFromCjs(filter3),DESCRIPTORS$4=descriptors,uncurryThis$a=functionUncurryThis,call$2=functionCall,fails$7=fails$A,objectKeys$1=objectKeys$4,getOwnPropertySymbolsModule=objectGetOwnPropertySymbols,propertyIsEnumerableModule=objectPropertyIsEnumerable,toObject$2=toObject$d,IndexedObject$1=indexedObject,$assign=Object.assign,defineProperty$2=Object.defineProperty,concat$1=uncurryThis$a([].concat),objectAssign=!$assign||fails$7((function(){if(DESCRIPTORS$4&&1!==$assign({b:1},$assign(defineProperty$2({},"a",{enumerable:!0,get:function(){defineProperty$2(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!=$assign({},e)[r]||objectKeys$1($assign({},t)).join("")!=n}))?function(e,t){for(var r=toObject$2(e),n=arguments.length,i=1,o=getOwnPropertySymbolsModule.f,a=propertyIsEnumerableModule.f;n>i;)for(var s,l=IndexedObject$1(arguments[i++]),c=o?concat$1(objectKeys$1(l),o(l)):objectKeys$1(l),u=c.length,p=0;u>p;)s=c[p++],DESCRIPTORS$4&&!call$2(a,l,s)||(r[s]=l[s]);return r}:$assign,$$j=_export,assign$7=objectAssign;$$j({target:"Object",stat:!0,arity:2,forced:Object.assign!==assign$7},{assign:assign$7});var path$6=path$r,assign$6=path$6.Object.assign,parent$O=assign$6,assign$5=parent$O,parent$N=assign$5,assign$4=parent$N,parent$M=assign$4,assign$3=parent$M,assign$2=assign$3,assign$1=assign$2,_Object$assign2=getDefaultExportFromCjs(assign$1),getOwnPropertySymbols2=getOwnPropertySymbols$1,_Object$getOwnPropertySymbols2=getDefaultExportFromCjs(getOwnPropertySymbols2),getOwnPropertyDescriptor$1=getOwnPropertyDescriptor$2,_Object$getOwnPropertyDescriptor2=getDefaultExportFromCjs(getOwnPropertyDescriptor$1),getOwnPropertyDescriptors2=getOwnPropertyDescriptors$1,_Object$getOwnPropertyDescriptors=getDefaultExportFromCjs(getOwnPropertyDescriptors2),defineProperties4=defineProperties$1,_Object$defineProperties2=getDefaultExportFromCjs(defineProperties4),defineProperty$1=defineProperty$5,_Object$defineProperty2=getDefaultExportFromCjs(defineProperty$1),symbol=symbol$1,_Symbol2=getDefaultExportFromCjs(symbol),iterator=iterator$1,_Symbol$iterator2=getDefaultExportFromCjs(iterator),setPrototypeOf=setPrototypeOf$2,_Object$setPrototypeOf2=getDefaultExportFromCjs(setPrototypeOf),getPrototypeOf$1=getPrototypeOf$3,_Object$getPrototypeOf2=getDefaultExportFromCjs(getPrototypeOf$1),uncurryThis$9=functionUncurryThis,aCallable$2=aCallable$j,isObject$6=isObject$m,hasOwn$3=hasOwnProperty_1,arraySlice$2=arraySlice$6,NATIVE_BIND=functionBindNative,$Function=Function,concat2=uncurryThis$9([].concat),join$3=uncurryThis$9([].join),factories={},construct$6=function(e,t,r){if(!hasOwn$3(factories,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";factories[t]=$Function("C,a","return new C("+join$3(n,",")+")")}return factories[t](e,r)},functionBind=NATIVE_BIND?$Function.bind:function(e){var t=aCallable$2(this),r=t.prototype,n=arraySlice$2(arguments,1),i=function(){var r=concat2(n,arraySlice$2(arguments));return this instanceof i?construct$6(t,r.length,r):t.apply(e,r)};return isObject$6(r)&&(i.prototype=r),i},$$i=_export,getBuiltIn$1=getBuiltIn$h,apply$2=functionApply,bind$9=functionBind,aConstructor=aConstructor$3,anObject$2=anObject$g,isObject$5=isObject$m,create$2=objectCreate$1,fails$6=fails$A,nativeConstruct=getBuiltIn$1("Reflect","construct"),ObjectPrototype=Object.prototype,push$5=[].push,NEW_TARGET_BUG=fails$6((function(){function e(){}return!(nativeConstruct((function(){}),[],e)instanceof e)})),ARGS_BUG=!fails$6((function(){nativeConstruct((function(){}))})),FORCED$4=NEW_TARGET_BUG||ARGS_BUG;$$i({target:"Reflect",stat:!0,forced:FORCED$4,sham:FORCED$4},{construct:function(e,t){aConstructor(e),anObject$2(t);var r=arguments.length<3?e:aConstructor(arguments[2]);if(ARGS_BUG&&!NEW_TARGET_BUG)return nativeConstruct(e,t,r);if(e==r){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];return apply$2(push$5,n,t),new(apply$2(bind$9,e,n))}var i=r.prototype,o=create$2(isObject$5(i)?i:ObjectPrototype),a=apply$2(e,o,t);return isObject$5(a)?a:o}});var path$5=path$r,construct$5=path$5.Reflect.construct,parent$L=construct$5,construct$4=parent$L,parent$K=construct$4,construct$3=parent$K,parent$J=construct$3,construct$2=parent$J,construct$1=construct$2,_Reflect$construct$1=getDefaultExportFromCjs(construct$1),construct2=construct$1,_Reflect$construct=getDefaultExportFromCjs(construct2),hasOwn$2=hasOwnProperty_1,isDataDescriptor$1=function(e){return void 0!==e&&(hasOwn$2(e,"value")||hasOwn$2(e,"writable"))},$$h=_export,call$1=functionCall,isObject$4=isObject$m,anObject$1=anObject$g,isDataDescriptor=isDataDescriptor$1,getOwnPropertyDescriptorModule=objectGetOwnPropertyDescriptor,getPrototypeOf2=objectGetPrototypeOf;function get$6(e,t){var r,n,i=arguments.length<3?e:arguments[2];return anObject$1(e)===i?e[t]:(r=getOwnPropertyDescriptorModule.f(e,t))?isDataDescriptor(r)?r.value:void 0===r.get?void 0:call$1(r.get,i):isObject$4(n=getPrototypeOf2(e))?get$6(n,t,i):void 0}$$h({target:"Reflect",stat:!0},{get:get$6});var path$4=path$r,get$5=path$4.Reflect.get,parent$I=get$5,get$4=parent$I,parent$H=get$4,get$3=parent$H,parent$G=get$3,get$2=parent$G,get$1=get$2,_Reflect$get$1=getDefaultExportFromCjs(get$1),get=get$1,_Reflect$get=getDefaultExportFromCjs(get),getIteratorMethod$1=getIteratorMethod$3,_getIteratorMethod=getDefaultExportFromCjs(getIteratorMethod$1),from3=from$2,_Array$from2=getDefaultExportFromCjs(from3),toPrimitive=toPrimitive$1,_Symbol$toPrimitive=getDefaultExportFromCjs(toPrimitive);function ownKeys2(e,t){var r=_Object$keys(e);if(_Object$getOwnPropertySymbols2){var n=_Object$getOwnPropertySymbols2(e);t&&(n=_filterInstanceProperty2(n).call(n,(function(t){return _Object$getOwnPropertyDescriptor2(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys2(Object(r),!0).forEach((function(t){_defineProperty(e,t,r[t])})):_Object$getOwnPropertyDescriptors?_Object$defineProperties2(e,_Object$getOwnPropertyDescriptors(r)):ownKeys2(Object(r)).forEach((function(t){_Object$defineProperty2(e,t,_Object$getOwnPropertyDescriptor2(r,t))}))}return e}function _typeof(e){return(_typeof="function"==typeof _Symbol2&&"symbol"==typeof _Symbol$iterator2?function(e){return typeof e}:function(e){return e&&"function"==typeof _Symbol2&&e.constructor===_Symbol2&&e!==_Symbol2.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),_Object$defineProperty2(e,_toPropertyKey(n.key),n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),_Object$defineProperty2(e,"prototype",{writable:!1}),e}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?_Object$defineProperty2(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _inherits$1(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),_Object$defineProperty2(e,"prototype",{writable:!1}),t&&_setPrototypeOf$1(e,t)}function _getPrototypeOf$1(e){return(_getPrototypeOf$1=_Object$setPrototypeOf2?_Object$getPrototypeOf2.bind():function(e){return e.__proto__||_Object$getPrototypeOf2(e)})(e)}function _setPrototypeOf$1(e,t){return(_setPrototypeOf$1=_Object$setPrototypeOf2?_Object$setPrototypeOf2.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _isNativeReflectConstruct$1(){if("undefined"==typeof Reflect||!_Reflect$construct)return!1;if(_Reflect$construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _assertThisInitialized$1(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn$1(e,t){if(t&&("object"===_typeof$1(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$1(e)}function _createSuper$1(e){var t=_isNativeReflectConstruct$1();return function(){var r,n=_getPrototypeOf$1(e);if(t){var i=_getPrototypeOf$1(this).constructor;r=_Reflect$construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn$1(this,r)}}function _superPropBase$1(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf$1(e)););return e}function _get$1(){return _get$1="undefined"!=typeof Reflect&&_Reflect$get?_Reflect$get.bind():function(e,t,r){var n=_superPropBase$1(e,t);if(n){var i=_Object$getOwnPropertyDescriptor2(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},_get$1.apply(this,arguments)}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _iterableToArray(e){if(void 0!==_Symbol2&&null!=_getIteratorMethod(e)||null!=e["@@iterator"])return _Array$from2(e)}function _unsupportedIterableToArray(e,t){var r;if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=_sliceInstanceProperty2(r=Object.prototype.toString.call(e)).call(r,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?_Array$from2(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _toPrimitive(e,t){if("object"!==_typeof$1(e)||null===e)return e;var r=e[_Symbol$toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==_typeof$1(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"===_typeof$1(t)?t:String(t)}var eventemitter3={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,n,o,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new i(n,o||e,a),l=r?r+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),s.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?_sliceInstanceProperty2(n).call(n,1):n);return _Object$getOwnPropertySymbols2?_concatInstanceProperty2(i).call(i,_Object$getOwnPropertySymbols2(e)):i},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,a=new Array(o);i<o;i++)a[i]=n[i].fn;return a},s.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},s.prototype.emit=function(e,t,n,i,o,a){var s=r?r+e:e;if(!this._events[s])return!1;var l,c,u=this._events[s],p=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),p){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,n),!0;case 4:return u.fn.call(u.context,t,n,i),!0;case 5:return u.fn.call(u.context,t,n,i,o),!0;case 6:return u.fn.call(u.context,t,n,i,o,a),!0}for(c=1,l=new Array(p-1);c<p;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var f,h=u.length;for(c=0;c<h;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),p){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,n);break;case 4:u[c].fn.call(u[c].context,t,n,i);break;default:if(!l)for(f=1,l=new Array(p-1);f<p;f++)l[f-1]=arguments[f];u[c].fn.apply(u[c].context,l)}}return!0},s.prototype.on=function(e,t,r){return o(this,e,t,r,!1)},s.prototype.once=function(e,t,r){return o(this,e,t,r,!0)},s.prototype.removeListener=function(e,t,n,i){var o=r?r+e:e;if(!this._events[o])return this;if(!t)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==t||i&&!s.once||n&&s.context!==n||a(this,o);else{for(var l=0,c=[],u=s.length;l<u;l++)(s[l].fn!==t||i&&!s[l].once||n&&s[l].context!==n)&&c.push(s[l]);c.length?this._events[o]=1===c.length?c[0]:c:a(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&a(this,t)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s}(eventemitter3);var eventemitter3Exports=eventemitter3.exports,EventEmitter=getDefaultExportFromCjs(eventemitter3Exports),toIntegerOrInfinity$1=toIntegerOrInfinity$6,toString$6=toString$f,requireObjectCoercible$3=requireObjectCoercible$8,$RangeError$1=RangeError,stringRepeat=function(e){var t=toString$6(requireObjectCoercible$3(this)),r="",n=toIntegerOrInfinity$1(e);if(n<0||n==1/0)throw $RangeError$1("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(t+=t))1&n&&(r+=t);return r},uncurryThis$8=functionUncurryThis,toLength$1=toLength$3,toString$5=toString$f,$repeat=stringRepeat,requireObjectCoercible$2=requireObjectCoercible$8,repeat$8=uncurryThis$8($repeat),stringSlice$3=uncurryThis$8("".slice),ceil=Math.ceil,createMethod$2=function(e){return function(t,r,n){var i,o,a=toString$5(requireObjectCoercible$2(t)),s=toLength$1(r),l=a.length,c=void 0===n?" ":toString$5(n);return s<=l||""==c?a:((o=repeat$8(c,ceil((i=s-l)/c.length))).length>i&&(o=stringSlice$3(o,0,i)),e?a+o:o+a)}},stringPad={start:createMethod$2(!1),end:createMethod$2(!0)},userAgent$2=engineUserAgent,stringPadWebkitBug=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(userAgent$2),$$g=_export,$padStart=stringPad.start,WEBKIT_BUG=stringPadWebkitBug;$$g({target:"String",proto:!0,forced:WEBKIT_BUG},{padStart:function(e){return $padStart(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$a=entryVirtual$m,padStart$6=entryVirtual$a("String").padStart,isPrototypeOf$9=objectIsPrototypeOf,method$8=padStart$6,StringPrototype$4=String.prototype,padStart$5=function(e){var t=e.padStart;return"string"==typeof e||e===StringPrototype$4||isPrototypeOf$9(StringPrototype$4,e)&&t===StringPrototype$4.padStart?method$8:t},parent$F=padStart$5,padStart$4=parent$F,parent$E=padStart$4,padStart$3=parent$E,parent$D=padStart$3,padStart$2=parent$D,padStart$1=padStart$2,padStart2=padStart$1,_padStartInstanceProperty=getDefaultExportFromCjs(padStart2),global$3=global$o,fails$5=fails$A,uncurryThis$7=functionUncurryThis,toString$4=toString$f,trim$7=stringTrim.trim,whitespaces$1=whitespaces$4,charAt$2=uncurryThis$7("".charAt),$parseFloat$1=global$3.parseFloat,Symbol$1=global$3.Symbol,ITERATOR$2=Symbol$1&&Symbol$1.iterator,FORCED$3=1/$parseFloat$1(whitespaces$1+"-0")!=-1/0||ITERATOR$2&&!fails$5((function(){$parseFloat$1(Object(ITERATOR$2))})),numberParseFloat=FORCED$3?function(e){var t=trim$7(toString$4(e)),r=$parseFloat$1(t);return 0===r&&"-"==charAt$2(t,0)?-0:r}:$parseFloat$1,$$f=_export,$parseFloat=numberParseFloat;$$f({global:!0,forced:parseFloat!=numberParseFloat},{parseFloat:numberParseFloat});var path$3=path$r,_parseFloat$5=path$3.parseFloat,parent$C=_parseFloat$5,_parseFloat$4=parent$C,parent$B=_parseFloat$4,_parseFloat$3=parent$B,parent$A=_parseFloat$3,_parseFloat$2=parent$A,_parseFloat$1=_parseFloat$2,_parseFloat=_parseFloat$1,_parseFloat2=getDefaultExportFromCjs(_parseFloat),PROPER_FUNCTION_NAME=functionName.PROPER,fails$4=fails$A,whitespaces=whitespaces$4,non="​…᠎",stringTrimForced=function(e){return fails$4((function(){return!!whitespaces[e]()||non[e]()!==non||PROPER_FUNCTION_NAME&&whitespaces[e].name!==e}))},$$e=_export,$trim=stringTrim.trim,forcedStringTrimMethod=stringTrimForced;$$e({target:"String",proto:!0,forced:forcedStringTrimMethod("trim")},{trim:function(){return $trim(this)}});var entryVirtual$9=entryVirtual$m,trim$6=entryVirtual$9("String").trim,isPrototypeOf$8=objectIsPrototypeOf,method$7=trim$6,StringPrototype$3=String.prototype,trim$5=function(e){var t=e.trim;return"string"==typeof e||e===StringPrototype$3||isPrototypeOf$8(StringPrototype$3,e)&&t===StringPrototype$3.trim?method$7:t},parent$z=trim$5,trim$4=parent$z,parent$y=trim$4,trim$3=parent$y,parent$x=trim$3,trim$2=parent$x,trim$1=trim$2,trim2=trim$1,_trimInstanceProperty2=getDefaultExportFromCjs(trim2),arraySlice$1=arraySliceSimple,floor$2=Math.floor,mergeSort=function(e,t){var r=e.length,n=floor$2(r/2);return r<8?insertionSort(e,t):merge2(e,mergeSort(arraySlice$1(e,0,n),t),mergeSort(arraySlice$1(e,n),t),t)},insertionSort=function(e,t){for(var r,n,i=e.length,o=1;o<i;){for(n=o,r=e[o];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==o++&&(e[n]=r)}return e},merge2=function(e,t,r,n){for(var i=t.length,o=r.length,a=0,s=0;a<i||s<o;)e[a+s]=a<i&&s<o?n(t[a],r[s])<=0?t[a++]:r[s++]:a<i?t[a++]:r[s++];return e},arraySort$1=mergeSort,userAgent$1=engineUserAgent,firefox=userAgent$1.match(/firefox\/(\d+)/i),engineFfVersion=!!firefox&&+firefox[1],UA=engineUserAgent,engineIsIeOrEdge=/MSIE|Trident/.test(UA),userAgent=engineUserAgent,webkit=userAgent.match(/AppleWebKit\/(\d+)\./),engineWebkitVersion=!!webkit&&+webkit[1],$$d=_export,uncurryThis$6=functionUncurryThis,aCallable$1=aCallable$j,toObject$1=toObject$d,lengthOfArrayLike$2=lengthOfArrayLike$c,deletePropertyOrThrow=deletePropertyOrThrow$2,toString$3=toString$f,fails$3=fails$A,internalSort=arraySort$1,arrayMethodIsStrict$2=arrayMethodIsStrict$5,FF=engineFfVersion,IE_OR_EDGE=engineIsIeOrEdge,V8=engineV8Version,WEBKIT=engineWebkitVersion,test=[],nativeSort=uncurryThis$6(test.sort),push$4=uncurryThis$6(test.push),FAILS_ON_UNDEFINED=fails$3((function(){test.sort(void 0)})),FAILS_ON_NULL=fails$3((function(){test.sort(null)})),STRICT_METHOD$1=arrayMethodIsStrict$2("sort"),STABLE_SORT=!fails$3((function(){if(V8)return V8<70;if(!(FF&&FF>3)){if(IE_OR_EDGE)return!0;if(WEBKIT)return WEBKIT<603;var e,t,r,n,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)test.push({k:t+n,v:r})}for(test.sort((function(e,t){return t.v-e.v})),n=0;n<test.length;n++)t=test[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}})),FORCED$2=FAILS_ON_UNDEFINED||!FAILS_ON_NULL||!STRICT_METHOD$1||!STABLE_SORT,getSortCompare=function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:toString$3(t)>toString$3(r)?1:-1}};$$d({target:"Array",proto:!0,forced:FORCED$2},{sort:function(e){void 0!==e&&aCallable$1(e);var t=toObject$1(this);if(STABLE_SORT)return void 0===e?nativeSort(t):nativeSort(t,e);var r,n,i=[],o=lengthOfArrayLike$2(t);for(n=0;n<o;n++)n in t&&push$4(i,t[n]);for(internalSort(i,getSortCompare(e)),r=lengthOfArrayLike$2(i),n=0;n<r;)t[n]=i[n++];for(;n<o;)deletePropertyOrThrow(t,n++);return t}});var _context$1,entryVirtual$8=entryVirtual$m,sort$6=entryVirtual$8("Array").sort,isPrototypeOf$7=objectIsPrototypeOf,method$6=sort$6,ArrayPrototype$4=Array.prototype,sort$5=function(e){var t=e.sort;return e===ArrayPrototype$4||isPrototypeOf$7(ArrayPrototype$4,e)&&t===ArrayPrototype$4.sort?method$6:t},parent$w=sort$5,sort$4=parent$w,parent$v=sort$4,sort$3=parent$v,parent$u=sort$3,sort$2=parent$u,sort$1=sort$2,sort2=sort$1,_sortInstanceProperty=getDefaultExportFromCjs(sort2),XG_DEBUG_OPEN="undefined"!=typeof window&&window.location&&_indexOfInstanceProperty2(_context$1=window.location.href).call(_context$1,"xgplayerdebugger=1")>-1,STYLE={info:"color: #525252; background-color: #90ee90;",error:"color: #525252; background-color: red;",warn:"color: #525252; background-color: yellow; "},XGTAG="%c[xgplayer]",XG_DEBUG={config:{debug:XG_DEBUG_OPEN?3:0},logInfo:function(e){for(var t,r,n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];this.config.debug>=3&&(r=console).log.apply(r,_concatInstanceProperty2(t=[XGTAG,STYLE.info,e]).call(t,i))},logWarn:function(e){for(var t,r,n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];this.config.debug>=1&&(r=console).warn.apply(r,_concatInstanceProperty2(t=[XGTAG,STYLE.warn,e]).call(t,i))},logError:function(e){var t,r;if(!(this.config.debug<1)){for(var n=this.config.debug>=2?"trace":"error",i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];(r=console)[n].apply(r,_concatInstanceProperty2(t=[XGTAG,STYLE.error,e]).call(t,o))}}};function bindDebug(e){e.logInfo=XG_DEBUG.logInfo.bind(e),e.logWarn=XG_DEBUG.logWarn.bind(e),e.logError=XG_DEBUG.logError.bind(e)}var XgplayerTimeRange=function(){function e(t){_classCallCheck(this,e),this.bufferedList=t}return _createClass(e,[{key:"start",value:function(e){return this.bufferedList[e].start}},{key:"end",value:function(e){return this.bufferedList[e].end}},{key:"length",get:function(){return this.bufferedList.length}}]),e}(),util={};function checkIsIn(e,t){for(var r=0,n=t.length;r<n;r++)if(_indexOfInstanceProperty2(e).call(e,t[r])>-1)return!0;return!1}function isObject$3(e){var t=_typeof(e);return null!==e&&("object"===t||"function"===t)}function debounce(e,t,r){var n,i,o,a,s,l,c=0,u=!1,p=!1,f=!0,h=!t&&0!==t&&"function"==typeof window.requestAnimationFrame;if("function"!=typeof e)throw new TypeError("Expected a function");function d(t){var r=n,o=i;return n=i=void 0,c=t,a=e.apply(o,r)}function y(e,t){return h?(window.cancelAnimationFrame(s),window.requestAnimationFrame(e)):setTimeout(e,t)}function g(e){var r=e-l;return void 0===l||r>=t||r<0||p&&e-c>=o}function $(){var e=Date.now();if(g(e))return v(e);s=y($,function(e){var r=e-c,n=t-(e-l);return p?Math.min(n,o-r):n}(e))}function v(e){return s=void 0,f&&n?d(e):(n=i=void 0,a)}function _(){for(var e=Date.now(),r=g(e),o=arguments.length,f=new Array(o),h=0;h<o;h++)f[h]=arguments[h];if(n=f,i=this,l=e,r){if(void 0===s)return function(e){return c=e,s=y($,t),u?d(e):a}(l);if(p)return s=y($,t),d(l)}return void 0===s&&(s=y($,t)),a}return t=+t||0,isObject$3(r)&&(u=!!r.leading,o=(p="maxWait"in r)?Math.max(+r.maxWait||0,t):o,f="trailing"in r?!!r.trailing:f),_.cancel=function(){void 0!==s&&function(e){if(h)return window.cancelAnimationFrame(e);clearTimeout(e)}(s),c=0,n=l=i=s=void 0},_.flush=function(){return void 0===s?a:v(Date.now())},_.pending=function(){return void 0!==s},_}function throttle(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return isObject$3(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),debounce(e,t,{leading:n,trailing:i,maxWait:t})}function getLang(){var e=(document.documentElement.getAttribute("lang")||navigator.language||"zh-cn").toLocaleLowerCase();return"zh-cn"===e&&(e="zh"),e}function checkIsCurrentVideo(e,t,r){if(e){var n=e.getAttribute(r);return!(!n||n!==t||"VIDEO"!==e.tagName&&"AUDIO"!==e.tagName)}}util.createDom=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=document.createElement(e);return i.className=n,i.innerHTML=t,_Object$keys(r).forEach((function(t){var n=t,o=r[t];"video"===e||"audio"===e||"live-video"===e?o&&i.setAttribute(n,o):i.setAttribute(n,o)})),i},util.createDomFromHtml=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";try{var n=document.createElement("div");n.innerHTML=e;var i=n.children;return n=null,i.length>0?(i=i[0],r&&util.addClass(i,r),t&&_Object$keys(t).forEach((function(e){i.setAttribute(e,t[e])})),i):null}catch(e){return XG_DEBUG.logError("util.createDomFromHtml",e),null}},util.hasClass=function(e,t){if(!e||!t)return!1;try{return Array.prototype.some.call(e.classList,(function(e){return e===t}))}catch(n){var r=e.className&&"object"===_typeof(e.className)?e.getAttribute("class"):e.className;return r&&!!r.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}},util.addClass=function(e,t){if(e&&t)try{t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach((function(t){t&&e.classList.add(t)}))}catch(r){util.hasClass(e,t)||(e.className&&"object"===_typeof(e.className)?e.setAttribute("class",e.getAttribute("class")+" "+t):e.className+=" "+t)}},util.removeClass=function(e,t){if(e&&t)try{t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach((function(t){t&&e.classList.remove(t)}))}catch(r){util.hasClass(e,t)&&t.split(/\s+/g).forEach((function(t){var r=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className&&"object"===_typeof(e.className)?e.setAttribute("class",e.getAttribute("class").replace(r," ")):e.className=e.className.replace(r," ")}))}},util.toggleClass=function(e,t){e&&t.split(/\s+/g).forEach((function(t){util.hasClass(e,t)?util.removeClass(e,t):util.addClass(e,t)}))},util.classNames=function(){for(var e=arguments,t=[],r=function(r){if("String"===util.typeOf(e[r]))t.push(e[r]);else if("Object"===util.typeOf(e[r])){var n;_mapInstanceProperty(n=_Object$keys(e[r])).call(n,(function(n){e[r][n]&&t.push(n)}))}},n=0;n<arguments.length;n++)r(n);return t.join(" ")},util.findDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,r=arguments.length>1?arguments[1]:void 0;try{e=t.querySelector(r)}catch(n){XG_DEBUG.logError("util.findDom",n),0===_indexOfInstanceProperty2(r).call(r,"#")&&(e=t.getElementById(_sliceInstanceProperty2(r).call(r,1)))}return e},util.getCss=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,!1)[t]},util.padStart=function(e,t,r){for(var n=String(r),i=t>>0,o=Math.ceil(i/n.length),a=[],s=String(e);o--;)a.push(n);return a.join("").substring(0,i-s.length)+s},util.format=function(e){if(window.isNaN(e))return"";e=Math.round(e);var t=_padStartInstanceProperty(util).call(util,Math.floor(e/3600),2,0),r=_padStartInstanceProperty(util).call(util,Math.floor((e-3600*t)/60),2,0),n=_padStartInstanceProperty(util).call(util,Math.floor(e-3600*t-60*r),2,0);return("00"===t?[r,n]:[t,r,n]).join(":")},util.event=function(e){if(e.touches){var t=e.touches[0]||e.changedTouches[0];e.clientX=t.clientX||0,e.clientY=t.clientY||0,e.offsetX=t.pageX-t.target.offsetLeft,e.offsetY=t.pageY-t.target.offsetTop}e._target=e.target||e.srcElement},util.typeOf=function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},util.deepCopy=function(e,t){if("Object"===util.typeOf(t)&&"Object"===util.typeOf(e))return _Object$keys(t).forEach((function(r){if("Object"!==util.typeOf(t[r])||t[r]instanceof Node)if("Array"===util.typeOf(t[r])){var n;e[r]="Array"===util.typeOf(e[r])?_concatInstanceProperty2(n=e[r]).call(n,t[r]):t[r]}else e[r]=t[r];else void 0===e[r]||void 0===e[r]?e[r]=t[r]:util.deepCopy(e[r],t[r])})),e},util.deepMerge=function(e,t){var r;return _mapInstanceProperty(r=_Object$keys(t)).call(r,(function(r){var n;"Array"===util.typeOf(t[r])&&"Array"===util.typeOf(e[r])?"Array"===util.typeOf(e[r])&&(n=e[r]).push.apply(n,_toConsumableArray(t[r])):util.typeOf(e[r])!==util.typeOf(t[r])||null===e[r]||"Object"!==util.typeOf(e[r])||t[r]instanceof window.Node?null!==t[r]&&(e[r]=t[r]):util.deepMerge(e[r],t[r])})),e},util.getBgImage=function(e){var t=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;if(!t||"none"===t)return"";var r=document.createElement("a");return r.href=t.replace(/url\("|"\)/g,""),r.href},util.copyDom=function(e){if(e&&1===e.nodeType){var t=document.createElement(e.tagName);return Array.prototype.forEach.call(e.attributes,(function(e){t.setAttribute(e.name,e.value)})),e.innerHTML&&(t.innerHTML=e.innerHTML),t}return""},util.setInterval=function(e,t,r,n){e._interval[t]||(e._interval[t]=window.setInterval(r.bind(e),n))},util.clearInterval=function(e,t){clearInterval(e._interval[t]),e._interval[t]=null},util.setTimeout=function(e,t,r){e._timers||(e._timers=[]);var n=setTimeout((function(){t(),util.clearTimeout(e,n)}),r);return e._timers.push(n),n},util.clearTimeout=function(e,t){var r=e._timers;if("Array"===util.typeOf(r)){for(var n=0;n<r.length;n++)if(r[n]===t){_spliceInstanceProperty2(r).call(r,n,1),clearTimeout(t);break}}else clearTimeout(t)},util.clearAllTimers=function(e){var t=e._timers;"Array"===util.typeOf(t)&&(_mapInstanceProperty(t).call(t,(function(e){clearTimeout(e)})),e._timerIds=[])},util.createImgBtn=function(e,t,r,n){var i,o,a,s,l,c,u,p,f,h,d,y=util.createDom("xg-".concat(e),"",{},"xgplayer-".concat(e,"-img"));(y.style.backgroundImage='url("'.concat(t,'")'),r&&n)&&(["px","rem","em","pt","dp","vw","vh","vm","%"].every((function(e){var t,i;return!(_indexOfInstanceProperty2(r).call(r,e)>-1&&_indexOfInstanceProperty2(n).call(n,e)>-1)||(c=_parseFloat2(_trimInstanceProperty2(t=_sliceInstanceProperty2(r).call(r,0,_indexOfInstanceProperty2(r).call(r,e))).call(t)),u=_parseFloat2(_trimInstanceProperty2(i=_sliceInstanceProperty2(n).call(n,0,_indexOfInstanceProperty2(n).call(n,e))).call(i)),p=e,!1)})),y.style.width=_concatInstanceProperty2(i="".concat(c)).call(i,p),y.style.height=_concatInstanceProperty2(o="".concat(u)).call(o,p),y.style.backgroundSize=_concatInstanceProperty2(a=_concatInstanceProperty2(s=_concatInstanceProperty2(l="".concat(c)).call(l,p," ")).call(s,u)).call(a,p),y.style.margin="start"===e?_concatInstanceProperty2(f=_concatInstanceProperty2(h=_concatInstanceProperty2(d="-".concat(u/2)).call(d,p," auto auto -")).call(h,c/2)).call(f,p):"auto 5px auto 5px");return y},util.Hex2RGBA=function(e,t){var r,n=[];if(/^\#[0-9A-F]{3}$/i.test(e)){var i="#";e.replace(/[0-9A-F]/gi,(function(e){i+=e+e})),e=i}return/^#[0-9A-F]{6}$/i.test(e)?(e.replace(/[0-9A-F]{2}/gi,(function(e){n.push(_parseInt2(e,16))})),_concatInstanceProperty2(r="rgba(".concat(n.join(","),", ")).call(r,t,")")):"rgba(255, 255, 255, 0.1)"},util.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},util.checkIsFunction=function(e){return e&&"function"==typeof e},util.checkIsObject=function(e){return null!==e&&"object"===_typeof(e)},util.hide=function(e){e.style.display="none"},util.show=function(e,t){e.style.display=t||"block"},util.isUndefined=function(e){if(null==e)return!0},util.isNotNull=function(e){return!(null==e)},util.setStyleFromCsstext=function(e,t){if(t)if("String"===util.typeOf(t)){var r=t.replace(/\s+/g,"").split(";");_mapInstanceProperty(r).call(r,(function(t){if(t){var r=t.split(":");r.length>1&&(e.style[r[0]]=r[1])}}))}else{var n;_mapInstanceProperty(n=_Object$keys(t)).call(n,(function(r){e.style[r]=t[r]}))}},util.filterStyleFromText=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["width","height","top","left","bottom","right","position","z-index","padding","margin","transform"],n=e.style.cssText;if(!n)return{};var i=n.replace(/\s+/g,"").split(";"),o={},a={};return _mapInstanceProperty(i).call(i,(function(e){if(e){var t=e.split(":");t.length>1&&(checkIsIn(t[0],r)?o[t[0]]=t[1]:a[t[0]]=t[1])}})),e.setAttribute("style",""),_mapInstanceProperty(t=_Object$keys(a)).call(t,(function(t){e.style[t]=a[t]})),o},util.getStyleFromCsstext=function(e){var t=e.style.cssText;if(!t)return{};var r=t.replace(/\s+/g,"").split(";"),n={};return _mapInstanceProperty(r).call(r,(function(e){if(e){var t=e.split(":");t.length>1&&(n[t[0]]=t[1])}})),n},util.preloadImg=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(e){var n=new window.Image;n.onload=function(e){n=null,t&&t(e)},n.onerror=function(e){n=null,r&&r(e)},n.src=e}},util.stopPropagation=function(e){e&&e.stopPropagation()},util.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},util.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},util.checkTouchSupport=function(){return"ontouchstart"in window},util.getBuffered2=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,r=[],n=0;n<e.length;n++)r.push({start:e.start(n)<.5?0:e.start(n),end:e.end(n)});_sortInstanceProperty(r).call(r,(function(e,t){var r=e.start-t.start;return r||t.end-e.end}));var i=[];if(t)for(var o=0;o<r.length;o++){var a=i.length;if(a){var s=i[a-1].end;r[o].start-s<t?r[o].end>s&&(i[a-1].end=r[o].end):i.push(r[o])}else i.push(r[o])}else i=r;return new XgplayerTimeRange(i)},util.getEventPos=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.touches&&e.touches.length>0&&(e=e.touches[0]),{x:e.x/t,y:e.y/t,clientX:e.clientX/t,clientY:e.clientY/t,offsetX:e.offsetX/t,offsetY:e.offsetY/t,pageX:e.pageX/t,pageY:e.pageY/t}},util.requestAnimationFrame=function(e){var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(t)return t(e)},util.getHostFromUrl=function(e){if("String"!==util.typeOf(e))return"";var t=e.split("/"),r="";return t.length>3&&t[2]&&(r=t[2]),r},util.cancelAnimationFrame=function(e){var t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;t&&t(e)},util.isMSE=function(e){return e.media&&(e=e.media),!!(e&&e instanceof HTMLMediaElement)&&(/^blob/.test(e.currentSrc)||/^blob/.test(e.src))},util.isBlob=function(e){return"string"==typeof e&&/^blob/.test(e)},util.generateSessionId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(new Date).getTime();try{e=_parseInt2(e)}catch(t){e=0}return t+=e,window.performance&&"function"==typeof window.performance.now&&(t+=_parseInt2(window.performance.now())),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:3&r|8).toString(16)}))},util.createEvent=function(e){var t;return"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},util.adjustTimeByDuration=function(e,t,r){return t&&e&&(e>t||r&&e<t)?t:e},util.createPositionBar=function(e,t){var r=util.createDom("xg-bar","",{"data-index":-1},e);return t.appendChild(r),r},util.getTransformStyle=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0,scale:1,rotate:0},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n={scale:"".concat(t.scale||1),translate:_concatInstanceProperty2(e="".concat(t.x||0,"%, ")).call(e,t.y||0,"%"),rotate:"".concat(t.rotate||0,"deg")};return _Object$keys(n).forEach((function(e){var t,i=new RegExp("".concat(e,"\\([^\\(]+\\)"),"g"),o=_concatInstanceProperty2(t="".concat(e,"(")).call(t,n[e],")");i.test(r)?(i.lastIndex=-1,r=r.replace(i,o)):r+="".concat(o," ")})),r},util.convertDeg=function(e){return Math.abs(e)<=1?360*e:e%360},util.getIndexByTime=function(e,t){var r=t.length,n=-1;if(r<1)return n;if(e<=t[0].end||r<2)n=0;else if(e>t[r-1].end)n=r-1;else for(var i=1;i<r;i++)if(e>t[i-1].end&&e<=t[i].end){n=i;break}return n},util.getOffsetCurrentTime=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,n=-1;if((n=r>=0&&r<t.length?r:util.getIndexByTime(e,t))<0)return-1;var i=t.length,o=t[n],a=o.start,s=o.end,l=o.cTime,c=o.offset;return e<a?l:e>=a&&e<=s?e-c:e>s&&n>=i-1?s:-1},util.getCurrentTimeByOffset=function(e,t){var r=-1;if(!t||t.length<0)return e;for(var n=0;n<t.length;n++)if(e<=t[n].duration){r=n;break}if(-1!==r){var i=t[r].start;return r-1<0?i+e:i+(e-t[r-1].duration)}return e};var VERSION_REG={android:/(Android)\s([\d.]+)/,ios:/(Version)\/([\d.]+)/},H264_MIMETYPES=["avc1.42E01E, mp4a.40.2","avc1.58A01E, mp4a.40.2","avc1.4D401E, mp4a.40.2","avc1.64001E, mp4a.40.2","avc1.42E01E","mp4v.20.8","mp4v.20.8, mp4a.40.2","mp4v.20.240, mp4a.40.2"],sniffer={get device(){return sniffer.os.isPc?"pc":"mobile"},get browser(){var e,t;if("undefined"==typeof navigator)return"";var r=navigator.userAgent.toLowerCase(),n={ie:/rv:([\d.]+)\) like gecko/,firefox:/firefox\/([\d.]+)/,chrome:/chrome\/([\d.]+)/,opera:/opera.([\d.]+)/,safari:/version\/([\d.]+).*safari/};return _concatInstanceProperty2(e=[]).call(e,_filterInstanceProperty2(t=_Object$keys(n)).call(t,(function(e){return n[e].test(r)})))[0]},get os(){if("undefined"==typeof navigator)return{};var e=navigator.userAgent,t=/(?:Windows Phone)/.test(e),r=/(?:SymbianOS)/.test(e)||t,n=/(?:Android)/.test(e),i=/(?:Firefox)/.test(e),o=/(?:iPad|PlayBook)/.test(e)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,a=o||n&&!/(?:Mobile)/.test(e)||i&&/(?:Tablet)/.test(e),s=/(?:iPhone)/.test(e)&&!a;return{isTablet:a,isPhone:s,isIpad:o,isIos:s||o,isAndroid:n,isPc:!(s||n||r||a),isSymbian:r,isWindowsPhone:t,isFireFox:i}},get osVersion(){if("undefined"==typeof navigator)return 0;var e=navigator.userAgent,t="",r=(t=/(?:iPhone)|(?:iPad|PlayBook)/.test(e)?VERSION_REG.ios:VERSION_REG.android)?t.exec(e):[];if(r&&r.length>=3){var n=r[2].split(".");return n.length>0?_parseInt2(n[0]):0}return 0},get isWeixin(){if("undefined"==typeof navigator)return!1;return!!/(micromessenger)\/([\d.]+)/.exec(navigator.userAgent.toLocaleLowerCase())},isSupportMP4:function(){var e={isSupport:!1,mime:""};if("undefined"==typeof document)return e;if(this.supportResult)return this.supportResult;var t=document.createElement("video");return"function"==typeof t.canPlayType&&_mapInstanceProperty(H264_MIMETYPES).call(H264_MIMETYPES,(function(r){"probably"===t.canPlayType('video/mp4; codecs="'.concat(r,'"'))&&(e.isSupport=!0,e.mime+="||".concat(r))})),this.supportResult=e,t=null,e},isMSESupport:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'video/mp4; codecs="avc1.42E01E,mp4a.40.2"';if("undefined"==typeof MediaSource||!MediaSource)return!1;try{return MediaSource.isTypeSupported(e)}catch(t){return this._logger.error(e,t),!1}},isHevcSupported:function(){return!("undefined"==typeof MediaSource||!MediaSource.isTypeSupported)&&(MediaSource.isTypeSupported('video/mp4;codecs="hev1.1.6.L120.90"')||MediaSource.isTypeSupported('video/mp4;codecs="hev1.2.4.L120.90"')||MediaSource.isTypeSupported('video/mp4;codecs="hev1.3.E.L120.90"')||MediaSource.isTypeSupported('video/mp4;codecs="hev1.4.10.L120.90"'))},probeConfigSupported:function(e){var t={supported:!1,smooth:!1,powerEfficient:!1};if(!e||"undefined"==typeof navigator)return _Promise.resolve(t);if(navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo)return navigator.mediaCapabilities.decodingInfo(e);var r=e.video||{},n=e.audio||{};try{var i=MediaSource.isTypeSupported(r.contentType),o=MediaSource.isTypeSupported(n.contentType);return _Promise.resolve({supported:i&&o,smooth:!1,powerEfficient:!1})}catch(e){return _Promise.resolve(t)}}},version="3.0.21-rc.21",ERROR_TYPE_MAP={1:"media",2:"media",3:"media",4:"media",5:"media",6:"media"},ERROR_MAP={1:5101,2:5102,3:5103,4:5104,5:5105,6:5106},Errors=_createClass((function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{errorType:"",errorCode:0,errorMessage:"",originError:"",ext:{},mediaError:null};_classCallCheck(this,e);var n=t&&t.i18n?t.i18n.ERROR_TYPES:null;if(t.media){var i,o=r.mediaError?r.mediaError:t.media.error||{},a=t.duration,s=t.currentTime,l=t.ended,c=t.src,u=t.currentSrc,p=t.media,f=p.readyState,h=p.networkState,d=r.errorCode||o.code;ERROR_MAP[d]&&(d=ERROR_MAP[d]);var y={playerVersion:version,currentTime:s,duration:a,ended:l,readyState:f,networkState:h,src:c||u,errorType:r.errorType,errorCode:d,message:r.errorMessage||o.message,mediaError:o,originError:r.originError?r.originError.stack:"",host:util.getHostFromUrl(c||u)};return r.ext&&_mapInstanceProperty(i=_Object$keys(r.ext)).call(i,(function(e){y[e]=r.ext[e]})),y}if(arguments.length>1){for(var g={playerVersion:version,domain:document.domain},$=["errorType","currentTime","duration","networkState","readyState","src","currentSrc","ended","errd","errorCode","mediaError"],v=0;v<arguments.length;v++)g[$[v]]=arguments[v];return g.ex=n?(n[arguments[0]]||{}).msg:"",g}})),PLAY="play",PLAYING="playing",ENDED="ended",PAUSE="pause",ERROR="error",SEEKING="seeking",SEEKED="seeked",TIME_UPDATE="timeupdate",WAITING="waiting",CANPLAY="canplay",CANPLAY_THROUGH="canplaythrough",DURATION_CHANGE="durationchange",VOLUME_CHANGE="volumechange",LOADED_DATA="loadeddata",LOADED_METADATA="loadedmetadata",RATE_CHANGE="ratechange",PROGRESS="progress",LOAD_START="loadstart",EMPTIED="emptied",STALLED="stalled",SUSPEND="suspend",ABORT="abort",BUFFER_CHANGE="bufferedChange",PLAYER_FOCUS="focus",PLAYER_BLUR="blur",READY="ready",URL_NULL="urlNull",AUTOPLAY_STARTED="autoplay_started",AUTOPLAY_PREVENTED="autoplay_was_prevented",COMPLETE="complete",REPLAY="replay",DESTROY="destroy",URL_CHANGE="urlchange",DOWNLOAD_SPEED_CHANGE="download_speed_change",LEAVE_PLAYER="leaveplayer",ENTER_PLAYER="enterplayer",LOADING="loading",FULLSCREEN_CHANGE="fullscreen_change",CSS_FULLSCREEN_CHANGE="cssFullscreen_change",MINI_STATE_CHANGE="mini_state_change",DEFINITION_CHANGE="definition_change",BEFORE_DEFINITION_CHANGE="before_definition_change",AFTER_DEFINITION_CHANGE="after_definition_change",SEI_PARSED="SEI_PARSED",RETRY="retry",VIDEO_RESIZE="video_resize",PIP_CHANGE="pip_change",ROTATE="rotate",SCREEN_SHOT="screenShot",PLAYNEXT="playnext",SHORTCUT="shortcut",XGLOG="xglog",USER_ACTION="user_action",RESET="reset",SOURCE_ERROR="source_error",SOURCE_SUCCESS="source_success",SWITCH_SUBTITLE="switch_subtitle",VIDEO_EVENTS=["play","playing","ended","pause","error","seeking","seeked","timeupdate","waiting","canplay","canplaythrough","durationchange","volumechange","loadeddata","loadedmetadata","ratechange","progress","loadstart","emptied","stalled","suspend","abort","lowdecode"],STATS_EVENTS={STATS_INFO:"stats_info",STATS_DOWNLOAD:"stats_download",STATS_RESET:"stats_reset"},FPS_STUCK="fps_stuck",XGEvents=Object.freeze({__proto__:null,ABORT:ABORT,AFTER_DEFINITION_CHANGE:AFTER_DEFINITION_CHANGE,AUTOPLAY_PREVENTED:AUTOPLAY_PREVENTED,AUTOPLAY_STARTED:AUTOPLAY_STARTED,BEFORE_DEFINITION_CHANGE:BEFORE_DEFINITION_CHANGE,BUFFER_CHANGE:BUFFER_CHANGE,CANPLAY:CANPLAY,CANPLAY_THROUGH:CANPLAY_THROUGH,COMPLETE:COMPLETE,CSS_FULLSCREEN_CHANGE:CSS_FULLSCREEN_CHANGE,DEFINITION_CHANGE:DEFINITION_CHANGE,DESTROY:DESTROY,DOWNLOAD_SPEED_CHANGE:DOWNLOAD_SPEED_CHANGE,DURATION_CHANGE:DURATION_CHANGE,EMPTIED:EMPTIED,ENDED:ENDED,ENTER_PLAYER:ENTER_PLAYER,ERROR:ERROR,FPS_STUCK:FPS_STUCK,FULLSCREEN_CHANGE:FULLSCREEN_CHANGE,LEAVE_PLAYER:LEAVE_PLAYER,LOADED_DATA:LOADED_DATA,LOADED_METADATA:LOADED_METADATA,LOADING:LOADING,LOAD_START:LOAD_START,MINI_STATE_CHANGE:MINI_STATE_CHANGE,PAUSE:PAUSE,PIP_CHANGE:PIP_CHANGE,PLAY:PLAY,PLAYER_BLUR:PLAYER_BLUR,PLAYER_FOCUS:PLAYER_FOCUS,PLAYING:PLAYING,PLAYNEXT:PLAYNEXT,PROGRESS:PROGRESS,RATE_CHANGE:RATE_CHANGE,READY:READY,REPLAY:REPLAY,RESET:RESET,RETRY:RETRY,ROTATE:ROTATE,SCREEN_SHOT:SCREEN_SHOT,SEEKED:SEEKED,SEEKING:SEEKING,SEI_PARSED:SEI_PARSED,SHORTCUT:SHORTCUT,SOURCE_ERROR:SOURCE_ERROR,SOURCE_SUCCESS:SOURCE_SUCCESS,STALLED:STALLED,STATS_EVENTS:STATS_EVENTS,SUSPEND:SUSPEND,SWITCH_SUBTITLE:SWITCH_SUBTITLE,TIME_UPDATE:TIME_UPDATE,URL_CHANGE:URL_CHANGE,URL_NULL:URL_NULL,USER_ACTION:USER_ACTION,VIDEO_EVENTS:VIDEO_EVENTS,VIDEO_RESIZE:VIDEO_RESIZE,VOLUME_CHANGE:VOLUME_CHANGE,WAITING:WAITING,XGLOG:XGLOG});function emitVideoEvent(e,t){this&&this.emit&&("error"===e?this.errorHandler(e,t.error):this.emit(e,t))}function getVideoEventHandler(e,t){return function(r,n){var i={player:t,eventName:e,originalEvent:r,detail:r.detail||{},timeStamp:r.timeStamp,currentTime:t.currentTime,duration:t.duration,paused:t.paused,ended:t.ended,isInternalOp:!!t._internalOp[r.type],muted:t.muted,volume:t.volume,host:util.getHostFromUrl(t.currentSrc),vtype:t.vtype};if(t.removeInnerOP(r.type),"timeupdate"===e&&(t._currentTime=t.media&&t.media.currentTime),"ratechange"===e){var o=t.media?t.media.playbackRate:0;if(o&&t._rate===o)return;t._rate=t.media&&t.media.playbackRate}if("durationchange"===e&&(t._duration=t.media.duration),"volumechange"===e&&(i.isMutedChange=t._lastMuted!==t.muted,t._lastMuted=t.muted),"error"===e&&(i.error=n||t.video.error),t.mediaEventMiddleware[e]){var a=emitVideoEvent.bind(t,e,i);try{t.mediaEventMiddleware[e].call(t,i,a)}catch(r){throw emitVideoEvent.call(t,e,i),r}}else emitVideoEvent.call(t,e,i)}}var MediaProxy=function(e){_inherits$1(r,EventEmitter);var t=_createSuper$1(r);function r(e){var n;_classCallCheck(this,r),(n=t.call(this,e))._hasStart=!1,n._currentTime=0,n._duration=0,n._internalOp={},n._lastMuted=!1,n.vtype="MP4",n._rate=-1,n.mediaConfig=_Object$assign2({},{controls:!1,autoplay:e.autoplay,playsinline:e.playsinline,"x5-playsinline":e.playsinline,"webkit-playsinline":e.playsinline,"x5-video-player-fullscreen":e["x5-video-player-fullscreen"]||e.x5VideoPlayerFullscreen,"x5-video-orientation":e["x5-video-orientation"]||e.x5VideoOrientation,airplay:e.airplay,"webkit-airplay":e.airplay,tabindex:0|e.tabindex,mediaType:e.mediaType||"video","data-index":-1},e.videoConfig,e.videoAttributes);var i=e["x5-video-player-type"]||e.x5VideoPlayerType;return sniffer.isWeixin&&sniffer.os.isAndroid&&i&&(n.mediaConfig["x5-video-player-type"]=i,delete n.mediaConfig.playsinline,delete n.mediaConfig["webkit-playsinline"],delete n.mediaConfig["x5-playsinline"]),e.loop&&(n.mediaConfig.loop="loop"),e.autoplayMuted&&!Object.prototype.hasOwnProperty.call(n.mediaConfig,"muted")&&(n.mediaConfig.muted=!0),n.media=e.mediaEl instanceof HTMLMediaElement?e.mediaEl:"function"==typeof e.mediaEl?e.mediaEl(n.mediaConfig):util.createDom(n.mediaConfig.mediaType,"",n.mediaConfig,""),e.defaultPlaybackRate&&(n.media.defaultPlaybackRate=n.media.playbackRate=e.defaultPlaybackRate),"Number"===util.typeOf(e.volume)&&(n.volume=e.volume),e.autoplayMuted&&(n.media.muted=!0,n._lastMuted=!0),e.autoplay&&(n.media.autoplay=!0),e.playsinline&&(n.media.playsinline=!0),n._interval={},n.mediaEventMiddleware={},n.attachVideoEvents(),n}return _createClass(r,[{key:"setEventsMiddleware",value:function(e){var t,r=this;_mapInstanceProperty(t=_Object$keys(e)).call(t,(function(t){r.mediaEventMiddleware[t]=e[t]}))}},{key:"removeEventsMiddleware",value:function(e){var t,r=this;_mapInstanceProperty(t=_Object$keys(e)).call(t,(function(e){delete r.mediaEventMiddleware[e]}))}},{key:"attachVideoEvents",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.media;this._evHandlers||(this._evHandlers=_mapInstanceProperty(VIDEO_EVENTS).call(VIDEO_EVENTS,(function(t){var r,n=_concatInstanceProperty2(r="on".concat(t.charAt(0).toUpperCase())).call(r,_sliceInstanceProperty2(t).call(t,1));return"function"==typeof e[n]&&e.on(t,e[n]),_defineProperty({},t,getVideoEventHandler(t,e))}))),this._evHandlers.forEach((function(e){var r=_Object$keys(e)[0];t.addEventListener(r,e[r],!1)}))}},{key:"detachVideoEvents",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.media;this._evHandlers.forEach((function(e){var r=_Object$keys(e)[0];t.removeEventListener(r,e[r],!1)})),this._evHandlers.forEach((function(t){var r,n=_Object$keys(t)[0],i=_concatInstanceProperty2(r="on".concat(n.charAt(0).toUpperCase())).call(r,_sliceInstanceProperty2(n).call(n,1));"function"==typeof e[i]&&e.off(n,e[i])})),this._evHandlers=null}},{key:"_attachSourceEvents",value:function(e,t){var r=this;e.removeAttribute("src"),e.load(),t.forEach((function(e,t){r.media.appendChild(util.createDom("source","",{src:"".concat(e.src),type:"".concat(e.type||""),"data-index":t+1}))}));var n=e.children;if(n){this._videoSourceCount=n.length,this._videoSourceIndex=n.length,this._vLoadeddata=function(e){r.emit(SOURCE_SUCCESS,{src:e.target.currentSrc,host:util.getHostFromUrl(e.target.currentSrc)})};for(var i=null,o=0;o<this._evHandlers.length;o++)if("error"===_Object$keys(this._evHandlers[o])[0]){i=this._evHandlers[o];break}!this._sourceError&&(this._sourceError=function(e){var t=_parseInt2(e.target.getAttribute("data-index"),10);if(r._videoSourceIndex--,0===r._videoSourceIndex||t>=r._videoSourceCount){var n={code:4,message:"sources_load_error"};i?i.error(e,n):r.errorHandler("error",n)}var o=ERROR_TYPE_MAP[4];r.emit(SOURCE_ERROR,new Errors(r,{errorType:o,errorCode:4,errorMessage:"sources_load_error",mediaError:{code:4,message:"sources_load_error"},src:e.target.src}))});for(var a=0;a<n.length;a++)n[a].addEventListener("error",this._sourceError);e.addEventListener("loadeddata",this._vLoadeddata)}}},{key:"_detachSourceEvents",value:function(e){var t=e.children;if(t&&0!==t.length&&this._sourceError){for(var r=0;r<t.length;r++)t[r].removeEventListener("error",this._sourceError);for(;t.length>0;)e.removeChild(t[0]);this._vLoadeddata&&e.removeEventListener("loadeddata",this._vLoadeddata)}}},{key:"errorHandler",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.media&&(this.media.error||t)){var r=this.media.error||t,n=r.code?ERROR_TYPE_MAP[r.code]:"other";r.message;this.media.currentSrc||this.media.srcObject||(r={code:6,message:"empty_src"}),this.emit(e,new Errors(this,{errorType:n,errorCode:r.code,errorMessage:r.message||"",mediaError:r}))}}},{key:"destroy",value:function(){for(var e in this.media&&(this.media.pause&&(this.media.pause(),this.media.muted=!0),this.media.removeAttribute("src"),this.media.load()),this._currentTime=0,this._duration=0,this.mediaConfig=null,this._interval)Object.prototype.hasOwnProperty.call(this._interval,e)&&(clearInterval(this._interval[e]),this._interval[e]=null);this.detachVideoEvents(),this.media=null,this.mediaEventMiddleware={},this.removeAllListeners()}},{key:"video",get:function(){return this.media},set:function(e){this.media=e}},{key:"play",value:function(){return this.media?this.media.play():null}},{key:"pause",value:function(){this.media&&this.media.pause()}},{key:"load",value:function(){this.media&&this.media.load()}},{key:"canPlayType",value:function(e){return!!this.media&&this.media.canPlayType(e)}},{key:"getBufferedRange",value:function(e){var t=[0,0];if(!this.media)return t;e||(e=this.media.buffered);var r=this.media.currentTime;if(e)for(var n=0,i=e.length;n<i&&(t[0]=e.start(n),t[1]=e.end(n),!(t[0]<=r&&r<=t[1]));n++);return t[0]-r<=0&&r-t[1]<=0?t:[0,0]}},{key:"autoplay",get:function(){return!!this.media&&this.media.autoplay},set:function(e){this.media&&(this.media.autoplay=e)}},{key:"buffered",get:function(){return this.media?this.media.buffered:null}},{key:"buffered2",get:function(){return this.media&&this.media.buffered?util.getBuffered2(this.media.buffered):null}},{key:"bufferedPoint",get:function(){var e={start:0,end:0};if(!this.media)return e;var t=this.media.buffered;if(!t||0===t.length)return e;for(var r=0;r<t.length;r++)if((t.start(r)<=this.currentTime||t.start(r)<.1)&&t.end(r)>=this.currentTime)return{start:t.start(r),end:t.end(r)};return e}},{key:"crossOrigin",get:function(){return this.media?this.media.crossOrigin:""},set:function(e){this.media&&(this.media.crossOrigin=e)}},{key:"currentSrc",get:function(){return this.media?this.media.currentSrc:""},set:function(e){this.media&&(this.media.currentSrc=e)}},{key:"currentTime",get:function(){return this.media?void 0!==this.media.currentTime?this.media.currentTime:this._currentTime:0},set:function(e){this.media&&(this.media.currentTime=e)}},{key:"defaultMuted",get:function(){return!!this.media&&this.media.defaultMuted},set:function(e){this.media&&(this.media.defaultMuted=e)}},{key:"duration",get:function(){return this._duration}},{key:"ended",get:function(){return!!this.media&&this.media.ended}},{key:"error",get:function(){return this.media.error}},{key:"errorNote",get:function(){if(!this.media.error)return"";return["MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED"][this.media.error.code-1]}},{key:"loop",get:function(){return!!this.media&&this.media.loop},set:function(e){this.media&&(this.media.loop=e)}},{key:"muted",get:function(){return!!this.media&&this.media.muted},set:function(e){this.media&&this.media.muted!==e&&(this._lastMuted=this.media.muted,this.media.muted=e)}},{key:"networkState",get:function(){return this.media.networkState}},{key:"paused",get:function(){return!this.media||this.media.paused}},{key:"playbackRate",get:function(){return this.media?this.media.playbackRate:0},set:function(e){this.media&&e!==1/0&&(this.media.defaultPlaybackRate=e,this.media.playbackRate=e)}},{key:"played",get:function(){return this.media?this.media.played:null}},{key:"preload",get:function(){return!!this.media&&this.media.preload},set:function(e){this.media&&(this.media.preload=e)}},{key:"readyState",get:function(){return this.media.readyState}},{key:"seekable",get:function(){return!!this.media&&this.media.seekable}},{key:"seeking",get:function(){return!!this.media&&this.media.seeking}},{key:"src",get:function(){return this.media?this.media.src:""},set:function(e){this.media&&(this.emit(URL_CHANGE,e),this.emit(WAITING),this._currentTime=0,this._duration=0,util.isMSE(this.media)?this.onWaiting():(this._detachSourceEvents(this.media),"Array"===util.typeOf(e)?this._attachSourceEvents(this.media,e):e?this.media.src=e:this.media.removeAttribute("src"),this.load()))}},{key:"volume",get:function(){return this.media?this.media.volume:0},set:function(e){e!==1/0&&this.media&&(this.media.volume=e)}},{key:"aspectRatio",get:function(){return this.media?this.media.videoWidth/this.media.videoHeight:0}},{key:"addInnerOP",value:function(e){this._internalOp[e]=!0}},{key:"removeInnerOP",value:function(e){delete this._internalOp[e]}},{key:"emit",value:function(e,t){for(var n,i,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(i=_get$1(_getPrototypeOf$1(r.prototype),"emit",this)).call.apply(i,_concatInstanceProperty2(n=[this,e,t]).call(n,a))}},{key:"on",value:function(e,t){for(var n,i,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(i=_get$1(_getPrototypeOf$1(r.prototype),"on",this)).call.apply(i,_concatInstanceProperty2(n=[this,e,t]).call(n,a))}},{key:"once",value:function(e,t){for(var n,i,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(i=_get$1(_getPrototypeOf$1(r.prototype),"once",this)).call.apply(i,_concatInstanceProperty2(n=[this,e,t]).call(n,a))}},{key:"off",value:function(e,t){for(var n,i,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(i=_get$1(_getPrototypeOf$1(r.prototype),"off",this)).call.apply(i,_concatInstanceProperty2(n=[this,e,t]).call(n,a))}},{key:"offAll",value:function(){_get$1(_getPrototypeOf$1(r.prototype),"removeAllListeners",this).call(this)}}]),r}(),INDEXDB=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{name:"xgplayer",version:1,db:null,ojstore:{name:"xg-m4a",keypath:"vid"}};_classCallCheck(this,e),this.indexedDB=window.indexedDB||window.webkitindexedDB,this.IDBKeyRange=window.IDBKeyRange||window.webkitIDBKeyRange,this.myDB=t}return _createClass(e,[{key:"openDB",value:function(e){var t=this,r=this,n=this.myDB.version||1,i=r.indexedDB.open(r.myDB.name,n);i.onerror=function(e){},i.onsuccess=function(n){t.myDB.db=n.target.result,e.call(r)},i.onupgradeneeded=function(e){var t=e.target.result;e.target.transaction,t.objectStoreNames.contains(r.myDB.ojstore.name)||t.createObjectStore(r.myDB.ojstore.name,{keyPath:r.myDB.ojstore.keypath})}}},{key:"deletedb",value:function(){this.indexedDB.deleteDatabase(this.myDB.name)}},{key:"closeDB",value:function(){this.myDB.db.close()}},{key:"addData",value:function(e,t){for(var r,n=this.myDB.db.transaction(e,"readwrite").objectStore(e),i=0;i<t.length;i++)(r=n.add(t[i])).onerror=function(){},r.onsuccess=function(){}}},{key:"putData",value:function(e,t){for(var r,n=this.myDB.db.transaction(e,"readwrite").objectStore(e),i=0;i<t.length;i++)(r=n.put(t[i])).onerror=function(){},r.onsuccess=function(){}}},{key:"getDataByKey",value:function(e,t,r){var n=this,i=this.myDB.db.transaction(e,"readwrite").objectStore(e).get(t);i.onerror=function(){r.call(n,null)},i.onsuccess=function(e){var t=e.target.result;r.call(n,t)}}},{key:"deleteData",value:function(e,t){this.myDB.db.transaction(e,"readwrite").objectStore(e).delete(t)}},{key:"clearData",value:function(e){this.myDB.db.transaction(e,"readwrite").objectStore(e).clear()}}]),e}(),FULLSCREEN_EVENTS=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],GET_FULLSCREEN_API=["requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen"],EXIT_FULLSCREEN_API=["exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen"],PLATER_ID="data-xgplayerid";function callHandler(e,t,r){for(var n,i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];var s,l=t.call.apply(t,_concatInstanceProperty2(n=[e]).call(n,o));r&&"function"==typeof r&&(l&&l.then?l.then((function(){for(var t,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];r.call.apply(r,_concatInstanceProperty2(t=[e]).call(t,i))})):r.call.apply(r,_concatInstanceProperty2(s=[e]).call(s,o)))}function hook(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{pre:null,next:null};return this.__hooks||(this.__hooks={}),!this.__hooks[e]&&(this.__hooks[e]=null),function(){var n,i=arguments,o=this;if(r.pre)try{var a,s;(s=r.pre).call.apply(s,_concatInstanceProperty2(a=[this]).call(a,_sliceInstanceProperty2(Array.prototype).call(arguments)))}catch(t){var l,c;throw t.message=_concatInstanceProperty2(l=_concatInstanceProperty2(c="[pluginName: ".concat(this.pluginName,":")).call(c,e,":pre error] >> ")).call(l,t.message),t}if(this.__hooks&&this.__hooks[e])try{var u,p=runHooks(this,e,t);if(p)if(p.then)p.then((function(e){var n;!1!==e&&callHandler.apply(void 0,_concatInstanceProperty2(n=[o,t,r.next]).call(n,_toConsumableArray(i)))})).catch((function(e){throw e}));else callHandler.apply(void 0,_concatInstanceProperty2(u=[this,t,r.next]).call(u,_sliceInstanceProperty2(Array.prototype).call(arguments)));else if(void 0===p){var f;callHandler.apply(void 0,_concatInstanceProperty2(f=[this,t,r.next]).call(f,_sliceInstanceProperty2(Array.prototype).call(arguments)))}}catch(t){var h,d;throw t.message=_concatInstanceProperty2(h=_concatInstanceProperty2(d="[pluginName: ".concat(this.pluginName,":")).call(d,e,"] >> ")).call(h,t.message),t}else callHandler.apply(void 0,_concatInstanceProperty2(n=[this,t,r.next]).call(n,_sliceInstanceProperty2(Array.prototype).call(arguments)))}.bind(this)}function findHookIndex(e,t){var r=this.__hooks;if(!r||!Array.isArray(r[e]))return-1;for(var n=r[e],i=0;i<n.length;i++)if(n[i]===t)return i;return-1}function useHooks(e,t){var r=this.__hooks;if(r)return r.hasOwnProperty(e)?(Array.isArray(r[e])||(r[e]=[]),-1===findHookIndex.call(this,e,t)&&r[e].push(t),!0):(console.warn("has no supported hook which name [".concat(e,"]")),!1)}function removeHooks(e,t){var r=this.__hooks;if(r)if(Array.isArray(r[e])){var n=r[e],i=findHookIndex.call(this,e,t);-1!==i&&_spliceInstanceProperty2(n).call(n,i,1)}else r[e]&&(r[e]=null)}function usePluginHooks(e){if(this.plugins&&this.plugins[e.toLowerCase()]){for(var t=this.plugins[e.toLowerCase()],r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return t.useHooks&&t.useHooks.apply(t,n)}}function removePluginHooks(e){if(this.plugins&&this.plugins[e.toLowerCase()]){var t=this.plugins[e.toLowerCase()];if(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return t.removeHooks&&t.removeHooks.apply(t,n)}}}function hooksDescriptor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.__hooks={},t&&_mapInstanceProperty(t).call(t,(function(t){e.__hooks[t]=null})),_Object$defineProperty2(e,"hooks",{get:function(){var t;return e.__hooks&&_mapInstanceProperty(t=_Object$keys(e.__hooks)).call(t,(function(t){if(e.__hooks[t])return t}))}})}function delHooksDescriptor(e){e.__hooks=null}function runHooks(e,t,r){for(var n=arguments.length,i=new Array(n>3?n-3:0),o=3;o<n;o++)i[o-3]=arguments[o];if(e.__hooks&&Array.isArray(e.__hooks[t])){var a,s=e.__hooks[t],l=-1;return function e(t,r,n){for(var i,o,a=arguments.length,c=new Array(a>3?a-3:0),u=3;u<a;u++)c[u-3]=arguments[u];if(l++,0===s.length||l===s.length)return n.call.apply(n,_concatInstanceProperty2(o=[t,t]).call(o,c));var p,f=s[l],h=f.call.apply(f,_concatInstanceProperty2(i=[t,t]).call(i,c));return h&&h.then?h.then((function(i){var o;return!1===i?null:e.apply(void 0,_concatInstanceProperty2(o=[t,r,n]).call(o,c))})).catch((function(e){console.warn("[runHooks]".concat(r," reject"),e.message)})):!1!==h?e.apply(void 0,_concatInstanceProperty2(p=[t,r,n]).call(p,c)):void 0}.apply(void 0,_concatInstanceProperty2(a=[e,t,r]).call(a,i))}var c;return r.call.apply(r,_concatInstanceProperty2(c=[e,e]).call(c,i))}function showErrorMsg(e,t){var r;XG_DEBUG.logError(_concatInstanceProperty2(r="[".concat(e,"] event or callback cant be undefined or null when call ")).call(r,t))}var BasePlugin=function(){function e(t){_classCallCheck(this,e),util.checkIsFunction(this.beforeCreate)&&this.beforeCreate(t),hooksDescriptor(this),this.__args=t,this.__events={},this.__onceEvents={},this.config=t.config||{},this.player=null,this.playerConfig={},this.pluginName="",this.__init(t)}return _createClass(e,[{key:"beforeCreate",value:function(e){}},{key:"afterCreate",value:function(){}},{key:"beforePlayerInit",value:function(){}},{key:"onPluginsReady",value:function(){}},{key:"afterPlayerInit",value:function(){}},{key:"destroy",value:function(){}},{key:"__init",value:function(e){this.player=e.player,this.playerConfig=e.player&&e.player.config,this.pluginName=e.pluginName?e.pluginName.toLowerCase():this.constructor.pluginName.toLowerCase(),this.logger=e.player&&e.player.logger}},{key:"updateLang",value:function(e){e||(e=this.lang)}},{key:"lang",get:function(){return this.player.lang}},{key:"i18n",get:function(){return this.player.i18n}},{key:"i18nKeys",get:function(){return this.player.i18nKeys}},{key:"domEventType",get:function(){var e=util.checkTouchSupport()?"touch":"mouse";return!this.playerConfig||"touch"!==this.playerConfig.domEventType&&"mouse"!==this.playerConfig.domEventType||(e=this.playerConfig.domEventType),e}},{key:"on",value:function(e,t){var r=this;e&&t&&this.player?"string"==typeof e?(this.__events[e]=t,this.player.on(e,t)):Array.isArray(e)&&e.forEach((function(e){r.__events[e]=t,r.player.on(e,t)})):showErrorMsg(this.pluginName,"plugin.on(event, callback)")}},{key:"once",value:function(e,t){var r=this;e&&t&&this.player?"string"==typeof e?(this.__onceEvents[e]=t,this.player.once(e,t)):Array.isArray(e)&&e.forEach((function(n){r.__onceEvents[n]=t,r.player.once(e,t)})):showErrorMsg(this.pluginName,"plugin.once(event, callback)")}},{key:"off",value:function(e,t){var r=this;e&&t&&this.player?"string"==typeof e?(delete this.__events[e],this.player.off(e,t)):Array.isArray(e)&&e.forEach((function(n){delete r.__events[e],r.player.off(n,t)})):showErrorMsg(this.pluginName,"plugin.off(event, callback)")}},{key:"offAll",value:function(){var e=this;["__events","__onceEvents"].forEach((function(t){_Object$keys(e[t]).forEach((function(r){e[t][r]&&e.off(r,e[t][r]),r&&delete e[t][r]}))})),this.__events={},this.__onceEvents={}}},{key:"emit",value:function(e){var t,r;if(this.player){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];(r=this.player).emit.apply(r,_concatInstanceProperty2(t=[e]).call(t,i))}}},{key:"emitUserAction",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.player){var n=_objectSpread2(_objectSpread2({},r),{},{pluginName:this.pluginName});this.player.emitUserAction(e,t,n)}}},{key:"hook",value:function(e,t){var r;return hook.call.apply(hook,_concatInstanceProperty2(r=[this]).call(r,_sliceInstanceProperty2(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){for(var r,n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];return useHooks.call.apply(useHooks,_concatInstanceProperty2(r=[this]).call(r,_sliceInstanceProperty2(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){for(var r,n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];return removeHooks.call.apply(removeHooks,_concatInstanceProperty2(r=[this]).call(r,_sliceInstanceProperty2(Array.prototype).call(arguments)))}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(this.player)return r&&(t.pluginName=r),this.player.registerPlugin({plugin:e,options:t})}},{key:"getPlugin",value:function(e){return this.player?this.player.getPlugin(e):null}},{key:"__destroy",value:function(){var e,t=this,r=this.player,n=this.pluginName;this.offAll(),util.clearAllTimers(this),util.checkIsFunction(this.destroy)&&this.destroy(),_mapInstanceProperty(e=["player","playerConfig","pluginName","logger","__args","__hooks"]).call(e,(function(e){t[e]=null})),r.unRegisterPlugin(n),delHooksDescriptor(this)}}],[{key:"defineGetterOrSetter",value:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&_Object$defineProperty2(e,r,t[r])}},{key:"defineMethod",value:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&"function"==typeof t[r]&&_Object$defineProperty2(e,r,{configurable:!0,value:t[r]})}},{key:"defaultConfig",get:function(){return{}}},{key:"pluginName",get:function(){return"pluginName"}}]),e}(),DOCUMENT_NODE_TYPE=9;if("undefined"!=typeof Element&&!Element.prototype.matches){var proto=Element.prototype;proto.matches=proto.matchesSelector||proto.mozMatchesSelector||proto.msMatchesSelector||proto.oMatchesSelector||proto.webkitMatchesSelector}function closest$1(e,t){for(;e&&e.nodeType!==DOCUMENT_NODE_TYPE;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}var closest_1=closest$1,closest=closest_1;function _delegate(e,t,r,n,i){var o=listener.apply(this,arguments);return e.addEventListener(r,o,i),{destroy:function(){e.removeEventListener(r,o,i)}}}function delegate(e,t,r,n,i){return"function"==typeof e.addEventListener?_delegate.apply(null,arguments):"function"==typeof r?_delegate.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),_mapInstanceProperty(Array.prototype).call(e,(function(e){return _delegate(e,t,r,n,i)})))}function listener(e,t,r,n){return function(r){r.delegateTarget=closest(r.target,t),r.delegateTarget&&n.call(e,r)}}var delegate_1=delegate,_delegate$1=getDefaultExportFromCjs(delegate_1),ROOT_TYPES={CONTROLS:"controls",ROOT:"root"},POSITIONS$1={ROOT:"root",ROOT_LEFT:"rootLeft",ROOT_RIGHT:"rootRight",ROOT_TOP:"rootTop",CONTROLS_LEFT:"controlsLeft",CONTROLS_RIGTH:"controlsRight",CONTROLS_RIGHT:"controlsRight",CONTROLS_CENTER:"controlsCenter",CONTROLS:"controls"},PLUGIN_STATE_CLASS={ICON_DISABLE:"xg-icon-disable",ICON_HIDE:"xg-icon-hide"};function isUrl(e){return!!e&&(_indexOfInstanceProperty2(e)&&/^(?:http|data:|\/)/.test(e))}function mergeIconClass(e,t){var r;return"object"===_typeof(e)&&e.class&&"string"==typeof e.class?_concatInstanceProperty2(r="".concat(t," ")).call(r,e.class):t}function mergeIconAttr(e,t){var r;"object"===_typeof(e)&&e.attr&&"object"===_typeof(e.attr)&&_mapInstanceProperty(r=_Object$keys(e.attr)).call(r,(function(r){t[r]=e.attr[r]}));return t}function createIcon(e,t){var r,n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",s=null;if(e instanceof window.Element)return util.addClass(e,i),_mapInstanceProperty(n=_Object$keys(o)).call(n,(function(t){e.setAttribute(t,o[t])})),e;if(isUrl(e)||isUrl(e.url))return o.src=isUrl(e)?e:e.url||"",s=util.createDom(e.tag||"img","",o,"xg-img ".concat(i));if("function"==typeof e)try{var l,c;return(s=e())instanceof window.Element?(util.addClass(s,i),_mapInstanceProperty(l=_Object$keys(o)).call(l,(function(e){s.setAttribute(e,o[e])})),s):(XG_DEBUG.logWarn(_concatInstanceProperty2(c="warn>>icons.".concat(t," in config of plugin named [")).call(c,a,"] is a function mast return an Element Object")),null)}catch(e){return XG_DEBUG.logError("Plugin named [".concat(a,"]:createIcon"),e),null}return"string"==typeof e?util.createDomFromHtml(e,o,i):(XG_DEBUG.logWarn(_concatInstanceProperty2(r="warn>>icons.".concat(t," in config of plugin named [")).call(r,a,"] is invalid")),null)}function registerIconsObj(e,t){var r,n=t.config.icons||t.playerConfig.icons;_mapInstanceProperty(r=_Object$keys(e)).call(r,(function(r){var i=e[r],o=i&&i.class?i.class:"",a=i&&i.attr?i.attr:{},s=null;n&&n[r]&&(o=mergeIconClass(n[r],o),a=mergeIconAttr(n[r],a),s=createIcon(n[r],r,o,a,t.pluginName)),!s&&i&&(s=createIcon(i.icon?i.icon:i,a,o,{},t.pluginName)),t.icons[r]=s}))}function registerTextObj(e,t){var r;_mapInstanceProperty(r=_Object$keys(e)).call(r,(function(r){_Object$defineProperty2(t.langText,r,{get:function(){var n=t.lang,i=t.i18n;return i[r]?i[r]:e[r]&&e[r][n]||""}})}))}var Plugin=function(e){_inherits$1(r,BasePlugin);var t=_createSuper$1(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,r),(e=t.call(this,n)).__delegates=[],e}return _createClass(r,[{key:"__init",value:function(e){if(_get$1(_getPrototypeOf$1(r.prototype),"__init",this).call(this,e),e.root){var t=e.root,n=null;this.icons={},this.root=null,this.parent=null,registerIconsObj(this.registerIcons()||{},this),this.langText={},registerTextObj(this.registerLanguageTexts()||{},this);var i="";try{i=this.render()}catch(e){var o;throw XG_DEBUG.logError("Plugin:".concat(this.pluginName,":render"),e),new Error(_concatInstanceProperty2(o="Plugin:".concat(this.pluginName,":render:")).call(o,e.message))}if(i)(n=r.insert(i,t,e.index)).setAttribute("data-index",e.index);else{if(!e.tag)return;(n=util.createDom(e.tag,"",e.attr,e.name)).setAttribute("data-index",e.index),t.appendChild(n)}this.root=n,this.parent=t;var a=this.config.attr||{},s=this.config.style||{};this.setAttr(a),this.setStyle(s),this.config.index&&this.root.setAttribute("data-index",this.config.index),this.__registerChildren()}}},{key:"__registerChildren",value:function(){var e=this;if(this.root){this._children=[];var t,r=this.children();if(r&&"object"===_typeof(r))if(_Object$keys(r).length>0)_mapInstanceProperty(t=_Object$keys(r)).call(t,(function(t){var n,i,o=t,a=r[o],s={root:e.root};"function"==typeof a?(n=e.config[o]||{},i=a):"object"===_typeof(a)&&"function"==typeof a.plugin&&(n=a.options?util.deepCopy(e.config[o]||{},a.options):e.config[o]||{},i=a.plugin),s.config=n,void 0!==n.index&&(s.index=n.index),n.root&&(s.root=n.root),e.registerPlugin(i,s,o)}))}}},{key:"updateLang",value:function(e){e||(e=this.lang);var t=this.root,r=this.i18n,n=this.langText;t&&function e(t,r){for(var n=0;n<t.children.length;n++)t.children[n].children.length>0?e(t.children[n],r):r(t.children[n])}(t,(function(t){var i=t.getAttribute&&t.getAttribute("lang-key");if(i){var o=r[i.toUpperCase()]||n[i];o&&(t.innerHTML="function"==typeof o?o(e):o)}}))}},{key:"lang",get:function(){return this.player.lang}},{key:"changeLangTextKey",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=this.i18n||{},n=this.langText;e.setAttribute&&e.setAttribute("lang-key",t);var i=r[t]||n[t]||"";i&&(e.innerHTML=i)}},{key:"plugins",value:function(){return this._children}},{key:"disable",value:function(){this.config.disable=!0,util.addClass(_findInstanceProperty2(this).call(this,".xgplayer-icon"),PLUGIN_STATE_CLASS.ICON_DISABLE)}},{key:"enable",value:function(){this.config.disable=!1,util.removeClass(_findInstanceProperty2(this).call(this,".xgplayer-icon"),PLUGIN_STATE_CLASS.ICON_DISABLE)}},{key:"children",value:function(){return{}}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";t.root=t.root||this.root;var i=_get$1(_getPrototypeOf$1(r.prototype),"registerPlugin",this).call(this,e,t,n);return this._children.push(i),i}},{key:"registerIcons",value:function(){return{}}},{key:"registerLanguageTexts",value:function(){return{}}},{key:"find",value:function(e){if(this.root)return this.root.querySelector(e)}},{key:"bind",value:function(e,t,n){var i=this;if(arguments.length<3&&"function"==typeof t)Array.isArray(e)?e.forEach((function(e){i.bindEL(e,t)})):this.bindEL(e,t);else{var o,a=r.delegate.call(this,this.root,e,t,n);this.__delegates=_concatInstanceProperty2(o=this.__delegates).call(o,a)}}},{key:"unbind",value:function(e,t){var r=this;if(arguments.length<3&&"function"==typeof t)Array.isArray(e)?e.forEach((function(e){r.unbindEL(e,t)})):this.unbindEL(e,t);else for(var n,i=_concatInstanceProperty2(n="".concat(e,"_")).call(n,t),o=0;o<this.__delegates.length;o++)if(this.__delegates[o].key===i){var a;this.__delegates[o].destroy(),_spliceInstanceProperty2(a=this.__delegates).call(a,o,1);break}}},{key:"setStyle",value:function(e,t){var r,n=this;if(this.root)return"String"===util.typeOf(e)?this.root.style[e]=t:void("Object"===util.typeOf(e)&&_mapInstanceProperty(r=_Object$keys(e)).call(r,(function(t){n.root.style[t]=e[t]})))}},{key:"setAttr",value:function(e,t){var r,n=this;if(this.root)return"String"===util.typeOf(e)?this.root.setAttribute(e,t):void("Object"===util.typeOf(e)&&_mapInstanceProperty(r=_Object$keys(e)).call(r,(function(t){n.root.setAttribute(t,e[t])})))}},{key:"setHtml",value:function(e,t){this.root&&(this.root.innerHTML=e,"function"==typeof t&&t())}},{key:"bindEL",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.root&&"on".concat(e)in this.root&&"function"==typeof t&&this.root.addEventListener(e,t,r)}},{key:"unbindEL",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.root&&"on".concat(e)in this.root&&"function"==typeof t&&this.root.removeEventListener(e,t,r)}},{key:"show",value:function(e){if(this.root)return this.root.style.display=void 0!==e?e:"block","none"===window.getComputedStyle(this.root,null).getPropertyValue("display")?this.root.style.display="block":void 0}},{key:"hide",value:function(){this.root&&(this.root.style.display="none")}},{key:"appendChild",value:function(e,t){if(!this.root)return null;if(arguments.length<2&&arguments[0]instanceof window.Element)return this.root.appendChild(arguments[0]);if(!(t&&t instanceof window.Element))return null;try{return"string"==typeof e?_findInstanceProperty2(this).call(this,e).appendChild(t):e.appendChild(t)}catch(e){return XG_DEBUG.logError("Plugin:appendChild",e),null}}},{key:"render",value:function(){return""}},{key:"destroy",value:function(){}},{key:"__destroy",value:function(){var e,t,n,i=this,o=this.player;(_mapInstanceProperty(e=this.__delegates).call(e,(function(e){e.destroy()})),this.__delegates=[],this._children instanceof Array)&&(_mapInstanceProperty(n=this._children).call(n,(function(e){o.unRegisterPlugin(e.pluginName)})),this._children=null);this.root&&(this.root.hasOwnProperty("remove")?this.root.remove():this.root.parentNode&&this.root.parentNode.removeChild(this.root)),_get$1(_getPrototypeOf$1(r.prototype),"__destroy",this).call(this),this.icons={},_mapInstanceProperty(t=["root","parent"]).call(t,(function(e){i[e]=null}))}}],[{key:"insert",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=t.children.length,i=Number(r),o=e instanceof window.Node;if(n){for(var a=0,s=null,l="";a<n;a++){s=t.children[a];var c=Number(s.getAttribute("data-index"));if(c>=i){l="beforebegin";break}c<i&&(l="afterend")}return o?"afterend"===l?t.appendChild(e):t.insertBefore(e,s):s.insertAdjacentHTML(l,e),"afterend"===l?t.children[t.children.length-1]:t.children[a]}return o?t.appendChild(e):t.insertAdjacentHTML("beforeend",e),t.children[t.children.length-1]}},{key:"defaultConfig",get:function(){return{}}},{key:"delegate",value:function(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=[];if(e instanceof window.Node&&"function"==typeof n)if(Array.isArray(r))r.forEach((function(r){var a,s=_delegate$1(e,t,r,n,i);s.key=_concatInstanceProperty2(a="".concat(t,"_")).call(a,r),o.push(s)}));else{var a,s=_delegate$1(e,t,r,n,i);s.key=_concatInstanceProperty2(a="".concat(t,"_")).call(a,r),o.push(s)}return o}},{key:"ROOT_TYPES",get:function(){return ROOT_TYPES}},{key:"POSITIONS",get:function(){return POSITIONS$1}}]),r}(),ResizeObserver=function(){function e(){var t=this;if(_classCallCheck(this,e),_defineProperty(this,"__trigger",(function(e){var r=(new Date).getTime();t.timeStamp=r;for(var n=0;n<e.length;n++)t.__runHandler(e[n].target)})),this.__handlers=[],this.timeStamp=0,this.observer=null,window.ResizeObserver)try{this.observer=new window.ResizeObserver(throttle(this.__trigger,100,{trailing:!0})),this.timeStamp=(new Date).getTime()}catch(e){console.error(e)}}return _createClass(e,[{key:"addObserver",value:function(e,t){if(this.observer){this.observer.observe(e);for(var r=e.getAttribute(PLATER_ID),n=this.__handlers,i=-1,o=0;o<n.length;o++)n[o]&&e===n[o].target&&(i=o);i>-1?this.__handlers[i].handler=t:this.__handlers.push({target:e,handler:t,playerId:r})}}},{key:"unObserver",value:function(e){var t,r,n=-1;_mapInstanceProperty(t=this.__handlers).call(t,(function(t,r){e===t.target&&(n=r)}));try{var i;null===(i=this.observer)||void 0===i||i.unobserve(e)}catch(e){}n>-1&&_spliceInstanceProperty2(r=this.__handlers).call(r,n,1)}},{key:"destroyObserver",value:function(){var e;null===(e=this.observer)||void 0===e||e.disconnect(),this.observer=null,this.__handlers=null}},{key:"__runHandler",value:function(e){for(var t=this.__handlers,r=0;r<t.length;r++)if(t[r]&&e===t[r].target){try{t[r].handler(e)}catch(e){console.error(e)}return!0}return!1}}]),e}(),resizeObserver=null;function addObserver(e,t){return resizeObserver||(resizeObserver=new ResizeObserver),resizeObserver.addObserver(e,t),resizeObserver}function unObserver(e,t){var r;null===(r=resizeObserver)||void 0===r||r.unObserver(e,t)}var pluginsManager={pluginGroup:{},init:function(e){var t=e._pluginInfoId;t||(t=(new Date).getTime(),e._pluginInfoId=t),!e.config.closeResizeObserver&&addObserver(e.root,(function(){e.resize()})),this.pluginGroup[t]={_originalOptions:e.config||{},_plugins:{}}},formatPluginInfo:function(e,t){var r=null,n=null;return e.plugin&&"function"==typeof e.plugin?(r=e.plugin,n=e.options):(r=e,n={}),t&&(n.config=t||{}),{PLUFGIN:r,options:n}},checkPluginIfExits:function(e,t){for(var r=0;r<t.length;r++)if(e.toLowerCase()===t[r].pluginName.toLowerCase())return!0;return!1},getRootByConfig:function(e,t){for(var r=_Object$keys(t),n=null,i=0;i<r.length;i++)if(e.toLowerCase()===r[i].toLowerCase()){n=t[r[i]];break}return"Object"===util.typeOf(n)?{root:n.root,position:n.position}:{}},lazyRegister:function(e,t){var r=this,n=t.timeout||1500;return _Promise.race([t.loader().then((function(t){var n;n=t&&t.__esModule?t.default:t,r.register(e,n,t.options)})),new _Promise((function(e,t){setTimeout((function(){t(new Error("timeout"))}),n)}))])},register:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e&&t&&"function"==typeof t&&void 0!==t.prototype){var n=e._pluginInfoId;if(n&&this.pluginGroup[n]){this.pluginGroup[n]._plugins||(this.pluginGroup[n]._plugins={});var i=this.pluginGroup[n]._plugins,o=this.pluginGroup[n]._originalOptions;r.player=e;var a=r.pluginName||t.pluginName;if(!a)throw new Error("The property pluginName is necessary");if(!t.isSupported||t.isSupported(e.config.mediaType,e.config.codecType)){r.config||(r.config={});for(var s=_Object$keys(o),l=0;l<s.length;l++)if(a.toLowerCase()===s[l].toLowerCase()){var c=o[s[l]];"Object"===util.typeOf(c)?r.config=_Object$assign2({},r.config,o[s[l]]):"Boolean"===util.typeOf(c)&&(r.config.disable=!c);break}t.defaultConfig&&_Object$keys(t.defaultConfig).forEach((function(e){void 0===r.config[e]&&(r.config[e]=t.defaultConfig[e])})),r.root?"string"==typeof r.root&&(r.root=e[r.root]):r.root=e.root,r.index=r.config.index||0;try{i[a.toLowerCase()]&&(this.unRegister(n,a.toLowerCase()),console.warn("the is one plugin with same pluginName [".concat(a,"] exist, destroy the old instance")));var u=new t(r);return i[a.toLowerCase()]=u,i[a.toLowerCase()].func=t,u&&"function"==typeof u.afterCreate&&u.afterCreate(),u}catch(e){throw console.error(e),e}}else console.warn("not supported plugin [".concat(a,"]"))}}},unRegister:function(e,t){e._pluginInfoId&&(e=e._pluginInfoId),t=t.toLowerCase();try{var r=this.pluginGroup[e]._plugins[t];r&&(r.pluginName&&r.__destroy(),delete this.pluginGroup[e]._plugins[t])}catch(r){var n;console.error(_concatInstanceProperty2(n="[unRegister:".concat(t,"] cgid:[")).call(n,e,"] error"),r)}},deletePlugin:function(e,t){var r=e._pluginInfoId;r&&this.pluginGroup[r]&&this.pluginGroup[r]._plugins&&delete this.pluginGroup[r]._plugins[t]},getPlugins:function(e){var t=e._pluginInfoId;return t&&this.pluginGroup[t]?this.pluginGroup[t]._plugins:{}},findPlugin:function(e,t){var r=e._pluginInfoId;if(!r||!this.pluginGroup[r])return null;var n=t.toLowerCase();return this.pluginGroup[r]._plugins[n]},beforeInit:function(e){var t=this;function r(e){return e&&e.then?e:new _Promise((function(e){e()}))}return new _Promise((function(n){if(t.pluginGroup)return(e._loadingPlugins&&e._loadingPlugins.length?_Promise.all(e._loadingPlugins):_Promise.resolve()).then((function(){var i,o=e._pluginInfoId;if(t.pluginGroup[o]){var a=t.pluginGroup[o]._plugins,s=[];_Object$keys(a).forEach((function(e){if(a[e]&&a[e].beforePlayerInit)try{var t=a[e].beforePlayerInit();s.push(r(t))}catch(e){throw s.push(r(null)),e}})),_Promise.all(_concatInstanceProperty2(i=[]).call(i,s)).then((function(){n()})).catch((function(e){console.error(e),n()}))}else n()}))}))},afterInit:function(e){var t=e._pluginInfoId;if(t&&this.pluginGroup[t]){var r=this.pluginGroup[t]._plugins;_Object$keys(r).forEach((function(e){r[e]&&r[e].afterPlayerInit&&r[e].afterPlayerInit()}))}},setLang:function(e,t){var r=t._pluginInfoId;if(r&&this.pluginGroup[r]){var n=this.pluginGroup[r]._plugins;_Object$keys(n).forEach((function(t){if(n[t].updateLang)n[t].updateLang(e);else try{n[t].lang=e}catch(e){console.warn("".concat(t," setLang"))}}))}},reRender:function(e){var t=this,r=e._pluginInfoId;if(r&&this.pluginGroup[r]){var n=[],i=this.pluginGroup[r]._plugins;_Object$keys(i).forEach((function(e){"controls"!==e&&i[e]&&(n.push({plugin:i[e].func,options:i[e].__args}),t.unRegister(r,e))})),n.forEach((function(r){t.register(e,r.plugin,r.options)}))}},onPluginsReady:function(e){var t=e._pluginInfoId;if(t&&this.pluginGroup[t]){var r=this.pluginGroup[t]._plugins||{};_Object$keys(r).forEach((function(e){r[e].onPluginsReady&&"function"==typeof r[e].onPluginsReady&&r[e].onPluginsReady()}))}},destroy:function(e){var t=e._pluginInfoId;if(this.pluginGroup[t]){unObserver(e.root);for(var r=this.pluginGroup[t]._plugins,n=0,i=_Object$keys(r);n<i.length;n++){var o=i[n];this.unRegister(t,o)}delete this.pluginGroup[t],delete e._pluginInfoId}}},STATE_CLASS={DEFAULT:"xgplayer",DEFAULT_SKIN:"xgplayer-skin-default",ENTER:"xgplayer-is-enter",PAUSED:"xgplayer-pause",PLAYING:"xgplayer-playing",ENDED:"xgplayer-ended",CANPLAY:"xgplayer-canplay",LOADING:"xgplayer-isloading",ERROR:"xgplayer-is-error",REPLAY:"xgplayer-replay",NO_START:"xgplayer-nostart",ACTIVE:"xgplayer-active",INACTIVE:"xgplayer-inactive",FULLSCREEN:"xgplayer-is-fullscreen",CSS_FULLSCREEN:"xgplayer-is-cssfullscreen",ROTATE_FULLSCREEN:"xgplayer-rotate-fullscreen",PARENT_ROTATE_FULLSCREEN:"xgplayer-rotate-parent",PARENT_FULLSCREEN:"xgplayer-fullscreen-parent",INNER_FULLSCREEN:"xgplayer-fullscreen-inner",NO_CONTROLS:"no-controls",FLEX_CONTROLS:"flex-controls",CONTROLS_FOLLOW:"controls-follow",CONTROLS_AUTOHIDE:"controls-autohide",TOP_BAR_AUTOHIDE:"top-bar-autohide",NOT_ALLOW_AUTOPLAY:"not-allow-autoplay",SEEKING:"seeking",PC:"xgplayer-pc",MOBILE:"xgplayer-mobile",MINI:"xgplayer-mini"};function getDefaultConfig$1(){return{id:"",el:null,url:"",domEventType:"default",nullUrlStart:!1,width:600,height:337.5,fluid:!1,fitVideoSize:"fixed",videoFillMode:"auto",volume:.6,autoplay:!1,autoplayMuted:!1,loop:!1,isLive:!1,zoom:1,videoInit:!0,poster:"",isMobileSimulateMode:!1,defaultPlaybackRate:1,execBeforePluginsCall:null,allowSeekAfterEnded:!0,enableContextmenu:!0,closeVideoClick:!1,closeVideoDblclick:!1,closePlayerBlur:!1,closeDelayBlur:!1,leavePlayerTime:3e3,closePlayVideoFocus:!1,closePauseVideoFocus:!1,closeFocusVideoFocus:!0,closeControlsBlur:!0,topBarAutoHide:!0,videoAttributes:{},startTime:0,seekedStatus:"play",miniprogress:!1,disableSwipeHandler:function(){},enableSwipeHandler:function(){},preProcessUrl:null,ignores:[],whitelist:[],inactive:3e3,lang:getLang(),controls:!0,marginControls:!1,fullscreenTarget:null,screenShot:!1,rotate:!1,pip:!1,download:!1,mini:!1,cssFullscreen:!0,keyShortcut:!0,presets:[],plugins:[],playbackRate:1,definition:{list:[]},playsinline:!0,customDuration:0,timeOffset:0,icons:{},i18n:[],tabindex:0,thumbnail:null,videoConfig:{},isHideTips:!1,minWaitDelay:200,commonStyle:{progressColor:"",playedColor:"",cachedColor:"",sliderBtnStyle:{},volumeColor:""}}}var usePreset=function(e,t){var r,n,i,o=t.preset&&t.options?new t.preset(t.options,e.config):new t({},e.config),a=o.plugins,s=void 0===a?[]:a,l=o.ignores,c=void 0===l?[]:l,u=o.icons,p=void 0===u?{}:u,f=o.i18n,h=void 0===f?[]:f;e.config.plugins||(e.config.plugins=[]),e.config.ignores||(e.config.ignores=[]),(n=e.config.plugins).push.apply(n,_toConsumableArray(s)),(i=e.config.ignores).push.apply(i,_toConsumableArray(c)),_mapInstanceProperty(r=_Object$keys(p)).call(r,(function(t){e.config.icons[t]||(e.config.icons[t]=p[t])}));var d=e.config.i18n||[];h.push.apply(h,_toConsumableArray(d)),e.config.i18n=h},Controls=function(e){_inherits$1(r,Plugin);var t=_createSuper$1(r);function r(){var e,n;_classCallCheck(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return _defineProperty(_assertThisInitialized$1(n=t.call.apply(t,_concatInstanceProperty2(e=[this]).call(e,o))),"onMouseEnter",(function(e){var t=_assertThisInitialized$1(n),r=t.player;t.playerConfig.closeControlsBlur&&r.focus({autoHide:!1})})),_defineProperty(_assertThisInitialized$1(n),"onMouseLeave",(function(e){_assertThisInitialized$1(n).player.focus()})),n}return _createClass(r,[{key:"beforeCreate",value:function(e){e.config.mode||"mobile"!==sniffer.device||(e.config.mode="flex"),e.player.config.marginControls&&(e.config.autoHide=!1)}},{key:"afterCreate",value:function(){var e,t=this,r=this.config,n=r.disable,i=r.height,o=r.mode;if(!n){"flex"===o&&this.player.addClass(STATE_CLASS.FLEX_CONTROLS);var a={height:"".concat(i,"px")};_mapInstanceProperty(e=_Object$keys(a)).call(e,(function(e){t.root.style[e]=a[e]})),this.left=_findInstanceProperty2(this).call(this,"xg-left-grid"),this.center=_findInstanceProperty2(this).call(this,"xg-center-grid"),this.right=_findInstanceProperty2(this).call(this,"xg-right-grid"),this.innerRoot=_findInstanceProperty2(this).call(this,"xg-inner-controls"),this.on(MINI_STATE_CHANGE,(function(e){e?util.addClass(t.root,"mini-controls"):util.removeClass(t.root,"mini-controls")}));var s=this.playerConfig.isMobileSimulateMode;"mobile"!==sniffer.device&&"mobile"!==s&&(this.bind("mouseenter",this.onMouseEnter),this.bind("mouseleave",this.onMouseLeave))}}},{key:"focus",value:function(){this.player.focus({autoHide:!1})}},{key:"focusAwhile",value:function(){this.player.focus({autoHide:!0})}},{key:"blur",value:function(){this.player.blur({ignorePaused:!0})}},{key:"recoverAutoHide",value:function(){this.config.autoHide&&util.addClass(this.root,STATE_CLASS.CONTROLS_AUTOHIDE)}},{key:"pauseAutoHide",value:function(){util.removeClass(this.root,STATE_CLASS.CONTROLS_AUTOHIDE)}},{key:"show",value:function(e){this.root.style.display="",this.player.focus()}},{key:"hide",value:function(){this.root.style.display="none"}},{key:"mode",get:function(){return this.config.mode}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;if(this.root){var i=e.defaultConfig||{};if(!t.root){switch(t.position?t.position:t.config&&t.config.position?t.config.position:i.position){case POSITIONS$1.CONTROLS_LEFT:t.root=this.left;break;case POSITIONS$1.CONTROLS_RIGHT:t.root=this.right;break;case POSITIONS$1.CONTROLS_CENTER:t.root=this.center;break;case POSITIONS$1.CONTROLS:t.root=this.root;break;default:t.root=this.left}return _get$1(_getPrototypeOf$1(r.prototype),"registerPlugin",this).call(this,e,t,n)}}}},{key:"destroy",value:function(){"mobile"!==sniffer.device&&(this.unbind("mouseenter",this.onMouseEnter),this.unbind("mouseleave",this.onMouseLeave)),this.left=null,this.center=null,this.right=null,this.innerRoot=null}},{key:"render",value:function(){var e=this.config,t=e.mode,r=e.autoHide,n=e.initShow;if(!e.disable){var i=util.classNames({"xgplayer-controls":!0},{"flex-controls":"flex"===t},{"bottom-controls":"bottom"===t},_defineProperty({},STATE_CLASS.CONTROLS_AUTOHIDE,r),{"xgplayer-controls-initshow":n||!r});return'<xg-controls class="'.concat(i,'" unselectable="on">\n <xg-inner-controls class="xg-inner-controls xg-pos">\n <xg-left-grid class="xg-left-grid">\n </xg-left-grid>\n <xg-center-grid class="xg-center-grid"></xg-center-grid>\n <xg-right-grid class="xg-right-grid">\n </xg-right-grid>\n </xg-inner-controls>\n </xg-controls>')}}}],[{key:"pluginName",get:function(){return"controls"}},{key:"defaultConfig",get:function(){return{disable:!1,autoHide:!0,mode:"",initShow:!1}}}]),r}(),EN={LANG:"en",TEXT:{ERROR_TYPES:{network:{code:1,msg:"video download error"},mse:{code:2,msg:"stream append error"},parse:{code:3,msg:"parsing error"},format:{code:4,msg:"wrong format"},decoder:{code:5,msg:"decoding error"},runtime:{code:6,msg:"grammatical errors"},timeout:{code:7,msg:"play timeout"},other:{code:8,msg:"other errors"}},HAVE_NOTHING:"There is no information on whether audio/video is ready",HAVE_METADATA:"Audio/video metadata is ready ",HAVE_CURRENT_DATA:"Data about the current play location is available, but there is not enough data to play the next frame/millisecond",HAVE_FUTURE_DATA:"Current and at least one frame of data is available",HAVE_ENOUGH_DATA:"The available data is sufficient to start playing",NETWORK_EMPTY:"Audio/video has not been initialized",NETWORK_IDLE:"Audio/video is active and has been selected for resources, but no network is used",NETWORK_LOADING:"The browser is downloading the data",NETWORK_NO_SOURCE:"No audio/video source was found",MEDIA_ERR_ABORTED:"The fetch process is aborted by the user",MEDIA_ERR_NETWORK:"An error occurred while downloading",MEDIA_ERR_DECODE:"An error occurred while decoding",MEDIA_ERR_SRC_NOT_SUPPORTED:"Audio/video is not supported",REPLAY:"Replay",ERROR:"Network is offline",PLAY_TIPS:"Play",PAUSE_TIPS:"Pause",PLAYNEXT_TIPS:"Play next",DOWNLOAD_TIPS:"Download",ROTATE_TIPS:"Rotate",RELOAD_TIPS:"Reload",FULLSCREEN_TIPS:"Fullscreen",EXITFULLSCREEN_TIPS:"Exit fullscreen",CSSFULLSCREEN_TIPS:"Cssfullscreen",EXITCSSFULLSCREEN_TIPS:"Exit cssfullscreen",TEXTTRACK:"Caption",PIP:"PIP",SCREENSHOT:"Screenshot",LIVE:"LIVE",OFF:"Off",OPEN:"Open",MINI_DRAG:"Click and hold to drag",MINISCREEN:"Miniscreen",REFRESH_TIPS:"Please Try",REFRESH:"Refresh",FORWARD:"forward",LIVE_TIP:"Live"}},XGI18nLang={lang:{},langKeys:[],textKeys:[]};function deepMerge(e,t){return _Object$keys(t).forEach((function(r){var n,i=util.typeOf(t[r]),o=util.typeOf(e[r]);"Array"===i?("Array"!==o&&(e[r]=[]),(n=e[r]).push.apply(n,_toConsumableArray(t[r]))):"Object"===i?("Object"!==o&&(e[r]={}),deepMerge(e[r],t[r])):e[r]=t[r]})),e}function updateKeys(){var e;_mapInstanceProperty(e=_Object$keys(XGI18nLang.lang.en)).call(e,(function(e){XGI18nLang.textKeys[e]=e}))}function extend(e,t){var r=[];if(t||(t=XGI18nLang),t.lang){var n;if("Array"!==util.typeOf(e))r=_mapInstanceProperty(n=_Object$keys(e)).call(n,(function(t){return{LANG:"zh"===t?"zh-cn":t,TEXT:e[t]}}));else r=e;var i=t.lang;_mapInstanceProperty(r).call(r,(function(e){"zh"===e.LANG&&(e.LANG="zh-cn"),i[e.LANG]?deepMerge(i[e.LANG]||{},e.TEXT||{}):use(e,t)})),updateKeys()}}function use(e,t){var r=e.LANG;if(t||(t=XGI18nLang),t.lang){var n=e.TEXT||{};"zh"===r&&(r="zh-cn"),t.lang[r]?deepMerge(t.lang[r],n):(t.langKeys.push(r),t.lang[r]=n),updateKeys()}}function init2(e){var t,r={lang:{},langKeys:[],textKeys:{},pId:e};return deepMerge(r.lang,XGI18nLang.lang),(t=r.langKeys).push.apply(t,_toConsumableArray(XGI18nLang.langKeys)),deepMerge(r.textKeys,XGI18nLang.textKeys),r}use(EN);var I18N={get textKeys(){return XGI18nLang.textKeys},get langKeys(){return XGI18nLang.langKeys},get lang(){var e,t={};return _mapInstanceProperty(e=XGI18nLang.langKeys).call(e,(function(e){t[e]=XGI18nLang.lang[e]})),XGI18nLang.lang["zh-cn"]&&(t.zh=XGI18nLang.lang["zh-cn"]||{}),t},extend:extend,use:use,init:init2},STATES={INITIAL:1,READY:2,ATTACHING:3,ATTACHED:4,NOTALLOW:5,RUNNING:6,ENDED:7,DESTROYED:8},STATE_ARRAY=["ERROR","INITIAL","READY","ATTACHING","ATTACHED","NOTALLOW","RUNNING","ENDED","DESTROYED"],store={},instance=null,InstManager=function(e){_inherits$1(r,eventemitter3Exports.EventEmitter);var t=_createSuper$1(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,[{key:"add",value:function(e){e&&(store[e.playerId]=e,1===_Object$keys(store).length&&this.setActive(e.playerId,!0))}},{key:"remove",value:function(e){e&&(e.isUserActive,delete store[e.playerId])}},{key:"_iterate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];for(var r in store)if(Object.prototype.hasOwnProperty.call(store,r)){var n=store[r];if(t){if(e(n))break}else e(n)}}},{key:"forEach",value:function(e){this._iterate(e)}},{key:"find",value:function(e){var t=null;return this._iterate((function(r){var n=e(r);return n&&(t=r),n}),!0),t}},{key:"findAll",value:function(e){var t=[];return this._iterate((function(r){e(r)&&t.push(r)})),t}},{key:"setActive",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(store[e])return t?this.forEach((function(t){e===t.playerId?(t.isUserActive=!0,t.isInstNext=!1):t.isUserActive=!1})):store[e].isUserActive=t,e}},{key:"getActiveId",value:function(){for(var e=_Object$keys(store),t=0;t<e.length;t++){var r=store[e[t]];if(r&&r.isUserActive)return e[t]}return null}},{key:"setNext",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(store[e])return t?this.forEach((function(t){e===t.playerId?(t.isUserActive=!1,t.isInstNext=!0):t.isInstNext=!1})):store[e].isInstNext=t,e}}],[{key:"getInstance",value:function(){return instance||(instance=new r),instance}}]),r}();function checkPlayerRoot(e){for(var t=_Object$keys(store),r=0;r<t.length;r++){var n=store[t[r]];if(n.root===e)return n}return null}var PlAYER_HOOKS=["play","pause","replay","retry"],REAL_TIME_SPEED=0,AVG_SPEED=0,instManager=null,Player=function(e){_inherits$1(r,MediaProxy);var t=_createSuper$1(r);function r(e){var n;_classCallCheck(this,r);var i=util.deepMerge(getDefaultConfig$1(),e);_defineProperty(_assertThisInitialized$1(n=t.call(this,i)),"canPlayFunc",(function(){if(n.config){var e=n.config,t=e.autoplay,r=e.defaultPlaybackRate;XG_DEBUG.logInfo("player","canPlayFunc, startTime",n.__startTime),n._seekToStartTime(),n.playbackRate=r,(t||n._useAutoplay)&&n.mediaPlay(),n.off(CANPLAY,n.canPlayFunc),n.removeClass(STATE_CLASS.ENTER)}})),_defineProperty(_assertThisInitialized$1(n),"onFullscreenChange",(function(e,t){var r=function(){util.setTimeout(_assertThisInitialized$1(n),(function(){n.resize()}),100)},i=util.getFullScreenEl();n._fullActionFrom?n._fullActionFrom="":n.emit(USER_ACTION,{eventType:"system",action:"switch_fullscreen",pluginName:"player",currentTime:n.currentTime,duration:n.duration,props:[{prop:"fullscreen",from:!0,to:!1}]});var o=checkIsCurrentVideo(i,n.playerId,PLATER_ID);if(t||i&&(i===n._fullscreenEl||o))r(),!n.config.closeFocusVideoFocus&&n.media.focus(),n.fullscreen=!0,n.changeFullStyle(n.root,i,STATE_CLASS.FULLSCREEN),n.emit(FULLSCREEN_CHANGE,!0,n._fullScreenOffset),n.cssfullscreen&&n.exitCssFullscreen();else if(n.fullscreen){r();var a=_assertThisInitialized$1(n),s=a._fullScreenOffset;if(a.config.needFullscreenScroll?(window.scrollTo(s.left,s.top),util.setTimeout(_assertThisInitialized$1(n),(function(){n.fullscreen=!1,n._fullScreenOffset=null}),100)):(!n.config.closeFocusVideoFocus&&n.media.focus(),n.fullscreen=!1,n._fullScreenOffset=null),n.cssfullscreen)n.removeClass(STATE_CLASS.FULLSCREEN);else{var l=n._fullscreenEl;l||!n.root.contains(e.target)&&e.target!==n.root||(l=e.target),n.recoverFullStyle(n.root,l,STATE_CLASS.FULLSCREEN)}n._fullscreenEl=null,n.emit(FULLSCREEN_CHANGE,!1)}})),_defineProperty(_assertThisInitialized$1(n),"_onWebkitbeginfullscreen",(function(e){n._fullscreenEl=n.media,n.onFullscreenChange(e,!0)})),_defineProperty(_assertThisInitialized$1(n),"_onWebkitendfullscreen",(function(e){n.onFullscreenChange(e,!1)})),hooksDescriptor(_assertThisInitialized$1(n),PlAYER_HOOKS),n.config=i,n._pluginInfoId=util.generateSessionId(),bindDebug(_assertThisInitialized$1(n));var o=n.constructor.defaultPreset;if(n.config.presets.length){var a,s=_indexOfInstanceProperty2(a=n.config.presets).call(a,"default");s>=0&&o&&(n.config.presets[s]=o)}else o&&n.config.presets.push(o);if(n.userTimer=null,n.waitTimer=null,n.handleSource=!0,n._state=STATES.INITIAL,n.isAd=!1,n.isError=!1,n._hasStart=!1,n.isSeeking=!1,n.isCanplay=!1,n._useAutoplay=!1,n.__startTime=-1,n.rotateDeg=0,n.isActive=!1,n.fullscreen=!1,n.cssfullscreen=!1,n.isRotateFullscreen=!1,n._fullscreenEl=null,n.timeSegments=[],n._cssfullscreenEl=null,n.curDefinition=null,n._orgCss="",n._fullScreenOffset=null,n._videoHeight=0,n._videoWidth=0,n.videoPos={pi:1,scale:0,rotate:-1,x:0,y:0,h:-1,w:-1,vy:0,vx:0},n.sizeInfo={width:0,height:0,left:0,top:0},n._accPlayed={t:0,acc:0,loopAcc:0},n._offsetInfo={currentTime:-1,duration:0},n.innerContainer=null,n.controls=null,n.topBar=null,n.root=null,n.__i18n=I18N.init(n._pluginInfoId),sniffer.os.isAndroid&&sniffer.osVersion>0&&sniffer.osVersion<6&&(n.config.autoplay=!1),n.database=new INDEXDB,n.isUserActive=!1,n._onceSeekCanplay=null,n._isPauseBeforeSeek=0,n.innerStates={isActiveLocked:!1},n.instManager=instManager,!n._initDOM())return console.error(new Error("can't find the dom which id is ".concat(n.config.id," or this.config.el does not exist"))),_possibleConstructorReturn$1(n);var l=n.config,c=l.definition,u=void 0===c?{}:c;if(!l.url&&u.list&&u.list.length>0){var p,f=_findInstanceProperty2(p=u.list).call(p,(function(e){return e.definition&&e.definition===u.defaultDefinition}));f||(u.defaultDefinition=u.list[0].definition,f=u.list[0]),n.config.url=f.url,n.curDefinition=f}return n._bindEvents(),n._registerPresets(),n._registerPlugins(),pluginsManager.onPluginsReady(_assertThisInitialized$1(n)),n.getInitDefinition(),n.setState(STATES.READY),util.setTimeout(_assertThisInitialized$1(n),(function(){n.emit(READY)}),0),n.onReady&&n.onReady(),(n.config.videoInit||n.config.autoplay)&&(!n.hasStart||n.state<STATES.ATTACHED)&&n.start(),n}return _createClass(r,[{key:"_initDOM",value:function(){var e,t,r,n,i=this;if(this.root=this.config.id?document.getElementById(this.config.id):null,!this.root){var o=this.config.el;if(!o||1!==o.nodeType)return this.emit(ERROR,new Errors("use",this.config.vid,{line:32,handle:"Constructor",msg:"container id can't be empty"})),console.error("this.confg.id or this.config.el can't be empty"),!1;this.root=o}var a=checkPlayerRoot(this.root);if(a&&(XG_DEBUG.logWarn("The is an Player instance already exists in this.root, destroy it and reinitialize"),a.destroy()),this.root.setAttribute(PLATER_ID,this.playerId),this.media.setAttribute(PLATER_ID,this.playerId),null===(n=instManager)||void 0===n||n.add(this),pluginsManager.init(this),this._initBaseDoms(),this.config.controls){var s=this.config.controls.root||null,l=pluginsManager.register(this,Controls,{root:s});this.controls=l}var c="mobile"===this.config.isMobileSimulateMode?"mobile":sniffer.device;if(this.addClass(_concatInstanceProperty2(e=_concatInstanceProperty2(t=_concatInstanceProperty2(r="".concat(STATE_CLASS.DEFAULT," ")).call(r,STATE_CLASS.INACTIVE," xgplayer-")).call(t,c," ")).call(e,this.config.controls?"":STATE_CLASS.NO_CONTROLS)),this.config.autoplay?this.addClass(STATE_CLASS.ENTER):this.addClass(STATE_CLASS.NO_START),this.config.fluid){var u=this.config,p=u.width,f=u.height;"number"==typeof p&&"number"==typeof f||(p=600,f=337.5);var h={width:"100%",height:"0","max-width":"100%","padding-top":"".concat(100*f/p,"%")};_Object$keys(h).forEach((function(e){i.root.style[e]=h[e]}))}else["width","height"].forEach((function(e){i.config[e]&&("number"!=typeof i.config[e]?i.root.style[e]=i.config[e]:i.root.style[e]="".concat(i.config[e],"px"))}));var d=this.root.getBoundingClientRect(),y=d.width,g=d.height,$=d.left,v=d.top;return this.sizeInfo.width=y,this.sizeInfo.height=g,this.sizeInfo.left=$,this.sizeInfo.top=v,!0}},{key:"_initBaseDoms",value:function(){this.topBar=null,this.leftBar=null,this.rightBar=null,this.config.marginControls&&(this.innerContainer=util.createDom("xg-video-container","",{"data-index":-1},"xg-video-container"),this.root.appendChild(this.innerContainer))}},{key:"_bindEvents",value:function(){var e=this;["focus","blur"].forEach((function(t){e.on(t,e["on"+t.charAt(0).toUpperCase()+_sliceInstanceProperty2(t).call(t,1)])})),FULLSCREEN_EVENTS.forEach((function(t){document&&document.addEventListener(t,e.onFullscreenChange)})),sniffer.os.isIos&&(this.media.addEventListener("webkitbeginfullscreen",this._onWebkitbeginfullscreen),this.media.addEventListener("webkitendfullscreen",this._onWebkitendfullscreen)),this.once(LOADED_DATA,this.resize),this.playFunc=function(){e.config.closeFocusVideoFocus||e.media.focus()},this.once(PLAY,this.playFunc)}},{key:"_unbindEvents",value:function(){var e=this;this.root.removeEventListener("mousemove",this.mousemoveFunc),FULLSCREEN_EVENTS.forEach((function(t){document.removeEventListener(t,e.onFullscreenChange)})),this.playFunc&&this.off(PLAY,this.playFunc),this.off(CANPLAY,this.canPlayFunc),this.media.removeEventListener("webkitbeginfullscreen",this._onWebkitbeginfullscreen),this.media.removeEventListener("webkitendfullscreen",this._onWebkitendfullscreen)}},{key:"_clearUserTimer",value:function(){this.userTimer&&(util.clearTimeout(this,this.userTimer),this.userTimer=null)}},{key:"_startInit",value:function(e){var t=this;if(this.media&&(e&&""!==e&&("Array"!==util.typeOf(e)||0!==e.length)||(e="",this.emit(URL_NULL),XG_DEBUG.logWarn("config.url is null, please get url and run player._startInit(url)"),!this.config.nullUrlStart))){this.handleSource&&(this._detachSourceEvents(this.media),"Array"===util.typeOf(e)&&e.length>0?this._attachSourceEvents(this.media,e):this.media.src&&this.media.src===e?e||this.media.removeAttribute("src"):this.media.src=e),"Number"===util.typeOf(this.config.volume)&&(this.volume=this.config.volume);var r=this.innerContainer?this.innerContainer:this.root;this.media instanceof window.Element&&!r.contains(this.media)&&r.insertBefore(this.media,r.firstChild);var n=this.media.readyState;XG_DEBUG.logInfo("_startInit readyState",n),this.config.autoplay&&(!util.isMSE(this.media)&&this.load(),(sniffer.os.isIpad||sniffer.os.isPhone)&&this.mediaPlay());var i=this.config.startTime;this.__startTime=i>0?i:-1,this.config.startTime=0,n>=2&&this.duration>0?this.canPlayFunc():this.on(CANPLAY,this.canPlayFunc),(!this.hasStart||this.state<STATES.ATTACHED)&&pluginsManager.afterInit(this),this.hasStart=!0,this.setState(STATES.ATTACHED),util.setTimeout(this,(function(){t.emit(COMPLETE)}),0)}}},{key:"_registerPlugins",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._loadingPlugins=[];var r=this.config.ignores||[],n=this.config.plugins||[],i=this.config.i18n||[];t&&I18N.extend(i,this.__i18n);var o=r.join("||").toLowerCase().split("||"),a=this.plugins;n.forEach((function(r){try{var n=r.plugin?r.plugin.pluginName:r.pluginName;if(n&&_indexOfInstanceProperty2(o).call(o,n.toLowerCase())>-1)return null;if(!t&&a[n.toLowerCase()])return;if(r.lazy&&r.loader){var i=pluginsManager.lazyRegister(e,r);return void(r.forceBeforeInit&&(i.then((function(){var t,r;_spliceInstanceProperty2(t=e._loadingPlugins).call(t,_indexOfInstanceProperty2(r=e._loadingPlugins).call(r,i),1)})).catch((function(t){var r,n;XG_DEBUG.logError("_registerPlugins:loadingPlugin",t),_spliceInstanceProperty2(r=e._loadingPlugins).call(r,_indexOfInstanceProperty2(n=e._loadingPlugins).call(n,i),1)})),e._loadingPlugins.push(i)))}return e.registerPlugin(r)}catch(e){XG_DEBUG.logError("_registerPlugins:",e)}}))}},{key:"_registerPresets",value:function(){var e=this;this.config.presets.forEach((function(t){usePreset(e,t)}))}},{key:"_getRootByPosition",value:function(e){var t=null;switch(e){case POSITIONS$1.ROOT_RIGHT:this.rightBar||(this.rightBar=util.createPositionBar("xg-right-bar",this.root)),t=this.rightBar;break;case POSITIONS$1.ROOT_LEFT:this.leftBar||(this.leftBar=util.createPositionBar("xg-left-bar",this.root)),t=this.leftBar;break;case POSITIONS$1.ROOT_TOP:this.topBar||(this.topBar=util.createPositionBar("xg-top-bar",this.root),this.config.topBarAutoHide&&util.addClass(this.topBar,STATE_CLASS.TOP_BAR_AUTOHIDE)),t=this.topBar;break;default:t=this.innerContainer||this.root}return t}},{key:"registerPlugin",value:function(e,t){var r=pluginsManager.formatPluginInfo(e,t),n=r.PLUFGIN,i=r.options,o=this.config.plugins;!pluginsManager.checkPluginIfExits(n.pluginName,o)&&o.push(n);var a=pluginsManager.getRootByConfig(n.pluginName,this.config);a.root&&(i.root=a.root),a.position&&(i.position=a.position);var s,l=i.position?i.position:i.config&&i.config.position||n.defaultConfig&&n.defaultConfig.position;return!i.root&&"string"==typeof l&&_indexOfInstanceProperty2(l).call(l,"controls")>-1?null===(s=this.controls)||void 0===s?void 0:s.registerPlugin(n,i,n.pluginName):(i.root||(i.root=this._getRootByPosition(l)),pluginsManager.register(this,n,i))}},{key:"deregister",value:function(e){"string"==typeof e?pluginsManager.unRegister(this,e):e instanceof BasePlugin&&pluginsManager.unRegister(this,e.pluginName)}},{key:"unRegisterPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.deregister(e),t&&this.removePluginFromConfig(e)}},{key:"removePluginFromConfig",value:function(e){var t;if("string"==typeof e?t=e:e instanceof BasePlugin&&(t=e.pluginName),t)for(var r=this.config.plugins.length-1;r>-1;r--){if(this.config.plugins[r].pluginName.toLowerCase()===t.toLowerCase()){var n;_spliceInstanceProperty2(n=this.config.plugins).call(n,r,1);break}}}},{key:"plugins",get:function(){return pluginsManager.getPlugins(this)}},{key:"getPlugin",value:function(e){var t=pluginsManager.findPlugin(this,e);return t&&t.pluginName?t:null}},{key:"addClass",value:function(e){this.root&&(util.hasClass(this.root,e)||util.addClass(this.root,e))}},{key:"removeClass",value:function(e){this.root&&util.removeClass(this.root,e)}},{key:"hasClass",value:function(e){if(this.root)return util.hasClass(this.root,e)}},{key:"setAttribute",value:function(e,t){this.root&&this.root.setAttribute(e,t)}},{key:"removeAttribute",value:function(e,t){this.root&&this.root.removeAttribute(e,t)}},{key:"start",value:function(e){var t=this;if(!(this.state>STATES.ATTACHING))return e||this.config.url||this.getInitDefinition(),this.hasStart=!0,this.setState(STATES.ATTACHING),this._registerPlugins(!1),pluginsManager.beforeInit(this).then((function(){if(t.config){e||(e=t.url||t.config.url);var r=t.preProcessUrl(e);return t._startInit(r.url)}})).catch((function(e){throw e.fileName="player",e.lineNumber="236",XG_DEBUG.logError("start:beforeInit:",e),e}))}},{key:"switchURL",value:function(e,t){var r=this,n=e;"Object"===util.typeOf(e)&&(n=e.url),n=this.preProcessUrl(n).url;var i=this.currentTime;this.__startTime=i;var o=this.paused&&!this.isError;return this.src=n,new _Promise((function(e,t){var i=function(e){r.off("timeupdate",a),r.off("canplay",a),t(e)},a=function(){r._seekToStartTime(),o&&r.pause(),r.off("error",i),e(!0)};r.once("error",i),n?(sniffer.os.isAndroid?r.once("timeupdate",a):r.once("canplay",a),r.play()):r.errorHandler("error",{code:6,message:"empty_src"})}))}},{key:"videoPlay",value:function(){this.mediaPlay()}},{key:"mediaPlay",value:function(){var e=this;if(!this.hasStart&&this.state<STATES.ATTACHED)return this.removeClass(STATE_CLASS.NO_START),this.addClass(STATE_CLASS.ENTER),this.start(),void(this._useAutoplay=!0);this.state<STATES.RUNNING&&(this.removeClass(STATE_CLASS.NO_START),!this.isCanplay&&this.addClass(STATE_CLASS.ENTER));var t=_get$1(_getPrototypeOf$1(r.prototype),"play",this).call(this);return void 0!==t&&t&&t.then?t.then((function(){e.removeClass(STATE_CLASS.NOT_ALLOW_AUTOPLAY),e.addClass(STATE_CLASS.PLAYING),e.state<STATES.RUNNING&&(XG_DEBUG.logInfo(">>>>playPromise.then"),e.setState(STATES.RUNNING),e.emit(AUTOPLAY_STARTED))})).catch((function(t){if(XG_DEBUG.logWarn(">>>>playPromise.catch",t.name),e.media&&e.media.error)return e.onError(),void e.removeClass(STATE_CLASS.ENTER);"NotAllowedError"===t.name&&(e._errorTimer=util.setTimeout(e,(function(){e._errorTimer=null,e.emit(AUTOPLAY_PREVENTED),e.addClass(STATE_CLASS.NOT_ALLOW_AUTOPLAY),e.removeClass(STATE_CLASS.ENTER),e.pause(),e.setState(STATES.NOTALLOW)}),0))})):(XG_DEBUG.logWarn("video.play not return promise"),this.state<STATES.RUNNING&&(this.setState(STATES.RUNNING),this.removeClass(STATE_CLASS.NOT_ALLOW_AUTOPLAY),this.removeClass(STATE_CLASS.NO_START),this.removeClass(STATE_CLASS.ENTER),this.addClass(STATE_CLASS.PLAYING),this.emit(AUTOPLAY_STARTED))),t}},{key:"mediaPause",value:function(){_get$1(_getPrototypeOf$1(r.prototype),"pause",this).call(this)}},{key:"videoPause",value:function(){_get$1(_getPrototypeOf$1(r.prototype),"pause",this).call(this)}},{key:"play",value:function(){var e=this;return this.removeClass(STATE_CLASS.PAUSED),runHooks(this,"play",(function(){return e.mediaPlay()}))}},{key:"pause",value:function(){var e=this;runHooks(this,"pause",(function(){_get$1(_getPrototypeOf$1(r.prototype),"pause",e).call(e)}))}},{key:"seek",value:function(e,t){var r=this;if(this.media&&!_Number$isNaN(Number(e))&&this.hasStart){var n=this.config,i=n.isSeekedPlay,o=n.seekedStatus,a=t||(i?"play":o);e=e<0?0:e>this.duration?_parseInt2(this.duration,10):e,!this._isPauseBeforeSeek&&(this._isPauseBeforeSeek=this.paused?2:1),this._onceSeekCanplay&&this.off(SEEKED,this._onceSeekCanplay),this._onceSeekCanplay=function(){switch(r.removeClass(STATE_CLASS.ENTER),r.isSeeking=!1,a){case"play":r.play();break;case"pause":r.pause();break;default:r._isPauseBeforeSeek>1||r.paused?r.pause():r.play()}r._isPauseBeforeSeek=0,r._onceSeekCanplay=null},this.once(SEEKED,this._onceSeekCanplay),this.state<STATES.RUNNING?(this.removeClass(STATE_CLASS.NO_START),this.currentTime=e,this.play()):this.currentTime=e}}},{key:"getInitDefinition",value:function(){var e,t=this,r=this.config,n=r.definition;!r.url&&n&&n.list&&n.list.length>0&&n.defaultDefinition&&_mapInstanceProperty(e=n.list).call(e,(function(e){e.definition===n.defaultDefinition&&(t.config.url=e.url,t.curDefinition=e)}))}},{key:"changeDefinition",value:function(e,t){var r=this,n=this.config.definition;if(Array.isArray(null==n?void 0:n.list)&&n.list.forEach((function(t){(null==e?void 0:e.definition)===t.definition&&(r.curDefinition=t)})),null!=e&&e.bitrate&&"number"!=typeof e.bitrate&&(e.bitrate=_parseInt2(e.bitrate,10)||0),this.emit(DEFINITION_CHANGE,{from:t,to:e}),this.hasStart){var i=this.switchURL(e.url,_objectSpread2({seamless:!1!==n.seamless&&"undefined"!=typeof MediaSource&&"function"==typeof MediaSource.isTypeSupported},e));i&&i.then?i.then((function(){r.emit(AFTER_DEFINITION_CHANGE,{from:t,to:e})})):this.emit(AFTER_DEFINITION_CHANGE,{from:t,to:e})}else this.config.url=e.url}},{key:"reload",value:function(){this.load(),this.reloadFunc=function(){this.play()},this.once(LOADED_DATA,this.reloadFunc)}},{key:"resetState",value:function(){var e=this,t=[STATE_CLASS.NOT_ALLOW_AUTOPLAY,STATE_CLASS.PLAYING,STATE_CLASS.NO_START,STATE_CLASS.PAUSED,STATE_CLASS.REPLAY,STATE_CLASS.ENTER,STATE_CLASS.ENDED,STATE_CLASS.ERROR,STATE_CLASS.LOADING];this.hasStart=!1,this.isError=!1,this._useAutoplay=!1,this.mediaPause(),this._accPlayed.acc=0,this._accPlayed.t=0,this._accPlayed.loopAcc=0,t.forEach((function(t){e.removeClass(t)})),this.addClass(STATE_CLASS.NO_START),this.emit(RESET)}},{key:"reset",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1?arguments[1]:void 0;if(this.resetState(),this.plugins&&(_mapInstanceProperty(t).call(t,(function(t){e.deregister(t)})),r)){var n,i=getDefaultConfig$1();_keysInstanceProperty2(n=_Object$keys(this.config)).call(n,(function(t){"undefined"===e.config[t]||"plugins"!==t&&"presets"!==t&&"el"!==t&&"id"!==t||(e.config[t]=i[t])}))}}},{key:"destroy",value:function(){var e,t,n=this,i=this.innerContainer,o=this.root,a=this.media;if(o&&a){if(this.hasStart=!1,this._useAutoplay=!1,o.removeAttribute(PLATER_ID),a.removeAttribute(PLATER_ID),this.updateAcc("destroy"),this._unbindEvents(),this._detachSourceEvents(this.media),util.clearAllTimers(this),this.emit(DESTROY),null===(t=instManager)||void 0===t||t.remove(this),pluginsManager.destroy(this),delHooksDescriptor(this),_get$1(_getPrototypeOf$1(r.prototype),"destroy",this).call(this),this.fullscreen&&this._fullscreenEl===this.root&&this.exitFullscreen(),i)for(var s=i.children,l=0;l<s.length;l++)i.removeChild(s[l]);!i&&a instanceof window.Node&&o.contains(a)&&!this.config.remainMediaAfterDestroy&&o.removeChild(a),_mapInstanceProperty(e=["topBar","leftBar","rightBar","innerContainer"]).call(e,(function(e){n[e]&&o.removeChild(n[e]),n[e]=null}));var c=o.className.split(" ");c.length>0?o.className=_filterInstanceProperty2(c).call(c,(function(e){return _indexOfInstanceProperty2(e).call(e,"xgplayer")<0})).join(" "):o.className="",this.removeAttribute("data-xgfill"),["isSeeking","isCanplay","isActive","cssfullscreen","fullscreen"].forEach((function(e){n[e]=!1}))}}},{key:"replay",value:function(){var e=this;this.removeClass(STATE_CLASS.ENDED),this.currentTime=0,this.isSeeking=!1,runHooks(this,"replay",(function(){e.once(SEEKED,(function(){var t=e.mediaPlay();t&&t.catch&&t.catch((function(e){console.log(e)}))})),e.emit(REPLAY),e.onPlay()}))}},{key:"retry",value:function(){var e=this;this.removeClass(STATE_CLASS.ERROR),this.addClass(STATE_CLASS.LOADING),runHooks(this,"retry",(function(){var t=e.currentTime,r=e.config.url,n=util.isMSE(e.media)?{url:r}:e.preProcessUrl(r);e.src=n.url,!e.config.isLive&&(e.currentTime=t),e.once(CANPLAY,(function(){e.mediaPlay()}))}))}},{key:"changeFullStyle",value:function(e,t,r,n){e&&(n||(n=STATE_CLASS.PARENT_FULLSCREEN),this._orgCss||(this._orgCss=util.filterStyleFromText(e)),util.addClass(e,r),t&&t!==e&&!this._orgPCss&&(this._orgPCss=util.filterStyleFromText(t),util.addClass(t,n),t.setAttribute(PLATER_ID,this.playerId)))}},{key:"recoverFullStyle",value:function(e,t,r,n){n||(n=STATE_CLASS.PARENT_FULLSCREEN),this._orgCss&&(util.setStyleFromCsstext(e,this._orgCss),this._orgCss=""),util.removeClass(e,r),t&&t!==e&&this._orgPCss&&(util.setStyleFromCsstext(t,this._orgPCss),this._orgPCss="",util.removeClass(t,n),t.removeAttribute(PLATER_ID))}},{key:"getFullscreen",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.fullscreenTarget,t=this.root,r=this.media;if("video"!==e&&"media"!==e||(e=this[e]),e||(e=t),this._fullScreenOffset={top:util.scrollTop(),left:util.scrollLeft()},this._fullscreenEl=e,this._fullActionFrom="get",util.getFullScreenEl()===this._fullscreenEl)return this.onFullscreenChange(),_Promise.resolve();try{for(var n=0;n<GET_FULLSCREEN_API.length;n++){var i=GET_FULLSCREEN_API[n];if(e[i]){var o="webkitRequestFullscreen"===i?e.webkitRequestFullscreen(window.Element.ALLOW_KEYBOARD_INPUT):e[i]();return o&&o.then?o:_Promise.resolve()}}return r.fullscreenEnabled||r.webkitSupportsFullscreen?(r.webkitEnterFullscreen(),_Promise.resolve()):_Promise.reject(new Error("call getFullscreen fail"))}catch(e){return _Promise.reject(new Error("call getFullscreen fail"))}}},{key:"exitFullscreen",value:function(e){if(this.isRotateFullscreen&&this.exitRotateFullscreen(),this._fullscreenEl||util.getFullScreenEl()){this.root;var t=this.media;this._fullActionFrom="exit";try{for(var r=0;r<EXIT_FULLSCREEN_API.length;r++){var n=EXIT_FULLSCREEN_API[r];if(document[n]){var i=document[n]();return i&&i.then?i:_Promise.resolve()}}return t&&t.webkitSupportsFullscreen?(t.webkitExitFullScreen(),_Promise.resolve()):_Promise.reject(new Error("call exitFullscreen fail"))}catch(e){return _Promise.reject(new Error("call exitFullscreen fail"))}}}},{key:"getCssFullscreen",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.fullscreenTarget;this.isRotateFullscreen?this.exitRotateFullscreen():this.fullscreen&&this.exitFullscreen();var r=t?_concatInstanceProperty2(e="".concat(STATE_CLASS.INNER_FULLSCREEN," ")).call(e,STATE_CLASS.CSS_FULLSCREEN):STATE_CLASS.CSS_FULLSCREEN;this.changeFullStyle(this.root,t,r);var n=this.config.fullscreen,i=void 0===n?{}:n;(!0===i.useCssFullscreen||"function"==typeof i.useCssFullscreen&&i.useCssFullscreen())&&(this.fullscreen=!0,this.emit(FULLSCREEN_CHANGE,!0)),this._cssfullscreenEl=t,this.cssfullscreen=!0,this.emit(CSS_FULLSCREEN_CHANGE,!0)}},{key:"exitCssFullscreen",value:function(){var e,t=this._cssfullscreenEl?_concatInstanceProperty2(e="".concat(STATE_CLASS.INNER_FULLSCREEN," ")).call(e,STATE_CLASS.CSS_FULLSCREEN):STATE_CLASS.CSS_FULLSCREEN;if(this.fullscreen){var r=this.config.fullscreen,n=void 0===r?{}:r;!0===n.useCssFullscreen||"function"==typeof n.useCssFullscreen&&n.useCssFullscreen()?(this.recoverFullStyle(this.root,this._cssfullscreenEl,t),this.fullscreen=!1,this.emit(FULLSCREEN_CHANGE,!1)):this.removeClass(t)}else this.recoverFullStyle(this.root,this._cssfullscreenEl,t);this._cssfullscreenEl=null,this.cssfullscreen=!1,this.emit(CSS_FULLSCREEN_CHANGE,!1)}},{key:"getRotateFullscreen",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.fullscreenTarget;this.cssfullscreen&&this.exitCssFullscreen(t);var r=t?_concatInstanceProperty2(e="".concat(STATE_CLASS.INNER_FULLSCREEN," ")).call(e,STATE_CLASS.ROTATE_FULLSCREEN):STATE_CLASS.ROTATE_FULLSCREEN;this._fullscreenEl=t||this.root,this.changeFullStyle(this.root,t,r,STATE_CLASS.PARENT_ROTATE_FULLSCREEN),this.isRotateFullscreen=!0,this.fullscreen=!0,this.setRotateDeg(90),this._rootStyle=this.root.getAttribute("style"),this.root.style.width="".concat(window.innerHeight,"px"),this.emit(FULLSCREEN_CHANGE,!0)}},{key:"exitRotateFullscreen",value:function(e){var t,r=this._fullscreenEl!==this.root?_concatInstanceProperty2(t="".concat(STATE_CLASS.INNER_FULLSCREEN," ")).call(t,STATE_CLASS.ROTATE_FULLSCREEN):STATE_CLASS.ROTATE_FULLSCREEN;this.recoverFullStyle(this.root,this._fullscreenEl,r,STATE_CLASS.PARENT_ROTATE_FULLSCREEN),this.isRotateFullscreen=!1,this.fullscreen=!1,this.setRotateDeg(0),this.emit(FULLSCREEN_CHANGE,!1),this._rootStyle&&(this.root.style.style=this._rootStyle,this._rootStyle=!1)}},{key:"setRotateDeg",value:function(e){90===window.orientation||-90===window.orientation?this.rotateDeg=0:this.rotateDeg=e}},{key:"focus",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{autoHide:!this.config.closeDelayBlur,delay:this.config.inactive};this.isActive?this.onFocus(e):this.emit(PLAYER_FOCUS,_objectSpread2({paused:this.paused,ended:this.ended},e))}},{key:"blur",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{ignorePaused:!1};this.isActive?(this._clearUserTimer(),this.emit(PLAYER_BLUR,_objectSpread2({paused:this.paused,ended:this.ended},e))):this.onBlur(e)}},{key:"onFocus",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{autoHide:!0,delay:3e3},r=this.innerStates;if(this.isActive=!0,this.removeClass(STATE_CLASS.INACTIVE),this._clearUserTimer(),void 0!==t.isLock&&(r.isActiveLocked=t.isLock),!1===t.autoHide||!0===t.isLock||r.isActiveLocked)this._clearUserTimer();else{var n=t&&t.delay?t.delay:this.config.inactive;this.userTimer=util.setTimeout(this,(function(){e.userTimer=null,e.blur()}),n)}}},{key:"onBlur",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).ignorePaused,t=void 0!==e&&e;if(!this.innerStates.isActiveLocked){var r=this.config.closePauseVideoFocus;this.isActive=!1,(t||r||!this.paused&&!this.ended)&&this.addClass(STATE_CLASS.INACTIVE)}}},{key:"onEmptied",value:function(){this.updateAcc("emptied")}},{key:"onCanplay",value:function(){this.removeClass(STATE_CLASS.ENTER),this.removeClass(STATE_CLASS.ERROR),this.removeClass(STATE_CLASS.LOADING),this.isCanplay=!0,this.waitTimer&&util.clearTimeout(this,this.waitTimer)}},{key:"onLoadeddata",value:function(){var e=this;this.isError=!1,this.isSeeking=!1,this.__startTime>0&&(this.duration>0?this._seekToStartTime():this.once(DURATION_CHANGE,(function(){e._seekToStartTime()})))}},{key:"onLoadstart",value:function(){this.removeClass(STATE_CLASS.ERROR),this.isCanplay=!1}},{key:"onPlay",value:function(){this.state===STATES.ENDED&&this.setState(STATES.RUNNING),this.removeClass(STATE_CLASS.PAUSED),this.ended&&this.removeClass(STATE_CLASS.ENDED),!this.config.closePlayVideoFocus&&this.focus()}},{key:"onPause",value:function(){this.addClass(STATE_CLASS.PAUSED),this.updateAcc("pause"),this.config.closePauseVideoFocus||(this._clearUserTimer(),this.focus())}},{key:"onEnded",value:function(){this.updateAcc("ended"),this.addClass(STATE_CLASS.ENDED),this.setState(STATES.ENDED)}},{key:"onError",value:function(){this.isError=!0,this.updateAcc("error"),this.removeClass(STATE_CLASS.NOT_ALLOW_AUTOPLAY),this.removeClass(STATE_CLASS.NO_START),this.removeClass(STATE_CLASS.ENTER),this.removeClass(STATE_CLASS.LOADING),this.addClass(STATE_CLASS.ERROR)}},{key:"onSeeking",value:function(){this.isSeeking||this.updateAcc("seeking"),this.isSeeking=!0,this.addClass(STATE_CLASS.SEEKING)}},{key:"onSeeked",value:function(){this.isSeeking=!1,this.waitTimer&&util.clearTimeout(this,this.waitTimer),this.removeClass(STATE_CLASS.LOADING),this.removeClass(STATE_CLASS.SEEKING)}},{key:"onWaiting",value:function(){var e=this;this.waitTimer&&util.clearTimeout(this,this.waitTimer),this.updateAcc("waiting"),this.waitTimer=util.setTimeout(this,(function(){e.addClass(STATE_CLASS.LOADING),e.emit(LOADING),util.clearTimeout(e,e.waitTimer),e.waitTimer=null}),this.config.minWaitDelay)}},{key:"onPlaying",value:function(){var e=this;this.isError=!1,[STATE_CLASS.NO_START,STATE_CLASS.PAUSED,STATE_CLASS.ENDED,STATE_CLASS.ERROR,STATE_CLASS.REPLAY,STATE_CLASS.LOADING].forEach((function(t){e.removeClass(t)})),this._accPlayed.t||this.paused||this.ended||(this._accPlayed.t=(new Date).getTime())}},{key:"onTimeupdate",value:function(){!this._videoHeight&&this.media.videoHeight&&this.resize(),(this.waitTimer||this.hasClass(STATE_CLASS.LOADING))&&this.media.readyState>2&&(this.removeClass(STATE_CLASS.LOADING),util.clearTimeout(this,this.waitTimer),this.waitTimer=null),!this.paused&&this.state===STATES.NOTALLOW&&this.duration&&(this.setState(STATES.RUNNING),this.emit(AUTOPLAY_STARTED)),this._accPlayed.t||this.paused||this.ended||(this._accPlayed.t=(new Date).getTime())}},{key:"onVolumechange",value:function(){"Number"===util.typeOf(this.config.volume)&&(this.config.volume=this.volume)}},{key:"onRatechange",value:function(){this.config.defaultPlaybackRate=this.playbackRate}},{key:"emitUserAction",value:function(e,t,r){if(this.media&&t&&e){var n="String"===util.typeOf(e)?e:e.type||"";r.props&&"Array"!==util.typeOf(r.props)&&(r.props=[r.props]),this.emit(USER_ACTION,_objectSpread2({eventType:n,action:t,currentTime:this.currentTime,duration:this.duration,ended:this.ended,event:e},r))}}},{key:"updateAcc",value:function(e){if(this._accPlayed.t){var t=(new Date).getTime()-this._accPlayed.t;this._accPlayed.acc+=t,this._accPlayed.t=0,("ended"===e||this.ended)&&(this._accPlayed.loopAcc=this._accPlayed.acc)}}},{key:"checkBuffer",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{startDiff:0,endDiff:0})||{},r=t.startDiff,n=void 0===r?0:r,i=t.endDiff,o=void 0===i?0:i,a=this.media.buffered;if(!a||0===a.length||!this.duration)return!0;for(var s=e||this.media.currentTime||.2,l=a.length,c=0;c<l;c++)if(a.start(c)+n<=s&&a.end(c)-o>s)return!0;return!1}},{key:"resizePosition",value:function(){var e,t=this,r=this.videoPos,n=r.vy,i=r.vx,o=r.h,a=r.w,s=this.videoPos.rotate;if(!(s<0&&o<0&&a<0)){var l=this.videoPos._pi;if(!l&&this.media.videoHeight&&(l=this.media.videoWidth/this.media.videoHeight*100),l){this.videoPos.pi=l;var c={rotate:s=s<0?0:s},u=0,p=0,f=1,h=Math.abs(s/90),d=this.root,y=this.innerContainer,g=d.offsetWidth,$=y?y.offsetHeight:d.offsetHeight,v={},_=$,m=g;if(h%2==0)f=o>0?100/o:a>0?100/a:1,c.scale=f,u=n>0?(100-o)/2-n:0,c.y=2===h?0-u:u,p=i>0?(100-a)/2-i:0,c.x=2===h?0-p:p,v.width="".concat(m,"px"),v.height="".concat(_,"px"),v.maxWidth="",v.maxHeight="";else if(h%2==1){_=g;var E=$-g;p=-E/2/(m=$)*100,c.x=3===h?p+n/2:p-n/2,u=E/2/_*100,c.y=3===h?u+i/2:u-i/2,c.scale=f,v.width="".concat(m,"px"),v.maxWidth="".concat(m,"px"),v.height="".concat(_,"px"),v.maxHeight="".concat(_,"px")}var S=util.getTransformStyle(c,this.media.style.transform||this.media.style.webkitTransform);v.transform=S,v.webkitTransform=S,_mapInstanceProperty(e=_Object$keys(v)).call(e,(function(e){t.media.style[e]=v[e]}))}}}},{key:"position",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{h:0,y:0,x:0,w:0};if(this.media&&e&&e.h){var t=this.videoPos;t.h=100*e.h||0,t.w=100*e.w||0,t.vx=100*e.x||0,t.vy=100*e.y||0,this.resizePosition()}}},{key:"setConfig",value:function(e){var t,r=this;e&&_mapInstanceProperty(t=_Object$keys(e)).call(t,(function(t){if("plugins"!==t){r.config[t]=e[t];var n=r.plugins[t.toLowerCase()];n&&"Function"===util.typeOf(n.setConfig)&&n.setConfig(e[t])}}))}},{key:"playNext",value:function(e){var t=this;this.resetState(),this.setConfig(e),this._currentTime=0,this._duration=0,runHooks(this,"playnext",(function(){t.start(),t.emit(PLAYNEXT,e)}))}},{key:"resize",value:function(){var e=this;if(this.media){var t=this.root.getBoundingClientRect();this.sizeInfo.width=t.width,this.sizeInfo.height=t.height,this.sizeInfo.left=t.left,this.sizeInfo.top=t.top;var r=this.media,n=r.videoWidth,i=r.videoHeight,o=this.config,a=o.fitVideoSize,s=o.videoFillMode;if("fill"!==s&&"cover"!==s&&"contain"!==s||this.setAttribute("data-xgfill",s),i&&n){this._videoHeight=i,this._videoWidth=n;var l=this.controls&&this.innerContainer?this.controls.root.getBoundingClientRect().height:0,c=t.width,u=t.height-l,p=_parseInt2(n/i*1e3,10),f=_parseInt2(c/u*1e3,10),h=c,d=u,y={};"auto"===a&&f>p||"fixWidth"===a?(d=c/p*1e3,this.config.fluid?y.paddingTop="".concat(100*d/h,"%"):y.height="".concat(d+l,"px")):("auto"===a&&f<p||"fixHeight"===a)&&(h=p*u/1e3,y.width="".concat(h,"px")),this.fullscreen||this.cssfullscreen||_Object$keys(y).forEach((function(t){e.root.style[t]=y[t]})),("fillHeight"===s&&f<p||"fillWidth"===s&&f>p)&&this.setAttribute("data-xgfill","cover");var g={videoScale:p,vWidth:h,vHeight:d,cWidth:h,cHeight:d+l};this.resizePosition(),this.emit(VIDEO_RESIZE,g)}}}},{key:"updateObjectPosition",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.media.updateObjectPosition?this.media.updateObjectPosition(t,r):this.media.style.objectPosition=_concatInstanceProperty2(e="".concat(100*t,"% ")).call(e,100*r,"%")}},{key:"setState",value:function(e){var t;XG_DEBUG.logInfo("setState",_concatInstanceProperty2(t="state from:".concat(STATE_ARRAY[this.state]," to:")).call(t,STATE_ARRAY[e])),this._state=e}},{key:"preProcessUrl",value:function(e,t){var r=this.config,n=r.preProcessUrl,i=r.preProcessUrlOptions,o=_Object$assign2({},i,t);return util.isBlob(e)||"function"!=typeof n?{url:e}:n(e,o)}},{key:"_seekToStartTime",value:function(){this.__startTime>0&&this.duration>0&&(this.currentTime=this.__startTime>this.duration?this.duration:this.__startTime,this.__startTime=-1)}},{key:"state",get:function(){return this._state}},{key:"isFullscreen",get:function(){return this.fullscreen}},{key:"isCssfullScreen",get:function(){return this.cssfullscreen}},{key:"hasStart",get:function(){return this._hasStart},set:function(e){"boolean"==typeof e&&(this._hasStart=e,!1===e&&this.setState(STATES.READY),this.emit("hasstart"))}},{key:"isPlaying",get:function(){return this._state===STATES.RUNNING||this._state===STATES.ENDED},set:function(e){e?this.setState(STATES.RUNNING):this._state>=STATES.RUNNING&&this.setState(STATES.ATTACHED)}},{key:"definitionList",get:function(){return this.config&&this.config.definition&&this.config.definition.list||[]},set:function(e){var t=this,r=this.config.definition,n=null,i=null;r.list=e,this.emit("resourceReady",e),e.forEach((function(e){var o;(null===(o=t.curDefinition)||void 0===o?void 0:o.definition)===e.definition&&(n=e),r.defaultDefinition===e.definition&&(i=e)})),!i&&e.length>0&&(i=e[0]),n?this.changeDefinition(n):i&&this.changeDefinition(i)}},{key:"videoFrameInfo",get:function(){var e={total:0,dropped:0,corrupted:0,droppedRate:0,droppedDuration:0};if(!this.media||!this.media.getVideoPlaybackQuality)return e;var t=this.media.getVideoPlaybackQuality();return e.dropped=t.droppedVideoFrames||0,e.total=t.totalVideoFrames||0,e.corrupted=t.corruptedVideoFrames||0,e.total>0&&(e.droppedRate=e.dropped/e.total*100,e.droppedDuration=_parseInt2(this.cumulateTime/e.total*e.dropped,0)),e}},{key:"lang",get:function(){return this.config.lang},set:function(e){var t,r;0!==_filterInstanceProperty2(t=I18N.langKeys).call(t,(function(t){return t===e})).length||"zh"===e?(this.config.lang=e,pluginsManager.setLang(e,this)):console.error(_concatInstanceProperty2(r="Sorry, set lang fail, because the language [".concat(e,"] is not supported now, list of all supported languages is [")).call(r,I18N.langKeys.join(),"] "))}},{key:"i18n",get:function(){var e=this.config.lang;return"zh"===e&&(e="zh-cn"),this.__i18n.lang[e]||this.__i18n.lang.en}},{key:"i18nKeys",get:function(){return this.__i18n.textKeys||{}}},{key:"version",get:function(){return version}},{key:"playerId",get:function(){return this._pluginInfoId}},{key:"url",get:function(){return this.__url||this.config.url},set:function(e){this.__url=e}},{key:"poster",get:function(){return this.plugins.poster?this.plugins.poster.config.poster:this.config.poster},set:function(e){this.plugins.poster&&this.plugins.poster.update(e)}},{key:"readyState",get:function(){return _get$1(_getPrototypeOf$1(r.prototype),"readyState",this)}},{key:"error",get:function(){var e=_get$1(_getPrototypeOf$1(r.prototype),"error",this);return this.i18n[e]||e}},{key:"networkState",get:function(){return _get$1(_getPrototypeOf$1(r.prototype),"networkState",this)}},{key:"fullscreenChanging",get:function(){return!(null===this._fullScreenOffset)}},{key:"cumulateTime",get:function(){var e=this._accPlayed,t=e.acc,r=e.t;return r?(new Date).getTime()-r+t:t}},{key:"zoom",get:function(){return this.config.zoom},set:function(e){this.config.zoom=e}},{key:"videoRotateDeg",get:function(){return this.videoPos.rotate},set:function(e){(e=util.convertDeg(e))%90==0&&e!==this.videoPos.rotate&&(this.videoPos.rotate=e,this.resizePosition())}},{key:"avgSpeed",get:function(){return AVG_SPEED},set:function(e){AVG_SPEED=e}},{key:"realTimeSpeed",get:function(){return REAL_TIME_SPEED},set:function(e){REAL_TIME_SPEED=e}},{key:"offsetCurrentTime",get:function(){return this._offsetInfo.currentTime||0},set:function(e){this._offsetInfo.currentTime=e}},{key:"offsetDuration",get:function(){return this._offsetInfo.duration||0},set:function(e){this._offsetInfo.duration=e||0}},{key:"hook",value:function(e,t){var r;return hook.call.apply(hook,_concatInstanceProperty2(r=[this]).call(r,_sliceInstanceProperty2(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){var r;return useHooks.call.apply(useHooks,_concatInstanceProperty2(r=[this]).call(r,_sliceInstanceProperty2(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){var r;return removeHooks.call.apply(removeHooks,_concatInstanceProperty2(r=[this]).call(r,_sliceInstanceProperty2(Array.prototype).call(arguments)))}},{key:"usePluginHooks",value:function(e,t,r){for(var n,i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];return usePluginHooks.call.apply(usePluginHooks,_concatInstanceProperty2(n=[this]).call(n,_sliceInstanceProperty2(Array.prototype).call(arguments)))}},{key:"removePluginHooks",value:function(e,t,r){for(var n,i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];return removePluginHooks.call.apply(removePluginHooks,_concatInstanceProperty2(n=[this]).call(n,_sliceInstanceProperty2(Array.prototype).call(arguments)))}},{key:"setUserActive",value:function(e,t){var r;"boolean"==typeof t&&t!==this.muted&&(this.addInnerOP("volumechange"),util.typeOf(t)===Boolean&&(this.muted=t)),null===(r=instManager)||void 0===r||r.setActive(this.playerId,e)}}],[{key:"debugger",get:function(){return XG_DEBUG.config.debug},set:function(e){XG_DEBUG.config.debug=e}},{key:"instManager",get:function(){return instManager},set:function(e){instManager=e}},{key:"getCurrentUserActivePlayerId",value:function(){var e;return null===(e=instManager)||void 0===e?void 0:e.getActiveId()}},{key:"setCurrentUserActive",value:function(e,t){var r;null===(r=instManager)||void 0===r||r.setActive(e,t)}},{key:"isHevcSupported",value:function(){return sniffer.isHevcSupported()}},{key:"probeConfigSupported",value:function(e){return sniffer.probeConfigSupported(e)}},{key:"install",value:function(e,t){r.plugins||(r.plugins={}),r.plugins[e]||(r.plugins[e]=t)}},{key:"use",value:function(e,t){r.plugins||(r.plugins={}),r.plugins[e]=t}}]),r}();_defineProperty(Player,"defaultPreset",null),_defineProperty(Player,"XgVideoProxy",null),Player.instManager=InstManager.getInstance();var index_min="";function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var $$c=_export,bind$8=functionBind;$$c({target:"Function",proto:!0,forced:Function.bind!==bind$8},{bind:bind$8});var _ERROR_INFO,_ERROR_TYPE_INFO,entryVirtual$7=entryVirtual$m,bind$7=entryVirtual$7("Function").bind,isPrototypeOf$6=objectIsPrototypeOf,method$5=bind$7,FunctionPrototype=Function.prototype,bind$6=function(e){var t=e.bind;return e===FunctionPrototype||isPrototypeOf$6(FunctionPrototype,e)&&t===FunctionPrototype.bind?method$5:t},parent$t=bind$6,bind$5=parent$t,parent$s=bind$5,bind$4=parent$s,parent$r=bind$4,bind$3=parent$r,bind$2=bind$3,_bindInstanceProperty=getDefaultExportFromCjs(bind$2);function _setPrototypeOf(e,t){var r;return(_setPrototypeOf=_Object$setPrototypeOf?_bindInstanceProperty(r=_Object$setPrototypeOf).call(r):function(e,t){return e.__proto__=t,e})(e,t)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=_Object$create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),_Object$defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){var t;return(_getPrototypeOf=_Object$setPrototypeOf?_bindInstanceProperty(t=_Object$getPrototypeOf).call(t):function(e){return e.__proto__||_Object$getPrototypeOf(e)})(e)}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!_Reflect$construct$1)return!1;if(_Reflect$construct$1.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _possibleConstructorReturn(e,t){if(t&&("object"===_typeof$1(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=_Reflect$construct$1(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _isNativeFunction(e){var t;return-1!==_indexOfInstanceProperty(t=Function.toString.call(e)).call(t,"[native code]")}function _construct(e,t,r){var n;_isNativeReflectConstruct()?_construct=_bindInstanceProperty(n=_Reflect$construct$1).call(n):_construct=function(e,t,r){var n=[null];_pushInstanceProperty(n).apply(n,t);var i=new(_bindInstanceProperty(Function).apply(e,n));return r&&_setPrototypeOf(i,r.prototype),i};return _construct.apply(null,arguments)}function _wrapNativeSuper(e){var t="function"==typeof _Map$1?new _Map$1:void 0;return _wrapNativeSuper=function(e){if(null===e||!_isNativeFunction(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return _construct(e,arguments,_getPrototypeOf(this).constructor)}return r.prototype=_Object$create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(r,e)},_wrapNativeSuper(e)}var ErrorCode=function(e){return e[e.MANIFEST_HLS_ERROR=1100]="MANIFEST_HLS_ERROR",e[e.MANIFEST_DASH_ERROR=1200]="MANIFEST_DASH_ERROR",e[e.NETWORK=2100]="NETWORK",e[e.NETWORK_TIMEOUT=2101]="NETWORK_TIMEOUT",e[e.NETWORK_FORBIDDEN=2103]="NETWORK_FORBIDDEN",e[e.NETWORK_NOTFOUND=2104]="NETWORK_NOTFOUND",e[e.NETWORK_RANGE_NOT_SATISFIABLE=2116]="NETWORK_RANGE_NOT_SATISFIABLE",e[e.DEMUX_FLV_ERROR=3100]="DEMUX_FLV_ERROR",e[e.DEMUX_HLS_ERROR=3200]="DEMUX_HLS_ERROR",e[e.DEMUX_MP4_ERROR=3300]="DEMUX_MP4_ERROR",e[e.DEMUX_FMP4_ERROR=3400]="DEMUX_FMP4_ERROR",e[e.DEMUX_SIDX_ERROR=3410]="DEMUX_SIDX_ERROR",e[e.REMUX_FMP4_ERROR=4100]="REMUX_FMP4_ERROR",e[e.REMUX_MP4_ERROR=4200]="REMUX_MP4_ERROR",e[e.MEDIA_ERR_ABORTED=5101]="MEDIA_ERR_ABORTED",e[e.MEDIA_ERR_NETWORK=5102]="MEDIA_ERR_NETWORK",e[e.MEDIA_ERR_DECODE=5103]="MEDIA_ERR_DECODE",e[e.MEDIA_ERR_SRC_NOT_SUPPORTED=5104]="MEDIA_ERR_SRC_NOT_SUPPORTED",e[e.MEDIA_ERR_CODEC_NOT_SUPPORTED=5105]="MEDIA_ERR_CODEC_NOT_SUPPORTED",e[e.MEDIA_ERR_URL_EMPTY=5106]="MEDIA_ERR_URL_EMPTY",e[e.MEDIA_MSE_ADD_SB=5200]="MEDIA_MSE_ADD_SB",e[e.MEDIA_MSE_APPEND_BUFFER=5201]="MEDIA_MSE_APPEND_BUFFER",e[e.MEDIA_MSE_OTHER=5202]="MEDIA_MSE_OTHER",e[e.MEDIA_MSE_FULL=5203]="MEDIA_MSE_FULL",e[e.MEDIA_MSE_HIJACK=5204]="MEDIA_MSE_HIJACK",e[e.MEDIA_EME_HIJACK=5301]="MEDIA_EME_HIJACK",e[e.DRM_LICENSE=7100]="DRM_LICENSE",e[e.DRM_UNSUPPORTED=7101]="DRM_UNSUPPORTED",e[e.DRM_NO_MEDIA_KEY=7103]="DRM_NO_MEDIA_KEY",e[e.DRM_NO_KEY_SESSION=7104]="DRM_NO_KEY_SESSION",e[e.DRM_GENERATE_QUEST_FAIL=7105]="DRM_GENERATE_QUEST_FAIL",e[e.DRM_LACK_SERVER_CERTIFICATE_PATH=7106]="DRM_LACK_SERVER_CERTIFICATE_PATH",e[e.DRM_LACK_SERVER_PROCESS_SPC_PATH=7107]="DRM_LACK_SERVER_PROCESS_SPC_PATH",e[e.DRM_LICENSE_FAIL=7108]="DRM_LICENSE_FAIL",e[e.DRM_KEY_ERROR=7109]="DRM_KEY_ERROR",e[e.DRM_CERT_FAIL=7110]="DRM_CERT_FAIL",e[e.DRM_CUSTOM_LICENSE=7200]="DRM_CUSTOM_LICENSE",e[e.OTHER=8e3]="OTHER",e[e.RUNTIME_NO_CANPLAY_ERROR=9001]="RUNTIME_NO_CANPLAY_ERROR",e[e.RUNTIME_BUFFERBREAK_ERROR=9002]="RUNTIME_BUFFERBREAK_ERROR",e[e.RUNTIME_WAITING_TIMEOUT_ERROR=9003]="RUNTIME_WAITING_TIMEOUT_ERROR",e[e.MODULE_LOAD_ERROR=110]="MODULE_LOAD_ERROR",e.UNKNOWN="UNKNOWN",e}(ErrorCode||{}),ERROR_INFO=(_defineProperty$1(_ERROR_INFO={},2100,{messageTextKey:"NETWORK",level:"Error"}),_defineProperty$1(_ERROR_INFO,2101,{messageTextKey:"NETWORK_TIMEOUT",level:"Error"}),_defineProperty$1(_ERROR_INFO,2103,{messageTextKey:"NETWORK_FORBIDDEN",level:"Error"}),_defineProperty$1(_ERROR_INFO,2104,{messageTextKey:"NETWORK_NOTFOUND",level:"Error"}),_defineProperty$1(_ERROR_INFO,5101,{messageTextKey:"MEDIA_ERR_ABORTED",level:"Error"}),_defineProperty$1(_ERROR_INFO,5102,{messageTextKey:"MEDIA_ERR_NETWORK",level:"Error"}),_defineProperty$1(_ERROR_INFO,5103,{messageTextKey:"MEDIA_ERR_DECODE",level:"Error"}),_defineProperty$1(_ERROR_INFO,5104,{messageTextKey:"MEDIA_ERR_SRC_NOT_SUPPORTED",level:"Error"}),_defineProperty$1(_ERROR_INFO,5105,{messageTextKey:"MEDIA_ERR_CODEC_NOT_SUPPORTED",level:"Error"}),_defineProperty$1(_ERROR_INFO,5106,{messageTextKey:"MEDIA_ERR_URL_EMPTY",level:"Error"}),_defineProperty$1(_ERROR_INFO,110,{messageTextKey:"MODULE_LOAD_ERROR",level:"Fatal"}),_defineProperty$1(_ERROR_INFO,7100,{messageTextKey:"DRM_LICENSE",level:"Fatal"}),_defineProperty$1(_ERROR_INFO,7101,{messageTextKey:"DRM_UNSUPPORTED",level:"Fatal"}),_defineProperty$1(_ERROR_INFO,7103,{messageTextKey:"DRM_NO_MEDIA_KEY",level:"Fatal"}),_defineProperty$1(_ERROR_INFO,7104,{messageTextKey:"DRM_NO_KEY_SESSION",level:"Fatal"}),_defineProperty$1(_ERROR_INFO,7105,{messageTextKey:"DRM_GENERATE_QUEST_FAIL",level:"Fatal"}),_defineProperty$1(_ERROR_INFO,7106,{messageTextKey:"DRM_LACK_SERVER_CERTIFICATE_PATH",level:"Fatal"}),_defineProperty$1(_ERROR_INFO,7107,{messageTextKey:"DRM_LACK_SERVER_PROCESS_SPC_PATH",level:"Fatal"}),_defineProperty$1(_ERROR_INFO,7108,{messageTextKey:"DRM_LICENSE_FAIL",level:"Fatal"}),_defineProperty$1(_ERROR_INFO,7109,{messageTextKey:"DRM_KEY_ERROR",level:"Fatal"}),_defineProperty$1(_ERROR_INFO,7110,{messageTextKey:"DRM_CERT_FAIL",level:"Fatal"}),_ERROR_INFO),ERROR_TYPE_INFO=(_defineProperty$1(_ERROR_TYPE_INFO={},"manifest",{messageTextKey:"MANIFEST",level:"Error"}),_defineProperty$1(_ERROR_TYPE_INFO,"network",{messageTextKey:"NETWORK",level:"Error"}),_defineProperty$1(_ERROR_TYPE_INFO,"demux",{messageTextKey:"DEMUX",level:"Error"}),_defineProperty$1(_ERROR_TYPE_INFO,"remux",{messageTextKey:"REMUX",level:"Error"}),_defineProperty$1(_ERROR_TYPE_INFO,"media",{messageTextKey:"MEDIA",level:"Error"}),_defineProperty$1(_ERROR_TYPE_INFO,"drm",{messageTextKey:"DRM",level:"Error"}),_defineProperty$1(_ERROR_TYPE_INFO,"other",{messageTextKey:"OTHER",level:"Error"}),_defineProperty$1(_ERROR_TYPE_INFO,"runtime",{messageTextKey:"RUNTIME",level:"Error"}),_ERROR_TYPE_INFO),VeError=function(e){_inherits(r,_wrapNativeSuper(Error));var t=_createSuper(r);function r(e,n){var i,o,a,s,l,c,u;_classCallCheck$1(this,r);var p="string"==typeof e?{message:e}:e,f=null!==(i=null!==(o=null!==(a=null==n?void 0:n.getText(null==p?void 0:p.messageTextKey))&&void 0!==a?a:null==p?void 0:p.message)&&void 0!==o?o:null==p||null===(s=p.error)||void 0===s?void 0:s.message)&&void 0!==i?i:null==n?void 0:n.getText("UNKNOWN");return _defineProperty$1(_assertThisInitialized(u=t.call(this,f)),"errorCode",void 0),_defineProperty$1(_assertThisInitialized(u),"level",void 0),_defineProperty$1(_assertThisInitialized(u),"ext",void 0),u.errorCode=null!==(l=null==p?void 0:p.errorCode)&&void 0!==l?l:"UNKNOWN",u.level=null!==(c=null==p?void 0:p.level)&&void 0!==c?c:"Error",u.ext=null==p?void 0:p.ext,u}return _createClass$1(r)}();function create$1(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;return new VeError(_objectSpread2$1(_objectSpread2$1({errorCode:e},ERROR_INFO[e]),t),r)}function transform$1(e,t){var r,n,i=ERROR_INFO[e.errorCode]||ERROR_TYPE_INFO[e.errorType],o=e.errorCode;return new VeError({messageTextKey:null==i?void 0:i.messageTextKey,message:null!==(r=null==e?void 0:e.message)&&void 0!==r?r:o,errorCode:o,level:null!==(n=null==i?void 0:i.level)&&void 0!==n?n:"Error",ext:e},t)}var Poster=function(e){_inherits$1(r,Plugin);var t=_createSuper$1(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,[{key:"isEndedShow",get:function(){return this.config.isEndedShow},set:function(e){this.config.isEndedShow=e}},{key:"hide",value:function(){util.addClass(this.root,"hide")}},{key:"show",value:function(e){util.removeClass(this.root,"hide")}},{key:"beforeCreate",value:function(e){"string"==typeof e.player.config.poster&&(e.config.poster=e.player.config.poster)}},{key:"afterCreate",value:function(){var e=this;this.on(ENDED,(function(){e.isEndedShow&&util.removeClass(e.root,"hide")})),this.config.hideCanplay?(this.once(TIME_UPDATE,(function(){e.onTimeUpdate()})),this.on(URL_CHANGE,(function(){util.removeClass(e.root,"hide"),util.addClass(e.root,"xg-showplay"),e.once(TIME_UPDATE,(function(){e.onTimeUpdate()}))}))):this.on(PLAY,(function(){util.addClass(e.root,"hide")}))}},{key:"setConfig",value:function(e){var t=this;_Object$keys(e).forEach((function(r){t.config[r]=e[r]}));var r=this.config.poster;this.update(r)}},{key:"onTimeUpdate",value:function(){var e=this;this.player.currentTime?util.removeClass(this.root,"xg-showplay"):this.once(TIME_UPDATE,(function(){e.onTimeUpdate()}))}},{key:"update",value:function(e){e&&(this.config.poster=e,this.root.style.backgroundImage="url(".concat(e,")"))}},{key:"getBgSize",value:function(e){var t="";switch(e){case"cover":t="cover";break;case"contain":t="contain";break;case"fixHeight":t="auto 100%";break;default:t=""}return t?"background-size: ".concat(t,";"):""}},{key:"render",value:function(){var e,t,r=this.config,n=r.poster,i=r.hideCanplay,o=r.fillMode,a=r.notHidden,s=this.getBgSize(o),l=n?_concatInstanceProperty2(e="background-image:url(".concat(n,");")).call(e,s):s;return _concatInstanceProperty2(t='<xg-poster class="xgplayer-poster '.concat(a?"xg-not-hidden":i?"xg-showplay":"",'" style="')).call(t,l,'">\n </xg-poster>')}}],[{key:"pluginName",get:function(){return"poster"}},{key:"defaultConfig",get:function(){return{isEndedShow:!0,hideCanplay:!1,notHidden:!1,poster:"",fillMode:"fixWidth"}}}]),r}();function PlaySvg(){return(new DOMParser).parseFromString('<svg class="play" xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="3 -4 28 40">\n <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M576,363L810,512L576,661zM342,214L576,363L576,661L342,810z"></path>\n</svg>\n',"image/svg+xml").firstChild}function PauseSvg(){return(new DOMParser).parseFromString('<svg class="pause" xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="3 -4 28 40">\n <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M598,214h170v596h-170v-596zM256 810v-596h170v596h-170z"></path>\n</svg>\n',"image/svg+xml").firstChild}var AnimateMap={};function addAnimate(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{start:null,end:null};return AnimateMap[e]&&window.clearTimeout(AnimateMap[e].id),AnimateMap[e]={},r.start&&r.start(),AnimateMap[e].id=window.setTimeout((function(){r.end&&r.end(),window.clearTimeout(AnimateMap[e].id),delete AnimateMap[e]}),t),AnimateMap[e].id}function clearAnimation(e){var t;e?window.clearTimeout(e):_mapInstanceProperty(t=_Object$keys(AnimateMap)).call(t,(function(e){window.clearTimeout(AnimateMap[e].id),delete AnimateMap[e]}))}var Start=function(e){_inherits$1(r,Plugin);var t=_createSuper$1(r);function r(e){var n;return _classCallCheck(this,r),_defineProperty(_assertThisInitialized$1(n=t.call(this,e)),"onPlayerReset",(function(){n.autoPlayStart=!1;var e="auto"===n.config.mode?"auto-hide":"hide";n.setAttr("data-state","play"),util.removeClass(n.root,e),n.show()})),_defineProperty(_assertThisInitialized$1(n),"onAutoplayStart",(function(){if(!n.autoPlayStart){var e="auto"===n.config.mode?"auto-hide":"hide";util.addClass(n.root,e),n.autoPlayStart=!0,n.toggleTo("play")}})),n.autoPlayStart=!1,n}return _createClass(r,[{key:"afterCreate",value:function(){var e=this.playerConfig;this.initIcons(),this.listenEvents(),this.bindClickEvents(),e.autoplay||this.show()}},{key:"listenEvents",value:function(){var e=this,t=this.player,r=this.playerConfig;this.once(READY,(function(){r&&(r.lang&&"en"===r.lang?util.addClass(t.root,"lang-is-en"):"jp"===r.lang&&util.addClass(t.root,"lang-is-jp"))})),this.on(AUTOPLAY_STARTED,this.onAutoplayStart),this.on(AUTOPLAY_PREVENTED,(function(){var t="auto"===e.config.mode?"auto-hide":"hide";e.setAttr("data-state","play"),util.removeClass(e.root,t),e.show()})),this.on(PLAY,(function(){e.toggleTo("play")})),this.on(PAUSE,(function(){e.toggleTo("pause")})),this.on(RESET,(function(){e.onPlayerReset()}))}},{key:"bindClickEvents",value:function(){var e=this;this.clickHandler=this.hook("startClick",this.switchPausePlay,{pre:function(t){t.cancelable&&t.preventDefault(),t.stopPropagation();var r=e.player.paused;e.emitUserAction(t,"switch_play_pause",{props:"paused",from:r,to:!r})}}),this.bind(["click","touchend"],this.clickHandler)}},{key:"registerIcons",value:function(){return{startPlay:{icon:PlaySvg,class:"xg-icon-play"},startPause:{icon:PauseSvg,class:"xg-icon-pause"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild("xg-start-inner",e.startPlay),this.appendChild("xg-start-inner",e.startPause)}},{key:"hide",value:function(){util.addClass(this.root,"hide")}},{key:"show",value:function(e){util.removeClass(this.root,"hide")}},{key:"focusHide",value:function(){util.addClass(this.root,"focus-hide")}},{key:"recover",value:function(){util.removeClass(this.root,"focus-hide")}},{key:"switchStatus",value:function(e){e?this.setAttr("data-state",this.player.paused?"pause":"play"):this.setAttr("data-state",this.player.paused?"play":"pause")}},{key:"animate",value:function(e){var t=this;this._animateId=addAnimate("pauseplay",400,{start:function(){util.addClass(t.root,"interact"),t.show(),t.switchStatus(!0)},end:function(){util.removeClass(t.root,"interact"),!e&&t.hide(),t._animateId=null}})}},{key:"endAnimate",value:function(){util.removeClass(this.root,"interact"),clearAnimation(this._animateId),this._animateId=null}},{key:"switchPausePlay",value:function(e){var t=this.player;(e.cancelable&&e.preventDefault(),e.stopPropagation(),t.state<STATES.READY)||(this.player.paused||t.state!==STATES.RUNNING?t.play():t.pause())}},{key:"onPlayPause",value:function(e){this.toggleTo(e)}},{key:"toggleTo",value:function(e){var t=this.config,r=this.player;if(r&&!(r.state<STATES.RUNNING)&&this.autoPlayStart){if("show"===t.mode)return this.switchStatus(),void this.show();if("auto"!==t.mode){if(t.isShowPause&&r.paused&&!r.ended||t.isShowEnd&&r.ended)return this.switchStatus(),this.show(),void this.endAnimate();if(t.disableAnimate)return this.switchStatus(),void this.hide();if("play"===e)this.autoPlayStart?this.animate():this.hide();else{if(!this.autoPlayStart||r.ended)return;this.animate()}}else this.switchStatus()}}},{key:"destroy",value:function(){this.unbind(["click","touchend"],this.clickHandler),clearAnimation(this._animateId)}},{key:"render",value:function(){var e=this.playerConfig.autoplay?"auto"===this.config.mode?"auto-hide":"hide":"";return'\n <xg-start class="xgplayer-start '.concat(e,'">\n <xg-start-inner></xg-start-inner>\n </xg-start>')}}],[{key:"pluginName",get:function(){return"start"}},{key:"defaultConfig",get:function(){return{isShowPause:!1,isShowEnd:!1,disableAnimate:!1,mode:"hide"}}}]),r}(),Enter=function(e){_inherits$1(r,Plugin);var t=_createSuper$1(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,[{key:"render",value:function(){var e=this.config.innerHtml,t=util.createDom("xg-enter","",{},"xgplayer-enter");if(e&&e instanceof window.HTMLElement)t.appendChild(e);else if(e&&"string"==typeof e)t.innerHTML=e;else{for(var r="",n=1;n<=12;n++)r+='<div class="xgplayer-enter-bar'.concat(n,'"></div>');t.innerHTML='<div class="xgplayer-enter-spinner">'.concat(r,"</div>")}return t}}],[{key:"pluginName",get:function(){return"enter"}},{key:"defaultConfig",get:function(){return{innerHtml:"",logo:""}}}]),r}();function xgIconTips(e,t,r){try{var n,i;return _concatInstanceProperty2(n=_concatInstanceProperty2(i=' <div class="xg-tips '.concat(r?"hide":" ",'" lang-key="')).call(i,e.i18nKeys[t],'">\n ')).call(n,e.i18n[t],"\n </div>")}catch(e){return'<div class="xg-tips hide"></div>'}}var MiniScreenIcon=function(e){_inherits$1(r,Plugin);var t=_createSuper$1(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,[{key:"afterCreate",value:function(){this.getMini=this.getMini.bind(this),this.exitMini=this.exitMini.bind(this),this.bind("click",this.getMini)}},{key:"getMini",value:function(){this.config.onClick&&this.config.onClick()}},{key:"exitMini",value:function(){this.config.onClick&&this.config.onClick()}},{key:"destroy",value:function(){this.unbind(["click","touchend"],this.getMini)}},{key:"render",value:function(){var e,t="MINISCREEN";return _concatInstanceProperty2(e='\n <xg-icon class="xgplayer-miniicon">\n <div class="xgplayer-icon btn-text"><span class="icon-text" lang-key="'.concat(this.i18nKeys[t],'">')).call(e,this.i18n[t],"</span></div>\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"miniscreenIcon"}},{key:"defaultConfig",get:function(){return{position:POSITIONS$1.CONTROLS_RIGHT,index:10}}}]),r}();function getStyleSize(e){var t=_parseFloat2(e);return-1===_indexOfInstanceProperty2(e).call(e,"%")&&!_Number$isNaN(t)&&t}var measurements=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],measurementsLength=measurements.length;function getZeroSize(){for(var e={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},t=0;t<measurementsLength;t++){e[measurements[t]]=0}return e}function getStyle(e){return window.getComputedStyle(e)}function getSize(e){if("string"==typeof e&&(e=document.querySelector(e)),e&&"object"===_typeof(e)&&e.nodeType){var t=getStyle(e);if("none"===t.display)return getZeroSize();var r={};r.width=e.offsetWidth,r.height=e.offsetHeight;for(var n=r.isBorderBox="border-box"===t.boxSizing,i=0;i<measurementsLength;i++){var o=measurements[i],a=t[o],s=_parseFloat2(a);r[o]=_Number$isNaN(s)?0:s}var l=r.paddingLeft+r.paddingRight,c=r.paddingTop+r.paddingBottom,u=r.marginLeft+r.marginRight,p=r.marginTop+r.marginBottom,f=r.borderLeftWidth+r.borderRightWidth,h=r.borderTopWidth+r.borderBottomWidth,d=n,y=getStyleSize(t.width);!1!==y&&(r.width=y+(d?0:l+f));var g=getStyleSize(t.height);return!1!==g&&(r.height=g+(d?0:c+h)),r.innerWidth=r.width-(l+f),r.innerHeight=r.height-(c+h),r.outerWidth=r.width+u,r.outerHeight=r.height+p,r}}function getTouch$1(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(n.identifier===t)return n}}var EVENTS$1={START:"dragStart",MOVE:"dragMove",ENDED:"dragEnded"},POST_START_EVENTS={mousedown:["mousemove","mouseup"],touchstart:["touchmove","touchend","touchcancel"],pointerdown:["pointermove","pointerup","pointercancel"]},Draggabilly=function(e){_inherits$1(r,EventEmitter);var t=_createSuper$1(r);function r(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return _classCallCheck(this,r),(n=t.call(this)).isEnabled=!0,n.isDragging=!1,n.isDown=!1,n.position={},n.downPoint={},n.dragPoint={x:0,y:0},n.startPos={x:0,y:0},n._root=e instanceof Element?e:document.querySelector(e),n._handlerDom=i.handle instanceof Element?i.handle:document.querySelector(i.handle),n._root&&n._handlerDom?(n._bindStartEvent(),n):_possibleConstructorReturn$1(n)}return _createClass(r,[{key:"_bindStartEvent",value:function(){var e,t=this;"ontouchstart"in window?this._startKey="touchstart":this._startKey="mousedown",this["on".concat(this._startKey)]=this["on".concat(this._startKey)].bind(this),this._handlerDom.addEventListener(this._startKey,this["on".concat(this._startKey)]),_mapInstanceProperty(e=POST_START_EVENTS[this._startKey]).call(e,(function(e){t["on".concat(e)]=t["on".concat(e)].bind(t)}))}},{key:"_unbindStartEvent",value:function(){this._handlerDom.removeEventListener(this._startKey,this["on".concat(this._startKey)])}},{key:"_bindPostStartEvents",value:function(e){var t=this;if(e){var r=POST_START_EVENTS[this._startKey];_mapInstanceProperty(r).call(r,(function(e){window.addEventListener(e,t["on".concat(e)])})),this._boundPointerEvents=r}}},{key:"_unbindPostStartEvents",value:function(){var e,t=this;this._boundPointerEvents&&(_mapInstanceProperty(e=this._boundPointerEvents).call(e,(function(e){window.removeEventListener(e,t["on".concat(e)])})),delete this._boundPointerEvents)}},{key:"enable",value:function(){this.isEnabled=!0}},{key:"disable",value:function(){this.isEnabled=!1,this.isDragging&&this.onUp()}},{key:"onDocUp",value:function(e){this.onUp()}},{key:"animate",value:function(){var e=this;this.isDragging&&(this.positionDrag(),window.requestAnimationFrame((function(){e.animate()})))}},{key:"positionDrag",value:function(){var e,t=_concatInstanceProperty2(e="translate3d(".concat(this.dragPoint.x,"px, ")).call(e,this.dragPoint.y,"px, 0)");this._root.style.transform=t,this._root.style.webKitTransform=t}},{key:"setLeftTop",value:function(){this._root.style.left=this.position.x+"px",this._root.style.top=this.position.y+"px"}},{key:"onmousedown",value:function(e){this.dragStart(e,e)}},{key:"onmousemove",value:function(e){this.dragMove(e,e)}},{key:"onmouseup",value:function(e){this.dragEnd(e,e)}},{key:"ontouchstart",value:function(e){var t=e.changedTouches[0];this.dragStart(e,t),this.touchIdentifier=void 0!==t.pointerId?t.pointerId:t.identifier,e.preventDefault()}},{key:"ontouchmove",value:function(e){var t=getTouch$1(e.changedTouches,this.touchIdentifier);t&&this.dragMove(e,t)}},{key:"ontouchend",value:function(e){var t=getTouch$1(e.changedTouches,this.touchIdentifier);t&&this.dragEnd(e,t),e.preventDefault()}},{key:"ontouchcancel",value:function(e){var t=getTouch$1(e.changedTouches,this.touchIdentifier);t&&this.dragCancel(e,t)}},{key:"dragStart",value:function(e,t){if(this._root&&!this.isDown&&this.isEnabled){this.downPoint=t,this.dragPoint.x=0,this.dragPoint.y=0,this._getPosition();var r=getSize(this._root);this.startPos.x=this.position.x,this.startPos.y=this.position.y,this.startPos.maxY=window.innerHeight-r.height,this.startPos.maxX=window.innerWidth-r.width,this.setLeftTop(),this.isDown=!0,this._bindPostStartEvents(e)}}},{key:"dragRealStart",value:function(e,t){this.isDragging=!0,this.animate(),this.emit(EVENTS$1.START,this.startPos)}},{key:"dragEnd",value:function(e,t){this._root&&(this._unbindPostStartEvents(),this.isDragging&&(this._root.style.transform="",this.setLeftTop(),this.emit(EVENTS$1.ENDED)),this.presetInfo())}},{key:"_dragPointerMove",value:function(e,t){var r={x:t.pageX-this.downPoint.pageX,y:t.pageY-this.downPoint.pageY};return!this.isDragging&&this.hasDragStarted(r)&&this.dragRealStart(e,t),r}},{key:"dragMove",value:function(e,t){if(e=e||window.event,this.isDown){var r=this.startPos,n=r.x,i=r.y,o=this._dragPointerMove(e,t),a=o.x,s=o.y;a=this.checkContain("x",a,n),s=this.checkContain("y",s,i),this.position.x=n+a,this.position.y=i+s,this.dragPoint.x=a,this.dragPoint.y=s,this.emit(EVENTS$1.MOVE,this.position)}}},{key:"dragCancel",value:function(e,t){this.dragEnd(e,t)}},{key:"presetInfo",value:function(){this.isDragging=!1,this.startPos={x:0,y:0},this.dragPoint={x:0,y:0},this.isDown=!1}},{key:"destroy",value:function(){this._unbindStartEvent(),this._unbindPostStartEvents(),this.isDragging&&this.dragEnd(),this.removeAllListeners(),this._handlerDom=null}},{key:"hasDragStarted",value:function(e){return Math.abs(e.x)>3||Math.abs(e.y)>3}},{key:"checkContain",value:function(e,t,r){return t+r<0?0-r:"x"===e&&t+r>this.startPos.maxX?this.startPos.maxX-r:"y"===e&&t+r>this.startPos.maxY?this.startPos.maxY-r:t}},{key:"_getPosition",value:function(){var e=window.getComputedStyle(this._root),t=this._getPositionCoord(e.left,"width"),r=this._getPositionCoord(e.top,"height");this.position.x=_Number$isNaN(t)?0:t,this.position.y=_Number$isNaN(r)?0:r,this._addTransformPosition(e)}},{key:"_addTransformPosition",value:function(e){var t=e.transform;if(0===_indexOfInstanceProperty2(t).call(t,"matrix")){var r=t.split(","),n=0===_indexOfInstanceProperty2(t).call(t,"matrix3d")?12:4,i=_parseInt2(r[n],10),o=_parseInt2(r[n+1],10);this.position.x+=i,this.position.y+=o}}},{key:"_getPositionCoord",value:function(e,t){if(-1!==_indexOfInstanceProperty2(e).call(e,"%")){var r=getSize(this._root.parentNode);return r?_parseFloat2(e)/100*r[t]:0}return _parseInt2(e,10)}}]),r}(),MiniScreen=function(e){_inherits$1(r,Plugin);var t=_createSuper$1(r);function r(e){var n;_classCallCheck(this,r),_defineProperty(_assertThisInitialized$1(n=t.call(this,e)),"onCancelClick",(function(e){n.exitMini(),n.isClose=!0})),_defineProperty(_assertThisInitialized$1(n),"onCenterClick",(function(e){var t=_assertThisInitialized$1(n).player;t.paused?t.play():t.pause()})),_defineProperty(_assertThisInitialized$1(n),"onScroll",(function(e){if(!(!window.scrollY&&0!==window.scrollY||Math.abs(window.scrollY-n.pos.scrollY)<50)){var t=_parseInt2(util.getCss(n.player.root,"height"));t+=n.config.scrollTop,n.pos.scrollY=window.scrollY,window.scrollY>t+5?!n.isMini&&!n.isClose&&n.getMini():window.scrollY<=t&&(n.isMini&&n.exitMini(),n.isClose=!1)}})),n.isMini=!1,n.isClose=!1;var i=_assertThisInitialized$1(n).config;return n.pos={left:i.left<0?window.innerWidth-i.width-20:i.left,top:i.top<0?window.innerHeight-i.height-20:i.top,height:n.config.height,width:n.config.width,scrollY:window.scrollY||0},n.lastStyle=null,n}return _createClass(r,[{key:"beforeCreate",value:function(e){"boolean"==typeof e.player.config.mini&&(e.config.isShowIcon=e.player.config.mini)}},{key:"afterCreate",value:function(){var e=this;this.initIcons(),this.on(PAUSE,(function(){e.setAttr("data-state","pause")})),this.on(PLAY,(function(){e.setAttr("data-state","play")}))}},{key:"onPluginsReady",value:function(){var e=this,t=this.player;if(!this.config.disable){if(this.config.isShowIcon){var r={config:{onClick:function(){e.getMini()}}};t.controls.registerPlugin(MiniScreenIcon,r,MiniScreenIcon.pluginName)}var n=util.checkTouchSupport()?"touchend":"click";this.bind(".mini-cancel-btn",n,this.onCancelClick),this.bind(".play-icon",n,this.onCenterClick),this.config.disableDrag||(this._draggabilly=new Draggabilly(this.player.root,{handle:this.root})),this.config.isScrollSwitch&&window.addEventListener("scroll",this.onScroll)}}},{key:"registerIcons",value:function(){return{play:{icon:PlaySvg,class:"xg-icon-play"},pause:{icon:PauseSvg,class:"xg-icon-pause"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".play-icon",e.play),this.appendChild(".play-icon",e.pause)}},{key:"getMini",value:function(){var e,t=this;if(!this.isMini){var r=this.player,n=this.playerConfig,i=this.config.target||this.player.root;this.lastStyle={},util.addClass(r.root,"xgplayer-mini"),_mapInstanceProperty(e=["width","height","top","left"]).call(e,(function(e){t.lastStyle[e]=i.style[e],i.style[e]="".concat(t.pos[e],"px")})),n.fluid&&(i.style["padding-top"]=""),this.emit(MINI_STATE_CHANGE,!0),r.isMini=this.isMini=!0}}},{key:"exitMini",value:function(){var e=this;if(!this.isMini)return!1;var t,r=this.player,n=this.playerConfig,i=this.config.target||this.player.root;(util.removeClass(r.root,"xgplayer-mini"),this.lastStyle)&&_mapInstanceProperty(t=_Object$keys(this.lastStyle)).call(t,(function(t){i.style[t]=e.lastStyle[t]}));this.lastStyle=null,n.fluid&&(r.root.style.width="100%",r.root.style.height="0",r.root.style["padding-top"]="".concat(100*n.height/n.width,"%")),this.emit(MINI_STATE_CHANGE,!1),this.isMini=r.isMini=!1}},{key:"destroy",value:function(){window.removeEventListener("scroll",this.onScroll);var e=util.checkTouchSupport()?"touchend":"click";this.unbind(".mini-cancel-btn",e,this.onCancelClick),this.unbind(".play-icon",e,this.onCenterClick),this._draggabilly&&this._draggabilly.destroy(),this._draggabilly=null,this.exitMini()}},{key:"render",value:function(){if(!this.config.disable)return'\n <xg-mini-layer class="xg-mini-layer">\n <xg-mini-header class="xgplayer-mini-header">\n '.concat(xgIconTips(this,"MINI_DRAG",this.playerConfig.isHideTips),'\n </xg-mini-header>\n <div class="mini-cancel-btn">\n <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">\n <path fill="#fff" fill-rule="evenodd" d="M3.99 3.49a1 1 0 0 1 1.414 0L10 8.085l4.596-4.595a1 1 0 1 1 1.414 1.414L11.414 9.5l4.596 4.596a1 1 0 0 1 .084 1.32l-.084.094a1 1 0 0 1-1.414 0L10 10.914 5.404 15.51a1 1 0 0 1-1.414-1.414L8.585 9.5 3.99 4.904a1 1 0 0 1-.084-1.32z"></path>\n </svg>\n </div>\n <div class="play-icon">\n </div>\n </xg-mini-layer>')}}],[{key:"pluginName",get:function(){return"miniscreen"}},{key:"defaultConfig",get:function(){return{index:10,disable:!1,width:320,height:180,left:-1,top:-1,isShowIcon:!1,isScrollSwitch:!1,scrollTop:0,disableDrag:!1}}}]),r}(),MOUSE_EVENTS={mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mousemove:"onMouseMove"},HOOKS$1=["videoClick","videoDbClick"],PCPlugin=function(e){_inherits$1(r,BasePlugin);var t=_createSuper$1(r);function r(){var e,n;_classCallCheck(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return _defineProperty(_assertThisInitialized$1(n=t.call.apply(t,_concatInstanceProperty2(e=[this]).call(e,o))),"onMouseMove",(function(e){var t=_assertThisInitialized$1(n),r=t.player,i=t.playerConfig;r.isActive||(r.focus({autoHide:!i.closeDelayBlur}),!i.closeFocusVideoFocus&&r.media.focus())})),_defineProperty(_assertThisInitialized$1(n),"onMouseEnter",(function(e){var t=_assertThisInitialized$1(n),r=t.playerConfig,i=t.player;!r.closeFocusVideoFocus&&i.media.focus(),r.closeDelayBlur?i.focus({autoHide:!1}):i.focus(),n.emit(ENTER_PLAYER)})),_defineProperty(_assertThisInitialized$1(n),"onMouseLeave",(function(e){var t=n.playerConfig,r=t.closePlayerBlur,i=t.leavePlayerTime,o=t.closeDelayBlur;r||o||(i?n.player.focus({autoHide:!0,delay:i}):n.player.blur({ignorePaused:!0})),n.emit(LEAVE_PLAYER)})),_defineProperty(_assertThisInitialized$1(n),"onVideoClick",(function(e){var t=_assertThisInitialized$1(n),r=t.player,i=t.playerConfig;e.target&&i.closeVideoClick||e.target!==r.root&&e.target!==r.media&&e.target!==r.innerContainer&&e.target!==r.media.__canvas||(e.preventDefault(),i.closeVideoStopPropagation||e.stopPropagation(),n._clickCount++,n.clickTimer&&(clearTimeout(n.clickTimer),n.clickTimer=null),n.clickTimer=setTimeout((function(){n._clickCount&&(n._clickCount--,runHooks(_assertThisInitialized$1(n),HOOKS$1[0],(function(e,t){n.switchPlayPause(t.e)}),{e:e,paused:r.paused}),clearTimeout(n.clickTimer),n.clickTimer=null)}),300))})),_defineProperty(_assertThisInitialized$1(n),"onVideoDblClick",(function(e){var t=_assertThisInitialized$1(n),r=t.player,i=t.playerConfig;i.closeVideoDblclick||!e.target||e.target!==r.media&&e.target!==r.media.__canvas||(!i.closeVideoClick&&n._clickCount<2?n._clickCount=0:(n._clickCount=0,n.clickTimer&&(clearTimeout(n.clickTimer),n.clickTimer=null),e.preventDefault(),e.stopPropagation(),runHooks(_assertThisInitialized$1(n),HOOKS$1[1],(function(e,t){n.emitUserAction(t.e,"switch_fullscreen",{props:"fullscreen",from:r.fullscreen,to:!r.fullscreen}),r.fullscreen?r.exitFullscreen():r.getFullscreen()}),{e:e,fullscreen:r.fullscreen})))})),n}return _createClass(r,[{key:"afterCreate",value:function(){var e=this;this._clickCount=0,_mapInstanceProperty(HOOKS$1).call(HOOKS$1,(function(t){e.__hooks[t]=null})),"mobile"===this.playerConfig.isMobileSimulateMode||"mobile"===sniffer.device&&!sniffer.os.isIpad||this.initEvents()}},{key:"initEvents",value:function(){var e,t=this,r=this.player,n=r.media,i=r.root,o=this.playerConfig.enableContextmenu;i&&i.addEventListener("click",this.onVideoClick,!1),i&&i.addEventListener("dblclick",this.onVideoDblClick,!1),_mapInstanceProperty(e=_Object$keys(MOUSE_EVENTS)).call(e,(function(e){i.addEventListener(e,t[MOUSE_EVENTS[e]],!1)})),!o&&n&&n.addEventListener("contextmenu",this.onContextmenu,!1)}},{key:"switchPlayPause",value:function(e){var t=this.player;this.emitUserAction(e,"switch_play_pause",{props:"paused",from:t.paused,to:!t.paused}),t.ended?t.duration!==1/0&&t.duration>0&&t.replay():t.paused?t.play():t.pause()}},{key:"onContextmenu",value:function(e){(e=e||window.event).preventDefault&&e.preventDefault(),e.stopPropagation?e.stopPropagation():(e.returnValue=!1,e.cancelBubble=!0)}},{key:"destroy",value:function(){var e,t=this,r=this.player,n=r.video,i=r.root;this.clickTimer&&clearTimeout(this.clickTimer),i.removeEventListener("click",this.onVideoClick,!1),i.removeEventListener("dblclick",this.onVideoDblClick,!1),n.removeEventListener("contextmenu",this.onContextmenu,!1),_mapInstanceProperty(e=_Object$keys(MOUSE_EVENTS)).call(e,(function(e){i.removeEventListener(e,t[MOUSE_EVENTS[e]],!1)}))}}],[{key:"pluginName",get:function(){return"pc"}},{key:"defaultConfig",get:function(){return{}}}]),r}(),EVENTS={PRESS:"press",PRESS_END:"pressend",DOUBlE_CLICK:"doubleclick",CLICK:"click",TOUCH_MOVE:"touchmove",TOUCH_START:"touchstart",TOUCH_END:"touchend"},TOUCHS={start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},MOUSES={start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseleave"};function getTouch(e){return e&&e.length>0?e[e.length-1]:null}function getDefaultConfig(){return{pressDelay:600,dbClickDelay:200,disablePress:!1,disableDbClick:!1,miniStep:2,needPreventDefault:!0}}var Touche=function(){function e(t){var r,n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{eventType:"touch"};_classCallCheck(this,e),_defineProperty(this,"onTouchStart",(function(e){var t=n._pos,r=n.root,i=getTouch(e.touches);t.x=i?_parseInt2(i.pageX,10):e.pageX,t.y=i?_parseInt2(i.pageX,10):e.pageX,t.start=!0,n.__setPress(e),r.addEventListener(n.events.end,n.onTouchEnd),r.addEventListener(n.events.cancel,n.onTouchCancel),r.addEventListener(n.events.move,n.onTouchMove),n.trigger(EVENTS.TOUCH_START,e)})),_defineProperty(this,"onTouchCancel",(function(e){n.onTouchEnd(e)})),_defineProperty(this,"onTouchEnd",(function(e){var t=n._pos,r=n.root;n.__clearPress(),r.removeEventListener(n.events.cancel,n.onTouchCancel),r.removeEventListener(n.events.end,n.onTouchEnd),r.removeEventListener(n.events.move,n.onTouchMove),e.moving=t.moving,e.press=t.press,t.press&&n.trigger(EVENTS.PRESS_END,e),n.trigger(EVENTS.TOUCH_END,e),!t.press&&!t.moving&&n.__setDb(e),t.press=!1,t.start=!1,t.moving=!1})),_defineProperty(this,"onTouchMove",(function(e){var t=n._pos,r=n.config,i=getTouch(e.touches),o=i?_parseInt2(i.pageX,10):e.pageX,a=i?_parseInt2(i.pageY,10):e.pageX,s=o-t.x,l=a-t.y;Math.abs(l)<r.miniStep&&Math.abs(s)<r.miniStep||(n.__clearPress(),t.press&&n.trigger(EVENTS.PRESS_END,e),t.press=!1,t.moving=!0,n.trigger(EVENTS.TOUCH_MOVE,e))})),this._pos={moving:!1,start:!1,x:0,y:0},this.config=getDefaultConfig(),_mapInstanceProperty(r=_Object$keys(i)).call(r,(function(e){n.config[e]=i[e]})),this.root=t,this.events="mouse"===i.eventType?MOUSES:TOUCHS,this.pressIntrvalId=null,this.dbIntrvalId=null,this.__handlers={},this._initEvent()}return _createClass(e,[{key:"_initEvent",value:function(){this.root.addEventListener(this.events.start,this.onTouchStart)}},{key:"__setPress",value:function(e){var t=this,r=this.config;this.pressIntrvalId&&this.__clearPress(),this.pressIntrvalId=setTimeout((function(){t.trigger(EVENTS.PRESS,e),t._pos.press=!0,t.__clearPress()}),r.pressDelay)}},{key:"__clearPress",value:function(){window.clearTimeout(this.pressIntrvalId),this.pressIntrvalId=null}},{key:"__setDb",value:function(e){var t=this,r=this.config;if(this.dbIntrvalId)return this.__clearDb(),void this.trigger(EVENTS.DOUBlE_CLICK,e);this.dbIntrvalId=setTimeout((function(){t.__clearDb(),t._pos.start||t._pos.press||t._pos.moving||t.trigger(EVENTS.CLICK,e)}),r.dbClickDelay)}},{key:"__clearDb",value:function(){clearTimeout(this.dbIntrvalId),this.dbIntrvalId=null}},{key:"on",value:function(e,t){this.__handlers[e]||(this.__handlers[e]=[]),this.__handlers[e].push(t)}},{key:"off",value:function(e,t){if(this.__handlers[e]){for(var r,n=this.__handlers[e],i=-1,o=0;o<n.length;o++)if(n[o]===t){i=o;break}if(i>=0)_spliceInstanceProperty2(r=this.__handlers[e]).call(r,i,1)}}},{key:"trigger",value:function(e,t){var r;this.__handlers[e]&&_mapInstanceProperty(r=this.__handlers[e]).call(r,(function(r){try{r(t)}catch(t){console.error("trigger>>:".concat(e),t)}}))}},{key:"destroy",value:function(){var e=this,t={touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"};_Object$keys(t).forEach((function(r){e.root.removeEventListener(r,e[t[r]])}))}}]),e}();function SeekTipIcon(){return(new DOMParser).parseFromString('<svg width="20" height="9" viewBox="0 0 8 9" fill="none" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <path opacity="0.54"\n d="M7.5 3.63397C8.16667 4.01887 8.16667 4.98113 7.5 5.36603L1.5 8.83013C0.833334 9.21503 0 8.7339 0 7.9641L0 1.0359C0 0.266098 0.833333 -0.215027 1.5 0.169873L7.5 3.63397Z"\n fill="white" />\n <path transform="translate(5 0)" d="M7.5 3.63397C8.16667 4.01887 8.16667 4.98113 7.5 5.36603L1.5 8.83013C0.833334 9.21503 0 8.7339 0 7.9641L0 1.0359C0 0.266098 0.833333 -0.215027 1.5 0.169873L7.5 3.63397Z" fill="white"/>\n</svg>',"image/svg+xml").firstChild}var ACTIONS={AUTO:"auto",SEEKING:"seeking",PLAYBACK:"playbackrate",LIGHT:""},HOOKS=["videoClick","videoDbClick"],MobilePlugin=function(e){_inherits$1(r,Plugin);var t=_createSuper$1(r);function r(e){var n;return _classCallCheck(this,r),_defineProperty(_assertThisInitialized$1(n=t.call(this,e)),"onTouchStart",(function(e){var t=_assertThisInitialized$1(n),r=t.player,i=t.config,o=t.pos,a=t.playerConfig,s=n.getTouche(e);if(s&&!i.disableGesture&&n.duration>0&&!r.ended){o.isStart=!0,n.timer&&clearTimeout(n.timer),util.checkIsFunction(a.disableSwipeHandler)&&a.disableSwipeHandler(),_findInstanceProperty2(n).call(n,".xg-dur").innerHTML=util.format(n.duration);var l=n.root.getBoundingClientRect();90===r.rotateDeg?(o.top=l.left,o.left=l.top,o.width=l.height,o.height=l.width):(o.top=l.top,o.left=l.left,o.width=l.width,o.height=l.height);var c=_parseInt2(s.pageX-o.left,10),u=_parseInt2(s.pageY-o.top,10);o.x=90===r.rotateDeg?u:c,o.y=90===r.rotateDeg?c:u,o.scopeL=i.scopeL*o.width,o.scopeR=(1-i.scopeR)*o.width,o.scopeM1=o.width*(1-i.scopeM)/2,o.scopeM2=o.width-o.scopeM1}})),_defineProperty(_assertThisInitialized$1(n),"onTouchMove",(function(e){var t=n.getTouche(e),r=_assertThisInitialized$1(n),i=r.pos,o=r.config,a=r.player;if(t&&!o.disableGesture&&n.duration&&i.isStart){var s=o.miniMoveStep,l=o.hideControlsActive,c=_parseInt2(t.pageX-i.left,10),u=_parseInt2(t.pageY-i.top,10),p=90===a.rotateDeg?u:c,f=90===a.rotateDeg?c:u;if(Math.abs(p-i.x)>s||Math.abs(f-i.y)>s){var h=p-i.x,d=f-i.y,y=i.scope;if(-1===y&&(0===(y=n.checkScope(p,f,h,d,i))&&(l?a.blur():a.focus({autoHide:!1}),!i.time&&(i.time=_parseInt2(1e3*a.currentTime,10)+1e3*n.timeOffset)),i.scope=y),-1===y||y>0&&!o.gestureY||0===y&&!o.gestureX)return;n.executeMove(h,d,y,i.width,i.height),i.x=p,i.y=f}}})),_defineProperty(_assertThisInitialized$1(n),"onTouchEnd",(function(e){var t=_assertThisInitialized$1(n),r=t.player,i=t.pos,o=t.playerConfig;if(setTimeout((function(){r.getPlugin("progress")&&r.getPlugin("progress").resetSeekState()}),10),i.isStart){i.scope>-1&&e.cancelable&&e.preventDefault();var a=n.config,s=a.disableGesture,l=a.gestureX;!s&&l?n.endLastMove(i.scope):i.time=0,i.scope=-1,n.resetPos(),util.checkIsFunction(o.enableSwipeHandler)&&o.enableSwipeHandler(),n.changeAction(ACTIONS.AUTO)}})),_defineProperty(_assertThisInitialized$1(n),"onRootTouchMove",(function(e){!n.config.disableGesture&&n.config.gestureX&&n.checkIsRootTarget(e)&&(e.stopPropagation(),n.pos.isStart?n.onTouchMove(e):n.onTouchStart(e))})),_defineProperty(_assertThisInitialized$1(n),"onRootTouchEnd",(function(e){n.pos.scope>-1&&n.onTouchEnd(e)})),n.pos={isStart:!1,x:0,y:0,time:0,volume:0,rate:1,light:0,width:0,height:0,scopeL:0,scopeR:0,scopeM1:0,scopeM2:0,scope:-1},n.timer=null,n}return _createClass(r,[{key:"duration",get:function(){return this.playerConfig.customDuration||this.player.duration}},{key:"timeOffset",get:function(){return this.playerConfig.timeOffset||0}},{key:"registerIcons",value:function(){return{seekTipIcon:{icon:SeekTipIcon,class:"xg-seek-pre"}}}},{key:"afterCreate",value:function(){var e,t=this;_mapInstanceProperty(HOOKS).call(HOOKS,(function(e){t.__hooks[e]=null}));var r=this.playerConfig,n=this.config,i=this.player;!0===r.closeVideoDblclick&&(n.closedbClick=!0),this.resetPos(),util.isUndefined(r.disableGesture)||(n.disableGesture=!!r.disableGesture),this.appendChild(".xg-seek-icon",this.icons.seekTipIcon),this.xgMask=util.createDom("xg-mask","",{},"xgmask"),i.root.appendChild(this.xgMask),this.initCustomStyle(),this.registerThumbnail();var o="mouse"===this.domEventType?"mouse":"touch";this.touch=new Touche(this.root,{eventType:o,needPreventDefault:!this.config.disableGesture}),this.root.addEventListener("contextmenu",(function(e){e.preventDefault()})),i.root.addEventListener("touchmove",this.onRootTouchMove,!0),i.root.addEventListener("touchend",this.onRootTouchEnd,!0),i.root.addEventListener("touchcancel",this.onRootTouchEnd,!0);var a=this.player.controls;a&&a.center&&(a.center.addEventListener("touchmove",this.onRootTouchMove,!0),a.center.addEventListener("touchend",this.onRootTouchEnd,!0),a.center.addEventListener("touchcancel",this.onRootTouchEnd,!0)),this.on(DURATION_CHANGE,(function(){var e=t.player,r=t.config;e.duration>0&&1e3*e.duration<r.moveDuration&&(r.moveDuration=1e3*e.duration)})),this.on([CANPLAY,ENDED],(function(){var e=t.pos,r=e.time;!e.isStart&&r>0&&(t.pos.time=0)}));var s={touchstart:"onTouchStart",touchmove:"onTouchMove",touchend:"onTouchEnd",press:"onPress",pressend:"onPressEnd",click:"onClick",doubleclick:"onDbClick"};if(_mapInstanceProperty(e=_Object$keys(s)).call(e,(function(e){t.touch.on(e,(function(r){t[s[e]](r)}))})),!n.disableActive){var l=i.plugins.progress;l&&(l.addCallBack("dragmove",(function(e){t.activeSeekNote(e.currentTime,e.forward)})),["dragend","click"].forEach((function(e){l.addCallBack(e,(function(){t.changeAction(ACTIONS.AUTO)}))})))}}},{key:"registerThumbnail",value:function(){var e=this.player.plugins.thumbnail;if(e&&e.usable){this.thumbnail=e.createThumbnail(null,"mobile-thumbnail");var t=_findInstanceProperty2(this).call(this,".time-preview");t.insertBefore(this.thumbnail,t.children[0])}}},{key:"initCustomStyle",value:function(){var e=(this.playerConfig||{}).commonStyle,t=e.playedColor,r=e.progressColor,n=e.timePreviewStyle,i=e.curTimeColor,o=e.durationColor;t&&(_findInstanceProperty2(this).call(this,".xg-curbar").style.backgroundColor=t);r&&(_findInstanceProperty2(this).call(this,".xg-bar").style.backgroundColor=r);if(n){var a=_findInstanceProperty2(this).call(this,".time-preview");_Object$keys(n).forEach((function(e){a.style[e]=n[e]}))}var s=i||t,l=o;s&&(_findInstanceProperty2(this).call(this,".xg-cur").style.color=s),l&&(_findInstanceProperty2(this).call(this,".xg-dur").style.color=l),this.config.disableTimeProgress&&util.addClass(_findInstanceProperty2(this).call(this,".xg-timebar"),"hide")}},{key:"resetPos",value:function(){var e,t=this;this.pos?(this.pos.isStart=!1,this.pos.scope=-1,_mapInstanceProperty(e=["x","y","width","height","scopeL","scopeR","scopeM1","scopeM2"]).call(e,(function(e){t.pos[e]=0}))):this.pos={isStart:!1,x:0,y:0,volume:0,rate:1,light:0,width:0,height:0,scopeL:0,scopeR:0,scopeM1:0,scopeM2:0,scope:-1,time:0}}},{key:"changeAction",value:function(e){var t=this.player;this.root.setAttribute("data-xg-action",e);var r=t.plugins.start;r&&r.recover()}},{key:"getTouche",value:function(e){this.player.rotateDeg;var t=e.touches&&e.touches.length>0?e.touches[e.touches.length-1]:e;return{pageX:t.pageX,pageY:t.pageY}}},{key:"checkScope",value:function(e,t,r,n,i){var o=i.width,a=-1;if(e<0||e>o)return a;var s=0===n?Math.abs(r):Math.abs(r/n);return Math.abs(r)>0&&s>=1.73&&e>i.scopeM1&&e<i.scopeM2?a=0:(0===Math.abs(r)||s<=.57)&&(a=e<i.scopeL?1:e>i.scopeR?2:3),a}},{key:"executeMove",value:function(e,t,r,n,i){switch(r){case 0:this.updateTime(e/n*this.config.scopeM);break;case 1:this.updateBrightness(t/i);break;case 2:sniffer.os.isIos||this.updateVolume(t/i)}}},{key:"endLastMove",value:function(e){var t=this,r=this.pos,n=this.player,i=this.config,o=(r.time-this.timeOffset)/1e3;if(0===e)n.seek(Number(o).toFixed(1)),i.hideControlsEnd?n.blur():n.focus(),this.timer=setTimeout((function(){t.pos.time=0}),500);this.changeAction(ACTIONS.AUTO)}},{key:"checkIsRootTarget",value:function(e){var t=this.player.plugins||{};return(!t.progress||!t.progress.root.contains(e.target))&&(t.start&&t.start.root.contains(e.target)||t.controls&&t.controls.root.contains(e.target))}},{key:"sendUseAction",value:function(e){var t=this.player.paused;this.emitUserAction(e,"switch_play_pause",{prop:"paused",from:t,to:!t})}},{key:"clickHandler",value:function(e){var t=this.player,r=this.config,n=this.playerConfig;t.state<STATES.RUNNING?n.closeVideoClick||(this.sendUseAction(util.createEvent("click")),t.play()):!r.closedbClick||n.closeVideoClick?t.isActive?t.blur():t.focus():n.closeVideoClick||((t.isActive||r.focusVideoClick)&&(this.sendUseAction(util.createEvent("click")),this.switchPlayPause()),t.focus())}},{key:"dbClickHandler",value:function(e){var t=this.config,r=this.player;!t.closedbClick&&r.state>=STATES.RUNNING&&(this.sendUseAction(util.createEvent("dblclick")),this.switchPlayPause())}},{key:"onClick",value:function(e){var t=this,r=this.player;runHooks(this,HOOKS[0],(function(e,r){t.clickHandler(r.e)}),{e:e,paused:r.paused})}},{key:"onDbClick",value:function(e){var t=this,r=this.player;runHooks(this,HOOKS[1],(function(e,r){t.dbClickHandler(r.e)}),{e:e,paused:r.paused})}},{key:"onPress",value:function(e){var t=this.pos,r=this.config,n=this.player;r.disablePress||(t.rate=this.player.playbackRate,this.emitUserAction("press","change_rate",{prop:"playbackRate",from:n.playbackRate,to:r.pressRate}),n.playbackRate=r.pressRate,this.changeAction(ACTIONS.PLAYBACK))}},{key:"onPressEnd",value:function(e){var t=this.pos,r=this.config,n=this.player;r.disablePress||(this.emitUserAction("pressend","change_rate",{prop:"playbackRate",from:n.playbackRate,to:t.rate}),n.playbackRate=t.rate,t.rate=1,this.changeAction(ACTIONS.AUTO))}},{key:"updateTime",value:function(e){var t=this.player,r=this.config,n=this.player.duration;e=Number(e.toFixed(4));var i=_parseInt2(e*r.moveDuration,10)+this.timeOffset;i=(i+=this.pos.time)<0?0:i>1e3*n?1e3*n-200:i,t.getPlugin("time")&&t.getPlugin("time").updateTime(i/1e3),t.getPlugin("progress")&&t.getPlugin("progress").updatePercent(i/1e3/this.duration,!0),this.activeSeekNote(i/1e3,e>0),r.isTouchingSeek&&t.seek(Number((i-this.timeOffset)/1e3).toFixed(1)),this.pos.time=i}},{key:"updateVolume",value:function(e){this.player.rotateDeg&&(e=-e);var t=this.player,r=this.pos;if(e=_parseInt2(100*e,10),r.volume+=e,!(Math.abs(r.volume)<10)){var n=_parseInt2(10*t.volume,10)-_parseInt2(r.volume/10,10);n=n>10?10:n<1?0:n,t.volume=n/10,r.volume=0}}},{key:"updateBrightness",value:function(e){var t=this.pos,r=this.config,n=this.xgMask;if(r.darkness){this.player.rotateDeg&&(e=-e);var i=t.light+.8*e;i=i>r.maxDarkness?r.maxDarkness:i<0?0:i,n&&(n.style.backgroundColor="rgba(0,0,0,".concat(i,")")),t.light=i}}},{key:"activeSeekNote",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this.player,n=this.config,i=!(this.duration!==1/0&&this.duration>0);if(e&&"number"==typeof e&&!i&&!n.disableActive){e<0?e=0:e>r.duration&&(e=r.duration-.2),this.changeAction(ACTIONS.SEEKING);var o=r.plugins.start;if(o&&o.focusHide(),_findInstanceProperty2(this).call(this,".xg-dur").innerHTML=util.format(this.duration),_findInstanceProperty2(this).call(this,".xg-cur").innerHTML=util.format(e),_findInstanceProperty2(this).call(this,".xg-curbar").style.width="".concat(e/this.duration*100,"%"),t)util.removeClass(_findInstanceProperty2(this).call(this,".xg-seek-show"),"xg-back");else util.addClass(_findInstanceProperty2(this).call(this,".xg-seek-show"),"xg-back");this.updateThumbnails(e)}}},{key:"updateThumbnails",value:function(e){var t=this.player.plugins.thumbnail;t&&t.usable&&this.thumbnail&&t.update(this.thumbnail,e,160,90)}},{key:"switchPlayPause",value:function(){var e=this.player;if(e.state<STATES.ATTACHED)return!1;e.ended||(e.paused?e.play():e.pause())}},{key:"disableGesture",value:function(){this.config.disableGesture=!0}},{key:"enableGesture",value:function(){this.config.disableGesture=!1}},{key:"destroy",value:function(){var e=this.player;this.timer&&clearTimeout(this.timer),this.thumbnail=null,e.root.removeChild(this.xgMask),this.xgMask=null,this.touch&&this.touch.destroy(),this.touch=null,e.root.removeEventListener("touchmove",this.onRootTouchMove,!0),e.root.removeEventListener("touchend",this.onRootTouchEnd,!0),e.root.removeEventListener("touchcancel",this.onRootTouchEnd,!0);var t=this.player.controls;t&&t.center&&(t.center.removeEventListener("touchmove",this.onRootTouchMove,!0),t.center.removeEventListener("touchend",this.onRootTouchEnd,!0),t.center.removeEventListener("touchcancel",this.onRootTouchEnd,!0))}},{key:"render",value:function(){var e,t,r,n="normal"!==this.config.gradient?"gradient ".concat(this.config.gradient):"gradient";return _concatInstanceProperty2(e=_concatInstanceProperty2(t=_concatInstanceProperty2(r='\n <xg-trigger class="trigger">\n <div class="'.concat(n,'"></div>\n <div class="time-preview">\n <div class="xg-seek-show ')).call(r,this.config.disableSeekIcon?" hide-seek-icon":"",'">\n <i class="xg-seek-icon"></i>\n <span class="xg-cur">00:00</span>\n <span class="xg-separator">/</span>\n <span class="xg-dur">00:00</span>\n </div>\n <div class="xg-bar xg-timebar">\n <div class="xg-curbar"></div>\n </div>\n </div>\n <div class="xg-playbackrate xg-top-note">\n <span><i>')).call(t,this.config.pressRate,"X</i>")).call(e,this.i18n.FORWARD,"</span>\n </div>\n </xg-trigger>\n ")}}],[{key:"pluginName",get:function(){return"mobile"}},{key:"defaultConfig",get:function(){return{index:0,disableGesture:!1,gestureX:!0,gestureY:!0,gradient:"normal",isTouchingSeek:!1,miniMoveStep:5,miniYPer:5,scopeL:.25,scopeR:.25,scopeM:.9,pressRate:2,darkness:!0,maxDarkness:.8,disableActive:!1,disableTimeProgress:!1,hideControlsActive:!1,hideControlsEnd:!1,moveDuration:36e4,closedbClick:!1,disablePress:!0,disableSeekIcon:!1,focusVideoClick:!1}}}]),r}(),$$b=_export,repeat$7=stringRepeat;$$b({target:"String",proto:!0},{repeat:repeat$7});var entryVirtual$6=entryVirtual$m,repeat$6=entryVirtual$6("String").repeat,isPrototypeOf$5=objectIsPrototypeOf,method$4=repeat$6,StringPrototype$2=String.prototype,repeat$5=function(e){var t=e.repeat;return"string"==typeof e||e===StringPrototype$2||isPrototypeOf$5(StringPrototype$2,e)&&t===StringPrototype$2.repeat?method$4:t},parent$q=repeat$5,repeat$4=parent$q,parent$p=repeat$4,repeat$3=parent$p,parent$o=repeat$3,repeat$2=parent$o,repeat$1=repeat$2,repeat2=repeat$1,_repeatInstanceProperty=getDefaultExportFromCjs(repeat2);function preventDefault(e){e.preventDefault(),e.returnValue=!1}function isDisableTag(e){var t=e.tagName;return!("INPUT"!==t&&"TEXTAREA"!==t&&!e.isContentEditable)}var Keyboard=function(e){_inherits$1(r,BasePlugin);var t=_createSuper$1(r);function r(){var e,n;_classCallCheck(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return _defineProperty(_assertThisInitialized$1(n=t.call.apply(t,_concatInstanceProperty2(e=[this]).call(e,o))),"onBodyKeyDown",(function(e){if(n.player){var t=e||window.event,r=t.keyCode,i=_assertThisInitialized$1(n),o=i._keyState,a=i.player,s=n.config,l=s.disable,c=s.disableBodyTrigger,u=s.isIgnoreUserActive;l||c||!a.isUserActive&&!u||isDisableTag(t.target)||!n.checkIsVisible()||t.metaKey||t.altKey||t.ctrlKey?o.isBodyKeyDown=!1:(_repeatInstanceProperty(e)||o.isKeyDown||((t.target===document.body||n.config.isGlobalTrigger&&!isDisableTag(t.target))&&n.checkCode(r,!0)&&(o.isBodyKeyDown=!0),document.addEventListener("keyup",n.onBodyKeyUp)),o.isBodyKeyDown&&n.handleKeyDown(t))}})),_defineProperty(_assertThisInitialized$1(n),"onBodyKeyUp",(function(e){n.player&&(document.removeEventListener("keyup",n.onBodyKeyUp),n.handleKeyUp(e))})),_defineProperty(_assertThisInitialized$1(n),"onKeydown",(function(e){if(n.player){var t=e||window.event,r=_assertThisInitialized$1(n)._keyState;if(!_repeatInstanceProperty(t)){if(n.config.disable||n.config.disableRootTrigger||t.metaKey||t.altKey||t.ctrlKey)return;!t||37!==t.keyCode&&!n.checkCode(t.keyCode)||t.target!==n.player.root&&t.target!==n.player.video&&t.target!==n.player.controls.el||(r.isKeyDown=!0),n.player.root.addEventListener("keyup",n.onKeyup)}r.isKeyDown&&n.handleKeyDown(t)}})),_defineProperty(_assertThisInitialized$1(n),"onKeyup",(function(e){n.player&&(n.player.root.removeEventListener("keyup",n.onKeyup),n.handleKeyUp(e))})),n}return _createClass(r,[{key:"mergekeyCodeMap",value:function(){var e,t=this,r=this.config.keyCodeMap;r&&_mapInstanceProperty(e=_Object$keys(r)).call(e,(function(e){var n;t.keyCodeMap[e]?_mapInstanceProperty(n=["keyCode","action","disable","pressAction","disablePress","isBodyTarget"]).call(n,(function(n){r[e][n]&&(t.keyCodeMap[e][n]=r[e][n])})):t.keyCodeMap[e]=r[e]}))}},{key:"afterCreate",value:function(){this.config.disable=!this.playerConfig.keyShortcut;var e="function"==typeof this.config.seekStep?this.config.seekStep(this.player):this.config.seekStep;e&&"number"==typeof e&&(this.seekStep=e),this.keyCodeMap={space:{keyCode:32,action:"playPause",disable:!1,disablePress:!1,noBodyTarget:!1},up:{keyCode:38,action:"upVolume",disable:!1,disablePress:!1,noBodyTarget:!0},down:{keyCode:40,action:"downVolume",disable:!1,disablePress:!1,noBodyTarget:!0},left:{keyCode:37,action:"seekBack",disablePress:!1,disable:!1},right:{keyCode:39,action:"seek",pressAction:"changePlaybackRate",disablePress:!1,disable:!1},esc:{keyCode:27,action:"exitFullscreen",disablePress:!0,disable:!1}},this.mergekeyCodeMap(),this._keyState={isKeyDown:!1,isBodyKeyDown:!1,isPress:!1,tt:0,playbackRate:0},this.player.root.addEventListener("keydown",this.onKeydown),document.addEventListener("keydown",this.onBodyKeyDown)}},{key:"setConfig",value:function(e){var t=this;_Object$keys(e).forEach((function(r){t.config[r]=e[r]}))}},{key:"checkIsVisible",value:function(){if(!this.config.checkVisible)return!0;var e=this.player.root.getBoundingClientRect(),t=e.height,r=e.top,n=e.bottom,i=window.innerHeight;return!(r<0&&r<0-.9*t||n>0&&n-i>.9*t)}},{key:"checkCode",value:function(e,t){var r,n=this,i=!1;return _mapInstanceProperty(r=_Object$keys(this.keyCodeMap)).call(r,(function(r){n.keyCodeMap[r]&&e===n.keyCodeMap[r].keyCode&&!n.keyCodeMap[r].disable&&(i=!t||t&&!n.keyCodeMap[r].noBodyTarget)})),i}},{key:"downVolume",value:function(e){var t=this.player;if(!(t.volume<=0)){var r=_parseFloat2((t.volume-.1).toFixed(1)),n={volume:{from:t.volume,to:r}};this.emitUserAction(e,"change_volume",{props:n}),t.volume=r>=0?r:0}}},{key:"upVolume",value:function(e){var t=this.player;if(!(t.volume>=1)){var r=_parseFloat2((t.volume+.1).toFixed(1)),n={volume:{from:t.volume,to:r}};this.emitUserAction(e,"change_volume",{props:n}),t.volume=r<=1?r:1}}},{key:"seek",value:function(e){var t=this.player,r=t.currentTime,n=t.offsetCurrentTime,i=t.duration,o=t.offsetDuration,a=t.timeSegments,s=n>-1?n:r,l=o||i,c=_repeatInstanceProperty(e)&&this.seekStep>=4?_parseInt2(this.seekStep/2,10):this.seekStep;s+c<=l?s+=c:s=l;var u=util.getCurrentTimeByOffset(s,a),p={currentTime:{from:r,to:u}};this.emitUserAction(e,"seek",{props:p}),this.player.currentTime=u}},{key:"seekBack",value:function(e){var t=this.player,r=t.currentTime,n=t.offsetCurrentTime,i=t.timeSegments,o=(n>-1?n:r)-(_repeatInstanceProperty(e)?_parseInt2(this.seekStep/2,10):this.seekStep);o<0&&(o=0);var a={currentTime:{from:r,to:o=util.getCurrentTimeByOffset(o,i)}};this.emitUserAction(e,"seek",{props:a}),this.player.currentTime=o}},{key:"changePlaybackRate",value:function(e){var t=this._keyState,r=this.config,n=this.player;0===t.playbackRate&&(t.playbackRate=n.playbackRate,n.playbackRate=r.playbackRate)}},{key:"playPause",value:function(e){var t=this.player;t&&(this.emitUserAction(e,"switch_play_pause"),t.paused?t.play():t.pause())}},{key:"exitFullscreen",value:function(e){var t=this.player,r=t.fullscreen,n=t.cssfullscreen;r&&(this.emitUserAction("keyup","switch_fullscreen",{prop:"fullscreen",from:r,to:!r}),t.exitFullscreen()),n&&(this.emitUserAction("keyup","switch_css_fullscreen",{prop:"cssfullscreen",from:n,to:!n}),t.exitCssFullscreen())}},{key:"handleKeyDown",value:function(e){var t=this._keyState;if(_repeatInstanceProperty(e)){t.isPress=!0;var r=Date.now();if(r-t.tt<200)return;t.tt=r}this.handleKeyCode(e.keyCode,e,t.isPress)}},{key:"handleKeyUp",value:function(e){var t=this._keyState;t.playbackRate>0&&(this.player.playbackRate=t.playbackRate,t.playbackRate=0),t.isKeyDown=!1,t.isPress=!1,t.tt=0}},{key:"handleKeyCode",value:function(e,t,r){for(var n=_Object$keys(this.keyCodeMap),i=0;i<n.length;i++){var o=this.keyCodeMap[n[i]],a=o.action,s=o.keyCode,l=o.disable,c=o.pressAction,u=o.disablePress;if(s===e){if(!(l||r&&u)){var p=r&&c||a;"function"==typeof p?a(t,this.player,r):"string"==typeof p&&"function"==typeof this[p]&&this[p](t,this.player,r),this.emit(SHORTCUT,_objectSpread2({key:n[i],target:t.target,isPress:r},this.keyCodeMap[n[i]]))}preventDefault(t),t.stopPropagation();break}}}},{key:"destroy",value:function(){this.player.root.removeEventListener("keydown",this.onKeydown),document.removeEventListener("keydown",this.onBodyKeyDown),this.player.root.removeEventListener("keyup",this.onKeyup),document.removeEventListener("keyup",this.onBodyKeyUp)}},{key:"disable",value:function(){this.config.disable=!0}},{key:"enable",value:function(){this.config.disable=!1}}],[{key:"pluginName",get:function(){return"keyboard"}},{key:"defaultConfig",get:function(){return{seekStep:10,checkVisible:!1,disableBodyTrigger:!1,disableRootTrigger:!1,isGlobalTrigger:!0,keyCodeMap:{},disable:!1,playbackRate:2,isIgnoreUserActive:!0}}}]),r}();function loadingIcon(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="-5 -5 110 110">\n <path d="M100,50A50,50,0,1,1,50,0" stroke-width="5" stroke="#ddd" stroke-dasharray="236" fill="none"></path>\n</svg>\n',"image/svg+xml").firstChild}var Loading=function(e){_inherits$1(r,Plugin);var t=_createSuper$1(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,[{key:"registerIcons",value:function(){return{loadingIcon:loadingIcon}}},{key:"afterCreate",value:function(){this.appendChild("xg-loading-inner",this.icons.loadingIcon)}},{key:"render",value:function(){return'\n <xg-loading class="xgplayer-loading">\n <xg-loading-inner></xg-loading-inner>\n </xg-loading>'}}],[{key:"pluginName",get:function(){return"loading"}},{key:"defaultConfig",get:function(){return{position:POSITIONS$1.ROOT}}}]),r}(),$$a=_export,$findIndex=arrayIteration.findIndex,FIND_INDEX="findIndex",SKIPS_HOLES=!0;FIND_INDEX in[]&&Array(1)[FIND_INDEX]((function(){SKIPS_HOLES=!1})),$$a({target:"Array",proto:!0,forced:SKIPS_HOLES},{findIndex:function(e){return $findIndex(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$5=entryVirtual$m,findIndex$6=entryVirtual$5("Array").findIndex,isPrototypeOf$4=objectIsPrototypeOf,method$3=findIndex$6,ArrayPrototype$3=Array.prototype,findIndex$5=function(e){var t=e.findIndex;return e===ArrayPrototype$3||isPrototypeOf$4(ArrayPrototype$3,e)&&t===ArrayPrototype$3.findIndex?method$3:t},parent$n=findIndex$5,findIndex$4=parent$n,parent$m=findIndex$4,findIndex$3=parent$m,parent$l=findIndex$3,findIndex$2=parent$l,findIndex$1=findIndex$2,findIndex2=findIndex$1,_findIndexInstanceProperty=getDefaultExportFromCjs(findIndex2),Icon=function(e){_inherits$1(r,Plugin);var t=_createSuper$1(r);function r(){var e,n;_classCallCheck(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return _defineProperty(_assertThisInitialized$1(n=t.call.apply(t,_concatInstanceProperty2(e=[this]).call(e,o))),"_onMouseenter",(function(e){n.emit("icon_mouseenter",{pluginName:n.pluginName})})),_defineProperty(_assertThisInitialized$1(n),"_onMouseLeave",(function(e){n.emit("icon_mouseleave",{pluginName:n.pluginName})})),n}return _createClass(r,[{key:"afterCreate",value:function(){this.bind("mouseenter",this._onMouseenter),this.bind("mouseleave",this._onMouseLeave),this.config.disable&&this.disable()}},{key:"destroy",value:function(){this.unbind("mouseenter",this._onMouseenter),this.unbind("mouseleave",this._onMouseLeave)}}]),r}(),Play$1=function(e){_inherits$1(r,Icon);var t=_createSuper$1(r);function r(){var e,n;_classCallCheck(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return _defineProperty(_assertThisInitialized$1(n=t.call.apply(t,_concatInstanceProperty2(e=[this]).call(e,o))),"btnClick",(function(e){e.preventDefault(),e.stopPropagation();var t=_assertThisInitialized$1(n).player;return n.emitUserAction(e,"switch_play_pause",{prop:"paused",from:t.paused,to:!t.paused}),t.ended?t.replay():t.paused?(t.play(),n.animate(!1)):(t.pause(),n.animate(!0)),!1})),n}return _createClass(r,[{key:"afterCreate",value:function(){_get$1(_getPrototypeOf$1(r.prototype),"afterCreate",this).call(this),this.config.disable||(this.initIcons(),this.bind(["touchend","click"],this.btnClick),this.listenEvents(),this.animate(!0))}},{key:"listenEvents",value:function(){var e=this,t=this.player;this.on([PLAY,PAUSE,ERROR,EMPTIED],(function(){e.animate(t.paused)}))}},{key:"registerIcons",value:function(){return{play:{icon:PlaySvg,class:"xg-icon-play"},pause:{icon:PauseSvg,class:"xg-icon-pause"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.play),this.appendChild(".xgplayer-icon",e.pause)}},{key:"animate",value:function(e){if(this.player){var t=this.i18nKeys,r=_findInstanceProperty2(this).call(this,".xg-tips");e?(this.setAttr("data-state","pause"),r&&this.changeLangTextKey(r,t.PLAY_TIPS)):(this.setAttr("data-state","play"),r&&this.changeLangTextKey(r,t.PAUSE_TIPS))}}},{key:"destroy",value:function(){_get$1(_getPrototypeOf$1(r.prototype),"destroy",this).call(this),this.unbind(["touchend","click"],this.btnClick)}},{key:"render",value:function(){if(!this.config.disable)return'<xg-icon class="xgplayer-play">\n <div class="xgplayer-icon">\n </div>\n '.concat(xgIconTips(this,"PLAY_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"play"}},{key:"defaultConfig",get:function(){return{position:POSITIONS$1.CONTROLS_LEFT,index:0,disable:!1}}}]),r}();function BackSVG(){return(new DOMParser).parseFromString('<svg width="32px" height="40px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <path d="M11.2374369,14 L17.6187184,7.61871843 C17.9604272,7.27700968 17.9604272,6.72299032 17.6187184,6.38128157 C17.2770097,6.03957281 16.7229903,6.03957281 16.3812816,6.38128157 L9.38128157,13.3812816 C9.03957281,13.7229903 9.03957281,14.2770097 9.38128157,14.6187184 L16.3812816,21.6187184 C16.7229903,21.9604272 17.2770097,21.9604272 17.6187184,21.6187184 C17.9604272,21.2770097 17.9604272,20.7229903 17.6187184,20.3812816 L11.2374369,14 L11.2374369,14 Z" fill="#FFFFFF"></path>\n </g>\n</svg>',"image/svg+xml").firstChild}var TopBackIcon=function(e){_inherits$1(r,Plugin);var t=_createSuper$1(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,[{key:"afterCreate",value:function(){var e=this;this.initIcons(),this.onClick=function(t){t.preventDefault(),t.stopPropagation(),e.config.onClick(t)},this.bind(["click","touchend"],this.onClick)}},{key:"registerIcons",value:function(){return{screenBack:{icon:BackSVG,class:"xg-fullscreen-back"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(this.root,e.screenBack)}},{key:"show",value:function(){util.addClass(this.root,"show")}},{key:"hide",value:function(){util.removeClass(this.root,"show")}},{key:"render",value:function(){return'<xg-icon class="xgplayer-back">\n </xg-icon>'}}],[{key:"pluginName",get:function(){return"topbackicon"}},{key:"defaultConfig",get:function(){return{position:POSITIONS$1.ROOT_TOP,index:0}}}]),r}();function FullScreenSvg(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="2 -4 28 40">\n <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M598 214h212v212h-84v-128h-128v-84zM726 726v-128h84v212h-212v-84h128zM214 426v-212h212v84h-128v128h-84zM298 598v128h128v84h-212v-212h84z"></path>\n</svg>\n',"image/svg+xml").firstChild}function ExitFullScreenSvg(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="2 -4 28 40">\n <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M682 342h128v84h-212v-212h84v128zM598 810v-212h212v84h-128v128h-84zM342 342v-128h84v212h-212v-84h128zM214 682v-84h212v212h-84v-128h-128z"></path>\n</svg>\n',"image/svg+xml").firstChild}var Fullscreen=function(e){_inherits$1(r,Icon);var t=_createSuper$1(r);function r(){var e,n;_classCallCheck(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return _defineProperty(_assertThisInitialized$1(n=t.call.apply(t,_concatInstanceProperty2(e=[this]).call(e,o))),"_onOrientationChange",(function(e){n.player.fullscreen&&n.config.rotateFullscreen&&(90===window.orientation||-90===window.orientation?n.player.setRotateDeg(0):n.player.setRotateDeg(90))})),n}return _createClass(r,[{key:"afterCreate",value:function(){var e=this;_get$1(_getPrototypeOf$1(r.prototype),"afterCreate",this).call(this);var t=this.config,n=this.playerConfig;if(!t.disable){t.target&&(this.playerConfig.fullscreenTarget=this.config.target);var i=util.getFullScreenEl();n.fullscreenTarget===i&&this.player.getFullscreen().catch((function(e){})),this.initIcons(),this.handleFullscreen=this.hook("fullscreenChange",this.toggleFullScreen,{pre:function(t){var r=e.player.fullscreen;e.emitUserAction(t,"switch_fullscreen",{prop:"fullscreen",from:r,to:!r})}}),this.bind(".xgplayer-fullscreen",["touchend","click"],this.handleFullscreen),this.on(FULLSCREEN_CHANGE,(function(t){var r=_findInstanceProperty2(e).call(e,".xg-tips");r&&e.changeLangTextKey(r,t?e.i18nKeys.EXITFULLSCREEN_TIPS:e.i18nKeys.FULLSCREEN_TIPS),e.animate(t)})),this.config.needBackIcon&&(this.topBackIcon=this.player.registerPlugin({plugin:TopBackIcon,options:{config:{onClick:function(t){e.handleFullscreen(t)}}}})),"mobile"===sniffer.device&&window.addEventListener("orientationchange",this._onOrientationChange)}}},{key:"registerIcons",value:function(){return{fullscreen:{icon:FullScreenSvg,class:"xg-get-fullscreen"},exitFullscreen:{icon:ExitFullScreenSvg,class:"xg-exit-fullscreen"}}}},{key:"destroy",value:function(){_get$1(_getPrototypeOf$1(r.prototype),"destroy",this).call(this),this.unbind(".xgplayer-icon","mobile"===sniffer.device?"touchend":"click",this.handleFullscreen),"mobile"===sniffer.device&&window.removeEventListener("orientationchange",this._onOrientationChange)}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.fullscreen),this.appendChild(".xgplayer-icon",e.exitFullscreen)}},{key:"toggleFullScreen",value:function(e){e instanceof Event&&(e.preventDefault(),e.stopPropagation());var t=this.player,r=this.config;!0===r.useCssFullscreen||"function"==typeof r.useCssFullscreen&&r.useCssFullscreen()?(t.fullscreen?t.exitCssFullscreen():t.getCssFullscreen(),this.animate(t.fullscreen)):r.rotateFullscreen?(t.fullscreen?t.exitRotateFullscreen():t.getRotateFullscreen(),this.animate(t.fullscreen)):r.switchCallback&&"function"==typeof r.switchCallback?r.switchCallback(t.fullscreen):t.fullscreen?(t.exitFullscreen(),r.useScreenOrientation&&this.unlockScreen()):(t.getFullscreen().catch((function(e){})),r.useScreenOrientation&&t.aspectRatio>1&&this.lockScreen(r.lockOrientationType))}},{key:"animate",value:function(e){e?this.setAttr("data-state","full"):this.setAttr("data-state","normal"),this.topBackIcon&&(e?(this.topBackIcon.show(),this.hide()):(this.topBackIcon.hide(),this.show()))}},{key:"render",value:function(){if(!this.config.disable){return'<xg-icon class="xgplayer-fullscreen">\n <div class="xgplayer-icon">\n </div>\n '.concat(xgIconTips(this,"FULLSCREEN_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}},{key:"lockScreen",value:function(e){try{screen.orientation.lock(e).catch((function(e){}))}catch(e){}}},{key:"unlockScreen",value:function(){try{screen.orientation.unlock().catch((function(e){}))}catch(e){}}}],[{key:"pluginName",get:function(){return"fullscreen"}},{key:"defaultConfig",get:function(){return{position:POSITIONS$1.CONTROLS_RIGHT,index:0,useCssFullscreen:!1,rotateFullscreen:!1,useScreenOrientation:!1,lockOrientationType:"landscape",switchCallback:null,target:null,disable:!1,needBackIcon:!1}}}]),r}();function volumeLargeSvg(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="0 -10 28 40">\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M358.4 358.4h-204.8v307.2h204.8l256 256v-819.2l-256 256z"></path>\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M940.632 837.632l-72.192-72.192c65.114-64.745 105.412-154.386 105.412-253.44s-40.299-188.695-105.396-253.424l-0.016-0.016 72.192-72.192c83.639 83.197 135.401 198.37 135.401 325.632s-51.762 242.434-135.381 325.612l-0.020 0.020zM795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021z"></path>\n</svg>\n',"image/svg+xml").firstChild}function volumeSmallSvg(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="0 -10 28 40">\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M358.4 358.4h-204.8v307.2h204.8l256 256v-819.2l-256 256z"></path>\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021zM795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021z"></path>\n</svg>\n',"image/svg+xml").firstChild}function volumeMutedSvg(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="0 -10 28 40">\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M358.4 358.4h-204.8v307.2h204.8l256 256v-819.2l-256 256z"></path>\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M920.4 439.808l-108.544-109.056-72.704 72.704 109.568 108.544-109.056 108.544 72.704 72.704 108.032-109.568 108.544 109.056 72.704-72.704-109.568-108.032 109.056-108.544-72.704-72.704-108.032 109.568z"></path>\n</svg>\n',"image/svg+xml").firstChild}var Volume=function(e){_inherits$1(r,Plugin);var t=_createSuper$1(r);function r(){var e,n;_classCallCheck(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return _defineProperty(_assertThisInitialized$1(n=t.call.apply(t,_concatInstanceProperty2(e=[this]).call(e,o))),"onBarMousedown",(function(e){var t=_assertThisInitialized$1(n).player,r=_findInstanceProperty2(n).call(n,".xgplayer-bar");util.event(e);var i=r.getBoundingClientRect(),o=util.getEventPos(e,t.zoom),a=i.height-(o.clientY-i.top);if(o.h=a,o.barH=i.height,n.pos=o,!(a<-2))return n.updateVolumePos(a,e),document.addEventListener("mouseup",n.onBarMouseUp),n._d.isStart=!0,!1})),_defineProperty(_assertThisInitialized$1(n),"onBarMouseMove",(function(e){var t=_assertThisInitialized$1(n)._d;if(t.isStart){var r=_assertThisInitialized$1(n),i=r.pos,o=r.player;e.preventDefault(),e.stopPropagation(),util.event(e);var a=util.getEventPos(e,o.zoom);t.isMoving=!0;var s=i.h-a.clientY+i.clientY;s>i.barH||n.updateVolumePos(s,e)}})),_defineProperty(_assertThisInitialized$1(n),"onBarMouseUp",(function(e){util.event(e),document.removeEventListener("mouseup",n.onBarMouseUp);var t=_assertThisInitialized$1(n)._d;t.isStart=!1,t.isMoving=!1})),_defineProperty(_assertThisInitialized$1(n),"onMouseenter",(function(e){n._d.isActive=!0,n.focus(),n.emit("icon_mouseenter",{pluginName:n.pluginName})})),_defineProperty(_assertThisInitialized$1(n),"onMouseleave",(function(e){n._d.isActive=!1,n.unFocus(100,!1,e),n.emit("icon_mouseleave",{pluginName:n.pluginName})})),_defineProperty(_assertThisInitialized$1(n),"onVolumeChange",(function(e){if(n.player){var t=n.player,r=t.muted,i=t.volume;n._d.isMoving||(_findInstanceProperty2(n).call(n,".xgplayer-drag").style.height=r||0===i?"4px":"".concat(100*i,"%"),n.config.showValueLabel&&n.updateVolumeValue()),n.animate(r,i)}})),n}return _createClass(r,[{key:"registerIcons",value:function(){return{volumeSmall:{icon:volumeSmallSvg,class:"xg-volume-small"},volumeLarge:{icon:volumeLargeSvg,class:"xg-volume"},volumeMuted:{icon:volumeMutedSvg,class:"xg-volume-mute"}}}},{key:"afterCreate",value:function(){var e=this;if(this._timerId=null,this._d={isStart:!1,isMoving:!1,isActive:!1},!this.config.disable){this.initIcons();var t=this.playerConfig,r=t.commonStyle,n=t.volume;if(r.volumeColor)_findInstanceProperty2(this).call(this,".xgplayer-drag").style.backgroundColor=r.volumeColor;this.changeMutedHandler=this.hook("mutedChange",(function(t){e.changeMuted(t)}),{pre:function(e){e.preventDefault(),e.stopPropagation()}}),this._onMouseenterHandler=this.hook("mouseenter",this.onMouseenter),this._onMouseleaveHandler=this.hook("mouseleave",this.onMouseleave),"mobile"!==sniffer.device&&"mobile"!==this.playerConfig.isMobileSimulateMode&&(this.bind("mouseenter",this._onMouseenterHandler),this.bind(["blur","mouseleave"],this._onMouseleaveHandler),this.bind(".xgplayer-slider","mousedown",this.onBarMousedown),this.bind(".xgplayer-slider","mousemove",this.onBarMouseMove),this.bind(".xgplayer-slider","mouseup",this.onBarMouseUp)),this.bind(".xgplayer-icon",["touchend","click"],this.changeMutedHandler),this.on(VOLUME_CHANGE,this.onVolumeChange),this.once(LOADED_DATA,this.onVolumeChange),"Number"!==util.typeOf(n)&&(this.player.volume=this.config.default),this.onVolumeChange()}}},{key:"updateVolumePos",value:function(e,t){var r=this.player,n=_findInstanceProperty2(this).call(this,".xgplayer-drag"),i=_findInstanceProperty2(this).call(this,".xgplayer-bar");if(i&&n){var o=_parseInt2(e/i.getBoundingClientRect().height*1e3,10);n.style.height="".concat(e,"px");var a=Math.max(Math.min(o/1e3,1),0),s={volume:{from:r.volume,to:a}};r.muted&&(s.muted={from:!0,to:!1}),this.emitUserAction(t,"change_volume",{muted:r.muted,volume:r.volume,props:s}),r.volume=Math.max(Math.min(o/1e3,1),0),r.muted&&(r.muted=!1),this.config.showValueLabel&&this.updateVolumeValue()}}},{key:"updateVolumeValue",value:function(){var e=this.player,t=e.volume,r=e.muted,n=_findInstanceProperty2(this).call(this,".xgplayer-value-label"),i=Math.max(Math.min(t,1),0);n.innerText=r?0:Math.round(100*i)}},{key:"focus",value:function(){this.player.focus({autoHide:!1}),this._timerId&&(util.clearTimeout(this,this._timerId),this._timerId=null),util.addClass(this.root,"slide-show")}},{key:"unFocus",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,i=this._d,o=this.player;i.isActive||(this._timerId&&(util.clearTimeout(this,this._timerId),this._timerId=null),this._timerId=util.setTimeout(this,(function(){i.isActive||(r?o.blur():o.focus(),util.removeClass(e.root,"slide-show"),i.isStart&&e.onBarMouseUp(n)),e._timerId=null}),t))}},{key:"changeMuted",value:function(e){e&&e.stopPropagation();var t=this.player;this._d.isStart&&this.onBarMouseUp(e),this.emitUserAction(e,"change_muted",{muted:t.muted,volume:t.volume,props:{muted:{from:t.muted,to:!t.muted}}}),t.volume>0&&(t.muted=!t.muted),t.volume<.01&&(t.volume=this.config.miniVolume)}},{key:"animate",value:function(e,t){e||0===t?this.setAttr("data-state","mute"):t<.5&&this.icons.volumeSmall?this.setAttr("data-state","small"):this.setAttr("data-state","normal")}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.volumeSmall),this.appendChild(".xgplayer-icon",e.volumeLarge),this.appendChild(".xgplayer-icon",e.volumeMuted)}},{key:"destroy",value:function(){this._timerId&&(util.clearTimeout(this,this._timerId),this._timerId=null),this.unbind("mouseenter",this.onMouseenter),this.unbind(["blur","mouseleave"],this.onMouseleave),this.unbind(".xgplayer-slider","mousedown",this.onBarMousedown),this.unbind(".xgplayer-slider","mousemove",this.onBarMouseMove),this.unbind(".xgplayer-slider","mouseup",this.onBarMouseUp),document.removeEventListener("mouseup",this.onBarMouseUp),this.unbind(".xgplayer-icon","mobile"===sniffer.device?"touchend":"click",this.changeMutedHandler)}},{key:"render",value:function(){var e;if(!this.config.disable){var t=this.config.default||this.player.volume,r=this.config.showValueLabel;return _concatInstanceProperty2(e='\n <xg-icon class="xgplayer-volume" data-state="normal">\n <div class="xgplayer-icon">\n </div>\n <xg-slider class="xgplayer-slider">\n '.concat(r?'<div class="xgplayer-value-label">'.concat(100*t,"</div>"):"",'\n <div class="xgplayer-bar">\n <xg-drag class="xgplayer-drag" style="height: ')).call(e,100*t,'%"></xg-drag>\n </div>\n </xg-slider>\n </xg-icon>')}}}],[{key:"pluginName",get:function(){return"volume"}},{key:"defaultConfig",get:function(){return{position:POSITIONS$1.CONTROLS_RIGHT,index:1,disable:!1,showValueLabel:!1,default:.6,miniVolume:.2}}}]),r}();function PipIcon(){return(new DOMParser).parseFromString('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M16.5 4.3H3.5C3.38954 4.3 3.3 4.38954 3.3 4.5V15.5C3.3 15.6105 3.38954 15.7 3.5 15.7H8.50005L8.50006 17.5H3.5C2.39543 17.5 1.5 16.6046 1.5 15.5V4.5C1.5 3.39543 2.39543 2.5 3.5 2.5H16.5C17.6046 2.5 18.5 3.39543 18.5 4.5V8.5H16.7V4.5C16.7 4.38954 16.6105 4.3 16.5 4.3ZM12 11.5C11.4477 11.5 11 11.9477 11 12.5L11 16.5C11 17.0523 11.4478 17.5 12 17.5H17.5C18.0523 17.5 18.5 17.0523 18.5 16.5L18.5 12.5C18.5 11.9477 18.0523 11.5 17.5 11.5H12Z"\n fill="white" />\n</svg>',"image/svg+xml").firstChild}function PipIconExit(){return(new DOMParser).parseFromString('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M16.5 4.3H3.5C3.38954 4.3 3.3 4.38954 3.3 4.5V15.5C3.3 15.6105 3.38954 15.7 3.5 15.7H8.50005L8.50006 17.5H3.5C2.39543 17.5 1.5 16.6046 1.5 15.5V4.5C1.5 3.39543 2.39543 2.5 3.5 2.5H16.5C17.6046 2.5 18.5 3.39543 18.5 4.5V8.5H16.7V4.5C16.7 4.38954 16.6105 4.3 16.5 4.3ZM12 11.5C11.4477 11.5 11 11.9477 11 12.5L11 16.5C11 17.0523 11.4478 17.5 12 17.5H17.5C18.0523 17.5 18.5 17.0523 18.5 16.5L18.5 12.5C18.5 11.9477 18.0523 11.5 17.5 11.5H12Z"\n fill="white" />\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M9.4998 7.7C9.77595 7.7 9.9998 7.47614 9.9998 7.2V6.5C9.9998 6.22386 9.77595 6 9.4998 6H5.5402L5.52754 6.00016H5.5C5.22386 6.00016 5 6.22401 5 6.50016V10.4598C5 10.7359 5.22386 10.9598 5.5 10.9598H6.2C6.47614 10.9598 6.7 10.7359 6.7 10.4598V8.83005L8.76983 10.9386C8.96327 11.1357 9.27984 11.1386 9.47691 10.9451L9.97645 10.4548C10.1735 10.2613 10.1764 9.94476 9.983 9.7477L7.97289 7.7H9.4998Z"\n fill="white" />\n</svg>',"image/svg+xml").firstChild}var PresentationMode={PIP:"picture-in-picture",INLINE:"inline",FULLSCREEN:"fullscreen"},PIP=function(e){_inherits$1(r,Icon);var t=_createSuper$1(r);function r(){var e,n;_classCallCheck(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return _defineProperty(_assertThisInitialized$1(n=t.call.apply(t,_concatInstanceProperty2(e=[this]).call(e,o))),"switchPIP",(function(e){if(!n.isPIPAvailable())return!1;e.stopPropagation&&e.stopPropagation(),n.isPip?(n.exitPIP(),n.emitUserAction(e,"change_pip",{props:"pip",from:!0,to:!1}),n.setAttr("data-state","normal")):4===n.player.media.readyState&&(n.requestPIP(),n.emitUserAction(e,"change_pip",{props:"pip",from:!1,to:!0}),n.setAttr("data-state","pip"))})),n}return _createClass(r,[{key:"beforeCreate",value:function(e){"boolean"==typeof e.player.config.pip&&(e.config.showIcon=e.player.config.pip)}},{key:"afterCreate",value:function(){var e=this;this.isPIPAvailable()&&(_get$1(_getPrototypeOf$1(r.prototype),"afterCreate",this).call(this),this.pMode=PresentationMode.INLINE,this.initPipEvents(),this.config.showIcon&&this.initIcons(),this.once(COMPLETE,(function(){e.config.showIcon&&(util.removeClass(_findInstanceProperty2(e).call(e,".xgplayer-icon"),"xg-icon-disable"),e.bind("click",e.switchPIP))})))}},{key:"registerIcons",value:function(){return{pipIcon:{icon:PipIcon,class:"xg-get-pip"},pipIconExit:{icon:PipIconExit,class:"xg-exit-pip"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.pipIcon),this.appendChild(".xgplayer-icon",e.pipIconExit)}},{key:"initPipEvents",value:function(){var e=this,t=this.player;this.leavePIPCallback=function(){var r=t.paused;util.setTimeout(e,(function(){!r&&t.mediaPlay()}),0),!r&&t.mediaPlay(),e.setAttr("data-state","normal"),e.pipWindow=null,t.emit(PIP_CHANGE,!1)},this.enterPIPCallback=function(r){t.emit(PIP_CHANGE,!0),null!=r&&r.pictureInPictureWindow&&(e.pipWindow=r.pictureInPictureWindow),e.setAttr("data-state","pip")},this.onWebkitpresentationmodechanged=function(r){var n=t.media.webkitPresentationMode;e.pMode===PresentationMode.FULLSCREEN&&n!==PresentationMode.FULLSCREEN&&t.onFullscreenChange(null,!1),e.pMode=n,n===PresentationMode.PIP?e.enterPIPCallback(r):n===PresentationMode.INLINE&&e.leavePIPCallback(r)},t.media&&(t.media.addEventListener("enterpictureinpicture",this.enterPIPCallback),t.media.addEventListener("leavepictureinpicture",this.leavePIPCallback),r.checkWebkitSetPresentationMode(t.media)&&t.media.addEventListener("webkitpresentationmodechanged",this.onWebkitpresentationmodechanged))}},{key:"copyStyleIntoPiPWindow",value:function(e){var t,r,n=_filterInstanceProperty2(t=_mapInstanceProperty(r=_toConsumableArray(document.styleSheets)).call(r,(function(t){try{var r;return _mapInstanceProperty(r=_toConsumableArray(t.cssRules)).call(r,(function(e){return e.cssText})).join("")}catch(r){var n=document.createElement("link");n.rel="stylesheet",n.type=t.type,n.media=t.media,n.href=t.href,e.document.head.appendChild(n)}return""}))).call(t,Boolean).join("\n"),i=document.createElement("style");i.textContent=n,e.document.head.appendChild(i)}},{key:"requestPIP",value:function(){var e=this,t=this.player,n=this.playerConfig,i=this.config;if(this.isPIPAvailable()&&!this.isPip)try{var o=n.poster;if(o&&(t.media.poster="String"===util.typeOf(o)?o:o.poster),i.preferDocument&&this.isDocPIPAvailable()){var a={};if(i.width&&i.height)a.width=i.width,a.height=i.height;else{var s=t.root.getBoundingClientRect();a.width=s.width,a.height=s.height}documentPictureInPicture.requestWindow(a).then((function(r){var n=i.docPiPNode,o=i.docPiPStyle;e.enterPIPCallback();var a=n||t.root,s=a.parentElement,l=a.previousSibling,c=a.nextSibling;e.copyStyleIntoPiPWindow(r);var u=document.createElement("style");if(u.append("body{padding:0; margin:0;}"),o){var p="";"string"==typeof o?p=o:"function"==typeof o&&(p=o.call(i)),p&&u.append(p)}else a===t.root&&u.append("\n .xgplayer{width: 100%!important; height: 100%!important;}\n ");r.document.head.append(u),r.document.body.append(a),r.addEventListener("pagehide",(function(t){s&&(c?s.insertBefore(a,c):l?s.insertBefore(a,l.nextSibling):s.appendChild(a)),e.leavePIPCallback()}),{once:!0})}))}else r.checkWebkitSetPresentationMode(t.media)?t.media.webkitSetPresentationMode("picture-in-picture"):t.media.requestPictureInPicture();return!0}catch(e){return console.error("requestPiP",e),!1}}},{key:"exitPIP",value:function(){var e=this.player;try{var t;if(this.isPIPAvailable()&&this.isPip)this.isDocPIPAvailable()&&null!==(t=documentPictureInPicture)&&void 0!==t&&t.window?documentPictureInPicture.window.close():r.checkWebkitSetPresentationMode(e.media)?e.media.webkitSetPresentationMode("inline"):document.exitPictureInPicture();return!0}catch(e){return console.error("exitPIP",e),!1}}},{key:"isPip",get:function(){var e,t=this.player;return!(!this.isDocPIPAvailable()||null===(e=documentPictureInPicture)||void 0===e||!e.window)||document.pictureInPictureElement&&document.pictureInPictureElement===t.media||t.media.webkitPresentationMode===PresentationMode.PIP}},{key:"isPIPAvailable",value:function(){var e=this.player.media;return"Boolean"===util.typeOf(document.pictureInPictureEnabled)&&document.pictureInPictureEnabled&&("Boolean"===util.typeOf(e.disablePictureInPicture)&&!e.disablePictureInPicture||e.webkitSupportsPresentationMode&&"Function"===util.typeOf(e.webkitSetPresentationMode))||this.isDocPIPAvailable()}},{key:"isDocPIPAvailable",value:function(){return"documentPictureInPicture"in window&&/^(https|file)/.test(location.protocol)}},{key:"destroy",value:function(){_get$1(_getPrototypeOf$1(r.prototype),"destroy",this).call(this);var e=this.player;e.media.removeEventListener("enterpictureinpicture",this.enterPIPCallback),e.media.removeEventListener("leavepictureinpicture",this.leavePIPCallback),r.checkWebkitSetPresentationMode(e.media)&&e.media.removeEventListener("webkitpresentationmodechanged",this.onWebkitpresentationmodechanged),this.exitPIP(),this.unbind("click",this.btnClick)}},{key:"render",value:function(){if(this.config.showIcon&&this.isPIPAvailable())return'<xg-icon class="xgplayer-pip">\n <div class="xgplayer-icon xg-icon-disable">\n </div>\n '.concat(xgIconTips(this,"PIP",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"pip"}},{key:"defaultConfig",get:function(){return{position:POSITIONS$1.CONTROLS_RIGHT,index:6,showIcon:!1,preferDocument:!1,width:void 0,height:void 0,docPiPNode:void 0,docPiPStyle:void 0}}},{key:"checkWebkitSetPresentationMode",value:function(e){return"function"==typeof e.webkitSetPresentationMode}}]),r}(),fails$2=fails$A,wellKnownSymbol$3=wellKnownSymbol$q,DESCRIPTORS$3=descriptors,IS_PURE=isPure,ITERATOR$1=wellKnownSymbol$3("iterator"),urlConstructorDetection=!fails$2((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),IS_PURE&&!e.toJSON||!t.size&&(IS_PURE||!DESCRIPTORS$3)||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[ITERATOR$1]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),uncurryThis$5=functionUncurryThis,maxInt=2147483647,base=36,tMin=1,tMax=26,skew=38,damp=700,initialBias=72,initialN=128,delimiter="-",regexNonASCII=/[^\0-\u007E]/,regexSeparators=/[.\u3002\uFF0E\uFF61]/g,OVERFLOW_ERROR="Overflow: input needs wider integers to process",baseMinusTMin=base-tMin,$RangeError=RangeError,exec$1=uncurryThis$5(regexSeparators.exec),floor$1=Math.floor,fromCharCode=String.fromCharCode,charCodeAt=uncurryThis$5("".charCodeAt),join$2=uncurryThis$5([].join),push$3=uncurryThis$5([].push),replace$2=uncurryThis$5("".replace),split$2=uncurryThis$5("".split),toLowerCase$1=uncurryThis$5("".toLowerCase),ucs2decode=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=charCodeAt(e,r++);if(i>=55296&&i<=56319&&r<n){var o=charCodeAt(e,r++);56320==(64512&o)?push$3(t,((1023&i)<<10)+(1023&o)+65536):(push$3(t,i),r--)}else push$3(t,i)}return t},digitToBasic=function(e){return e+22+75*(e<26)},adapt=function(e,t,r){var n=0;for(e=r?floor$1(e/damp):e>>1,e+=floor$1(e/t);e>baseMinusTMin*tMax>>1;)e=floor$1(e/baseMinusTMin),n+=base;return floor$1(n+(baseMinusTMin+1)*e/(e+skew))},encode=function(e){var t,r,n=[],i=(e=ucs2decode(e)).length,o=initialN,a=0,s=initialBias;for(t=0;t<e.length;t++)(r=e[t])<128&&push$3(n,fromCharCode(r));var l=n.length,c=l;for(l&&push$3(n,delimiter);c<i;){var u=maxInt;for(t=0;t<e.length;t++)(r=e[t])>=o&&r<u&&(u=r);var p=c+1;if(u-o>floor$1((maxInt-a)/p))throw $RangeError(OVERFLOW_ERROR);for(a+=(u-o)*p,o=u,t=0;t<e.length;t++){if((r=e[t])<o&&++a>maxInt)throw $RangeError(OVERFLOW_ERROR);if(r==o){for(var f=a,h=base;;){var d=h<=s?tMin:h>=s+tMax?tMax:h-s;if(f<d)break;var y=f-d,g=base-d;push$3(n,fromCharCode(digitToBasic(d+y%g))),f=floor$1(y/g),h+=base}push$3(n,fromCharCode(digitToBasic(f))),s=adapt(a,p,c==l),a=0,c++}}a++,o++}return join$2(n,"")},stringPunycodeToAscii=function(e){var t,r,n=[],i=split$2(replace$2(toLowerCase$1(e),regexSeparators,"."),".");for(t=0;t<i.length;t++)r=i[t],push$3(n,exec$1(regexNonASCII,r)?"xn--"+encode(r):r);return join$2(n,".")},$$9=_export,global$2=global$o,call=functionCall,uncurryThis$4=functionUncurryThis,DESCRIPTORS$2=descriptors,USE_NATIVE_URL$2=urlConstructorDetection,defineBuiltIn$1=defineBuiltIn$8,defineBuiltInAccessor$1=defineBuiltInAccessor$5,defineBuiltIns=defineBuiltIns$2,setToStringTag$1=setToStringTag$9,createIteratorConstructor=iteratorCreateConstructor,InternalStateModule$1=internalState,anInstance$1=anInstance$5,isCallable=isCallable$p,hasOwn$1=hasOwnProperty_1,bind$1=functionBindContext,classof$1=classof$d,anObject=anObject$g,isObject$2=isObject$m,$toString$1=toString$f,create4=objectCreate$1,createPropertyDescriptor=createPropertyDescriptor$8,getIterator=getIterator$3,getIteratorMethod=getIteratorMethod$a,validateArgumentsLength$2=validateArgumentsLength$4,wellKnownSymbol$2=wellKnownSymbol$q,arraySort=arraySort$1,ITERATOR=wellKnownSymbol$2("iterator"),URL_SEARCH_PARAMS="URLSearchParams",URL_SEARCH_PARAMS_ITERATOR=URL_SEARCH_PARAMS+"Iterator",setInternalState$1=InternalStateModule$1.set,getInternalParamsState=InternalStateModule$1.getterFor(URL_SEARCH_PARAMS),getInternalIteratorState=InternalStateModule$1.getterFor(URL_SEARCH_PARAMS_ITERATOR),getOwnPropertyDescriptor5=Object.getOwnPropertyDescriptor,safeGetBuiltIn=function(e){if(!DESCRIPTORS$2)return global$2[e];var t=getOwnPropertyDescriptor5(global$2,e);return t&&t.value},nativeFetch=safeGetBuiltIn("fetch"),NativeRequest=safeGetBuiltIn("Request"),Headers=safeGetBuiltIn("Headers"),RequestPrototype=NativeRequest&&NativeRequest.prototype,HeadersPrototype=Headers&&Headers.prototype,RegExp$1=global$2.RegExp,TypeError$2=global$2.TypeError,decodeURIComponent=global$2.decodeURIComponent,encodeURIComponent$1=global$2.encodeURIComponent,charAt$1=uncurryThis$4("".charAt),join$1=uncurryThis$4([].join),push$2=uncurryThis$4([].push),replace$1=uncurryThis$4("".replace),shift$1=uncurryThis$4([].shift),splice2=uncurryThis$4([].splice),split$1=uncurryThis$4("".split),stringSlice$2=uncurryThis$4("".slice),plus=/\+/g,sequences=Array(4),percentSequence=function(e){return sequences[e-1]||(sequences[e-1]=RegExp$1("((?:%[\\da-f]{2}){"+e+"})","gi"))},percentDecode=function(e){try{return decodeURIComponent(e)}catch(t){return e}},deserialize=function(e){var t=replace$1(e,plus," "),r=4;try{return decodeURIComponent(t)}catch(e){for(;r;)t=replace$1(t,percentSequence(r--),percentDecode);return t}},find3=/[!'()~]|%20/g,replacements={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},replacer=function(e){return replacements[e]},serialize=function(e){return replace$1(encodeURIComponent$1(e),find3,replacer)},URLSearchParamsIterator=createIteratorConstructor((function(e,t){setInternalState$1(this,{type:URL_SEARCH_PARAMS_ITERATOR,iterator:getIterator(getInternalParamsState(e).entries),kind:t})}),"Iterator",(function(){var e=getInternalIteratorState(this),t=e.kind,r=e.iterator.next(),n=r.value;return r.done||(r.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),r}),!0),URLSearchParamsState=function(e){this.entries=[],this.url=null,void 0!==e&&(isObject$2(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===charAt$1(e,0)?stringSlice$2(e,1):e:$toString$1(e)))};URLSearchParamsState.prototype={type:URL_SEARCH_PARAMS,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,o,a,s,l=getIteratorMethod(e);if(l)for(r=(t=getIterator(e,l)).next;!(n=call(r,t)).done;){if(o=(i=getIterator(anObject(n.value))).next,(a=call(o,i)).done||(s=call(o,i)).done||!call(o,i).done)throw TypeError$2("Expected sequence with length 2");push$2(this.entries,{key:$toString$1(a.value),value:$toString$1(s.value)})}else for(var c in e)hasOwn$1(e,c)&&push$2(this.entries,{key:c,value:$toString$1(e[c])})},parseQuery:function(e){if(e)for(var t,r,n=split$1(e,"&"),i=0;i<n.length;)(t=n[i++]).length&&(r=split$1(t,"="),push$2(this.entries,{key:deserialize(shift$1(r)),value:deserialize(join$1(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],push$2(r,serialize(e.key)+"="+serialize(e.value));return join$1(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var URLSearchParamsConstructor=function(){anInstance$1(this,URLSearchParamsPrototype);var e=setInternalState$1(this,new URLSearchParamsState(arguments.length>0?arguments[0]:void 0));DESCRIPTORS$2||(this.length=e.entries.length)},URLSearchParamsPrototype=URLSearchParamsConstructor.prototype;if(defineBuiltIns(URLSearchParamsPrototype,{append:function(e,t){validateArgumentsLength$2(arguments.length,2);var r=getInternalParamsState(this);push$2(r.entries,{key:$toString$1(e),value:$toString$1(t)}),DESCRIPTORS$2||this.length++,r.updateURL()},delete:function(e){validateArgumentsLength$2(arguments.length,1);for(var t=getInternalParamsState(this),r=t.entries,n=$toString$1(e),i=0;i<r.length;)r[i].key===n?splice2(r,i,1):i++;DESCRIPTORS$2||(this.length=r.length),t.updateURL()},get:function(e){validateArgumentsLength$2(arguments.length,1);for(var t=getInternalParamsState(this).entries,r=$toString$1(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){validateArgumentsLength$2(arguments.length,1);for(var t=getInternalParamsState(this).entries,r=$toString$1(e),n=[],i=0;i<t.length;i++)t[i].key===r&&push$2(n,t[i].value);return n},has:function(e){validateArgumentsLength$2(arguments.length,1);for(var t=getInternalParamsState(this).entries,r=$toString$1(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){validateArgumentsLength$2(arguments.length,1);for(var r,n=getInternalParamsState(this),i=n.entries,o=!1,a=$toString$1(e),s=$toString$1(t),l=0;l<i.length;l++)(r=i[l]).key===a&&(o?splice2(i,l--,1):(o=!0,r.value=s));o||push$2(i,{key:a,value:s}),DESCRIPTORS$2||(this.length=i.length),n.updateURL()},sort:function(){var e=getInternalParamsState(this);arraySort(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=getInternalParamsState(this).entries,n=bind$1(e,arguments.length>1?arguments[1]:void 0),i=0;i<r.length;)n((t=r[i++]).value,t.key,this)},keys:function(){return new URLSearchParamsIterator(this,"keys")},values:function(){return new URLSearchParamsIterator(this,"values")},entries:function(){return new URLSearchParamsIterator(this,"entries")}},{enumerable:!0}),defineBuiltIn$1(URLSearchParamsPrototype,ITERATOR,URLSearchParamsPrototype.entries,{name:"entries"}),defineBuiltIn$1(URLSearchParamsPrototype,"toString",(function(){return getInternalParamsState(this).serialize()}),{enumerable:!0}),DESCRIPTORS$2&&defineBuiltInAccessor$1(URLSearchParamsPrototype,"size",{get:function(){return getInternalParamsState(this).entries.length},configurable:!0,enumerable:!0}),setToStringTag$1(URLSearchParamsConstructor,URL_SEARCH_PARAMS),$$9({global:!0,constructor:!0,forced:!USE_NATIVE_URL$2},{URLSearchParams:URLSearchParamsConstructor}),!USE_NATIVE_URL$2&&isCallable(Headers)){var headersHas=uncurryThis$4(HeadersPrototype.has),headersSet=uncurryThis$4(HeadersPrototype.set),wrapRequestOptions=function(e){if(isObject$2(e)){var t,r=e.body;if(classof$1(r)===URL_SEARCH_PARAMS)return t=e.headers?new Headers(e.headers):new Headers,headersHas(t,"content-type")||headersSet(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),create4(e,{body:createPropertyDescriptor(0,$toString$1(r)),headers:createPropertyDescriptor(0,t)})}return e};if(isCallable(nativeFetch)&&$$9({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return nativeFetch(e,arguments.length>1?wrapRequestOptions(arguments[1]):{})}}),isCallable(NativeRequest)){var RequestConstructor=function(e){return anInstance$1(this,RequestPrototype),new NativeRequest(e,arguments.length>1?wrapRequestOptions(arguments[1]):{})};RequestPrototype.constructor=RequestConstructor,RequestConstructor.prototype=RequestPrototype,$$9({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:RequestConstructor})}}var EOF,web_urlSearchParams_constructor={URLSearchParams:URLSearchParamsConstructor,getState:getInternalParamsState},$$8=_export,DESCRIPTORS$1=descriptors,USE_NATIVE_URL$1=urlConstructorDetection,global$1=global$o,bind2=functionBindContext,uncurryThis$3=functionUncurryThis,defineBuiltIn=defineBuiltIn$8,defineBuiltInAccessor=defineBuiltInAccessor$5,anInstance=anInstance$5,hasOwn2=hasOwnProperty_1,assign2=objectAssign,arrayFrom=arrayFrom$1,arraySlice=arraySliceSimple,codeAt=stringMultibyte.codeAt,toASCII=stringPunycodeToAscii,$toString=toString$f,setToStringTag=setToStringTag$9,validateArgumentsLength$1=validateArgumentsLength$4,URLSearchParamsModule=web_urlSearchParams_constructor,InternalStateModule=internalState,setInternalState=InternalStateModule.set,getInternalURLState=InternalStateModule.getterFor("URL"),URLSearchParams$1=URLSearchParamsModule.URLSearchParams,getInternalSearchParamsState=URLSearchParamsModule.getState,NativeURL=global$1.URL,TypeError$1=global$1.TypeError,parseInt$1=global$1.parseInt,floor=Math.floor,pow=Math.pow,charAt=uncurryThis$3("".charAt),exec=uncurryThis$3(/./.exec),join=uncurryThis$3([].join),numberToString=uncurryThis$3(1..toString),pop=uncurryThis$3([].pop),push$1=uncurryThis$3([].push),replace=uncurryThis$3("".replace),shift=uncurryThis$3([].shift),split=uncurryThis$3("".split),stringSlice$1=uncurryThis$3("".slice),toLowerCase=uncurryThis$3("".toLowerCase),unshift=uncurryThis$3([].unshift),INVALID_AUTHORITY="Invalid authority",INVALID_SCHEME="Invalid scheme",INVALID_HOST="Invalid host",INVALID_PORT="Invalid port",ALPHA=/[a-z]/i,ALPHANUMERIC=/[\d+-.a-z]/i,DIGIT=/\d/,HEX_START=/^0x/i,OCT=/^[0-7]+$/,DEC=/^\d+$/,HEX=/^[\da-f]+$/i,FORBIDDEN_HOST_CODE_POINT=/[\0\t\n\r #%/:<>?@[\\\]^|]/,FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT=/[\0\t\n\r #/:<>?@[\\\]^|]/,LEADING_C0_CONTROL_OR_SPACE=/^[\u0000-\u0020]+/,TRAILING_C0_CONTROL_OR_SPACE=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,TAB_AND_NEW_LINE=/[\t\n\r]/g,parseIPv4=function(e){var t,r,n,i,o,a,s,l=split(e,".");if(l.length&&""==l[l.length-1]&&l.length--,(t=l.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(i=l[n]))return e;if(o=10,i.length>1&&"0"==charAt(i,0)&&(o=exec(HEX_START,i)?16:8,i=stringSlice$1(i,8==o?1:2)),""===i)a=0;else{if(!exec(10==o?DEC:8==o?OCT:HEX,i))return e;a=parseInt$1(i,o)}push$1(r,a)}for(n=0;n<t;n++)if(a=r[n],n==t-1){if(a>=pow(256,5-t))return null}else if(a>255)return null;for(s=pop(r),n=0;n<r.length;n++)s+=r[n]*pow(256,3-n);return s},parseIPv6=function(e){var t,r,n,i,o,a,s,l=[0,0,0,0,0,0,0,0],c=0,u=null,p=0,f=function(){return charAt(e,p)};if(":"==f()){if(":"!=charAt(e,1))return;p+=2,u=++c}for(;f();){if(8==c)return;if(":"!=f()){for(t=r=0;r<4&&exec(HEX,f());)t=16*t+parseInt$1(f(),16),p++,r++;if("."==f()){if(0==r)return;if(p-=r,c>6)return;for(n=0;f();){if(i=null,n>0){if(!("."==f()&&n<4))return;p++}if(!exec(DIGIT,f()))return;for(;exec(DIGIT,f());){if(o=parseInt$1(f(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;p++}l[c]=256*l[c]+i,2!=++n&&4!=n||c++}if(4!=n)return;break}if(":"==f()){if(p++,!f())return}else if(f())return;l[c++]=t}else{if(null!==u)return;p++,u=++c}}if(null!==u)for(a=c-u,c=7;0!=c&&a>0;)s=l[c],l[c--]=l[u+a-1],l[u+--a]=s;else if(8!=c)return;return l},findLongestZeroSequence=function(e){for(var t=null,r=1,n=null,i=0,o=0;o<8;o++)0!==e[o]?(i>r&&(t=n,r=i),n=null,i=0):(null===n&&(n=o),++i);return i>r&&(t=n,r=i),t},serializeHost=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)unshift(t,e%256),e=floor(e/256);return join(t,".")}if("object"==typeof e){for(t="",n=findLongestZeroSequence(e),r=0;r<8;r++)i&&0===e[r]||(i&&(i=!1),n===r?(t+=r?":":"::",i=!0):(t+=numberToString(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},C0ControlPercentEncodeSet={},fragmentPercentEncodeSet=assign2({},C0ControlPercentEncodeSet,{" ":1,'"':1,"<":1,">":1,"`":1}),pathPercentEncodeSet=assign2({},fragmentPercentEncodeSet,{"#":1,"?":1,"{":1,"}":1}),userinfoPercentEncodeSet=assign2({},pathPercentEncodeSet,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),percentEncode=function(e,t){var r=codeAt(e,0);return r>32&&r<127&&!hasOwn2(t,e)?e:encodeURIComponent(e)},specialSchemes={ftp:21,file:null,http:80,https:443,ws:80,wss:443},isWindowsDriveLetter=function(e,t){var r;return 2==e.length&&exec(ALPHA,charAt(e,0))&&(":"==(r=charAt(e,1))||!t&&"|"==r)},startsWithWindowsDriveLetter=function(e){var t;return e.length>1&&isWindowsDriveLetter(stringSlice$1(e,0,2))&&(2==e.length||"/"===(t=charAt(e,2))||"\\"===t||"?"===t||"#"===t)},isSingleDot=function(e){return"."===e||"%2e"===toLowerCase(e)},isDoubleDot=function(e){return".."===(e=toLowerCase(e))||"%2e."===e||".%2e"===e||"%2e%2e"===e},SCHEME_START={},SCHEME={},NO_SCHEME={},SPECIAL_RELATIVE_OR_AUTHORITY={},PATH_OR_AUTHORITY={},RELATIVE={},RELATIVE_SLASH={},SPECIAL_AUTHORITY_SLASHES={},SPECIAL_AUTHORITY_IGNORE_SLASHES={},AUTHORITY={},HOST={},HOSTNAME={},PORT={},FILE={},FILE_SLASH={},FILE_HOST={},PATH_START={},PATH={},CANNOT_BE_A_BASE_URL_PATH={},QUERY={},FRAGMENT={},URLState=function(e,t,r){var n,i,o,a=$toString(e);if(t){if(i=this.parse(a))throw TypeError$1(i);this.searchParams=null}else{if(void 0!==r&&(n=new URLState(r,!0)),i=this.parse(a,null,n))throw TypeError$1(i);(o=getInternalSearchParamsState(new URLSearchParams$1)).bindURL(this),this.searchParams=o}};URLState.prototype={type:"URL",parse:function(e,t,r){var n,i,o,a,s=this,l=t||SCHEME_START,c=0,u="",p=!1,f=!1,h=!1;for(e=$toString(e),t||(s.scheme="",s.username="",s.password="",s.host=null,s.port=null,s.path=[],s.query=null,s.fragment=null,s.cannotBeABaseURL=!1,e=replace(e,LEADING_C0_CONTROL_OR_SPACE,""),e=replace(e,TRAILING_C0_CONTROL_OR_SPACE,"$1")),e=replace(e,TAB_AND_NEW_LINE,""),n=arrayFrom(e);c<=n.length;){switch(i=n[c],l){case SCHEME_START:if(!i||!exec(ALPHA,i)){if(t)return INVALID_SCHEME;l=NO_SCHEME;continue}u+=toLowerCase(i),l=SCHEME;break;case SCHEME:if(i&&(exec(ALPHANUMERIC,i)||"+"==i||"-"==i||"."==i))u+=toLowerCase(i);else{if(":"!=i){if(t)return INVALID_SCHEME;u="",l=NO_SCHEME,c=0;continue}if(t&&(s.isSpecial()!=hasOwn2(specialSchemes,u)||"file"==u&&(s.includesCredentials()||null!==s.port)||"file"==s.scheme&&!s.host))return;if(s.scheme=u,t)return void(s.isSpecial()&&specialSchemes[s.scheme]==s.port&&(s.port=null));u="","file"==s.scheme?l=FILE:s.isSpecial()&&r&&r.scheme==s.scheme?l=SPECIAL_RELATIVE_OR_AUTHORITY:s.isSpecial()?l=SPECIAL_AUTHORITY_SLASHES:"/"==n[c+1]?(l=PATH_OR_AUTHORITY,c++):(s.cannotBeABaseURL=!0,push$1(s.path,""),l=CANNOT_BE_A_BASE_URL_PATH)}break;case NO_SCHEME:if(!r||r.cannotBeABaseURL&&"#"!=i)return INVALID_SCHEME;if(r.cannotBeABaseURL&&"#"==i){s.scheme=r.scheme,s.path=arraySlice(r.path),s.query=r.query,s.fragment="",s.cannotBeABaseURL=!0,l=FRAGMENT;break}l="file"==r.scheme?FILE:RELATIVE;continue;case SPECIAL_RELATIVE_OR_AUTHORITY:if("/"!=i||"/"!=n[c+1]){l=RELATIVE;continue}l=SPECIAL_AUTHORITY_IGNORE_SLASHES,c++;break;case PATH_OR_AUTHORITY:if("/"==i){l=AUTHORITY;break}l=PATH;continue;case RELATIVE:if(s.scheme=r.scheme,i==EOF)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=arraySlice(r.path),s.query=r.query;else if("/"==i||"\\"==i&&s.isSpecial())l=RELATIVE_SLASH;else if("?"==i)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=arraySlice(r.path),s.query="",l=QUERY;else{if("#"!=i){s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=arraySlice(r.path),s.path.length--,l=PATH;continue}s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=arraySlice(r.path),s.query=r.query,s.fragment="",l=FRAGMENT}break;case RELATIVE_SLASH:if(!s.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,l=PATH;continue}l=AUTHORITY}else l=SPECIAL_AUTHORITY_IGNORE_SLASHES;break;case SPECIAL_AUTHORITY_SLASHES:if(l=SPECIAL_AUTHORITY_IGNORE_SLASHES,"/"!=i||"/"!=charAt(u,c+1))continue;c++;break;case SPECIAL_AUTHORITY_IGNORE_SLASHES:if("/"!=i&&"\\"!=i){l=AUTHORITY;continue}break;case AUTHORITY:if("@"==i){p&&(u="%40"+u),p=!0,o=arrayFrom(u);for(var d=0;d<o.length;d++){var y=o[d];if(":"!=y||h){var g=percentEncode(y,userinfoPercentEncodeSet);h?s.password+=g:s.username+=g}else h=!0}u=""}else if(i==EOF||"/"==i||"?"==i||"#"==i||"\\"==i&&s.isSpecial()){if(p&&""==u)return INVALID_AUTHORITY;c-=arrayFrom(u).length+1,u="",l=HOST}else u+=i;break;case HOST:case HOSTNAME:if(t&&"file"==s.scheme){l=FILE_HOST;continue}if(":"!=i||f){if(i==EOF||"/"==i||"?"==i||"#"==i||"\\"==i&&s.isSpecial()){if(s.isSpecial()&&""==u)return INVALID_HOST;if(t&&""==u&&(s.includesCredentials()||null!==s.port))return;if(a=s.parseHost(u))return a;if(u="",l=PATH_START,t)return;continue}"["==i?f=!0:"]"==i&&(f=!1),u+=i}else{if(""==u)return INVALID_HOST;if(a=s.parseHost(u))return a;if(u="",l=PORT,t==HOSTNAME)return}break;case PORT:if(!exec(DIGIT,i)){if(i==EOF||"/"==i||"?"==i||"#"==i||"\\"==i&&s.isSpecial()||t){if(""!=u){var $=parseInt$1(u,10);if($>65535)return INVALID_PORT;s.port=s.isSpecial()&&$===specialSchemes[s.scheme]?null:$,u=""}if(t)return;l=PATH_START;continue}return INVALID_PORT}u+=i;break;case FILE:if(s.scheme="file","/"==i||"\\"==i)l=FILE_SLASH;else{if(!r||"file"!=r.scheme){l=PATH;continue}if(i==EOF)s.host=r.host,s.path=arraySlice(r.path),s.query=r.query;else if("?"==i)s.host=r.host,s.path=arraySlice(r.path),s.query="",l=QUERY;else{if("#"!=i){startsWithWindowsDriveLetter(join(arraySlice(n,c),""))||(s.host=r.host,s.path=arraySlice(r.path),s.shortenPath()),l=PATH;continue}s.host=r.host,s.path=arraySlice(r.path),s.query=r.query,s.fragment="",l=FRAGMENT}}break;case FILE_SLASH:if("/"==i||"\\"==i){l=FILE_HOST;break}r&&"file"==r.scheme&&!startsWithWindowsDriveLetter(join(arraySlice(n,c),""))&&(isWindowsDriveLetter(r.path[0],!0)?push$1(s.path,r.path[0]):s.host=r.host),l=PATH;continue;case FILE_HOST:if(i==EOF||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&isWindowsDriveLetter(u))l=PATH;else if(""==u){if(s.host="",t)return;l=PATH_START}else{if(a=s.parseHost(u))return a;if("localhost"==s.host&&(s.host=""),t)return;u="",l=PATH_START}continue}u+=i;break;case PATH_START:if(s.isSpecial()){if(l=PATH,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=EOF&&(l=PATH,"/"!=i))continue}else s.fragment="",l=FRAGMENT;else s.query="",l=QUERY;break;case PATH:if(i==EOF||"/"==i||"\\"==i&&s.isSpecial()||!t&&("?"==i||"#"==i)){if(isDoubleDot(u)?(s.shortenPath(),"/"==i||"\\"==i&&s.isSpecial()||push$1(s.path,"")):isSingleDot(u)?"/"==i||"\\"==i&&s.isSpecial()||push$1(s.path,""):("file"==s.scheme&&!s.path.length&&isWindowsDriveLetter(u)&&(s.host&&(s.host=""),u=charAt(u,0)+":"),push$1(s.path,u)),u="","file"==s.scheme&&(i==EOF||"?"==i||"#"==i))for(;s.path.length>1&&""===s.path[0];)shift(s.path);"?"==i?(s.query="",l=QUERY):"#"==i&&(s.fragment="",l=FRAGMENT)}else u+=percentEncode(i,pathPercentEncodeSet);break;case CANNOT_BE_A_BASE_URL_PATH:"?"==i?(s.query="",l=QUERY):"#"==i?(s.fragment="",l=FRAGMENT):i!=EOF&&(s.path[0]+=percentEncode(i,C0ControlPercentEncodeSet));break;case QUERY:t||"#"!=i?i!=EOF&&("'"==i&&s.isSpecial()?s.query+="%27":s.query+="#"==i?"%23":percentEncode(i,C0ControlPercentEncodeSet)):(s.fragment="",l=FRAGMENT);break;case FRAGMENT:i!=EOF&&(s.fragment+=percentEncode(i,fragmentPercentEncodeSet))}c++}},parseHost:function(e){var t,r,n;if("["==charAt(e,0)){if("]"!=charAt(e,e.length-1))return INVALID_HOST;if(!(t=parseIPv6(stringSlice$1(e,1,-1))))return INVALID_HOST;this.host=t}else if(this.isSpecial()){if(e=toASCII(e),exec(FORBIDDEN_HOST_CODE_POINT,e))return INVALID_HOST;if(null===(t=parseIPv4(e)))return INVALID_HOST;this.host=t}else{if(exec(FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT,e))return INVALID_HOST;for(t="",r=arrayFrom(e),n=0;n<r.length;n++)t+=percentEncode(r[n],C0ControlPercentEncodeSet);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return hasOwn2(specialSchemes,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&isWindowsDriveLetter(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,i=e.host,o=e.port,a=e.path,s=e.query,l=e.fragment,c=t+":";return null!==i?(c+="//",e.includesCredentials()&&(c+=r+(n?":"+n:"")+"@"),c+=serializeHost(i),null!==o&&(c+=":"+o)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?a[0]:a.length?"/"+join(a,"/"):"",null!==s&&(c+="?"+s),null!==l&&(c+="#"+l),c},setHref:function(e){var t=this.parse(e);if(t)throw TypeError$1(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new URLConstructor(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+serializeHost(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse($toString(e)+":",SCHEME_START)},getUsername:function(){return this.username},setUsername:function(e){var t=arrayFrom($toString(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=percentEncode(t[r],userinfoPercentEncodeSet)}},getPassword:function(){return this.password},setPassword:function(e){var t=arrayFrom($toString(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=percentEncode(t[r],userinfoPercentEncodeSet)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?serializeHost(e):serializeHost(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,HOST)},getHostname:function(){var e=this.host;return null===e?"":serializeHost(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,HOSTNAME)},getPort:function(){var e=this.port;return null===e?"":$toString(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=$toString(e))?this.port=null:this.parse(e,PORT))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+join(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,PATH_START))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=$toString(e))?this.query=null:("?"==charAt(e,0)&&(e=stringSlice$1(e,1)),this.query="",this.parse(e,QUERY)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=$toString(e))?("#"==charAt(e,0)&&(e=stringSlice$1(e,1)),this.fragment="",this.parse(e,FRAGMENT)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var URLConstructor=function(e){var t=anInstance(this,URLPrototype),r=validateArgumentsLength$1(arguments.length,1)>1?arguments[1]:void 0,n=setInternalState(t,new URLState(e,!1,r));DESCRIPTORS$1||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},URLPrototype=URLConstructor.prototype,accessorDescriptor=function(e,t){return{get:function(){return getInternalURLState(this)[e]()},set:t&&function(e){return getInternalURLState(this)[t](e)},configurable:!0,enumerable:!0}};if(DESCRIPTORS$1&&(defineBuiltInAccessor(URLPrototype,"href",accessorDescriptor("serialize","setHref")),defineBuiltInAccessor(URLPrototype,"origin",accessorDescriptor("getOrigin")),defineBuiltInAccessor(URLPrototype,"protocol",accessorDescriptor("getProtocol","setProtocol")),defineBuiltInAccessor(URLPrototype,"username",accessorDescriptor("getUsername","setUsername")),defineBuiltInAccessor(URLPrototype,"password",accessorDescriptor("getPassword","setPassword")),defineBuiltInAccessor(URLPrototype,"host",accessorDescriptor("getHost","setHost")),defineBuiltInAccessor(URLPrototype,"hostname",accessorDescriptor("getHostname","setHostname")),defineBuiltInAccessor(URLPrototype,"port",accessorDescriptor("getPort","setPort")),defineBuiltInAccessor(URLPrototype,"pathname",accessorDescriptor("getPathname","setPathname")),defineBuiltInAccessor(URLPrototype,"search",accessorDescriptor("getSearch","setSearch")),defineBuiltInAccessor(URLPrototype,"searchParams",accessorDescriptor("getSearchParams")),defineBuiltInAccessor(URLPrototype,"hash",accessorDescriptor("getHash","setHash"))),defineBuiltIn(URLPrototype,"toJSON",(function(){return getInternalURLState(this).serialize()}),{enumerable:!0}),defineBuiltIn(URLPrototype,"toString",(function(){return getInternalURLState(this).serialize()}),{enumerable:!0}),NativeURL){var nativeCreateObjectURL=NativeURL.createObjectURL,nativeRevokeObjectURL=NativeURL.revokeObjectURL;nativeCreateObjectURL&&defineBuiltIn(URLConstructor,"createObjectURL",bind2(nativeCreateObjectURL,NativeURL)),nativeRevokeObjectURL&&defineBuiltIn(URLConstructor,"revokeObjectURL",bind2(nativeRevokeObjectURL,NativeURL))}setToStringTag(URLConstructor,"URL"),$$8({global:!0,constructor:!0,forced:!USE_NATIVE_URL$1,sham:!DESCRIPTORS$1},{URL:URLConstructor});var $$7=_export,getBuiltIn=getBuiltIn$h,fails$1=fails$A,validateArgumentsLength=validateArgumentsLength$4,toString$2=toString$f,USE_NATIVE_URL=urlConstructorDetection,URL$1=getBuiltIn("URL"),THROWS_WITHOUT_ARGUMENTS=USE_NATIVE_URL&&fails$1((function(){URL$1.canParse()}));$$7({target:"URL",stat:!0,forced:!THROWS_WITHOUT_ARGUMENTS},{canParse:function(e){var t=validateArgumentsLength(arguments.length,1),r=toString$2(e),n=t<2||void 0===arguments[1]?void 0:toString$2(arguments[1]);try{return!!new URL$1(r,n)}catch(e){return!1}}});var path$2=path$r,url$5=path$2.URL,parent$k=url$5,url$4=parent$k,parent$j=url$4,url$3=parent$j,parent$i=url$3,url$2=parent$i,url$1=url$2,url=url$1,_URL2=getDefaultExportFromCjs(url),OptionList=function(){function e(t){_classCallCheck(this,e),this.config=t.config,this.parent=t.root,this.root=util.createDom("ul","",{},"xg-options-list xg-list-slide-scroll ".concat(this.config.className)),t.root.appendChild(this.root);var r=this.config.maxHeight;r&&this.setStyle({maxHeight:r}),this.onItemClick=this.onItemClick.bind(this),this.renderItemList();var n="touch"===this.config.domEventType?"touchend":"click";this._delegates=Plugin.delegate.call(this,this.root,"li",n,this.onItemClick)}return _createClass(e,[{key:"renderItemList",value:function(e){var t,r=this,n=this.config,i=this.root;(e?n.data=e:e=n.data,n.style)&&_mapInstanceProperty(t=_Object$keys(n.style)).call(t,(function(e){i.style[e]=n[e]}));e.length>0&&(this.attrKeys=_Object$keys(e[0])),this.root.innerHTML="",_mapInstanceProperty(e).call(e,(function(e,t){var n=e.selected?"option-item selected":"option-item";e["data-index"]=t,r.root.appendChild(util.createDom("li","<span>".concat(e.showText,"</span>"),e,n))}))}},{key:"onItemClick",value:function(e){e.delegateTarget||(e.delegateTarget=e.target);var t=e.delegateTarget;if(t&&util.hasClass(t,"selected"))return!1;var r="function"==typeof this.config.onItemClick?this.config.onItemClick:null,n=this.root.querySelector(".selected");util.addClass(t,"selected"),n&&util.removeClass(n,"selected"),r(e,{from:n?this.getAttrObj(n,this.attrKeys):null,to:this.getAttrObj(t,this.attrKeys)})}},{key:"getAttrObj",value:function(e,t){if(!e||!t)return{};var r={};_mapInstanceProperty(t).call(t,(function(t){r[t]=e.getAttribute(t)}));var n=e.getAttribute("data-index");return n&&(r.index=Number(n)),r}},{key:"show",value:function(){util.removeClass(this.root,"hide"),util.addClass(this.root,"active")}},{key:"hide",value:function(){util.removeClass(this.root,"active"),util.addClass(this.root,"hide")}},{key:"setStyle",value:function(e){var t=this;_Object$keys(e).forEach((function(r){t.root.style[r]=e[r]}))}},{key:"destroy",value:function(){var e;this._delegates&&(_mapInstanceProperty(e=this._delegates).call(e,(function(e){e.destroy&&e.destroy()})),this._delegates=null);this.root.innerHTML=null,this.parent.removeChild(this.root),this.root=null}}]),e}(),isObject$1=isObject$m,classof=classofRaw$2,wellKnownSymbol$1=wellKnownSymbol$q,MATCH$1=wellKnownSymbol$1("match"),isRegexp=function(e){var t;return isObject$1(e)&&(void 0!==(t=e[MATCH$1])?!!t:"RegExp"==classof(e))},isRegExp=isRegexp,$TypeError$1=TypeError,notARegexp=function(e){if(isRegExp(e))throw $TypeError$1("The method doesn't accept regular expressions");return e},wellKnownSymbol=wellKnownSymbol$q,MATCH=wellKnownSymbol("match"),correctIsRegexpLogic=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[MATCH]=!1,"/./"[e](t)}catch(e){}}return!1},$$6=_export,uncurryThis$2=functionUncurryThisClause;objectGetOwnPropertyDescriptor.f;var toLength=toLength$3,toString$1=toString$f,notARegExp$1=notARegexp,requireObjectCoercible$1=requireObjectCoercible$8,correctIsRegExpLogic$1=correctIsRegexpLogic,nativeStartsWith=uncurryThis$2("".startsWith),stringSlice=uncurryThis$2("".slice),min$1=Math.min,CORRECT_IS_REGEXP_LOGIC=correctIsRegExpLogic$1("startsWith");$$6({target:"String",proto:!0,forced:!CORRECT_IS_REGEXP_LOGIC},{startsWith:function(e){var t=toString$1(requireObjectCoercible$1(this));notARegExp$1(e);var r=toLength(min$1(arguments.length>1?arguments[1]:void 0,t.length)),n=toString$1(e);return nativeStartsWith?nativeStartsWith(t,n,r):stringSlice(t,r,r+n.length)===n}});var entryVirtual$4=entryVirtual$m,startsWith$6=entryVirtual$4("String").startsWith,isPrototypeOf$3=objectIsPrototypeOf,method$2=startsWith$6,StringPrototype$1=String.prototype,startsWith$5=function(e){var t=e.startsWith;return"string"==typeof e||e===StringPrototype$1||isPrototypeOf$3(StringPrototype$1,e)&&t===StringPrototype$1.startsWith?method$2:t},parent$h=startsWith$5,startsWith$4=parent$h,parent$g=startsWith$4,startsWith$3=parent$g,parent$f=startsWith$3,startsWith$2=parent$f,startsWith$1=startsWith$2,startsWith2=startsWith$1,_startsWithInstanceProperty=getDefaultExportFromCjs(startsWith2),$$5=_export,$includes=arrayIncludes$1.includes,fails=fails$A,BROKEN_ON_SPARSE=fails((function(){return!Array(1).includes()}));$$5({target:"Array",proto:!0,forced:BROKEN_ON_SPARSE},{includes:function(e){return $includes(this,e,arguments.length>1?arguments[1]:void 0)}});var entryVirtual$3=entryVirtual$m,includes$7=entryVirtual$3("Array").includes,$$4=_export,uncurryThis$1=functionUncurryThis,notARegExp=notARegexp,requireObjectCoercible=requireObjectCoercible$8,toString4=toString$f,correctIsRegExpLogic=correctIsRegexpLogic,stringIndexOf=uncurryThis$1("".indexOf);$$4({target:"String",proto:!0,forced:!correctIsRegExpLogic("includes")},{includes:function(e){return!!~stringIndexOf(toString4(requireObjectCoercible(this)),toString4(notARegExp(e)),arguments.length>1?arguments[1]:void 0)}});var _EVENT_TRANSFORMATION,entryVirtual$2=entryVirtual$m,includes$6=entryVirtual$2("String").includes,isPrototypeOf$2=objectIsPrototypeOf,arrayMethod=includes$7,stringMethod=includes$6,ArrayPrototype$2=Array.prototype,StringPrototype=String.prototype,includes$5=function(e){var t=e.includes;return e===ArrayPrototype$2||isPrototypeOf$2(ArrayPrototype$2,e)&&t===ArrayPrototype$2.includes?arrayMethod:"string"==typeof e||e===StringPrototype||isPrototypeOf$2(StringPrototype,e)&&t===StringPrototype.includes?stringMethod:t},parent$e=includes$5,includes$4=parent$e,parent$d=includes$4,includes$3=parent$d,parent$c=includes$3,includes$2=parent$c,includes$1=includes$2,includes4=includes$1,_includesInstanceProperty2=getDefaultExportFromCjs(includes4),BaseEvents={SEI:"sei",PLAYER_CREATE_FINISH:"playerCreateFinish",FALLBACK_ERROR:"fallbackError",FALLBACK:"fallback",AUTOPLAY_STARTED:"autoplayStarted",AUTOPLAY_PREVENTED:"autoplayWasPrevented",DOWNLOAD_SPEED_CHANGE:"downloadSpeedChange",FULLSCREEN_CHANGE:"fullscreenChange",CSS_FULLSCREEN_CHANGE:"cssFullscreenChange",MINI_STATE_CHANGE:"miniStateChange",DEFINITION_CHANGE:"definitionChange",BEFORE_DEFINITION_CHANGE:"beforeDefinitionChange",AFTER_DEFINITION_CHANGE:"afterDefinitionChange",VIDEO_RESIZE:"videoResize",PIP_CHANGE:"pipChange",USER_ACTION:"userAction",AUTOPLAY_UNMUTE:"autoplayUnmute",LONG_WAITING:"longWaiting",DEFINITION_FALLBACK:"definitionFallback",AUTOPLAY_FAIL:"autoplayFail",AUTOPLAY_SUCCESS:"autoplaySuccess",ERROR_REFRESH_CLICK:"errorRefreshClick",SOURCE_CHANGE:"sourceChange",ABR_SWITCH_START:"abrSwitchStart",ABR_SWITCH_SUCCESS:"abrSwitchSuccess",ABR_SWITCH_FAILED:"abrSwitchFailed",AD_FIRST_QUARTILE:"ad_first_quartile",AD_MIDPOINT:"ad_midpoint",AD_THIRD_QUARTILE:"ad_third_quartile",AD_CLICK:"ad_click",AD_IMPRESSION:"ad_impression",AD_RESUME:"ad_resume",AD_START:"ad_start",AD_PLAY:"ad_play",AD_PAUSE:"ad_pause",AD_TIME_UPDATE:"ad_time_update",AD_SKIPPED:"ad_skipped",AD_ERROR:"ad_error",AD_COMPLETE:"ad_complete",AD_ALL_COMPLETED:"ad_all_completed",RTM_NETWORK:"rtmNetwork"},Events=_objectSpread2$1(_objectSpread2$1({},XGEvents),BaseEvents),EVENT_TRANSFORMATION=(_defineProperty$1(_EVENT_TRANSFORMATION={},BaseEvents.SEI,{event:"core_event",shouldCallback:function(e){return"core.sei"===(null==e?void 0:e.eventName)}}),_defineProperty$1(_EVENT_TRANSFORMATION,BaseEvents.RTM_NETWORK,{event:"core_event",shouldCallback:function(e){return"core.rtcnetwork"===(null==e?void 0:e.eventName)}}),_defineProperty$1(_EVENT_TRANSFORMATION,BaseEvents.AUTOPLAY_STARTED,{event:AUTOPLAY_STARTED}),_defineProperty$1(_EVENT_TRANSFORMATION,BaseEvents.AUTOPLAY_PREVENTED,{event:AUTOPLAY_PREVENTED}),_defineProperty$1(_EVENT_TRANSFORMATION,BaseEvents.FULLSCREEN_CHANGE,{event:FULLSCREEN_CHANGE}),_defineProperty$1(_EVENT_TRANSFORMATION,BaseEvents.CSS_FULLSCREEN_CHANGE,{event:CSS_FULLSCREEN_CHANGE}),_defineProperty$1(_EVENT_TRANSFORMATION,BaseEvents.MINI_STATE_CHANGE,{event:MINI_STATE_CHANGE}),_defineProperty$1(_EVENT_TRANSFORMATION,BaseEvents.DEFINITION_CHANGE,{event:DEFINITION_CHANGE}),_defineProperty$1(_EVENT_TRANSFORMATION,BaseEvents.BEFORE_DEFINITION_CHANGE,{event:BEFORE_DEFINITION_CHANGE}),_defineProperty$1(_EVENT_TRANSFORMATION,BaseEvents.AFTER_DEFINITION_CHANGE,{event:AFTER_DEFINITION_CHANGE}),_defineProperty$1(_EVENT_TRANSFORMATION,BaseEvents.VIDEO_RESIZE,{event:VIDEO_RESIZE}),_defineProperty$1(_EVENT_TRANSFORMATION,BaseEvents.PIP_CHANGE,{event:PIP_CHANGE}),_defineProperty$1(_EVENT_TRANSFORMATION,BaseEvents.USER_ACTION,{event:USER_ACTION}),_defineProperty$1(_EVENT_TRANSFORMATION,BaseEvents.DOWNLOAD_SPEED_CHANGE,{event:DOWNLOAD_SPEED_CHANGE}),_defineProperty$1(_EVENT_TRANSFORMATION,BaseEvents.ABR_SWITCH_START,{event:"switch_definition_start"}),_defineProperty$1(_EVENT_TRANSFORMATION,BaseEvents.ABR_SWITCH_SUCCESS,{event:"switch_definition_success"}),_defineProperty$1(_EVENT_TRANSFORMATION,BaseEvents.ABR_SWITCH_FAILED,{event:"switch_definition_fail"}),_EVENT_TRANSFORMATION);function transform(e,t){var r=EVENT_TRANSFORMATION[e];if(r){return{xgEventName:r.event,xgCallback:t?r.shouldCallback?function(){for(var e,n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];null!==(e=r.shouldCallback)&&void 0!==e&&e.call.apply(e,_concatInstanceProperty2(n=[r]).call(n,o))&&(null==t||t.apply(void 0,o))}:t:void 0}}return{xgEventName:e,xgCallback:t}}var matchHtmlRegExp=/["'&<>]/;function escapeHtml(e){var t,r=""+e,n=matchHtmlRegExp.exec(r);if(!n)return r;var i,o="",a=0;for(i=n.index;i<r.length;i++){switch(r.charCodeAt(i)){case 34:t="&quot;";break;case 38:t="&amp;";break;case 39:t="&#x27;";break;case 60:t="&lt;";break;case 62:t="&gt;";break;default:continue}a!==i&&(o+=r.substring(a,i)),a=i+1,o+=t}return a!==i?o+r.substring(a,i):o}function _arrayWithHoles(e){if(_Array$isArray(e))return e}function _iterableToArrayLimit(e,t){var r=null==e?null:void 0!==_Symbol&&_getIteratorMethod$1(e)||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(_pushInstanceProperty(s).call(s,n.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray$1(e,t)||_nonIterableRest()}var DESCRIPTORS=descriptors,uncurryThis=functionUncurryThis,objectKeys=objectKeys$4,toIndexedObject$1=toIndexedObject$c,$propertyIsEnumerable=objectPropertyIsEnumerable.f,propertyIsEnumerable3=uncurryThis($propertyIsEnumerable),push2=uncurryThis([].push),createMethod$1=function(e){return function(t){for(var r,n=toIndexedObject$1(t),i=objectKeys(n),o=i.length,a=0,s=[];o>a;)r=i[a++],DESCRIPTORS&&!propertyIsEnumerable3(n,r)||push2(s,e?[r,n[r]]:n[r]);return s}},objectToArray={entries:createMethod$1(!0),values:createMethod$1(!1)},$$3=_export,$entries=objectToArray.entries;$$3({target:"Object",stat:!0},{entries:function(e){return $entries(e)}});var path$1=path$r,entries$5=path$1.Object.entries,parent$b=entries$5,entries$4=parent$b,parent$a=entries$4,entries$3=parent$a,parent$9=entries$3,entries$2=parent$9,entries$1=entries$2,entries3=entries$1,_Object$entries=getDefaultExportFromCjs(entries3);function escapeIcons(e){var t={};return _Object$entries(null!=e?e:{}).forEach((function(e){var r=_slicedToArray(e,2),n=r[0],i=r[1];"string"==typeof i?console.warn("icons.".concat(n," has been removed")):t[n]=i})),t}var aCallable=aCallable$j,toObject=toObject$d,IndexedObject=indexedObject,lengthOfArrayLike$1=lengthOfArrayLike$c,$TypeError=TypeError,createMethod=function(e){return function(t,r,n,i){aCallable(r);var o=toObject(t),a=IndexedObject(o),s=lengthOfArrayLike$1(o),l=e?s-1:0,c=e?-1:1;if(n<2)for(;;){if(l in a){i=a[l],l+=c;break}if(l+=c,e?l<0:s<=l)throw $TypeError("Reduce of empty array with no initial value")}for(;e?l>=0:s>l;l+=c)l in a&&(i=r(i,a[l],l,o));return i}},arrayReduce={left:createMethod(!1),right:createMethod(!0)},$$2=_export,$reduce=arrayReduce.left,arrayMethodIsStrict$1=arrayMethodIsStrict$5,CHROME_VERSION=engineV8Version,IS_NODE=engineIsNode,CHROME_BUG=!IS_NODE&&engineV8Version>79&&engineV8Version<83,FORCED$1=CHROME_BUG||!arrayMethodIsStrict$1("reduce");$$2({target:"Array",proto:!0,forced:FORCED$1},{reduce:function(e){var t=arguments.length;return $reduce(this,e,t,t>1?arguments[1]:void 0)}});var entryVirtual$1=entryVirtual$m,reduce$6=entryVirtual$1("Array").reduce,isPrototypeOf$1=objectIsPrototypeOf,method$1=reduce$6,ArrayPrototype$1=Array.prototype,reduce$5=function(e){var t=e.reduce;return e===ArrayPrototype$1||isPrototypeOf$1(ArrayPrototype$1,e)&&t===ArrayPrototype$1.reduce?method$1:t},parent$8=reduce$5,reduce$4=parent$8,parent$7=reduce$4,reduce$3=parent$7,parent$6=reduce$3,reduce$2=parent$6,reduce$1=reduce$2,reduce3=reduce$1,_reduceInstanceProperty2=getDefaultExportFromCjs(reduce3);function arrayToList(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t={url:e[0],next:null},r=t,n=1;n<e.length;n++){var i=n===e.length-1?t:null,o={url:e[n],next:i};r.next=o,r=o}return t}var Definition=function(){function e(t){var r;_classCallCheck$1(this,e),_defineProperty$1(this,"definition",void 0),_defineProperty$1(this,"source",void 0),_defineProperty$1(this,"text",void 0),_defineProperty$1(this,"fallbackUrl",void 0),_defineProperty$1(this,"urls",void 0),_defineProperty$1(this,"_currentUrlRef",void 0);var n=t.url,i=t.definition,o=t.text,a=t.source,s=t.fallbackUrls;this.definition=i,this.text=o,this.source=a,this.urls=_concatInstanceProperty2(r=[n]).call(r,_toConsumableArray$1(null!=s?s:[])),this.fallbackUrl=arrayToList(this.urls),this._currentUrlRef=this.fallbackUrl}return _createClass$1(e,[{key:"url",get:function(){return this._currentUrlRef.url},set:function(e){this._currentUrlRef.url=e}},{key:"next",value:function(){var e=this._currentUrlRef.next;
2
- /* istanbul ignore next -- @preserve */return e&&(this._currentUrlRef=e),this._currentUrlRef}}]),e}(),Source=function(){function e(t,r,n){var i=this;_classCallCheck$1(this,e),_defineProperty$1(this,"name",void 0),_defineProperty$1(this,"text",void 0),_defineProperty$1(this,"definitions",void 0),this.definitions=_mapInstanceProperty(t).call(t,(function(e){return new Definition(_Object$assign2({},e,{source:i}))})),this.name=r,this.text=n}return _createClass$1(e,[{key:"defaultDefinition",get:function(){return this.definitions[0]}},{key:"add",value:function(e){this.definitions.push(e)}}],[{key:"normalize",value:function(t){if(void 0===t)throw new Error('"input" cannot be undefined');var r=void 0,n=void 0,i=void 0;if("string"==typeof t?r=t:Array.isArray(t)?i=t:(r=t.url,n=t.fallbackUrls,i=t.sources),"string"==typeof r)return e.normalizeUrl(r,n);if(Array.isArray(i)){if(0===i.length)throw new Error('"sources" cannot be an empty array');return _mapInstanceProperty(i).call(i,(function(t){var r;return new e(_mapInstanceProperty(r=t.definitions).call(r,(function(e){return"string"==typeof e?{url:e,definition:"unknown"}:e})),t.name,t.text)}))}return[]}},{key:"normalizeUrl",value:function(t,r){var n=new e([],"unknown");return n.add(new Definition({definition:"unknown",url:t,source:n,fallbackUrls:r})),[n]}}]),e}(),SourceManager=function(){function e(t){var r,n,i,o;_classCallCheck$1(this,e),_defineProperty$1(this,"defaultSource",void 0),_defineProperty$1(this,"defaultDefinition",void 0),_defineProperty$1(this,"maxFallbackRound",void 0),_defineProperty$1(this,"_currentDefinition",void 0),_defineProperty$1(this,"_sources",void 0),_defineProperty$1(this,"_fallbackCount",0);var a=t.url,s=t.defaultDefinition,l=t.defaultSource,c=t.sources,u=t.maxFallbackRound;this.defaultDefinition=s,this.defaultSource=l,this.maxFallbackRound=null!=u?u:1,this._sources=c;var p=a?_findInstanceProperty2(this).call(this,a):null===(r=_findInstanceProperty2(n=this.sources).call(n,(function(e){return void 0===l||e.name===l})))||void 0===r?void 0:_findInstanceProperty2(i=r.definitions).call(i,(function(e){return void 0===s||e.definition===s}));this._currentDefinition=null!=p?p:null===(o=this._sources)||void 0===o||null===(o=o[0])||void 0===o||null===(o=o.definitions)||void 0===o?void 0:o[0]}return _createClass$1(e,[{key:"sources",get:function(){return this._sources}},{key:"definition",get:function(){return this._currentDefinition}},{key:"source",get:function(){var e;return null===(e=this.definition)||void 0===e?void 0:e.source}},{key:"url",get:function(){var e;return null===(e=this.definition)||void 0===e?void 0:e.url},set:function(e){this.definition&&(this.definition.url=e)}},{key:"find",value:function(e,t){var r,n,i,o,a,s=this;if("string"==typeof e)return _findInstanceProperty2(o=_reduceInstanceProperty2(a=this.sources).call(a,(function(e,t){return _concatInstanceProperty2(e).call(e,t.definitions)}),[])).call(o,(function(t){return t.url===e}));var l=_findInstanceProperty2(r=this.sources).call(r,(function(t){var r,n;return t.name===(null!==(r=null==e?void 0:e.source)&&void 0!==r?r:null===(n=s.source)||void 0===n?void 0:n.name)})),c=null==l?void 0:_findInstanceProperty2(n=l.definitions).call(n,(function(t){var r,n;return t.definition===(null!==(r=null==e?void 0:e.definition)&&void 0!==r?r:null===(n=s.definition)||void 0===n?void 0:n.definition)}));return c||(null!=t&&t.fallbackToFirstDefinition&&null!=l&&null!==(i=l.definitions)&&void 0!==i&&i.length?null==l?void 0:l.definitions[0]:void 0)}},{key:"fallback",value:function(){var e;if(this._fallbackCount++,!(this._fallbackCount>=this.maxFallbackRound*this.definition.urls.length)){var t=null===(e=this._currentDefinition)||void 0===e?void 0:e.next();return null==t?void 0:t.url}this.resetFallback()}},{key:"switch",value:function(e){return this._currentDefinition=e,this.resetFallback(),e}},{key:"updateSources",value:function(e,t){var r,n,i,o,a;return this._sources=Source.normalize(e),this._currentDefinition=null!==(r=_findInstanceProperty2(this).call(this,null!=t?t:{source:null!==(n=this.defaultSource)&&void 0!==n?n:null===(i=this._currentDefinition)||void 0===i?void 0:i.source.name,definition:null!==(o=this.defaultDefinition)&&void 0!==o?o:null===(a=this._currentDefinition)||void 0===a?void 0:a.definition}))&&void 0!==r?r:this._sources[0].definitions[0],this.resetFallback(),this}},{key:"resetFallback",value:function(){this._fallbackCount=0}}]),e}();function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _get(){var e;"undefined"!=typeof Reflect&&_Reflect$get$1?_get=_bindInstanceProperty(e=_Reflect$get$1).call(e):_get=function(e,t,r){var n=_superPropBase(e,t);if(n){var i=_Object$getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}};return _get.apply(this,arguments)}function ErrorImg(){return(new DOMParser).parseFromString('<svg width="150" height="162" viewBox="0 0 150 162" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M127.718 112.831H6.13675C4.19663 112.831 2.25651 108.974 2.90322 104.475C3.54993 99.9761 8.07687 99.9761 13.8972 99.9761C11.9571 97.4052 9.37028 88.4069 15.8373 81.3369C22.3044 74.2668 25.5379 74.2668 34.5918 75.5526C33.9451 63.9837 47.526 34.4178 77.2744 35.0605C107.023 35.7032 116.077 54.3421 119.957 63.3404C129.011 62.6976 147.765 66.554 149.706 87.1214C151.258 103.575 135.694 111.117 127.718 112.831Z" fill="#F1F4F8"/>\n<path d="M44.9346 91.6022L43.6782 99.8032" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n<path d="M47.3545 125.695L48.6109 117.494" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n<path d="M31.5347 97.7378L38.7295 101.869" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n<path d="M60.7544 119.559L53.5595 115.428" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n<path d="M69.6755 44.5318L138.35 26.0209C139.115 25.8148 139.804 26.5367 139.563 27.2909L121.081 85.1146C120.982 85.4243 120.739 85.6665 120.429 85.7641L52.0645 107.28C51.2996 107.521 50.5766 106.809 50.8062 106.04L68.9776 45.2111C69.0768 44.879 69.3409 44.622 69.6755 44.5318Z" fill="#D0D6E0" stroke="#D0D6E0" stroke-width="4" stroke-linecap="round"/>\n<path d="M83.1285 52.7415C91.6454 54.3438 107.322 62.0019 101.894 79.8155" stroke="white" stroke-width="3" stroke-linecap="round"/>\n<path d="M84.138 62.3385C88.3894 63.1384 96.2148 66.9611 93.5053 75.8531" stroke="white" stroke-width="3" stroke-linecap="round"/>\n<ellipse cx="83.6417" cy="71.98" rx="3.08443" ry="3.07025" transform="rotate(12.6375 83.6417 71.98)" fill="white"/>\n<path d="M43.4699 110.358C39.5425 109.114 30.6316 108.203 26.4077 114.511C21.1278 122.397 36.5031 152.755 2.11053 160.141" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n</svg>\n',"image/svg+xml").firstChild}var error="",Error$1=function(e){_inherits(r,Plugin);var t=_createSuper(r);function r(){var e,n;_classCallCheck$1(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return _defineProperty$1(_assertThisInitialized(n=t.call.apply(t,_concatInstanceProperty2(e=[this]).call(e,o))),"_error",void 0),n}return _createClass$1(r,[{key:"_errorTip",get:function(){var e,t,r,n=this.player.config.i18nManager,i=null===(e=this._error)||void 0===e?void 0:e.errorCode;return this.config.errorTipsText?n.normalize(this.config.errorTipsText):_concatInstanceProperty2(t="".concat(i?"[".concat(i,"] "):"")).call(t,null===(r=this._error)||void 0===r?void 0:r.message)}},{key:"afterCreate",value:function(){this._handleRefresh=this._handleRefresh.bind(this),this._focus=this._focus.bind(this),this._initEvents(),this._initIcons(),"mobile"===sniffer.device&&this.bind("touchend",this._focus),this.bind(".veplayer-error-refresh","click",this._handleRefresh)}},{key:"registerIcons",value:function(){return{error:{icon:ErrorImg,class:"veplayer-error-svg"}}}},{key:"updateLang",value:function(){this.config.showRefresh&&this._renderRefresh(),this._renderExtraTips()}},{key:"showError",value:function(e){this._error=e instanceof VeError?e:transform$1(e),this.config.showErrorTip&&this._renderText(this._errorTip),this._renderExtraTips(),_get(_getPrototypeOf(r.prototype),"show",this).call(this)}},{key:"hideError",value:function(){_get(_getPrototypeOf(r.prototype),"hide",this).call(this)}},{key:"destroy",value:function(){"mobile"===sniffer.device&&this.unbind("touchend",this._focus),this.unbind(".veplayer-error-refresh","click",this._handleRefresh),this.off(Events.FALLBACK_ERROR,this.showError.bind(this)),this.off(CANPLAY,this.hideError.bind(this))}},{key:"render",value:function(){var e,t=this.player.config.i18nManager;return _concatInstanceProperty2(e='<veplayer-error class="veplayer-error">\n <div class="veplayer-error-cover">\n '.concat(this.config.showErrorImg?'<div class="veplayer-error-img"></div>':"",'\n <div class="veplayer-error-tips"></div>\n ')).call(e,this.config.showRefresh?'<div class="veplayer-error-refresh">'.concat(t.getText("ERROR_REFRESH"),"</div>"):"",'\n <div class="veplayer-error-extra"></div>\n </div>\n </veplayer-error>')}},{key:"_focus",value:function(){this.player.focus({autoHide:!0})}},{key:"_initIcons",value:function(){this.config.showErrorImg&&this.appendChild(".veplayer-error-img",this.icons.error)}},{key:"_initEvents",value:function(){this.on(Events.FALLBACK_ERROR,this.showError.bind(this)),this.on(CANPLAY,this.hideError.bind(this)),this.on(PLAY,this.hideError.bind(this)),this.on(RETRY,this.hideError.bind(this))}},{key:"_renderText",value:function(e){var t=_findInstanceProperty2(this).call(this,".veplayer-error-tips");t&&(t.innerText=e)}},{key:"_renderExtraTips",value:function(){var e,t=this,r=_findInstanceProperty2(this).call(this,".veplayer-error-extra");r&&(r.innerHTML="");var n=this.player.config.i18nManager;null===(e=this.config.extraTips)||void 0===e||e.forEach((function(e){if(e){var r,i=util.createDom("div",_concatInstanceProperty2(r="".concat(n.normalize(e.label),": ")).call(r,n.normalize(e.value)),void 0,"veplayer-error-detail-info");t.appendChild(".veplayer-error-extra",i)}}))}},{key:"_handleRefresh",value:function(){var e,t;null===(e=this.player)||void 0===e||e.emit(Events.ERROR_REFRESH_CLICK),null===(t=this.player)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.veplayer)||void 0===t||t.retry(),this.hideError()}},{key:"_renderRefresh",value:function(){var e,t=this.player.config.i18nManager,r=_findInstanceProperty2(this).call(this,".veplayer-error-refresh");r&&(r.innerHTML=null!==(e=t.getText("ERROR_REFRESH"))&&void 0!==e?e:"")}}],[{key:"pluginName",get:function(){return"error"}},{key:"defaultConfig",get:function(){return{showErrorImg:!0,showErrorTip:!0,showRefresh:!0,errorTipsText:"",extraTips:[],position:Plugin.POSITIONS.ROOT}}}]),r}(),toast="",DURATION=2e3,Toast=function(e){_inherits(r,Plugin);var t=_createSuper(r);function r(){var e,n;_classCallCheck$1(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return _defineProperty$1(_assertThisInitialized(n=t.call.apply(t,_concatInstanceProperty2(e=[this]).call(e,o))),"_toastNumber",0),_defineProperty$1(_assertThisInitialized(n),"_toastMap",{}),n}return _createClass$1(r,[{key:"toast",value:function(e,t){var r=this,n=t||{},i=n.duration,o=void 0===i?DURATION:i,a=n.closable,s=void 0!==a&&a,l=this._toastNumber+1;this._toastNumber=l;var c=this._renderToast(e,s,l);return this.root.appendChild(c),this._toastMap[l]=c,setTimeout((function(){r.remove(l)}),o),l}},{key:"remove",value:function(e){var t=this._toastMap[e];t&&(this.root.contains(t)&&this.root.removeChild(t),delete this._toastMap[e])}},{key:"render",value:function(){return'<veplayer-toast class="veplayer-toast"></veplayer-toast>'}},{key:"_renderToast",value:function(e,t,r){var n=this,i=util.createDom("div","",void 0,"veplayer-toast-container"),o=util.checkIsObject(e)?e:util.createDom("div",e,void 0,"veplayer-toast-txt");if(i.appendChild(o),t){var a=util.createDom("span","×",void 0,"veplayer-toast-close");a.addEventListener("click",(function(){n.remove(r)})),i.appendChild(a)}return i}}],[{key:"pluginName",get:function(){return"toast"}},{key:"defaultConfig",get:function(){return{index:5}}}]),r}();function SourceIcon(){return(new DOMParser).parseFromString('<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M12.7123 1C11.85 1 11.1173 1.55472 10.8516 2.32675L4.94973 2.32675C3.16413 2.32675 1.71662 3.77427 1.71662 5.55987C1.71662 7.34547 3.16413 8.79298 4.94973 8.79298L11.0483 8.79298L11.1134 8.79418C11.9936 8.82748 12.697 9.55166 12.697 10.44C12.697 11.3497 11.9596 12.0871 11.05 12.0871H5.01323C4.67882 11.4781 4.03143 11.0654 3.28763 11.0654C2.20111 11.0654 1.32031 11.9462 1.32031 13.0327C1.32031 14.1192 2.20111 15 3.28763 15C4.14992 15 4.88264 14.4452 5.14834 13.6732H11.05C12.8356 13.6732 14.2831 12.2256 14.2831 10.44C14.2831 8.65444 12.8356 7.20693 11.05 7.20693L4.94973 7.20693C4.04009 7.20693 3.30267 6.46951 3.30267 5.55987C3.30267 4.65022 4.04009 3.91281 4.94973 3.91281L10.9866 3.91281C11.321 4.52183 11.9685 4.93464 12.7123 4.93464C13.7988 4.93464 14.6796 4.05384 14.6796 2.96732C14.6796 1.8808 13.7988 1 12.7123 1ZM12.7123 2.18954C12.2827 2.18954 11.9345 2.53777 11.9345 2.96732C11.9345 3.39688 12.2827 3.7451 12.7123 3.7451C13.1418 3.7451 13.4901 3.39688 13.4901 2.96732C13.4901 2.53777 13.1418 2.18954 12.7123 2.18954ZM2.50986 13.0327C2.50986 12.6031 2.85808 12.2549 3.28763 12.2549C3.71719 12.2549 4.06541 12.6031 4.06541 13.0327C4.06541 13.4622 3.71719 13.8105 3.28763 13.8105C2.85808 13.8105 2.50986 13.4622 2.50986 13.0327Z" fill="#FFFFFF"/>\n</svg>',"image/svg+xml").firstChild}var mobilePanel="",MobilePlayerPanel=function(){function e(t){_classCallCheck$1(this,e),_defineProperty$1(this,"_root",void 0),_defineProperty$1(this,"_config",void 0),_defineProperty$1(this,"_parent",void 0),_defineProperty$1(this,"_listDom",void 0),_defineProperty$1(this,"_container",void 0),_defineProperty$1(this,"_titleDom",void 0),_defineProperty$1(this,"_player",void 0),_defineProperty$1(this,"_delegates",void 0),_defineProperty$1(this,"_listType",void 0);var r=t.config,n=t.root,i=t.player;this._config=r,this._parent=n,this._player=i,this._listType=r.listType,this.renderPanel(),this._initEvents(),this._bindDomEvent()}return _createClass$1(e,[{key:"changeMode",value:function(e){this.updatePanel(e),this._listType=e}},{key:"renderItemList",value:function(e){var t,r=this,n=this._config;return e&&(n.list=e),this._listDom||(this._listDom=util.createDom("div","",{},"item-list-panel-content")),this._listDom.innerHTML="",null===(t=n.list)||void 0===t||_mapInstanceProperty(t).call(t,(function(e,t){var n,i,o=e.selected?"panel-item select-in":"panel-item ".concat(null!==(n=e.className)&&void 0!==n?n:"");e["data-index"]=t;var a=util.createDom("div","",e,o);e.showText&&("string"==typeof e.showText?a.innerHTML=e.showText:a.appendChild(e.showText)),null===(i=r._listDom)||void 0===i||i.appendChild(a)})),this._listDom}},{key:"renderTitle",value:function(){var e,t,r=this._player.config.i18nManager;if(null!==(e=this._config.panel)&&void 0!==e&&e.title&&this._listType!==ListType.Inner)return this._titleDom||(this._titleDom=util.createDom("div","",{},"xg-mobile-panel-title")),this._titleDom.innerHTML=r.normalize(null===(t=this._config.panel)||void 0===t?void 0:t.title),this._titleDom}},{key:"updatePanel",value:function(e){this._root&&util.removeClass(this._root,"panel-".concat(this._listType)),this._root&&util.addClass(this._root,"panel-".concat(e));var t="mobile"===sniffer.device?"touchend":"click";e===ListType.Inner?this._container&&this._bind(this._container,t,this._handleHide.bind(this)):this._container&&this._unbind(this._container,t,this._handleHide.bind(this))}},{key:"renderPanel",value:function(){var e,t,r,n=_concatInstanceProperty2(e="xg-mobile-panel panel-".concat(this._config.listType," ")).call(e,null!==(t=null===(r=this._config)||void 0===r||null===(r=r.panel)||void 0===r?void 0:r.className)&&void 0!==t?t:"");this._root=util.createDom("div","",{},n),this._parent&&this._parent.appendChild(this._root);var i=this.renderTitle(),o=this.renderItemList();this._container=util.createDom("div","",{},"xg-mobile-panel-content"),this._root.appendChild(this._container),i&&this._container.appendChild(i),o&&this._container.appendChild(o)}},{key:"show",value:function(){this._root&&(util.removeClass(this._root,"hide"),util.addClass(this._root,"active"))}},{key:"hide",value:function(){this._root&&(util.removeClass(this._root,"active"),util.addClass(this._root,"hide"))}},{key:"destroy",value:function(){this._parent&&this._root&&this._parent.removeChild(this._root),this._unbindDomEvent(),this._unbindEvents()}},{key:"_bind",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e&&"on".concat(t)in e&&"function"==typeof r&&e.addEventListener(t,r,n)}},{key:"_unbind",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e&&"on".concat(t)in e&&"function"==typeof r&&e.removeEventListener(t,r,n)}},{key:"_initEvents",value:function(){var e;this._config.isAutoChange&&(window.addEventListener("orientationchange",this._handleOrientationChange.bind(this)),null===(e=this._player)||void 0===e||e.on(FULLSCREEN_CHANGE,this._handleOrientationChange.bind(this)))}},{key:"_unbindEvents",value:function(){var e;window.removeEventListener("orientationchange",this._handleOrientationChange.bind(this)),null===(e=this._player)||void 0===e||e.off(FULLSCREEN_CHANGE,this._handleOrientationChange.bind(this))}},{key:"_handleOrientationChange",value:function(){var e,t,r,n=_includesInstanceProperty2(e=[90,-90,"90","-90"]).call(e,window.orientation);if(null!==(t=this._player)&&void 0!==t&&t.fullscreen&&n)this.changeMode(ListType.Fullscreen);else if(this._listType!==(null===(r=this._config)||void 0===r?void 0:r.listType)){var i;this.changeMode(null===(i=this._config)||void 0===i?void 0:i.listType)}}},{key:"_bindDomEvent",value:function(){var e="mobile"===sniffer.device?"touchend":"click";this._listType===ListType.Inner&&this._container&&this._bind(this._container,e,this._handleHide.bind(this)),this._root&&this._bind(this._root,e,this._handleHide.bind(this)),this._container&&this._bind(this._container,e,this._stopPropagation),this._listDom&&(this._delegates=Plugin.delegate.call(this,this._listDom,".panel-item",e,this._onItemClick.bind(this),!0))}},{key:"_unbindDomEvent",value:function(){var e,t="mobile"===sniffer.device?"touchend":"click";(this._root&&this._unbind(this._root,t,this._handleHide.bind(this)),this._container&&this._unbind(this._container,t,this._handleHide.bind(this)),this._container&&this._unbind(this._container,t,this._stopPropagation),this._delegates)&&(_mapInstanceProperty(e=this._delegates).call(e,(function(e){e.destroy&&e.destroy()})),this._delegates=null)}},{key:"_stopPropagation",value:function(e){e.stopPropagation(),e.preventDefault()}},{key:"_onItemClick",value:function(e){var t,r,n,i,o=e.delegateTarget,a="function"==typeof this._config.onOptionClick?this._config.onOptionClick:null,s="function"==typeof this._config.onItemClick?this._config.onItemClick:null,l=null===(t=this._root)||void 0===t?void 0:t.querySelector(".selected");util.addClass(o,"selected"),l&&(util.removeClass(l,"selected"),i=Number(l.getAttribute("data-index")));var c=Number(o.getAttribute("data-index")),u={from:void 0!==_typeof$1(i)?null===(r=this._config.list)||void 0===r?void 0:r[i]:void 0,to:null===(n=this._config.list)||void 0===n?void 0:n[c]};null==a||a(e,u),o&&i===c||null==s||s(e,u)}},{key:"_handleHide",value:function(e){var t,r;e.stopPropagation(),e.preventDefault(),null===(t=(r=this._config).hide)||void 0===t||t.call(r)}}]),e}(),optionsIcon="",ListType=function(e){return e.Middle="middle",e.Bottom="bottom",e.Fullscreen="fullscreen",e.Inner="inner",e}(ListType||{}),RenderType=function(e){return e.Icon="Icon",e.Text="Text",e}(RenderType||{}),isMobile$1="mobile"===sniffer.device,MOBILE_LIST_TYPES=["bottom","fullscreen","inner"],PC_LIST_TYPES=["middle"],MODAL_TYPES=["bottom","inner","fullscreen"],CUSTOM_TYPES=["bottom","inner","fullscreen"],OptionsIcon=function(e){_inherits(r,Plugin);var t=_createSuper(r);function r(e){var n;return _classCallCheck$1(this,r),_defineProperty$1(_assertThisInitialized(n=t.call(this,e)),"optionsList",void 0),_defineProperty$1(_assertThisInitialized(n),"_isIcon",void 0),_defineProperty$1(_assertThisInitialized(n),"_isActive",void 0),_defineProperty$1(_assertThisInitialized(n),"_curIndex",void 0),_defineProperty$1(_assertThisInitialized(n),"activeEvent",void 0),_defineProperty$1(_assertThisInitialized(n),"onEnter",(function(e){e.preventDefault(),e.stopPropagation(),n.emit("icon_mouseenter",{pluginName:n.pluginName}),n.toggle(!0)})),_defineProperty$1(_assertThisInitialized(n),"onLeave",(function(e){e.preventDefault(),e.stopPropagation(),n.emit("icon_mouseleave",{pluginName:n.pluginName}),n._isActive&&n.toggle(!1)})),n._isIcon=!1,n._isActive=!1,n._curIndex=0,n}return _createClass$1(r,[{key:"updateLang",value:function(){this.config.list&&this.renderItemList(this.config.list,this._curIndex)}},{key:"afterCreate",value:function(){var e=this,t=this.config;this.config.listType=this._getListType(),this.initIcons(),t.hidePortrait&&util.addClass(this.root,"portrait"),isMobile$1&&this.on(PLAYER_FOCUS,(function(){e._isActive&&(e.optionsList&&e.optionsList.hide(),e._isActive=!1)})),t.list&&this.renderItemList(t.list),this.activeEvent=isMobile$1?"touchend":"mouseenter",this.bind(this.activeEvent,this.onEnter),this.bind("mouseleave",this.onLeave)}},{key:"initIcons",value:function(){var e=this,t=this.icons,r=_Object$keys(t);if(r.length>0&&"Icon"===this.config.renderType)return r.forEach((function(r){e.appendChild(".xgplayer-icon",t[r])})),void(this._isIcon=!0);var n=this.appendChild(".xgplayer-icon",util.createDom("span","",{},"icon-text"));n&&util.addClass(n,"btn-text")}},{key:"show",value:function(){!this.config.list||this.config.list.length<1||this.config.hideOnSingleOption&&1===this.config.list.length||util.addClass(this.root,"show")}},{key:"hide",value:function(){util.removeClass(this.root,"show")}},{key:"toggle",value:function(e){if(e!==this._isActive){var t=this.player.controls,r=this.config.listType;e?(r&&_includesInstanceProperty2(MODAL_TYPES).call(MODAL_TYPES,r)?null==t||t.blur():null==t||t.focus(),this.optionsList&&this.optionsList.show()):(r&&_includesInstanceProperty2(MODAL_TYPES).call(MODAL_TYPES,r)?null==t||t.focus():null==t||t.focusAwhile(),this.optionsList&&this.optionsList.hide()),this._isActive=e}}},{key:"onItemClick",value:function(e,t){var r;e.preventDefault(),e.stopPropagation();var n=this.config.listType;this._curIndex=null===(r=t.to)||void 0===r?void 0:r.index,this.changeCurrentText(),(this.config.isItemClickHide||n&&_includesInstanceProperty2(MODAL_TYPES).call(MODAL_TYPES,n))&&this.toggle(!1)}},{key:"onOptionClick",value:function(e,t){e.preventDefault(),e.stopPropagation()}},{key:"changeCurrentText",value:function(){if(!this._isIcon){var e=this.config.list,t=e&&this._curIndex<e.length?this._curIndex:0,r=null==e?void 0:e[t];if(r){var n,i=_findInstanceProperty2(this).call(this,".icon-text"),o=this.player.config.i18nManager;if(i)i.innerHTML=o.normalize(null!==(n=null==r?void 0:r.iconText)&&void 0!==n?n:null==r?void 0:r.text)}}}},{key:"renderItemList",value:function(e,t){var n,i=this,o=this.config,a=this.optionsList,s=this.player;if("number"==typeof t&&(this._curIndex=t),a)return a.renderItemList(e),this.changeCurrentText(),void(a instanceof MobilePlayerPanel&&a.renderTitle());this.config.isShowIcon&&(this.optionsList=o.listType&&_includesInstanceProperty2(CUSTOM_TYPES).call(CUSTOM_TYPES,o.listType)?new MobilePlayerPanel({config:{list:e||[],onItemClick:function(e,t){i.onItemClick(e,t)},onOptionClick:function(e,t){i.onOptionClick(e,t)},panel:this.config.panel,listType:null!==(n=o.listType)&&void 0!==n?n:r.defaultConfig.listType,isAutoChange:o.isAutoChange,hide:function(){return i.toggle(!1)}},root:s.root,player:s}):new OptionList({config:{data:e||[],onItemClick:function(e,t){i.onItemClick(e,t)}},root:this.root}),this.changeCurrentText(),this.show())}},{key:"destroy",value:function(){this.activeEvent&&this.unbind(this.activeEvent,this.onEnter),this.unbind("mouseleave",this.onLeave),this.optionsList&&(this.optionsList.destroy(),this.optionsList=void 0)}},{key:"render",value:function(){return this.config.isShowIcon?'<xg-icon class="xg-options-icon '.concat(this.config.className||"",'">\n <div class="xgplayer-icon">\n </div>\n </xg-icon>'):""}},{key:"_getListType",value:function(){var e,t=this.config.listType;return null!==(e=this.player)&&void 0!==e&&null!==(e=e.config)&&void 0!==e&&e.listType&&(t=this.player.config.listType),isMobile$1||t&&_includesInstanceProperty2(MOBILE_LIST_TYPES).call(MOBILE_LIST_TYPES,t)||(t="bottom"),isMobile$1||t&&_includesInstanceProperty2(PC_LIST_TYPES).call(PC_LIST_TYPES,t)||(t="middle"),t}}],[{key:"pluginName",get:function(){return"optionsIcon"}},{key:"defaultConfig",get:function(){return{position:isMobile$1?POSITIONS.ROOT_TOP_RIGHT:POSITIONS.CONTROLS_RIGHT,listType:isMobile$1?"bottom":"middle",index:100,list:[],listStyle:{},hidePortrait:!0,isShowIcon:!1,renderType:isMobile$1?"Icon":"Text",isItemClickHide:!0,hideOnSingleOption:!0,isAutoChange:!0}}}]),r}(),Sources=function(e){_inherits(r,OptionsIcon);var t=_createSuper(r);function r(){return _classCallCheck$1(this,r),t.apply(this,arguments)}return _createClass$1(r,[{key:"updateLang",value:function(){this.renderItemList()}},{key:"beforeCreate",value:function(e){var t=e.player.config.sources.sourceManager;e.config.list=t.sources}},{key:"registerIcons",value:function(){return{source:{icon:SourceIcon}}}},{key:"renderItemList",value:function(){var e=this.config.sourceManager,t=e.sources,n=e.source,i=this.player.config.i18nManager;if(t.length<2)this.hide();else{var o=_mapInstanceProperty(t).call(t,(function(e){var t;return _objectSpread2$1(_objectSpread2$1({},e),{},{showText:null!==(t=i.normalize(e.text))&&void 0!==t?t:e.name,selected:!1})})),a=_findIndexInstanceProperty(o).call(o,(function(e){return e.name===(null==n?void 0:n.name)}));this.config.list=t,a>-1&&(o[a].selected=!0),_get(_getPrototypeOf(r.prototype),"renderItemList",this).call(this,o,a)}}},{key:"onItemClick",value:function(e,t){var n,i=this;_get(_getPrototypeOf(r.prototype),"onItemClick",this).call(this,e,t),null===(n=this.player.config)||void 0===n||n.veplayer.switch({source:t.to.name},{fallbackToFirstDefinition:!0}).catch((function(){i.renderItemList()}))}}],[{key:"pluginName",get:function(){return"sources"}},{key:"defaultConfig",get:function(){return _objectSpread2$1(_objectSpread2$1({},OptionsIcon.defaultConfig),{},{index:4,panel:{title:{jp:"ライン選ぶ",en:"Line Choose","zh-cn":"线路选择","zh-hk":"線路選擇"}},list:[],className:"xgplayer-sources",hidePortrait:!1,isShowIcon:!0})}},{key:"textTips",get:function(){return{jp:"ライン",en:"Line","zh-cn":"线路","zh-hk":"線路"}}}]),r}();function DefinitionIcon(){return(new DOMParser).parseFromString('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M16 3.8001H4C3.55817 3.8001 3.2 4.15827 3.2 4.6001V12.6001C3.2 13.0419 3.55817 13.4001 4 13.4001H16C16.4418 13.4001 16.8 13.0419 16.8 12.6001V4.6001C16.8 4.15827 16.4418 3.8001 16 3.8001ZM4 2.6001C2.89543 2.6001 2 3.49553 2 4.6001V12.6001C2 13.7047 2.89543 14.6001 4 14.6001H16C17.1046 14.6001 18 13.7047 18 12.6001V4.6001C18 3.49553 17.1046 2.6001 16 2.6001H4ZM5.0249 6.24509V11.6001H5.9024V9.23009H8.6174V11.6001H9.4949V6.24509H8.6174V8.48009H5.9024V6.24509H5.0249ZM10.5474 6.24509V11.6001H12.5049C13.3749 11.6001 14.0274 11.3601 14.4774 10.8801C14.9049 10.4226 15.1224 9.77009 15.1224 8.92259C15.1224 8.06759 14.9049 7.41509 14.4774 6.96509C14.0274 6.48509 13.3749 6.24509 12.5049 6.24509H10.5474ZM11.4249 6.99509H12.3399C13.0074 6.99509 13.4949 7.14509 13.8024 7.45259C14.1024 7.75259 14.2524 8.24759 14.2524 8.92259C14.2524 9.58259 14.1024 10.0701 13.8024 10.3851C13.4949 10.6926 13.0074 10.8501 12.3399 10.8501H11.4249V6.99509ZM4.15 16.1001C3.79101 16.1001 3.5 16.3911 3.5 16.7501C3.5 17.1091 3.79101 17.4001 4.15 17.4001H15.85C16.209 17.4001 16.5 17.1091 16.5 16.7501C16.5 16.3911 16.209 16.1001 15.85 16.1001H4.15Z" fill="#ffffff"/>\n</svg>',"image/svg+xml").firstChild}var lodash_clonedeep={exports:{}};lodash_clonedeep.exports,function(e,t){var r="__lodash_hash_undefined__",n=9007199254740991,i="[object Arguments]",o="[object Boolean]",a="[object Date]",s="[object Function]",l="[object GeneratorFunction]",c="[object Map]",u="[object Number]",p="[object Object]",f="[object Promise]",h="[object RegExp]",d="[object Set]",y="[object String]",g="[object Symbol]",$="[object WeakMap]",v="[object ArrayBuffer]",_="[object DataView]",m="[object Float32Array]",E="[object Float64Array]",S="[object Int8Array]",b="[object Int16Array]",P="[object Int32Array]",T="[object Uint8Array]",I="[object Uint8ClampedArray]",O="[object Uint16Array]",A="[object Uint32Array]",C=/\w*$/,R=/^\[object .+?Constructor\]$/,w=/^(?:0|[1-9]\d*)$/,k={};k[i]=k["[object Array]"]=k[v]=k[_]=k[o]=k[a]=k[m]=k[E]=k[S]=k[b]=k[P]=k[c]=k[u]=k[p]=k[h]=k[d]=k[y]=k[g]=k[T]=k[I]=k[O]=k[A]=!0,k["[object Error]"]=k[s]=k[$]=!1;var N="object"==_typeof$1(commonjsGlobal)&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,L="object"==("undefined"==typeof self?"undefined":_typeof$1(self))&&self&&self.Object===Object&&self,D=N||L||Function("return this")(),x=t&&!t.nodeType&&t,M=x&&e&&!e.nodeType&&e,j=M&&M.exports===x;function F(e,t){return e.set(t[0],t[1]),e}function U(e,t){return e.add(t),e}function H(e,t,r,n){var i=-1,o=e?e.length:0;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}function B(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function G(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function K(e,t){return function(r){return e(t(r))}}function V(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}var Y,W=Array.prototype,z=Function.prototype,q=Object.prototype,X=D["__core-js_shared__"],Z=(Y=/[^.]+$/.exec(X&&_keysInstanceProperty2(X)&&_keysInstanceProperty2(X).IE_PROTO||""))?"Symbol(src)_1."+Y:"",J=z.toString,Q=q.hasOwnProperty,ee=q.toString,te=RegExp("^"+J.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),re=j?D.Buffer:void 0,ne=D.Symbol,ie=D.Uint8Array,oe=K(_Object$getPrototypeOf2,Object),ae=Object.create,se=q.propertyIsEnumerable,le=_spliceInstanceProperty2(W),ce=_Object$getOwnPropertySymbols2,ue=re?re.isBuffer:void 0,pe=K(_Object$keys,Object),fe=Me(D,"DataView"),he=Me(D,"Map"),de=Me(D,"Promise"),ye=Me(D,"Set"),ge=Me(D,"WeakMap"),$e=Me(Object,"create"),ve=Be(fe),_e=Be(he),me=Be(de),Ee=Be(ye),Se=Be(ge),be=ne?ne.prototype:void 0,Pe=be?be.valueOf:void 0;function Te(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Ie(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Oe(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Ae(e){this.__data__=new Ie(e)}function Ce(e,t){var r=Ke(e)||function(e){return function(e){return function(e){return!!e&&"object"==_typeof$1(e)}(e)&&Ve(e)}(e)&&Q.call(e,"callee")&&(!se.call(e,"callee")||ee.call(e)==i)}(e)?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],n=r.length,o=!!n;for(var a in e)!t&&!Q.call(e,a)||o&&("length"==a||Ue(a,n))||r.push(a);return r}function Re(e,t,r){var n=e[t];Q.call(e,t)&&Ge(n,r)&&(void 0!==r||t in e)||(e[t]=r)}function we(e,t){for(var r=e.length;r--;)if(Ge(e[r][0],t))return r;return-1}function ke(e,t,r,n,f,$,R){var w;if(n&&(w=$?n(e,f,$,R):n(e)),void 0!==w)return w;if(!ze(e))return e;var N=Ke(e);if(N){if(w=function(e){var t=e.length,r=e.constructor(t);t&&"string"==typeof e[0]&&Q.call(e,"index")&&(r.index=e.index,r.input=e.input);return r}(e),!t)return function(e,t){var r=-1,n=e.length;t||(t=Array(n));for(;++r<n;)t[r]=e[r];return t}(e,w)}else{var L=Fe(e),D=L==s||L==l;if(Ye(e))return function(e,t){if(t)return _sliceInstanceProperty2(e).call(e);var r=new e.constructor(e.length);return e.copy(r),r}(e,t);if(L==p||L==i||D&&!$){if(B(e))return $?e:{};if(w=function(e){return"function"!=typeof e.constructor||He(e)?{}:function(e){return ze(e)?ae(e):{}}(oe(e))}(D?{}:e),!t)return function(e,t){return De(e,je(e),t)}(e,function(e,t){return e&&De(t,qe(t),e)}(w,e))}else{if(!k[L])return $?e:{};w=function(e,t,r,n){var i=e.constructor;switch(t){case v:return Le(e);case o:case a:return new i(+e);case _:return function(e,t){var r=t?Le(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,n);case m:case E:case S:case b:case P:case T:case I:case O:case A:return function(e,t){var r=t?Le(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}(e,n);case c:return function(e,t,r){var n=t?r(G(e),!0):G(e);return H(n,F,new e.constructor)}(e,n,r);case u:case y:return new i(e);case h:return function(e){var t=new e.constructor(e.source,C.exec(e));return t.lastIndex=e.lastIndex,t}(e);case d:return function(e,t,r){var n=t?r(V(e),!0):V(e);return H(n,U,new e.constructor)}(e,n,r);case g:return s=e,Pe?Object(Pe.call(s)):{}}var s}(e,L,ke,t)}}R||(R=new Ae);var x=R.get(e);if(x)return x;if(R.set(e,w),!N)var M=r?function(e){return function(e,t,r){var n=t(e);return Ke(e)?n:function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}(n,r(e))}(e,qe,je)}(e):qe(e);return function(e,t){for(var r=-1,n=e?e.length:0;++r<n&&!1!==t(e[r],r,e););}(M||e,(function(i,o){M&&(i=e[o=i]),Re(w,o,ke(i,t,r,n,o,e,R))})),w}function Ne(e){return!(!ze(e)||(t=e,Z&&Z in t))&&(We(e)||B(e)?te:R).test(Be(e));var t}function Le(e){var t=new e.constructor(e.byteLength);return new ie(t).set(new ie(e)),t}function De(e,t,r,n){r||(r={});for(var i=-1,o=t.length;++i<o;){var a=t[i],s=n?n(r[a],e[a],a,r,e):void 0;Re(r,a,void 0===s?e[a]:s)}return r}function xe(e,t){var r,n,i=e.__data__;return("string"==(n=_typeof$1(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:_mapInstanceProperty(i)}function Me(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return Ne(r)?r:void 0}Te.prototype.clear=function(){this.__data__=$e?$e(null):{}},Te.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Te.prototype.get=function(e){var t=this.__data__;if($e){var n=t[e];return n===r?void 0:n}return Q.call(t,e)?t[e]:void 0},Te.prototype.has=function(e){var t=this.__data__;return $e?void 0!==t[e]:Q.call(t,e)},Te.prototype.set=function(e,t){return this.__data__[e]=$e&&void 0===t?r:t,this},Ie.prototype.clear=function(){this.__data__=[]},Ie.prototype.delete=function(e){var t=this.__data__,r=we(t,e);return!(r<0)&&(r==t.length-1?t.pop():le.call(t,r,1),!0)},Ie.prototype.get=function(e){var t=this.__data__,r=we(t,e);return r<0?void 0:t[r][1]},Ie.prototype.has=function(e){return we(this.__data__,e)>-1},Ie.prototype.set=function(e,t){var r=this.__data__,n=we(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},Oe.prototype.clear=function(){this.__data__={hash:new Te,map:new(he||Ie),string:new Te}},Oe.prototype.delete=function(e){return xe(this,e).delete(e)},Oe.prototype.get=function(e){return xe(this,e).get(e)},Oe.prototype.has=function(e){return xe(this,e).has(e)},Oe.prototype.set=function(e,t){return xe(this,e).set(e,t),this},Ae.prototype.clear=function(){this.__data__=new Ie},Ae.prototype.delete=function(e){return this.__data__.delete(e)},Ae.prototype.get=function(e){return this.__data__.get(e)},Ae.prototype.has=function(e){return this.__data__.has(e)},Ae.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Ie){var n=r.__data__;if(!he||n.length<199)return n.push([e,t]),this;r=this.__data__=new Oe(n)}return r.set(e,t),this};var je=ce?K(ce,Object):function(){return[]},Fe=function(e){return ee.call(e)};function Ue(e,t){return!!(t=null==t?n:t)&&("number"==typeof e||w.test(e))&&e>-1&&e%1==0&&e<t}function He(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||q)}function Be(e){if(null!=e){try{return J.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ge(e,t){return e===t||e!=e&&t!=t}(fe&&Fe(new fe(new ArrayBuffer(1)))!=_||he&&Fe(new he)!=c||de&&Fe(de.resolve())!=f||ye&&Fe(new ye)!=d||ge&&Fe(new ge)!=$)&&(Fe=function(e){var t=ee.call(e),r=t==p?e.constructor:void 0,n=r?Be(r):void 0;if(n)switch(n){case ve:return _;case _e:return c;case me:return f;case Ee:return d;case Se:return $}return t});var Ke=Array.isArray;function Ve(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}(e.length)&&!We(e)}var Ye=ue||function(){return!1};function We(e){var t=ze(e)?ee.call(e):"";return t==s||t==l}function ze(e){var t=_typeof$1(e);return!!e&&("object"==t||"function"==t)}function qe(e){return Ve(e)?Ce(e):function(e){if(!He(e))return pe(e);var t=[];for(var r in Object(e))Q.call(e,r)&&"constructor"!=r&&t.push(r);return t}(e)}e.exports=function(e){return ke(e,!0,!0)}}(lodash_clonedeep,lodash_clonedeep.exports);var lodash_clonedeepExports=lodash_clonedeep.exports,clonedeep=getDefaultExportFromCjs(lodash_clonedeepExports),DefinitionPlugin=function(e){_inherits(n,OptionsIcon);var t,r=_createSuper(n);function n(){var e,t;_classCallCheck$1(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return _defineProperty$1(_assertThisInitialized(t=r.call.apply(r,_concatInstanceProperty2(e=[this]).call(e,o))),"_waitingStartTime",0),_defineProperty$1(_assertThisInitialized(t),"_timer",void 0),_defineProperty$1(_assertThisInitialized(t),"_toastId",void 0),t}return _createClass$1(n,[{key:"updateLang",value:function(){this.renderItemList()}},{key:"beforeCreate",value:function(e){var t,r=e.player.config.sources.sourceManager;e.config.list=null===(t=r.source)||void 0===t?void 0:t.definitions}},{key:"afterCreate",value:function(){var e,t;_get(_getPrototypeOf(n.prototype),"afterCreate",this).call(this),(null!==(e=null===(t=this.player.config.sourceManager.source)||void 0===t?void 0:t.definitions)&&void 0!==e?e:[]).length<2?this.hide():(this.renderItemList(),this.on(Events.WAITING,this._waiting.bind(this)),this.on(Events.PLAYING,this._clearTimer.bind(this)),this.on(Events.PAUSE,this._clearTimer.bind(this)),this.on(Events.PLAY,this._clearTimer.bind(this)),this._initTimeUpdateEvent())}},{key:"registerIcons",value:function(){return{source:{icon:DefinitionIcon}}}},{key:"renderItemList",value:function(){var e,t,r,i=this,o=this.player.config.sourceManager,a=null!==(e=null===(t=o.source)||void 0===t?void 0:t.definitions)&&void 0!==e?e:[];if(a.length<2)this.hide();else{var s=_mapInstanceProperty(a).call(a,(function(e){var t;return{url:e.url,definition:e.definition||"",showText:null!==(t=i.player.config.i18nManager.normalize(e.text))&&void 0!==t?t:e.definition,selected:!1}})),l=_findIndexInstanceProperty(a).call(a,(function(e){var t;return e.definition===(null===(t=o.definition)||void 0===t?void 0:t.definition)}));this.config.list=null===(r=o.source)||void 0===r?void 0:r.definitions,l>-1&&(s[l].selected=!0),_get(_getPrototypeOf(n.prototype),"renderItemList",this).call(this,s,l)}}},{key:"onItemClick",value:function(e,t){var r,i=this;this._showToast(t.to),_get(_getPrototypeOf(n.prototype),"onItemClick",this).call(this,e,t),null===(r=this.player.config)||void 0===r||r.veplayer.switch({definition:t.to.definition}).catch((function(){i.renderItemList()}))}},{key:"fallback",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t,r,n,i,o,a,s,l=arguments;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=l.length>0&&void 0!==l[0]?l[0]:{toast:!0},i=this.player.config.sourceManager,!((o=_findIndexInstanceProperty(t=this.config.demotePriority).call(t,(function(e){var t;return e===(null===(t=i.definition)||void 0===t?void 0:t.definition)})))<0)){e.next=5;break}return e.abrupt("return");case 5:if(a=clonedeep(i.definition),s=this._getNextDefinition(o)){e.next=9;break}return e.abrupt("return");case 9:if(!n.toast){e.next=15;break}return e.next=12,this._toast(s);case 12:if(e.sent){e.next=15;break}return e.abrupt("return");case 15:this.player.emit(Events.DEFINITION_FALLBACK,{from:a,to:s}),null===(r=this.player.config)||void 0===r||r.veplayer.switch({definition:s.definition}).catch((function(){}));case 17:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"_waiting",value:function(){var e=this;if(!this._timer){this._waitingStartTime=Date.now();var t=this.player.currentTime;this._timer=window.setTimeout((function(){e.player&&e.player.currentTime<=t+.1&&(e.player.emit(Events.LONG_WAITING),e.config.needFallback&&e.fallback({toast:!0}),e._clearTimer())}),this.config.longWaitingTime)}}},{key:"_clearTimer",value:function(){this._timer&&(clearTimeout(this._timer),this._timer=void 0),this._waitingStartTime&&(this._waitingStartTime=0)}},{key:"_toast",value:function(e){var t=this,r=this.player.config.i18nManager;return new _Promise((function(n){var i,o,a=null===(i=t.player)||void 0===i?void 0:i.getPlugin("toast");if(a){var s=util.createDom("div",r.getText("DEFINITION_FALLBACK_TOAST"),void 0,"veplayer-toast-txt"),l=null!==(o=t.player.config.i18nManager.normalize(e.text))&&void 0!==o?o:e.definition,c=util.createDom("span",l,void 0,"veplayer-toast-txt-bt");s.appendChild(c);var u=a.toast(s,{duration:5e3,closable:!0});c.addEventListener("click",(function(){a.remove(u),n(!0)}))}else n(!1)}))}},{key:"_getNextDefinition",value:function(e){var t,r=this.player.config.sourceManager;if(null!==(t=r.source)&&void 0!==t&&t.definitions.length&&!(e+1>=this.config.demotePriority.length)){var n=e+1,i=_findInstanceProperty2(r).call(r,{definition:this.config.demotePriority[n]});return i||this._getNextDefinition(n)}}},{key:"_initTimeUpdateEvent",value:function(){var e=this,t=this.player.currentTime;this.on(Events.TIME_UPDATE,(function(){var r=e.player.currentTime;r!==t?(t=r,e._clearTimer()):t=r}))}},{key:"_showToast",value:function(e){var t,r,n,i=this,o=null===(t=this.player)||void 0===t?void 0:t.getPlugin("toast"),a=this.player.config.i18nManager;o&&(this._toastId&&o.remove(this._toastId),this._toastId=o.toast(_concatInstanceProperty2(r="".concat(a.getText("DEFINITION_SWITCHING")," ")).call(r,null!==(n=e.showText)&&void 0!==n?n:e.definition," ..."),{duration:2e3,closable:!0}),this.player.once(Events.AFTER_DEFINITION_CHANGE,(function(){void 0!==i._toastId&&o.remove(i._toastId)})))}}],[{key:"pluginName",get:function(){return"definition"}},{key:"defaultConfig",get:function(){return _objectSpread2$1(_objectSpread2$1({},OptionsIcon.defaultConfig),{},{index:3,list:[],panel:{title:{jp:"クラリティセレクション",en:"Definition Choose","zh-cn":"清晰度选择","zh-hk":"清晰度選擇"}},className:"xgplayer-definition",hidePortrait:!1,isShowIcon:!0,longWaitingTime:5e3,needFallback:!1,demotePriority:["uhd","hd","sd","ld","ao"]})}},{key:"textTips",get:function(){return{jp:"明快さ",en:"Definition","zh-cn":"清晰度","zh-hk":"清晰度"}}}]),n}(),NAME_MAP={"biz:vod":"veplayer.biz.vod.[env].[ext]","biz:live":"veplayer.biz.live.[env].[ext]","plugin:flv":"veplayer.plugin.flv.[env].[ext]","plugin:mp4":"veplayer.plugin.mp4.[env].[ext]","plugin:hls":"veplayer.plugin.hls.[env].[ext]","plugin:hlsjs":"veplayer.plugin.hlsjs.[env].[ext]","plugin:dashjs":"veplayer.plugin.dashjs.[env].[ext]","plugin:shaka":"veplayer.plugin.shaka.[env].[ext]","plugin:rtm":"veplayer.plugin.rtm.[env].[ext]","plugin:xgvideo":"veplayer.plugin.xgvideo.[env].[ext]","plugin:drm":"veplayer.plugin.drm.[env].[ext]","plugin:abr":"veplayer.plugin.abr.[env].[ext]","strategy:base":"veplayer.strategy.base.[env].[ext]","strategy:rtmAdaptiveBuffer":"veplayer.strategy.rtm.adaptive.buffer.[env].[ext]"},DynamicModule=function(e){return e.BizVod="biz:vod",e.BizLive="biz:live",e.PluginFlv="plugin:flv",e.PluginMp4="plugin:mp4",e.PluginHls="plugin:hls",e.PluginHlsJs="plugin:hlsjs",e.PluginDashJs="plugin:dashjs",e.PluginShaka="plugin:shaka",e.PluginRtm="plugin:rtm",e.PluginXgvideo="plugin:xgvideo",e.PluginDrm="plugin:drm",e.PluginAbr="plugin:abr",e.StrategyBase="strategy:base",e.StrategyRtmAdaptiveBuffer="strategy:rtmAdaptiveBuffer",e}(DynamicModule||{}),Loader=function(){function e(t){var r=this;_classCallCheck$1(this,e),_defineProperty$1(this,"modules",{}),_defineProperty$1(this,"mountPromiseMap",{}),_defineProperty$1(this,"_baseUrl",void 0),_defineProperty$1(this,"_moduleSystem",void 0),_defineProperty$1(this,"load",function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function e(t,n){var i,o,a,s,l;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r._moduleSystem){e.next=2;break}throw new Error('You have to specify moduleSystem first, call "setModuleSystem(moduleSystem)" to set module system');case 2:if(NAME_MAP[t]){e.next=4;break}throw new Error('Invalid module name: "'.concat(t,'"'));case 4:if("esm"!==r._moduleSystem){e.next=11;break}if(r.modules[t]){e.next=9;break}throw new Error('Dynamic module "'.concat(t,'" not found, you have to register it first under ESM'));case 9:return o=r.modules[t].exports,e.abrupt("return",null!==(i=o.default)&&void 0!==i?i:o);case 11:if(!r.modules[t]){e.next=21;break}if(1!==r.modules[t].state){e.next=16;break}return e.abrupt("return",r.modules[t].exports);case 16:if(0!==r.modules[t].state){e.next=20;break}return e.abrupt("return",r.mountPromiseMap[t].then((function(e){var t;return null!==(t=e.default)&&void 0!==t?t:e})));case 20:throw null!==(a=r.modules[t].error)&&void 0!==a?a:new Error('Dynamic module "'.concat(t,'" load failed.'));case 21:return s=[r._baseUrl,NAME_MAP[t]].join("/").replace("[env]","production").replace("[ext]","js"),l={src:null!=n?n:s,name:t,state:0,exports:{__PLUGIN_NAME__:t}},r.modules[t]=l,r.mountPromiseMap[t]=r._mount(l),e.abrupt("return",r.mountPromiseMap[t]);case 26:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),_defineProperty$1(this,"registerPlugin",(function(e,t){if(!r._moduleSystem)throw new Error("You have to specify moduleSystem first, call setModuleSystem(moduleSystem) to set module system");return"esm"===r._moduleSystem?(r.modules[e]={src:"esm:".concat(e),name:e,state:1,exports:t},r.modules[e].exports):(r.modules[e]?r.modules[e].exports=t:r.modules[e]={src:"umd:".concat(e),name:e,state:1,exports:t},r.modules[e].exports)})),_defineProperty$1(this,"register",(function(e){return _mapInstanceProperty(e).call(e,(function(e){return r.registerPlugin(e.__PLUGIN_NAME__,e)}))})),this._baseUrl=t.baseUrl}return _createClass$1(e,[{key:"baseUrl",get:function(){return this._baseUrl}},{key:"moduleSystem",get:function(){return this._moduleSystem}},{key:"setModuleSystem",value:function(e){this._moduleSystem=e}},{key:"setBaseUrl",value:function(e){this._baseUrl=e}},{key:"_mount",value:function(e){var t=this.modules;return new _Promise((function(r,n){var i=document.createElement("script");i.src=e.src,i.onload=function(){e.state=1,r(t[e.name].exports),i.onload=null},i.onerror=function(t){e.state=2,e.error=t,n(t),i.onerror=null},document.body.appendChild(i)}))}}]),e}(),reverse2=reverse$1,_reverseInstanceProperty2=getDefaultExportFromCjs(reverse2),FUNC_ERROR_TEXT="Expected a function",PLACEHOLDER="__lodash_placeholder__",BIND_FLAG=1,BIND_KEY_FLAG=2,CURRY_BOUND_FLAG=4,CURRY_FLAG=8,CURRY_RIGHT_FLAG=16,PARTIAL_FLAG=32,PARTIAL_RIGHT_FLAG=64,ARY_FLAG=128,REARG_FLAG=256,FLIP_FLAG=512,INFINITY=1/0,MAX_SAFE_INTEGER=9007199254740991,MAX_INTEGER=17976931348623157e292,NAN=NaN,wrapFlags=[["ary",ARY_FLAG],["bind",BIND_FLAG],["bindKey",BIND_KEY_FLAG],["curry",CURRY_FLAG],["curryRight",CURRY_RIGHT_FLAG],["flip",FLIP_FLAG],["partial",PARTIAL_FLAG],["partialRight",PARTIAL_RIGHT_FLAG],["rearg",REARG_FLAG]],funcTag="[object Function]",genTag="[object GeneratorFunction]",symbolTag="[object Symbol]",reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reTrim=/^\s+|\s+$/g,reWrapComment=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,reWrapDetails=/\{\n\/\* \[wrapped with (.+)\] \*/,reSplitDetails=/,? & /,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsHostCtor=/^\[object .+?Constructor\]$/,reIsOctal=/^0o[0-7]+$/i,reIsUint=/^(?:0|[1-9]\d*)$/,freeParseInt=_parseInt2,freeGlobal="object"==_typeof$1(commonjsGlobal)&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,freeSelf="object"==("undefined"==typeof self?"undefined":_typeof$1(self))&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")();function apply$1(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function arrayEach(e,t){for(var r=-1,n=e?e.length:0;++r<n&&!1!==t(e[r],r,e););return e}function arrayIncludes(e,t){return!!(e?e.length:0)&&baseIndexOf(e,t,0)>-1}function baseFindIndex(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function baseIndexOf(e,t,r){if(t!=t)return baseFindIndex(e,baseIsNaN,r);for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}function baseIsNaN(e){return e!=e}function countHolders(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&n++;return n}function getValue(e,t){return null==e?void 0:e[t]}function isHostObject(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function replaceHolders(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var a=e[r];a!==t&&a!==PLACEHOLDER||(e[r]=PLACEHOLDER,o[i++]=r)}return o}var funcProto=Function.prototype,objectProto=Object.prototype,coreJsData=root["__core-js_shared__"],maskSrcKey=function(){var e=/[^.]+$/.exec(coreJsData&&_keysInstanceProperty2(coreJsData)&&_keysInstanceProperty2(coreJsData).IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),funcToString=funcProto.toString,hasOwnProperty=objectProto.hasOwnProperty,objectToString=objectProto.toString,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),objectCreate=Object.create,nativeMax=Math.max,nativeMin=Math.min,defineProperty5=function(){var e=getNative(Object,"defineProperty"),t=getNative.name;return t&&t.length>2?e:void 0}();function baseCreate(e){return isObject(e)?objectCreate(e):{}}function baseIsNative(e){return!(!isObject(e)||isMasked(e))&&(isFunction(e)||isHostObject(e)?reIsNative:reIsHostCtor).test(toSource(e))}function composeArgs(e,t,r,n){for(var i=-1,o=e.length,a=r.length,s=-1,l=t.length,c=nativeMax(o-a,0),u=Array(l+c),p=!n;++s<l;)u[s]=t[s];for(;++i<a;)(p||i<o)&&(u[r[i]]=e[i]);for(;c--;)u[s++]=e[i++];return u}function composeArgsRight(e,t,r,n){for(var i=-1,o=e.length,a=-1,s=r.length,l=-1,c=t.length,u=nativeMax(o-s,0),p=Array(u+c),f=!n;++i<u;)p[i]=e[i];for(var h=i;++l<c;)p[h+l]=t[l];for(;++a<s;)(f||i<o)&&(p[h+r[a]]=e[i++]);return p}function copyArray(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function createBind(e,t,r){var n=t&BIND_FLAG,i=createCtor(e);return function t(){return(this&&this!==root&&this instanceof t?i:e).apply(n?r:this,arguments)}}function createCtor(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=baseCreate(e.prototype),n=e.apply(r,t);return isObject(n)?n:r}}function createCurry(e,t,r){var n=createCtor(e);return function i(){for(var o=arguments.length,a=Array(o),s=o,l=getHolder(i);s--;)a[s]=arguments[s];var c=o<3&&a[0]!==l&&a[o-1]!==l?[]:replaceHolders(a,l);return(o-=c.length)<r?createRecurry(e,t,createHybrid,i.placeholder,void 0,a,c,void 0,void 0,r-o):apply$1(this&&this!==root&&this instanceof i?n:e,this,a)}}function createHybrid(e,t,r,n,i,o,a,s,l,c){var u=t&ARY_FLAG,p=t&BIND_FLAG,f=t&BIND_KEY_FLAG,h=t&(CURRY_FLAG|CURRY_RIGHT_FLAG),d=t&FLIP_FLAG,y=f?void 0:createCtor(e);return function g(){for(var $=arguments.length,v=Array($),_=$;_--;)v[_]=arguments[_];if(h)var m=getHolder(g),E=countHolders(v,m);if(n&&(v=composeArgs(v,n,i,h)),o&&(v=composeArgsRight(v,o,a,h)),$-=E,h&&$<c){var S=replaceHolders(v,m);return createRecurry(e,t,createHybrid,g.placeholder,r,v,S,s,l,c-$)}var b=p?r:this,P=f?b[e]:e;return $=v.length,s?v=reorder(v,s):d&&$>1&&_reverseInstanceProperty2(v).call(v),u&&l<$&&(v.length=l),this&&this!==root&&this instanceof g&&(P=y||createCtor(P)),P.apply(b,v)}}function createPartial(e,t,r,n){var i=t&BIND_FLAG,o=createCtor(e);return function t(){for(var a=-1,s=arguments.length,l=-1,c=n.length,u=Array(c+s),p=this&&this!==root&&this instanceof t?o:e;++l<c;)u[l]=n[l];for(;s--;)u[l++]=arguments[++a];return apply$1(p,i?r:this,u)}}function createRecurry(e,t,r,n,i,o,a,s,l,c){var u=t&CURRY_FLAG;t|=u?PARTIAL_FLAG:PARTIAL_RIGHT_FLAG,(t&=~(u?PARTIAL_RIGHT_FLAG:PARTIAL_FLAG))&CURRY_BOUND_FLAG||(t&=~(BIND_FLAG|BIND_KEY_FLAG));var p=r(e,t,i,u?o:void 0,u?a:void 0,u?void 0:o,u?void 0:a,s,l,c);return p.placeholder=n,setWrapToString(p,e,t)}function createWrap(e,t,r,n,i,o,a,s){var l=t&BIND_KEY_FLAG;if(!l&&"function"!=typeof e)throw new TypeError(FUNC_ERROR_TEXT);var c=n?n.length:0;if(c||(t&=~(PARTIAL_FLAG|PARTIAL_RIGHT_FLAG),n=i=void 0),a=void 0===a?a:nativeMax(toInteger(a),0),s=void 0===s?s:toInteger(s),c-=i?i.length:0,t&PARTIAL_RIGHT_FLAG){var u=n,p=i;n=i=void 0}var f=[e,t,r,n,i,u,p,o,a,s];if(e=f[0],t=f[1],r=f[2],n=f[3],i=f[4],!(s=f[9]=null==f[9]?l?0:e.length:nativeMax(f[9]-c,0))&&t&(CURRY_FLAG|CURRY_RIGHT_FLAG)&&(t&=~(CURRY_FLAG|CURRY_RIGHT_FLAG)),t&&t!=BIND_FLAG)h=t==CURRY_FLAG||t==CURRY_RIGHT_FLAG?createCurry(e,t,s):t!=PARTIAL_FLAG&&t!=(BIND_FLAG|PARTIAL_FLAG)||i.length?createHybrid.apply(void 0,f):createPartial(e,t,r,n);else var h=createBind(e,t,r);return setWrapToString(h,e,t)}function getHolder(e){return e.placeholder}function getNative(e,t){var r=getValue(e,t);return baseIsNative(r)?r:void 0}function getWrapDetails(e){var t=e.match(reWrapDetails);return t?t[1].split(reSplitDetails):[]}function insertWrapDetails(e,t){var r=t.length,n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(reWrapComment,"{\n/* [wrapped with "+t+"] */\n")}function isIndex(e,t){return!!(t=null==t?MAX_SAFE_INTEGER:t)&&("number"==typeof e||reIsUint.test(e))&&e>-1&&e%1==0&&e<t}function isMasked(e){return!!maskSrcKey&&maskSrcKey in e}function reorder(e,t){for(var r=e.length,n=nativeMin(t.length,r),i=copyArray(e);n--;){var o=t[n];e[n]=isIndex(o,r)?i[o]:void 0}return e}var setWrapToString=defineProperty5?function(e,t,r){var n=t+"";return defineProperty5(e,"toString",{configurable:!0,enumerable:!1,value:constant(insertWrapDetails(n,updateWrapDetails(getWrapDetails(n),r)))})}:identity;function toSource(e){if(null!=e){try{return funcToString.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function updateWrapDetails(e,t){return arrayEach(wrapFlags,(function(r){var n="_."+r[0];t&r[1]&&!arrayIncludes(e,n)&&e.push(n)})),_sortInstanceProperty(e).call(e)}function curry(e,t,r){var n=createWrap(e,CURRY_FLAG,void 0,void 0,void 0,void 0,void 0,t=r?void 0:t);return n.placeholder=curry.placeholder,n}function isFunction(e){var t=isObject(e)?objectToString.call(e):"";return t==funcTag||t==genTag}function isObject(e){var t=_typeof$1(e);return!!e&&("object"==t||"function"==t)}function isObjectLike(e){return!!e&&"object"==_typeof$1(e)}function isSymbol(e){return"symbol"==_typeof$1(e)||isObjectLike(e)&&objectToString.call(e)==symbolTag}function toFinite(e){return e?(e=toNumber(e))===INFINITY||e===-INFINITY?(e<0?-1:1)*MAX_INTEGER:e==e?e:0:0===e?e:0}function toInteger(e){var t=toFinite(e),r=t%1;return t==t?r?t-r:t:0}function toNumber(e){if("number"==typeof e)return e;if(isSymbol(e))return NAN;if(isObject(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=isObject(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(reTrim,"");var r=reIsBinary.test(e);return r||reIsOctal.test(e)?freeParseInt(_sliceInstanceProperty2(e).call(e,2),r?2:8):reIsBadHex.test(e)?NAN:+e}function constant(e){return function(){return e}}function identity(e){return e}curry.placeholder={};var lodash_curry=curry,curry$1=getDefaultExportFromCjs(lodash_curry),apply=functionApply,toIndexedObject=toIndexedObject$c,toIntegerOrInfinity=toIntegerOrInfinity$6,lengthOfArrayLike=lengthOfArrayLike$c,arrayMethodIsStrict=arrayMethodIsStrict$5,min=Math.min,$lastIndexOf=[].lastIndexOf,NEGATIVE_ZERO=!!$lastIndexOf&&1/[1].lastIndexOf(1,-0)<0,STRICT_METHOD=arrayMethodIsStrict("lastIndexOf"),FORCED=NEGATIVE_ZERO||!STRICT_METHOD,arrayLastIndexOf=FORCED?function(e){if(NEGATIVE_ZERO)return apply($lastIndexOf,this,arguments)||0;var t=toIndexedObject(this),r=lengthOfArrayLike(t),n=r-1;for(arguments.length>1&&(n=min(n,toIntegerOrInfinity(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:$lastIndexOf,$$1=_export,lastIndexOf$7=arrayLastIndexOf;$$1({target:"Array",proto:!0,forced:arrayLastIndexOf!==[].lastIndexOf},{lastIndexOf:arrayLastIndexOf});var _document$currentScri,entryVirtual=entryVirtual$m,lastIndexOf$6=entryVirtual("Array").lastIndexOf,isPrototypeOf=objectIsPrototypeOf,method=lastIndexOf$6,ArrayPrototype=Array.prototype,lastIndexOf$5=function(e){var t=e.lastIndexOf;return e===ArrayPrototype||isPrototypeOf(ArrayPrototype,e)&&t===ArrayPrototype.lastIndexOf?method:t},parent$5=lastIndexOf$5,lastIndexOf$4=parent$5,parent$4=lastIndexOf$4,lastIndexOf$3=parent$4,parent$3=lastIndexOf$3,lastIndexOf$2=parent$3,lastIndexOf$1=lastIndexOf$2,lastIndexOf2=lastIndexOf$1,_lastIndexOfInstanceProperty=getDefaultExportFromCjs(lastIndexOf2),src=null===(_document$currentScri=document.currentScript)||void 0===_document$currentScri?void 0:_document$currentScri.src,baseUrl=_sliceInstanceProperty2(src).call(src,0,_lastIndexOfInstanceProperty(src).call(src,"/")),loader=new Loader({baseUrl:baseUrl});loader.registerPlugin;var register2=loader.register;function setModuleSystem(e){loader.setModuleSystem(e)}function load(e,t){return _load.apply(this,arguments)}function _load(){return(_load=_asyncToGenerator(_regeneratorRuntime().mark((function e(t,r){var n;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,loader.load(t,r);case 3:return e.abrupt("return",e.sent);case 6:throw e.prev=6,e.t0=e.catch(0),create$1(ErrorCode.MODULE_LOAD_ERROR,{ext:{name:t,cdn:null===e.t0||void 0===e.t0||null===(n=e.t0.target)||void 0===n?void 0:n.src},error:e.t0});case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))).apply(this,arguments)}var appendSearchParams=function(e,t){var r,n=getUrlObject(e);if(!e||!n)return null!==(r=e)&&void 0!==r?r:"";var i,o=_startsWithInstanceProperty(e).call(e,"//");for(var a in t){var s,l,c=t[a];if(null!=n&&n.searchParams.has(a))null==n||null===(s=n.searchParams)||void 0===s||s.set(a,c);else null==n||null===(l=n.searchParams)||void 0===l||l.append(a,c)}return e=n.toString(),o?null===(i=e)||void 0===i?void 0:i.replace(location.protocol,""):e},getUrlObject=function(e){if(e){_startsWithInstanceProperty(e).call(e,"//")&&(e=location.protocol+e);try{return new _URL2(e)}catch(e){return}}};function _createForOfIteratorHelper(e,t){var r=void 0!==_Symbol&&_getIteratorMethod$1(e)||e["@@iterator"];if(!r){if(_Array$isArray(e)||(r=_unsupportedIterableToArray$1(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function getAttributes(e){var t,r={},n=_createForOfIteratorHelper(e.attributes);try{for(n.s();!(t=n.n()).done;){var i=t.value;r[i.name]=i.value}}catch(e){n.e(e)}finally{n.f()}return r}function setAttributes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return _Object$keys(t).forEach((function(r){var n=r,i=t[r];i&&(null==e||e.setAttribute(n,i))})),e}function replaceAttributes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=getAttributes(e);return _Object$keys(r).forEach((function(r){t[r]?null==e||e.setAttribute(r,t[r]):null==e||e.removeAttribute(r)})),e}var DomUtils=Object.freeze({__proto__:null,getAttributes:getAttributes,replaceAttributes:replaceAttributes,setAttributes:setAttributes}),H264_MIME='video/mp4; codecs="avc1.42E01E,mp4a.40.2"',H265_MIME=['video/mp4;codecs="hev1.1.6.L120.90"','video/mp4;codecs="hev1.2.4.L120.90"','video/mp4;codecs="hev1.3.E.L120.90"','video/mp4;codecs="hev1.4.10.L120.90"'],isType=curry$1((function(e,t){var r;return null==t?void 0:_includesInstanceProperty2(r=t.split("?")[0].toLowerCase()).call(r,e)})),isHls=isType(".m3u8"),isMp4=isType(".mp4"),isFlv=isType(".flv"),isRtm=isType(".sdp"),isDash=isType(".mpd");function getStreamType(e){return isHls(e)?"hls":isFlv(e)?"flv":isRtm(e)?"rtm":isMp4(e)?"mp4":isDash(e)?"dash":"unknown"}function isMseSupported(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Codec.H264;return e===Codec.H265?sniffer.isHevcSupported():e===Codec.H264?sniffer.isMSESupport():sniffer.isMSESupport(e)}function isSoftDecodeSupported(){return _isSoftDecodeSupported.apply(this,arguments)}function _isSoftDecodeSupported(){return(_isSoftDecodeSupported=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t,r;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,load(DynamicModule.PluginXgvideo);case 2:return t=e.sent,r=t.XGVideoPlugin,e.abrupt("return",null==r?void 0:r.isSupported());case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function isMMSSupported(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Codec.H264;return void 0!==window.ManagedMediaSource&&(e===Codec.H264?window.ManagedMediaSource.isTypeSupported(H264_MIME):e===Codec.H265?H265_MIME.some((function(e){return window.ManagedMediaSource.isTypeSupported(e)})):window.ManagedMediaSource.isTypeSupported(e))}_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({},util),DomUtils),{},{getStreamType:getStreamType,isMseSupported:isMseSupported,isSoftDecodeSupported:isSoftDecodeSupported,isMMSSupported:isMMSSupported,appendSearchParams:appendSearchParams,getUrlObject:getUrlObject});var autoplay="",isWeixin=sniffer.isWeixin,os=sniffer.os,device=sniffer.device,isAndroid=os.isAndroid,isIos=os.isIos,isMobile="mobile"===device,last=0,USER_AUTOPLAY_TRIGGERED=!1,Autoplay=function(e){_inherits(r,Plugin);var t=_createSuper(r);function r(e){var n;return _classCallCheck$1(this,r),_defineProperty$1(_assertThisInitialized(n=t.call(this,e)),"_hasSetUserAutoplay",void 0),_defineProperty$1(_assertThisInitialized(n),"_timer",void 0),_defineProperty$1(_assertThisInitialized(n),"_wxTimer",void 0),_defineProperty$1(_assertThisInitialized(n),"_state",{mode:0,showUnmuteBt:!1}),_defineProperty$1(_assertThisInitialized(n),"userClickPlay",(function(){if(!USER_AUTOPLAY_TRIGGERED){var e=n.player.play();e&&e.then?e.then((function(){console.log("user action autoplay success"),USER_AUTOPLAY_TRIGGERED=!0})).catch((function(e){console.warn("user action autoplay fail:",e)})):(console.warn("no play promise"),USER_AUTOPLAY_TRIGGERED=!0)}})),n}return _createClass$1(r,[{key:"afterCreate",value:function(){this.initState(),this.initEvents(),this.setWXAutoPlay()}},{key:"updateLang",value:function(){this.renderUnmuteBt()}},{key:"initState",value:function(){this._state.mode=this.player.muted?1:0}},{key:"initEvents",value:function(){this.player.on(AUTOPLAY_PREVENTED,this.handleAutoplayPrevented.bind(this)),this.player.on(AUTOPLAY_STARTED,this.handleAutoplayStart.bind(this)),this.player.on(VOLUME_CHANGE,this.handleVolumechange.bind(this)),this.setUserActionAutoPlay()}},{key:"setWXAutoPlay",value:function(){isWeixin&&this.player.config.autoplay&&this.config.enableWxJsBridgeAutoplay&&(window.WeixinJSBridge?this.wxPlay():document.addEventListener("WeixinJSBridgeReady",this.wxPlay.bind(this),!1))}},{key:"wxCanPlayFn",value:function(){var e=this;window.WeixinJSBridge&&window.WeixinJSBridge.invoke("getNetworkType",{},(function(){e._wxTimer=window.setTimeout((function(){e._wxTimer&&clearTimeout(e._wxTimer);var t=e.player.play();t&&t.then?t.then((function(){console.log("wechat autoplay success")})).catch((function(t){console.warn("wechat autoplay fail:",t),e._state.showUnmuteBt=!1,e.renderUnmuteBt()})):console.warn("wechat browser no play promise")}))}))}},{key:"wxPlay",value:function(){this.player.readyState>=2?this.wxCanPlayFn():isAndroid?this.player.once(CANPLAY,this.wxCanPlayFn.bind(this)):isIos&&this.player.once(COMPLETE,this.wxCanPlayFn.bind(this))}},{key:"setUserActionAutoPlay",value:function(){var e=this;this.config.enableUserActionAutoplay&&this.player.once(BaseEvents.AUTOPLAY_FAIL,(function(){e._hasSetUserAutoplay=!0,(e.config.userActionDom instanceof window.Node?e.config.userActionDom:window.document.body).addEventListener("click",e.userClickPlay,!1)}))}},{key:"handleAutoplayPrevented",value:function(){var e,t,r;return 0===this._state.mode?(console.warn("unmute autoplay fail"),this.player.emit(BaseEvents.AUTOPLAY_FAIL,{mode:"unmute"}),null===(e=this.player)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.teaTracker)||void 0===e||null===(e=e.liveLogger)||void 0===e||e.sendLog({event_key:"autoplay_error",message:BaseEvents.AUTOPLAY_FAIL,mode:"unmute"}),isAndroid&&isWeixin?void(this._state.mode=2):void(this.config.enableDegradeMuteAutoplay&&this.changeMuteMode())):1===this._state.mode?(console.warn("mute autoplay fail"),this.player.emit(BaseEvents.AUTOPLAY_FAIL,{mode:"mute"}),this._state.mode=2,void(null===(t=this.player)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.teaTracker)||void 0===t||null===(t=t.liveLogger)||void 0===t||t.sendLog({event_key:"autoplay_error",message:BaseEvents.AUTOPLAY_FAIL,mode:"mute"}))):2===this._state.mode?(this.player.emit(BaseEvents.AUTOPLAY_FAIL,{mode:"noSupport"}),null===(r=this.player)||void 0===r||null===(r=r.config)||void 0===r||null===(r=r.teaTracker)||void 0===r||null===(r=r.liveLogger)||void 0===r||r.sendLog({event_key:"autoplay_error",message:BaseEvents.AUTOPLAY_FAIL,mode:"noSupport"}),void console.warn("not support autoplay")):void 0}},{key:"changeMuteMode",value:function(){var e=this;this.player.muted=!0,this._state.showUnmuteBt=!0,this._state.mode=1,this.renderUnmuteBt(),this._timer=window.setTimeout((function(){e._timer&&window.clearTimeout(e._timer);var t=e.player.play();t&&t.then?t.then((function(){console.log("degrade mute autoplay success")})).catch((function(t){console.warn("degrade mute autoplay fail:",t),e.player.muted=!1,e._state.showUnmuteBt=!1,e.renderUnmuteBt()})):console.warn("no play promise")}))}},{key:"handleAutoplayStart",value:function(){if(0!==this._state.mode)return 1===this._state.mode?(this.player.emit(BaseEvents.AUTOPLAY_SUCCESS,{mode:"mute"}),this._state.showUnmuteBt=!0,void this.renderUnmuteBt()):2===this._state.mode?(this.player.emit(BaseEvents.AUTOPLAY_SUCCESS,{mode:"click"}),this.player.muted=!1,this._state.showUnmuteBt=!1,void this.renderUnmuteBt()):void 0;this.player.emit(BaseEvents.AUTOPLAY_SUCCESS,{mode:"unmute"})}},{key:"handleVolumechange",value:function(){this._state.mode=this.player.muted?1:0,this._state.showUnmuteBt&&(this._state.showUnmuteBt=!1,this.renderUnmuteBt(),this.player.paused&&this.player.readyState>=1&&this.player.play())}},{key:"renderUnmuteBt",value:function(){var e=this.root,t=this.player.config.i18nManager;if(e&&(e.innerHTML="",this._state.showUnmuteBt)){var r=t.getText("UNMUTE"),n=util.createDom("div",r,void 0,"veplayer-unmute-bt");e.appendChild(n),this.bind(".veplayer-unmute-bt","click",this.cancelUnmute.bind(this)),this.bind(".veplayer-unmute-bt","touchend",this.cancelUnmute.bind(this))}}},{key:"cancelUnmute",value:function(){var e=Date.now();if(e-last>200){last=e,this.player.muted=!1,this._state.showUnmuteBt=!1,this.renderUnmuteBt(),this.emit(BaseEvents.AUTOPLAY_UNMUTE);var t="mobile"===sniffer.device,r=isRtm(this.player.config.url);t&&r&&(this.player.volume>.5?this.player.volume=this.player.volume-.1:this.player.volume=this.player.volume+.1)}}},{key:"destroy",value:function(){if(this.player.off(AUTOPLAY_PREVENTED,this.handleAutoplayPrevented.bind(this)),this.player.off(AUTOPLAY_STARTED,this.handleAutoplayStart.bind(this)),this.player.off(VOLUME_CHANGE,this.handleVolumechange.bind(this)),this._timer&&window.clearTimeout(this._timer),this._wxTimer&&window.clearTimeout(this._wxTimer),document.removeEventListener("WeixinJSBridgeReady",this.wxPlay.bind(this),!1),this._hasSetUserAutoplay){var e=isMobile?"touch":"click";(this.config.userActionDom instanceof window.Node?this.config.userActionDom:window.document.body).removeEventListener(e,this.userClickPlay,!1)}}},{key:"render",value:function(){return'<div class="veplayer-unmute"></div>'}}],[{key:"pluginName",get:function(){return"autoplayPlugin"}},{key:"defaultConfig",get:function(){return{position:Plugin.POSITIONS.ROOT,enableDegradeMuteAutoplay:!1,enableWxJsBridgeAutoplay:!1,userActionDom:window.document.body,enableUserActionAutoplay:!1}}}]),r}(),$=_export,$values=objectToArray.values;$({target:"Object",stat:!0},{values:function(e){return $values(e)}});var path=path$r,values$5=path.Object.values,parent$2=values$5,values$4=parent$2,parent$1=values$4,values$3=parent$1,parent=values$3,values$2=parent,values$1=values$2,values3=values$1,_Object$values=getDefaultExportFromCjs(values3),topRightBar="";function MoreIconSVG(){return(new DOMParser).parseFromString('<svg width="18" height="18" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M5.75 11C5.75 11.9665 4.9665 12.75 4 12.75C3.0335 12.75 2.25 11.9665 2.25 11C2.25 10.0335 3.0335 9.25 4 9.25C4.9665 9.25 5.75 10.0335 5.75 11ZM13.25 11C13.25 11.9665 12.4665 12.75 11.5 12.75C10.5335 12.75 9.75 11.9665 9.75 11C9.75 10.0335 10.5335 9.25 11.5 9.25C12.4665 9.25 13.25 10.0335 13.25 11ZM19 12.75C19.9665 12.75 20.75 11.9665 20.75 11C20.75 10.0335 19.9665 9.25 19 9.25C18.0335 9.25 17.25 10.0335 17.25 11C17.25 11.9665 18.0335 12.75 19 12.75Z" fill="white"/>\n</svg>\n',"image/svg+xml").firstChild}var _context,_context2,More=function(e){_inherits(r,OptionsIcon);var t=_createSuper(r);function r(){return _classCallCheck$1(this,r),t.apply(this,arguments)}return _createClass$1(r,[{key:"onItemClick",value:function(){}},{key:"onOptionClick",value:function(){this.toggle(!1)}},{key:"updateLang",value:function(){var e,t=this,r=this.player.config.i18nManager;null===(e=this.config.plugins)||void 0===e||e.forEach((function(e){var n,i=null!==(n=r.normalize(e.textTips))&&void 0!==n?n:e.pluginName;if(t.player.root){var o=util.findDom(t.player.root,".panel-plugin-".concat(e.pluginName," .panel-icon-bt-text"));o&&(o.innerHTML=i)}}))}},{key:"beforeCreate",value:function(e){var t,r=e.player.config.i18nManager;e.config.list=null===(t=e.config.plugins)||void 0===t?void 0:_mapInstanceProperty(t).call(t,(function(t,n){var i,o=util.createDom("div","",{},"panel-icon-bt panel-plugin-".concat(t.pluginName)),a=util.createDom("div","",{},"panel-icon-svg"),s=null!==(i=r.normalize(t.textTips))&&void 0!==i?i:t.pluginName;return o.appendChild(a),o.appendChild(util.createDom("span",s,{"plugin-index":n},"panel-icon-bt-text")),{showText:o,plugin:e.player.registerPlugin({plugin:t,options:{root:a}})}}))}},{key:"hideChild",value:function(e){if(e){var t;null===(t=e.hide)||void 0===t||t.call(e);var r=document.querySelector(".panel-plugin-".concat(e.pluginName));r&&util.addClass(r,"hide")}}},{key:"showChild",value:function(e){if(e){var t;null===(t=e.show)||void 0===t||t.call(e);var r=document.querySelector(".panel-plugin-".concat(e.pluginName));r&&util.removeClass(r,"hide")}}},{key:"registerIcons",value:function(){return{more:{icon:MoreIconSVG}}}}],[{key:"pluginName",get:function(){return"more"}},{key:"defaultConfig",get:function(){return _objectSpread2$1(_objectSpread2$1({},OptionsIcon.defaultConfig),{},{index:1,plugins:[],list:[],hideOnSingleOption:!1,isShowIcon:!0,hidePortrait:!1,renderType:RenderType.Icon,panel:{className:"more-panel-content"}})}}]),r}(),TOP_RIGHT_POSITIONS=function(e){return e.ROOT_TOP_RIGHT="rootTopRight",e.ROOT_TOP_RIGHT_COLLAPSE="rootTopRightCollapse",e}(TOP_RIGHT_POSITIONS||{}),TopRightBar=function(e){_inherits(r,Plugin);var t=_createSuper(r);function r(){return _classCallCheck$1(this,r),t.apply(this,arguments)}return _createClass$1(r,[{key:"registerIcons",value:function(){return{more:{icon:MoreIconSVG,class:"xgplayer-more-svg"}}}},{key:"children",value:function(){var e=this,t=this._getPlugins(),r=t.plugins,n=t.collapsePlugins,i={};return r.forEach((function(t){i[t.pluginName]={plugin:t,options:{root:e.root}}})),n.length&&(i[More.pluginName]={plugin:More,options:{root:this.root,plugins:n}}),i}},{key:"render",value:function(){return'<xg-right-grid class="xg-right-grid xgplayer-rightTop-iconList"></xg-right-grid>'}},{key:"_getPlugins",value:function(){var e,t=this,r=[],n=[],i=null===(e=this.player.config.ignores)||void 0===e?void 0:_mapInstanceProperty(e).call(e,(function(e){return e.toLowerCase()}));return this.config.plugins.forEach((function(e){var o,a=e.pluginName.toLowerCase();null!=i&&_includesInstanceProperty2(i).call(i,a)||("rootTopRight"===(null!==(o=t.player.config[a].position)&&void 0!==o?o:e.defaultConfig.position)?r.push(e):n.push(e))})),{plugins:null!=r?r:[],collapsePlugins:null!=n?n:[]}}}],[{key:"pluginName",get:function(){return"topRightBar"}},{key:"defaultConfig",get:function(){return{position:Plugin.POSITIONS.ROOT_TOP,plugins:[]}}},{key:"isTopRightPlugin",value:function(e,t){var r,n,i,o,a,s=null!==(n=null===(i=t[null==e||null===(r=e.pluginName)||void 0===r?void 0:r.toLowerCase()])||void 0===i?void 0:i.position)&&void 0!==n?n:null==e||null===(o=e.defaultConfig)||void 0===o?void 0:o.position;return!!_includesInstanceProperty2(a=_Object$values(TOP_RIGHT_POSITIONS)).call(a,s)}}]),r}(),BASE_PLUGINS=[Play$1,Fullscreen,Volume,MiniScreen,PIP,Poster,Start,Loading,Enter,Error$1,Toast,Sources,DefinitionPlugin,Autoplay],DEFAULT_PC_PLUGINS=_concatInstanceProperty2(_context=[]).call(_context,BASE_PLUGINS,[Keyboard,PCPlugin,TopRightBar]),DEFAULT_MOBILE_PLUGINS=_concatInstanceProperty2(_context2=[]).call(_context2,BASE_PLUGINS,[MobilePlugin,TopRightBar]),DEFAULT_PLUGINS="pc"===sniffer.device?DEFAULT_PC_PLUGINS:DEFAULT_MOBILE_PLUGINS;function FullscreenActive(){return(new DOMParser).parseFromString('<svg width="21" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.892 2h4.445v1.778H3.892v4.444H2.114V3.778C2.114 2.796 2.91 2 3.892 2zm4.445 16v-4.444c0-.982-.796-1.778-1.778-1.778H2.114v1.778h2.944L2.264 16.35a.9.9 0 001.272 1.273l2.988-2.987a.918.918 0 00.035-.037V18h1.778zm8-6.222v4.444h-4.445V18h4.445c.981 0 1.777-.796 1.777-1.778v-4.444h-1.777zM11.892 2v4.445c0 .981.796 1.777 1.778 1.777h4.444V6.445H15.17l2.568-2.568a.9.9 0 10-1.273-1.273L13.67 5.4V2h-1.778z" fill="#fff"/></svg>',"image/svg+xml").firstChild}function FullscreenActiveMobile(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M17.5 8.333h-4.167c-.92 0-1.666-.746-1.666-1.666V2.5h1.666v4.167H17.5v1.666zM2.5 6.667v1.666h4.167c.92 0 1.666-.746 1.666-1.666V2.5H6.667v4.167H2.5zM2.5 13.333h4.167V17.5h1.666v-4.167c0-.92-.746-1.666-1.666-1.666H2.5v1.666zM13.333 17.5v-4.167H17.5v-1.666h-4.167c-.92 0-1.666.746-1.666 1.666V17.5h1.666z" fill="#fff"/></svg>',"image/svg+xml").firstChild}function FullscreenDefault(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.778 2h4.444v1.778H3.778v4.444H2V3.778C2 2.796 2.796 2 3.778 2zM2 11.778v4.444C2 17.204 2.796 18 3.778 18h4.444v-1.778H4.823l2.313-2.313a.9.9 0 00-1.272-1.273l-2.086 2.086v-2.944H2zm14.222 0v4.444h-4.444V18h4.444c.982 0 1.778-.796 1.778-1.778v-4.444h-1.778zM18 8.222V3.778C18 2.796 17.204 2 16.222 2h-4.444v1.778h2.945l-2.587 2.586a.9.9 0 101.273 1.273l2.813-2.813v3.398H18z" fill="#fff"/></svg>',"image/svg+xml").firstChild}function FullscreenDefaultMobile(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.125 3a.375.375 0 00-.375.375v.75c0 .207.168.375.375.375H15.5v3.375c0 .207.168.375.375.375h.75A.375.375 0 0017 7.875v-4.5A.375.375 0 0016.625 3h-4.5zm0 12.5a.375.375 0 00-.375.375v.75c0 .207.168.375.375.375h4.5a.375.375 0 00.375-.375v-4.5a.375.375 0 00-.375-.375h-.75a.375.375 0 00-.375.375V15.5h-3.375zM3 3.375C3 3.168 3.168 3 3.375 3h4.5c.207 0 .375.168.375.375v.75a.375.375 0 01-.375.375H4.5v3.375a.375.375 0 01-.375.375h-.75A.375.375 0 013 7.875v-4.5zM7.875 15.5H4.5v-3.375a.375.375 0 00-.375-.375h-.75a.375.375 0 00-.375.375v4.5c0 .207.168.375.375.375h4.5a.375.375 0 00.375-.375v-.75a.375.375 0 00-.375-.375z" fill="#fff"/></svg>',"image/svg+xml").firstChild}function Pause(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="5.313" y="3.75" width="3.125" height="12.5" rx=".625" fill="#fff"/><rect x="11.563" y="3.75" width="3.125" height="12.5" rx=".625" fill="#fff"/></svg>',"image/svg+xml").firstChild}function Play(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.121 8.299a2 2 0 010 3.402l-7.94 4.91c-1.332.825-3.051-.133-3.051-1.7V5.09c0-1.567 1.72-2.525 3.052-1.701l7.939 4.911z" fill="#fff"/></svg>',"image/svg+xml").firstChild}function Replay(){return(new DOMParser).parseFromString('<svg width="72" height="72" viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg"><g fill="#FFF" fill-rule="evenodd"><circle fill-opacity=".3" cx="36" cy="36" r="36"/><path d="M40.167 32.667a.833.833 0 01-.834-.834v-1.666c0-.46.373-.834.834-.834h5.409a11.653 11.653 0 00-9.576-5c-6.443 0-11.667 5.224-11.667 11.667S29.557 47.667 36 47.667c5.285 0 9.749-3.514 11.183-8.333h3.445C49.112 46.014 43.138 51 36 51c-8.284 0-15-6.716-15-15 0-8.284 6.716-15 15-15 4.713 0 8.918 2.173 11.668 5.572l-.001-4.739c0-.46.373-.833.833-.833h1.667c.46 0 .833.373.833.833V31c0 .879-.68 1.598-1.542 1.662l-.125.005h-9.166z"/></g></svg>',"image/svg+xml").firstChild}function StartPlay(){return(new DOMParser).parseFromString('<svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="60" height="60" rx="30" fill="#000" fill-opacity=".4"/><path d="M40.243 28.3a2 2 0 010 3.401L24.06 41.712c-1.332.825-3.052-.134-3.052-1.7V19.988c0-1.566 1.72-2.525 3.052-1.7l16.184 10.01z" fill="#fff"/></svg>',"image/svg+xml").firstChild}function VolumeLarge(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.867 2.5h.55c.44 0 .799.34.83.771l.003.062v13.334c0 .44-.34.799-.771.83l-.062.003h-.55a.833.833 0 01-.444-.128l-.064-.045-4.867-3.744a.831.831 0 01-.322-.59l-.003-.07V7.077c0-.235.099-.458.271-.615l.054-.045L9.36 2.673a.832.832 0 01.43-.17l.078-.003h.55-.55zm6.767 2.278A7.474 7.474 0 0118.75 10a7.477 7.477 0 01-2.128 5.234.4.4 0 01-.57-.004l-.587-.586a.442.442 0 01.005-.617A5.812 5.812 0 0017.083 10c0-1.557-.61-2.97-1.603-4.017a.442.442 0 01-.003-.615l.586-.586a.4.4 0 01.57-.004zM2.5 6.667c.23 0 .417.186.417.416v5.834c0 .23-.187.416-.417.416h-.833a.417.417 0 01-.417-.416V7.083c0-.23.187-.416.417-.416H2.5zm11.768.46A4.153 4.153 0 0115.417 10c0 1.12-.442 2.137-1.162 2.886a.388.388 0 01-.555-.007l-.577-.578c-.176-.176-.156-.467.009-.655A2.49 2.49 0 0013.75 10a2.49 2.49 0 00-.61-1.636c-.163-.188-.182-.477-.006-.653l.578-.578a.388.388 0 01.556-.006z" fill="#fff"/></svg>',"image/svg+xml").firstChild}function VolumeMuted(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.045 2.5h.55c.44 0 .8.34.831.771l.003.062v13.334c0 .44-.34.799-.771.83l-.063.003h-.55a.833.833 0 01-.443-.128l-.065-.045-4.866-3.744a.831.831 0 01-.323-.59l-.003-.07V7.077c0-.235.1-.458.272-.615l.054-.045 4.866-3.744a.832.832 0 01.43-.17l.078-.003h.55-.55zM2.68 6.667c.23 0 .416.186.416.416v5.834c0 .23-.186.416-.416.416h-.834a.417.417 0 01-.416-.416V7.083c0-.23.186-.416.416-.416h.834zm10.467.294a.417.417 0 01.59 0l1.767 1.768L17.27 6.96a.417.417 0 01.589 0l.59.59a.417.417 0 010 .589L16.68 9.908l1.768 1.767c.15.15.162.387.035.55l-.035.04-.589.589a.417.417 0 01-.59 0l-1.767-1.768-1.768 1.768a.417.417 0 01-.59 0l-.588-.59a.417.417 0 010-.589l1.767-1.768-1.767-1.767a.417.417 0 01-.035-.55l.035-.04.589-.589z" fill="#fff"/></svg>',"image/svg+xml").firstChild}function VolumeSmall(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.867 2.5h.55c.44 0 .799.34.83.771l.003.062v13.334c0 .44-.34.799-.771.83l-.062.003h-.55a.833.833 0 01-.444-.128l-.064-.045-4.867-3.744a.831.831 0 01-.322-.59l-.003-.07V7.077c0-.235.099-.458.271-.615l.054-.045L9.36 2.673a.832.832 0 01.43-.17l.078-.003h.55-.55zM2.5 6.667c.23 0 .417.186.417.416v5.834c0 .23-.187.416-.417.416h-.833a.417.417 0 01-.417-.416V7.083c0-.23.187-.416.417-.416H2.5zm11.768.46A4.153 4.153 0 0115.417 10c0 1.12-.442 2.137-1.162 2.886a.388.388 0 01-.555-.007l-.577-.578c-.176-.176-.156-.467.009-.655A2.49 2.49 0 0013.75 10a2.49 2.49 0 00-.61-1.636c-.163-.188-.182-.477-.006-.653l.578-.578a.388.388 0 01.556-.006z" fill="#fff"/></svg>',"image/svg+xml").firstChild}var DEFAULT_BASE_ICONS={startPlay:StartPlay,play:Play,pause:Pause,fullscreen:FullscreenDefault,exitFullscreen:FullscreenActive,replay:Replay,volumeLarge:VolumeLarge,volumeMuted:VolumeMuted,volumeSmall:VolumeSmall},DEFAULT_PC_ICONS=_objectSpread2$1(_objectSpread2$1({},DEFAULT_BASE_ICONS),{},{fullscreen:FullscreenDefault,exitFullscreen:FullscreenActive}),DEFAULT_MOBILE_ICONS=_objectSpread2$1(_objectSpread2$1({},DEFAULT_BASE_ICONS),{},{fullscreen:FullscreenDefaultMobile,exitFullscreen:FullscreenActiveMobile}),DEFAULT_ICONS="pc"===sniffer.device?DEFAULT_PC_ICONS:DEFAULT_MOBILE_ICONS,VeI18n=function(){function e(t){var r;if(_classCallCheck$1(this,e),_defineProperty$1(this,"_lang",void 0),this._lang=(null==t?void 0:t.lang)||getLang()||"en","zh"===this._lang&&(this._lang="zh-cn"),null!=t&&null!==(r=t.i18n)&&void 0!==r&&r.texts){var n,i,o=_mapInstanceProperty(n=_Object$entries(null==t||null===(i=t.i18n)||void 0===i?void 0:i.texts)).call(n,(function(e){var t=_slicedToArray(e,2);return{LANG:t[0],TEXT:t[1]}}));e.extend(o)}}return _createClass$1(e,[{key:"setLang",value:function(e){this._lang=e}},{key:"getLang",value:function(){return this._lang}},{key:"normalize",value:function(e){return e?"string"==typeof e?e:e[this._lang]:""}},{key:"getText",value:function(e){var t,r,n;if(e){var i=null==I18N?void 0:I18N.lang;return null!==(t=null==i||null===(r=i[this._lang])||void 0===r?void 0:r[e])&&void 0!==t?t:null==i||null===(n=i.en)||void 0===n?void 0:n[e]}}}],[{key:"langKeys",get:function(){return I18N.langKeys}},{key:"isLangValid",value:function(e){var t;return _includesInstanceProperty2(t=I18N.langKeys).call(t,e)||"zh"===e}},{key:"extend",value:function(e,t){I18N.extend(e,t)}}]),e}(),veplayerBase="",CustomMedia=function(){function e(t){_classCallCheck$1(this,e),_defineProperty$1(this,"_videoAttributes",void 0),_defineProperty$1(this,"_el",void 0),this._videoAttributes=getAttributes(t),this._el=t}return _createClass$1(e,[{key:"options",get:function(){var e=this;return{remainMediaAfterDestroy:!0,mediaEl:function(t){return setAttributes(e._el,t)}}}},{key:"destroy",value:function(){replaceAttributes(this._el,this._videoAttributes)}}]),e}(),_excluded=["autoplay"],XGPosition=Plugin.POSITIONS,POSITIONS=_objectSpread2$1(_objectSpread2$1({},XGPosition),TOP_RIGHT_POSITIONS),DEFAULT_OPTIONS={id:"veplayer",width:"100%",height:"100%",decodeType:DecodeType.Hardware,fullscreen:{useCssFullscreen:!1}},transformOption=function(e){var t,r,n=e.autoplay,i=_objectWithoutProperties(e,_excluded);if(i.poster)if("string"==typeof i.poster)i.poster=escapeHtml(i.poster);else if("string"==typeof(null===(t=i.poster)||void 0===t?void 0:t.poster)){var o;i.poster.poster=escapeHtml(null===(o=i.poster)||void 0===o?void 0:o.poster)}(i.icons=_objectSpread2$1(_objectSpread2$1({},DEFAULT_ICONS),i.icons?escapeIcons(i.icons):{}),i.autoplay=Boolean(n),n&&"boolean"!=typeof n)&&(i.autoplayMuted=null==n?void 0:n.muted,i.videoAttributes=_objectSpread2$1(_objectSpread2$1({},null!==(r=i.videoAttributes)&&void 0!==r?r:{}),{},{muted:null==n?void 0:n.muted}),i.autoplayPlugin=n);return delete i.i18n,i},VePlayerBase=function(){function e(){var t,r,n,i,o,a,s,l,c,u,p,f,h,d=this,y=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),_defineProperty$1(this,"_player",void 0),_defineProperty$1(this,"_sourceManager",void 0),_defineProperty$1(this,"_preparePlugins",void 0),_defineProperty$1(this,"_previousPrepareResult",void 0),_defineProperty$1(this,"_i18nManager",void 0),_defineProperty$1(this,"_events",{}),_defineProperty$1(this,"_customMedia",void 0),_defineProperty$1(this,"_errorCallback",void 0),_defineProperty$1(this,"_beforeFallbackError",void 0),this._sourceManager=y.sourceManager,this._preparePlugins=y.preparePlugins,this._previousPrepareResult=y.prepareResult,this._beforeFallbackError=y.beforeFallbackError,this._i18nManager=null!==(t=y.i18nManager)&&void 0!==t?t:new VeI18n({i18n:y.i18n}),y.mediaElement&&(this._customMedia=new CustomMedia(y.mediaElement));var g=transformOption(_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({},y),null===(r=this._customMedia)||void 0===r?void 0:r.options),null===(n=this._previousPrepareResult)||void 0===n?void 0:n.options)),$=_concatInstanceProperty2(i=[]).call(i,_toConsumableArray$1(null!==(o=null===(a=this._previousPrepareResult)||void 0===a?void 0:a.plugins)&&void 0!==o?o:[]),_toConsumableArray$1(null!==(s=y.plugins)&&void 0!==s?s:DEFAULT_PLUGINS)),v=[],_=[];$.forEach((function(e){TopRightBar.isTopRightPlugin(e,y)?v.push(e):_.push(e)})),this._player=new Player(_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({},DEFAULT_OPTIONS),g),{},{definition:_objectSpread2$1({list:null!==(l=null===(c=this._sourceManager.source)||void 0===c?void 0:c.definitions)&&void 0!==l?l:[],defaultDefinition:null===(u=this._sourceManager.definition)||void 0===u?void 0:u.definition},null!==(p=y.definition)&&void 0!==p?p:{}),url:null===(f=this._sourceManager.definition)||void 0===f?void 0:f.url,sources:_objectSpread2$1(_objectSpread2$1({},null!==(h=y.sources)&&void 0!==h?h:{}),{},{sourceManager:this._sourceManager}),topRightBar:{plugins:v},plugins:_,i18nManager:this._i18nManager,veplayer:this})),this.emit(Events.PLAYER_CREATE_FINISH,this._player),this._errorCallback=function(e){return d._handleFallback(e)},this._player.on(ERROR,this._errorCallback)}var t,r,n,i,o,a,s,l,c;return _createClass$1(e,[{key:"readyState",get:function(){return this._player.readyState}},{key:"buffered",get:function(){return this._player.buffered}},{key:"played",get:function(){return this._player.played}},{key:"cumulateTime",get:function(){return this._player.cumulateTime}},{key:"isFocused",get:function(){return this._player.isActive}},{key:"isFullscreen",get:function(){return this._player.isFullscreen}},{key:"isCssFullscreen",get:function(){return this._player.isCssfullScreen}},{key:"networkState",get:function(){return this._player.networkState}},{key:"paused",get:function(){return this._player.paused}},{key:"ended",get:function(){return this._player.ended}},{key:"state",get:function(){return this._player.state}},{key:"url",get:function(){return this._player.config.url}},{key:"source",get:function(){var e;return null===(e=this._sourceManager.source)||void 0===e?void 0:e.name}},{key:"playerVersion",get:function(){return"2.10.2"}},{key:"definition",get:function(){var e;return null===(e=this._sourceManager.definition)||void 0===e?void 0:e.definition}},{key:"crossOrigin",get:function(){return this._player.crossOrigin},set:function(e){this._player.crossOrigin=e}},{key:"volume",get:function(){return this._player.volume},set:function(e){this._player.volume=e}},{key:"muted",get:function(){return this._player.muted},set:function(e){this._player.muted=e}},{key:"lang",get:function(){return this._i18nManager.getLang()},set:function(e){if(this._player.lang!==e)if(VeI18n.isLangValid(e))this._i18nManager.setLang(e),this._player.lang=e;else{var t,r,n,i,o=VeI18n.langKeys.join(","),a={en:_concatInstanceProperty2(t="Sorry, we couldn't set the language to ".concat(e," because it's not currently supported. The list of supported languages includes ")).call(t,o,"."),"zh-cn":_concatInstanceProperty2(r="不支持当前设置的语言".concat(e,", 支持的语言有")).call(r,o,", 请重新设置")};console.error((null===(n=this._i18nManager)||void 0===n||null===(i=n.normalize)||void 0===i?void 0:i.call(n,a))||a.en)}}},{key:"_src",get:function(){return this._player.currentSrc}},{key:"switch",value:(c=_asyncToGenerator(_regeneratorRuntime().mark((function e(t,r){var n,i,o,a;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"!=typeof t||1!==this._sourceManager.sources.length||1!==(null===(n=this._sourceManager.sources)||void 0===n||null===(n=n[0].definitions)||void 0===n?void 0:n.length)){e.next=5;break}return this._sourceManager.updateSources(t),e.next=4,this._switchUrl(t,{seamless:null==r?void 0:r.seamless});case 4:return e.abrupt("return",this._sourceManager.definition);case 5:if(o=_findInstanceProperty2(i=this._sourceManager).call(i,t,r)){e.next=8;break}throw new Error("string"==typeof t?"No definition found for url: ".concat(t):_concatInstanceProperty2(a="No definition found for source: ".concat(t.source,", definition: ")).call(a,t.definition));case 8:return e.next=10,this._switch(o);case 10:return e.abrupt("return",o);case 11:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"updatePlaylist",value:(l=_asyncToGenerator(_regeneratorRuntime().mark((function e(t,r){var n;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this._sourceManager.updateSources(t,r),e.abrupt("return",this._switch(n.definition));case 2:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"once",value:function(e,t){var r,n=this._transformEvent(e,t),i=n.xgCallback,o=n.xgEventName;i&&(null!==(r=this._events)&&void 0!==r&&r[e]||(this._events[e]=new _Map),this._events[e].set(t,i),this._player.once(o,i))}},{key:"off",value:function(e,t){var r,n=null===(r=this._events[e])||void 0===r?void 0:r.get(t),i=this._transformEvent(e).xgEventName;n&&(this._player.off(i,n),this._events[e].delete(t))}},{key:"emit",value:function(e,t){var r=this._transformEvent(e).xgEventName;this._player.emit(r,t)}},{key:"offAll",value:function(){this._events={},this._player.offAll()}},{key:"on",value:function(e,t){var r,n=this._transformEvent(e,t),i=n.xgCallback,o=n.xgEventName;i&&(null!==(r=this._events)&&void 0!==r&&r[e]||(this._events[e]=new _Map),this._events[e].set(t,i),this._player.on(o,i))}},{key:"play",value:(s=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t,r,n;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,null!==(t=this._player)&&void 0!==t&&null!==(t=t.config)&&void 0!==t&&null!==(t=t.teaTracker)&&void 0!==t&&t.liveLogger&&this._player.config.teaTracker.liveLogger.sendLog({event_key:"play_method_call"}),e.next=4,this._player.play();case 4:return r=e.sent,e.abrupt("return",r);case 8:throw e.prev=8,e.t0=e.catch(0),null!==(n=this._player)&&void 0!==n&&null!==(n=n.config)&&void 0!==n&&null!==(n=n.teaTracker)&&void 0!==n&&n.liveLogger&&this._player.config.teaTracker.liveLogger.sendLog({event_key:"play_method_call_error",error:e.t0.message||String(e.t0)}),e.t0;case 12:case"end":return e.stop()}}),e,this,[[0,8]])}))),function(){return s.apply(this,arguments)})},{key:"pause",value:function(){
2
+ /* istanbul ignore next -- @preserve */return e&&(this._currentUrlRef=e),this._currentUrlRef}}]),e}(),Source=function(){function e(t,r,n){var i=this;_classCallCheck$1(this,e),_defineProperty$1(this,"name",void 0),_defineProperty$1(this,"text",void 0),_defineProperty$1(this,"definitions",void 0),this.definitions=_mapInstanceProperty(t).call(t,(function(e){return new Definition(_Object$assign2({},e,{source:i}))})),this.name=r,this.text=n}return _createClass$1(e,[{key:"defaultDefinition",get:function(){return this.definitions[0]}},{key:"add",value:function(e){this.definitions.push(e)}}],[{key:"normalize",value:function(t){if(void 0===t)throw new Error('"input" cannot be undefined');var r=void 0,n=void 0,i=void 0;if("string"==typeof t?r=t:Array.isArray(t)?i=t:(r=t.url,n=t.fallbackUrls,i=t.sources),"string"==typeof r)return e.normalizeUrl(r,n);if(Array.isArray(i)){if(0===i.length)throw new Error('"sources" cannot be an empty array');return _mapInstanceProperty(i).call(i,(function(t){var r;return new e(_mapInstanceProperty(r=t.definitions).call(r,(function(e){return"string"==typeof e?{url:e,definition:"unknown"}:e})),t.name,t.text)}))}return[]}},{key:"normalizeUrl",value:function(t,r){var n=new e([],"unknown");return n.add(new Definition({definition:"unknown",url:t,source:n,fallbackUrls:r})),[n]}}]),e}(),SourceManager=function(){function e(t){var r,n,i,o;_classCallCheck$1(this,e),_defineProperty$1(this,"defaultSource",void 0),_defineProperty$1(this,"defaultDefinition",void 0),_defineProperty$1(this,"maxFallbackRound",void 0),_defineProperty$1(this,"_currentDefinition",void 0),_defineProperty$1(this,"_sources",void 0),_defineProperty$1(this,"_fallbackCount",0);var a=t.url,s=t.defaultDefinition,l=t.defaultSource,c=t.sources,u=t.maxFallbackRound;this.defaultDefinition=s,this.defaultSource=l,this.maxFallbackRound=null!=u?u:1,this._sources=c;var p=a?_findInstanceProperty2(this).call(this,a):null===(r=_findInstanceProperty2(n=this.sources).call(n,(function(e){return void 0===l||e.name===l})))||void 0===r?void 0:_findInstanceProperty2(i=r.definitions).call(i,(function(e){return void 0===s||e.definition===s}));this._currentDefinition=null!=p?p:null===(o=this._sources)||void 0===o||null===(o=o[0])||void 0===o||null===(o=o.definitions)||void 0===o?void 0:o[0]}return _createClass$1(e,[{key:"sources",get:function(){return this._sources}},{key:"definition",get:function(){return this._currentDefinition}},{key:"source",get:function(){var e;return null===(e=this.definition)||void 0===e?void 0:e.source}},{key:"url",get:function(){var e;return null===(e=this.definition)||void 0===e?void 0:e.url},set:function(e){this.definition&&(this.definition.url=e)}},{key:"find",value:function(e,t){var r,n,i,o,a,s=this;if("string"==typeof e)return _findInstanceProperty2(o=_reduceInstanceProperty2(a=this.sources).call(a,(function(e,t){return _concatInstanceProperty2(e).call(e,t.definitions)}),[])).call(o,(function(t){return t.url===e}));var l=_findInstanceProperty2(r=this.sources).call(r,(function(t){var r,n;return t.name===(null!==(r=null==e?void 0:e.source)&&void 0!==r?r:null===(n=s.source)||void 0===n?void 0:n.name)})),c=null==l?void 0:_findInstanceProperty2(n=l.definitions).call(n,(function(t){var r,n;return t.definition===(null!==(r=null==e?void 0:e.definition)&&void 0!==r?r:null===(n=s.definition)||void 0===n?void 0:n.definition)}));return c||(null!=t&&t.fallbackToFirstDefinition&&null!=l&&null!==(i=l.definitions)&&void 0!==i&&i.length?null==l?void 0:l.definitions[0]:void 0)}},{key:"fallback",value:function(){var e;if(this._fallbackCount++,!(this._fallbackCount>=this.maxFallbackRound*this.definition.urls.length)){var t=null===(e=this._currentDefinition)||void 0===e?void 0:e.next();return null==t?void 0:t.url}this.resetFallback()}},{key:"switch",value:function(e){return this._currentDefinition=e,this.resetFallback(),e}},{key:"updateSources",value:function(e,t){var r,n,i,o,a;return this._sources=Source.normalize(e),this._currentDefinition=null!==(r=_findInstanceProperty2(this).call(this,null!=t?t:{source:null!==(n=this.defaultSource)&&void 0!==n?n:null===(i=this._currentDefinition)||void 0===i?void 0:i.source.name,definition:null!==(o=this.defaultDefinition)&&void 0!==o?o:null===(a=this._currentDefinition)||void 0===a?void 0:a.definition}))&&void 0!==r?r:this._sources[0].definitions[0],this.resetFallback(),this}},{key:"resetFallback",value:function(){this._fallbackCount=0}}]),e}();function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _get(){var e;"undefined"!=typeof Reflect&&_Reflect$get$1?_get=_bindInstanceProperty(e=_Reflect$get$1).call(e):_get=function(e,t,r){var n=_superPropBase(e,t);if(n){var i=_Object$getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}};return _get.apply(this,arguments)}function ErrorImg(){return(new DOMParser).parseFromString('<svg width="150" height="162" viewBox="0 0 150 162" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M127.718 112.831H6.13675C4.19663 112.831 2.25651 108.974 2.90322 104.475C3.54993 99.9761 8.07687 99.9761 13.8972 99.9761C11.9571 97.4052 9.37028 88.4069 15.8373 81.3369C22.3044 74.2668 25.5379 74.2668 34.5918 75.5526C33.9451 63.9837 47.526 34.4178 77.2744 35.0605C107.023 35.7032 116.077 54.3421 119.957 63.3404C129.011 62.6976 147.765 66.554 149.706 87.1214C151.258 103.575 135.694 111.117 127.718 112.831Z" fill="#F1F4F8"/>\n<path d="M44.9346 91.6022L43.6782 99.8032" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n<path d="M47.3545 125.695L48.6109 117.494" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n<path d="M31.5347 97.7378L38.7295 101.869" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n<path d="M60.7544 119.559L53.5595 115.428" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n<path d="M69.6755 44.5318L138.35 26.0209C139.115 25.8148 139.804 26.5367 139.563 27.2909L121.081 85.1146C120.982 85.4243 120.739 85.6665 120.429 85.7641L52.0645 107.28C51.2996 107.521 50.5766 106.809 50.8062 106.04L68.9776 45.2111C69.0768 44.879 69.3409 44.622 69.6755 44.5318Z" fill="#D0D6E0" stroke="#D0D6E0" stroke-width="4" stroke-linecap="round"/>\n<path d="M83.1285 52.7415C91.6454 54.3438 107.322 62.0019 101.894 79.8155" stroke="white" stroke-width="3" stroke-linecap="round"/>\n<path d="M84.138 62.3385C88.3894 63.1384 96.2148 66.9611 93.5053 75.8531" stroke="white" stroke-width="3" stroke-linecap="round"/>\n<ellipse cx="83.6417" cy="71.98" rx="3.08443" ry="3.07025" transform="rotate(12.6375 83.6417 71.98)" fill="white"/>\n<path d="M43.4699 110.358C39.5425 109.114 30.6316 108.203 26.4077 114.511C21.1278 122.397 36.5031 152.755 2.11053 160.141" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n</svg>\n',"image/svg+xml").firstChild}var error="",Error$1=function(e){_inherits(r,Plugin);var t=_createSuper(r);function r(){var e,n;_classCallCheck$1(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return _defineProperty$1(_assertThisInitialized(n=t.call.apply(t,_concatInstanceProperty2(e=[this]).call(e,o))),"_error",void 0),n}return _createClass$1(r,[{key:"_errorTip",get:function(){var e,t,r,n=this.player.config.i18nManager,i=null===(e=this._error)||void 0===e?void 0:e.errorCode;return this.config.errorTipsText?n.normalize(this.config.errorTipsText):_concatInstanceProperty2(t="".concat(i?"[".concat(i,"] "):"")).call(t,null===(r=this._error)||void 0===r?void 0:r.message)}},{key:"afterCreate",value:function(){this._handleRefresh=this._handleRefresh.bind(this),this._focus=this._focus.bind(this),this._initEvents(),this._initIcons(),"mobile"===sniffer.device&&this.bind("touchend",this._focus),this.bind(".veplayer-error-refresh","click",this._handleRefresh)}},{key:"registerIcons",value:function(){return{error:{icon:ErrorImg,class:"veplayer-error-svg"}}}},{key:"updateLang",value:function(){this.config.showRefresh&&this._renderRefresh(),this._renderExtraTips()}},{key:"showError",value:function(e){this._error=e instanceof VeError?e:transform$1(e),this.config.showErrorTip&&this._renderText(this._errorTip),this._renderExtraTips(),_get(_getPrototypeOf(r.prototype),"show",this).call(this)}},{key:"hideError",value:function(){_get(_getPrototypeOf(r.prototype),"hide",this).call(this)}},{key:"destroy",value:function(){"mobile"===sniffer.device&&this.unbind("touchend",this._focus),this.unbind(".veplayer-error-refresh","click",this._handleRefresh),this.off(Events.FALLBACK_ERROR,this.showError.bind(this)),this.off(CANPLAY,this.hideError.bind(this))}},{key:"render",value:function(){var e,t=this.player.config.i18nManager;return _concatInstanceProperty2(e='<veplayer-error class="veplayer-error">\n <div class="veplayer-error-cover">\n '.concat(this.config.showErrorImg?'<div class="veplayer-error-img"></div>':"",'\n <div class="veplayer-error-tips"></div>\n ')).call(e,this.config.showRefresh?'<div class="veplayer-error-refresh">'.concat(t.getText("ERROR_REFRESH"),"</div>"):"",'\n <div class="veplayer-error-extra"></div>\n </div>\n </veplayer-error>')}},{key:"_focus",value:function(){this.player.focus({autoHide:!0})}},{key:"_initIcons",value:function(){this.config.showErrorImg&&this.appendChild(".veplayer-error-img",this.icons.error)}},{key:"_initEvents",value:function(){this.on(Events.FALLBACK_ERROR,this.showError.bind(this)),this.on(CANPLAY,this.hideError.bind(this)),this.on(PLAY,this.hideError.bind(this)),this.on(RETRY,this.hideError.bind(this))}},{key:"_renderText",value:function(e){var t=_findInstanceProperty2(this).call(this,".veplayer-error-tips");t&&(t.innerText=e)}},{key:"_renderExtraTips",value:function(){var e,t=this,r=_findInstanceProperty2(this).call(this,".veplayer-error-extra");r&&(r.innerHTML="");var n=this.player.config.i18nManager;null===(e=this.config.extraTips)||void 0===e||e.forEach((function(e){if(e){var r,i=util.createDom("div",_concatInstanceProperty2(r="".concat(n.normalize(e.label),": ")).call(r,n.normalize(e.value)),void 0,"veplayer-error-detail-info");t.appendChild(".veplayer-error-extra",i)}}))}},{key:"_handleRefresh",value:function(){var e,t;null===(e=this.player)||void 0===e||e.emit(Events.ERROR_REFRESH_CLICK),null===(t=this.player)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.veplayer)||void 0===t||t.retry(),this.hideError()}},{key:"_renderRefresh",value:function(){var e,t=this.player.config.i18nManager,r=_findInstanceProperty2(this).call(this,".veplayer-error-refresh");r&&(r.innerHTML=null!==(e=t.getText("ERROR_REFRESH"))&&void 0!==e?e:"")}}],[{key:"pluginName",get:function(){return"error"}},{key:"defaultConfig",get:function(){return{showErrorImg:!0,showErrorTip:!0,showRefresh:!0,errorTipsText:"",extraTips:[],position:Plugin.POSITIONS.ROOT}}}]),r}(),toast="",DURATION=2e3,Toast=function(e){_inherits(r,Plugin);var t=_createSuper(r);function r(){var e,n;_classCallCheck$1(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return _defineProperty$1(_assertThisInitialized(n=t.call.apply(t,_concatInstanceProperty2(e=[this]).call(e,o))),"_toastNumber",0),_defineProperty$1(_assertThisInitialized(n),"_toastMap",{}),n}return _createClass$1(r,[{key:"toast",value:function(e,t){var r=this,n=t||{},i=n.duration,o=void 0===i?DURATION:i,a=n.closable,s=void 0!==a&&a,l=this._toastNumber+1;this._toastNumber=l;var c=this._renderToast(e,s,l);return this.root.appendChild(c),this._toastMap[l]=c,setTimeout((function(){r.remove(l)}),o),l}},{key:"remove",value:function(e){var t=this._toastMap[e];t&&(this.root.contains(t)&&this.root.removeChild(t),delete this._toastMap[e])}},{key:"render",value:function(){return'<veplayer-toast class="veplayer-toast"></veplayer-toast>'}},{key:"_renderToast",value:function(e,t,r){var n=this,i=util.createDom("div","",void 0,"veplayer-toast-container"),o=util.checkIsObject(e)?e:util.createDom("div",e,void 0,"veplayer-toast-txt");if(i.appendChild(o),t){var a=util.createDom("span","×",void 0,"veplayer-toast-close");a.addEventListener("click",(function(){n.remove(r)})),i.appendChild(a)}return i}}],[{key:"pluginName",get:function(){return"toast"}},{key:"defaultConfig",get:function(){return{index:5}}}]),r}();function SourceIcon(){return(new DOMParser).parseFromString('<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M12.7123 1C11.85 1 11.1173 1.55472 10.8516 2.32675L4.94973 2.32675C3.16413 2.32675 1.71662 3.77427 1.71662 5.55987C1.71662 7.34547 3.16413 8.79298 4.94973 8.79298L11.0483 8.79298L11.1134 8.79418C11.9936 8.82748 12.697 9.55166 12.697 10.44C12.697 11.3497 11.9596 12.0871 11.05 12.0871H5.01323C4.67882 11.4781 4.03143 11.0654 3.28763 11.0654C2.20111 11.0654 1.32031 11.9462 1.32031 13.0327C1.32031 14.1192 2.20111 15 3.28763 15C4.14992 15 4.88264 14.4452 5.14834 13.6732H11.05C12.8356 13.6732 14.2831 12.2256 14.2831 10.44C14.2831 8.65444 12.8356 7.20693 11.05 7.20693L4.94973 7.20693C4.04009 7.20693 3.30267 6.46951 3.30267 5.55987C3.30267 4.65022 4.04009 3.91281 4.94973 3.91281L10.9866 3.91281C11.321 4.52183 11.9685 4.93464 12.7123 4.93464C13.7988 4.93464 14.6796 4.05384 14.6796 2.96732C14.6796 1.8808 13.7988 1 12.7123 1ZM12.7123 2.18954C12.2827 2.18954 11.9345 2.53777 11.9345 2.96732C11.9345 3.39688 12.2827 3.7451 12.7123 3.7451C13.1418 3.7451 13.4901 3.39688 13.4901 2.96732C13.4901 2.53777 13.1418 2.18954 12.7123 2.18954ZM2.50986 13.0327C2.50986 12.6031 2.85808 12.2549 3.28763 12.2549C3.71719 12.2549 4.06541 12.6031 4.06541 13.0327C4.06541 13.4622 3.71719 13.8105 3.28763 13.8105C2.85808 13.8105 2.50986 13.4622 2.50986 13.0327Z" fill="#FFFFFF"/>\n</svg>',"image/svg+xml").firstChild}var mobilePanel="",MobilePlayerPanel=function(){function e(t){_classCallCheck$1(this,e),_defineProperty$1(this,"_root",void 0),_defineProperty$1(this,"_config",void 0),_defineProperty$1(this,"_parent",void 0),_defineProperty$1(this,"_listDom",void 0),_defineProperty$1(this,"_container",void 0),_defineProperty$1(this,"_titleDom",void 0),_defineProperty$1(this,"_player",void 0),_defineProperty$1(this,"_delegates",void 0),_defineProperty$1(this,"_listType",void 0);var r=t.config,n=t.root,i=t.player;this._config=r,this._parent=n,this._player=i,this._listType=r.listType,this.renderPanel(),this._initEvents(),this._bindDomEvent()}return _createClass$1(e,[{key:"changeMode",value:function(e){this.updatePanel(e),this._listType=e}},{key:"renderItemList",value:function(e){var t,r=this,n=this._config;return e&&(n.list=e),this._listDom||(this._listDom=util.createDom("div","",{},"item-list-panel-content")),this._listDom.innerHTML="",null===(t=n.list)||void 0===t||_mapInstanceProperty(t).call(t,(function(e,t){var n,i,o=e.selected?"panel-item select-in":"panel-item ".concat(null!==(n=e.className)&&void 0!==n?n:"");e["data-index"]=t;var a=util.createDom("div","",e,o);e.showText&&("string"==typeof e.showText?a.innerHTML=e.showText:a.appendChild(e.showText)),null===(i=r._listDom)||void 0===i||i.appendChild(a)})),this._listDom}},{key:"renderTitle",value:function(){var e,t,r=this._player.config.i18nManager;if(null!==(e=this._config.panel)&&void 0!==e&&e.title&&this._listType!==ListType.Inner)return this._titleDom||(this._titleDom=util.createDom("div","",{},"xg-mobile-panel-title")),this._titleDom.innerHTML=r.normalize(null===(t=this._config.panel)||void 0===t?void 0:t.title),this._titleDom}},{key:"updatePanel",value:function(e){this._root&&util.removeClass(this._root,"panel-".concat(this._listType)),this._root&&util.addClass(this._root,"panel-".concat(e));var t="mobile"===sniffer.device?"touchend":"click";e===ListType.Inner?this._container&&this._bind(this._container,t,this._handleHide.bind(this)):this._container&&this._unbind(this._container,t,this._handleHide.bind(this))}},{key:"renderPanel",value:function(){var e,t,r,n=_concatInstanceProperty2(e="xg-mobile-panel panel-".concat(this._config.listType," ")).call(e,null!==(t=null===(r=this._config)||void 0===r||null===(r=r.panel)||void 0===r?void 0:r.className)&&void 0!==t?t:"");this._root=util.createDom("div","",{},n),this._parent&&this._parent.appendChild(this._root);var i=this.renderTitle(),o=this.renderItemList();this._container=util.createDom("div","",{},"xg-mobile-panel-content"),this._root.appendChild(this._container),i&&this._container.appendChild(i),o&&this._container.appendChild(o)}},{key:"show",value:function(){this._root&&(util.removeClass(this._root,"hide"),util.addClass(this._root,"active"))}},{key:"hide",value:function(){this._root&&(util.removeClass(this._root,"active"),util.addClass(this._root,"hide"))}},{key:"destroy",value:function(){this._parent&&this._root&&this._parent.removeChild(this._root),this._unbindDomEvent(),this._unbindEvents()}},{key:"_bind",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e&&"on".concat(t)in e&&"function"==typeof r&&e.addEventListener(t,r,n)}},{key:"_unbind",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e&&"on".concat(t)in e&&"function"==typeof r&&e.removeEventListener(t,r,n)}},{key:"_initEvents",value:function(){var e;this._config.isAutoChange&&(window.addEventListener("orientationchange",this._handleOrientationChange.bind(this)),null===(e=this._player)||void 0===e||e.on(FULLSCREEN_CHANGE,this._handleOrientationChange.bind(this)))}},{key:"_unbindEvents",value:function(){var e;window.removeEventListener("orientationchange",this._handleOrientationChange.bind(this)),null===(e=this._player)||void 0===e||e.off(FULLSCREEN_CHANGE,this._handleOrientationChange.bind(this))}},{key:"_handleOrientationChange",value:function(){var e,t,r,n=_includesInstanceProperty2(e=[90,-90,"90","-90"]).call(e,window.orientation);if(null!==(t=this._player)&&void 0!==t&&t.fullscreen&&n)this.changeMode(ListType.Fullscreen);else if(this._listType!==(null===(r=this._config)||void 0===r?void 0:r.listType)){var i;this.changeMode(null===(i=this._config)||void 0===i?void 0:i.listType)}}},{key:"_bindDomEvent",value:function(){var e="mobile"===sniffer.device?"touchend":"click";this._listType===ListType.Inner&&this._container&&this._bind(this._container,e,this._handleHide.bind(this)),this._root&&this._bind(this._root,e,this._handleHide.bind(this)),this._container&&this._bind(this._container,e,this._stopPropagation),this._listDom&&(this._delegates=Plugin.delegate.call(this,this._listDom,".panel-item",e,this._onItemClick.bind(this),!0))}},{key:"_unbindDomEvent",value:function(){var e,t="mobile"===sniffer.device?"touchend":"click";(this._root&&this._unbind(this._root,t,this._handleHide.bind(this)),this._container&&this._unbind(this._container,t,this._handleHide.bind(this)),this._container&&this._unbind(this._container,t,this._stopPropagation),this._delegates)&&(_mapInstanceProperty(e=this._delegates).call(e,(function(e){e.destroy&&e.destroy()})),this._delegates=null)}},{key:"_stopPropagation",value:function(e){e.stopPropagation(),e.preventDefault()}},{key:"_onItemClick",value:function(e){var t,r,n,i,o=e.delegateTarget,a="function"==typeof this._config.onOptionClick?this._config.onOptionClick:null,s="function"==typeof this._config.onItemClick?this._config.onItemClick:null,l=null===(t=this._root)||void 0===t?void 0:t.querySelector(".selected");util.addClass(o,"selected"),l&&(util.removeClass(l,"selected"),i=Number(l.getAttribute("data-index")));var c=Number(o.getAttribute("data-index")),u={from:void 0!==_typeof$1(i)?null===(r=this._config.list)||void 0===r?void 0:r[i]:void 0,to:null===(n=this._config.list)||void 0===n?void 0:n[c]};null==a||a(e,u),o&&i===c||null==s||s(e,u)}},{key:"_handleHide",value:function(e){var t,r;e.stopPropagation(),e.preventDefault(),null===(t=(r=this._config).hide)||void 0===t||t.call(r)}}]),e}(),optionsIcon="",ListType=function(e){return e.Middle="middle",e.Bottom="bottom",e.Fullscreen="fullscreen",e.Inner="inner",e}(ListType||{}),RenderType=function(e){return e.Icon="Icon",e.Text="Text",e}(RenderType||{}),isMobile$1="mobile"===sniffer.device,MOBILE_LIST_TYPES=["bottom","fullscreen","inner"],PC_LIST_TYPES=["middle"],MODAL_TYPES=["bottom","inner","fullscreen"],CUSTOM_TYPES=["bottom","inner","fullscreen"],OptionsIcon=function(e){_inherits(r,Plugin);var t=_createSuper(r);function r(e){var n;return _classCallCheck$1(this,r),_defineProperty$1(_assertThisInitialized(n=t.call(this,e)),"optionsList",void 0),_defineProperty$1(_assertThisInitialized(n),"_isIcon",void 0),_defineProperty$1(_assertThisInitialized(n),"_isActive",void 0),_defineProperty$1(_assertThisInitialized(n),"_curIndex",void 0),_defineProperty$1(_assertThisInitialized(n),"activeEvent",void 0),_defineProperty$1(_assertThisInitialized(n),"onEnter",(function(e){e.preventDefault(),e.stopPropagation(),n.emit("icon_mouseenter",{pluginName:n.pluginName}),n.toggle(!0)})),_defineProperty$1(_assertThisInitialized(n),"onLeave",(function(e){e.preventDefault(),e.stopPropagation(),n.emit("icon_mouseleave",{pluginName:n.pluginName}),n._isActive&&n.toggle(!1)})),n._isIcon=!1,n._isActive=!1,n._curIndex=0,n}return _createClass$1(r,[{key:"updateLang",value:function(){this.config.list&&this.renderItemList(this.config.list,this._curIndex)}},{key:"afterCreate",value:function(){var e=this,t=this.config;this.config.listType=this._getListType(),this.initIcons(),t.hidePortrait&&util.addClass(this.root,"portrait"),isMobile$1&&this.on(PLAYER_FOCUS,(function(){e._isActive&&(e.optionsList&&e.optionsList.hide(),e._isActive=!1)})),t.list&&this.renderItemList(t.list),this.activeEvent=isMobile$1?"touchend":"mouseenter",this.bind(this.activeEvent,this.onEnter),this.bind("mouseleave",this.onLeave)}},{key:"initIcons",value:function(){var e=this,t=this.icons,r=_Object$keys(t);if(r.length>0&&"Icon"===this.config.renderType)return r.forEach((function(r){e.appendChild(".xgplayer-icon",t[r])})),void(this._isIcon=!0);var n=this.appendChild(".xgplayer-icon",util.createDom("span","",{},"icon-text"));n&&util.addClass(n,"btn-text")}},{key:"show",value:function(){!this.config.list||this.config.list.length<1||this.config.hideOnSingleOption&&1===this.config.list.length||util.addClass(this.root,"show")}},{key:"hide",value:function(){util.removeClass(this.root,"show")}},{key:"toggle",value:function(e){if(e!==this._isActive){var t=this.player.controls,r=this.config.listType;e?(r&&_includesInstanceProperty2(MODAL_TYPES).call(MODAL_TYPES,r)?null==t||t.blur():null==t||t.focus(),this.optionsList&&this.optionsList.show()):(r&&_includesInstanceProperty2(MODAL_TYPES).call(MODAL_TYPES,r)?null==t||t.focus():null==t||t.focusAwhile(),this.optionsList&&this.optionsList.hide()),this._isActive=e}}},{key:"onItemClick",value:function(e,t){var r;e.preventDefault(),e.stopPropagation();var n=this.config.listType;this._curIndex=null===(r=t.to)||void 0===r?void 0:r.index,this.changeCurrentText(),(this.config.isItemClickHide||n&&_includesInstanceProperty2(MODAL_TYPES).call(MODAL_TYPES,n))&&this.toggle(!1)}},{key:"onOptionClick",value:function(e,t){e.preventDefault(),e.stopPropagation()}},{key:"changeCurrentText",value:function(){if(!this._isIcon){var e=this.config.list,t=e&&this._curIndex<e.length?this._curIndex:0,r=null==e?void 0:e[t];if(r){var n,i=_findInstanceProperty2(this).call(this,".icon-text"),o=this.player.config.i18nManager;if(i)i.innerHTML=o.normalize(null!==(n=null==r?void 0:r.iconText)&&void 0!==n?n:null==r?void 0:r.text)}}}},{key:"renderItemList",value:function(e,t){var n,i=this,o=this.config,a=this.optionsList,s=this.player;if("number"==typeof t&&(this._curIndex=t),a)return a.renderItemList(e),this.changeCurrentText(),void(a instanceof MobilePlayerPanel&&a.renderTitle());this.config.isShowIcon&&(this.optionsList=o.listType&&_includesInstanceProperty2(CUSTOM_TYPES).call(CUSTOM_TYPES,o.listType)?new MobilePlayerPanel({config:{list:e||[],onItemClick:function(e,t){i.onItemClick(e,t)},onOptionClick:function(e,t){i.onOptionClick(e,t)},panel:this.config.panel,listType:null!==(n=o.listType)&&void 0!==n?n:r.defaultConfig.listType,isAutoChange:o.isAutoChange,hide:function(){return i.toggle(!1)}},root:s.root,player:s}):new OptionList({config:{data:e||[],onItemClick:function(e,t){i.onItemClick(e,t)}},root:this.root}),this.changeCurrentText(),this.show())}},{key:"destroy",value:function(){this.activeEvent&&this.unbind(this.activeEvent,this.onEnter),this.unbind("mouseleave",this.onLeave),this.optionsList&&(this.optionsList.destroy(),this.optionsList=void 0)}},{key:"render",value:function(){return this.config.isShowIcon?'<xg-icon class="xg-options-icon '.concat(this.config.className||"",'">\n <div class="xgplayer-icon">\n </div>\n </xg-icon>'):""}},{key:"_getListType",value:function(){var e,t=this.config.listType;return null!==(e=this.player)&&void 0!==e&&null!==(e=e.config)&&void 0!==e&&e.listType&&(t=this.player.config.listType),isMobile$1||t&&_includesInstanceProperty2(MOBILE_LIST_TYPES).call(MOBILE_LIST_TYPES,t)||(t="bottom"),isMobile$1||t&&_includesInstanceProperty2(PC_LIST_TYPES).call(PC_LIST_TYPES,t)||(t="middle"),t}}],[{key:"pluginName",get:function(){return"optionsIcon"}},{key:"defaultConfig",get:function(){return{position:isMobile$1?POSITIONS.ROOT_TOP_RIGHT:POSITIONS.CONTROLS_RIGHT,listType:isMobile$1?"bottom":"middle",index:100,list:[],listStyle:{},hidePortrait:!0,isShowIcon:!1,renderType:isMobile$1?"Icon":"Text",isItemClickHide:!0,hideOnSingleOption:!0,isAutoChange:!0}}}]),r}(),Sources=function(e){_inherits(r,OptionsIcon);var t=_createSuper(r);function r(){return _classCallCheck$1(this,r),t.apply(this,arguments)}return _createClass$1(r,[{key:"updateLang",value:function(){this.renderItemList()}},{key:"beforeCreate",value:function(e){var t=e.player.config.sources.sourceManager;e.config.list=t.sources}},{key:"registerIcons",value:function(){return{source:{icon:SourceIcon}}}},{key:"renderItemList",value:function(){var e=this.config.sourceManager,t=e.sources,n=e.source,i=this.player.config.i18nManager;if(t.length<2)this.hide();else{var o=_mapInstanceProperty(t).call(t,(function(e){var t;return _objectSpread2$1(_objectSpread2$1({},e),{},{showText:null!==(t=i.normalize(e.text))&&void 0!==t?t:e.name,selected:!1})})),a=_findIndexInstanceProperty(o).call(o,(function(e){return e.name===(null==n?void 0:n.name)}));this.config.list=t,a>-1&&(o[a].selected=!0),_get(_getPrototypeOf(r.prototype),"renderItemList",this).call(this,o,a)}}},{key:"onItemClick",value:function(e,t){var n,i=this;_get(_getPrototypeOf(r.prototype),"onItemClick",this).call(this,e,t),null===(n=this.player.config)||void 0===n||n.veplayer.switch({source:t.to.name},{fallbackToFirstDefinition:!0}).catch((function(){i.renderItemList()}))}}],[{key:"pluginName",get:function(){return"sources"}},{key:"defaultConfig",get:function(){return _objectSpread2$1(_objectSpread2$1({},OptionsIcon.defaultConfig),{},{index:4,panel:{title:{jp:"ライン選ぶ",en:"Line Choose","zh-cn":"线路选择","zh-hk":"線路選擇"}},list:[],className:"xgplayer-sources",hidePortrait:!1,isShowIcon:!0})}},{key:"textTips",get:function(){return{jp:"ライン",en:"Line","zh-cn":"线路","zh-hk":"線路"}}}]),r}();function DefinitionIcon(){return(new DOMParser).parseFromString('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M16 3.8001H4C3.55817 3.8001 3.2 4.15827 3.2 4.6001V12.6001C3.2 13.0419 3.55817 13.4001 4 13.4001H16C16.4418 13.4001 16.8 13.0419 16.8 12.6001V4.6001C16.8 4.15827 16.4418 3.8001 16 3.8001ZM4 2.6001C2.89543 2.6001 2 3.49553 2 4.6001V12.6001C2 13.7047 2.89543 14.6001 4 14.6001H16C17.1046 14.6001 18 13.7047 18 12.6001V4.6001C18 3.49553 17.1046 2.6001 16 2.6001H4ZM5.0249 6.24509V11.6001H5.9024V9.23009H8.6174V11.6001H9.4949V6.24509H8.6174V8.48009H5.9024V6.24509H5.0249ZM10.5474 6.24509V11.6001H12.5049C13.3749 11.6001 14.0274 11.3601 14.4774 10.8801C14.9049 10.4226 15.1224 9.77009 15.1224 8.92259C15.1224 8.06759 14.9049 7.41509 14.4774 6.96509C14.0274 6.48509 13.3749 6.24509 12.5049 6.24509H10.5474ZM11.4249 6.99509H12.3399C13.0074 6.99509 13.4949 7.14509 13.8024 7.45259C14.1024 7.75259 14.2524 8.24759 14.2524 8.92259C14.2524 9.58259 14.1024 10.0701 13.8024 10.3851C13.4949 10.6926 13.0074 10.8501 12.3399 10.8501H11.4249V6.99509ZM4.15 16.1001C3.79101 16.1001 3.5 16.3911 3.5 16.7501C3.5 17.1091 3.79101 17.4001 4.15 17.4001H15.85C16.209 17.4001 16.5 17.1091 16.5 16.7501C16.5 16.3911 16.209 16.1001 15.85 16.1001H4.15Z" fill="#ffffff"/>\n</svg>',"image/svg+xml").firstChild}var lodash_clonedeep={exports:{}};lodash_clonedeep.exports,function(e,t){var r="__lodash_hash_undefined__",n=9007199254740991,i="[object Arguments]",o="[object Boolean]",a="[object Date]",s="[object Function]",l="[object GeneratorFunction]",c="[object Map]",u="[object Number]",p="[object Object]",f="[object Promise]",h="[object RegExp]",d="[object Set]",y="[object String]",g="[object Symbol]",$="[object WeakMap]",v="[object ArrayBuffer]",_="[object DataView]",m="[object Float32Array]",E="[object Float64Array]",S="[object Int8Array]",b="[object Int16Array]",P="[object Int32Array]",T="[object Uint8Array]",I="[object Uint8ClampedArray]",O="[object Uint16Array]",A="[object Uint32Array]",C=/\w*$/,R=/^\[object .+?Constructor\]$/,w=/^(?:0|[1-9]\d*)$/,k={};k[i]=k["[object Array]"]=k[v]=k[_]=k[o]=k[a]=k[m]=k[E]=k[S]=k[b]=k[P]=k[c]=k[u]=k[p]=k[h]=k[d]=k[y]=k[g]=k[T]=k[I]=k[O]=k[A]=!0,k["[object Error]"]=k[s]=k[$]=!1;var N="object"==_typeof$1(commonjsGlobal)&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,L="object"==("undefined"==typeof self?"undefined":_typeof$1(self))&&self&&self.Object===Object&&self,D=N||L||Function("return this")(),x=t&&!t.nodeType&&t,M=x&&e&&!e.nodeType&&e,j=M&&M.exports===x;function F(e,t){return e.set(t[0],t[1]),e}function U(e,t){return e.add(t),e}function H(e,t,r,n){var i=-1,o=e?e.length:0;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}function B(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function G(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function K(e,t){return function(r){return e(t(r))}}function V(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}var Y,W=Array.prototype,z=Function.prototype,q=Object.prototype,X=D["__core-js_shared__"],Z=(Y=/[^.]+$/.exec(X&&_keysInstanceProperty2(X)&&_keysInstanceProperty2(X).IE_PROTO||""))?"Symbol(src)_1."+Y:"",J=z.toString,Q=q.hasOwnProperty,ee=q.toString,te=RegExp("^"+J.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),re=j?D.Buffer:void 0,ne=D.Symbol,ie=D.Uint8Array,oe=K(_Object$getPrototypeOf2,Object),ae=Object.create,se=q.propertyIsEnumerable,le=_spliceInstanceProperty2(W),ce=_Object$getOwnPropertySymbols2,ue=re?re.isBuffer:void 0,pe=K(_Object$keys,Object),fe=Me(D,"DataView"),he=Me(D,"Map"),de=Me(D,"Promise"),ye=Me(D,"Set"),ge=Me(D,"WeakMap"),$e=Me(Object,"create"),ve=Be(fe),_e=Be(he),me=Be(de),Ee=Be(ye),Se=Be(ge),be=ne?ne.prototype:void 0,Pe=be?be.valueOf:void 0;function Te(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Ie(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Oe(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Ae(e){this.__data__=new Ie(e)}function Ce(e,t){var r=Ke(e)||function(e){return function(e){return function(e){return!!e&&"object"==_typeof$1(e)}(e)&&Ve(e)}(e)&&Q.call(e,"callee")&&(!se.call(e,"callee")||ee.call(e)==i)}(e)?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],n=r.length,o=!!n;for(var a in e)!t&&!Q.call(e,a)||o&&("length"==a||Ue(a,n))||r.push(a);return r}function Re(e,t,r){var n=e[t];Q.call(e,t)&&Ge(n,r)&&(void 0!==r||t in e)||(e[t]=r)}function we(e,t){for(var r=e.length;r--;)if(Ge(e[r][0],t))return r;return-1}function ke(e,t,r,n,f,$,R){var w;if(n&&(w=$?n(e,f,$,R):n(e)),void 0!==w)return w;if(!ze(e))return e;var N=Ke(e);if(N){if(w=function(e){var t=e.length,r=e.constructor(t);t&&"string"==typeof e[0]&&Q.call(e,"index")&&(r.index=e.index,r.input=e.input);return r}(e),!t)return function(e,t){var r=-1,n=e.length;t||(t=Array(n));for(;++r<n;)t[r]=e[r];return t}(e,w)}else{var L=Fe(e),D=L==s||L==l;if(Ye(e))return function(e,t){if(t)return _sliceInstanceProperty2(e).call(e);var r=new e.constructor(e.length);return e.copy(r),r}(e,t);if(L==p||L==i||D&&!$){if(B(e))return $?e:{};if(w=function(e){return"function"!=typeof e.constructor||He(e)?{}:function(e){return ze(e)?ae(e):{}}(oe(e))}(D?{}:e),!t)return function(e,t){return De(e,je(e),t)}(e,function(e,t){return e&&De(t,qe(t),e)}(w,e))}else{if(!k[L])return $?e:{};w=function(e,t,r,n){var i=e.constructor;switch(t){case v:return Le(e);case o:case a:return new i(+e);case _:return function(e,t){var r=t?Le(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,n);case m:case E:case S:case b:case P:case T:case I:case O:case A:return function(e,t){var r=t?Le(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}(e,n);case c:return function(e,t,r){var n=t?r(G(e),!0):G(e);return H(n,F,new e.constructor)}(e,n,r);case u:case y:return new i(e);case h:return function(e){var t=new e.constructor(e.source,C.exec(e));return t.lastIndex=e.lastIndex,t}(e);case d:return function(e,t,r){var n=t?r(V(e),!0):V(e);return H(n,U,new e.constructor)}(e,n,r);case g:return s=e,Pe?Object(Pe.call(s)):{}}var s}(e,L,ke,t)}}R||(R=new Ae);var x=R.get(e);if(x)return x;if(R.set(e,w),!N)var M=r?function(e){return function(e,t,r){var n=t(e);return Ke(e)?n:function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}(n,r(e))}(e,qe,je)}(e):qe(e);return function(e,t){for(var r=-1,n=e?e.length:0;++r<n&&!1!==t(e[r],r,e););}(M||e,(function(i,o){M&&(i=e[o=i]),Re(w,o,ke(i,t,r,n,o,e,R))})),w}function Ne(e){return!(!ze(e)||(t=e,Z&&Z in t))&&(We(e)||B(e)?te:R).test(Be(e));var t}function Le(e){var t=new e.constructor(e.byteLength);return new ie(t).set(new ie(e)),t}function De(e,t,r,n){r||(r={});for(var i=-1,o=t.length;++i<o;){var a=t[i],s=n?n(r[a],e[a],a,r,e):void 0;Re(r,a,void 0===s?e[a]:s)}return r}function xe(e,t){var r,n,i=e.__data__;return("string"==(n=_typeof$1(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:_mapInstanceProperty(i)}function Me(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return Ne(r)?r:void 0}Te.prototype.clear=function(){this.__data__=$e?$e(null):{}},Te.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Te.prototype.get=function(e){var t=this.__data__;if($e){var n=t[e];return n===r?void 0:n}return Q.call(t,e)?t[e]:void 0},Te.prototype.has=function(e){var t=this.__data__;return $e?void 0!==t[e]:Q.call(t,e)},Te.prototype.set=function(e,t){return this.__data__[e]=$e&&void 0===t?r:t,this},Ie.prototype.clear=function(){this.__data__=[]},Ie.prototype.delete=function(e){var t=this.__data__,r=we(t,e);return!(r<0)&&(r==t.length-1?t.pop():le.call(t,r,1),!0)},Ie.prototype.get=function(e){var t=this.__data__,r=we(t,e);return r<0?void 0:t[r][1]},Ie.prototype.has=function(e){return we(this.__data__,e)>-1},Ie.prototype.set=function(e,t){var r=this.__data__,n=we(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},Oe.prototype.clear=function(){this.__data__={hash:new Te,map:new(he||Ie),string:new Te}},Oe.prototype.delete=function(e){return xe(this,e).delete(e)},Oe.prototype.get=function(e){return xe(this,e).get(e)},Oe.prototype.has=function(e){return xe(this,e).has(e)},Oe.prototype.set=function(e,t){return xe(this,e).set(e,t),this},Ae.prototype.clear=function(){this.__data__=new Ie},Ae.prototype.delete=function(e){return this.__data__.delete(e)},Ae.prototype.get=function(e){return this.__data__.get(e)},Ae.prototype.has=function(e){return this.__data__.has(e)},Ae.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Ie){var n=r.__data__;if(!he||n.length<199)return n.push([e,t]),this;r=this.__data__=new Oe(n)}return r.set(e,t),this};var je=ce?K(ce,Object):function(){return[]},Fe=function(e){return ee.call(e)};function Ue(e,t){return!!(t=null==t?n:t)&&("number"==typeof e||w.test(e))&&e>-1&&e%1==0&&e<t}function He(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||q)}function Be(e){if(null!=e){try{return J.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ge(e,t){return e===t||e!=e&&t!=t}(fe&&Fe(new fe(new ArrayBuffer(1)))!=_||he&&Fe(new he)!=c||de&&Fe(de.resolve())!=f||ye&&Fe(new ye)!=d||ge&&Fe(new ge)!=$)&&(Fe=function(e){var t=ee.call(e),r=t==p?e.constructor:void 0,n=r?Be(r):void 0;if(n)switch(n){case ve:return _;case _e:return c;case me:return f;case Ee:return d;case Se:return $}return t});var Ke=Array.isArray;function Ve(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}(e.length)&&!We(e)}var Ye=ue||function(){return!1};function We(e){var t=ze(e)?ee.call(e):"";return t==s||t==l}function ze(e){var t=_typeof$1(e);return!!e&&("object"==t||"function"==t)}function qe(e){return Ve(e)?Ce(e):function(e){if(!He(e))return pe(e);var t=[];for(var r in Object(e))Q.call(e,r)&&"constructor"!=r&&t.push(r);return t}(e)}e.exports=function(e){return ke(e,!0,!0)}}(lodash_clonedeep,lodash_clonedeep.exports);var lodash_clonedeepExports=lodash_clonedeep.exports,clonedeep=getDefaultExportFromCjs(lodash_clonedeepExports),DefinitionPlugin=function(e){_inherits(n,OptionsIcon);var t,r=_createSuper(n);function n(){var e,t;_classCallCheck$1(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return _defineProperty$1(_assertThisInitialized(t=r.call.apply(r,_concatInstanceProperty2(e=[this]).call(e,o))),"_waitingStartTime",0),_defineProperty$1(_assertThisInitialized(t),"_timer",void 0),_defineProperty$1(_assertThisInitialized(t),"_toastId",void 0),t}return _createClass$1(n,[{key:"updateLang",value:function(){this.renderItemList()}},{key:"beforeCreate",value:function(e){var t,r=e.player.config.sources.sourceManager;e.config.list=null===(t=r.source)||void 0===t?void 0:t.definitions}},{key:"afterCreate",value:function(){var e,t;_get(_getPrototypeOf(n.prototype),"afterCreate",this).call(this),(null!==(e=null===(t=this.player.config.sourceManager.source)||void 0===t?void 0:t.definitions)&&void 0!==e?e:[]).length<2?this.hide():(this.renderItemList(),this.on(Events.WAITING,this._waiting.bind(this)),this.on(Events.PLAYING,this._clearTimer.bind(this)),this.on(Events.PAUSE,this._clearTimer.bind(this)),this.on(Events.PLAY,this._clearTimer.bind(this)),this._initTimeUpdateEvent())}},{key:"registerIcons",value:function(){return{source:{icon:DefinitionIcon}}}},{key:"renderItemList",value:function(){var e,t,r,i=this,o=this.player.config.sourceManager,a=null!==(e=null===(t=o.source)||void 0===t?void 0:t.definitions)&&void 0!==e?e:[];if(a.length<2)this.hide();else{var s=_mapInstanceProperty(a).call(a,(function(e){var t;return{url:e.url,definition:e.definition||"",showText:null!==(t=i.player.config.i18nManager.normalize(e.text))&&void 0!==t?t:e.definition,selected:!1}})),l=_findIndexInstanceProperty(a).call(a,(function(e){var t;return e.definition===(null===(t=o.definition)||void 0===t?void 0:t.definition)}));this.config.list=null===(r=o.source)||void 0===r?void 0:r.definitions,l>-1&&(s[l].selected=!0),_get(_getPrototypeOf(n.prototype),"renderItemList",this).call(this,s,l)}}},{key:"onItemClick",value:function(e,t){var r,i=this;this._showToast(t.to),_get(_getPrototypeOf(n.prototype),"onItemClick",this).call(this,e,t),null===(r=this.player.config)||void 0===r||r.veplayer.switch({definition:t.to.definition}).catch((function(){i.renderItemList()}))}},{key:"fallback",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t,r,n,i,o,a,s,l=arguments;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=l.length>0&&void 0!==l[0]?l[0]:{toast:!0},i=this.player.config.sourceManager,!((o=_findIndexInstanceProperty(t=this.config.demotePriority).call(t,(function(e){var t;return e===(null===(t=i.definition)||void 0===t?void 0:t.definition)})))<0)){e.next=5;break}return e.abrupt("return");case 5:if(a=clonedeep(i.definition),s=this._getNextDefinition(o)){e.next=9;break}return e.abrupt("return");case 9:if(!n.toast){e.next=15;break}return e.next=12,this._toast(s);case 12:if(e.sent){e.next=15;break}return e.abrupt("return");case 15:this.player.emit(Events.DEFINITION_FALLBACK,{from:a,to:s}),null===(r=this.player.config)||void 0===r||r.veplayer.switch({definition:s.definition}).catch((function(){}));case 17:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"_waiting",value:function(){var e=this;if(!this._timer){this._waitingStartTime=Date.now();var t=this.player.currentTime;this._timer=window.setTimeout((function(){e.player&&e.player.currentTime<=t+.1&&(e.player.emit(Events.LONG_WAITING),e.config.needFallback&&e.fallback({toast:!0}),e._clearTimer())}),this.config.longWaitingTime)}}},{key:"_clearTimer",value:function(){this._timer&&(clearTimeout(this._timer),this._timer=void 0),this._waitingStartTime&&(this._waitingStartTime=0)}},{key:"_toast",value:function(e){var t=this,r=this.player.config.i18nManager;return new _Promise((function(n){var i,o,a=null===(i=t.player)||void 0===i?void 0:i.getPlugin("toast");if(a){var s=util.createDom("div",r.getText("DEFINITION_FALLBACK_TOAST"),void 0,"veplayer-toast-txt"),l=null!==(o=t.player.config.i18nManager.normalize(e.text))&&void 0!==o?o:e.definition,c=util.createDom("span",l,void 0,"veplayer-toast-txt-bt");s.appendChild(c);var u=a.toast(s,{duration:5e3,closable:!0});c.addEventListener("click",(function(){a.remove(u),n(!0)}))}else n(!1)}))}},{key:"_getNextDefinition",value:function(e){var t,r=this.player.config.sourceManager;if(null!==(t=r.source)&&void 0!==t&&t.definitions.length&&!(e+1>=this.config.demotePriority.length)){var n=e+1,i=_findInstanceProperty2(r).call(r,{definition:this.config.demotePriority[n]});return i||this._getNextDefinition(n)}}},{key:"_initTimeUpdateEvent",value:function(){var e=this,t=this.player.currentTime;this.on(Events.TIME_UPDATE,(function(){var r=e.player.currentTime;r!==t?(t=r,e._clearTimer()):t=r}))}},{key:"_showToast",value:function(e){var t,r,n,i=this,o=null===(t=this.player)||void 0===t?void 0:t.getPlugin("toast"),a=this.player.config.i18nManager;o&&(this._toastId&&o.remove(this._toastId),this._toastId=o.toast(_concatInstanceProperty2(r="".concat(a.getText("DEFINITION_SWITCHING")," ")).call(r,null!==(n=e.showText)&&void 0!==n?n:e.definition," ..."),{duration:2e3,closable:!0}),this.player.once(Events.AFTER_DEFINITION_CHANGE,(function(){void 0!==i._toastId&&o.remove(i._toastId)})))}}],[{key:"pluginName",get:function(){return"definition"}},{key:"defaultConfig",get:function(){return _objectSpread2$1(_objectSpread2$1({},OptionsIcon.defaultConfig),{},{index:3,list:[],panel:{title:{jp:"クラリティセレクション",en:"Definition Choose","zh-cn":"清晰度选择","zh-hk":"清晰度選擇"}},className:"xgplayer-definition",hidePortrait:!1,isShowIcon:!0,longWaitingTime:5e3,needFallback:!1,demotePriority:["uhd","hd","sd","ld","ao"]})}},{key:"textTips",get:function(){return{jp:"明快さ",en:"Definition","zh-cn":"清晰度","zh-hk":"清晰度"}}}]),n}(),NAME_MAP={"biz:vod":"veplayer.biz.vod.[env].[ext]","biz:live":"veplayer.biz.live.[env].[ext]","plugin:flv":"veplayer.plugin.flv.[env].[ext]","plugin:mp4":"veplayer.plugin.mp4.[env].[ext]","plugin:hls":"veplayer.plugin.hls.[env].[ext]","plugin:hlsjs":"veplayer.plugin.hlsjs.[env].[ext]","plugin:dashjs":"veplayer.plugin.dashjs.[env].[ext]","plugin:shaka":"veplayer.plugin.shaka.[env].[ext]","plugin:rtm":"veplayer.plugin.rtm.[env].[ext]","plugin:xgvideo":"veplayer.plugin.xgvideo.[env].[ext]","plugin:drm":"veplayer.plugin.drm.[env].[ext]","plugin:abr":"veplayer.plugin.abr.[env].[ext]","strategy:base":"veplayer.strategy.base.[env].[ext]","strategy:rtmAdaptiveBuffer":"veplayer.strategy.rtm.adaptive.buffer.[env].[ext]"},DynamicModule=function(e){return e.BizVod="biz:vod",e.BizLive="biz:live",e.PluginFlv="plugin:flv",e.PluginMp4="plugin:mp4",e.PluginHls="plugin:hls",e.PluginHlsJs="plugin:hlsjs",e.PluginDashJs="plugin:dashjs",e.PluginShaka="plugin:shaka",e.PluginRtm="plugin:rtm",e.PluginXgvideo="plugin:xgvideo",e.PluginDrm="plugin:drm",e.PluginAbr="plugin:abr",e.StrategyBase="strategy:base",e.StrategyRtmAdaptiveBuffer="strategy:rtmAdaptiveBuffer",e}(DynamicModule||{}),Loader=function(){function e(t){var r=this;_classCallCheck$1(this,e),_defineProperty$1(this,"modules",{}),_defineProperty$1(this,"mountPromiseMap",{}),_defineProperty$1(this,"_baseUrl",void 0),_defineProperty$1(this,"_moduleSystem",void 0),_defineProperty$1(this,"load",function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function e(t,n){var i,o,a,s,l;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r._moduleSystem){e.next=2;break}throw new Error('You have to specify moduleSystem first, call "setModuleSystem(moduleSystem)" to set module system');case 2:if(NAME_MAP[t]){e.next=4;break}throw new Error('Invalid module name: "'.concat(t,'"'));case 4:if("esm"!==r._moduleSystem){e.next=11;break}if(r.modules[t]){e.next=9;break}throw new Error('Dynamic module "'.concat(t,'" not found, you have to register it first under ESM'));case 9:return o=r.modules[t].exports,e.abrupt("return",null!==(i=o.default)&&void 0!==i?i:o);case 11:if(!r.modules[t]){e.next=21;break}if(1!==r.modules[t].state){e.next=16;break}return e.abrupt("return",r.modules[t].exports);case 16:if(0!==r.modules[t].state){e.next=20;break}return e.abrupt("return",r.mountPromiseMap[t].then((function(e){var t;return null!==(t=e.default)&&void 0!==t?t:e})));case 20:throw null!==(a=r.modules[t].error)&&void 0!==a?a:new Error('Dynamic module "'.concat(t,'" load failed.'));case 21:return s=[r._baseUrl,NAME_MAP[t]].join("/").replace("[env]","production").replace("[ext]","js"),l={src:null!=n?n:s,name:t,state:0,exports:{__PLUGIN_NAME__:t}},r.modules[t]=l,r.mountPromiseMap[t]=r._mount(l),e.abrupt("return",r.mountPromiseMap[t]);case 26:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),_defineProperty$1(this,"registerPlugin",(function(e,t){if(!r._moduleSystem)throw new Error("You have to specify moduleSystem first, call setModuleSystem(moduleSystem) to set module system");return"esm"===r._moduleSystem?(r.modules[e]={src:"esm:".concat(e),name:e,state:1,exports:t},r.modules[e].exports):(r.modules[e]?r.modules[e].exports=t:r.modules[e]={src:"umd:".concat(e),name:e,state:1,exports:t},r.modules[e].exports)})),_defineProperty$1(this,"register",(function(e){return _mapInstanceProperty(e).call(e,(function(e){return r.registerPlugin(e.__PLUGIN_NAME__,e)}))})),this._baseUrl=t.baseUrl}return _createClass$1(e,[{key:"baseUrl",get:function(){return this._baseUrl}},{key:"moduleSystem",get:function(){return this._moduleSystem}},{key:"setModuleSystem",value:function(e){this._moduleSystem=e}},{key:"setBaseUrl",value:function(e){this._baseUrl=e}},{key:"_mount",value:function(e){var t=this.modules;return new _Promise((function(r,n){var i=document.createElement("script");i.src=e.src,i.onload=function(){e.state=1,r(t[e.name].exports),i.onload=null},i.onerror=function(t){e.state=2,e.error=t,n(t),i.onerror=null},document.body.appendChild(i)}))}}]),e}(),reverse2=reverse$1,_reverseInstanceProperty2=getDefaultExportFromCjs(reverse2),FUNC_ERROR_TEXT="Expected a function",PLACEHOLDER="__lodash_placeholder__",BIND_FLAG=1,BIND_KEY_FLAG=2,CURRY_BOUND_FLAG=4,CURRY_FLAG=8,CURRY_RIGHT_FLAG=16,PARTIAL_FLAG=32,PARTIAL_RIGHT_FLAG=64,ARY_FLAG=128,REARG_FLAG=256,FLIP_FLAG=512,INFINITY=1/0,MAX_SAFE_INTEGER=9007199254740991,MAX_INTEGER=17976931348623157e292,NAN=NaN,wrapFlags=[["ary",ARY_FLAG],["bind",BIND_FLAG],["bindKey",BIND_KEY_FLAG],["curry",CURRY_FLAG],["curryRight",CURRY_RIGHT_FLAG],["flip",FLIP_FLAG],["partial",PARTIAL_FLAG],["partialRight",PARTIAL_RIGHT_FLAG],["rearg",REARG_FLAG]],funcTag="[object Function]",genTag="[object GeneratorFunction]",symbolTag="[object Symbol]",reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reTrim=/^\s+|\s+$/g,reWrapComment=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,reWrapDetails=/\{\n\/\* \[wrapped with (.+)\] \*/,reSplitDetails=/,? & /,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsHostCtor=/^\[object .+?Constructor\]$/,reIsOctal=/^0o[0-7]+$/i,reIsUint=/^(?:0|[1-9]\d*)$/,freeParseInt=_parseInt2,freeGlobal="object"==_typeof$1(commonjsGlobal)&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,freeSelf="object"==("undefined"==typeof self?"undefined":_typeof$1(self))&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")();function apply$1(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function arrayEach(e,t){for(var r=-1,n=e?e.length:0;++r<n&&!1!==t(e[r],r,e););return e}function arrayIncludes(e,t){return!!(e?e.length:0)&&baseIndexOf(e,t,0)>-1}function baseFindIndex(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function baseIndexOf(e,t,r){if(t!=t)return baseFindIndex(e,baseIsNaN,r);for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}function baseIsNaN(e){return e!=e}function countHolders(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&n++;return n}function getValue(e,t){return null==e?void 0:e[t]}function isHostObject(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function replaceHolders(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var a=e[r];a!==t&&a!==PLACEHOLDER||(e[r]=PLACEHOLDER,o[i++]=r)}return o}var funcProto=Function.prototype,objectProto=Object.prototype,coreJsData=root["__core-js_shared__"],maskSrcKey=function(){var e=/[^.]+$/.exec(coreJsData&&_keysInstanceProperty2(coreJsData)&&_keysInstanceProperty2(coreJsData).IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),funcToString=funcProto.toString,hasOwnProperty=objectProto.hasOwnProperty,objectToString=objectProto.toString,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),objectCreate=Object.create,nativeMax=Math.max,nativeMin=Math.min,defineProperty5=function(){var e=getNative(Object,"defineProperty"),t=getNative.name;return t&&t.length>2?e:void 0}();function baseCreate(e){return isObject(e)?objectCreate(e):{}}function baseIsNative(e){return!(!isObject(e)||isMasked(e))&&(isFunction(e)||isHostObject(e)?reIsNative:reIsHostCtor).test(toSource(e))}function composeArgs(e,t,r,n){for(var i=-1,o=e.length,a=r.length,s=-1,l=t.length,c=nativeMax(o-a,0),u=Array(l+c),p=!n;++s<l;)u[s]=t[s];for(;++i<a;)(p||i<o)&&(u[r[i]]=e[i]);for(;c--;)u[s++]=e[i++];return u}function composeArgsRight(e,t,r,n){for(var i=-1,o=e.length,a=-1,s=r.length,l=-1,c=t.length,u=nativeMax(o-s,0),p=Array(u+c),f=!n;++i<u;)p[i]=e[i];for(var h=i;++l<c;)p[h+l]=t[l];for(;++a<s;)(f||i<o)&&(p[h+r[a]]=e[i++]);return p}function copyArray(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function createBind(e,t,r){var n=t&BIND_FLAG,i=createCtor(e);return function t(){return(this&&this!==root&&this instanceof t?i:e).apply(n?r:this,arguments)}}function createCtor(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=baseCreate(e.prototype),n=e.apply(r,t);return isObject(n)?n:r}}function createCurry(e,t,r){var n=createCtor(e);return function i(){for(var o=arguments.length,a=Array(o),s=o,l=getHolder(i);s--;)a[s]=arguments[s];var c=o<3&&a[0]!==l&&a[o-1]!==l?[]:replaceHolders(a,l);return(o-=c.length)<r?createRecurry(e,t,createHybrid,i.placeholder,void 0,a,c,void 0,void 0,r-o):apply$1(this&&this!==root&&this instanceof i?n:e,this,a)}}function createHybrid(e,t,r,n,i,o,a,s,l,c){var u=t&ARY_FLAG,p=t&BIND_FLAG,f=t&BIND_KEY_FLAG,h=t&(CURRY_FLAG|CURRY_RIGHT_FLAG),d=t&FLIP_FLAG,y=f?void 0:createCtor(e);return function g(){for(var $=arguments.length,v=Array($),_=$;_--;)v[_]=arguments[_];if(h)var m=getHolder(g),E=countHolders(v,m);if(n&&(v=composeArgs(v,n,i,h)),o&&(v=composeArgsRight(v,o,a,h)),$-=E,h&&$<c){var S=replaceHolders(v,m);return createRecurry(e,t,createHybrid,g.placeholder,r,v,S,s,l,c-$)}var b=p?r:this,P=f?b[e]:e;return $=v.length,s?v=reorder(v,s):d&&$>1&&_reverseInstanceProperty2(v).call(v),u&&l<$&&(v.length=l),this&&this!==root&&this instanceof g&&(P=y||createCtor(P)),P.apply(b,v)}}function createPartial(e,t,r,n){var i=t&BIND_FLAG,o=createCtor(e);return function t(){for(var a=-1,s=arguments.length,l=-1,c=n.length,u=Array(c+s),p=this&&this!==root&&this instanceof t?o:e;++l<c;)u[l]=n[l];for(;s--;)u[l++]=arguments[++a];return apply$1(p,i?r:this,u)}}function createRecurry(e,t,r,n,i,o,a,s,l,c){var u=t&CURRY_FLAG;t|=u?PARTIAL_FLAG:PARTIAL_RIGHT_FLAG,(t&=~(u?PARTIAL_RIGHT_FLAG:PARTIAL_FLAG))&CURRY_BOUND_FLAG||(t&=~(BIND_FLAG|BIND_KEY_FLAG));var p=r(e,t,i,u?o:void 0,u?a:void 0,u?void 0:o,u?void 0:a,s,l,c);return p.placeholder=n,setWrapToString(p,e,t)}function createWrap(e,t,r,n,i,o,a,s){var l=t&BIND_KEY_FLAG;if(!l&&"function"!=typeof e)throw new TypeError(FUNC_ERROR_TEXT);var c=n?n.length:0;if(c||(t&=~(PARTIAL_FLAG|PARTIAL_RIGHT_FLAG),n=i=void 0),a=void 0===a?a:nativeMax(toInteger(a),0),s=void 0===s?s:toInteger(s),c-=i?i.length:0,t&PARTIAL_RIGHT_FLAG){var u=n,p=i;n=i=void 0}var f=[e,t,r,n,i,u,p,o,a,s];if(e=f[0],t=f[1],r=f[2],n=f[3],i=f[4],!(s=f[9]=null==f[9]?l?0:e.length:nativeMax(f[9]-c,0))&&t&(CURRY_FLAG|CURRY_RIGHT_FLAG)&&(t&=~(CURRY_FLAG|CURRY_RIGHT_FLAG)),t&&t!=BIND_FLAG)h=t==CURRY_FLAG||t==CURRY_RIGHT_FLAG?createCurry(e,t,s):t!=PARTIAL_FLAG&&t!=(BIND_FLAG|PARTIAL_FLAG)||i.length?createHybrid.apply(void 0,f):createPartial(e,t,r,n);else var h=createBind(e,t,r);return setWrapToString(h,e,t)}function getHolder(e){return e.placeholder}function getNative(e,t){var r=getValue(e,t);return baseIsNative(r)?r:void 0}function getWrapDetails(e){var t=e.match(reWrapDetails);return t?t[1].split(reSplitDetails):[]}function insertWrapDetails(e,t){var r=t.length,n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(reWrapComment,"{\n/* [wrapped with "+t+"] */\n")}function isIndex(e,t){return!!(t=null==t?MAX_SAFE_INTEGER:t)&&("number"==typeof e||reIsUint.test(e))&&e>-1&&e%1==0&&e<t}function isMasked(e){return!!maskSrcKey&&maskSrcKey in e}function reorder(e,t){for(var r=e.length,n=nativeMin(t.length,r),i=copyArray(e);n--;){var o=t[n];e[n]=isIndex(o,r)?i[o]:void 0}return e}var setWrapToString=defineProperty5?function(e,t,r){var n=t+"";return defineProperty5(e,"toString",{configurable:!0,enumerable:!1,value:constant(insertWrapDetails(n,updateWrapDetails(getWrapDetails(n),r)))})}:identity;function toSource(e){if(null!=e){try{return funcToString.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function updateWrapDetails(e,t){return arrayEach(wrapFlags,(function(r){var n="_."+r[0];t&r[1]&&!arrayIncludes(e,n)&&e.push(n)})),_sortInstanceProperty(e).call(e)}function curry(e,t,r){var n=createWrap(e,CURRY_FLAG,void 0,void 0,void 0,void 0,void 0,t=r?void 0:t);return n.placeholder=curry.placeholder,n}function isFunction(e){var t=isObject(e)?objectToString.call(e):"";return t==funcTag||t==genTag}function isObject(e){var t=_typeof$1(e);return!!e&&("object"==t||"function"==t)}function isObjectLike(e){return!!e&&"object"==_typeof$1(e)}function isSymbol(e){return"symbol"==_typeof$1(e)||isObjectLike(e)&&objectToString.call(e)==symbolTag}function toFinite(e){return e?(e=toNumber(e))===INFINITY||e===-INFINITY?(e<0?-1:1)*MAX_INTEGER:e==e?e:0:0===e?e:0}function toInteger(e){var t=toFinite(e),r=t%1;return t==t?r?t-r:t:0}function toNumber(e){if("number"==typeof e)return e;if(isSymbol(e))return NAN;if(isObject(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=isObject(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(reTrim,"");var r=reIsBinary.test(e);return r||reIsOctal.test(e)?freeParseInt(_sliceInstanceProperty2(e).call(e,2),r?2:8):reIsBadHex.test(e)?NAN:+e}function constant(e){return function(){return e}}function identity(e){return e}curry.placeholder={};var lodash_curry=curry,curry$1=getDefaultExportFromCjs(lodash_curry),apply=functionApply,toIndexedObject=toIndexedObject$c,toIntegerOrInfinity=toIntegerOrInfinity$6,lengthOfArrayLike=lengthOfArrayLike$c,arrayMethodIsStrict=arrayMethodIsStrict$5,min=Math.min,$lastIndexOf=[].lastIndexOf,NEGATIVE_ZERO=!!$lastIndexOf&&1/[1].lastIndexOf(1,-0)<0,STRICT_METHOD=arrayMethodIsStrict("lastIndexOf"),FORCED=NEGATIVE_ZERO||!STRICT_METHOD,arrayLastIndexOf=FORCED?function(e){if(NEGATIVE_ZERO)return apply($lastIndexOf,this,arguments)||0;var t=toIndexedObject(this),r=lengthOfArrayLike(t),n=r-1;for(arguments.length>1&&(n=min(n,toIntegerOrInfinity(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:$lastIndexOf,$$1=_export,lastIndexOf$7=arrayLastIndexOf;$$1({target:"Array",proto:!0,forced:arrayLastIndexOf!==[].lastIndexOf},{lastIndexOf:arrayLastIndexOf});var _document$currentScri,entryVirtual=entryVirtual$m,lastIndexOf$6=entryVirtual("Array").lastIndexOf,isPrototypeOf=objectIsPrototypeOf,method=lastIndexOf$6,ArrayPrototype=Array.prototype,lastIndexOf$5=function(e){var t=e.lastIndexOf;return e===ArrayPrototype||isPrototypeOf(ArrayPrototype,e)&&t===ArrayPrototype.lastIndexOf?method:t},parent$5=lastIndexOf$5,lastIndexOf$4=parent$5,parent$4=lastIndexOf$4,lastIndexOf$3=parent$4,parent$3=lastIndexOf$3,lastIndexOf$2=parent$3,lastIndexOf$1=lastIndexOf$2,lastIndexOf2=lastIndexOf$1,_lastIndexOfInstanceProperty=getDefaultExportFromCjs(lastIndexOf2),src=null===(_document$currentScri=document.currentScript)||void 0===_document$currentScri?void 0:_document$currentScri.src,baseUrl=_sliceInstanceProperty2(src).call(src,0,_lastIndexOfInstanceProperty(src).call(src,"/")),loader=new Loader({baseUrl:baseUrl});loader.registerPlugin;var register2=loader.register;function setModuleSystem(e){loader.setModuleSystem(e)}function load(e,t){return _load.apply(this,arguments)}function _load(){return(_load=_asyncToGenerator(_regeneratorRuntime().mark((function e(t,r){var n;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,loader.load(t,r);case 3:return e.abrupt("return",e.sent);case 6:throw e.prev=6,e.t0=e.catch(0),create$1(ErrorCode.MODULE_LOAD_ERROR,{ext:{name:t,cdn:null===e.t0||void 0===e.t0||null===(n=e.t0.target)||void 0===n?void 0:n.src},error:e.t0});case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))).apply(this,arguments)}var appendSearchParams=function(e,t){var r,n=getUrlObject(e);if(!e||!n)return null!==(r=e)&&void 0!==r?r:"";var i,o=_startsWithInstanceProperty(e).call(e,"//");for(var a in t){var s,l,c=t[a];if(null!=n&&n.searchParams.has(a))null==n||null===(s=n.searchParams)||void 0===s||s.set(a,c);else null==n||null===(l=n.searchParams)||void 0===l||l.append(a,c)}return e=n.toString(),o?null===(i=e)||void 0===i?void 0:i.replace(location.protocol,""):e},getUrlObject=function(e){if(e){_startsWithInstanceProperty(e).call(e,"//")&&(e=location.protocol+e);try{return new _URL2(e)}catch(e){return}}};function _createForOfIteratorHelper(e,t){var r=void 0!==_Symbol&&_getIteratorMethod$1(e)||e["@@iterator"];if(!r){if(_Array$isArray(e)||(r=_unsupportedIterableToArray$1(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function getAttributes(e){var t,r={},n=_createForOfIteratorHelper(e.attributes);try{for(n.s();!(t=n.n()).done;){var i=t.value;r[i.name]=i.value}}catch(e){n.e(e)}finally{n.f()}return r}function setAttributes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return _Object$keys(t).forEach((function(r){var n=r,i=t[r];i&&(null==e||e.setAttribute(n,i))})),e}function replaceAttributes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=getAttributes(e);return _Object$keys(r).forEach((function(r){t[r]?null==e||e.setAttribute(r,t[r]):null==e||e.removeAttribute(r)})),e}var DomUtils=Object.freeze({__proto__:null,getAttributes:getAttributes,replaceAttributes:replaceAttributes,setAttributes:setAttributes}),H264_MIME='video/mp4; codecs="avc1.42E01E,mp4a.40.2"',H265_MIME=['video/mp4;codecs="hev1.1.6.L120.90"','video/mp4;codecs="hev1.2.4.L120.90"','video/mp4;codecs="hev1.3.E.L120.90"','video/mp4;codecs="hev1.4.10.L120.90"'],isType=curry$1((function(e,t){var r;return null==t?void 0:_includesInstanceProperty2(r=t.split("?")[0].toLowerCase()).call(r,e)})),isHls=isType(".m3u8"),isMp4=isType(".mp4"),isFlv=isType(".flv"),isRtm=isType(".sdp"),isDash=isType(".mpd");function getStreamType(e){return isHls(e)?"hls":isFlv(e)?"flv":isRtm(e)?"rtm":isMp4(e)?"mp4":isDash(e)?"dash":"unknown"}function isMseSupported(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Codec.H264;return e===Codec.H265?sniffer.isHevcSupported():e===Codec.H264?sniffer.isMSESupport():sniffer.isMSESupport(e)}function isSoftDecodeSupported(){return _isSoftDecodeSupported.apply(this,arguments)}function _isSoftDecodeSupported(){return(_isSoftDecodeSupported=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t,r;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,load(DynamicModule.PluginXgvideo);case 2:return t=e.sent,r=t.XGVideoPlugin,e.abrupt("return",null==r?void 0:r.isSupported());case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function isMMSSupported(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Codec.H264;return void 0!==window.ManagedMediaSource&&(e===Codec.H264?window.ManagedMediaSource.isTypeSupported(H264_MIME):e===Codec.H265?H265_MIME.some((function(e){return window.ManagedMediaSource.isTypeSupported(e)})):window.ManagedMediaSource.isTypeSupported(e))}_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({},util),DomUtils),{},{getStreamType:getStreamType,isMseSupported:isMseSupported,isSoftDecodeSupported:isSoftDecodeSupported,isMMSSupported:isMMSSupported,appendSearchParams:appendSearchParams,getUrlObject:getUrlObject});var autoplay="",isWeixin=sniffer.isWeixin,os=sniffer.os,device=sniffer.device,isAndroid=os.isAndroid,isIos=os.isIos,isMobile="mobile"===device,last=0,USER_AUTOPLAY_TRIGGERED=!1,Autoplay=function(e){_inherits(r,Plugin);var t=_createSuper(r);function r(e){var n;return _classCallCheck$1(this,r),_defineProperty$1(_assertThisInitialized(n=t.call(this,e)),"_hasSetUserAutoplay",void 0),_defineProperty$1(_assertThisInitialized(n),"_timer",void 0),_defineProperty$1(_assertThisInitialized(n),"_wxTimer",void 0),_defineProperty$1(_assertThisInitialized(n),"_state",{mode:0,showUnmuteBt:!1}),_defineProperty$1(_assertThisInitialized(n),"userClickPlay",(function(){if(!USER_AUTOPLAY_TRIGGERED){var e=n.player.play();e&&e.then?e.then((function(){console.log("user action autoplay success"),USER_AUTOPLAY_TRIGGERED=!0})).catch((function(e){console.warn("user action autoplay fail:",e)})):(console.warn("no play promise"),USER_AUTOPLAY_TRIGGERED=!0)}})),n}return _createClass$1(r,[{key:"afterCreate",value:function(){this.initState(),this.initEvents(),this.setWXAutoPlay()}},{key:"updateLang",value:function(){this.renderUnmuteBt()}},{key:"initState",value:function(){this._state.mode=this.player.muted?1:0}},{key:"initEvents",value:function(){this.player.on(AUTOPLAY_PREVENTED,this.handleAutoplayPrevented.bind(this)),this.player.on(AUTOPLAY_STARTED,this.handleAutoplayStart.bind(this)),this.player.on(VOLUME_CHANGE,this.handleVolumechange.bind(this)),this.setUserActionAutoPlay()}},{key:"setWXAutoPlay",value:function(){isWeixin&&this.player.config.autoplay&&this.config.enableWxJsBridgeAutoplay&&(window.WeixinJSBridge?this.wxPlay():document.addEventListener("WeixinJSBridgeReady",this.wxPlay.bind(this),!1))}},{key:"wxCanPlayFn",value:function(){var e=this;window.WeixinJSBridge&&window.WeixinJSBridge.invoke("getNetworkType",{},(function(){e._wxTimer=window.setTimeout((function(){e._wxTimer&&clearTimeout(e._wxTimer);var t=e.player.play();t&&t.then?t.then((function(){console.log("wechat autoplay success")})).catch((function(t){console.warn("wechat autoplay fail:",t),e._state.showUnmuteBt=!1,e.renderUnmuteBt()})):console.warn("wechat browser no play promise")}))}))}},{key:"wxPlay",value:function(){this.player.readyState>=2?this.wxCanPlayFn():isAndroid?this.player.once(CANPLAY,this.wxCanPlayFn.bind(this)):isIos&&this.player.once(COMPLETE,this.wxCanPlayFn.bind(this))}},{key:"setUserActionAutoPlay",value:function(){var e=this;this.config.enableUserActionAutoplay&&this.player.once(BaseEvents.AUTOPLAY_FAIL,(function(){e._hasSetUserAutoplay=!0,(e.config.userActionDom instanceof window.Node?e.config.userActionDom:window.document.body).addEventListener("click",e.userClickPlay,!1)}))}},{key:"handleAutoplayPrevented",value:function(){var e,t,r;return 0===this._state.mode?(console.warn("unmute autoplay fail"),this.player.emit(BaseEvents.AUTOPLAY_FAIL,{mode:"unmute"}),null===(e=this.player)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.teaTracker)||void 0===e||null===(e=e.liveLogger)||void 0===e||e.sendLog({event_key:"autoplay_error",message:BaseEvents.AUTOPLAY_FAIL,mode:"unmute"}),isAndroid&&isWeixin?void(this._state.mode=2):void(this.config.enableDegradeMuteAutoplay&&this.changeMuteMode())):1===this._state.mode?(console.warn("mute autoplay fail"),this.player.emit(BaseEvents.AUTOPLAY_FAIL,{mode:"mute"}),this._state.mode=2,void(null===(t=this.player)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.teaTracker)||void 0===t||null===(t=t.liveLogger)||void 0===t||t.sendLog({event_key:"autoplay_error",message:BaseEvents.AUTOPLAY_FAIL,mode:"mute"}))):2===this._state.mode?(this.player.emit(BaseEvents.AUTOPLAY_FAIL,{mode:"noSupport"}),null===(r=this.player)||void 0===r||null===(r=r.config)||void 0===r||null===(r=r.teaTracker)||void 0===r||null===(r=r.liveLogger)||void 0===r||r.sendLog({event_key:"autoplay_error",message:BaseEvents.AUTOPLAY_FAIL,mode:"noSupport"}),void console.warn("not support autoplay")):void 0}},{key:"changeMuteMode",value:function(){var e=this;this.player.muted=!0,this._state.showUnmuteBt=!0,this._state.mode=1,this.renderUnmuteBt(),this._timer=window.setTimeout((function(){e._timer&&window.clearTimeout(e._timer);var t=e.player.play();t&&t.then?t.then((function(){console.log("degrade mute autoplay success")})).catch((function(t){console.warn("degrade mute autoplay fail:",t),e.player.muted=!1,e._state.showUnmuteBt=!1,e.renderUnmuteBt()})):console.warn("no play promise")}))}},{key:"handleAutoplayStart",value:function(){if(0!==this._state.mode)return 1===this._state.mode?(this.player.emit(BaseEvents.AUTOPLAY_SUCCESS,{mode:"mute"}),this._state.showUnmuteBt=!0,void this.renderUnmuteBt()):2===this._state.mode?(this.player.emit(BaseEvents.AUTOPLAY_SUCCESS,{mode:"click"}),this.player.muted=!1,this._state.showUnmuteBt=!1,void this.renderUnmuteBt()):void 0;this.player.emit(BaseEvents.AUTOPLAY_SUCCESS,{mode:"unmute"})}},{key:"handleVolumechange",value:function(){this._state.mode=this.player.muted?1:0,this._state.showUnmuteBt&&(this._state.showUnmuteBt=!1,this.renderUnmuteBt(),this.player.paused&&this.player.readyState>=1&&this.player.play())}},{key:"renderUnmuteBt",value:function(){var e=this.root,t=this.player.config.i18nManager;if(e&&(e.innerHTML="",this._state.showUnmuteBt)){var r=t.getText("UNMUTE"),n=util.createDom("div",r,void 0,"veplayer-unmute-bt");e.appendChild(n),this.bind(".veplayer-unmute-bt","click",this.cancelUnmute.bind(this)),this.bind(".veplayer-unmute-bt","touchend",this.cancelUnmute.bind(this))}}},{key:"cancelUnmute",value:function(){var e=Date.now();if(e-last>200){last=e,this.player.muted=!1,this._state.showUnmuteBt=!1,this.renderUnmuteBt(),this.emit(BaseEvents.AUTOPLAY_UNMUTE);var t="mobile"===sniffer.device,r=isRtm(this.player.config.url);t&&r&&(this.player.volume>.5?this.player.volume=this.player.volume-.1:this.player.volume=this.player.volume+.1)}}},{key:"destroy",value:function(){if(this.player.off(AUTOPLAY_PREVENTED,this.handleAutoplayPrevented.bind(this)),this.player.off(AUTOPLAY_STARTED,this.handleAutoplayStart.bind(this)),this.player.off(VOLUME_CHANGE,this.handleVolumechange.bind(this)),this._timer&&window.clearTimeout(this._timer),this._wxTimer&&window.clearTimeout(this._wxTimer),document.removeEventListener("WeixinJSBridgeReady",this.wxPlay.bind(this),!1),this._hasSetUserAutoplay){var e=isMobile?"touch":"click";(this.config.userActionDom instanceof window.Node?this.config.userActionDom:window.document.body).removeEventListener(e,this.userClickPlay,!1)}}},{key:"render",value:function(){return'<div class="veplayer-unmute"></div>'}}],[{key:"pluginName",get:function(){return"autoplayPlugin"}},{key:"defaultConfig",get:function(){return{position:Plugin.POSITIONS.ROOT,enableDegradeMuteAutoplay:!1,enableWxJsBridgeAutoplay:!1,userActionDom:window.document.body,enableUserActionAutoplay:!1}}}]),r}(),$=_export,$values=objectToArray.values;$({target:"Object",stat:!0},{values:function(e){return $values(e)}});var path=path$r,values$5=path.Object.values,parent$2=values$5,values$4=parent$2,parent$1=values$4,values$3=parent$1,parent=values$3,values$2=parent,values$1=values$2,values3=values$1,_Object$values=getDefaultExportFromCjs(values3),topRightBar="";function MoreIconSVG(){return(new DOMParser).parseFromString('<svg width="18" height="18" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M5.75 11C5.75 11.9665 4.9665 12.75 4 12.75C3.0335 12.75 2.25 11.9665 2.25 11C2.25 10.0335 3.0335 9.25 4 9.25C4.9665 9.25 5.75 10.0335 5.75 11ZM13.25 11C13.25 11.9665 12.4665 12.75 11.5 12.75C10.5335 12.75 9.75 11.9665 9.75 11C9.75 10.0335 10.5335 9.25 11.5 9.25C12.4665 9.25 13.25 10.0335 13.25 11ZM19 12.75C19.9665 12.75 20.75 11.9665 20.75 11C20.75 10.0335 19.9665 9.25 19 9.25C18.0335 9.25 17.25 10.0335 17.25 11C17.25 11.9665 18.0335 12.75 19 12.75Z" fill="white"/>\n</svg>\n',"image/svg+xml").firstChild}var _context,_context2,More=function(e){_inherits(r,OptionsIcon);var t=_createSuper(r);function r(){return _classCallCheck$1(this,r),t.apply(this,arguments)}return _createClass$1(r,[{key:"onItemClick",value:function(){}},{key:"onOptionClick",value:function(){this.toggle(!1)}},{key:"updateLang",value:function(){var e,t=this,r=this.player.config.i18nManager;null===(e=this.config.plugins)||void 0===e||e.forEach((function(e){var n,i=null!==(n=r.normalize(e.textTips))&&void 0!==n?n:e.pluginName;if(t.player.root){var o=util.findDom(t.player.root,".panel-plugin-".concat(e.pluginName," .panel-icon-bt-text"));o&&(o.innerHTML=i)}}))}},{key:"beforeCreate",value:function(e){var t,r=e.player.config.i18nManager;e.config.list=null===(t=e.config.plugins)||void 0===t?void 0:_mapInstanceProperty(t).call(t,(function(t,n){var i,o=util.createDom("div","",{},"panel-icon-bt panel-plugin-".concat(t.pluginName)),a=util.createDom("div","",{},"panel-icon-svg"),s=null!==(i=r.normalize(t.textTips))&&void 0!==i?i:t.pluginName;return o.appendChild(a),o.appendChild(util.createDom("span",s,{"plugin-index":n},"panel-icon-bt-text")),{showText:o,plugin:e.player.registerPlugin({plugin:t,options:{root:a}})}}))}},{key:"hideChild",value:function(e){if(e){var t;null===(t=e.hide)||void 0===t||t.call(e);var r=document.querySelector(".panel-plugin-".concat(e.pluginName));r&&util.addClass(r,"hide")}}},{key:"showChild",value:function(e){if(e){var t;null===(t=e.show)||void 0===t||t.call(e);var r=document.querySelector(".panel-plugin-".concat(e.pluginName));r&&util.removeClass(r,"hide")}}},{key:"registerIcons",value:function(){return{more:{icon:MoreIconSVG}}}}],[{key:"pluginName",get:function(){return"more"}},{key:"defaultConfig",get:function(){return _objectSpread2$1(_objectSpread2$1({},OptionsIcon.defaultConfig),{},{index:1,plugins:[],list:[],hideOnSingleOption:!1,isShowIcon:!0,hidePortrait:!1,renderType:RenderType.Icon,panel:{className:"more-panel-content"}})}}]),r}(),TOP_RIGHT_POSITIONS=function(e){return e.ROOT_TOP_RIGHT="rootTopRight",e.ROOT_TOP_RIGHT_COLLAPSE="rootTopRightCollapse",e}(TOP_RIGHT_POSITIONS||{}),TopRightBar=function(e){_inherits(r,Plugin);var t=_createSuper(r);function r(){return _classCallCheck$1(this,r),t.apply(this,arguments)}return _createClass$1(r,[{key:"registerIcons",value:function(){return{more:{icon:MoreIconSVG,class:"xgplayer-more-svg"}}}},{key:"children",value:function(){var e=this,t=this._getPlugins(),r=t.plugins,n=t.collapsePlugins,i={};return r.forEach((function(t){i[t.pluginName]={plugin:t,options:{root:e.root}}})),n.length&&(i[More.pluginName]={plugin:More,options:{root:this.root,plugins:n}}),i}},{key:"render",value:function(){return'<xg-right-grid class="xg-right-grid xgplayer-rightTop-iconList"></xg-right-grid>'}},{key:"_getPlugins",value:function(){var e,t=this,r=[],n=[],i=null===(e=this.player.config.ignores)||void 0===e?void 0:_mapInstanceProperty(e).call(e,(function(e){return e.toLowerCase()}));return this.config.plugins.forEach((function(e){var o,a=e.pluginName.toLowerCase();null!=i&&_includesInstanceProperty2(i).call(i,a)||("rootTopRight"===(null!==(o=t.player.config[a].position)&&void 0!==o?o:e.defaultConfig.position)?r.push(e):n.push(e))})),{plugins:null!=r?r:[],collapsePlugins:null!=n?n:[]}}}],[{key:"pluginName",get:function(){return"topRightBar"}},{key:"defaultConfig",get:function(){return{position:Plugin.POSITIONS.ROOT_TOP,plugins:[]}}},{key:"isTopRightPlugin",value:function(e,t){var r,n,i,o,a,s=null!==(n=null===(i=t[null==e||null===(r=e.pluginName)||void 0===r?void 0:r.toLowerCase()])||void 0===i?void 0:i.position)&&void 0!==n?n:null==e||null===(o=e.defaultConfig)||void 0===o?void 0:o.position;return!!_includesInstanceProperty2(a=_Object$values(TOP_RIGHT_POSITIONS)).call(a,s)}}]),r}(),BASE_PLUGINS=[Play$1,Fullscreen,Volume,MiniScreen,PIP,Poster,Start,Loading,Enter,Error$1,Toast,Sources,DefinitionPlugin,Autoplay],DEFAULT_PC_PLUGINS=_concatInstanceProperty2(_context=[]).call(_context,BASE_PLUGINS,[Keyboard,PCPlugin,TopRightBar]),DEFAULT_MOBILE_PLUGINS=_concatInstanceProperty2(_context2=[]).call(_context2,BASE_PLUGINS,[MobilePlugin,TopRightBar]),DEFAULT_PLUGINS="pc"===sniffer.device?DEFAULT_PC_PLUGINS:DEFAULT_MOBILE_PLUGINS;function FullscreenActive(){return(new DOMParser).parseFromString('<svg width="21" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.892 2h4.445v1.778H3.892v4.444H2.114V3.778C2.114 2.796 2.91 2 3.892 2zm4.445 16v-4.444c0-.982-.796-1.778-1.778-1.778H2.114v1.778h2.944L2.264 16.35a.9.9 0 001.272 1.273l2.988-2.987a.918.918 0 00.035-.037V18h1.778zm8-6.222v4.444h-4.445V18h4.445c.981 0 1.777-.796 1.777-1.778v-4.444h-1.777zM11.892 2v4.445c0 .981.796 1.777 1.778 1.777h4.444V6.445H15.17l2.568-2.568a.9.9 0 10-1.273-1.273L13.67 5.4V2h-1.778z" fill="#fff"/></svg>',"image/svg+xml").firstChild}function FullscreenActiveMobile(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M17.5 8.333h-4.167c-.92 0-1.666-.746-1.666-1.666V2.5h1.666v4.167H17.5v1.666zM2.5 6.667v1.666h4.167c.92 0 1.666-.746 1.666-1.666V2.5H6.667v4.167H2.5zM2.5 13.333h4.167V17.5h1.666v-4.167c0-.92-.746-1.666-1.666-1.666H2.5v1.666zM13.333 17.5v-4.167H17.5v-1.666h-4.167c-.92 0-1.666.746-1.666 1.666V17.5h1.666z" fill="#fff"/></svg>',"image/svg+xml").firstChild}function FullscreenDefault(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.778 2h4.444v1.778H3.778v4.444H2V3.778C2 2.796 2.796 2 3.778 2zM2 11.778v4.444C2 17.204 2.796 18 3.778 18h4.444v-1.778H4.823l2.313-2.313a.9.9 0 00-1.272-1.273l-2.086 2.086v-2.944H2zm14.222 0v4.444h-4.444V18h4.444c.982 0 1.778-.796 1.778-1.778v-4.444h-1.778zM18 8.222V3.778C18 2.796 17.204 2 16.222 2h-4.444v1.778h2.945l-2.587 2.586a.9.9 0 101.273 1.273l2.813-2.813v3.398H18z" fill="#fff"/></svg>',"image/svg+xml").firstChild}function FullscreenDefaultMobile(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.125 3a.375.375 0 00-.375.375v.75c0 .207.168.375.375.375H15.5v3.375c0 .207.168.375.375.375h.75A.375.375 0 0017 7.875v-4.5A.375.375 0 0016.625 3h-4.5zm0 12.5a.375.375 0 00-.375.375v.75c0 .207.168.375.375.375h4.5a.375.375 0 00.375-.375v-4.5a.375.375 0 00-.375-.375h-.75a.375.375 0 00-.375.375V15.5h-3.375zM3 3.375C3 3.168 3.168 3 3.375 3h4.5c.207 0 .375.168.375.375v.75a.375.375 0 01-.375.375H4.5v3.375a.375.375 0 01-.375.375h-.75A.375.375 0 013 7.875v-4.5zM7.875 15.5H4.5v-3.375a.375.375 0 00-.375-.375h-.75a.375.375 0 00-.375.375v4.5c0 .207.168.375.375.375h4.5a.375.375 0 00.375-.375v-.75a.375.375 0 00-.375-.375z" fill="#fff"/></svg>',"image/svg+xml").firstChild}function Pause(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="5.313" y="3.75" width="3.125" height="12.5" rx=".625" fill="#fff"/><rect x="11.563" y="3.75" width="3.125" height="12.5" rx=".625" fill="#fff"/></svg>',"image/svg+xml").firstChild}function Play(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.121 8.299a2 2 0 010 3.402l-7.94 4.91c-1.332.825-3.051-.133-3.051-1.7V5.09c0-1.567 1.72-2.525 3.052-1.701l7.939 4.911z" fill="#fff"/></svg>',"image/svg+xml").firstChild}function Replay(){return(new DOMParser).parseFromString('<svg width="72" height="72" viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg"><g fill="#FFF" fill-rule="evenodd"><circle fill-opacity=".3" cx="36" cy="36" r="36"/><path d="M40.167 32.667a.833.833 0 01-.834-.834v-1.666c0-.46.373-.834.834-.834h5.409a11.653 11.653 0 00-9.576-5c-6.443 0-11.667 5.224-11.667 11.667S29.557 47.667 36 47.667c5.285 0 9.749-3.514 11.183-8.333h3.445C49.112 46.014 43.138 51 36 51c-8.284 0-15-6.716-15-15 0-8.284 6.716-15 15-15 4.713 0 8.918 2.173 11.668 5.572l-.001-4.739c0-.46.373-.833.833-.833h1.667c.46 0 .833.373.833.833V31c0 .879-.68 1.598-1.542 1.662l-.125.005h-9.166z"/></g></svg>',"image/svg+xml").firstChild}function StartPlay(){return(new DOMParser).parseFromString('<svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="60" height="60" rx="30" fill="#000" fill-opacity=".4"/><path d="M40.243 28.3a2 2 0 010 3.401L24.06 41.712c-1.332.825-3.052-.134-3.052-1.7V19.988c0-1.566 1.72-2.525 3.052-1.7l16.184 10.01z" fill="#fff"/></svg>',"image/svg+xml").firstChild}function VolumeLarge(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.867 2.5h.55c.44 0 .799.34.83.771l.003.062v13.334c0 .44-.34.799-.771.83l-.062.003h-.55a.833.833 0 01-.444-.128l-.064-.045-4.867-3.744a.831.831 0 01-.322-.59l-.003-.07V7.077c0-.235.099-.458.271-.615l.054-.045L9.36 2.673a.832.832 0 01.43-.17l.078-.003h.55-.55zm6.767 2.278A7.474 7.474 0 0118.75 10a7.477 7.477 0 01-2.128 5.234.4.4 0 01-.57-.004l-.587-.586a.442.442 0 01.005-.617A5.812 5.812 0 0017.083 10c0-1.557-.61-2.97-1.603-4.017a.442.442 0 01-.003-.615l.586-.586a.4.4 0 01.57-.004zM2.5 6.667c.23 0 .417.186.417.416v5.834c0 .23-.187.416-.417.416h-.833a.417.417 0 01-.417-.416V7.083c0-.23.187-.416.417-.416H2.5zm11.768.46A4.153 4.153 0 0115.417 10c0 1.12-.442 2.137-1.162 2.886a.388.388 0 01-.555-.007l-.577-.578c-.176-.176-.156-.467.009-.655A2.49 2.49 0 0013.75 10a2.49 2.49 0 00-.61-1.636c-.163-.188-.182-.477-.006-.653l.578-.578a.388.388 0 01.556-.006z" fill="#fff"/></svg>',"image/svg+xml").firstChild}function VolumeMuted(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.045 2.5h.55c.44 0 .8.34.831.771l.003.062v13.334c0 .44-.34.799-.771.83l-.063.003h-.55a.833.833 0 01-.443-.128l-.065-.045-4.866-3.744a.831.831 0 01-.323-.59l-.003-.07V7.077c0-.235.1-.458.272-.615l.054-.045 4.866-3.744a.832.832 0 01.43-.17l.078-.003h.55-.55zM2.68 6.667c.23 0 .416.186.416.416v5.834c0 .23-.186.416-.416.416h-.834a.417.417 0 01-.416-.416V7.083c0-.23.186-.416.416-.416h.834zm10.467.294a.417.417 0 01.59 0l1.767 1.768L17.27 6.96a.417.417 0 01.589 0l.59.59a.417.417 0 010 .589L16.68 9.908l1.768 1.767c.15.15.162.387.035.55l-.035.04-.589.589a.417.417 0 01-.59 0l-1.767-1.768-1.768 1.768a.417.417 0 01-.59 0l-.588-.59a.417.417 0 010-.589l1.767-1.768-1.767-1.767a.417.417 0 01-.035-.55l.035-.04.589-.589z" fill="#fff"/></svg>',"image/svg+xml").firstChild}function VolumeSmall(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.867 2.5h.55c.44 0 .799.34.83.771l.003.062v13.334c0 .44-.34.799-.771.83l-.062.003h-.55a.833.833 0 01-.444-.128l-.064-.045-4.867-3.744a.831.831 0 01-.322-.59l-.003-.07V7.077c0-.235.099-.458.271-.615l.054-.045L9.36 2.673a.832.832 0 01.43-.17l.078-.003h.55-.55zM2.5 6.667c.23 0 .417.186.417.416v5.834c0 .23-.187.416-.417.416h-.833a.417.417 0 01-.417-.416V7.083c0-.23.187-.416.417-.416H2.5zm11.768.46A4.153 4.153 0 0115.417 10c0 1.12-.442 2.137-1.162 2.886a.388.388 0 01-.555-.007l-.577-.578c-.176-.176-.156-.467.009-.655A2.49 2.49 0 0013.75 10a2.49 2.49 0 00-.61-1.636c-.163-.188-.182-.477-.006-.653l.578-.578a.388.388 0 01.556-.006z" fill="#fff"/></svg>',"image/svg+xml").firstChild}var DEFAULT_BASE_ICONS={startPlay:StartPlay,play:Play,pause:Pause,fullscreen:FullscreenDefault,exitFullscreen:FullscreenActive,replay:Replay,volumeLarge:VolumeLarge,volumeMuted:VolumeMuted,volumeSmall:VolumeSmall},DEFAULT_PC_ICONS=_objectSpread2$1(_objectSpread2$1({},DEFAULT_BASE_ICONS),{},{fullscreen:FullscreenDefault,exitFullscreen:FullscreenActive}),DEFAULT_MOBILE_ICONS=_objectSpread2$1(_objectSpread2$1({},DEFAULT_BASE_ICONS),{},{fullscreen:FullscreenDefaultMobile,exitFullscreen:FullscreenActiveMobile}),DEFAULT_ICONS="pc"===sniffer.device?DEFAULT_PC_ICONS:DEFAULT_MOBILE_ICONS,VeI18n=function(){function e(t){var r;if(_classCallCheck$1(this,e),_defineProperty$1(this,"_lang",void 0),this._lang=(null==t?void 0:t.lang)||getLang()||"en","zh"===this._lang&&(this._lang="zh-cn"),null!=t&&null!==(r=t.i18n)&&void 0!==r&&r.texts){var n,i,o=_mapInstanceProperty(n=_Object$entries(null==t||null===(i=t.i18n)||void 0===i?void 0:i.texts)).call(n,(function(e){var t=_slicedToArray(e,2);return{LANG:t[0],TEXT:t[1]}}));e.extend(o)}}return _createClass$1(e,[{key:"setLang",value:function(e){this._lang=e}},{key:"getLang",value:function(){return this._lang}},{key:"normalize",value:function(e){return e?"string"==typeof e?e:e[this._lang]:""}},{key:"getText",value:function(e){var t,r,n;if(e){var i=null==I18N?void 0:I18N.lang;return null!==(t=null==i||null===(r=i[this._lang])||void 0===r?void 0:r[e])&&void 0!==t?t:null==i||null===(n=i.en)||void 0===n?void 0:n[e]}}}],[{key:"langKeys",get:function(){return I18N.langKeys}},{key:"isLangValid",value:function(e){var t;return _includesInstanceProperty2(t=I18N.langKeys).call(t,e)||"zh"===e}},{key:"extend",value:function(e,t){I18N.extend(e,t)}}]),e}(),veplayerBase="",CustomMedia=function(){function e(t){_classCallCheck$1(this,e),_defineProperty$1(this,"_videoAttributes",void 0),_defineProperty$1(this,"_el",void 0),this._videoAttributes=getAttributes(t),this._el=t}return _createClass$1(e,[{key:"options",get:function(){var e=this;return{remainMediaAfterDestroy:!0,mediaEl:function(t){return setAttributes(e._el,t)}}}},{key:"destroy",value:function(){replaceAttributes(this._el,this._videoAttributes)}}]),e}(),_excluded=["autoplay"],XGPosition=Plugin.POSITIONS,POSITIONS=_objectSpread2$1(_objectSpread2$1({},XGPosition),TOP_RIGHT_POSITIONS),DEFAULT_OPTIONS={id:"veplayer",width:"100%",height:"100%",decodeType:DecodeType.Hardware,fullscreen:{useCssFullscreen:!1}},transformOption=function(e){var t,r,n=e.autoplay,i=_objectWithoutProperties(e,_excluded);if(i.poster)if("string"==typeof i.poster)i.poster=escapeHtml(i.poster);else if("string"==typeof(null===(t=i.poster)||void 0===t?void 0:t.poster)){var o;i.poster.poster=escapeHtml(null===(o=i.poster)||void 0===o?void 0:o.poster)}(i.icons=_objectSpread2$1(_objectSpread2$1({},DEFAULT_ICONS),i.icons?escapeIcons(i.icons):{}),i.autoplay=Boolean(n),n&&"boolean"!=typeof n)&&(i.autoplayMuted=null==n?void 0:n.muted,i.videoAttributes=_objectSpread2$1(_objectSpread2$1({},null!==(r=i.videoAttributes)&&void 0!==r?r:{}),{},{muted:null==n?void 0:n.muted}),i.autoplayPlugin=n);return delete i.i18n,i},VePlayerBase=function(){function e(){var t,r,n,i,o,a,s,l,c,u,p,f,h,d=this,y=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck$1(this,e),_defineProperty$1(this,"_player",void 0),_defineProperty$1(this,"_sourceManager",void 0),_defineProperty$1(this,"_preparePlugins",void 0),_defineProperty$1(this,"_previousPrepareResult",void 0),_defineProperty$1(this,"_i18nManager",void 0),_defineProperty$1(this,"_events",{}),_defineProperty$1(this,"_customMedia",void 0),_defineProperty$1(this,"_errorCallback",void 0),_defineProperty$1(this,"_beforeFallbackError",void 0),this._sourceManager=y.sourceManager,this._preparePlugins=y.preparePlugins,this._previousPrepareResult=y.prepareResult,this._beforeFallbackError=y.beforeFallbackError,this._i18nManager=null!==(t=y.i18nManager)&&void 0!==t?t:new VeI18n({i18n:y.i18n}),y.mediaElement&&(this._customMedia=new CustomMedia(y.mediaElement));var g=transformOption(_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({},y),null===(r=this._customMedia)||void 0===r?void 0:r.options),null===(n=this._previousPrepareResult)||void 0===n?void 0:n.options)),$=_concatInstanceProperty2(i=[]).call(i,_toConsumableArray$1(null!==(o=null===(a=this._previousPrepareResult)||void 0===a?void 0:a.plugins)&&void 0!==o?o:[]),_toConsumableArray$1(null!==(s=y.plugins)&&void 0!==s?s:DEFAULT_PLUGINS)),v=[],_=[];$.forEach((function(e){TopRightBar.isTopRightPlugin(e,y)?v.push(e):_.push(e)})),this._player=new Player(_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({},DEFAULT_OPTIONS),g),{},{definition:_objectSpread2$1({list:null!==(l=null===(c=this._sourceManager.source)||void 0===c?void 0:c.definitions)&&void 0!==l?l:[],defaultDefinition:null===(u=this._sourceManager.definition)||void 0===u?void 0:u.definition},null!==(p=y.definition)&&void 0!==p?p:{}),url:null===(f=this._sourceManager.definition)||void 0===f?void 0:f.url,sources:_objectSpread2$1(_objectSpread2$1({},null!==(h=y.sources)&&void 0!==h?h:{}),{},{sourceManager:this._sourceManager}),topRightBar:{plugins:v},plugins:_,i18nManager:this._i18nManager,veplayer:this})),this.emit(Events.PLAYER_CREATE_FINISH,this._player),this._errorCallback=function(e){return d._handleFallback(e)},this._player.on(ERROR,this._errorCallback)}var t,r,n,i,o,a,s,l,c;return _createClass$1(e,[{key:"readyState",get:function(){return this._player.readyState}},{key:"buffered",get:function(){return this._player.buffered}},{key:"played",get:function(){return this._player.played}},{key:"cumulateTime",get:function(){return this._player.cumulateTime}},{key:"isFocused",get:function(){return this._player.isActive}},{key:"isFullscreen",get:function(){return this._player.isFullscreen}},{key:"isCssFullscreen",get:function(){return this._player.isCssfullScreen}},{key:"networkState",get:function(){return this._player.networkState}},{key:"paused",get:function(){return this._player.paused}},{key:"ended",get:function(){return this._player.ended}},{key:"state",get:function(){return this._player.state}},{key:"url",get:function(){return this._player.config.url}},{key:"source",get:function(){var e;return null===(e=this._sourceManager.source)||void 0===e?void 0:e.name}},{key:"playerVersion",get:function(){return"2.11.0-rc.0"}},{key:"definition",get:function(){var e;return null===(e=this._sourceManager.definition)||void 0===e?void 0:e.definition}},{key:"crossOrigin",get:function(){return this._player.crossOrigin},set:function(e){this._player.crossOrigin=e}},{key:"volume",get:function(){return this._player.volume},set:function(e){this._player.volume=e}},{key:"muted",get:function(){return this._player.muted},set:function(e){this._player.muted=e}},{key:"lang",get:function(){return this._i18nManager.getLang()},set:function(e){if(this._player.lang!==e)if(VeI18n.isLangValid(e))this._i18nManager.setLang(e),this._player.lang=e;else{var t,r,n,i,o=VeI18n.langKeys.join(","),a={en:_concatInstanceProperty2(t="Sorry, we couldn't set the language to ".concat(e," because it's not currently supported. The list of supported languages includes ")).call(t,o,"."),"zh-cn":_concatInstanceProperty2(r="不支持当前设置的语言".concat(e,", 支持的语言有")).call(r,o,", 请重新设置")};console.error((null===(n=this._i18nManager)||void 0===n||null===(i=n.normalize)||void 0===i?void 0:i.call(n,a))||a.en)}}},{key:"_src",get:function(){return this._player.currentSrc}},{key:"switch",value:(c=_asyncToGenerator(_regeneratorRuntime().mark((function e(t,r){var n,i,o,a;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"!=typeof t||1!==this._sourceManager.sources.length||1!==(null===(n=this._sourceManager.sources)||void 0===n||null===(n=n[0].definitions)||void 0===n?void 0:n.length)){e.next=5;break}return this._sourceManager.updateSources(t),e.next=4,this._switchUrl(t,{seamless:null==r?void 0:r.seamless});case 4:return e.abrupt("return",this._sourceManager.definition);case 5:if(o=_findInstanceProperty2(i=this._sourceManager).call(i,t,r)){e.next=8;break}throw new Error("string"==typeof t?"No definition found for url: ".concat(t):_concatInstanceProperty2(a="No definition found for source: ".concat(t.source,", definition: ")).call(a,t.definition));case 8:return e.next=10,this._switch(o);case 10:return e.abrupt("return",o);case 11:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"updatePlaylist",value:(l=_asyncToGenerator(_regeneratorRuntime().mark((function e(t,r){var n;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this._sourceManager.updateSources(t,r),e.abrupt("return",this._switch(n.definition));case 2:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"once",value:function(e,t){var r,n=this._transformEvent(e,t),i=n.xgCallback,o=n.xgEventName;i&&(null!==(r=this._events)&&void 0!==r&&r[e]||(this._events[e]=new _Map),this._events[e].set(t,i),this._player.once(o,i))}},{key:"off",value:function(e,t){var r,n=null===(r=this._events[e])||void 0===r?void 0:r.get(t),i=this._transformEvent(e).xgEventName;n&&(this._player.off(i,n),this._events[e].delete(t))}},{key:"emit",value:function(e,t){var r=this._transformEvent(e).xgEventName;this._player.emit(r,t)}},{key:"offAll",value:function(){this._events={},this._player.offAll()}},{key:"on",value:function(e,t){var r,n=this._transformEvent(e,t),i=n.xgCallback,o=n.xgEventName;i&&(null!==(r=this._events)&&void 0!==r&&r[e]||(this._events[e]=new _Map),this._events[e].set(t,i),this._player.on(o,i))}},{key:"play",value:(s=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t,r,n;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,null!==(t=this._player)&&void 0!==t&&null!==(t=t.config)&&void 0!==t&&null!==(t=t.teaTracker)&&void 0!==t&&t.liveLogger&&this._player.config.teaTracker.liveLogger.sendLog({event_key:"play_method_call"}),e.next=4,this._player.play();case 4:return r=e.sent,e.abrupt("return",r);case 8:throw e.prev=8,e.t0=e.catch(0),null!==(n=this._player)&&void 0!==n&&null!==(n=n.config)&&void 0!==n&&null!==(n=n.teaTracker)&&void 0!==n&&n.liveLogger&&this._player.config.teaTracker.liveLogger.sendLog({event_key:"play_method_call_error",error:e.t0.message||String(e.t0)}),e.t0;case 12:case"end":return e.stop()}}),e,this,[[0,8]])}))),function(){return s.apply(this,arguments)})},{key:"pause",value:function(){
3
3
  /* istanbul ignore next -- @preserve */
4
4
  return this._player.pause()}},{key:"requestPIP",value:function(){var e;
5
5
  /* istanbul ignore next -- @preserve */null===(e=this._player.plugins.pip)||void 0===e||e.requestPIP()}},{key:"exitPIP",value:function(){var e;