@volcengine/veplayer 2.5.1-rc.1 → 2.5.1-rc.2

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 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).VePlayer={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var i=function(e){return e&&e.Math==Math&&e},r=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof t&&t)||function(){return this}()||t||Function("return this")(),o=function(e){try{return!!e()}catch(t){return!0}},a=!o((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),s=a,l=Function.prototype,u=l.apply,c=l.call,h="object"==typeof Reflect&&Reflect.apply||(s?c.bind(u):function(){return c.apply(u,arguments)}),f=a,d=Function.prototype,p=d.call,v=f&&d.bind.bind(p,p),g=f?v:function(e){return function(){return p.apply(e,arguments)}},y=g,m=y({}.toString),_=y("".slice),k=function(e){return _(m(e),8,-1)},b=k,w=g,E=function(e){if("Function"===b(e))return w(e)},C="object"==typeof document&&document.all,x={all:C,IS_HTMLDDA:void 0===C&&void 0!==C},T=x.all,S=x.IS_HTMLDDA?function(e){return"function"==typeof e||e===T}:function(e){return"function"==typeof e},P={},A=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),I=a,R=Function.prototype.call,O=I?R.bind(R):function(){return R.apply(R,arguments)},M={},L={}.propertyIsEnumerable,D=Object.getOwnPropertyDescriptor,N=D&&!L.call({1:2},1);M.f=N?function(e){var t=D(this,e);return!!t&&t.enumerable}:L;var F,U,H=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},j=o,B=k,z=Object,V=g("".split),K=j((function(){return!z("z").propertyIsEnumerable(0)}))?function(e){return"String"==B(e)?V(e,""):z(e)}:z,G=function(e){return null==e},W=G,Y=TypeError,X=function(e){if(W(e))throw Y("Can't call method on "+e);return e},q=K,$=X,Z=function(e){return q($(e))},J=S,Q=x.all,ee=x.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:J(e)||e===Q}:function(e){return"object"==typeof e?null!==e:J(e)},te={},ne=te,ie=r,re=S,oe=function(e){return re(e)?e:void 0},ae=function(e,t){return arguments.length<2?oe(ne[e])||oe(ie[e]):ne[e]&&ne[e][t]||ie[e]&&ie[e][t]},se=g({}.isPrototypeOf),le="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ue=r,ce=le,he=ue.process,fe=ue.Deno,de=he&&he.versions||fe&&fe.version,pe=de&&de.v8;pe&&(U=(F=pe.split("."))[0]>0&&F[0]<4?1:+(F[0]+F[1])),!U&&ce&&(!(F=ce.match(/Edge\/(\d+)/))||F[1]>=74)&&(F=ce.match(/Chrome\/(\d+)/))&&(U=+F[1]);var ve=U,ge=ve,ye=o,me=r.String,_e=!!Object.getOwnPropertySymbols&&!ye((function(){var e=Symbol();return!me(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ge&&ge<41})),ke=_e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,be=ae,we=S,Ee=se,Ce=Object,xe=ke?function(e){return"symbol"==typeof e}:function(e){var t=be("Symbol");return we(t)&&Ee(t.prototype,Ce(e))},Te=String,Se=function(e){try{return Te(e)}catch(t){return"Object"}},Pe=S,Ae=Se,Ie=TypeError,Re=function(e){if(Pe(e))return e;throw Ie(Ae(e)+" is not a function")},Oe=Re,Me=G,Le=function(e,t){var n=e[t];return Me(n)?void 0:Oe(n)},De=O,Ne=S,Fe=ee,Ue=TypeError,He={exports:{}},je=r,Be=Object.defineProperty,ze=function(e,t){try{Be(je,e,{value:t,configurable:!0,writable:!0})}catch(n){je[e]=t}return t},Ve="__core-js_shared__",Ke=r[Ve]||ze(Ve,{}),Ge=Ke;(He.exports=function(e,t){return Ge[e]||(Ge[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 We=He.exports,Ye=X,Xe=Object,qe=function(e){return Xe(Ye(e))},$e=qe,Ze=g({}.hasOwnProperty),Je=Object.hasOwn||function(e,t){return Ze($e(e),t)},Qe=g,et=0,tt=Math.random(),nt=Qe(1..toString),it=function(e){return"Symbol("+(void 0===e?"":e)+")_"+nt(++et+tt,36)},rt=We,ot=Je,at=it,st=_e,lt=ke,ut=r.Symbol,ct=rt("wks"),ht=lt?ut.for||ut:ut&&ut.withoutSetter||at,ft=function(e){return ot(ct,e)||(ct[e]=st&&ot(ut,e)?ut[e]:ht("Symbol."+e)),ct[e]},dt=O,pt=ee,vt=xe,gt=Le,yt=function(e,t){var n,i;if("string"===t&&Ne(n=e.toString)&&!Fe(i=De(n,e)))return i;if(Ne(n=e.valueOf)&&!Fe(i=De(n,e)))return i;if("string"!==t&&Ne(n=e.toString)&&!Fe(i=De(n,e)))return i;throw Ue("Can't convert object to primitive value")},mt=TypeError,_t=ft("toPrimitive"),kt=function(e,t){if(!pt(e)||vt(e))return e;var n,i=gt(e,_t);if(i){if(void 0===t&&(t="default"),n=dt(i,e,t),!pt(n)||vt(n))return n;throw mt("Can't convert object to primitive value")}return void 0===t&&(t="number"),yt(e,t)},bt=xe,wt=function(e){var t=kt(e,"string");return bt(t)?t:t+""},Et=ee,Ct=r.document,xt=Et(Ct)&&Et(Ct.createElement),Tt=function(e){return xt?Ct.createElement(e):{}},St=Tt,Pt=!A&&!o((function(){return 7!=Object.defineProperty(St("div"),"a",{get:function(){return 7}}).a})),At=A,It=O,Rt=M,Ot=H,Mt=Z,Lt=wt,Dt=Je,Nt=Pt,Ft=Object.getOwnPropertyDescriptor;P.f=At?Ft:function(e,t){if(e=Mt(e),t=Lt(t),Nt)try{return Ft(e,t)}catch(n){}if(Dt(e,t))return Ot(!It(Rt.f,e,t),e[t])};var Ut=o,Ht=S,jt=/#|\.prototype\./,Bt=function(e,t){var n=Vt[zt(e)];return n==Gt||n!=Kt&&(Ht(t)?Ut(t):!!t)},zt=Bt.normalize=function(e){return String(e).replace(jt,".").toLowerCase()},Vt=Bt.data={},Kt=Bt.NATIVE="N",Gt=Bt.POLYFILL="P",Wt=Bt,Yt=Re,Xt=a,qt=E(E.bind),$t=function(e,t){return Yt(e),void 0===t?e:Xt?qt(e,t):function(){return e.apply(t,arguments)}},Zt={},Jt=A&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Qt=ee,en=String,tn=TypeError,nn=function(e){if(Qt(e))return e;throw tn(en(e)+" is not an object")},rn=A,on=Pt,an=Jt,sn=nn,ln=wt,un=TypeError,cn=Object.defineProperty,hn=Object.getOwnPropertyDescriptor,fn="enumerable",dn="configurable",pn="writable";Zt.f=rn?an?function(e,t,n){if(sn(e),t=ln(t),sn(n),"function"==typeof e&&"prototype"===t&&"value"in n&&pn in n&&!n[pn]){var i=hn(e,t);i&&i[pn]&&(e[t]=n.value,n={configurable:dn in n?n[dn]:i[dn],enumerable:fn in n?n[fn]:i[fn],writable:!1})}return cn(e,t,n)}:cn:function(e,t,n){if(sn(e),t=ln(t),sn(n),on)try{return cn(e,t,n)}catch(i){}if("get"in n||"set"in n)throw un("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var vn=Zt,gn=H,yn=A?function(e,t,n){return vn.f(e,t,gn(1,n))}:function(e,t,n){return e[t]=n,e},mn=r,_n=h,kn=E,bn=S,wn=P.f,En=Wt,Cn=te,xn=$t,Tn=yn,Sn=Je,Pn=function(e){var t=function(n,i,r){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,i)}return new e(n,i,r)}return _n(e,this,arguments)};return t.prototype=e.prototype,t},An=function(e,t){var n,i,r,o,a,s,l,u,c,h=e.target,f=e.global,d=e.stat,p=e.proto,v=f?mn:d?mn[h]:(mn[h]||{}).prototype,g=f?Cn:Cn[h]||Tn(Cn,h,{})[h],y=g.prototype;for(o in t)i=!(n=En(f?o:h+(d?".":"#")+o,e.forced))&&v&&Sn(v,o),s=g[o],i&&(l=e.dontCallGetSet?(c=wn(v,o))&&c.value:v[o]),a=i&&l?l:t[o],i&&typeof s==typeof a||(u=e.bind&&i?xn(a,mn):e.wrap&&i?Pn(a):p&&bn(a)?kn(a):a,(e.sham||a&&a.sham||s&&s.sham)&&Tn(u,"sham",!0),Tn(g,o,u),p&&(Sn(Cn,r=h+"Prototype")||Tn(Cn,r,{}),Tn(Cn[r],o,a),e.real&&y&&(n||!y[o])&&Tn(y,o,a)))},In=k,Rn=Array.isArray||function(e){return"Array"==In(e)},On=Math.ceil,Mn=Math.floor,Ln=Math.trunc||function(e){var t=+e;return(t>0?Mn:On)(t)},Dn=function(e){var t=+e;return t!=t||0===t?0:Ln(t)},Nn=Dn,Fn=Math.min,Un=function(e){return e>0?Fn(Nn(e),9007199254740991):0},Hn=Un,jn=function(e){return Hn(e.length)},Bn=TypeError,zn=function(e){if(e>9007199254740991)throw Bn("Maximum allowed index exceeded");return e},Vn=wt,Kn=Zt,Gn=H,Wn=function(e,t,n){var i=Vn(t);i in e?Kn.f(e,i,Gn(0,n)):e[i]=n},Yn={};Yn[ft("toStringTag")]="z";var Xn="[object z]"===String(Yn),qn=Xn,$n=S,Zn=k,Jn=ft("toStringTag"),Qn=Object,ei="Arguments"==Zn(function(){return arguments}()),ti=qn?Zn:function(e){var t,n,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=Qn(e),Jn))?n:ei?Zn(t):"Object"==(i=Zn(t))&&$n(t.callee)?"Arguments":i},ni=S,ii=Ke,ri=g(Function.toString);ni(ii.inspectSource)||(ii.inspectSource=function(e){return ri(e)});var oi=ii.inspectSource,ai=g,si=o,li=S,ui=ti,ci=oi,hi=function(){},fi=[],di=ae("Reflect","construct"),pi=/^\s*(?:class|function)\b/,vi=ai(pi.exec),gi=!pi.exec(hi),yi=function(e){if(!li(e))return!1;try{return di(hi,fi,e),!0}catch(t){return!1}},mi=function(e){if(!li(e))return!1;switch(ui(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return gi||!!vi(pi,ci(e))}catch(t){return!0}};mi.sham=!0;var _i=!di||si((function(){var e;return yi(yi.call)||!yi(Object)||!yi((function(){e=!0}))||e}))?mi:yi,ki=Rn,bi=_i,wi=ee,Ei=ft("species"),Ci=Array,xi=function(e){var t;return ki(e)&&(t=e.constructor,(bi(t)&&(t===Ci||ki(t.prototype))||wi(t)&&null===(t=t[Ei]))&&(t=void 0)),void 0===t?Ci:t},Ti=function(e,t){return new(xi(e))(0===t?0:t)},Si=o,Pi=ve,Ai=ft("species"),Ii=function(e){return Pi>=51||!Si((function(){var t=[];return(t.constructor={})[Ai]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Ri=An,Oi=o,Mi=Rn,Li=ee,Di=qe,Ni=jn,Fi=zn,Ui=Wn,Hi=Ti,ji=Ii,Bi=ve,zi=ft("isConcatSpreadable"),Vi=Bi>=51||!Oi((function(){var e=[];return e[zi]=!1,e.concat()[0]!==e})),Ki=function(e){if(!Li(e))return!1;var t=e[zi];return void 0!==t?!!t:Mi(e)};Ri({target:"Array",proto:!0,arity:1,forced:!Vi||!ji("concat")},{concat:function(e){var t,n,i,r,o,a=Di(this),s=Hi(a,0),l=0;for(t=-1,i=arguments.length;t<i;t++)if(Ki(o=-1===t?a:arguments[t]))for(r=Ni(o),Fi(l+r),n=0;n<r;n++,l++)n in o&&Ui(s,l,o[n]);else Fi(l+1),Ui(s,l++,o);return s.length=l,s}});var Gi=ti,Wi=String,Yi=function(e){if("Symbol"===Gi(e))throw TypeError("Cannot convert a Symbol value to a string");return Wi(e)},Xi={},qi=Dn,$i=Math.max,Zi=Math.min,Ji=function(e,t){var n=qi(e);return n<0?$i(n+t,0):Zi(n,t)},Qi=Z,er=Ji,tr=jn,nr=function(e){return function(t,n,i){var r,o=Qi(t),a=tr(o),s=er(i,a);if(e&&n!=n){for(;a>s;)if((r=o[s++])!=r)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}},ir={includes:nr(!0),indexOf:nr(!1)},rr={},or=Je,ar=Z,sr=ir.indexOf,lr=rr,ur=g([].push),cr=function(e,t){var n,i=ar(e),r=0,o=[];for(n in i)!or(lr,n)&&or(i,n)&&ur(o,n);for(;t.length>r;)or(i,n=t[r++])&&(~sr(o,n)||ur(o,n));return o},hr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],fr=cr,dr=hr,pr=Object.keys||function(e){return fr(e,dr)},vr=A,gr=Jt,yr=Zt,mr=nn,_r=Z,kr=pr;Xi.f=vr&&!gr?Object.defineProperties:function(e,t){mr(e);for(var n,i=_r(t),r=kr(t),o=r.length,a=0;o>a;)yr.f(e,n=r[a++],i[n]);return e};var br,wr=ae("document","documentElement"),Er=it,Cr=We("keys"),xr=function(e){return Cr[e]||(Cr[e]=Er(e))},Tr=nn,Sr=Xi,Pr=hr,Ar=rr,Ir=wr,Rr=Tt,Or="prototype",Mr="script",Lr=xr("IE_PROTO"),Dr=function(){},Nr=function(e){return"<"+Mr+">"+e+"</"+Mr+">"},Fr=function(e){e.write(Nr("")),e.close();var t=e.parentWindow.Object;return e=null,t},Ur=function(){try{br=new ActiveXObject("htmlfile")}catch(r){}var e,t,n;Ur="undefined"!=typeof document?document.domain&&br?Fr(br):(t=Rr("iframe"),n="java"+Mr+":",t.style.display="none",Ir.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Nr("document.F=Object")),e.close(),e.F):Fr(br);for(var i=Pr.length;i--;)delete Ur[Or][Pr[i]];return Ur()};Ar[Lr]=!0;var Hr=Object.create||function(e,t){var n;return null!==e?(Dr[Or]=Tr(e),n=new Dr,Dr[Or]=null,n[Lr]=e):n=Ur(),void 0===t?n:Sr.f(n,t)},jr={},Br=cr,zr=hr.concat("length","prototype");jr.f=Object.getOwnPropertyNames||function(e){return Br(e,zr)};var Vr={},Kr=Ji,Gr=jn,Wr=Wn,Yr=Array,Xr=Math.max,qr=function(e,t,n){for(var i=Gr(e),r=Kr(t,i),o=Kr(void 0===n?i:n,i),a=Yr(Xr(o-r,0)),s=0;r<o;r++,s++)Wr(a,s,e[r]);return a.length=s,a},$r=k,Zr=Z,Jr=jr.f,Qr=qr,eo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Vr.f=function(e){return eo&&"Window"==$r(e)?function(e){try{return Jr(e)}catch(t){return Qr(eo)}}(e):Jr(Zr(e))};var to={};to.f=Object.getOwnPropertySymbols;var no=yn,io=function(e,t,n,i){return i&&i.enumerable?e[t]=n:no(e,t,n),e},ro=Zt,oo=function(e,t,n){return ro.f(e,t,n)},ao={},so=ft;ao.f=so;var lo,uo,co,ho=te,fo=Je,po=ao,vo=Zt.f,go=function(e){var t=ho.Symbol||(ho.Symbol={});fo(t,e)||vo(t,e,{value:po.f(e)})},yo=O,mo=ae,_o=ft,ko=io,bo=function(){var e=mo("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,i=_o("toPrimitive");t&&!t[i]&&ko(t,i,(function(e){return yo(n,this)}),{arity:1})},wo=ti,Eo=Xn?{}.toString:function(){return"[object "+wo(this)+"]"},Co=Xn,xo=Zt.f,To=yn,So=Je,Po=Eo,Ao=ft("toStringTag"),Io=function(e,t,n,i){if(e){var r=n?e:e.prototype;So(r,Ao)||xo(r,Ao,{configurable:!0,value:t}),i&&!Co&&To(r,"toString",Po)}},Ro=S,Oo=r.WeakMap,Mo=Ro(Oo)&&/native code/.test(String(Oo)),Lo=r,Do=ee,No=yn,Fo=Je,Uo=Ke,Ho=xr,jo=rr,Bo="Object already initialized",zo=Lo.TypeError,Vo=Lo.WeakMap;if(Mo||Uo.state){var Ko=Uo.state||(Uo.state=new Vo);Ko.get=Ko.get,Ko.has=Ko.has,Ko.set=Ko.set,lo=function(e,t){if(Ko.has(e))throw zo(Bo);return t.facade=e,Ko.set(e,t),t},uo=function(e){return Ko.get(e)||{}},co=function(e){return Ko.has(e)}}else{var Go=Ho("state");jo[Go]=!0,lo=function(e,t){if(Fo(e,Go))throw zo(Bo);return t.facade=e,No(e,Go,t),t},uo=function(e){return Fo(e,Go)?e[Go]:{}},co=function(e){return Fo(e,Go)}}var Wo={set:lo,get:uo,has:co,enforce:function(e){return co(e)?uo(e):lo(e,{})},getterFor:function(e){return function(t){var n;if(!Do(t)||(n=uo(t)).type!==e)throw zo("Incompatible receiver, "+e+" required");return n}}},Yo=$t,Xo=K,qo=qe,$o=jn,Zo=Ti,Jo=g([].push),Qo=function(e){var t=1==e,n=2==e,i=3==e,r=4==e,o=6==e,a=7==e,s=5==e||o;return function(l,u,c,h){for(var f,d,p=qo(l),v=Xo(p),g=Yo(u,c),y=$o(v),m=0,_=h||Zo,k=t?_(l,y):n||a?_(l,0):void 0;y>m;m++)if((s||m in v)&&(d=g(f=v[m],m,p),e))if(t)k[m]=d;else if(d)switch(e){case 3:return!0;case 5:return f;case 6:return m;case 2:Jo(k,f)}else switch(e){case 4:return!1;case 7:Jo(k,f)}return o?-1:i||r?r:k}},ea={forEach:Qo(0),map:Qo(1),filter:Qo(2),some:Qo(3),every:Qo(4),find:Qo(5),findIndex:Qo(6),filterReject:Qo(7)},ta=An,na=r,ia=O,ra=g,oa=A,aa=_e,sa=o,la=Je,ua=se,ca=nn,ha=Z,fa=wt,da=Yi,pa=H,va=Hr,ga=pr,ya=jr,ma=Vr,_a=to,ka=P,ba=Zt,wa=Xi,Ea=M,Ca=io,xa=oo,Ta=We,Sa=rr,Pa=it,Aa=ft,Ia=ao,Ra=go,Oa=bo,Ma=Io,La=Wo,Da=ea.forEach,Na=xr("hidden"),Fa="Symbol",Ua="prototype",Ha=La.set,ja=La.getterFor(Fa),Ba=Object[Ua],za=na.Symbol,Va=za&&za[Ua],Ka=na.TypeError,Ga=na.QObject,Wa=ka.f,Ya=ba.f,Xa=ma.f,qa=Ea.f,$a=ra([].push),Za=Ta("symbols"),Ja=Ta("op-symbols"),Qa=Ta("wks"),es=!Ga||!Ga[Ua]||!Ga[Ua].findChild,ts=oa&&sa((function(){return 7!=va(Ya({},"a",{get:function(){return Ya(this,"a",{value:7}).a}})).a}))?function(e,t,n){var i=Wa(Ba,t);i&&delete Ba[t],Ya(e,t,n),i&&e!==Ba&&Ya(Ba,t,i)}:Ya,ns=function(e,t){var n=Za[e]=va(Va);return Ha(n,{type:Fa,tag:e,description:t}),oa||(n.description=t),n},is=function(e,t,n){e===Ba&&is(Ja,t,n),ca(e);var i=fa(t);return ca(n),la(Za,i)?(n.enumerable?(la(e,Na)&&e[Na][i]&&(e[Na][i]=!1),n=va(n,{enumerable:pa(0,!1)})):(la(e,Na)||Ya(e,Na,pa(1,{})),e[Na][i]=!0),ts(e,i,n)):Ya(e,i,n)},rs=function(e,t){ca(e);var n=ha(t),i=ga(n).concat(ls(n));return Da(i,(function(t){oa&&!ia(os,n,t)||is(e,t,n[t])})),e},os=function(e){var t=fa(e),n=ia(qa,this,t);return!(this===Ba&&la(Za,t)&&!la(Ja,t))&&(!(n||!la(this,t)||!la(Za,t)||la(this,Na)&&this[Na][t])||n)},as=function(e,t){var n=ha(e),i=fa(t);if(n!==Ba||!la(Za,i)||la(Ja,i)){var r=Wa(n,i);return!r||!la(Za,i)||la(n,Na)&&n[Na][i]||(r.enumerable=!0),r}},ss=function(e){var t=Xa(ha(e)),n=[];return Da(t,(function(e){la(Za,e)||la(Sa,e)||$a(n,e)})),n},ls=function(e){var t=e===Ba,n=Xa(t?Ja:ha(e)),i=[];return Da(n,(function(e){!la(Za,e)||t&&!la(Ba,e)||$a(i,Za[e])})),i};aa||(za=function(){if(ua(Va,this))throw Ka("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?da(arguments[0]):void 0,t=Pa(e),n=function(e){this===Ba&&ia(n,Ja,e),la(this,Na)&&la(this[Na],t)&&(this[Na][t]=!1),ts(this,t,pa(1,e))};return oa&&es&&ts(Ba,t,{configurable:!0,set:n}),ns(t,e)},Ca(Va=za[Ua],"toString",(function(){return ja(this).tag})),Ca(za,"withoutSetter",(function(e){return ns(Pa(e),e)})),Ea.f=os,ba.f=is,wa.f=rs,ka.f=as,ya.f=ma.f=ss,_a.f=ls,Ia.f=function(e){return ns(Aa(e),e)},oa&&xa(Va,"description",{configurable:!0,get:function(){return ja(this).description}})),ta({global:!0,constructor:!0,wrap:!0,forced:!aa,sham:!aa},{Symbol:za}),Da(ga(Qa),(function(e){Ra(e)})),ta({target:Fa,stat:!0,forced:!aa},{useSetter:function(){es=!0},useSimple:function(){es=!1}}),ta({target:"Object",stat:!0,forced:!aa,sham:!oa},{create:function(e,t){return void 0===t?va(e):rs(va(e),t)},defineProperty:is,defineProperties:rs,getOwnPropertyDescriptor:as}),ta({target:"Object",stat:!0,forced:!aa},{getOwnPropertyNames:ss}),Oa(),Ma(za,Fa),Sa[Na]=!0;var us=_e&&!!Symbol.for&&!!Symbol.keyFor,cs=An,hs=ae,fs=Je,ds=Yi,ps=We,vs=us,gs=ps("string-to-symbol-registry"),ys=ps("symbol-to-string-registry");cs({target:"Symbol",stat:!0,forced:!vs},{for:function(e){var t=ds(e);if(fs(gs,t))return gs[t];var n=hs("Symbol")(t);return gs[t]=n,ys[n]=t,n}});var ms=An,_s=Je,ks=xe,bs=Se,ws=us,Es=We("symbol-to-string-registry");ms({target:"Symbol",stat:!0,forced:!ws},{keyFor:function(e){if(!ks(e))throw TypeError(bs(e)+" is not a symbol");if(_s(Es,e))return Es[e]}});var Cs=g([].slice),xs=Rn,Ts=S,Ss=k,Ps=Yi,As=g([].push),Is=An,Rs=ae,Os=h,Ms=O,Ls=g,Ds=o,Ns=S,Fs=xe,Us=Cs,Hs=function(e){if(Ts(e))return e;if(xs(e)){for(var t=e.length,n=[],i=0;i<t;i++){var r=e[i];"string"==typeof r?As(n,r):"number"!=typeof r&&"Number"!=Ss(r)&&"String"!=Ss(r)||As(n,Ps(r))}var o=n.length,a=!0;return function(e,t){if(a)return a=!1,t;if(xs(this))return t;for(var i=0;i<o;i++)if(n[i]===e)return t}}},js=_e,Bs=String,zs=Rs("JSON","stringify"),Vs=Ls(/./.exec),Ks=Ls("".charAt),Gs=Ls("".charCodeAt),Ws=Ls("".replace),Ys=Ls(1..toString),Xs=/[\uD800-\uDFFF]/g,qs=/^[\uD800-\uDBFF]$/,$s=/^[\uDC00-\uDFFF]$/,Zs=!js||Ds((function(){var e=Rs("Symbol")();return"[null]"!=zs([e])||"{}"!=zs({a:e})||"{}"!=zs(Object(e))})),Js=Ds((function(){return'"\\udf06\\ud834"'!==zs("\udf06\ud834")||'"\\udead"'!==zs("\udead")})),Qs=function(e,t){var n=Us(arguments),i=Hs(t);if(Ns(i)||void 0!==e&&!Fs(e))return n[1]=function(e,t){if(Ns(i)&&(t=Ms(i,this,Bs(e),t)),!Fs(t))return t},Os(zs,null,n)},el=function(e,t,n){var i=Ks(n,t-1),r=Ks(n,t+1);return Vs(qs,e)&&!Vs($s,r)||Vs($s,e)&&!Vs(qs,i)?"\\u"+Ys(Gs(e,0),16):e};zs&&Is({target:"JSON",stat:!0,arity:3,forced:Zs||Js},{stringify:function(e,t,n){var i=Us(arguments),r=Os(Zs?Qs:zs,null,i);return Js&&"string"==typeof r?Ws(r,Xs,el):r}});var tl=to,nl=qe;An({target:"Object",stat:!0,forced:!_e||o((function(){tl.f(1)}))},{getOwnPropertySymbols:function(e){var t=tl.f;return t?t(nl(e)):[]}}),go("asyncIterator"),go("hasInstance"),go("isConcatSpreadable"),go("iterator"),go("match"),go("matchAll"),go("replace"),go("search"),go("species"),go("split");var il=bo;go("toPrimitive"),il();var rl=ae,ol=Io;go("toStringTag"),ol(rl("Symbol"),"Symbol"),go("unscopables"),Io(r.JSON,"JSON",!0);var al,sl,ll,ul=te.Symbol,cl={},hl=A,fl=Je,dl=Function.prototype,pl=hl&&Object.getOwnPropertyDescriptor,vl=fl(dl,"name"),gl={EXISTS:vl,PROPER:vl&&"something"===function(){}.name,CONFIGURABLE:vl&&(!hl||hl&&pl(dl,"name").configurable)},yl=!o((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),ml=Je,_l=S,kl=qe,bl=yl,wl=xr("IE_PROTO"),El=Object,Cl=El.prototype,xl=bl?El.getPrototypeOf:function(e){var t=kl(e);if(ml(t,wl))return t[wl];var n=t.constructor;return _l(n)&&t instanceof n?n.prototype:t instanceof El?Cl:null},Tl=o,Sl=S,Pl=ee,Al=Hr,Il=xl,Rl=io,Ol=ft("iterator"),Ml=!1;[].keys&&("next"in(ll=[].keys())?(sl=Il(Il(ll)))!==Object.prototype&&(al=sl):Ml=!0);var Ll=!Pl(al)||Tl((function(){var e={};return al[Ol].call(e)!==e}));Sl((al=Ll?{}:Al(al))[Ol])||Rl(al,Ol,(function(){return this}));var Dl={IteratorPrototype:al,BUGGY_SAFARI_ITERATORS:Ml},Nl=Dl.IteratorPrototype,Fl=Hr,Ul=H,Hl=Io,jl=cl,Bl=function(){return this},zl=function(e,t,n,i){var r=t+" Iterator";return e.prototype=Fl(Nl,{next:Ul(+!i,n)}),Hl(e,r,!1,!0),jl[r]=Bl,e},Vl=g,Kl=Re,Gl=S,Wl=String,Yl=TypeError,Xl=function(e,t,n){try{return Vl(Kl(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(i){}},ql=nn,$l=function(e){if("object"==typeof e||Gl(e))return e;throw Yl("Can't set "+Wl(e)+" as a prototype")},Zl=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Xl(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(i){}return function(n,i){return ql(n),$l(i),t?e(n,i):n.__proto__=i,n}}():void 0),Jl=An,Ql=O,eu=gl,tu=zl,nu=xl,iu=Io,ru=io,ou=cl,au=Dl,su=eu.PROPER,lu=au.BUGGY_SAFARI_ITERATORS,uu=ft("iterator"),cu="keys",hu="values",fu="entries",du=function(){return this},pu=function(e,t,n,i,r,o,a){tu(n,t,i);var s,l,u,c=function(e){if(e===r&&v)return v;if(!lu&&e in d)return d[e];switch(e){case cu:case hu:case fu:return function(){return new n(this,e)}}return function(){return new n(this)}},h=t+" Iterator",f=!1,d=e.prototype,p=d[uu]||d["@@iterator"]||r&&d[r],v=!lu&&p||c(r),g="Array"==t&&d.entries||p;if(g&&(s=nu(g.call(new e)))!==Object.prototype&&s.next&&(iu(s,h,!0,!0),ou[h]=du),su&&r==hu&&p&&p.name!==hu&&(f=!0,v=function(){return Ql(p,this)}),r)if(l={values:c(hu),keys:o?v:c(cu),entries:c(fu)},a)for(u in l)(lu||f||!(u in d))&&ru(d,u,l[u]);else Jl({target:t,proto:!0,forced:lu||f},l);return a&&d[uu]!==v&&ru(d,uu,v,{name:r}),ou[t]=v,l},vu=function(e,t){return{value:e,done:t}},gu=Z,yu=cl,mu=Wo;Zt.f;var _u=pu,ku=vu,bu="Array Iterator",wu=mu.set,Eu=mu.getterFor(bu);_u(Array,"Array",(function(e,t){wu(this,{type:bu,target:gu(e),index:0,kind:t})}),(function(){var e=Eu(this),t=e.target,n=e.kind,i=e.index++;return!t||i>=t.length?(e.target=void 0,ku(void 0,!0)):ku("keys"==n?i:"values"==n?t[i]:[i,t[i]],!1)}),"values"),yu.Arguments=yu.Array;var Cu={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},xu=r,Tu=ti,Su=yn,Pu=cl,Au=ft("toStringTag");for(var Iu in Cu){var Ru=xu[Iu],Ou=Ru&&Ru.prototype;Ou&&Tu(Ou)!==Au&&Su(Ou,Au,Iu),Pu[Iu]=Pu.Array}var Mu=ul;go("dispose");var Lu=Mu;go("asyncDispose");var Du=An,Nu=g,Fu=ae("Symbol"),Uu=Fu.keyFor,Hu=Nu(Fu.prototype.valueOf);Du({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==Uu(Hu(e))}catch(t){return!1}}});for(var ju=An,Bu=We,zu=ae,Vu=g,Ku=xe,Gu=ft,Wu=zu("Symbol"),Yu=Wu.isWellKnown,Xu=zu("Object","getOwnPropertyNames"),qu=Vu(Wu.prototype.valueOf),$u=Bu("wks"),Zu=0,Ju=Xu(Wu),Qu=Ju.length;Zu<Qu;Zu++)try{var ec=Ju[Zu];Ku(Wu[ec])&&Gu(ec)}catch(HN){}ju({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if(Yu&&Yu(e))return!0;try{for(var t=qu(e),n=0,i=Xu($u),r=i.length;n<r;n++)if($u[i[n]]==t)return!0}catch(HN){}return!1}}),go("matcher"),go("metadataKey"),go("observable"),go("metadata"),go("patternMatch"),go("replaceAll");var tc=Lu,nc=n(tc),ic=g,rc=Dn,oc=Yi,ac=X,sc=ic("".charAt),lc=ic("".charCodeAt),uc=ic("".slice),cc=function(e){return function(t,n){var i,r,o=oc(ac(t)),a=rc(n),s=o.length;return a<0||a>=s?e?"":void 0:(i=lc(o,a))<55296||i>56319||a+1===s||(r=lc(o,a+1))<56320||r>57343?e?sc(o,a):i:e?uc(o,a,a+2):r-56320+(i-55296<<10)+65536}},hc={codeAt:cc(!1),charAt:cc(!0)},fc=hc.charAt,dc=Yi,pc=Wo,vc=pu,gc=vu,yc="String Iterator",mc=pc.set,_c=pc.getterFor(yc);vc(String,"String",(function(e){mc(this,{type:yc,string:dc(e),index:0})}),(function(){var e,t=_c(this),n=t.string,i=t.index;return i>=n.length?gc(void 0,!0):(e=fc(n,i),t.index+=e.length,gc(e,!1))}));var kc=ao.f("iterator"),bc=n(kc);function wc(e){return(wc="function"==typeof nc&&"symbol"==typeof bc?function(e){return typeof e}:function(e){return e&&"function"==typeof nc&&e.constructor===nc&&e!==nc.prototype?"symbol":typeof e})(e)}var Ec={exports:{}},Cc=An,xc=A,Tc=Zt.f;Cc({target:"Object",stat:!0,forced:Object.defineProperty!==Tc,sham:!xc},{defineProperty:Tc});var Sc=te.Object,Pc=Ec.exports=function(e,t,n){return Sc.defineProperty(e,t,n)};Sc.defineProperty.sham&&(Pc.sham=!0);var Ac=Ec.exports,Ic=n(Ac);An({target:"Object",stat:!0,sham:!A},{create:Hr});var Rc=te.Object,Oc=n((function(e,t){return Rc.create(e,t)})),Mc=qe,Lc=xl,Dc=yl;An({target:"Object",stat:!0,forced:o((function(){Lc(1)})),sham:!Dc},{getPrototypeOf:function(e){return Lc(Mc(e))}});var Nc=te.Object.getPrototypeOf,Fc=n(Nc),Uc=o,Hc=function(e,t){var n=[][e];return!!n&&Uc((function(){n.call(null,t||function(){return 1},1)}))},jc=ea.forEach,Bc=Hc("forEach")?[].forEach:function(e){return jc(this,e,arguments.length>1?arguments[1]:void 0)};An({target:"Array",proto:!0,forced:[].forEach!=Bc},{forEach:Bc});var zc=te,Vc=function(e){return zc[e+"Prototype"]},Kc=Vc("Array").forEach,Gc=ti,Wc=Je,Yc=se,Xc=Kc,qc=Array.prototype,$c={DOMTokenList:!0,NodeList:!0},Zc=n((function(e){var t=e.forEach;return e===qc||Yc(qc,e)&&t===qc.forEach||Wc($c,Gc(e))?Xc:t})),Jc=A,Qc=Rn,eh=TypeError,th=Object.getOwnPropertyDescriptor,nh=Jc&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(HN){return HN instanceof TypeError}}()?function(e,t){if(Qc(e)&&!th(e,"length").writable)throw eh("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},ih=qe,rh=jn,oh=nh,ah=zn;An({target:"Array",proto:!0,arity:1,forced:o((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(HN){return HN instanceof TypeError}}()},{push:function(e){var t=ih(this),n=rh(t),i=arguments.length;ah(n+i);for(var r=0;r<i;r++)t[n]=arguments[r],n++;return oh(t,n),n}});var sh=Vc("Array").push,lh=se,uh=sh,ch=Array.prototype,hh=n((function(e){var t=e.push;return e===ch||lh(ch,e)&&t===ch.push?uh:t}));An({target:"Object",stat:!0},{setPrototypeOf:Zl});var fh=te.Object.setPrototypeOf,dh=n(fh),ph=ae,vh=jr,gh=to,yh=nn,mh=g([].concat),_h=ph("Reflect","ownKeys")||function(e){var t=vh.f(yh(e)),n=gh.f;return n?mh(t,n(e)):t},kh=Je,bh=_h,wh=P,Eh=Zt,Ch=ee,xh=yn,Th=Error,Sh=g("".replace),Ph=String(Th("zxcasd").stack),Ah=/\n\s*at [^:]*:[^\n]*/,Ih=Ah.test(Ph),Rh=H,Oh=!o((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Rh(1,7)),7!==e.stack)})),Mh=yn,Lh=function(e,t){if(Ih&&"string"==typeof e&&!Th.prepareStackTrace)for(;t--;)e=Sh(e,Ah,"");return e},Dh=Oh,Nh=Error.captureStackTrace,Fh=cl,Uh=ft("iterator"),Hh=Array.prototype,jh=function(e){return void 0!==e&&(Fh.Array===e||Hh[Uh]===e)},Bh=ti,zh=Le,Vh=G,Kh=cl,Gh=ft("iterator"),Wh=function(e){if(!Vh(e))return zh(e,Gh)||zh(e,"@@iterator")||Kh[Bh(e)]},Yh=O,Xh=Re,qh=nn,$h=Se,Zh=Wh,Jh=TypeError,Qh=function(e,t){var n=arguments.length<2?Zh(e):t;if(Xh(n))return qh(Yh(n,e));throw Jh($h(e)+" is not iterable")},ef=O,tf=nn,nf=Le,rf=function(e,t,n){var i,r;tf(e);try{if(!(i=nf(e,"return"))){if("throw"===t)throw n;return n}i=ef(i,e)}catch(HN){r=!0,i=HN}if("throw"===t)throw n;if(r)throw i;return tf(i),n},of=$t,af=O,sf=nn,lf=Se,uf=jh,cf=jn,hf=se,ff=Qh,df=Wh,pf=rf,vf=TypeError,gf=function(e,t){this.stopped=e,this.result=t},yf=gf.prototype,mf=function(e,t,n){var i,r,o,a,s,l,u,c=n&&n.that,h=!(!n||!n.AS_ENTRIES),f=!(!n||!n.IS_RECORD),d=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),v=of(t,c),g=function(e){return i&&pf(i,"normal",e),new gf(!0,e)},y=function(e){return h?(sf(e),p?v(e[0],e[1],g):v(e[0],e[1])):p?v(e,g):v(e)};if(f)i=e.iterator;else if(d)i=e;else{if(!(r=df(e)))throw vf(lf(e)+" is not iterable");if(uf(r)){for(o=0,a=cf(e);a>o;o++)if((s=y(e[o]))&&hf(yf,s))return s;return new gf(!1)}i=ff(e,r)}for(l=f?e.next:i.next;!(u=af(l,i)).done;){try{s=y(u.value)}catch(HN){pf(i,"throw",HN)}if("object"==typeof s&&s&&hf(yf,s))return s}return new gf(!1)},_f=Yi,kf=An,bf=se,wf=xl,Ef=Zl,Cf=function(e,t,n){for(var i=bh(t),r=Eh.f,o=wh.f,a=0;a<i.length;a++){var s=i[a];kh(e,s)||n&&kh(n,s)||r(e,s,o(t,s))}},xf=Hr,Tf=yn,Sf=H,Pf=function(e,t){Ch(t)&&"cause"in t&&xh(e,"cause",t.cause)},Af=function(e,t,n,i){Dh&&(Nh?Nh(e,t):Mh(e,"stack",Lh(n,i)))},If=mf,Rf=function(e,t){return void 0===e?arguments.length<2?"":t:_f(e)},Of=ft("toStringTag"),Mf=Error,Lf=[].push,Df=function(e,t){var n,i=bf(Nf,this);Ef?n=Ef(Mf(),i?wf(this):Nf):(n=i?this:xf(Nf),Tf(n,Of,"Error")),void 0!==t&&Tf(n,"message",Rf(t)),Af(n,Df,n.stack,1),arguments.length>2&&Pf(n,arguments[2]);var r=[];return If(e,Lf,{that:r}),Tf(n,"errors",r),n};Ef?Ef(Df,Mf):Cf(Df,Mf,{name:!0});var Nf=Df.prototype=xf(Mf.prototype,{constructor:Sf(1,Df),message:Sf(1,""),name:Sf(1,"AggregateError")});kf({global:!0,constructor:!0,arity:2},{AggregateError:Df});var Ff,Uf,Hf,jf,Bf="undefined"!=typeof process&&"process"==k(process),zf=ae,Vf=oo,Kf=A,Gf=ft("species"),Wf=function(e){var t=zf(e);Kf&&t&&!t[Gf]&&Vf(t,Gf,{configurable:!0,get:function(){return this}})},Yf=se,Xf=TypeError,qf=function(e,t){if(Yf(t,e))return e;throw Xf("Incorrect invocation")},$f=_i,Zf=Se,Jf=TypeError,Qf=function(e){if($f(e))return e;throw Jf(Zf(e)+" is not a constructor")},ed=nn,td=Qf,nd=G,id=ft("species"),rd=function(e,t){var n,i=ed(e).constructor;return void 0===i||nd(n=ed(i)[id])?t:td(n)},od=TypeError,ad=function(e,t){if(e<t)throw od("Not enough arguments");return e},sd=/(?:ipad|iphone|ipod).*applewebkit/i.test(le),ld=r,ud=h,cd=$t,hd=S,fd=Je,dd=o,pd=wr,vd=Cs,gd=Tt,yd=ad,md=sd,_d=Bf,kd=ld.setImmediate,bd=ld.clearImmediate,wd=ld.process,Ed=ld.Dispatch,Cd=ld.Function,xd=ld.MessageChannel,Td=ld.String,Sd=0,Pd={},Ad="onreadystatechange";dd((function(){Ff=ld.location}));var Id=function(e){if(fd(Pd,e)){var t=Pd[e];delete Pd[e],t()}},Rd=function(e){return function(){Id(e)}},Od=function(e){Id(e.data)},Md=function(e){ld.postMessage(Td(e),Ff.protocol+"//"+Ff.host)};kd&&bd||(kd=function(e){yd(arguments.length,1);var t=hd(e)?e:Cd(e),n=vd(arguments,1);return Pd[++Sd]=function(){ud(t,void 0,n)},Uf(Sd),Sd},bd=function(e){delete Pd[e]},_d?Uf=function(e){wd.nextTick(Rd(e))}:Ed&&Ed.now?Uf=function(e){Ed.now(Rd(e))}:xd&&!md?(jf=(Hf=new xd).port2,Hf.port1.onmessage=Od,Uf=cd(jf.postMessage,jf)):ld.addEventListener&&hd(ld.postMessage)&&!ld.importScripts&&Ff&&"file:"!==Ff.protocol&&!dd(Md)?(Uf=Md,ld.addEventListener("message",Od,!1)):Uf=Ad in gd("script")?function(e){pd.appendChild(gd("script"))[Ad]=function(){pd.removeChild(this),Id(e)}}:function(e){setTimeout(Rd(e),0)});var Ld={set:kd,clear:bd},Dd=function(){this.head=null,this.tail=null};Dd.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.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 Nd,Fd,Ud,Hd,jd,Bd=Dd,zd=/ipad|iphone|ipod/i.test(le)&&"undefined"!=typeof Pebble,Vd=/web0s(?!.*chrome)/i.test(le),Kd=r,Gd=$t,Wd=P.f,Yd=Ld.set,Xd=Bd,qd=sd,$d=zd,Zd=Vd,Jd=Bf,Qd=Kd.MutationObserver||Kd.WebKitMutationObserver,ep=Kd.document,tp=Kd.process,np=Kd.Promise,ip=Wd(Kd,"queueMicrotask"),rp=ip&&ip.value;if(!rp){var op=new Xd,ap=function(){var e,t;for(Jd&&(e=tp.domain)&&e.exit();t=op.get();)try{t()}catch(HN){throw op.head&&Nd(),HN}e&&e.enter()};qd||Jd||Zd||!Qd||!ep?!$d&&np&&np.resolve?((Hd=np.resolve(void 0)).constructor=np,jd=Gd(Hd.then,Hd),Nd=function(){jd(ap)}):Jd?Nd=function(){tp.nextTick(ap)}:(Yd=Gd(Yd,Kd),Nd=function(){Yd(ap)}):(Fd=!0,Ud=ep.createTextNode(""),new Qd(ap).observe(Ud,{characterData:!0}),Nd=function(){Ud.data=Fd=!Fd}),rp=function(e){op.head||Nd(),op.add(e)}}var sp=rp,lp=function(e){try{return{error:!1,value:e()}}catch(HN){return{error:!0,value:HN}}},up=r.Promise,cp="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,hp=!cp&&!Bf&&"object"==typeof window&&"object"==typeof document,fp=r,dp=up,pp=S,vp=Wt,gp=oi,yp=ft,mp=hp,_p=cp,kp=ve,bp=dp&&dp.prototype,wp=yp("species"),Ep=!1,Cp=pp(fp.PromiseRejectionEvent),xp={CONSTRUCTOR:vp("Promise",(function(){var e=gp(dp),t=e!==String(dp);if(!t&&66===kp)return!0;if(!bp.catch||!bp.finally)return!0;if(!kp||kp<51||!/native code/.test(e)){var n=new dp((function(e){e(1)})),i=function(e){e((function(){}),(function(){}))};if((n.constructor={})[wp]=i,!(Ep=n.then((function(){}))instanceof i))return!0}return!t&&(mp||_p)&&!Cp})),REJECTION_EVENT:Cp,SUBCLASSING:Ep},Tp={},Sp=Re,Pp=TypeError,Ap=function(e){var t,n;this.promise=new e((function(e,i){if(void 0!==t||void 0!==n)throw Pp("Bad Promise constructor");t=e,n=i})),this.resolve=Sp(t),this.reject=Sp(n)};Tp.f=function(e){return new Ap(e)};var Ip,Rp,Op=An,Mp=Bf,Lp=r,Dp=O,Np=io,Fp=Io,Up=Wf,Hp=Re,jp=S,Bp=ee,zp=qf,Vp=rd,Kp=Ld.set,Gp=sp,Wp=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(HN){}},Yp=lp,Xp=Bd,qp=Wo,$p=up,Zp=xp,Jp=Tp,Qp="Promise",ev=Zp.CONSTRUCTOR,tv=Zp.REJECTION_EVENT,nv=qp.getterFor(Qp),iv=qp.set,rv=$p&&$p.prototype,ov=$p,av=rv,sv=Lp.TypeError,lv=Lp.document,uv=Lp.process,cv=Jp.f,hv=cv,fv=!!(lv&&lv.createEvent&&Lp.dispatchEvent),dv="unhandledrejection",pv=function(e){var t;return!(!Bp(e)||!jp(t=e.then))&&t},vv=function(e,t){var n,i,r,o=t.value,a=1==t.state,s=a?e.ok:e.fail,l=e.resolve,u=e.reject,c=e.domain;try{s?(a||(2===t.rejection&&kv(t),t.rejection=1),!0===s?n=o:(c&&c.enter(),n=s(o),c&&(c.exit(),r=!0)),n===e.promise?u(sv("Promise-chain cycle")):(i=pv(n))?Dp(i,n,l,u):l(n)):u(o)}catch(HN){c&&!r&&c.exit(),u(HN)}},gv=function(e,t){e.notified||(e.notified=!0,Gp((function(){for(var n,i=e.reactions;n=i.get();)vv(n,e);e.notified=!1,t&&!e.rejection&&mv(e)})))},yv=function(e,t,n){var i,r;fv?((i=lv.createEvent("Event")).promise=t,i.reason=n,i.initEvent(e,!1,!0),Lp.dispatchEvent(i)):i={promise:t,reason:n},!tv&&(r=Lp["on"+e])?r(i):e===dv&&Wp("Unhandled promise rejection",n)},mv=function(e){Dp(Kp,Lp,(function(){var t,n=e.facade,i=e.value;if(_v(e)&&(t=Yp((function(){Mp?uv.emit("unhandledRejection",i,n):yv(dv,n,i)})),e.rejection=Mp||_v(e)?2:1,t.error))throw t.value}))},_v=function(e){return 1!==e.rejection&&!e.parent},kv=function(e){Dp(Kp,Lp,(function(){var t=e.facade;Mp?uv.emit("rejectionHandled",t):yv("rejectionhandled",t,e.value)}))},bv=function(e,t,n){return function(i){e(t,i,n)}},wv=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,gv(e,!0))},Ev=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw sv("Promise can't be resolved itself");var i=pv(t);i?Gp((function(){var n={done:!1};try{Dp(i,t,bv(Ev,n,e),bv(wv,n,e))}catch(HN){wv(n,HN,e)}})):(e.value=t,e.state=1,gv(e,!1))}catch(HN){wv({done:!1},HN,e)}}};ev&&(av=(ov=function(e){zp(this,av),Hp(e),Dp(Ip,this);var t=nv(this);try{e(bv(Ev,t),bv(wv,t))}catch(HN){wv(t,HN)}}).prototype,(Ip=function(e){iv(this,{type:Qp,done:!1,notified:!1,parent:!1,reactions:new Xp,rejection:!1,state:0,value:void 0})}).prototype=Np(av,"then",(function(e,t){var n=nv(this),i=cv(Vp(this,ov));return n.parent=!0,i.ok=!jp(e)||e,i.fail=jp(t)&&t,i.domain=Mp?uv.domain:void 0,0==n.state?n.reactions.add(i):Gp((function(){vv(i,n)})),i.promise})),Rp=function(){var e=new Ip,t=nv(e);this.promise=e,this.resolve=bv(Ev,t),this.reject=bv(wv,t)},Jp.f=cv=function(e){return e===ov||undefined===e?new Rp(e):hv(e)}),Op({global:!0,constructor:!0,wrap:!0,forced:ev},{Promise:ov}),Fp(ov,Qp,!1,!0),Up(Qp);var Cv=ft("iterator"),xv=!1;try{var Tv=0,Sv={next:function(){return{done:!!Tv++}},return:function(){xv=!0}};Sv[Cv]=function(){return this},Array.from(Sv,(function(){throw 2}))}catch(HN){}var Pv=function(e,t){if(!t&&!xv)return!1;var n=!1;try{var i={};i[Cv]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(HN){}return n},Av=up,Iv=xp.CONSTRUCTOR||!Pv((function(e){Av.all(e).then(void 0,(function(){}))})),Rv=O,Ov=Re,Mv=Tp,Lv=lp,Dv=mf;An({target:"Promise",stat:!0,forced:Iv},{all:function(e){var t=this,n=Mv.f(t),i=n.resolve,r=n.reject,o=Lv((function(){var n=Ov(t.resolve),o=[],a=0,s=1;Dv(e,(function(e){var l=a++,u=!1;s++,Rv(n,t,e).then((function(e){u||(u=!0,o[l]=e,--s||i(o))}),r)})),--s||i(o)}));return o.error&&r(o.value),n.promise}});var Nv=An,Fv=xp.CONSTRUCTOR;up&&up.prototype,Nv({target:"Promise",proto:!0,forced:Fv,real:!0},{catch:function(e){return this.then(void 0,e)}});var Uv=O,Hv=Re,jv=Tp,Bv=lp,zv=mf;An({target:"Promise",stat:!0,forced:Iv},{race:function(e){var t=this,n=jv.f(t),i=n.reject,r=Bv((function(){var r=Hv(t.resolve);zv(e,(function(e){Uv(r,t,e).then(n.resolve,i)}))}));return r.error&&i(r.value),n.promise}});var Vv=O,Kv=Tp;An({target:"Promise",stat:!0,forced:xp.CONSTRUCTOR},{reject:function(e){var t=Kv.f(this);return Vv(t.reject,void 0,e),t.promise}});var Gv=nn,Wv=ee,Yv=Tp,Xv=function(e,t){if(Gv(e),Wv(t)&&t.constructor===e)return t;var n=Yv.f(e);return(0,n.resolve)(t),n.promise},qv=An,$v=up,Zv=xp.CONSTRUCTOR,Jv=Xv,Qv=ae("Promise"),eg=!Zv;qv({target:"Promise",stat:!0,forced:true},{resolve:function(e){return Jv(eg&&this===Qv?$v:this,e)}});var tg=O,ng=Re,ig=Tp,rg=lp,og=mf;An({target:"Promise",stat:!0,forced:Iv},{allSettled:function(e){var t=this,n=ig.f(t),i=n.resolve,r=n.reject,o=rg((function(){var n=ng(t.resolve),r=[],o=0,a=1;og(e,(function(e){var s=o++,l=!1;a++,tg(n,t,e).then((function(e){l||(l=!0,r[s]={status:"fulfilled",value:e},--a||i(r))}),(function(e){l||(l=!0,r[s]={status:"rejected",reason:e},--a||i(r))}))})),--a||i(r)}));return o.error&&r(o.value),n.promise}});var ag=O,sg=Re,lg=ae,ug=Tp,cg=lp,hg=mf,fg="No one promise resolved";An({target:"Promise",stat:!0,forced:Iv},{any:function(e){var t=this,n=lg("AggregateError"),i=ug.f(t),r=i.resolve,o=i.reject,a=cg((function(){var i=sg(t.resolve),a=[],s=0,l=1,u=!1;hg(e,(function(e){var c=s++,h=!1;l++,ag(i,t,e).then((function(e){h||u||(u=!0,r(e))}),(function(e){h||u||(h=!0,a[c]=e,--l||o(new n(a,fg)))}))})),--l||o(new n(a,fg))}));return a.error&&o(a.value),i.promise}});var dg=An,pg=up,vg=o,gg=ae,yg=S,mg=rd,_g=Xv,kg=pg&&pg.prototype;dg({target:"Promise",proto:!0,real:!0,forced:!!pg&&vg((function(){kg.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=mg(this,gg("Promise")),n=yg(e);return this.then(n?function(n){return _g(t,e()).then((function(){return n}))}:e,n?function(n){return _g(t,e()).then((function(){throw n}))}:e)}});var bg=te.Promise,wg=Tp,Eg=lp;An({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=wg.f(this),n=Eg(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}});var Cg=bg,xg=n(Cg),Tg=An,Sg=Rn,Pg=g([].reverse),Ag=[1,2];Tg({target:"Array",proto:!0,forced:String(Ag)===String(Ag.reverse())},{reverse:function(){return Sg(this)&&(this.length=this.length),Pg(this)}});var Ig=Vc("Array").reverse,Rg=se,Og=Ig,Mg=Array.prototype,Lg=n((function(e){var t=e.reverse;return e===Mg||Rg(Mg,e)&&t===Mg.reverse?Og:t})),Dg=An,Ng=Rn,Fg=_i,Ug=ee,Hg=Ji,jg=jn,Bg=Z,zg=Wn,Vg=ft,Kg=Cs,Gg=Ii("slice"),Wg=Vg("species"),Yg=Array,Xg=Math.max;Dg({target:"Array",proto:!0,forced:!Gg},{slice:function(e,t){var n,i,r,o=Bg(this),a=jg(o),s=Hg(e,a),l=Hg(void 0===t?a:t,a);if(Ng(o)&&(n=o.constructor,(Fg(n)&&(n===Yg||Ng(n.prototype))||Ug(n)&&null===(n=n[Wg]))&&(n=void 0),n===Yg||void 0===n))return Kg(o,s,l);for(i=new(void 0===n?Yg:n)(Xg(l-s,0)),r=0;s<l;s++,r++)s in o&&zg(i,r,o[s]);return i.length=r,i}});var qg=Vc("Array").slice,$g=se,Zg=qg,Jg=Array.prototype,Qg=function(e){var t=e.slice;return e===Jg||$g(Jg,e)&&t===Jg.slice?Zg:t},ey=n(Qg);function ty(){ty=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,i=Ic||function(e,t,n){e[t]=n.value},r="function"==typeof nc?nc:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function l(e,t,n){return Ic(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(S){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof f?t:f,a=Oc(o.prototype),s=new C(r||[]);return i(a,"_invoke",{value:k(e,n,s)}),a}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(S){return{type:"throw",arg:S}}}e.wrap=u;var h={};function f(){}function d(){}function p(){}var v={};l(v,o,(function(){return this}));var g=Fc&&Fc(Fc(x([])));g&&g!==t&&n.call(g,o)&&(v=g);var y=p.prototype=f.prototype=Oc(v);function m(e){var t;Zc(t=["next","throw","return"]).call(t,(function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function r(i,o,a,s){var l=c(e[i],e,o);if("throw"!==l.type){var u=l.arg,h=u.value;return h&&"object"==wc(h)&&n.call(h,"__await")?t.resolve(h.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(h).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return o=o?o.then(i,i):i()}})}function k(e,t,n){var i="suspendedStart";return function(r,o){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===r)throw o;return{value:void 0,done:!0}}for(n.method=r,n.arg=o;;){var a=n.delegate;if(a){var s=b(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var l=c(e,t,n);if("normal"===l.type){if(i=n.done?"completed":"suspendedYield",l.arg===h)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i="completed",n.method="throw",n.arg=l.arg)}}}function b(e,t){var n=t.method,i=e.iterator[n];if(void 0===i)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var r=c(i,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,h;var o=r.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,h):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function w(e){var t,n={tryLoc:e[0]};1 in e&&(n.catchLoc=e[1]),2 in e&&(n.finallyLoc=e[2],n.afterLoc=e[3]),hh(t=this.tryEntries).call(t,n)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],Zc(e).call(e,w,this),this.reset(!0)}function x(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 i=-1,r=function t(){for(;++i<e.length;)if(n.call(e,i))return t.value=e[i],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:T}}function T(){return{value:void 0,done:!0}}return d.prototype=p,i(y,"constructor",{value:p,configurable:!0}),i(p,"constructor",{value:d,configurable:!0}),d.displayName=l(p,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return dh?dh(e,p):(e.__proto__=p,l(e,s,"GeneratorFunction")),e.prototype=Oc(y),e},e.awrap=function(e){return{__await:e}},m(_.prototype),l(_.prototype,a,(function(){return this})),e.AsyncIterator=_,e.async=function(t,n,i,r,o){void 0===o&&(o=xg);var a=new _(u(t,n,i,r),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},m(y),l(y,s,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var i in t)hh(n).call(n,i);return Lg(n).call(n),function e(){for(;n.length;){var i=n.pop();if(i in t)return e.value=i,e.done=!1,e}return e.done=!0,e}},e.values=x,C.prototype={constructor:C,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,Zc(t=this.tryEntries).call(t,E),!e)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+ey(i).call(i,1))&&(this[i]=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 i(n,i){return a.type="throw",a.arg=e,t.next=n,i&&(t.method="next",t.arg=void 0),!!i}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):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),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var r=i.arg;E(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:x(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},e}var ny=qe,iy=pr;An({target:"Object",stat:!0,forced:o((function(){iy(1)}))},{keys:function(e){return iy(ny(e))}});var ry=te.Object.keys,oy=n(ry),ay=te.Object.getOwnPropertySymbols,sy=n(ay),ly=ea.filter;An({target:"Array",proto:!0,forced:!Ii("filter")},{filter:function(e){return ly(this,e,arguments.length>1?arguments[1]:void 0)}});var uy=Vc("Array").filter,cy=se,hy=uy,fy=Array.prototype,dy=function(e){var t=e.filter;return e===fy||cy(fy,e)&&t===fy.filter?hy:t},py=n(dy),vy={exports:{}},gy=An,yy=o,my=Z,_y=P.f,ky=A;gy({target:"Object",stat:!0,forced:!ky||yy((function(){_y(1)})),sham:!ky},{getOwnPropertyDescriptor:function(e,t){return _y(my(e),t)}});var by=te.Object,wy=vy.exports=function(e,t){return by.getOwnPropertyDescriptor(e,t)};by.getOwnPropertyDescriptor.sham&&(wy.sham=!0);var Ey=vy.exports,Cy=n(Ey),xy=_h,Ty=Z,Sy=P,Py=Wn;An({target:"Object",stat:!0,sham:!A},{getOwnPropertyDescriptors:function(e){for(var t,n,i=Ty(e),r=Sy.f,o=xy(i),a={},s=0;o.length>s;)void 0!==(n=r(i,t=o[s++]))&&Py(a,t,n);return a}});var Ay=te.Object.getOwnPropertyDescriptors,Iy=n(Ay),Ry={exports:{}},Oy=An,My=A,Ly=Xi.f;Oy({target:"Object",stat:!0,forced:Object.defineProperties!==Ly,sham:!My},{defineProperties:Ly});var Dy=te.Object,Ny=Ry.exports=function(e,t){return Dy.defineProperties(e,t)};Dy.defineProperties.sham&&(Ny.sham=!0);var Fy=Ry.exports,Uy=n(Fy),Hy=ao.f("toPrimitive"),jy=n(Hy);function By(e){var t=function(e,t){if("object"!==wc(e)||null===e)return e;var n=e[jy];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==wc(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===wc(t)?t:String(t)}function zy(e,t,n){return(t=By(t))in e?Ic(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vy(e,t){var n=oy(e);if(sy){var i=sy(e);t&&(i=py(i).call(i,(function(t){return Cy(e,t).enumerable}))),hh(n).apply(n,i)}return n}function Ky(e){for(var t=1;t<arguments.length;t++){var n,i,r=null!=arguments[t]?arguments[t]:{};t%2?Zc(n=Vy(Object(r),!0)).call(n,(function(t){zy(e,t,r[t])})):Iy?Uy(e,Iy(r)):Zc(i=Vy(Object(r))).call(i,(function(t){Ic(e,t,Cy(r,t))}))}return e}function Gy(e,t,n,i,r,o,a){try{var s=e[o](a),l=s.value}catch(HN){return void n(HN)}s.done?t(l):xg.resolve(l).then(i,r)}function Wy(e){return function(){var t=this,n=arguments;return new xg((function(i,r){var o=e.apply(t,n);function a(e){Gy(o,i,r,a,s,"next",e)}function s(e){Gy(o,i,r,a,s,"throw",e)}a(void 0)}))}}var Yy=function(e){return e.H265="h265",e.H264="h264",e}(Yy||{}),Xy=function(e){return e.Software="software",e.Hardware="hardware",e}(Xy||{});An({target:"Array",stat:!0},{isArray:Rn});var qy=n(te.Array.isArray);function $y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var Zy=Wh,Jy=n(Zy),Qy=nn,em=rf,tm=$t,nm=O,im=qe,rm=function(e,t,n,i){try{return i?t(Qy(n)[0],n[1]):t(n)}catch(HN){em(e,"throw",HN)}},om=jh,am=_i,sm=jn,lm=Wn,um=Qh,cm=Wh,hm=Array,fm=function(e){var t=im(e),n=am(this),i=arguments.length,r=i>1?arguments[1]:void 0,o=void 0!==r;o&&(r=tm(r,i>2?arguments[2]:void 0));var a,s,l,u,c,h,f=cm(t),d=0;if(!f||this===hm&&om(f))for(a=sm(t),s=n?new this(a):hm(a);a>d;d++)h=o?r(t[d],d):t[d],lm(s,d,h);else for(c=(u=um(t,f)).next,s=n?new this:[];!(l=nm(c,u)).done;d++)h=o?rm(u,r,[l.value,d],!0):l.value,lm(s,d,h);return s.length=d,s},dm=fm;An({target:"Array",stat:!0,forced:!Pv((function(e){Array.from(e)}))},{from:dm});var pm=te.Array.from,vm=n(pm);function gm(e,t){var n;if(e){if("string"==typeof e)return $y(e,t);var i=ey(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?vm(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?$y(e,t):void 0}}function ym(e){return function(e){if(qy(e))return $y(e)}(e)||function(e){if(void 0!==nc&&null!=Jy(e)||null!=e["@@iterator"])return vm(e)}(e)||gm(e)||function(){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 mm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _m(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Ic(e,By(i.key),i)}}function km(e,t,n){return t&&_m(e.prototype,t),n&&_m(e,n),Ic(e,"prototype",{writable:!1}),e}var bm=An,wm=ir.indexOf,Em=Hc,Cm=E([].indexOf),xm=!!Cm&&1/Cm([1],1,-0)<0;bm({target:"Array",proto:!0,forced:xm||!Em("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return xm?Cm(this,e,t)||0:wm(this,e,t)}});var Tm=Vc("Array").indexOf,Sm=se,Pm=Tm,Am=Array.prototype,Im=function(e){var t=e.indexOf;return e===Am||Sm(Am,e)&&t===Am.indexOf?Pm:t},Rm=n(Im);function Om(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},o=oy(e);for(i=0;i<o.length;i++)n=o[i],Rm(t).call(t,n)>=0||(r[n]=e[n]);return r}(e,t);if(sy){var o=sy(e);for(i=0;i<o.length;i++)n=o[i],Rm(t).call(t,n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Mm=Vc("Array").concat,Lm=se,Dm=Mm,Nm=Array.prototype,Fm=n((function(e){var t=e.concat;return e===Nm||Lm(Nm,e)&&t===Nm.concat?Dm:t})),Um=An,Hm=ea.find,jm="find",Bm=!0;jm in[]&&Array(1)[jm]((function(){Bm=!1})),Um({target:"Array",proto:!0,forced:Bm},{find:function(e){return Hm(this,e,arguments.length>1?arguments[1]:void 0)}});var zm=Vc("Array").find,Vm=se,Km=zm,Gm=Array.prototype,Wm=n((function(e){var t=e.find;return e===Gm||Vm(Gm,e)&&t===Gm.find?Km:t})),Ym={exports:{}},Xm=o((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),qm=o,$m=ee,Zm=k,Jm=Xm,Qm=Object.isExtensible,e_=qm((function(){Qm(1)}))||Jm?function(e){return!!$m(e)&&((!Jm||"ArrayBuffer"!=Zm(e))&&(!Qm||Qm(e)))}:Qm,t_=!o((function(){return Object.isExtensible(Object.preventExtensions({}))})),n_=An,i_=g,r_=rr,o_=ee,a_=Je,s_=Zt.f,l_=jr,u_=Vr,c_=e_,h_=t_,f_=!1,d_=it("meta"),p_=0,v_=function(e){s_(e,d_,{value:{objectID:"O"+p_++,weakData:{}}})},g_=Ym.exports={enable:function(){g_.enable=function(){},f_=!0;var e=l_.f,t=i_([].splice),n={};n[d_]=1,e(n).length&&(l_.f=function(n){for(var i=e(n),r=0,o=i.length;r<o;r++)if(i[r]===d_){t(i,r,1);break}return i},n_({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:u_.f}))},fastKey:function(e,t){if(!o_(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a_(e,d_)){if(!c_(e))return"F";if(!t)return"E";v_(e)}return e[d_].objectID},getWeakData:function(e,t){if(!a_(e,d_)){if(!c_(e))return!0;if(!t)return!1;v_(e)}return e[d_].weakData},onFreeze:function(e){return h_&&f_&&c_(e)&&!a_(e,d_)&&v_(e),e}};r_[d_]=!0;var y_=Ym.exports,m_=An,__=r,k_=y_,b_=o,w_=yn,E_=mf,C_=qf,x_=S,T_=ee,S_=Io,P_=Zt.f,A_=ea.forEach,I_=A,R_=Wo.set,O_=Wo.getterFor,M_=io,L_=function(e,t,n){for(var i in t)n&&n.unsafe&&e[i]?e[i]=t[i]:M_(e,i,t[i],n);return e},D_=Hr,N_=oo,F_=L_,U_=$t,H_=qf,j_=G,B_=mf,z_=pu,V_=vu,K_=Wf,G_=A,W_=y_.fastKey,Y_=Wo.set,X_=Wo.getterFor,q_={getConstructor:function(e,t,n,i){var r=e((function(e,r){H_(e,o),Y_(e,{type:t,index:D_(null),first:void 0,last:void 0,size:0}),G_||(e.size=0),j_(r)||B_(r,e[i],{that:e,AS_ENTRIES:n})})),o=r.prototype,a=X_(t),s=function(e,t,n){var i,r,o=a(e),s=l(e,t);return s?s.value=n:(o.last=s={index:r=W_(t,!0),key:t,value:n,previous:i=o.last,next:void 0,removed:!1},o.first||(o.first=s),i&&(i.next=s),G_?o.size++:e.size++,"F"!==r&&(o.index[r]=s)),e},l=function(e,t){var n,i=a(e),r=W_(t);if("F"!==r)return i.index[r];for(n=i.first;n;n=n.next)if(n.key==t)return n};return F_(o,{clear:function(){for(var e=a(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,G_?e.size=0:this.size=0},delete:function(e){var t=this,n=a(t),i=l(t,e);if(i){var r=i.next,o=i.previous;delete n.index[i.index],i.removed=!0,o&&(o.next=r),r&&(r.previous=o),n.first==i&&(n.first=r),n.last==i&&(n.last=o),G_?n.size--:t.size--}return!!i},forEach:function(e){for(var t,n=a(this),i=U_(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(i(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!l(this,e)}}),F_(o,n?{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)}}),G_&&N_(o,"size",{configurable:!0,get:function(){return a(this).size}}),r},setStrong:function(e,t,n){var i=t+" Iterator",r=X_(t),o=X_(i);z_(e,t,(function(e,t){Y_(this,{type:i,target:e,state:r(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?V_("keys"==t?n.key:"values"==t?n.value:[n.key,n.value],!1):(e.target=void 0,V_(void 0,!0))}),n?"entries":"values",!n,!0),K_(t)}};(function(e,t,n){var i,r=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),a=r?"set":"add",s=__[e],l=s&&s.prototype,u={};if(I_&&x_(s)&&(o||l.forEach&&!b_((function(){(new s).entries().next()})))){var c=(i=t((function(t,n){R_(C_(t,c),{type:e,collection:new s}),null!=n&&E_(n,t[a],{that:t,AS_ENTRIES:r})}))).prototype,h=O_(e);A_(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in l)||o&&"clear"==e||w_(c,e,(function(n,i){var r=h(this).collection;if(!t&&o&&!T_(n))return"get"==e&&void 0;var a=r[e](0===n?0:n,i);return t?this:a}))})),o||P_(c,"size",{configurable:!0,get:function(){return h(this).collection.size}})}else i=n.getConstructor(t,e,r,a),k_.enable();S_(i,e,!1,!0),u[e]=i,m_({global:!0,forced:!0},u),o||n.setStrong(i,e,r)})("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),q_);var $_=te.Map,Z_=$t,J_=O,Q_=Re,ek=Qf,tk=G,nk=mf,ik=[].push,rk=function(e){var t,n,i,r,o=arguments.length,a=o>1?arguments[1]:void 0;return ek(this),(t=void 0!==a)&&Q_(a),tk(e)?new this:(n=[],t?(i=0,r=Z_(a,o>2?arguments[2]:void 0),nk(e,(function(e){J_(ik,n,r(e,i++))}))):nk(e,ik,{that:n}),new this(n))};An({target:"Map",stat:!0,forced:!0},{from:rk});var ok=Cs,ak=function(){return new this(ok(arguments))};An({target:"Map",stat:!0,forced:!0},{of:ak});var sk=Se,lk=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(sk(e)+" is not a map")},uk=function(e,t){return 1==t?function(t,n){return t[e](n)}:function(t,n,i){return t[e](n,i)}},ck=ae("Map"),hk={Map:ck,set:uk("set",2),get:uk("get",1),has:uk("has",1),remove:uk("delete",1),proto:ck.prototype},fk=lk,dk=hk.remove;An({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=fk(this),n=!0,i=0,r=arguments.length;i<r;i++)e=dk(t,arguments[i]),n=n&&e;return!!n}});var pk=lk,vk=hk.get,gk=hk.has,yk=hk.set;An({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var n,i,r=pk(this);return gk(r,e)?(n=vk(r,e),"update"in t&&(n=t.update(n,e,r),yk(r,e,n)),n):(i=t.insert(e,r),yk(r,e,i),i)}});var mk=O,_k=function(e,t,n){for(var i,r,o=n||e.next;!(i=mk(o,e)).done;)if(void 0!==(r=t(i.value)))return r},kk=function(e,t,n){return n?_k(e.entries(),(function(e){return t(e[1],e[0])})):e.forEach(t)},bk=$t,wk=lk,Ek=kk;An({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=wk(this),n=bk(e,arguments.length>1?arguments[1]:void 0);return!1!==Ek(t,(function(e,i){if(!n(e,i,t))return!1}),!0)}});var Ck=$t,xk=lk,Tk=kk,Sk=hk.Map,Pk=hk.set;An({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=xk(this),n=Ck(e,arguments.length>1?arguments[1]:void 0),i=new Sk;return Tk(t,(function(e,r){n(e,r,t)&&Pk(i,r,e)})),i}});var Ak=$t,Ik=lk,Rk=kk;An({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=Ik(this),n=Ak(e,arguments.length>1?arguments[1]:void 0),i=Rk(t,(function(e,i){if(n(e,i,t))return{value:e}}),!0);return i&&i.value}});var Ok=$t,Mk=lk,Lk=kk;An({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=Mk(this),n=Ok(e,arguments.length>1?arguments[1]:void 0),i=Lk(t,(function(e,i){if(n(e,i,t))return{key:i}}),!0);return i&&i.key}});var Dk=An,Nk=O,Fk=S,Uk=Re,Hk=mf,jk=hk.Map,Bk=g([].push);Dk({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){var n=new(Fk(this)?this:jk);Uk(t);var i=Uk(n.has),r=Uk(n.get),o=Uk(n.set);return Hk(e,(function(e){var a=t(e);Nk(i,n,a)?Bk(Nk(r,n,a),e):Nk(o,n,a,[e])})),n}});var zk=function(e,t){return e===t||e!=e&&t!=t},Vk=lk,Kk=kk;An({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===Kk(Vk(this),(function(t){if(zk(t,e))return!0}),!0)}});var Gk=O,Wk=mf,Yk=S,Xk=Re,qk=hk.Map;An({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var n=new(Yk(this)?this:qk);Xk(t);var i=Xk(n.set);return Wk(e,(function(e){Gk(i,n,t(e),e)})),n}});var $k=lk,Zk=kk;An({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=Zk($k(this),(function(t,n){if(t===e)return{key:n}}),!0);return t&&t.key}});var Jk=$t,Qk=lk,eb=kk,tb=hk.Map,nb=hk.set;An({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=Qk(this),n=Jk(e,arguments.length>1?arguments[1]:void 0),i=new tb;return eb(t,(function(e,r){nb(i,n(e,r,t),e)})),i}});var ib=$t,rb=lk,ob=kk,ab=hk.Map,sb=hk.set;An({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=rb(this),n=ib(e,arguments.length>1?arguments[1]:void 0),i=new ab;return ob(t,(function(e,r){sb(i,r,n(e,r,t))})),i}});var lb=lk,ub=mf,cb=hk.set;An({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=lb(this),n=arguments.length,i=0;i<n;)ub(arguments[i++],(function(e,n){cb(t,e,n)}),{AS_ENTRIES:!0});return t}});var hb=Re,fb=lk,db=kk,pb=TypeError;An({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=fb(this),n=arguments.length<2,i=n?void 0:arguments[1];if(hb(e),db(t,(function(r,o){n?(n=!1,i=r):i=e(i,r,o,t)})),n)throw pb("Reduce of empty map with no initial value");return i}});var vb=$t,gb=lk,yb=kk;An({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=gb(this),n=vb(e,arguments.length>1?arguments[1]:void 0);return!0===yb(t,(function(e,i){if(n(e,i,t))return!0}),!0)}});var mb=Re,_b=lk,kb=TypeError,bb=hk.get,wb=hk.has,Eb=hk.set;An({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var n=_b(this),i=arguments.length;mb(t);var r=wb(n,e);if(!r&&i<3)throw kb("Updating absent value");var o=r?bb(n,e):mb(i>2?arguments[2]:void 0)(e,n);return Eb(n,e,t(o,e,n)),n}});var Cb=O,xb=Re,Tb=S,Sb=nn,Pb=TypeError,Ab=function(e,t){var n,i=Sb(this),r=xb(i.get),o=xb(i.has),a=xb(i.set),s=arguments.length>2?arguments[2]:void 0;if(!Tb(t)&&!Tb(s))throw Pb("At least one callback required");return Cb(o,i,e)?(n=Cb(r,i,e),Tb(t)&&(n=t(n),Cb(a,i,e,n))):Tb(s)&&(n=s(),Cb(a,i,e,n)),n};An({target:"Map",proto:!0,real:!0,forced:!0},{upsert:Ab}),An({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:Ab});var Ib=$_,Rb=n(Ib),Ob=n(Ib),Mb=ea.map;An({target:"Array",proto:!0,forced:!Ii("map")},{map:function(e){return Mb(this,e,arguments.length>1?arguments[1]:void 0)}});var Lb=Vc("Array").map,Db=se,Nb=Lb,Fb=Array.prototype,Ub=n((function(e){var t=e.map;return e===Fb||Db(Fb,e)&&t===Fb.map?Nb:t})),Hb=n(Cg),jb=n(dy),Bb=ir.includes;An({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(e){return Bb(this,e,arguments.length>1?arguments[1]:void 0)}});var zb=Vc("Array").includes,Vb=ee,Kb=k,Gb=ft("match"),Wb=function(e){var t;return Vb(e)&&(void 0!==(t=e[Gb])?!!t:"RegExp"==Kb(e))},Yb=TypeError,Xb=function(e){if(Wb(e))throw Yb("The method doesn't accept regular expressions");return e},qb=ft("match"),$b=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[qb]=!1,"/./"[e](t)}catch(HN){}}return!1},Zb=An,Jb=Xb,Qb=X,ew=Yi,tw=$b,nw=g("".indexOf);Zb({target:"String",proto:!0,forced:!tw("includes")},{includes:function(e){return!!~nw(ew(Qb(this)),ew(Jb(e)),arguments.length>1?arguments[1]:void 0)}});var iw=Vc("String").includes,rw=se,ow=zb,aw=iw,sw=Array.prototype,lw=String.prototype,uw=n((function(e){var t=e.includes;return e===sw||rw(sw,e)&&t===sw.includes?ow:"string"==typeof e||e===lw||rw(lw,e)&&t===lw.includes?aw:t})),cw=n(Im),hw=n(ry),fw=n(Qg),dw=Se,pw=TypeError,vw=function(e,t){if(!delete e[t])throw pw("Cannot delete property "+dw(t)+" of "+dw(e))},gw=An,yw=qe,mw=Ji,_w=Dn,kw=jn,bw=nh,ww=zn,Ew=Ti,Cw=Wn,xw=vw,Tw=Ii("splice"),Sw=Math.max,Pw=Math.min;gw({target:"Array",proto:!0,forced:!Tw},{splice:function(e,t){var n,i,r,o,a,s,l=yw(this),u=kw(l),c=mw(e,u),h=arguments.length;for(0===h?n=i=0:1===h?(n=0,i=u-c):(n=h-2,i=Pw(Sw(_w(t),0),u-c)),ww(u+n-i),r=Ew(l,i),o=0;o<i;o++)(a=c+o)in l&&Cw(r,o,l[a]);if(r.length=i,n<i){for(o=c;o<u-i;o++)s=o+n,(a=o+i)in l?l[s]=l[a]:xw(l,s);for(o=u;o>u-i+n;o--)xw(l,o-1)}else if(n>i)for(o=u-i;o>c;o--)s=o+n-1,(a=o+i-1)in l?l[s]=l[a]:xw(l,s);for(o=0;o<n;o++)l[o+c]=arguments[o+2];return bw(l,u-i+n),r}});var Aw=Vc("Array").splice,Iw=se,Rw=Aw,Ow=Array.prototype,Mw=n((function(e){var t=e.splice;return e===Ow||Iw(Ow,e)&&t===Ow.splice?Rw:t}));An({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var Lw=n(te.Number.isNaN),Dw="\t\n\v\f\r                 \u2028\u2029\ufeff",Nw=X,Fw=Yi,Uw=Dw,Hw=g("".replace),jw=RegExp("^["+Uw+"]+"),Bw=RegExp("(^|[^"+Uw+"])["+Uw+"]+$"),zw=function(e){return function(t){var n=Fw(Nw(t));return 1&e&&(n=Hw(n,jw,"")),2&e&&(n=Hw(n,Bw,"$1")),n}},Vw={start:zw(1),end:zw(2),trim:zw(3)},Kw=r,Gw=o,Ww=g,Yw=Yi,Xw=Vw.trim,qw=Dw,$w=Kw.parseInt,Zw=Kw.Symbol,Jw=Zw&&Zw.iterator,Qw=/^[+-]?0x/i,eE=Ww(Qw.exec),tE=8!==$w(qw+"08")||22!==$w(qw+"0x16")||Jw&&!Gw((function(){$w(Object(Jw))}))?function(e,t){var n=Xw(Yw(e));return $w(n,t>>>0||(eE(Qw,n)?16:10))}:$w;An({global:!0,forced:parseInt!=tE},{parseInt:tE});var nE=n(te.parseInt),iE=Vc("Array").keys,rE=ti,oE=Je,aE=se,sE=iE,lE=Array.prototype,uE={DOMTokenList:!0,NodeList:!0},cE=n((function(e){var t=e.keys;return e===lE||aE(lE,e)&&t===lE.keys||oE(uE,rE(e))?sE:t})),hE=A,fE=g,dE=O,pE=o,vE=pr,gE=to,yE=M,mE=qe,_E=K,kE=Object.assign,bE=Object.defineProperty,wE=fE([].concat),EE=!kE||pE((function(){if(hE&&1!==kE({b:1},kE(bE({},"a",{enumerable:!0,get:function(){bE(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach((function(e){t[e]=e})),7!=kE({},e)[n]||vE(kE({},t)).join("")!=i}))?function(e,t){for(var n=mE(e),i=arguments.length,r=1,o=gE.f,a=yE.f;i>r;)for(var s,l=_E(arguments[r++]),u=o?wE(vE(l),o(l)):vE(l),c=u.length,h=0;c>h;)s=u[h++],hE&&!dE(a,l,s)||(n[s]=l[s]);return n}:kE,CE=EE;An({target:"Object",stat:!0,arity:2,forced:Object.assign!==CE},{assign:CE});var xE=n(te.Object.assign),TE=n(ay),SE=n(Ey),PE=n(Ay),AE=n(Fy),IE=n(Ac),RE=n(tc),OE=n(kc),ME=n(fh),LE=n(Nc),DE=g,NE=Re,FE=ee,UE=Je,HE=Cs,jE=a,BE=Function,zE=DE([].concat),VE=DE([].join),KE={},GE=jE?BE.bind:function(e){var t=NE(this),n=t.prototype,i=HE(arguments,1),r=function(){var n=zE(i,HE(arguments));return this instanceof r?function(e,t,n){if(!UE(KE,t)){for(var i=[],r=0;r<t;r++)i[r]="a["+r+"]";KE[t]=BE("C,a","return new C("+VE(i,",")+")")}return KE[t](e,n)}(t,n.length,n):t.apply(e,n)};return FE(n)&&(r.prototype=n),r},WE=An,YE=h,XE=GE,qE=Qf,$E=nn,ZE=ee,JE=Hr,QE=o,eC=ae("Reflect","construct"),tC=Object.prototype,nC=[].push,iC=QE((function(){function e(){}return!(eC((function(){}),[],e)instanceof e)})),rC=!QE((function(){eC((function(){}))})),oC=iC||rC;WE({target:"Reflect",stat:!0,forced:oC,sham:oC},{construct:function(e,t){qE(e),$E(t);var n=arguments.length<3?e:qE(arguments[2]);if(rC&&!iC)return eC(e,t,n);if(e==n){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 i=[null];return YE(nC,i,t),new(YE(XE,e,i))}var r=n.prototype,o=JE(ZE(r)?r:tC),a=YE(e,o,t);return ZE(a)?a:o}});var aC=te.Reflect.construct,sC=n(aC),lC=n(aC),uC=Je,cC=O,hC=ee,fC=nn,dC=function(e){return void 0!==e&&(uC(e,"value")||uC(e,"writable"))},pC=P,vC=xl;An({target:"Reflect",stat:!0},{get:function e(t,n){var i,r,o=arguments.length<3?t:arguments[2];return fC(t)===o?t[n]:(i=pC.f(t,n))?dC(i)?i.value:void 0===i.get?void 0:cC(i.get,o):hC(r=vC(t))?e(r,n,o):void 0}});var gC=te.Reflect.get,yC=n(gC),mC=n(gC),_C=n(Zy),kC=n(pm),bC=n(Hy);function wC(e,t){var n=hw(e);if(TE){var i=TE(e);t&&(i=jb(i).call(i,(function(t){return SE(e,t).enumerable}))),n.push.apply(n,i)}return n}function EC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wC(Object(n),!0).forEach((function(t){PC(e,t,n[t])})):PE?AE(e,PE(n)):wC(Object(n)).forEach((function(t){IE(e,t,SE(n,t))}))}return e}function CC(e){return(CC="function"==typeof RE&&"symbol"==typeof OE?function(e){return typeof e}:function(e){return e&&"function"==typeof RE&&e.constructor===RE&&e!==RE.prototype?"symbol":typeof e})(e)}function xC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TC(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),IE(e,UC(i.key),i)}}function SC(e,t,n){return t&&TC(e.prototype,t),n&&TC(e,n),IE(e,"prototype",{writable:!1}),e}function PC(e,t,n){return(t=UC(t))in e?IE(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AC(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}}),IE(e,"prototype",{writable:!1}),t&&RC(e,t)}function IC(e){return(IC=ME?LE.bind():function(e){return e.__proto__||LE(e)})(e)}function RC(e,t){return(RC=ME?ME.bind():function(e,t){return e.__proto__=t,e})(e,t)}function OC(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function MC(e,t){if(t&&("object"===wc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return OC(e)}function LC(e){var t=function(){if("undefined"==typeof Reflect||!lC)return!1;if(lC.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(lC(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=IC(e);if(t){var r=IC(this).constructor;n=lC(i,arguments,r)}else n=i.apply(this,arguments);return MC(this,n)}}function DC(){return DC="undefined"!=typeof Reflect&&mC?mC.bind():function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=IC(e)););return e}(e,t);if(i){var r=SE(i,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},DC.apply(this,arguments)}function NC(e){return function(e){if(Array.isArray(e))return FC(e)}(e)||function(e){if(void 0!==RE&&null!=_C(e)||null!=e["@@iterator"])return kC(e)}(e)||function(e,t){var n;if(!e)return;if("string"==typeof e)return FC(e,t);var i=fw(n=Object.prototype.toString.call(e)).call(n,8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return kC(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return FC(e,t)}(e)||function(){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 FC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function UC(e){var t=function(e,t){if("object"!==wc(e)||null===e)return e;var n=e[bC];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==wc(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===wc(t)?t:String(t)}var HC={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function i(){}function r(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,i,o,a){if("function"!=typeof i)throw new TypeError("The listener must be a function");var s=new r(i,o||e,a),l=n?n+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 i:delete e._events[t]}function s(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,i,r=[];if(0===this._eventsCount)return r;for(i in e=this._events)t.call(e,i)&&r.push(n?fw(i).call(i,1):i);return TE?Fm(r).call(r,TE(e)):r},s.prototype.listeners=function(e){var t=n?n+e:e,i=this._events[t];if(!i)return[];if(i.fn)return[i.fn];for(var r=0,o=i.length,a=new Array(o);r<o;r++)a[r]=i[r].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,i=this._events[t];return i?i.fn?1:i.length:0},s.prototype.emit=function(e,t,i,r,o,a){var s=n?n+e:e;if(!this._events[s])return!1;var l,u,c=this._events[s],h=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),h){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,i),!0;case 4:return c.fn.call(c.context,t,i,r),!0;case 5:return c.fn.call(c.context,t,i,r,o),!0;case 6:return c.fn.call(c.context,t,i,r,o,a),!0}for(u=1,l=new Array(h-1);u<h;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var f,d=c.length;for(u=0;u<d;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),h){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,i);break;case 4:c[u].fn.call(c[u].context,t,i,r);break;default:if(!l)for(f=1,l=new Array(h-1);f<h;f++)l[f-1]=arguments[f];c[u].fn.apply(c[u].context,l)}}return!0},s.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,i,r){var o=n?n+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||r&&!s.once||i&&s.context!==i||a(this,o);else{for(var l=0,u=[],c=s.length;l<c;l++)(s[l].fn!==t||r&&!s[l].once||i&&s[l].context!==i)&&u.push(s[l]);u.length?this._events[o]=1===u.length?u[0]:u:a(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new i,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}(HC);var jC=HC.exports,BC=n(jC),zC=Dn,VC=Yi,KC=X,GC=RangeError,WC=function(e){var t=VC(KC(this)),n="",i=zC(e);if(i<0||i==1/0)throw GC("Wrong number of repetitions");for(;i>0;(i>>>=1)&&(t+=t))1&i&&(n+=t);return n},YC=g,XC=Un,qC=Yi,$C=X,ZC=YC(WC),JC=YC("".slice),QC=Math.ceil,ex=function(e){return function(t,n,i){var r,o,a=qC($C(t)),s=XC(n),l=a.length,u=void 0===i?" ":qC(i);return s<=l||""==u?a:((o=ZC(u,QC((r=s-l)/u.length))).length>r&&(o=JC(o,0,r)),e?a+o:o+a)}},tx={start:ex(!1),end:ex(!0)},nx=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(le),ix=tx.start;An({target:"String",proto:!0,forced:nx},{padStart:function(e){return ix(this,e,arguments.length>1?arguments[1]:void 0)}});var rx=Vc("String").padStart,ox=se,ax=rx,sx=String.prototype,lx=n((function(e){var t=e.padStart;return"string"==typeof e||e===sx||ox(sx,e)&&t===sx.padStart?ax:t})),ux=r,cx=o,hx=Yi,fx=Vw.trim,dx=Dw,px=g("".charAt),vx=ux.parseFloat,gx=ux.Symbol,yx=gx&&gx.iterator,mx=1/vx(dx+"-0")!=-1/0||yx&&!cx((function(){vx(Object(yx))}))?function(e){var t=fx(hx(e)),n=vx(t);return 0===n&&"-"==px(t,0)?-0:n}:vx;An({global:!0,forced:parseFloat!=mx},{parseFloat:mx});var _x=n(te.parseFloat),kx=gl.PROPER,bx=o,wx=Dw,Ex=Vw.trim;An({target:"String",proto:!0,forced:function(e){return bx((function(){return!!wx[e]()||"​…᠎"!=="​…᠎"[e]()||kx&&wx[e].name!==e}))}("trim")},{trim:function(){return Ex(this)}});var Cx=Vc("String").trim,xx=se,Tx=Cx,Sx=String.prototype,Px=n((function(e){var t=e.trim;return"string"==typeof e||e===Sx||xx(Sx,e)&&t===Sx.trim?Tx:t})),Ax=qr,Ix=Math.floor,Rx=function(e,t){var n=e.length,i=Ix(n/2);return n<8?Ox(e,t):Mx(e,Rx(Ax(e,0,i),t),Rx(Ax(e,i),t),t)},Ox=function(e,t){for(var n,i,r=e.length,o=1;o<r;){for(i=o,n=e[o];i&&t(e[i-1],n)>0;)e[i]=e[--i];i!==o++&&(e[i]=n)}return e},Mx=function(e,t,n,i){for(var r=t.length,o=n.length,a=0,s=0;a<r||s<o;)e[a+s]=a<r&&s<o?i(t[a],n[s])<=0?t[a++]:n[s++]:a<r?t[a++]:n[s++];return e},Lx=Rx,Dx=le.match(/firefox\/(\d+)/i),Nx=!!Dx&&+Dx[1],Fx=/MSIE|Trident/.test(le),Ux=le.match(/AppleWebKit\/(\d+)\./),Hx=!!Ux&&+Ux[1],jx=An,Bx=g,zx=Re,Vx=qe,Kx=jn,Gx=vw,Wx=Yi,Yx=o,Xx=Lx,qx=Hc,$x=Nx,Zx=Fx,Jx=ve,Qx=Hx,eT=[],tT=Bx(eT.sort),nT=Bx(eT.push),iT=Yx((function(){eT.sort(void 0)})),rT=Yx((function(){eT.sort(null)})),oT=qx("sort"),aT=!Yx((function(){if(Jx)return Jx<70;if(!($x&&$x>3)){if(Zx)return!0;if(Qx)return Qx<603;var e,t,n,i,r="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(i=0;i<47;i++)eT.push({k:t+i,v:n})}for(eT.sort((function(e,t){return t.v-e.v})),i=0;i<eT.length;i++)t=eT[i].k.charAt(0),r.charAt(r.length-1)!==t&&(r+=t);return"DGBEFHACIJK"!==r}}));jx({target:"Array",proto:!0,forced:iT||!rT||!oT||!aT},{sort:function(e){void 0!==e&&zx(e);var t=Vx(this);if(aT)return void 0===e?tT(t):tT(t,e);var n,i,r=[],o=Kx(t);for(i=0;i<o;i++)i in t&&nT(r,t[i]);for(Xx(r,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:Wx(t)>Wx(n)?1:-1}}(e)),n=Kx(r),i=0;i<n;)t[i]=r[i++];for(;i<o;)Gx(t,i++);return t}});var sT,lT=Vc("Array").sort,uT=se,cT=lT,hT=Array.prototype,fT=n((function(e){var t=e.sort;return e===hT||uT(hT,e)&&t===hT.sort?cT:t})),dT="undefined"!=typeof window&&window.location&&cw(sT=window.location.href).call(sT,"xgplayerdebugger=1")>-1,pT="color: #525252; background-color: #90ee90;",vT="color: #525252; background-color: red;",gT="color: #525252; background-color: yellow; ",yT="%c[xgplayer]",mT={config:{debug:dT?3:0},logInfo:function(e){for(var t,n,i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];this.config.debug>=3&&(n=console).log.apply(n,Fm(t=[yT,pT,e]).call(t,r))},logWarn:function(e){for(var t,n,i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];this.config.debug>=1&&(n=console).warn.apply(n,Fm(t=[yT,gT,e]).call(t,r))},logError:function(e){var t,n;if(!(this.config.debug<1)){for(var i=this.config.debug>=2?"trace":"error",r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];(n=console)[i].apply(n,Fm(t=[yT,vT,e]).call(t,o))}}};var _T=function(){function e(t){xC(this,e),this.bufferedList=t}return SC(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}(),kT={};function bT(e){var t=CC(e);return null!==e&&("object"===t||"function"===t)}function wT(e,t,n){var i,r,o,a,s,l,u=0,c=!1,h=!1,f=!0,d=!t&&0!==t&&"function"==typeof window.requestAnimationFrame;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=i,o=r;return i=r=void 0,u=t,a=e.apply(o,n)}function v(e,t){return d?(window.cancelAnimationFrame(s),window.requestAnimationFrame(e)):setTimeout(e,t)}function g(e){var n=e-l;return void 0===l||n>=t||n<0||h&&e-u>=o}function y(){var e=Date.now();if(g(e))return m(e);s=v(y,function(e){var n=e-u,i=t-(e-l);return h?Math.min(i,o-n):i}(e))}function m(e){return s=void 0,f&&i?p(e):(i=r=void 0,a)}function _(){for(var e=Date.now(),n=g(e),o=arguments.length,f=new Array(o),d=0;d<o;d++)f[d]=arguments[d];if(i=f,r=this,l=e,n){if(void 0===s)return function(e){return u=e,s=v(y,t),c?p(e):a}(l);if(h)return s=v(y,t),p(l)}return void 0===s&&(s=v(y,t)),a}return t=+t||0,bT(n)&&(c=!!n.leading,o=(h="maxWait"in n)?Math.max(+n.maxWait||0,t):o,f="trailing"in n?!!n.trailing:f),_.cancel=function(){void 0!==s&&function(e){if(d)return window.cancelAnimationFrame(e);clearTimeout(e)}(s),u=0,i=l=r=s=void 0},_.flush=function(){return void 0===s?a:m(Date.now())},_.pending=function(){return void 0!==s},_}function ET(){var e=(document.documentElement.getAttribute("lang")||navigator.language||"zh-cn").toLocaleLowerCase();return"zh-cn"===e&&(e="zh"),e}kT.createDom=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=document.createElement(e);return r.className=i,r.innerHTML=t,hw(n).forEach((function(t){var i=t,o=n[t];"video"===e||"audio"===e||"live-video"===e?o&&r.setAttribute(i,o):r.setAttribute(i,o)})),r},kT.createDomFromHtml=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";try{var i=document.createElement("div");i.innerHTML=e;var r=i.children;return i=null,r.length>0?(r=r[0],n&&kT.addClass(r,n),t&&hw(t).forEach((function(e){r.setAttribute(e,t[e])})),r):null}catch(o){return mT.logError("util.createDomFromHtml",o),null}},kT.hasClass=function(e,t){if(!e||!t)return!1;try{return Array.prototype.some.call(e.classList,(function(e){return e===t}))}catch(i){var n=e.className&&"object"===CC(e.className)?e.getAttribute("class"):e.className;return n&&!!n.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}},kT.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(n){kT.hasClass(e,t)||(e.className&&"object"===CC(e.className)?e.setAttribute("class",e.getAttribute("class")+" "+t):e.className+=" "+t)}},kT.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(n){kT.hasClass(e,t)&&t.split(/\s+/g).forEach((function(t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className&&"object"===CC(e.className)?e.setAttribute("class",e.getAttribute("class").replace(n," ")):e.className=e.className.replace(n," ")}))}},kT.toggleClass=function(e,t){e&&t.split(/\s+/g).forEach((function(t){kT.hasClass(e,t)?kT.removeClass(e,t):kT.addClass(e,t)}))},kT.classNames=function(){for(var e=arguments,t=[],n=function(n){if("String"===kT.typeOf(e[n]))t.push(e[n]);else if("Object"===kT.typeOf(e[n])){var i;Ub(i=hw(e[n])).call(i,(function(i){e[n][i]&&t.push(i)}))}},i=0;i<arguments.length;i++)n(i);return t.join(" ")},kT.findDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1?arguments[1]:void 0;try{e=t.querySelector(n)}catch(i){mT.logError("util.findDom",i),0===cw(n).call(n,"#")&&(e=t.getElementById(fw(n).call(n,1)))}return e},kT.getCss=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,!1)[t]},kT.padStart=function(e,t,n){for(var i=String(n),r=t>>0,o=Math.ceil(r/i.length),a=[],s=String(e);o--;)a.push(i);return a.join("").substring(0,r-s.length)+s},kT.format=function(e){if(window.isNaN(e))return"";e=Math.round(e);var t=lx(kT).call(kT,Math.floor(e/3600),2,0),n=lx(kT).call(kT,Math.floor((e-3600*t)/60),2,0),i=lx(kT).call(kT,Math.floor(e-3600*t-60*n),2,0);return("00"===t?[n,i]:[t,n,i]).join(":")},kT.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},kT.typeOf=function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},kT.deepCopy=function(e,t){if("Object"===kT.typeOf(t)&&"Object"===kT.typeOf(e))return hw(t).forEach((function(n){if("Object"!==kT.typeOf(t[n])||t[n]instanceof Node)if("Array"===kT.typeOf(t[n])){var i;e[n]="Array"===kT.typeOf(e[n])?Fm(i=e[n]).call(i,t[n]):t[n]}else e[n]=t[n];else void 0===e[n]||void 0===e[n]?e[n]=t[n]:kT.deepCopy(e[n],t[n])})),e},kT.deepMerge=function(e,t){var n;return Ub(n=hw(t)).call(n,(function(n){var i;"Array"===kT.typeOf(t[n])&&"Array"===kT.typeOf(e[n])?"Array"===kT.typeOf(e[n])&&(i=e[n]).push.apply(i,NC(t[n])):kT.typeOf(e[n])!==kT.typeOf(t[n])||null===e[n]||"Object"!==kT.typeOf(e[n])||t[n]instanceof window.Node?null!==t[n]&&(e[n]=t[n]):kT.deepMerge(e[n],t[n])})),e},kT.getBgImage=function(e){var t=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;if(!t||"none"===t)return"";var n=document.createElement("a");return n.href=t.replace(/url\("|"\)/g,""),n.href},kT.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""},kT.setInterval=function(e,t,n,i){e._interval[t]||(e._interval[t]=window.setInterval(n.bind(e),i))},kT.clearInterval=function(e,t){clearInterval(e._interval[t]),e._interval[t]=null},kT.setTimeout=function(e,t,n){e._timers||(e._timers=[]);var i=setTimeout((function(){t(),kT.clearTimeout(e,i)}),n);return e._timers.push(i),i},kT.clearTimeout=function(e,t){var n=e._timers;if("Array"===kT.typeOf(n)){for(var i=0;i<n.length;i++)if(n[i]===t){Mw(n).call(n,i,1),clearTimeout(t);break}}else clearTimeout(t)},kT.clearAllTimers=function(e){var t=e._timers;"Array"===kT.typeOf(t)&&(Ub(t).call(t,(function(e){clearTimeout(e)})),e._timerIds=[])},kT.createImgBtn=function(e,t,n,i){var r,o,a,s,l,u,c,h,f,d,p,v=kT.createDom("xg-".concat(e),"",{},"xgplayer-".concat(e,"-img"));(v.style.backgroundImage='url("'.concat(t,'")'),n&&i)&&(["px","rem","em","pt","dp","vw","vh","vm","%"].every((function(e){var t,r;return!(cw(n).call(n,e)>-1&&cw(i).call(i,e)>-1)||(u=_x(Px(t=fw(n).call(n,0,cw(n).call(n,e))).call(t)),c=_x(Px(r=fw(i).call(i,0,cw(i).call(i,e))).call(r)),h=e,!1)})),v.style.width=Fm(r="".concat(u)).call(r,h),v.style.height=Fm(o="".concat(c)).call(o,h),v.style.backgroundSize=Fm(a=Fm(s=Fm(l="".concat(u)).call(l,h," ")).call(s,c)).call(a,h),v.style.margin="start"===e?Fm(f=Fm(d=Fm(p="-".concat(c/2)).call(p,h," auto auto -")).call(d,u/2)).call(f,h):"auto 5px auto 5px");return v},kT.Hex2RGBA=function(e,t){var n,i=[];if(/^\#[0-9A-F]{3}$/i.test(e)){var r="#";e.replace(/[0-9A-F]/gi,(function(e){r+=e+e})),e=r}return/^#[0-9A-F]{6}$/i.test(e)?(e.replace(/[0-9A-F]{2}/gi,(function(e){i.push(nE(e,16))})),Fm(n="rgba(".concat(i.join(","),", ")).call(n,t,")")):"rgba(255, 255, 255, 0.1)"},kT.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},kT.checkIsFunction=function(e){return e&&"function"==typeof e},kT.checkIsObject=function(e){return null!==e&&"object"===CC(e)},kT.hide=function(e){e.style.display="none"},kT.show=function(e,t){e.style.display=t||"block"},kT.isUndefined=function(e){if(null==e)return!0},kT.isNotNull=function(e){return!(null==e)},kT.setStyleFromCsstext=function(e,t){if(t)if("String"===kT.typeOf(t)){var n=t.replace(/\s+/g,"").split(";");Ub(n).call(n,(function(t){if(t){var n=t.split(":");n.length>1&&(e.style[n[0]]=n[1])}}))}else{var i;Ub(i=hw(t)).call(i,(function(n){e.style[n]=t[n]}))}},kT.filterStyleFromText=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["width","height","top","left","bottom","right","position","z-index","padding","margin","transform"],i=e.style.cssText;if(!i)return{};var r=i.replace(/\s+/g,"").split(";"),o={},a={};return Ub(r).call(r,(function(e){if(e){var t=e.split(":");t.length>1&&(!function(e,t){for(var n=0,i=t.length;n<i;n++)if(cw(e).call(e,t[n])>-1)return!0;return!1}(t[0],n)?a[t[0]]=t[1]:o[t[0]]=t[1])}})),e.setAttribute("style",""),Ub(t=hw(a)).call(t,(function(t){e.style[t]=a[t]})),o},kT.getStyleFromCsstext=function(e){var t=e.style.cssText;if(!t)return{};var n=t.replace(/\s+/g,"").split(";"),i={};return Ub(n).call(n,(function(e){if(e){var t=e.split(":");t.length>1&&(i[t[0]]=t[1])}})),i},kT.preloadImg=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(e){var i=new window.Image;i.onload=function(e){i=null,t&&t(e)},i.onerror=function(e){i=null,n&&n(e)},i.src=e}},kT.stopPropagation=function(e){e&&e.stopPropagation()},kT.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},kT.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},kT.checkTouchSupport=function(){return"ontouchstart"in window},kT.getBuffered2=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,n=[],i=0;i<e.length;i++)n.push({start:e.start(i)<.5?0:e.start(i),end:e.end(i)});fT(n).call(n,(function(e,t){var n=e.start-t.start;return n||t.end-e.end}));var r=[];if(t)for(var o=0;o<n.length;o++){var a=r.length;if(a){var s=r[a-1].end;n[o].start-s<t?n[o].end>s&&(r[a-1].end=n[o].end):r.push(n[o])}else r.push(n[o])}else r=n;return new _T(r)},kT.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}},kT.requestAnimationFrame=function(e){var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(t)return t(e)},kT.getHostFromUrl=function(e){if("String"!==kT.typeOf(e))return"";var t=e.split("/"),n="";return t.length>3&&t[2]&&(n=t[2]),n},kT.cancelAnimationFrame=function(e){var t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;t&&t(e)},kT.isMSE=function(e){return e.media&&(e=e.media),!!(e&&e instanceof HTMLMediaElement)&&(/^blob/.test(e.currentSrc)||/^blob/.test(e.src))},kT.isBlob=function(e){return"string"==typeof e&&/^blob/.test(e)},kT.generateSessionId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(new Date).getTime();try{e=nE(e)}catch(n){e=0}return t+=e,window.performance&&"function"==typeof window.performance.now&&(t+=nE(window.performance.now())),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?n:3&n|8).toString(16)}))},kT.createEvent=function(e){var t;return"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},kT.adjustTimeByDuration=function(e,t,n){return t&&e&&(e>t||n&&e<t)?t:e},kT.createPositionBar=function(e,t){var n=kT.createDom("xg-bar","",{"data-index":-1},e);return t.appendChild(n),n},kT.getTransformStyle=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0,scale:1,rotate:0},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i={scale:"".concat(t.scale||1),translate:Fm(e="".concat(t.x||0,"%, ")).call(e,t.y||0,"%"),rotate:"".concat(t.rotate||0,"deg")};return hw(i).forEach((function(e){var t,r=new RegExp("".concat(e,"\\([^\\(]+\\)"),"g"),o=Fm(t="".concat(e,"(")).call(t,i[e],")");r.test(n)?(r.lastIndex=-1,n=n.replace(r,o)):n+="".concat(o," ")})),n},kT.convertDeg=function(e){return Math.abs(e)<=1?360*e:e%360},kT.getIndexByTime=function(e,t){var n=t.length,i=-1;if(n<1)return i;if(e<=t[0].end||n<2)i=0;else if(e>t[n-1].end)i=n-1;else for(var r=1;r<n;r++)if(e>t[r-1].end&&e<=t[r].end){i=r;break}return i},kT.getOffsetCurrentTime=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,i=-1;if((i=n>=0&&n<t.length?n:kT.getIndexByTime(e,t))<0)return-1;var r=t.length,o=t[i],a=o.start,s=o.end,l=o.cTime,u=o.offset;return e<a?l:e>=a&&e<=s?e-u:e>s&&i>=r-1?s:-1},kT.getCurrentTimeByOffset=function(e,t){var n=-1;if(!t||t.length<0)return e;for(var i=0;i<t.length;i++)if(e<=t[i].duration){n=i;break}if(-1!==n){var r=t[n].start;return n-1<0?r+e:r+(e-t[n-1].duration)}return e};var CT=/(Android)\s([\d.]+)/,xT=/(Version)\/([\d.]+)/,TT=["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"],ST={get device(){return ST.os.isPc?"pc":"mobile"},get browser(){var e,t;if("undefined"==typeof navigator)return"";var n=navigator.userAgent.toLowerCase(),i={ie:/rv:([\d.]+)\) like gecko/,firefox:/firefox\/([\d.]+)/,chrome:/chrome\/([\d.]+)/,opera:/opera.([\d.]+)/,safari:/version\/([\d.]+).*safari/};return Fm(e=[]).call(e,jb(t=hw(i)).call(t,(function(e){return i[e].test(n)})))[0]},get os(){if("undefined"==typeof navigator)return{};var e=navigator.userAgent,t=/(?:Windows Phone)/.test(e),n=/(?:SymbianOS)/.test(e)||t,i=/(?:Android)/.test(e),r=/(?:Firefox)/.test(e),o=/(?:iPad|PlayBook)/.test(e)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,a=o||i&&!/(?:Mobile)/.test(e)||r&&/(?:Tablet)/.test(e),s=/(?:iPhone)/.test(e)&&!a;return{isTablet:a,isPhone:s,isIpad:o,isIos:s||o,isAndroid:i,isPc:!(s||i||n||a),isSymbian:n,isWindowsPhone:t,isFireFox:r}},get osVersion(){if("undefined"==typeof navigator)return 0;var e=navigator.userAgent,t="",n=(t=/(?:iPhone)|(?:iPad|PlayBook)/.test(e)?xT:CT)?t.exec(e):[];if(n&&n.length>=3){var i=n[2].split(".");return i.length>0?nE(i[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&&Ub(TT).call(TT,(function(n){"probably"===t.canPlayType('video/mp4; codecs="'.concat(n,'"'))&&(e.isSupport=!0,e.mime+="||".concat(n))})),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(HN){return this._logger.error(e,HN),!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 Hb.resolve(t);if(navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo)return navigator.mediaCapabilities.decodingInfo(e);var n=e.video||{},i=e.audio||{};try{var r=MediaSource.isTypeSupported(n.contentType),o=MediaSource.isTypeSupported(i.contentType);return Hb.resolve({supported:r&&o,smooth:!1,powerEfficient:!1})}catch(a){return Hb.resolve(t)}}},PT="3.0.21-rc.5",AT={1:"media",2:"media",3:"media",4:"media",5:"media",6:"media"},IT={1:5101,2:5102,3:5103,4:5104,5:5105,6:5106},RT=SC((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{errorType:"",errorCode:0,errorMessage:"",originError:"",ext:{},mediaError:null};xC(this,e);var i=t&&t.i18n?t.i18n.ERROR_TYPES:null;if(t.media){var r,o=n.mediaError?n.mediaError:t.media.error||{},a=t.duration,s=t.currentTime,l=t.ended,u=t.src,c=t.currentSrc,h=t.media,f=h.readyState,d=h.networkState,p=n.errorCode||o.code;IT[p]&&(p=IT[p]);var v={playerVersion:PT,currentTime:s,duration:a,ended:l,readyState:f,networkState:d,src:u||c,errorType:n.errorType,errorCode:p,message:n.errorMessage||o.message,mediaError:o,originError:n.originError?n.originError.stack:"",host:kT.getHostFromUrl(u||c)};return n.ext&&Ub(r=hw(n.ext)).call(r,(function(e){v[e]=n.ext[e]})),v}if(arguments.length>1){for(var g={playerVersion:PT,domain:document.domain},y=["errorType","currentTime","duration","networkState","readyState","src","currentSrc","ended","errd","errorCode","mediaError"],m=0;m<arguments.length;m++)g[y[m]]=arguments[m];return g.ex=i?(i[arguments[0]]||{}).msg:"",g}})),OT="play",MT="ended",LT="pause",DT="error",NT="seeked",FT="timeupdate",UT="waiting",HT="canplay",jT="durationchange",BT="volumechange",zT="loadeddata",VT="emptied",KT="focus",GT="blur",WT="ready",YT="urlNull",XT="autoplay_started",qT="autoplay_was_prevented",$T="complete",ZT="replay",JT="destroy",QT="urlchange",eS="download_speed_change",tS="leaveplayer",nS="enterplayer",iS="loading",rS="fullscreen_change",oS="cssFullscreen_change",aS="mini_state_change",sS="definition_change",lS="before_definition_change",uS="after_definition_change",cS="retry",hS="video_resize",fS="pip_change",dS="playnext",pS="shortcut",vS="user_action",gS="reset",yS="source_error",mS="source_success",_S=["play","playing","ended","pause","error","seeking","seeked","timeupdate","waiting","canplay","canplaythrough","durationchange","volumechange","loadeddata","loadedmetadata","ratechange","progress","loadstart","emptied","stalled","suspend","abort","lowdecode"],kS=Object.freeze({__proto__:null,ABORT:"abort",AFTER_DEFINITION_CHANGE:uS,AUTOPLAY_PREVENTED:qT,AUTOPLAY_STARTED:XT,BEFORE_DEFINITION_CHANGE:lS,BUFFER_CHANGE:"bufferedChange",CANPLAY:HT,CANPLAY_THROUGH:"canplaythrough",COMPLETE:$T,CSS_FULLSCREEN_CHANGE:oS,DEFINITION_CHANGE:sS,DESTROY:JT,DOWNLOAD_SPEED_CHANGE:eS,DURATION_CHANGE:jT,EMPTIED:VT,ENDED:MT,ENTER_PLAYER:nS,ERROR:DT,FPS_STUCK:"fps_stuck",FULLSCREEN_CHANGE:rS,LEAVE_PLAYER:tS,LOADED_DATA:zT,LOADED_METADATA:"loadedmetadata",LOADING:iS,LOAD_START:"loadstart",MINI_STATE_CHANGE:aS,PAUSE:LT,PIP_CHANGE:fS,PLAY:OT,PLAYER_BLUR:GT,PLAYER_FOCUS:KT,PLAYING:"playing",PLAYNEXT:dS,PROGRESS:"progress",RATE_CHANGE:"ratechange",READY:WT,REPLAY:ZT,RESET:gS,RETRY:cS,ROTATE:"rotate",SCREEN_SHOT:"screenShot",SEEKED:NT,SEEKING:"seeking",SEI_PARSED:"SEI_PARSED",SHORTCUT:pS,SOURCE_ERROR:yS,SOURCE_SUCCESS:mS,STALLED:"stalled",STATS_EVENTS:{STATS_INFO:"stats_info",STATS_DOWNLOAD:"stats_download",STATS_RESET:"stats_reset"},SUSPEND:"suspend",SWITCH_SUBTITLE:"switch_subtitle",TIME_UPDATE:FT,URL_CHANGE:QT,URL_NULL:YT,USER_ACTION:vS,VIDEO_EVENTS:_S,VIDEO_RESIZE:hS,VOLUME_CHANGE:BT,WAITING:UT,XGLOG:"xglog"});function bS(e,t){this&&this.emit&&("error"===e?this.errorHandler(e,t.error):this.emit(e,t))}var wS=function(e){AC(n,e);var t=LC(n);function n(e){var i;xC(this,n),(i=t.call(this,e))._hasStart=!1,i._currentTime=0,i._duration=0,i._internalOp={},i._lastMuted=!1,i.vtype="MP4",i._rate=-1,i.mediaConfig=xE({},{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 r=e["x5-video-player-type"]||e.x5VideoPlayerType;return ST.isWeixin&&ST.os.isAndroid&&r&&(i.mediaConfig["x5-video-player-type"]=r,delete i.mediaConfig.playsinline,delete i.mediaConfig["webkit-playsinline"],delete i.mediaConfig["x5-playsinline"]),e.loop&&(i.mediaConfig.loop="loop"),e.autoplayMuted&&!Object.prototype.hasOwnProperty.call(i.mediaConfig,"muted")&&(i.mediaConfig.muted=!0),i.media=kT.createDom(i.mediaConfig.mediaType,"",i.mediaConfig,""),e.defaultPlaybackRate&&(i.media.defaultPlaybackRate=i.media.playbackRate=e.defaultPlaybackRate),"Number"===kT.typeOf(e.volume)&&(i.volume=e.volume),e.autoplayMuted&&(i.media.muted=!0,i._lastMuted=!0),e.autoplay&&(i.media.autoplay=!0),i._interval={},i.mediaEventMiddleware={},i.attachVideoEvents(),i}return SC(n,[{key:"setEventsMiddleware",value:function(e){var t,n=this;Ub(t=hw(e)).call(t,(function(t){n.mediaEventMiddleware[t]=e[t]}))}},{key:"removeEventsMiddleware",value:function(e){var t,n=this;Ub(t=hw(e)).call(t,(function(e){delete n.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=Ub(_S).call(_S,(function(t){var n,i=Fm(n="on".concat(t.charAt(0).toUpperCase())).call(n,fw(t).call(t,1));return"function"==typeof e[i]&&e.on(t,e[i]),PC({},t,function(e,t){return function(n,i){var r={player:t,eventName:e,originalEvent:n,detail:n.detail||{},timeStamp:n.timeStamp,currentTime:t.currentTime,duration:t.duration,paused:t.paused,ended:t.ended,isInternalOp:!!t._internalOp[n.type],muted:t.muted,volume:t.volume,host:kT.getHostFromUrl(t.currentSrc),vtype:t.vtype};if(t.removeInnerOP(n.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&&(r.isMutedChange=t._lastMuted!==t.muted,t._lastMuted=t.muted),"error"===e&&(r.error=i||t.video.error),t.mediaEventMiddleware[e]){var a=bS.bind(t,e,r);try{t.mediaEventMiddleware[e].call(t,r,a)}catch(s){throw bS.call(t,e,r),s}}else bS.call(t,e,r)}}(t,e))}))),this._evHandlers.forEach((function(e){var n=hw(e)[0];t.addEventListener(n,e[n],!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 n=hw(e)[0];t.removeEventListener(n,e[n],!1)})),this._evHandlers.forEach((function(t){var n,i=hw(t)[0],r=Fm(n="on".concat(i.charAt(0).toUpperCase())).call(n,fw(i).call(i,1));"function"==typeof e[r]&&e.off(i,e[r])})),this._evHandlers=null}},{key:"_attachSourceEvents",value:function(e,t){var n=this;e.removeAttribute("src"),e.load(),t.forEach((function(e,t){n.media.appendChild(kT.createDom("source","",{src:"".concat(e.src),type:"".concat(e.type||""),"data-index":t+1}))}));var i=e.children;if(i){this._videoSourceCount=i.length,this._videoSourceIndex=i.length,this._vLoadeddata=function(e){n.emit(mS,{src:e.target.currentSrc,host:kT.getHostFromUrl(e.target.currentSrc)})};for(var r=null,o=0;o<this._evHandlers.length;o++)if("error"===hw(this._evHandlers[o])[0]){r=this._evHandlers[o];break}!this._sourceError&&(this._sourceError=function(e){var t=nE(e.target.getAttribute("data-index"),10);if(n._videoSourceIndex--,0===n._videoSourceIndex||t>=n._videoSourceCount){var i={code:4,message:"sources_load_error"};r?r.error(e,i):n.errorHandler("error",i)}var o=AT[4];n.emit(yS,new RT(n,{errorType:o,errorCode:4,errorMessage:"sources_load_error",mediaError:{code:4,message:"sources_load_error"},src:e.target.src}))});for(var a=0;a<i.length;a++)i[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 n=0;n<t.length;n++)t[n].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 n=this.media.error||t,i=n.code?AT[n.code]:"other";n.message;this.media.currentSrc||this.media.srcObject||(n={code:6,message:"empty_src"}),this.emit(e,new RT(this,{errorType:i,errorCode:n.code,errorMessage:n.message||"",mediaError:n}))}}},{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 n=this.media.currentTime;if(e)for(var i=0,r=e.length;i<r&&(t[0]=e.start(i),t[1]=e.end(i),!(t[0]<=n&&n<=t[1]));i++);return t[0]-n<=0&&n-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?kT.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 n=0;n<t.length;n++)if((t.start(n)<=this.currentTime||t.start(n)<.1)&&t.end(n)>=this.currentTime)return{start:t.start(n),end:t.end(n)};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(QT,e),this.emit(UT),this._currentTime=0,this._duration=0,kT.isMSE(this.media)?this.onWaiting():(this._detachSourceEvents(this.media),"Array"===kT.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 i,r,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(r=DC(IC(n.prototype),"emit",this)).call.apply(r,Fm(i=[this,e,t]).call(i,a))}},{key:"on",value:function(e,t){for(var i,r,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(r=DC(IC(n.prototype),"on",this)).call.apply(r,Fm(i=[this,e,t]).call(i,a))}},{key:"once",value:function(e,t){for(var i,r,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(r=DC(IC(n.prototype),"once",this)).call.apply(r,Fm(i=[this,e,t]).call(i,a))}},{key:"off",value:function(e,t){for(var i,r,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(r=DC(IC(n.prototype),"off",this)).call.apply(r,Fm(i=[this,e,t]).call(i,a))}},{key:"offAll",value:function(){DC(IC(n.prototype),"removeAllListeners",this).call(this)}}]),n}(BC),ES=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"}};xC(this,e),this.indexedDB=window.indexedDB||window.webkitindexedDB,this.IDBKeyRange=window.IDBKeyRange||window.webkitIDBKeyRange,this.myDB=t}return SC(e,[{key:"openDB",value:function(e){var t=this,n=this,i=this.myDB.version||1,r=n.indexedDB.open(n.myDB.name,i);r.onerror=function(e){},r.onsuccess=function(i){t.myDB.db=i.target.result,e.call(n)},r.onupgradeneeded=function(e){var t=e.target.result;e.target.transaction,t.objectStoreNames.contains(n.myDB.ojstore.name)||t.createObjectStore(n.myDB.ojstore.name,{keyPath:n.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 n,i=this.myDB.db.transaction(e,"readwrite").objectStore(e),r=0;r<t.length;r++)(n=i.add(t[r])).onerror=function(){},n.onsuccess=function(){}}},{key:"putData",value:function(e,t){for(var n,i=this.myDB.db.transaction(e,"readwrite").objectStore(e),r=0;r<t.length;r++)(n=i.put(t[r])).onerror=function(){},n.onsuccess=function(){}}},{key:"getDataByKey",value:function(e,t,n){var i=this,r=this.myDB.db.transaction(e,"readwrite").objectStore(e).get(t);r.onerror=function(){n.call(i,null)},r.onsuccess=function(e){var t=e.target.result;n.call(i,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}(),CS=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],xS=["requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen"],TS=["exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen"],SS="data-xgplayerid";function PS(e,t,n){for(var i,r=arguments.length,o=new Array(r>3?r-3:0),a=3;a<r;a++)o[a-3]=arguments[a];var s,l=t.call.apply(t,Fm(i=[e]).call(i,o));n&&"function"==typeof n&&(l&&l.then?l.then((function(){for(var t,i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];n.call.apply(n,Fm(t=[e]).call(t,r))})):n.call.apply(n,Fm(s=[e]).call(s,o)))}function AS(e,t){var n=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 i,r=arguments,o=this;if(n.pre)try{var a,s;(s=n.pre).call.apply(s,Fm(a=[this]).call(a,fw(Array.prototype).call(arguments)))}catch(v){var l,u;throw v.message=Fm(l=Fm(u="[pluginName: ".concat(this.pluginName,":")).call(u,e,":pre error] >> ")).call(l,v.message),v}if(this.__hooks&&this.__hooks[e])try{var c,h=FS(this,e,t);if(h)if(h.then)h.then((function(e){var i;!1!==e&&PS.apply(void 0,Fm(i=[o,t,n.next]).call(i,NC(r)))})).catch((function(e){throw e}));else PS.apply(void 0,Fm(c=[this,t,n.next]).call(c,fw(Array.prototype).call(arguments)));else if(void 0===h){var f;PS.apply(void 0,Fm(f=[this,t,n.next]).call(f,fw(Array.prototype).call(arguments)))}}catch(v){var d,p;throw v.message=Fm(d=Fm(p="[pluginName: ".concat(this.pluginName,":")).call(p,e,"] >> ")).call(d,v.message),v}else PS.apply(void 0,Fm(i=[this,t,n.next]).call(i,fw(Array.prototype).call(arguments)))}.bind(this)}function IS(e,t){var n=this.__hooks;if(!n||!Array.isArray(n[e]))return-1;for(var i=n[e],r=0;r<i.length;r++)if(i[r]===t)return r;return-1}function RS(e,t){var n=this.__hooks;if(n)return n.hasOwnProperty(e)?(Array.isArray(n[e])||(n[e]=[]),-1===IS.call(this,e,t)&&n[e].push(t),!0):(console.warn("has no supported hook which name [".concat(e,"]")),!1)}function OS(e,t){var n=this.__hooks;if(n){if(Array.isArray(n[e])){var i=n[e],r=IS.call(this,e,t);-1!==r&&Mw(i).call(i,r,1)}delete n[e]}}function MS(e){if(this.plugins&&this.plugins[e.toLowerCase()]){for(var t=this.plugins[e.toLowerCase()],n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return t.useHooks&&t.useHooks.apply(t,i)}}function LS(e){if(this.plugins&&this.plugins[e.toLowerCase()]){var t=this.plugins[e.toLowerCase()];if(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return t.removeHooks&&t.removeHooks.apply(t,i)}}}function DS(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.__hooks={},t&&Ub(t).call(t,(function(t){e.__hooks[t]=null})),IE(e,"hooks",{get:function(){var t;return e.__hooks&&Ub(t=hw(e.__hooks)).call(t,(function(t){if(e.__hooks[t])return t}))}})}function NS(e){e.__hooks=null}function FS(e,t,n){for(var i=arguments.length,r=new Array(i>3?i-3:0),o=3;o<i;o++)r[o-3]=arguments[o];if(e.__hooks&&Array.isArray(e.__hooks[t])){var a,s=e.__hooks[t],l=-1;return function e(t,n,i){for(var r,o,a=arguments.length,u=new Array(a>3?a-3:0),c=3;c<a;c++)u[c-3]=arguments[c];if(l++,0===s.length||l===s.length)return i.call.apply(i,Fm(o=[t,t]).call(o,u));var h,f=s[l],d=f.call.apply(f,Fm(r=[t,t]).call(r,u));return d&&d.then?d.then((function(r){var o;return!1===r?null:e.apply(void 0,Fm(o=[t,n,i]).call(o,u))})).catch((function(e){console.warn("[runHooks]".concat(n," reject"),e.message)})):!1!==d?e.apply(void 0,Fm(h=[t,n,i]).call(h,u)):void 0}.apply(void 0,Fm(a=[e,t,n]).call(a,r))}var u;return n.call.apply(n,Fm(u=[e,e]).call(u,r))}function US(e,t){var n;mT.logError(Fm(n="[".concat(e,"] event or callback cant be undefined or null when call ")).call(n,t))}var HS=function(){function e(t){xC(this,e),kT.checkIsFunction(this.beforeCreate)&&this.beforeCreate(t),DS(this),this.__args=t,this.__events={},this.__onceEvents={},this.config=t.config||{},this.player=null,this.playerConfig={},this.pluginName="",this.__init(t)}return SC(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=kT.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 n=this;e&&t&&this.player?"string"==typeof e?(this.__events[e]=t,this.player.on(e,t)):Array.isArray(e)&&e.forEach((function(e){n.__events[e]=t,n.player.on(e,t)})):US(this.pluginName,"plugin.on(event, callback)")}},{key:"once",value:function(e,t){var n=this;e&&t&&this.player?"string"==typeof e?(this.__onceEvents[e]=t,this.player.once(e,t)):Array.isArray(e)&&e.forEach((function(i){n.__onceEvents[i]=t,n.player.once(e,t)})):US(this.pluginName,"plugin.once(event, callback)")}},{key:"off",value:function(e,t){var n=this;e&&t&&this.player?"string"==typeof e?(delete this.__events[e],this.player.off(e,t)):Array.isArray(e)&&e.forEach((function(i){delete n.__events[e],n.player.off(i,t)})):US(this.pluginName,"plugin.off(event, callback)")}},{key:"offAll",value:function(){var e=this;["__events","__onceEvents"].forEach((function(t){hw(e[t]).forEach((function(n){e[t][n]&&e.off(n,e[t][n]),n&&delete e[t][n]}))})),this.__events={},this.__onceEvents={}}},{key:"emit",value:function(e){var t,n;if(this.player){for(var i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];(n=this.player).emit.apply(n,Fm(t=[e]).call(t,r))}}},{key:"emitUserAction",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.player){var i=EC(EC({},n),{},{pluginName:this.pluginName});this.player.emitUserAction(e,t,i)}}},{key:"hook",value:function(e,t){var n;return AS.call.apply(AS,Fm(n=[this]).call(n,fw(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){for(var n,i=arguments.length,r=new Array(i>2?i-2:0),o=2;o<i;o++)r[o-2]=arguments[o];return RS.call.apply(RS,Fm(n=[this]).call(n,fw(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){for(var n,i=arguments.length,r=new Array(i>2?i-2:0),o=2;o<i;o++)r[o-2]=arguments[o];return OS.call.apply(OS,Fm(n=[this]).call(n,fw(Array.prototype).call(arguments)))}},{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]:"";if(this.player)return n&&(t.pluginName=n),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,n=this.player,i=this.pluginName;this.offAll(),kT.clearAllTimers(this),kT.checkIsFunction(this.destroy)&&this.destroy(),Ub(e=["player","playerConfig","pluginName","logger","__args","__hooks"]).call(e,(function(e){t[e]=null})),n.unRegisterPlugin(i),NS(this)}}],[{key:"defineGetterOrSetter",value:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&IE(e,n,t[n])}},{key:"defineMethod",value:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&"function"==typeof t[n]&&IE(e,n,{configurable:!0,value:t[n]})}},{key:"defaultConfig",get:function(){return{}}},{key:"pluginName",get:function(){return"pluginName"}}]),e}();if("undefined"!=typeof Element&&!Element.prototype.matches){var jS=Element.prototype;jS.matches=jS.matchesSelector||jS.mozMatchesSelector||jS.msMatchesSelector||jS.oMatchesSelector||jS.webkitMatchesSelector}var BS=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}};function zS(e,t,n,i,r){var o=VS.apply(this,arguments);return e.addEventListener(n,o,r),{destroy:function(){e.removeEventListener(n,o,r)}}}function VS(e,t,n,i){return function(n){n.delegateTarget=BS(n.target,t),n.delegateTarget&&i.call(e,n)}}var KS=function(e,t,n,i,r){return"function"==typeof e.addEventListener?zS.apply(null,arguments):"function"==typeof n?zS.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Ub(Array.prototype).call(e,(function(e){return zS(e,t,n,i,r)})))},GS=n(KS),WS={CONTROLS:"controls",ROOT:"root"},YS={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"},XS="xg-icon-disable";function qS(e){return!!e&&(cw(e)&&/^(?:http|data:|\/)/.test(e))}function $S(e,t){var n,i,r=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 kT.addClass(e,r),Ub(i=hw(o)).call(i,(function(t){e.setAttribute(t,o[t])})),e;if(qS(e)||qS(e.url))return o.src=qS(e)?e:e.url||"",s=kT.createDom(e.tag||"img","",o,"xg-img ".concat(r));if("function"==typeof e)try{var l,u;return(s=e())instanceof window.Element?(kT.addClass(s,r),Ub(l=hw(o)).call(l,(function(e){s.setAttribute(e,o[e])})),s):(mT.logWarn(Fm(u="warn>>icons.".concat(t," in config of plugin named [")).call(u,a,"] is a function mast return an Element Object")),null)}catch(c){return mT.logError("Plugin named [".concat(a,"]:createIcon"),c),null}return"string"==typeof e?kT.createDomFromHtml(e,o,r):(mT.logWarn(Fm(n="warn>>icons.".concat(t," in config of plugin named [")).call(n,a,"] is invalid")),null)}function ZS(e,t){var n,i=t.config.icons||t.playerConfig.icons;Ub(n=hw(e)).call(n,(function(n){var r=e[n],o=r&&r.class?r.class:"",a=r&&r.attr?r.attr:{},s=null;i&&i[n]&&(o=function(e,t){var n;return"object"===CC(e)&&e.class&&"string"==typeof e.class?Fm(n="".concat(t," ")).call(n,e.class):t}(i[n],o),a=function(e,t){var n;return"object"===CC(e)&&e.attr&&"object"===CC(e.attr)&&Ub(n=hw(e.attr)).call(n,(function(n){t[n]=e.attr[n]})),t}(i[n],a),s=$S(i[n],n,o,a,t.pluginName)),!s&&r&&(s=$S(r.icon?r.icon:r,a,o,{},t.pluginName)),t.icons[n]=s}))}var JS=function(e){AC(n,e);var t=LC(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return xC(this,n),(e=t.call(this,i)).__delegates=[],e}return SC(n,[{key:"__init",value:function(e){if(DC(IC(n.prototype),"__init",this).call(this,e),e.root){var t=e.root,i=null;this.icons={},this.root=null,this.parent=null,ZS(this.registerIcons()||{},this),this.langText={};var r,o,a,s=this.registerLanguageTexts()||{};o=this,Ub(a=hw(r=s)).call(a,(function(e){IE(o.langText,e,{get:function(){var t=o.lang,n=o.i18n;return n[e]?n[e]:r[e]&&r[e][t]||""}})}));var l="";try{l=this.render()}catch(f){var u;throw mT.logError("Plugin:".concat(this.pluginName,":render"),f),new Error(Fm(u="Plugin:".concat(this.pluginName,":render:")).call(u,f.message))}if(l)(i=n.insert(l,t,e.index)).setAttribute("data-index",e.index);else{if(!e.tag)return;(i=kT.createDom(e.tag,"",e.attr,e.name)).setAttribute("data-index",e.index),t.appendChild(i)}this.root=i,this.parent=t;var c=this.config.attr||{},h=this.config.style||{};this.setAttr(c),this.setStyle(h),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,n=this.children();if(n&&"object"===CC(n))if(hw(n).length>0)Ub(t=hw(n)).call(t,(function(t){var i,r,o=t,a=n[o],s={root:e.root};"function"==typeof a?(i=e.config[o]||{},r=a):"object"===CC(a)&&"function"==typeof a.plugin&&(i=a.options?kT.deepCopy(e.config[o]||{},a.options):e.config[o]||{},r=a.plugin),s.config=i,void 0!==i.index&&(s.index=i.index),i.root&&(s.root=i.root),e.registerPlugin(r,s,o)}))}}},{key:"updateLang",value:function(e){e||(e=this.lang);var t=this.root,n=this.i18n,i=this.langText;t&&function e(t,n){for(var i=0;i<t.children.length;i++)t.children[i].children.length>0?e(t.children[i],n):n(t.children[i])}(t,(function(t){var r=t.getAttribute&&t.getAttribute("lang-key");if(r){var o=n[r.toUpperCase()]||i[r];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]:"",n=this.i18n||{},i=this.langText;e.setAttribute&&e.setAttribute("lang-key",t);var r=n[t]||i[t]||"";r&&(e.innerHTML=r)}},{key:"plugins",value:function(){return this._children}},{key:"disable",value:function(){this.config.disable=!0,kT.addClass(Wm(this).call(this,".xgplayer-icon"),XS)}},{key:"enable",value:function(){this.config.disable=!1,kT.removeClass(Wm(this).call(this,".xgplayer-icon"),XS)}},{key:"children",value:function(){return{}}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";t.root=t.root||this.root;var r=DC(IC(n.prototype),"registerPlugin",this).call(this,e,t,i);return this._children.push(r),r}},{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,i){var r=this;if(arguments.length<3&&"function"==typeof t)Array.isArray(e)?e.forEach((function(e){r.bindEL(e,t)})):this.bindEL(e,t);else{var o,a=n.delegate.call(this,this.root,e,t,i);this.__delegates=Fm(o=this.__delegates).call(o,a)}}},{key:"unbind",value:function(e,t){var n=this;if(arguments.length<3&&"function"==typeof t)Array.isArray(e)?e.forEach((function(e){n.unbindEL(e,t)})):this.unbindEL(e,t);else for(var i,r=Fm(i="".concat(e,"_")).call(i,t),o=0;o<this.__delegates.length;o++)if(this.__delegates[o].key===r){var a;this.__delegates[o].destroy(),Mw(a=this.__delegates).call(a,o,1);break}}},{key:"setStyle",value:function(e,t){var n,i=this;if(this.root)return"String"===kT.typeOf(e)?this.root.style[e]=t:void("Object"===kT.typeOf(e)&&Ub(n=hw(e)).call(n,(function(t){i.root.style[t]=e[t]})))}},{key:"setAttr",value:function(e,t){var n,i=this;if(this.root)return"String"===kT.typeOf(e)?this.root.setAttribute(e,t):void("Object"===kT.typeOf(e)&&Ub(n=hw(e)).call(n,(function(t){i.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 n=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,n)}},{key:"unbindEL",value:function(e,t){var n=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,n)}},{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?Wm(this).call(this,e).appendChild(t):e.appendChild(t)}catch(n){return mT.logError("Plugin:appendChild",n),null}}},{key:"render",value:function(){return""}},{key:"destroy",value:function(){}},{key:"__destroy",value:function(){var e,t,i,r=this,o=this.player;(Ub(e=this.__delegates).call(e,(function(e){e.destroy()})),this.__delegates=[],this._children instanceof Array)&&(Ub(i=this._children).call(i,(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)),DC(IC(n.prototype),"__destroy",this).call(this),this.icons={},Ub(t=["root","parent"]).call(t,(function(e){r[e]=null}))}}],[{key:"insert",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=t.children.length,r=Number(n),o=e instanceof window.Node;if(i){for(var a=0,s=null,l="";a<i;a++){s=t.children[a];var u=Number(s.getAttribute("data-index"));if(u>=r){l="beforebegin";break}u<r&&(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,n,i){var r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=[];if(e instanceof window.Node&&"function"==typeof i)if(Array.isArray(n))n.forEach((function(n){var a,s=GS(e,t,n,i,r);s.key=Fm(a="".concat(t,"_")).call(a,n),o.push(s)}));else{var a,s=GS(e,t,n,i,r);s.key=Fm(a="".concat(t,"_")).call(a,n),o.push(s)}return o}},{key:"ROOT_TYPES",get:function(){return WS}},{key:"POSITIONS",get:function(){return YS}}]),n}(HS),QS=function(){function e(){var t=this;if(xC(this,e),PC(this,"__trigger",(function(e){var n=(new Date).getTime();t.timeStamp=n;for(var i=0;i<e.length;i++)t.__runHandler(e[i].target)})),this.__handlers=[],this.timeStamp=0,this.observer=null,window.ResizeObserver)try{this.observer=new window.ResizeObserver(function(e,t,n){var i=!0,r=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return bT(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),wT(e,t,{leading:i,trailing:r,maxWait:t})}(this.__trigger,100,{trailing:!0})),this.timeStamp=(new Date).getTime()}catch(n){console.error(n)}}return SC(e,[{key:"addObserver",value:function(e,t){if(this.observer){this.observer.observe(e);for(var n=e.getAttribute(SS),i=this.__handlers,r=-1,o=0;o<i.length;o++)i[o]&&e===i[o].target&&(r=o);r>-1?this.__handlers[r].handler=t:this.__handlers.push({target:e,handler:t,playerId:n})}}},{key:"unObserver",value:function(e){var t,n,i=-1;Ub(t=this.__handlers).call(t,(function(t,n){e===t.target&&(i=n)}));try{var r;null===(r=this.observer)||void 0===r||r.unobserve(e)}catch(o){}i>-1&&Mw(n=this.__handlers).call(n,i,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,n=0;n<t.length;n++)if(t[n]&&e===t[n].target){try{t[n].handler(e)}catch(HN){console.error(HN)}return!0}return!1}}]),e}(),eP=null;var tP={pluginGroup:{},init:function(e){var t,n,i=e._pluginInfoId;i||(i=(new Date).getTime(),e._pluginInfoId=i),!e.config.closeResizeObserver&&(t=e.root,n=function(){e.resize()},eP||(eP=new QS),eP.addObserver(t,n)),this.pluginGroup[i]={_originalOptions:e.config||{},_plugins:{}}},formatPluginInfo:function(e,t){var n=null,i=null;return e.plugin&&"function"==typeof e.plugin?(n=e.plugin,i=e.options):(n=e,i={}),t&&(i.config=t||{}),{PLUFGIN:n,options:i}},checkPluginIfExits:function(e,t){for(var n=0;n<t.length;n++)if(e.toLowerCase()===t[n].pluginName.toLowerCase())return!0;return!1},getRootByConfig:function(e,t){for(var n=hw(t),i=null,r=0;r<n.length;r++)if(e.toLowerCase()===n[r].toLowerCase()){i=t[n[r]];break}return"Object"===kT.typeOf(i)?{root:i.root,position:i.position}:{}},lazyRegister:function(e,t){var n=this,i=t.timeout||1500;return Hb.race([t.loader().then((function(t){var i;i=t&&t.__esModule?t.default:t,n.register(e,i,t.options)})),new Hb((function(e,t){setTimeout((function(){t(new Error("timeout"))}),i)}))])},register:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e&&t&&"function"==typeof t&&void 0!==t.prototype){var i=e._pluginInfoId;if(i&&this.pluginGroup[i]){this.pluginGroup[i]._plugins||(this.pluginGroup[i]._plugins={});var r=this.pluginGroup[i]._plugins,o=this.pluginGroup[i]._originalOptions;n.player=e;var a=n.pluginName||t.pluginName;if(!a)throw new Error("The property pluginName is necessary");if(!t.isSupported||t.isSupported(e.config.mediaType,e.config.codecType)){n.config||(n.config={});for(var s=hw(o),l=0;l<s.length;l++)if(a.toLowerCase()===s[l].toLowerCase()){var u=o[s[l]];"Object"===kT.typeOf(u)?n.config=xE({},n.config,o[s[l]]):"Boolean"===kT.typeOf(u)&&(n.config.disable=!u);break}t.defaultConfig&&hw(t.defaultConfig).forEach((function(e){void 0===n.config[e]&&(n.config[e]=t.defaultConfig[e])})),n.root?"string"==typeof n.root&&(n.root=e[n.root]):n.root=e.root,n.index=n.config.index||0;try{r[a.toLowerCase()]&&(this.unRegister(i,a.toLowerCase()),console.warn("the is one plugin with same pluginName [".concat(a,"] exist, destroy the old instance")));var c=new t(n);return r[a.toLowerCase()]=c,r[a.toLowerCase()].func=t,c&&"function"==typeof c.afterCreate&&c.afterCreate(),c}catch(h){throw console.error(h),h}}else console.warn("not supported plugin [".concat(a,"]"))}}},unRegister:function(e,t){e._pluginInfoId&&(e=e._pluginInfoId),t=t.toLowerCase();try{var n=this.pluginGroup[e]._plugins[t];n&&(n.pluginName&&n.__destroy(),delete this.pluginGroup[e]._plugins[t])}catch(r){var i;console.error(Fm(i="[unRegister:".concat(t,"] cgid:[")).call(i,e,"] error"),r)}},deletePlugin:function(e,t){var n=e._pluginInfoId;n&&this.pluginGroup[n]&&this.pluginGroup[n]._plugins&&delete this.pluginGroup[n]._plugins[t]},getPlugins:function(e){var t=e._pluginInfoId;return t&&this.pluginGroup[t]?this.pluginGroup[t]._plugins:{}},findPlugin:function(e,t){var n=e._pluginInfoId;if(!n||!this.pluginGroup[n])return null;var i=t.toLowerCase();return this.pluginGroup[n]._plugins[i]},beforeInit:function(e){var t=this;function n(e){return e&&e.then?e:new Hb((function(e){e()}))}return new Hb((function(i){if(t.pluginGroup)return(e._loadingPlugins&&e._loadingPlugins.length?Hb.all(e._loadingPlugins):Hb.resolve()).then((function(){var r,o=e._pluginInfoId;if(t.pluginGroup[o]){var a=t.pluginGroup[o]._plugins,s=[];hw(a).forEach((function(e){if(a[e]&&a[e].beforePlayerInit)try{var t=a[e].beforePlayerInit();s.push(n(t))}catch(i){throw s.push(n(null)),i}})),Hb.all(Fm(r=[]).call(r,s)).then((function(){i()})).catch((function(e){console.error(e),i()}))}else i()}))}))},afterInit:function(e){var t=e._pluginInfoId;if(t&&this.pluginGroup[t]){var n=this.pluginGroup[t]._plugins;hw(n).forEach((function(e){n[e]&&n[e].afterPlayerInit&&n[e].afterPlayerInit()}))}},setLang:function(e,t){var n=t._pluginInfoId;if(n&&this.pluginGroup[n]){var i=this.pluginGroup[n]._plugins;hw(i).forEach((function(t){if(i[t].updateLang)i[t].updateLang(e);else try{i[t].lang=e}catch(HN){console.warn("".concat(t," setLang"))}}))}},reRender:function(e){var t=this,n=e._pluginInfoId;if(n&&this.pluginGroup[n]){var i=[],r=this.pluginGroup[n]._plugins;hw(r).forEach((function(e){"controls"!==e&&r[e]&&(i.push({plugin:r[e].func,options:r[e].__args}),t.unRegister(n,e))})),i.forEach((function(n){t.register(e,n.plugin,n.options)}))}},onPluginsReady:function(e){var t=e._pluginInfoId;if(t&&this.pluginGroup[t]){var n=this.pluginGroup[t]._plugins||{};hw(n).forEach((function(e){n[e].onPluginsReady&&"function"==typeof n[e].onPluginsReady&&n[e].onPluginsReady()}))}},destroy:function(e){var t=e._pluginInfoId;if(this.pluginGroup[t]){var n,i,r;n=e.root,null===(r=eP)||void 0===r||r.unObserver(n,i);for(var o=this.pluginGroup[t]._plugins,a=0,s=hw(o);a<s.length;a++){var l=s[a];this.unRegister(t,l)}delete this.pluginGroup[t],delete e._pluginInfoId}}},nP="xgplayer",iP="xgplayer-is-enter",rP="xgplayer-pause",oP="xgplayer-playing",aP="xgplayer-ended",sP="xgplayer-isloading",lP="xgplayer-is-error",uP="xgplayer-replay",cP="xgplayer-nostart",hP="xgplayer-inactive",fP="xgplayer-is-fullscreen",dP="xgplayer-is-cssfullscreen",pP="xgplayer-rotate-fullscreen",vP="xgplayer-rotate-parent",gP="xgplayer-fullscreen-parent",yP="xgplayer-fullscreen-inner",mP="no-controls",_P="flex-controls",kP="controls-autohide",bP="top-bar-autohide",wP="not-allow-autoplay",EP="seeking";function CP(){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:ET(),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 xP=function(e){AC(n,e);var t=LC(n);function n(){var e,i;xC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return PC(OC(i=t.call.apply(t,Fm(e=[this]).call(e,o))),"onMouseEnter",(function(e){var t=OC(i),n=t.player;t.playerConfig.closeControlsBlur&&n.focus({autoHide:!1})})),PC(OC(i),"onMouseLeave",(function(e){OC(i).player.focus()})),i}return SC(n,[{key:"beforeCreate",value:function(e){e.config.mode||"mobile"!==ST.device||(e.config.mode="flex"),e.player.config.marginControls&&(e.config.autoHide=!1)}},{key:"afterCreate",value:function(){var e,t=this,n=this.config,i=n.disable,r=n.height,o=n.mode;if(!i){"flex"===o&&this.player.addClass(_P);var a={height:"".concat(r,"px")};Ub(e=hw(a)).call(e,(function(e){t.root.style[e]=a[e]})),this.left=Wm(this).call(this,"xg-left-grid"),this.center=Wm(this).call(this,"xg-center-grid"),this.right=Wm(this).call(this,"xg-right-grid"),this.innerRoot=Wm(this).call(this,"xg-inner-controls"),this.on(aS,(function(e){e?kT.addClass(t.root,"mini-controls"):kT.removeClass(t.root,"mini-controls")}));var s=this.playerConfig.isMobileSimulateMode;"mobile"!==ST.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&&kT.addClass(this.root,kP)}},{key:"pauseAutoHide",value:function(){kT.removeClass(this.root,kP)}},{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]:{},i=arguments.length>2?arguments[2]:void 0;if(this.root){var r=e.defaultConfig||{};if(!t.root){switch(t.position?t.position:t.config&&t.config.position?t.config.position:r.position){case YS.CONTROLS_LEFT:t.root=this.left;break;case YS.CONTROLS_RIGHT:t.root=this.right;break;case YS.CONTROLS_CENTER:t.root=this.center;break;case YS.CONTROLS:t.root=this.root;break;default:t.root=this.left}return DC(IC(n.prototype),"registerPlugin",this).call(this,e,t,i)}}}},{key:"destroy",value:function(){"mobile"!==ST.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,n=e.autoHide,i=e.initShow;if(!e.disable){var r=kT.classNames({"xgplayer-controls":!0},{"flex-controls":"flex"===t},{"bottom-controls":"bottom"===t},PC({},kP,n),{"xgplayer-controls-initshow":i||!n});return'<xg-controls class="'.concat(r,'" 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}}}]),n}(JS),TP={lang:{},langKeys:[],textKeys:[]};function SP(e,t){return hw(t).forEach((function(n){var i,r=kT.typeOf(t[n]),o=kT.typeOf(e[n]);"Array"===r?("Array"!==o&&(e[n]=[]),(i=e[n]).push.apply(i,NC(t[n]))):"Object"===r?("Object"!==o&&(e[n]={}),SP(e[n],t[n])):e[n]=t[n]})),e}function PP(){var e;Ub(e=hw(TP.lang.en)).call(e,(function(e){TP.textKeys[e]=e}))}function AP(e,t){var n=e.LANG;if(t||(t=TP),t.lang){var i=e.TEXT||{};"zh"===n&&(n="zh-cn"),t.lang[n]?SP(t.lang[n],i):(t.langKeys.push(n),t.lang[n]=i),PP()}}AP({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"}});var IP={get textKeys(){return TP.textKeys},get langKeys(){return TP.langKeys},get lang(){var e,t={};return Ub(e=TP.langKeys).call(e,(function(e){t[e]=TP.lang[e]})),TP.lang["zh-cn"]&&(t.zh=TP.lang["zh-cn"]||{}),t},extend:function(e,t){var n=[];if(t||(t=TP),t.lang){var i;if("Array"!==kT.typeOf(e))n=Ub(i=hw(e)).call(i,(function(t){return{LANG:"zh"===t?"zh-cn":t,TEXT:e[t]}}));else n=e;var r=t.lang;Ub(n).call(n,(function(e){"zh"===e.LANG&&(e.LANG="zh-cn"),r[e.LANG]?SP(r[e.LANG]||{},e.TEXT||{}):AP(e,t)})),PP()}},use:AP,init:function(e){var t,n={lang:{},langKeys:[],textKeys:{},pId:e};return SP(n.lang,TP.lang),(t=n.langKeys).push.apply(t,NC(TP.langKeys)),SP(n.textKeys,TP.textKeys),n}},RP=1,OP=2,MP=3,LP=4,DP=5,NP=6,FP=7,UP=["ERROR","INITIAL","READY","ATTACHING","ATTACHED","NOTALLOW","RUNNING","ENDED","DESTROYED"],HP={},jP=null,BP=function(e){AC(n,e);var t=LC(n);function n(){return xC(this,n),t.apply(this,arguments)}return SC(n,[{key:"add",value:function(e){e&&(HP[e.playerId]=e,1===hw(HP).length&&this.setActive(e.playerId,!0))}},{key:"remove",value:function(e){e&&(e.isUserActive,delete HP[e.playerId])}},{key:"_iterate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];for(var n in HP)if(Object.prototype.hasOwnProperty.call(HP,n)){var i=HP[n];if(t){if(e(i))break}else e(i)}}},{key:"forEach",value:function(e){this._iterate(e)}},{key:"find",value:function(e){var t=null;return this._iterate((function(n){var i=e(n);return i&&(t=n),i}),!0),t}},{key:"findAll",value:function(e){var t=[];return this._iterate((function(n){e(n)&&t.push(n)})),t}},{key:"setActive",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(HP[e])return t?this.forEach((function(t){e===t.playerId?(t.isUserActive=!0,t.isInstNext=!1):t.isUserActive=!1})):HP[e].isUserActive=t,e}},{key:"getActiveId",value:function(){for(var e=hw(HP),t=0;t<e.length;t++){var n=HP[e[t]];if(n&&n.isUserActive)return e[t]}return null}},{key:"setNext",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(HP[e])return t?this.forEach((function(t){e===t.playerId?(t.isUserActive=!1,t.isInstNext=!0):t.isInstNext=!1})):HP[e].isInstNext=t,e}}],[{key:"getInstance",value:function(){return jP||(jP=new n),jP}}]),n}(jC.EventEmitter);var zP=["play","pause","replay","retry"],VP=0,KP=0,GP=null,WP=function(e){AC(n,e);var t=LC(n);function n(e){var i;xC(this,n);var r,o=kT.deepMerge(CP(),e);PC(OC(i=t.call(this,o)),"canPlayFunc",(function(){if(i.config){var e=i.config,t=e.autoplay,n=e.defaultPlaybackRate;mT.logInfo("player","canPlayFunc, startTime",i.__startTime),i._seekToStartTime(),i.playbackRate=n,(t||i._useAutoplay)&&i.mediaPlay(),i.off(HT,i.canPlayFunc),i.removeClass(iP)}})),PC(OC(i),"onFullscreenChange",(function(e,t){var n=function(){kT.setTimeout(OC(i),(function(){i.resize()}),100)},r=kT.getFullScreenEl();i._fullActionFrom?i._fullActionFrom="":i.emit(vS,{eventType:"system",action:"switch_fullscreen",pluginName:"player",currentTime:i.currentTime,duration:i.duration,props:[{prop:"fullscreen",from:!0,to:!1}]});var o=function(e,t,n){if(e){var i=e.getAttribute(n);return!(!i||i!==t||"VIDEO"!==e.tagName&&"AUDIO"!==e.tagName)}}(r,i.playerId,SS);if(t||r&&(r===i._fullscreenEl||o))n(),!i.config.closeFocusVideoFocus&&i.media.focus(),i.fullscreen=!0,i.changeFullStyle(i.root,r,fP),i.emit(rS,!0,i._fullScreenOffset),i.cssfullscreen&&i.exitCssFullscreen();else if(i.fullscreen){n();var a=OC(i),s=a._fullScreenOffset;if(a.config.needFullscreenScroll?(window.scrollTo(s.left,s.top),kT.setTimeout(OC(i),(function(){i.fullscreen=!1,i._fullScreenOffset=null}),100)):(!i.config.closeFocusVideoFocus&&i.media.focus(),i.fullscreen=!1,i._fullScreenOffset=null),i.cssfullscreen)i.removeClass(fP);else{var l=i._fullscreenEl;l||!i.root.contains(e.target)&&e.target!==i.root||(l=e.target),i.recoverFullStyle(i.root,l,fP)}i._fullscreenEl=null,i.emit(rS,!1)}})),PC(OC(i),"_onWebkitbeginfullscreen",(function(e){i._fullscreenEl=i.media,i.onFullscreenChange(e,!0)})),PC(OC(i),"_onWebkitendfullscreen",(function(e){i.onFullscreenChange(e,!1)})),DS(OC(i),zP),i.config=o,i._pluginInfoId=kT.generateSessionId(),(r=OC(i)).logInfo=mT.logInfo.bind(r),r.logWarn=mT.logWarn.bind(r),r.logError=mT.logError.bind(r);var a=i.constructor.defaultPreset;if(i.config.presets.length){var s,l=cw(s=i.config.presets).call(s,"default");l>=0&&a&&(i.config.presets[l]=a)}else a&&i.config.presets.push(a);if(i.userTimer=null,i.waitTimer=null,i.handleSource=!0,i._state=RP,i.isAd=!1,i.isError=!1,i._hasStart=!1,i.isSeeking=!1,i.isCanplay=!1,i._useAutoplay=!1,i.__startTime=-1,i.rotateDeg=0,i.isActive=!1,i.fullscreen=!1,i.cssfullscreen=!1,i.isRotateFullscreen=!1,i._fullscreenEl=null,i.timeSegments=[],i._cssfullscreenEl=null,i.curDefinition=null,i._orgCss="",i._fullScreenOffset=null,i._videoHeight=0,i._videoWidth=0,i.videoPos={pi:1,scale:0,rotate:-1,x:0,y:0,h:-1,w:-1,vy:0,vx:0},i.sizeInfo={width:0,height:0,left:0,top:0},i._accPlayed={t:0,acc:0,loopAcc:0},i._offsetInfo={currentTime:-1,duration:0},i.innerContainer=null,i.controls=null,i.topBar=null,i.root=null,i.__i18n=IP.init(i._pluginInfoId),ST.os.isAndroid&&ST.osVersion>0&&ST.osVersion<6&&(i.config.autoplay=!1),i.database=new ES,i.isUserActive=!1,i._onceSeekCanplay=null,i._isPauseBeforeSeek=0,i.innerStates={isActiveLocked:!1},i.instManager=GP,!i._initDOM())return console.error(new Error("can't find the dom which id is ".concat(i.config.id," or this.config.el does not exist"))),MC(i);var u=i.config,c=u.definition,h=void 0===c?{}:c;if(!u.url&&h.list&&h.list.length>0){var f,d=Wm(f=h.list).call(f,(function(e){return e.definition&&e.definition===h.defaultDefinition}));d||(h.defaultDefinition=h.list[0].definition,d=h.list[0]),i.config.url=d.url,i.curDefinition=d}return i._bindEvents(),i._registerPresets(),i._registerPlugins(),tP.onPluginsReady(OC(i)),i.getInitDefinition(),i.setState(OP),kT.setTimeout(OC(i),(function(){i.emit(WT)}),0),i.onReady&&i.onReady(),(i.config.videoInit||i.config.autoplay)&&(!i.hasStart||i.state<LP)&&i.start(),i}return SC(n,[{key:"_initDOM",value:function(){var e,t,n,i,r=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(DT,new RT("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=function(e){for(var t=hw(HP),n=0;n<t.length;n++){var i=HP[t[n]];if(i.root===e)return i}return null}(this.root);a&&(mT.logWarn("The is an Player instance already exists in this.root, destroy it and reinitialize"),a.destroy()),this.root.setAttribute(SS,this.playerId),null===(i=GP)||void 0===i||i.add(this),tP.init(this),this._initBaseDoms();var s=this.constructor.XgVideoProxy;if(s&&this.mediaConfig.mediaType===s.mediaType){var l=this.innerContainer||this.root;this.detachVideoEvents(this.media);var u=new s(l,this.config,this.mediaConfig);this.attachVideoEvents(u),this.media=u}if(this.media.setAttribute(SS,this.playerId),this.config.controls){var c=this.config.controls.root||null,h=tP.register(this,xP,{root:c});this.controls=h}var f="mobile"===this.config.isMobileSimulateMode?"mobile":ST.device;if(this.addClass(Fm(e=Fm(t=Fm(n="".concat(nP," ")).call(n,hP," xgplayer-")).call(t,f," ")).call(e,this.config.controls?"":mP)),this.config.autoplay?this.addClass(iP):this.addClass(cP),this.config.fluid){var d=this.config,p=d.width,v=d.height;"number"==typeof p&&"number"==typeof v||(p=600,v=337.5);var g={width:"100%",height:"0","max-width":"100%","padding-top":"".concat(100*v/p,"%")};hw(g).forEach((function(e){r.root.style[e]=g[e]}))}else["width","height"].forEach((function(e){r.config[e]&&("number"!=typeof r.config[e]?r.root.style[e]=r.config[e]:r.root.style[e]="".concat(r.config[e],"px"))}));var y=this.root.getBoundingClientRect(),m=y.width,_=y.height,k=y.left,b=y.top;return this.sizeInfo.width=m,this.sizeInfo.height=_,this.sizeInfo.left=k,this.sizeInfo.top=b,!0}},{key:"_initBaseDoms",value:function(){this.topBar=null,this.leftBar=null,this.rightBar=null,this.config.marginControls&&(this.innerContainer=kT.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()+fw(t).call(t,1)])})),CS.forEach((function(t){document&&document.addEventListener(t,e.onFullscreenChange)})),ST.os.isIos&&(this.media.addEventListener("webkitbeginfullscreen",this._onWebkitbeginfullscreen),this.media.addEventListener("webkitendfullscreen",this._onWebkitendfullscreen)),this.once(zT,this.resize),this.playFunc=function(){e.config.closeFocusVideoFocus||e.media.focus()},this.once(OT,this.playFunc)}},{key:"_unbindEvents",value:function(){var e=this;this.root.removeEventListener("mousemove",this.mousemoveFunc),CS.forEach((function(t){document.removeEventListener(t,e.onFullscreenChange)})),this.playFunc&&this.off(OT,this.playFunc),this.off(HT,this.canPlayFunc),this.media.removeEventListener("webkitbeginfullscreen",this._onWebkitbeginfullscreen),this.media.removeEventListener("webkitendfullscreen",this._onWebkitendfullscreen)}},{key:"_clearUserTimer",value:function(){this.userTimer&&(kT.clearTimeout(this,this.userTimer),this.userTimer=null)}},{key:"_startInit",value:function(e){var t=this;if(this.media&&(e&&""!==e&&("Array"!==kT.typeOf(e)||0!==e.length)||(e="",this.emit(YT),mT.logWarn("config.url is null, please get url and run player._startInit(url)"),!this.config.nullUrlStart))){this.handleSource&&(this._detachSourceEvents(this.media),"Array"===kT.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"===kT.typeOf(this.config.volume)&&(this.volume=this.config.volume);var n=this.innerContainer?this.innerContainer:this.root;this.media instanceof window.Element&&!n.contains(this.media)&&n.insertBefore(this.media,n.firstChild);var i=this.media.readyState;mT.logInfo("_startInit readyState",i),this.config.autoplay&&(!kT.isMSE(this.media)&&this.load(),(ST.os.isIpad||ST.os.isPhone)&&this.mediaPlay());var r=this.config.startTime;this.__startTime=r>0?r:-1,this.config.startTime=0,i>=2&&this.duration>0?this.canPlayFunc():this.on(HT,this.canPlayFunc),(!this.hasStart||this.state<LP)&&tP.afterInit(this),this.hasStart=!0,this.setState(LP),kT.setTimeout(this,(function(){t.emit($T)}),0)}}},{key:"_registerPlugins",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._loadingPlugins=[];var n=this.config.ignores||[],i=this.config.plugins||[],r=this.config.i18n||[];t&&IP.extend(r,this.__i18n);var o=n.join("||").toLowerCase().split("||"),a=this.plugins;i.forEach((function(n){try{var i=n.plugin?n.plugin.pluginName:n.pluginName;if(i&&cw(o).call(o,i.toLowerCase())>-1)return null;if(!t&&a[i.toLowerCase()])return;if(n.lazy&&n.loader){var r=tP.lazyRegister(e,n);return void(n.forceBeforeInit&&(r.then((function(){var t,n;Mw(t=e._loadingPlugins).call(t,cw(n=e._loadingPlugins).call(n,r),1)})).catch((function(t){var n,i;mT.logError("_registerPlugins:loadingPlugin",t),Mw(n=e._loadingPlugins).call(n,cw(i=e._loadingPlugins).call(i,r),1)})),e._loadingPlugins.push(r)))}return e.registerPlugin(n)}catch(s){mT.logError("_registerPlugins:",s)}}))}},{key:"_registerPresets",value:function(){var e=this;this.config.presets.forEach((function(t){!function(e,t){var n,i,r,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,u=void 0===l?[]:l,c=o.icons,h=void 0===c?{}:c,f=o.i18n,d=void 0===f?[]:f;e.config.plugins||(e.config.plugins=[]),e.config.ignores||(e.config.ignores=[]),(i=e.config.plugins).push.apply(i,NC(s)),(r=e.config.ignores).push.apply(r,NC(u)),Ub(n=hw(h)).call(n,(function(t){e.config.icons[t]||(e.config.icons[t]=h[t])}));var p=e.config.i18n||[];d.push.apply(d,NC(p)),e.config.i18n=d}(e,t)}))}},{key:"_getRootByPosition",value:function(e){var t=null;switch(e){case YS.ROOT_RIGHT:this.rightBar||(this.rightBar=kT.createPositionBar("xg-right-bar",this.root)),t=this.rightBar;break;case YS.ROOT_LEFT:this.leftBar||(this.leftBar=kT.createPositionBar("xg-left-bar",this.root)),t=this.leftBar;break;case YS.ROOT_TOP:this.topBar||(this.topBar=kT.createPositionBar("xg-top-bar",this.root),this.config.topBarAutoHide&&kT.addClass(this.topBar,bP)),t=this.topBar;break;default:t=this.innerContainer||this.root}return t}},{key:"registerPlugin",value:function(e,t){var n=tP.formatPluginInfo(e,t),i=n.PLUFGIN,r=n.options,o=this.config.plugins;!tP.checkPluginIfExits(i.pluginName,o)&&o.push(i);var a=tP.getRootByConfig(i.pluginName,this.config);a.root&&(r.root=a.root),a.position&&(r.position=a.position);var s,l=r.position?r.position:r.config&&r.config.position||i.defaultConfig&&i.defaultConfig.position;return!r.root&&"string"==typeof l&&cw(l).call(l,"controls")>-1?null===(s=this.controls)||void 0===s?void 0:s.registerPlugin(i,r,i.pluginName):(r.root||(r.root=this._getRootByPosition(l)),tP.register(this,i,r))}},{key:"deregister",value:function(e){"string"==typeof e?tP.unRegister(this,e):e instanceof HS&&tP.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 HS&&(t=e.pluginName),t)for(var n=this.config.plugins.length-1;n>-1;n--){if(this.config.plugins[n].pluginName.toLowerCase()===t.toLowerCase()){var i;Mw(i=this.config.plugins).call(i,n,1);break}}}},{key:"plugins",get:function(){return tP.getPlugins(this)}},{key:"getPlugin",value:function(e){var t=tP.findPlugin(this,e);return t&&t.pluginName?t:null}},{key:"addClass",value:function(e){this.root&&(kT.hasClass(this.root,e)||kT.addClass(this.root,e))}},{key:"removeClass",value:function(e){this.root&&kT.removeClass(this.root,e)}},{key:"hasClass",value:function(e){if(this.root)return kT.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>MP))return e||this.config.url||this.getInitDefinition(),this.hasStart=!0,this.setState(MP),this._registerPlugins(!1),tP.beforeInit(this).then((function(){if(t.config){e||(e=t.url||t.config.url);var n=t.preProcessUrl(e);return t._startInit(n.url)}})).catch((function(e){throw e.fileName="player",e.lineNumber="236",mT.logError("start:beforeInit:",e),e}))}},{key:"switchURL",value:function(e,t){var n=this,i=e;"Object"===kT.typeOf(e)&&(i=e.url),i=this.preProcessUrl(i).url;var r=this.currentTime;this.__startTime=r;var o=this.paused&&!this.isError;return this.src=i,new Hb((function(e,t){var r=function(e){n.off("timeupdate",a),n.off("canplay",a),t(e)},a=function(){n._seekToStartTime(),o&&n.pause(),n.off("error",r),e(!0)};n.once("error",r),i?(ST.os.isAndroid?n.once("timeupdate",a):n.once("canplay",a),n.play()):n.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<LP)return this.removeClass(cP),this.addClass(iP),this.start(),void(this._useAutoplay=!0);this.state<NP&&(this.removeClass(cP),!this.isCanplay&&this.addClass(iP));var t=DC(IC(n.prototype),"play",this).call(this);return void 0!==t&&t&&t.then?t.then((function(){e.removeClass(wP),e.addClass(oP),e.state<NP&&(mT.logInfo(">>>>playPromise.then"),e.setState(NP),e.emit(XT))})).catch((function(t){if(mT.logWarn(">>>>playPromise.catch",t.name),e.media&&e.media.error)return e.onError(),void e.removeClass(iP);"NotAllowedError"===t.name&&(e._errorTimer=kT.setTimeout(e,(function(){e._errorTimer=null,e.emit(qT),e.addClass(wP),e.removeClass(iP),e.pause(),e.setState(DP)}),0))})):(mT.logWarn("video.play not return promise"),this.state<NP&&(this.setState(NP),this.removeClass(wP),this.removeClass(cP),this.removeClass(iP),this.addClass(oP),this.emit(XT))),t}},{key:"mediaPause",value:function(){DC(IC(n.prototype),"pause",this).call(this)}},{key:"videoPause",value:function(){DC(IC(n.prototype),"pause",this).call(this)}},{key:"play",value:function(){var e=this;return this.removeClass(rP),FS(this,"play",(function(){return e.mediaPlay()}))}},{key:"pause",value:function(){var e=this;FS(this,"pause",(function(){DC(IC(n.prototype),"pause",e).call(e)}))}},{key:"seek",value:function(e,t){var n=this;if(this.media&&!Lw(Number(e))&&this.hasStart){var i=this.config,r=i.isSeekedPlay,o=i.seekedStatus,a=t||(r?"play":o);e=e<0?0:e>this.duration?nE(this.duration,10):e,!this._isPauseBeforeSeek&&(this._isPauseBeforeSeek=this.paused?2:1),this._onceSeekCanplay&&this.off(NT,this._onceSeekCanplay),this._onceSeekCanplay=function(){switch(n.removeClass(iP),n.isSeeking=!1,a){case"play":n.play();break;case"pause":n.pause();break;default:n._isPauseBeforeSeek>1||n.paused?n.pause():n.play()}n._isPauseBeforeSeek=0,n._onceSeekCanplay=null},this.once(NT,this._onceSeekCanplay),this.state<NP?(this.removeClass(cP),this.currentTime=e,this.play()):this.currentTime=e}}},{key:"getInitDefinition",value:function(){var e,t=this,n=this.config,i=n.definition;!n.url&&i&&i.list&&i.list.length>0&&i.defaultDefinition&&Ub(e=i.list).call(e,(function(e){e.definition===i.defaultDefinition&&(t.config.url=e.url,t.curDefinition=e)}))}},{key:"changeDefinition",value:function(e,t){var n=this,i=this.config.definition;if(Array.isArray(null==i?void 0:i.list)&&i.list.forEach((function(t){(null==e?void 0:e.definition)===t.definition&&(n.curDefinition=t)})),null!=e&&e.bitrate&&"number"!=typeof e.bitrate&&(e.bitrate=nE(e.bitrate,10)||0),this.emit(sS,{from:t,to:e}),this.hasStart){var r=this.switchURL(e.url,EC({seamless:!1!==i.seamless&&"undefined"!=typeof MediaSource&&"function"==typeof MediaSource.isTypeSupported},e));r&&r.then?r.then((function(){n.emit(uS,{from:t,to:e})})):this.emit(uS,{from:t,to:e})}else this.config.url=e.url}},{key:"reload",value:function(){this.load(),this.reloadFunc=function(){this.play()},this.once(zT,this.reloadFunc)}},{key:"resetState",value:function(){var e=this,t=[wP,oP,cP,rP,uP,iP,aP,lP,sP];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(cP),this.emit(gS)}},{key:"reset",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;if(this.resetState(),this.plugins&&(Ub(t).call(t,(function(t){e.deregister(t)})),n)){var i,r=CP();cE(i=hw(this.config)).call(i,(function(t){"undefined"===e.config[t]||"plugins"!==t&&"presets"!==t&&"el"!==t&&"id"!==t||(e.config[t]=r[t])}))}}},{key:"destroy",value:function(){var e,t,i=this,r=this.innerContainer,o=this.root,a=this.media;if(o&&a){if(this.hasStart=!1,this._useAutoplay=!1,o.removeAttribute(SS),this.updateAcc("destroy"),this._unbindEvents(),this._detachSourceEvents(this.media),kT.clearAllTimers(this),this.emit(JT),null===(t=GP)||void 0===t||t.remove(this),tP.destroy(this),NS(this),DC(IC(n.prototype),"destroy",this).call(this),this.fullscreen&&this._fullscreenEl===this.root&&this.exitFullscreen(),r)for(var s=r.children,l=0;l<s.length;l++)r.removeChild(s[l]);!r&&a instanceof window.Node&&o.contains(a)&&o.removeChild(a),Ub(e=["topBar","leftBar","rightBar","innerContainer"]).call(e,(function(e){i[e]&&o.removeChild(i[e]),i[e]=null}));var u=o.className.split(" ");u.length>0?o.className=jb(u).call(u,(function(e){return cw(e).call(e,"xgplayer")<0})).join(" "):o.className="",this.removeAttribute("data-xgfill"),["isSeeking","isCanplay","isActive","cssfullscreen","fullscreen"].forEach((function(e){i[e]=!1}))}}},{key:"replay",value:function(){var e=this;this.removeClass(aP),this.currentTime=0,this.isSeeking=!1,FS(this,"replay",(function(){e.once(NT,(function(){var t=e.mediaPlay();t&&t.catch&&t.catch((function(e){console.log(e)}))})),e.emit(ZT),e.onPlay()}))}},{key:"retry",value:function(){var e=this;this.removeClass(lP),this.addClass(sP),FS(this,"retry",(function(){var t=e.currentTime,n=e.config.url,i=kT.isMSE(e.media)?{url:n}:e.preProcessUrl(n);e.src=i.url,!e.config.isLive&&(e.currentTime=t),e.once(HT,(function(){e.mediaPlay()}))}))}},{key:"changeFullStyle",value:function(e,t,n,i){e&&(i||(i=gP),this._orgCss||(this._orgCss=kT.filterStyleFromText(e)),kT.addClass(e,n),t&&t!==e&&!this._orgPCss&&(this._orgPCss=kT.filterStyleFromText(t),kT.addClass(t,i),t.setAttribute(SS,this.playerId)))}},{key:"recoverFullStyle",value:function(e,t,n,i){i||(i=gP),this._orgCss&&(kT.setStyleFromCsstext(e,this._orgCss),this._orgCss=""),kT.removeClass(e,n),t&&t!==e&&this._orgPCss&&(kT.setStyleFromCsstext(t,this._orgPCss),this._orgPCss="",kT.removeClass(t,i),t.removeAttribute(SS))}},{key:"getFullscreen",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.fullscreenTarget,t=this.root,n=this.media;if("video"!==e&&"media"!==e||(e=this[e]),e||(e=t),this._fullScreenOffset={top:kT.scrollTop(),left:kT.scrollLeft()},this._fullscreenEl=e,this._fullActionFrom="get",kT.getFullScreenEl()===this._fullscreenEl)return this.onFullscreenChange(),Hb.resolve();try{for(var i=0;i<xS.length;i++){var r=xS[i];if(e[r]){var o="webkitRequestFullscreen"===r?e.webkitRequestFullscreen(window.Element.ALLOW_KEYBOARD_INPUT):e[r]();return o&&o.then?o:Hb.resolve()}}return n.fullscreenEnabled||n.webkitSupportsFullscreen?(n.webkitEnterFullscreen(),Hb.resolve()):Hb.reject(new Error("call getFullscreen fail"))}catch(a){return Hb.reject(new Error("call getFullscreen fail"))}}},{key:"exitFullscreen",value:function(e){if(this.isRotateFullscreen&&this.exitRotateFullscreen(),this._fullscreenEl||kT.getFullScreenEl()){this.root;var t=this.media;this._fullActionFrom="exit";try{for(var n=0;n<TS.length;n++){var i=TS[n];if(document[i]){var r=document[i]();return r&&r.then?r:Hb.resolve()}}return t&&t.webkitSupportsFullscreen?(t.webkitExitFullScreen(),Hb.resolve()):Hb.reject(new Error("call exitFullscreen fail"))}catch(o){return Hb.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 n=t?Fm(e="".concat(yP," ")).call(e,dP):dP;this.changeFullStyle(this.root,t,n);var i=this.config.fullscreen,r=void 0===i?{}:i;(!0===r.useCssFullscreen||"function"==typeof r.useCssFullscreen&&r.useCssFullscreen())&&(this.fullscreen=!0,this.emit(rS,!0)),this._cssfullscreenEl=t,this.cssfullscreen=!0,this.emit(oS,!0)}},{key:"exitCssFullscreen",value:function(){var e,t=this._cssfullscreenEl?Fm(e="".concat(yP," ")).call(e,dP):dP;if(this.fullscreen){var n=this.config.fullscreen,i=void 0===n?{}:n;!0===i.useCssFullscreen||"function"==typeof i.useCssFullscreen&&i.useCssFullscreen()?(this.recoverFullStyle(this.root,this._cssfullscreenEl,t),this.fullscreen=!1,this.emit(rS,!1)):this.removeClass(t)}else this.recoverFullStyle(this.root,this._cssfullscreenEl,t);this._cssfullscreenEl=null,this.cssfullscreen=!1,this.emit(oS,!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 n=t?Fm(e="".concat(yP," ")).call(e,pP):pP;this._fullscreenEl=t||this.root,this.changeFullStyle(this.root,t,n,vP),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(rS,!0)}},{key:"exitRotateFullscreen",value:function(e){var t,n=this._fullscreenEl!==this.root?Fm(t="".concat(yP," ")).call(t,pP):pP;this.recoverFullStyle(this.root,this._fullscreenEl,n,vP),this.isRotateFullscreen=!1,this.fullscreen=!1,this.setRotateDeg(0),this.emit(rS,!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(KT,EC({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(GT,EC({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},n=this.innerStates;if(this.isActive=!0,this.removeClass(hP),this._clearUserTimer(),void 0!==t.isLock&&(n.isActiveLocked=t.isLock),!1===t.autoHide||!0===t.isLock||n.isActiveLocked)this._clearUserTimer();else{var i=t&&t.delay?t.delay:this.config.inactive;this.userTimer=kT.setTimeout(this,(function(){e.userTimer=null,e.blur()}),i)}}},{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 n=this.config.closePauseVideoFocus;this.isActive=!1,(t||n||!this.paused&&!this.ended)&&this.addClass(hP)}}},{key:"onEmptied",value:function(){this.updateAcc("emptied")}},{key:"onCanplay",value:function(){this.removeClass(iP),this.removeClass(lP),this.removeClass(sP),this.isCanplay=!0,this.waitTimer&&kT.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(jT,(function(){e._seekToStartTime()})))}},{key:"onLoadstart",value:function(){this.removeClass(lP),this.isCanplay=!1}},{key:"onPlay",value:function(){this.state===FP&&this.setState(NP),this.removeClass(rP),this.ended&&this.removeClass(aP),!this.config.closePlayVideoFocus&&this.focus()}},{key:"onPause",value:function(){this.addClass(rP),this.updateAcc("pause"),this.config.closePauseVideoFocus||(this._clearUserTimer(),this.focus())}},{key:"onEnded",value:function(){this.updateAcc("ended"),this.addClass(aP),this.setState(FP)}},{key:"onError",value:function(){this.isError=!0,this.updateAcc("error"),this.removeClass(wP),this.removeClass(cP),this.removeClass(iP),this.removeClass(sP),this.addClass(lP)}},{key:"onSeeking",value:function(){this.isSeeking||this.updateAcc("seeking"),this.isSeeking=!0,this.addClass(EP)}},{key:"onSeeked",value:function(){this.isSeeking=!1,this.waitTimer&&kT.clearTimeout(this,this.waitTimer),this.removeClass(sP),this.removeClass(EP)}},{key:"onWaiting",value:function(){var e=this;this.waitTimer&&kT.clearTimeout(this,this.waitTimer),this.updateAcc("waiting"),this.waitTimer=kT.setTimeout(this,(function(){e.addClass(sP),e.emit(iS),kT.clearTimeout(e,e.waitTimer),e.waitTimer=null}),this.config.minWaitDelay)}},{key:"onPlaying",value:function(){var e=this;this.isError=!1,[cP,rP,aP,lP,uP,sP].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(sP))&&this.media.readyState>2&&(this.removeClass(sP),kT.clearTimeout(this,this.waitTimer),this.waitTimer=null),!this.paused&&this.state===DP&&this.duration&&(this.setState(NP),this.emit(XT)),this._accPlayed.t||this.paused||this.ended||(this._accPlayed.t=(new Date).getTime())}},{key:"onVolumechange",value:function(){"Number"===kT.typeOf(this.config.volume)&&(this.config.volume=this.volume)}},{key:"onRatechange",value:function(){this.config.defaultPlaybackRate=this.playbackRate}},{key:"emitUserAction",value:function(e,t,n){if(this.media&&t&&e){var i="String"===kT.typeOf(e)?e:e.type||"";n.props&&"Array"!==kT.typeOf(n.props)&&(n.props=[n.props]),this.emit(vS,EC({eventType:i,action:t,currentTime:this.currentTime,duration:this.duration,ended:this.ended,event:e},n))}}},{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})||{},n=t.startDiff,i=void 0===n?0:n,r=t.endDiff,o=void 0===r?0:r,a=this.media.buffered;if(!a||0===a.length||!this.duration)return!0;for(var s=e||this.media.currentTime||.2,l=a.length,u=0;u<l;u++)if(a.start(u)+i<=s&&a.end(u)-o>s)return!0;return!1}},{key:"resizePosition",value:function(){var e=this.videoPos,t=e.vy,n=e.vx,i=e.h,r=e.w,o=this.videoPos.rotate;if(!(o<0&&i<0&&r<0)){var a=this.videoPos._pi;if(!a&&this.media.videoHeight&&(a=this.media.videoWidth/this.media.videoHeight*100),a){this.videoPos.pi=a;var s={rotate:o=o<0?0:o},l=0,u=0,c=1,h=Math.abs(o/90),f=this.root,d=this.innerContainer,p=f.offsetWidth,v=d?d.offsetHeight:f.offsetHeight,g=v,y=p;if(h%2==0)c=i>0?100/i:r>0?100/r:1,s.scale=c,l=t>0?(100-i)/2-t:0,s.y=2===h?0-l:l,u=n>0?(100-r)/2-n:0,s.x=2===h?0-u:u,this.media.style.width="".concat(y,"px"),this.media.style.height="".concat(g,"px");else if(h%2==1){g=p;var m=v-p;u=-m/2/(y=v)*100,s.x=3===h?u+t/2:u-t/2,l=m/2/g*100,s.y=3===h?l+n/2:l-n/2,s.scale=c,this.media.style.width="".concat(y,"px"),this.media.style.height="".concat(g,"px")}var _=kT.getTransformStyle(s,this.media.style.transform||this.media.style.webkitTransform);this.media.style.transform=_,this.media.style.webkitTransform=_}}}},{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,n=this;e&&Ub(t=hw(e)).call(t,(function(t){if("plugins"!==t){n.config[t]=e[t];var i=n.plugins[t.toLowerCase()];i&&"Function"===kT.typeOf(i.setConfig)&&i.setConfig(e[t])}}))}},{key:"playNext",value:function(e){var t=this;this.resetState(),this.setConfig(e),this._currentTime=0,this._duration=0,FS(this,"playnext",(function(){t.start(),t.emit(dS,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 n=this.media,i=n.videoWidth,r=n.videoHeight,o=this.config,a=o.fitVideoSize,s=o.videoFillMode;if("fill"!==s&&"cover"!==s&&"contain"!==s||this.setAttribute("data-xgfill",s),r&&i){this._videoHeight=r,this._videoWidth=i;var l=this.controls&&this.innerContainer?this.controls.root.getBoundingClientRect().height:0,u=t.width,c=t.height-l,h=nE(i/r*1e3,10),f=nE(u/c*1e3,10),d=u,p=c,v={};"auto"===a&&f>h||"fixWidth"===a?(p=u/h*1e3,this.config.fluid?v.paddingTop="".concat(100*p/d,"%"):v.height="".concat(p+l,"px")):("auto"===a&&f<h||"fixHeight"===a)&&(d=h*c/1e3,v.width="".concat(d,"px")),this.fullscreen||this.cssfullscreen||hw(v).forEach((function(t){e.root.style[t]=v[t]})),("fillHeight"===s&&f<h||"fillWidth"===s&&f>h)&&this.setAttribute("data-xgfill","cover");var g={videoScale:h,vWidth:d,vHeight:p,cWidth:d,cHeight:p+l};this.resizePosition(),this.emit(hS,g)}}}},{key:"updateObjectPosition",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.media.updateObjectPosition?this.media.updateObjectPosition(t,n):this.media.style.objectPosition=Fm(e="".concat(100*t,"% ")).call(e,100*n,"%")}},{key:"setState",value:function(e){var t;mT.logInfo("setState",Fm(t="state from:".concat(UP[this.state]," to:")).call(t,UP[e])),this._state=e}},{key:"preProcessUrl",value:function(e,t){var n=this.config,i=n.preProcessUrl,r=n.preProcessUrlOptions,o=xE({},r,t);return kT.isBlob(e)||"function"!=typeof i?{url:e}:i(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(OP),this.emit("hasstart"))}},{key:"isPlaying",get:function(){return this._state===NP||this._state===FP},set:function(e){e?this.setState(NP):this._state>=NP&&this.setState(LP)}},{key:"definitionList",get:function(){return this.config&&this.config.definition&&this.config.definition.list||[]},set:function(e){var t=this,n=this.config.definition,i=null,r=null;n.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&&(i=e),n.defaultDefinition===e.definition&&(r=e)})),!r&&e.length>0&&(r=e[0]),i?this.changeDefinition(i):r&&this.changeDefinition(r)}},{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=nE(this.cumulateTime/e.total*e.dropped,0)),e}},{key:"lang",get:function(){return this.config.lang},set:function(e){var t,n;0!==jb(t=IP.langKeys).call(t,(function(t){return t===e})).length||"zh"===e?(this.config.lang=e,tP.setLang(e,this)):console.error(Fm(n="Sorry, set lang fail, because the language [".concat(e,"] is not supported now, list of all supported languages is [")).call(n,IP.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 PT}},{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 DC(IC(n.prototype),"readyState",this)}},{key:"error",get:function(){var e=DC(IC(n.prototype),"error",this);return this.i18n[e]||e}},{key:"networkState",get:function(){return DC(IC(n.prototype),"networkState",this)}},{key:"fullscreenChanging",get:function(){return!(null===this._fullScreenOffset)}},{key:"cumulateTime",get:function(){var e=this._accPlayed,t=e.acc,n=e.t;return n?(new Date).getTime()-n+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=kT.convertDeg(e))%90==0&&e!==this.videoPos.rotate&&(this.videoPos.rotate=e,this.resizePosition())}},{key:"avgSpeed",get:function(){return KP},set:function(e){KP=e}},{key:"realTimeSpeed",get:function(){return VP},set:function(e){VP=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 n;return AS.call.apply(AS,Fm(n=[this]).call(n,fw(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){var n;return RS.call.apply(RS,Fm(n=[this]).call(n,fw(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){var n;return OS.call.apply(OS,Fm(n=[this]).call(n,fw(Array.prototype).call(arguments)))}},{key:"usePluginHooks",value:function(e,t,n){for(var i,r=arguments.length,o=new Array(r>3?r-3:0),a=3;a<r;a++)o[a-3]=arguments[a];return MS.call.apply(MS,Fm(i=[this]).call(i,fw(Array.prototype).call(arguments)))}},{key:"removePluginHooks",value:function(e,t,n){for(var i,r=arguments.length,o=new Array(r>3?r-3:0),a=3;a<r;a++)o[a-3]=arguments[a];return LS.call.apply(LS,Fm(i=[this]).call(i,fw(Array.prototype).call(arguments)))}},{key:"setUserActive",value:function(e,t){var n;"boolean"==typeof t&&t!==this.muted&&(this.addInnerOP("volumechange"),kT.typeOf(t)===Boolean&&(this.muted=t)),null===(n=GP)||void 0===n||n.setActive(this.playerId,e)}}],[{key:"debugger",get:function(){return mT.config.debug},set:function(e){mT.config.debug=e}},{key:"instManager",get:function(){return GP},set:function(e){GP=e}},{key:"getCurrentUserActivePlayerId",value:function(){var e;return null===(e=GP)||void 0===e?void 0:e.getActiveId()}},{key:"setCurrentUserActive",value:function(e,t){var n;null===(n=GP)||void 0===n||n.setActive(e,t)}},{key:"isHevcSupported",value:function(){return ST.isHevcSupported()}},{key:"probeConfigSupported",value:function(e){return ST.probeConfigSupported(e)}},{key:"install",value:function(e,t){n.plugins||(n.plugins={}),n.plugins[e]||(n.plugins[e]=t)}},{key:"use",value:function(e,t){n.plugins||(n.plugins={}),n.plugins[e]=t}}]),n}(wS);PC(WP,"defaultPreset",null),PC(WP,"XgVideoProxy",null),WP.instManager=BP.getInstance();function YP(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var XP=GE;An({target:"Function",proto:!0,forced:Function.bind!==XP},{bind:XP});var qP,$P,ZP=Vc("Function").bind,JP=se,QP=ZP,eA=Function.prototype,tA=n((function(e){var t=e.bind;return e===eA||JP(eA,e)&&t===eA.bind?QP:t}));function nA(e,t){var n;return(nA=dh?tA(n=dh).call(n):function(e,t){return e.__proto__=t,e})(e,t)}function iA(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Oc(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Ic(e,"prototype",{writable:!1}),t&&nA(e,t)}function rA(e){var t;return(rA=dh?tA(t=Fc).call(t):function(e){return e.__proto__||Fc(e)})(e)}function oA(){if("undefined"==typeof Reflect||!sC)return!1;if(sC.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(sC(Boolean,[],(function(){}))),!0}catch(e){return!1}}function aA(e){var t=oA();return function(){var n,i=rA(e);if(t){var r=rA(this).constructor;n=sC(i,arguments,r)}else n=i.apply(this,arguments);return function(e,t){if(t&&("object"===wc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return YP(e)}(this,n)}}function sA(e,t,n){var i;oA()?sA=tA(i=sC).call(i):sA=function(e,t,n){var i=[null];hh(i).apply(i,t);var r=new(tA(Function).apply(e,i));return n&&nA(r,n.prototype),r};return sA.apply(null,arguments)}function lA(e){var t="function"==typeof Rb?new Rb:void 0;return lA=function(e){if(null===e||(n=e,-1===Rm(i=Function.toString.call(n)).call(i,"[native code]")))return e;var n,i;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 sA(e,arguments,rA(this).constructor)}return r.prototype=Oc(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),nA(r,e)},lA(e)}var uA=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_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_BWAITING_TIMEOUT_ERROR=9002]="RUNTIME_BWAITING_TIMEOUT_ERROR",e[e.MODULE_LOAD_ERROR=110]="MODULE_LOAD_ERROR",e.UNKNOWN="UNKNOWN",e}(uA||{}),cA=(zy(qP={},2100,{messageTextKey:"NETWORK",level:"Error"}),zy(qP,2101,{messageTextKey:"NETWORK_TIMEOUT",level:"Error"}),zy(qP,2103,{messageTextKey:"NETWORK_FORBIDDEN",level:"Error"}),zy(qP,2104,{messageTextKey:"NETWORK_NOTFOUND",level:"Error"}),zy(qP,5101,{messageTextKey:"MEDIA_ERR_ABORTED",level:"Error"}),zy(qP,5102,{messageTextKey:"MEDIA_ERR_NETWORK",level:"Error"}),zy(qP,5103,{messageTextKey:"MEDIA_ERR_DECODE",level:"Error"}),zy(qP,5104,{messageTextKey:"MEDIA_ERR_SRC_NOT_SUPPORTED",level:"Error"}),zy(qP,5105,{messageTextKey:"MEDIA_ERR_CODEC_NOT_SUPPORTED",level:"Error"}),zy(qP,5106,{messageTextKey:"MEDIA_ERR_URL_EMPTY",level:"Error"}),zy(qP,110,{messageTextKey:"MODULE_LOAD_ERROR",level:"Fatal"}),zy(qP,7100,{messageTextKey:"DRM_LICENSE",level:"Fatal"}),qP),hA=(zy($P={},"manifest",{messageTextKey:"MANIFEST",level:"Error"}),zy($P,"network",{messageTextKey:"NETWORK",level:"Error"}),zy($P,"demux",{messageTextKey:"DEMUX",level:"Error"}),zy($P,"remux",{messageTextKey:"REMUX",level:"Error"}),zy($P,"media",{messageTextKey:"MEDIA",level:"Error"}),zy($P,"drm",{messageTextKey:"DRM",level:"Error"}),zy($P,"other",{messageTextKey:"OTHER",level:"Error"}),zy($P,"runtime",{messageTextKey:"RUNTIME",level:"Error"}),$P),fA=function(e){iA(n,e);var t=aA(n);function n(e,i){var r,o,a,s,l,u,c;mm(this,n);var h="string"==typeof e?{message:e}:e,f=null!==(r=null!==(o=null!==(a=null==i?void 0:i.getText(null==h?void 0:h.messageTextKey))&&void 0!==a?a:null==h?void 0:h.message)&&void 0!==o?o:null==h||null===(s=h.error)||void 0===s?void 0:s.message)&&void 0!==r?r:null==i?void 0:i.getText("UNKNOWN");return zy(YP(c=t.call(this,f)),"errorCode",void 0),zy(YP(c),"level",void 0),zy(YP(c),"ext",void 0),c.errorCode=null!==(l=null==h?void 0:h.errorCode)&&void 0!==l?l:"UNKNOWN",c.level=null!==(u=null==h?void 0:h.level)&&void 0!==u?u:"Error",c.ext=null==h?void 0:h.ext,c}return km(n)}(lA(Error));function dA(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return new fA(Ky(Ky({errorCode:e},cA[e]),t),n)}function pA(e,t){var n,i,r=cA[e.errorCode]||hA[e.errorType],o=e.errorCode;return new fA({messageTextKey:null==r?void 0:r.messageTextKey,message:null!==(n=null==e?void 0:e.message)&&void 0!==n?n:o,errorCode:o,level:null!==(i=null==r?void 0:r.level)&&void 0!==i?i:"Error",ext:e},t)}var vA=function(e){AC(n,e);var t=LC(n);function n(){return xC(this,n),t.apply(this,arguments)}return SC(n,[{key:"isEndedShow",get:function(){return this.config.isEndedShow},set:function(e){this.config.isEndedShow=e}},{key:"hide",value:function(){kT.addClass(this.root,"hide")}},{key:"show",value:function(e){kT.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(MT,(function(){e.isEndedShow&&kT.removeClass(e.root,"hide")})),this.config.hideCanplay?(this.once(FT,(function(){e.onTimeUpdate()})),this.on(QT,(function(){kT.removeClass(e.root,"hide"),kT.addClass(e.root,"xg-showplay"),e.once(FT,(function(){e.onTimeUpdate()}))}))):this.on(OT,(function(){kT.addClass(e.root,"hide")}))}},{key:"setConfig",value:function(e){var t=this;hw(e).forEach((function(n){t.config[n]=e[n]}));var n=this.config.poster;this.update(n)}},{key:"onTimeUpdate",value:function(){var e=this;this.player.currentTime?kT.removeClass(this.root,"xg-showplay"):this.once(FT,(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,n=this.config,i=n.poster,r=n.hideCanplay,o=n.fillMode,a=n.notHidden,s=this.getBgSize(o),l=i?Fm(e="background-image:url(".concat(i,");")).call(e,s):s;return Fm(t='<xg-poster class="xgplayer-poster '.concat(a?"xg-not-hidden":r?"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"}}}]),n}(JS);function gA(){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 yA(){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 mA={};function _A(e){var t;e?window.clearTimeout(e):Ub(t=hw(mA)).call(t,(function(e){window.clearTimeout(mA[e].id),delete mA[e]}))}var kA=function(e){AC(n,e);var t=LC(n);function n(e){var i;return xC(this,n),PC(OC(i=t.call(this,e)),"onPlayerReset",(function(){i.autoPlayStart=!1;var e="auto"===i.config.mode?"auto-hide":"hide";i.setAttr("data-state","play"),kT.removeClass(i.root,e),i.show()})),PC(OC(i),"onAutoplayStart",(function(){if(!i.autoPlayStart){var e="auto"===i.config.mode?"auto-hide":"hide";kT.addClass(i.root,e),i.autoPlayStart=!0,i.toggleTo("play")}})),i.autoPlayStart=!1,i}return SC(n,[{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,n=this.playerConfig;this.once(WT,(function(){n&&(n.lang&&"en"===n.lang?kT.addClass(t.root,"lang-is-en"):"jp"===n.lang&&kT.addClass(t.root,"lang-is-jp"))})),this.on(XT,this.onAutoplayStart),this.on(qT,(function(){var t="auto"===e.config.mode?"auto-hide":"hide";e.setAttr("data-state","play"),kT.removeClass(e.root,t),e.show()})),this.on(OT,(function(){e.toggleTo("play")})),this.on(LT,(function(){e.toggleTo("pause")})),this.on(gS,(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 n=e.player.paused;e.emitUserAction(t,"switch_play_pause",{props:"paused",from:n,to:!n})}}),this.bind(["click","touchend"],this.clickHandler)}},{key:"registerIcons",value:function(){return{startPlay:{icon:gA,class:"xg-icon-play"},startPause:{icon:yA,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(){kT.addClass(this.root,"hide")}},{key:"show",value:function(e){kT.removeClass(this.root,"hide")}},{key:"focusHide",value:function(){kT.addClass(this.root,"focus-hide")}},{key:"recover",value:function(){kT.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=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{start:null,end:null};return mA[e]&&window.clearTimeout(mA[e].id),mA[e]={},n.start&&n.start(),mA[e].id=window.setTimeout((function(){n.end&&n.end(),window.clearTimeout(mA[e].id),delete mA[e]}),t),mA[e].id}("pauseplay",400,{start:function(){kT.addClass(t.root,"interact"),t.show(),t.switchStatus(!0)},end:function(){kT.removeClass(t.root,"interact"),!e&&t.hide(),t._animateId=null}})}},{key:"endAnimate",value:function(){kT.removeClass(this.root,"interact"),_A(this._animateId),this._animateId=null}},{key:"switchPausePlay",value:function(e){var t=this.player;(e.cancelable&&e.preventDefault(),e.stopPropagation(),t.state<OP)||(this.player.paused||t.state!==NP?t.play():t.pause())}},{key:"onPlayPause",value:function(e){this.toggleTo(e)}},{key:"toggleTo",value:function(e){var t=this.config,n=this.player;if(n&&!(n.state<NP)&&this.autoPlayStart){if("show"===t.mode)return this.switchStatus(),void this.show();if("auto"!==t.mode){if(t.isShowPause&&n.paused&&!n.ended||t.isShowEnd&&n.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||n.ended)return;this.animate()}}else this.switchStatus()}}},{key:"destroy",value:function(){this.unbind(["click","touchend"],this.clickHandler),_A(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"}}}]),n}(JS),bA=function(e){AC(n,e);var t=LC(n);function n(){return xC(this,n),t.apply(this,arguments)}return SC(n,[{key:"render",value:function(){var e=this.config.innerHtml,t=kT.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 n="",i=1;i<=12;i++)n+='<div class="xgplayer-enter-bar'.concat(i,'"></div>');t.innerHTML='<div class="xgplayer-enter-spinner">'.concat(n,"</div>")}return t}}],[{key:"pluginName",get:function(){return"enter"}},{key:"defaultConfig",get:function(){return{innerHtml:"",logo:""}}}]),n}(JS);function wA(e,t,n){try{var i,r;return Fm(i=Fm(r=' <div class="xg-tips '.concat(n?"hide":" ",'" lang-key="')).call(r,e.i18nKeys[t],'">\n ')).call(i,e.i18n[t],"\n </div>")}catch(o){return'<div class="xg-tips hide"></div>'}}var EA=function(e){AC(n,e);var t=LC(n);function n(){return xC(this,n),t.apply(this,arguments)}return SC(n,[{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 Fm(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:YS.CONTROLS_RIGHT,index:10}}}]),n}(JS);function CA(e){var t=_x(e);return-1===cw(e).call(e,"%")&&!Lw(t)&&t}var xA=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],TA=xA.length;function SA(e){if("string"==typeof e&&(e=document.querySelector(e)),e&&"object"===CC(e)&&e.nodeType){var t=function(e){return window.getComputedStyle(e)}(e);if("none"===t.display)return function(){for(var e={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},t=0;t<TA;t++)e[xA[t]]=0;return e}();var n={};n.width=e.offsetWidth,n.height=e.offsetHeight;for(var i=n.isBorderBox="border-box"===t.boxSizing,r=0;r<TA;r++){var o=xA[r],a=t[o],s=_x(a);n[o]=Lw(s)?0:s}var l=n.paddingLeft+n.paddingRight,u=n.paddingTop+n.paddingBottom,c=n.marginLeft+n.marginRight,h=n.marginTop+n.marginBottom,f=n.borderLeftWidth+n.borderRightWidth,d=n.borderTopWidth+n.borderBottomWidth,p=i,v=CA(t.width);!1!==v&&(n.width=v+(p?0:l+f));var g=CA(t.height);return!1!==g&&(n.height=g+(p?0:u+d)),n.innerWidth=n.width-(l+f),n.innerHeight=n.height-(u+d),n.outerWidth=n.width+c,n.outerHeight=n.height+h,n}}function PA(e,t){for(var n=0;n<e.length;n++){var i=e[n];if(i.identifier===t)return i}}var AA="dragStart",IA="dragMove",RA="dragEnded",OA={mousedown:["mousemove","mouseup"],touchstart:["touchmove","touchend","touchcancel"],pointerdown:["pointermove","pointerup","pointercancel"]},MA=function(e){AC(n,e);var t=LC(n);function n(e){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return xC(this,n),(i=t.call(this)).isEnabled=!0,i.isDragging=!1,i.isDown=!1,i.position={},i.downPoint={},i.dragPoint={x:0,y:0},i.startPos={x:0,y:0},i._root=e instanceof Element?e:document.querySelector(e),i._handlerDom=r.handle instanceof Element?r.handle:document.querySelector(r.handle),i._root&&i._handlerDom?(i._bindStartEvent(),i):MC(i)}return SC(n,[{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)]),Ub(e=OA[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 n=OA[this._startKey];Ub(n).call(n,(function(e){window.addEventListener(e,t["on".concat(e)])})),this._boundPointerEvents=n}}},{key:"_unbindPostStartEvents",value:function(){var e,t=this;this._boundPointerEvents&&(Ub(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=Fm(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=PA(e.changedTouches,this.touchIdentifier);t&&this.dragMove(e,t)}},{key:"ontouchend",value:function(e){var t=PA(e.changedTouches,this.touchIdentifier);t&&this.dragEnd(e,t),e.preventDefault()}},{key:"ontouchcancel",value:function(e){var t=PA(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 n=SA(this._root);this.startPos.x=this.position.x,this.startPos.y=this.position.y,this.startPos.maxY=window.innerHeight-n.height,this.startPos.maxX=window.innerWidth-n.width,this.setLeftTop(),this.isDown=!0,this._bindPostStartEvents(e)}}},{key:"dragRealStart",value:function(e,t){this.isDragging=!0,this.animate(),this.emit(AA,this.startPos)}},{key:"dragEnd",value:function(e,t){this._root&&(this._unbindPostStartEvents(),this.isDragging&&(this._root.style.transform="",this.setLeftTop(),this.emit(RA)),this.presetInfo())}},{key:"_dragPointerMove",value:function(e,t){var n={x:t.pageX-this.downPoint.pageX,y:t.pageY-this.downPoint.pageY};return!this.isDragging&&this.hasDragStarted(n)&&this.dragRealStart(e,t),n}},{key:"dragMove",value:function(e,t){if(e=e||window.event,this.isDown){var n=this.startPos,i=n.x,r=n.y,o=this._dragPointerMove(e,t),a=o.x,s=o.y;a=this.checkContain("x",a,i),s=this.checkContain("y",s,r),this.position.x=i+a,this.position.y=r+s,this.dragPoint.x=a,this.dragPoint.y=s,this.emit(IA,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,n){return t+n<0?0-n:"x"===e&&t+n>this.startPos.maxX?this.startPos.maxX-n:"y"===e&&t+n>this.startPos.maxY?this.startPos.maxY-n:t}},{key:"_getPosition",value:function(){var e=window.getComputedStyle(this._root),t=this._getPositionCoord(e.left,"width"),n=this._getPositionCoord(e.top,"height");this.position.x=Lw(t)?0:t,this.position.y=Lw(n)?0:n,this._addTransformPosition(e)}},{key:"_addTransformPosition",value:function(e){var t=e.transform;if(0===cw(t).call(t,"matrix")){var n=t.split(","),i=0===cw(t).call(t,"matrix3d")?12:4,r=nE(n[i],10),o=nE(n[i+1],10);this.position.x+=r,this.position.y+=o}}},{key:"_getPositionCoord",value:function(e,t){if(-1!==cw(e).call(e,"%")){var n=SA(this._root.parentNode);return n?_x(e)/100*n[t]:0}return nE(e,10)}}]),n}(BC),LA=function(e){AC(n,e);var t=LC(n);function n(e){var i;xC(this,n),PC(OC(i=t.call(this,e)),"onCancelClick",(function(e){i.exitMini(),i.isClose=!0})),PC(OC(i),"onCenterClick",(function(e){var t=OC(i).player;t.paused?t.play():t.pause()})),PC(OC(i),"onScroll",(function(e){if(!(!window.scrollY&&0!==window.scrollY||Math.abs(window.scrollY-i.pos.scrollY)<50)){var t=nE(kT.getCss(i.player.root,"height"));t+=i.config.scrollTop,i.pos.scrollY=window.scrollY,window.scrollY>t+5?!i.isMini&&!i.isClose&&i.getMini():window.scrollY<=t&&(i.isMini&&i.exitMini(),i.isClose=!1)}})),i.isMini=!1,i.isClose=!1;var r=OC(i).config;return i.pos={left:r.left<0?window.innerWidth-r.width-20:r.left,top:r.top<0?window.innerHeight-r.height-20:r.top,height:i.config.height,width:i.config.width,scrollY:window.scrollY||0},i.lastStyle=null,i}return SC(n,[{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(LT,(function(){e.setAttr("data-state","pause")})),this.on(OT,(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 n={config:{onClick:function(){e.getMini()}}};t.controls.registerPlugin(EA,n,EA.pluginName)}var i=kT.checkTouchSupport()?"touchend":"click";this.bind(".mini-cancel-btn",i,this.onCancelClick),this.bind(".play-icon",i,this.onCenterClick),this.config.disableDrag||(this._draggabilly=new MA(this.player.root,{handle:this.root})),this.config.isScrollSwitch&&window.addEventListener("scroll",this.onScroll)}}},{key:"registerIcons",value:function(){return{play:{icon:gA,class:"xg-icon-play"},pause:{icon:yA,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 n=this.player,i=this.playerConfig,r=this.config.target||this.player.root;this.lastStyle={},kT.addClass(n.root,"xgplayer-mini"),Ub(e=["width","height","top","left"]).call(e,(function(e){t.lastStyle[e]=r.style[e],r.style[e]="".concat(t.pos[e],"px")})),i.fluid&&(r.style["padding-top"]=""),this.emit(aS,!0),n.isMini=this.isMini=!0}}},{key:"exitMini",value:function(){var e=this;if(!this.isMini)return!1;var t,n=this.player,i=this.playerConfig,r=this.config.target||this.player.root;(kT.removeClass(n.root,"xgplayer-mini"),this.lastStyle)&&Ub(t=hw(this.lastStyle)).call(t,(function(t){r.style[t]=e.lastStyle[t]}));this.lastStyle=null,i.fluid&&(n.root.style.width="100%",n.root.style.height="0",n.root.style["padding-top"]="".concat(100*i.height/i.width,"%")),this.emit(aS,!1),this.isMini=n.isMini=!1}},{key:"destroy",value:function(){window.removeEventListener("scroll",this.onScroll);var e=kT.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(wA(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}}}]),n}(JS),DA={mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mousemove:"onMouseMove"},NA=["videoClick","videoDbClick"],FA=function(e){AC(n,e);var t=LC(n);function n(){var e,i;xC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return PC(OC(i=t.call.apply(t,Fm(e=[this]).call(e,o))),"onMouseMove",(function(e){var t=OC(i),n=t.player,r=t.playerConfig;n.isActive||(n.focus({autoHide:!r.closeDelayBlur}),!r.closeFocusVideoFocus&&n.media.focus())})),PC(OC(i),"onMouseEnter",(function(e){var t=OC(i),n=t.playerConfig,r=t.player;!n.closeFocusVideoFocus&&r.media.focus(),n.closeDelayBlur?r.focus({autoHide:!1}):r.focus(),i.emit(nS)})),PC(OC(i),"onMouseLeave",(function(e){var t=i.playerConfig,n=t.closePlayerBlur,r=t.leavePlayerTime,o=t.closeDelayBlur;n||o||(r?i.player.focus({autoHide:!0,delay:r}):i.player.blur({ignorePaused:!0})),i.emit(tS)})),PC(OC(i),"onVideoClick",(function(e){var t=OC(i),n=t.player,r=t.playerConfig;e.target&&r.closeVideoClick||e.target!==n.root&&e.target!==n.media&&e.target!==n.innerContainer&&e.target!==n.media.__canvas||(e.preventDefault(),r.closeVideoStopPropagation||e.stopPropagation(),i._clickCount++,i.clickTimer&&(clearTimeout(i.clickTimer),i.clickTimer=null),i.clickTimer=setTimeout((function(){i._clickCount&&(i._clickCount--,FS(OC(i),NA[0],(function(e,t){i.switchPlayPause(t.e)}),{e:e,paused:n.paused}),clearTimeout(i.clickTimer),i.clickTimer=null)}),300))})),PC(OC(i),"onVideoDblClick",(function(e){var t=OC(i),n=t.player,r=t.playerConfig;r.closeVideoDblclick||!e.target||e.target!==n.media&&e.target!==n.media.__canvas||(!r.closeVideoClick&&i._clickCount<2?i._clickCount=0:(i._clickCount=0,i.clickTimer&&(clearTimeout(i.clickTimer),i.clickTimer=null),e.preventDefault(),e.stopPropagation(),FS(OC(i),NA[1],(function(e,t){i.emitUserAction(t.e,"switch_fullscreen",{props:"fullscreen",from:n.fullscreen,to:!n.fullscreen}),n.fullscreen?n.exitFullscreen():n.getFullscreen()}),{e:e,fullscreen:n.fullscreen})))})),i}return SC(n,[{key:"afterCreate",value:function(){var e=this;this._clickCount=0,Ub(NA).call(NA,(function(t){e.__hooks[t]=null})),"mobile"===this.playerConfig.isMobileSimulateMode||"mobile"===ST.device&&!ST.os.isIpad||this.initEvents()}},{key:"initEvents",value:function(){var e,t=this,n=this.player,i=n.media,r=n.root,o=this.playerConfig.enableContextmenu;r&&r.addEventListener("click",this.onVideoClick,!1),r&&r.addEventListener("dblclick",this.onVideoDblClick,!1),Ub(e=hw(DA)).call(e,(function(e){r.addEventListener(e,t[DA[e]],!1)})),!o&&i&&i.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,n=this.player,i=n.video,r=n.root;this.clickTimer&&clearTimeout(this.clickTimer),r.removeEventListener("click",this.onVideoClick,!1),r.removeEventListener("dblclick",this.onVideoDblClick,!1),i.removeEventListener("contextmenu",this.onContextmenu,!1),Ub(e=hw(DA)).call(e,(function(e){r.removeEventListener(e,t[DA[e]],!1)}))}}],[{key:"pluginName",get:function(){return"pc"}},{key:"defaultConfig",get:function(){return{}}}]),n}(HS),UA="press",HA="pressend",jA="doubleclick",BA="click",zA="touchmove",VA="touchstart",KA="touchend",GA={start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},WA={start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseleave"};function YA(e){return e&&e.length>0?e[e.length-1]:null}var XA=function(){function e(t){var n,i=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{eventType:"touch"};xC(this,e),PC(this,"onTouchStart",(function(e){var t=i._pos,n=i.root,r=YA(e.touches);t.x=r?nE(r.pageX,10):e.pageX,t.y=r?nE(r.pageX,10):e.pageX,t.start=!0,i.__setPress(e),n.addEventListener(i.events.end,i.onTouchEnd),n.addEventListener(i.events.cancel,i.onTouchCancel),n.addEventListener(i.events.move,i.onTouchMove),i.trigger(VA,e)})),PC(this,"onTouchCancel",(function(e){i.onTouchEnd(e)})),PC(this,"onTouchEnd",(function(e){var t=i._pos,n=i.root;i.__clearPress(),n.removeEventListener(i.events.cancel,i.onTouchCancel),n.removeEventListener(i.events.end,i.onTouchEnd),n.removeEventListener(i.events.move,i.onTouchMove),e.moving=t.moving,e.press=t.press,t.press&&i.trigger(HA,e),i.trigger(KA,e),!t.press&&!t.moving&&i.__setDb(e),t.press=!1,t.start=!1,t.moving=!1})),PC(this,"onTouchMove",(function(e){var t=i._pos,n=i.config,r=YA(e.touches),o=r?nE(r.pageX,10):e.pageX,a=r?nE(r.pageY,10):e.pageX,s=o-t.x,l=a-t.y;Math.abs(l)<n.miniStep&&Math.abs(s)<n.miniStep||(i.__clearPress(),t.press&&i.trigger(HA,e),t.press=!1,t.moving=!0,i.trigger(zA,e))})),this._pos={moving:!1,start:!1,x:0,y:0},this.config={pressDelay:600,dbClickDelay:200,disablePress:!1,disableDbClick:!1,miniStep:2,needPreventDefault:!0},Ub(n=hw(r)).call(n,(function(e){i.config[e]=r[e]})),this.root=t,this.events="mouse"===r.eventType?WA:GA,this.pressIntrvalId=null,this.dbIntrvalId=null,this.__handlers={},this._initEvent()}return SC(e,[{key:"_initEvent",value:function(){this.root.addEventListener(this.events.start,this.onTouchStart)}},{key:"__setPress",value:function(e){var t=this,n=this.config;this.pressIntrvalId&&this.__clearPress(),this.pressIntrvalId=setTimeout((function(){t.trigger(UA,e),t._pos.press=!0,t.__clearPress()}),n.pressDelay)}},{key:"__clearPress",value:function(){window.clearTimeout(this.pressIntrvalId),this.pressIntrvalId=null}},{key:"__setDb",value:function(e){var t=this,n=this.config;if(this.dbIntrvalId)return this.__clearDb(),void this.trigger(jA,e);this.dbIntrvalId=setTimeout((function(){t.__clearDb(),t._pos.start||t._pos.press||t._pos.moving||t.trigger(BA,e)}),n.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 n,i=this.__handlers[e],r=-1,o=0;o<i.length;o++)if(i[o]===t){r=o;break}if(r>=0)Mw(n=this.__handlers[e]).call(n,r,1)}}},{key:"trigger",value:function(e,t){var n;this.__handlers[e]&&Ub(n=this.__handlers[e]).call(n,(function(n){try{n(t)}catch(HN){console.error("trigger>>:".concat(e),HN)}}))}},{key:"destroy",value:function(){var e=this,t={touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"};hw(t).forEach((function(n){e.root.removeEventListener(n,e[t[n]])}))}}]),e}();function qA(){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 $A="auto",ZA="seeking",JA="playbackrate",QA=["videoClick","videoDbClick"],eI=function(e){AC(n,e);var t=LC(n);function n(e){var i;return xC(this,n),PC(OC(i=t.call(this,e)),"onTouchStart",(function(e){var t=OC(i),n=t.player,r=t.config,o=t.pos,a=t.playerConfig,s=i.getTouche(e);if(s&&!r.disableGesture&&i.duration>0&&!n.ended){o.isStart=!0,i.timer&&clearTimeout(i.timer),kT.checkIsFunction(a.disableSwipeHandler)&&a.disableSwipeHandler(),Wm(i).call(i,".xg-dur").innerHTML=kT.format(i.duration);var l=i.root.getBoundingClientRect();90===n.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 u=nE(s.pageX-o.left,10),c=nE(s.pageY-o.top,10);o.x=90===n.rotateDeg?c:u,o.y=90===n.rotateDeg?u:c,o.scopeL=r.scopeL*o.width,o.scopeR=(1-r.scopeR)*o.width,o.scopeM1=o.width*(1-r.scopeM)/2,o.scopeM2=o.width-o.scopeM1}})),PC(OC(i),"onTouchMove",(function(e){var t=i.getTouche(e),n=OC(i),r=n.pos,o=n.config,a=n.player;if(t&&!o.disableGesture&&i.duration&&r.isStart){var s=o.miniMoveStep,l=o.hideControlsActive,u=nE(t.pageX-r.left,10),c=nE(t.pageY-r.top,10),h=90===a.rotateDeg?c:u,f=90===a.rotateDeg?u:c;if(Math.abs(h-r.x)>s||Math.abs(f-r.y)>s){var d=h-r.x,p=f-r.y,v=r.scope;if(-1===v&&(0===(v=i.checkScope(h,f,d,p,r))&&(l?a.blur():a.focus({autoHide:!1}),!r.time&&(r.time=nE(1e3*a.currentTime,10)+1e3*i.timeOffset)),r.scope=v),-1===v||v>0&&!o.gestureY||0===v&&!o.gestureX)return;i.executeMove(d,p,v,r.width,r.height),r.x=h,r.y=f}}})),PC(OC(i),"onTouchEnd",(function(e){var t=OC(i),n=t.player,r=t.pos,o=t.playerConfig;if(setTimeout((function(){n.getPlugin("progress")&&n.getPlugin("progress").resetSeekState()}),10),r.isStart){r.scope>-1&&e.cancelable&&e.preventDefault();var a=i.config,s=a.disableGesture,l=a.gestureX;!s&&l?i.endLastMove(r.scope):r.time=0,r.scope=-1,i.resetPos(),kT.checkIsFunction(o.enableSwipeHandler)&&o.enableSwipeHandler(),i.changeAction($A)}})),PC(OC(i),"onRootTouchMove",(function(e){!i.config.disableGesture&&i.config.gestureX&&i.checkIsRootTarget(e)&&(e.stopPropagation(),i.pos.isStart?i.onTouchMove(e):i.onTouchStart(e))})),PC(OC(i),"onRootTouchEnd",(function(e){i.pos.scope>-1&&i.onTouchEnd(e)})),i.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},i.timer=null,i}return SC(n,[{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:qA,class:"xg-seek-pre"}}}},{key:"afterCreate",value:function(){var e,t=this;Ub(QA).call(QA,(function(e){t.__hooks[e]=null}));var n=this.playerConfig,i=this.config,r=this.player;!0===n.closeVideoDblclick&&(i.closedbClick=!0),this.resetPos(),kT.isUndefined(n.disableGesture)||(i.disableGesture=!!n.disableGesture),this.appendChild(".xg-seek-icon",this.icons.seekTipIcon),this.xgMask=kT.createDom("xg-mask","",{},"xgmask"),r.root.appendChild(this.xgMask),this.initCustomStyle(),this.registerThumbnail();var o="mouse"===this.domEventType?"mouse":"touch";this.touch=new XA(this.root,{eventType:o,needPreventDefault:!this.config.disableGesture}),this.root.addEventListener("contextmenu",(function(e){e.preventDefault()})),r.root.addEventListener("touchmove",this.onRootTouchMove,!0),r.root.addEventListener("touchend",this.onRootTouchEnd,!0),r.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(jT,(function(){var e=t.player,n=t.config;e.duration>0&&1e3*e.duration<n.moveDuration&&(n.moveDuration=1e3*e.duration)})),this.on([HT,MT],(function(){var e=t.pos,n=e.time;!e.isStart&&n>0&&(t.pos.time=0)}));var s={touchstart:"onTouchStart",touchmove:"onTouchMove",touchend:"onTouchEnd",press:"onPress",pressend:"onPressEnd",click:"onClick",doubleclick:"onDbClick"};if(Ub(e=hw(s)).call(e,(function(e){t.touch.on(e,(function(n){t[s[e]](n)}))})),!i.disableActive){var l=r.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($A)}))})))}}},{key:"registerThumbnail",value:function(){var e=this.player.plugins.thumbnail;if(e&&e.usable){this.thumbnail=e.createThumbnail(null,"mobile-thumbnail");var t=Wm(this).call(this,".time-preview");t.insertBefore(this.thumbnail,t.children[0])}}},{key:"initCustomStyle",value:function(){var e=(this.playerConfig||{}).commonStyle,t=e.playedColor,n=e.progressColor,i=e.timePreviewStyle,r=e.curTimeColor,o=e.durationColor;t&&(Wm(this).call(this,".xg-curbar").style.backgroundColor=t);n&&(Wm(this).call(this,".xg-bar").style.backgroundColor=n);if(i){var a=Wm(this).call(this,".time-preview");hw(i).forEach((function(e){a.style[e]=i[e]}))}var s=r||t,l=o;s&&(Wm(this).call(this,".xg-cur").style.color=s),l&&(Wm(this).call(this,".xg-dur").style.color=l),this.config.disableTimeProgress&&kT.addClass(Wm(this).call(this,".xg-timebar"),"hide")}},{key:"resetPos",value:function(){var e,t=this;this.pos?(this.pos.isStart=!1,this.pos.scope=-1,Ub(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 n=t.plugins.start;n&&n.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,n,i,r){var o=r.width,a=-1;if(e<0||e>o)return a;var s=0===i?Math.abs(n):Math.abs(n/i);return Math.abs(n)>0&&s>=1.73&&e>r.scopeM1&&e<r.scopeM2?a=0:(0===Math.abs(n)||s<=.57)&&(a=e<r.scopeL?1:e>r.scopeR?2:3),a}},{key:"executeMove",value:function(e,t,n,i,r){switch(n){case 0:this.updateTime(e/i*this.config.scopeM);break;case 1:this.updateBrightness(t/r);break;case 2:ST.os.isIos||this.updateVolume(t/r)}}},{key:"endLastMove",value:function(e){var t=this,n=this.pos,i=this.player,r=this.config,o=(n.time-this.timeOffset)/1e3;if(0===e)i.seek(Number(o).toFixed(1)),r.hideControlsEnd?i.blur():i.focus(),this.timer=setTimeout((function(){t.pos.time=0}),500);this.changeAction($A)}},{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,n=this.config,i=this.playerConfig;t.state<NP?i.closeVideoClick||(this.sendUseAction(kT.createEvent("click")),t.play()):!n.closedbClick||i.closeVideoClick?t.isActive?t.blur():t.focus():i.closeVideoClick||((t.isActive||n.focusVideoClick)&&(this.sendUseAction(kT.createEvent("click")),this.switchPlayPause()),t.focus())}},{key:"dbClickHandler",value:function(e){var t=this.config,n=this.player;!t.closedbClick&&n.state>=NP&&(this.sendUseAction(kT.createEvent("dblclick")),this.switchPlayPause())}},{key:"onClick",value:function(e){var t=this,n=this.player;FS(this,QA[0],(function(e,n){t.clickHandler(n.e)}),{e:e,paused:n.paused})}},{key:"onDbClick",value:function(e){var t=this,n=this.player;FS(this,QA[1],(function(e,n){t.dbClickHandler(n.e)}),{e:e,paused:n.paused})}},{key:"onPress",value:function(e){var t=this.pos,n=this.config,i=this.player;n.disablePress||(t.rate=this.player.playbackRate,this.emitUserAction("press","change_rate",{prop:"playbackRate",from:i.playbackRate,to:n.pressRate}),i.playbackRate=n.pressRate,this.changeAction(JA))}},{key:"onPressEnd",value:function(e){var t=this.pos,n=this.config,i=this.player;n.disablePress||(this.emitUserAction("pressend","change_rate",{prop:"playbackRate",from:i.playbackRate,to:t.rate}),i.playbackRate=t.rate,t.rate=1,this.changeAction($A))}},{key:"updateTime",value:function(e){var t=this.player,n=this.config,i=this.player.duration;e=Number(e.toFixed(4));var r=nE(e*n.moveDuration,10)+this.timeOffset;r=(r+=this.pos.time)<0?0:r>1e3*i?1e3*i-200:r,t.getPlugin("time")&&t.getPlugin("time").updateTime(r/1e3),t.getPlugin("progress")&&t.getPlugin("progress").updatePercent(r/1e3/this.duration,!0),this.activeSeekNote(r/1e3,e>0),n.isTouchingSeek&&t.seek(Number((r-this.timeOffset)/1e3).toFixed(1)),this.pos.time=r}},{key:"updateVolume",value:function(e){this.player.rotateDeg&&(e=-e);var t=this.player,n=this.pos;if(e=nE(100*e,10),n.volume+=e,!(Math.abs(n.volume)<10)){var i=nE(10*t.volume,10)-nE(n.volume/10,10);i=i>10?10:i<1?0:i,t.volume=i/10,n.volume=0}}},{key:"updateBrightness",value:function(e){var t=this.pos,n=this.config,i=this.xgMask;if(n.darkness){this.player.rotateDeg&&(e=-e);var r=t.light+.8*e;r=r>n.maxDarkness?n.maxDarkness:r<0?0:r,i&&(i.style.backgroundColor="rgba(0,0,0,".concat(r,")")),t.light=r}}},{key:"activeSeekNote",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.player,i=this.config,r=!(this.duration!==1/0&&this.duration>0);if(e&&"number"==typeof e&&!r&&!i.disableActive){e<0?e=0:e>n.duration&&(e=n.duration-.2),this.changeAction(ZA);var o=n.plugins.start;if(o&&o.focusHide(),Wm(this).call(this,".xg-dur").innerHTML=kT.format(this.duration),Wm(this).call(this,".xg-cur").innerHTML=kT.format(e),Wm(this).call(this,".xg-curbar").style.width="".concat(e/this.duration*100,"%"),t)kT.removeClass(Wm(this).call(this,".xg-seek-show"),"xg-back");else kT.addClass(Wm(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<LP)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,n,i="normal"!==this.config.gradient?"gradient ".concat(this.config.gradient):"gradient";return Fm(e=Fm(t=Fm(n='\n <xg-trigger class="trigger">\n <div class="'.concat(i,'"></div>\n <div class="time-preview">\n <div class="xg-seek-show ')).call(n,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}}}]),n}(JS);An({target:"String",proto:!0},{repeat:WC});var tI=Vc("String").repeat,nI=se,iI=tI,rI=String.prototype,oI=n((function(e){var t=e.repeat;return"string"==typeof e||e===rI||nI(rI,e)&&t===rI.repeat?iI:t}));function aI(e){var t=e.tagName;return!("INPUT"!==t&&"TEXTAREA"!==t&&!e.isContentEditable)}var sI=function(e){AC(n,e);var t=LC(n);function n(){var e,i;xC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return PC(OC(i=t.call.apply(t,Fm(e=[this]).call(e,o))),"onBodyKeyDown",(function(e){if(i.player){var t=e||window.event,n=t.keyCode,r=OC(i),o=r._keyState,a=r.player,s=i.config,l=s.disable,u=s.disableBodyTrigger,c=s.isIgnoreUserActive;l||u||!a.isUserActive&&!c||aI(t.target)||!i.checkIsVisible()||t.metaKey||t.altKey||t.ctrlKey?o.isBodyKeyDown=!1:(oI(e)||o.isKeyDown||((t.target===document.body||i.config.isGlobalTrigger&&!aI(t.target))&&i.checkCode(n,!0)&&(o.isBodyKeyDown=!0),document.addEventListener("keyup",i.onBodyKeyUp)),o.isBodyKeyDown&&i.handleKeyDown(t))}})),PC(OC(i),"onBodyKeyUp",(function(e){i.player&&(document.removeEventListener("keyup",i.onBodyKeyUp),i.handleKeyUp(e))})),PC(OC(i),"onKeydown",(function(e){if(i.player){var t=e||window.event,n=OC(i)._keyState;if(!oI(t)){if(i.config.disable||i.config.disableRootTrigger||t.metaKey||t.altKey||t.ctrlKey)return;!t||37!==t.keyCode&&!i.checkCode(t.keyCode)||t.target!==i.player.root&&t.target!==i.player.video&&t.target!==i.player.controls.el||(n.isKeyDown=!0),i.player.root.addEventListener("keyup",i.onKeyup)}n.isKeyDown&&i.handleKeyDown(t)}})),PC(OC(i),"onKeyup",(function(e){i.player&&(i.player.root.removeEventListener("keyup",i.onKeyup),i.handleKeyUp(e))})),i}return SC(n,[{key:"mergekeyCodeMap",value:function(){var e,t=this,n=this.config.keyCodeMap;n&&Ub(e=hw(n)).call(e,(function(e){var i;t.keyCodeMap[e]?Ub(i=["keyCode","action","disable","pressAction","disablePress","isBodyTarget"]).call(i,(function(i){n[e][i]&&(t.keyCodeMap[e][i]=n[e][i])})):t.keyCodeMap[e]=n[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;hw(e).forEach((function(n){t.config[n]=e[n]}))}},{key:"checkIsVisible",value:function(){if(!this.config.checkVisible)return!0;var e=this.player.root.getBoundingClientRect(),t=e.height,n=e.top,i=e.bottom,r=window.innerHeight;return!(n<0&&n<0-.9*t||i>0&&i-r>.9*t)}},{key:"checkCode",value:function(e,t){var n,i=this,r=!1;return Ub(n=hw(this.keyCodeMap)).call(n,(function(n){i.keyCodeMap[n]&&e===i.keyCodeMap[n].keyCode&&!i.keyCodeMap[n].disable&&(r=!t||t&&!i.keyCodeMap[n].noBodyTarget)})),r}},{key:"downVolume",value:function(e){var t=this.player;if(!(t.volume<=0)){var n=_x((t.volume-.1).toFixed(1)),i={volume:{from:t.volume,to:n}};this.emitUserAction(e,"change_volume",{props:i}),t.volume=n>=0?n:0}}},{key:"upVolume",value:function(e){var t=this.player;if(!(t.volume>=1)){var n=_x((t.volume+.1).toFixed(1)),i={volume:{from:t.volume,to:n}};this.emitUserAction(e,"change_volume",{props:i}),t.volume=n<=1?n:1}}},{key:"seek",value:function(e){var t=this.player,n=t.currentTime,i=t.offsetCurrentTime,r=t.duration,o=t.offsetDuration,a=t.timeSegments,s=i>-1?i:n,l=o||r,u=oI(e)&&this.seekStep>=4?nE(this.seekStep/2,10):this.seekStep;s+u<=l?s+=u:s=l;var c=kT.getCurrentTimeByOffset(s,a),h={currentTime:{from:n,to:c}};this.emitUserAction(e,"seek",{props:h}),this.player.currentTime=c}},{key:"seekBack",value:function(e){var t=this.player,n=t.currentTime,i=t.offsetCurrentTime,r=t.timeSegments,o=(i>-1?i:n)-(oI(e)?nE(this.seekStep/2,10):this.seekStep);o<0&&(o=0);var a={currentTime:{from:n,to:o=kT.getCurrentTimeByOffset(o,r)}};this.emitUserAction(e,"seek",{props:a}),this.player.currentTime=o}},{key:"changePlaybackRate",value:function(e){var t=this._keyState,n=this.config,i=this.player;0===t.playbackRate&&(t.playbackRate=i.playbackRate,i.playbackRate=n.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,n=t.fullscreen,i=t.cssfullscreen;n&&(this.emitUserAction("keyup","switch_fullscreen",{prop:"fullscreen",from:n,to:!n}),t.exitFullscreen()),i&&(this.emitUserAction("keyup","switch_css_fullscreen",{prop:"cssfullscreen",from:i,to:!i}),t.exitCssFullscreen())}},{key:"handleKeyDown",value:function(e){var t=this._keyState;if(oI(e)){t.isPress=!0;var n=Date.now();if(n-t.tt<200)return;t.tt=n}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,n){for(var i,r=hw(this.keyCodeMap),o=0;o<r.length;o++){var a=this.keyCodeMap[r[o]],s=a.action,l=a.keyCode,u=a.disable,c=a.pressAction,h=a.disablePress;if(l===e){if(!(u||n&&h)){var f=n&&c||s;"function"==typeof f?s(t,this.player,n):"string"==typeof f&&"function"==typeof this[f]&&this[f](t,this.player,n),this.emit(pS,EC({key:r[o],target:t.target,isPress:n},this.keyCodeMap[r[o]]))}(i=t).preventDefault(),i.returnValue=!1,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}}}]),n}(HS);function lI(){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 uI=function(e){AC(n,e);var t=LC(n);function n(){return xC(this,n),t.apply(this,arguments)}return SC(n,[{key:"registerIcons",value:function(){return{loadingIcon:lI}}},{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:YS.ROOT}}}]),n}(JS),cI=An,hI=ea.findIndex,fI="findIndex",dI=!0;fI in[]&&Array(1)[fI]((function(){dI=!1})),cI({target:"Array",proto:!0,forced:dI},{findIndex:function(e){return hI(this,e,arguments.length>1?arguments[1]:void 0)}});var pI=Vc("Array").findIndex,vI=se,gI=pI,yI=Array.prototype,mI=n((function(e){var t=e.findIndex;return e===yI||vI(yI,e)&&t===yI.findIndex?gI:t})),_I=function(e){AC(n,e);var t=LC(n);function n(){var e,i;xC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return PC(OC(i=t.call.apply(t,Fm(e=[this]).call(e,o))),"_onMouseenter",(function(e){i.emit("icon_mouseenter",{pluginName:i.pluginName})})),PC(OC(i),"_onMouseLeave",(function(e){i.emit("icon_mouseleave",{pluginName:i.pluginName})})),i}return SC(n,[{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)}}]),n}(JS),kI=function(e){AC(n,e);var t=LC(n);function n(){var e,i;xC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return PC(OC(i=t.call.apply(t,Fm(e=[this]).call(e,o))),"btnClick",(function(e){e.preventDefault(),e.stopPropagation();var t=OC(i).player;return i.emitUserAction(e,"switch_play_pause",{prop:"paused",from:t.paused,to:!t.paused}),t.ended?t.replay():t.paused?(t.play(),i.animate(!1)):(t.pause(),i.animate(!0)),!1})),i}return SC(n,[{key:"afterCreate",value:function(){DC(IC(n.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([OT,LT,DT,VT],(function(){e.animate(t.paused)}))}},{key:"registerIcons",value:function(){return{play:{icon:gA,class:"xg-icon-play"},pause:{icon:yA,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,n=Wm(this).call(this,".xg-tips");e?(this.setAttr("data-state","pause"),n&&this.changeLangTextKey(n,t.PLAY_TIPS)):(this.setAttr("data-state","play"),n&&this.changeLangTextKey(n,t.PAUSE_TIPS))}}},{key:"destroy",value:function(){DC(IC(n.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(wA(this,"PLAY_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"play"}},{key:"defaultConfig",get:function(){return{position:YS.CONTROLS_LEFT,index:0,disable:!1}}}]),n}(_I);function bI(){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 wI=function(e){AC(n,e);var t=LC(n);function n(){return xC(this,n),t.apply(this,arguments)}return SC(n,[{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:bI,class:"xg-fullscreen-back"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(this.root,e.screenBack)}},{key:"show",value:function(){kT.addClass(this.root,"show")}},{key:"hide",value:function(){kT.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:YS.ROOT_TOP,index:0}}}]),n}(JS);function EI(){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 CI(){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 xI=function(e){AC(n,e);var t=LC(n);function n(){var e,i;xC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return PC(OC(i=t.call.apply(t,Fm(e=[this]).call(e,o))),"_onOrientationChange",(function(e){i.player.fullscreen&&i.config.rotateFullscreen&&(90===window.orientation||-90===window.orientation?i.player.setRotateDeg(0):i.player.setRotateDeg(90))})),i}return SC(n,[{key:"afterCreate",value:function(){var e=this;DC(IC(n.prototype),"afterCreate",this).call(this);var t=this.config,i=this.playerConfig;if(!t.disable){t.target&&(this.playerConfig.fullscreenTarget=this.config.target);var r=kT.getFullScreenEl();i.fullscreenTarget===r&&this.player.getFullscreen().catch((function(e){})),this.initIcons(),this.handleFullscreen=this.hook("fullscreenChange",this.toggleFullScreen,{pre:function(t){var n=e.player.fullscreen;e.emitUserAction(t,"switch_fullscreen",{prop:"fullscreen",from:n,to:!n})}}),this.bind(".xgplayer-fullscreen",["touchend","click"],this.handleFullscreen),this.on(rS,(function(t){var n=Wm(e).call(e,".xg-tips");n&&e.changeLangTextKey(n,t?e.i18nKeys.EXITFULLSCREEN_TIPS:e.i18nKeys.FULLSCREEN_TIPS),e.animate(t)})),this.config.needBackIcon&&(this.topBackIcon=this.player.registerPlugin({plugin:wI,options:{config:{onClick:function(t){e.handleFullscreen(t)}}}})),"mobile"===ST.device&&window.addEventListener("orientationchange",this._onOrientationChange)}}},{key:"registerIcons",value:function(){return{fullscreen:{icon:EI,class:"xg-get-fullscreen"},exitFullscreen:{icon:CI,class:"xg-exit-fullscreen"}}}},{key:"destroy",value:function(){DC(IC(n.prototype),"destroy",this).call(this),this.unbind(".xgplayer-icon","mobile"===ST.device?"touchend":"click",this.handleFullscreen),"mobile"===ST.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,n=this.config;!0===n.useCssFullscreen||"function"==typeof n.useCssFullscreen&&n.useCssFullscreen()?(t.fullscreen?t.exitCssFullscreen():t.getCssFullscreen(),this.animate(t.fullscreen)):n.rotateFullscreen?(t.fullscreen?t.exitRotateFullscreen():t.getRotateFullscreen(),this.animate(t.fullscreen)):n.switchCallback&&"function"==typeof n.switchCallback?n.switchCallback(t.fullscreen):t.fullscreen?(t.exitFullscreen(),n.useScreenOrientation&&this.unlockScreen()):(t.getFullscreen().catch((function(e){})),n.useScreenOrientation&&t.aspectRatio>1&&this.lockScreen(n.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(wA(this,"FULLSCREEN_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}},{key:"lockScreen",value:function(e){try{screen.orientation.lock(e).catch((function(e){}))}catch(t){}}},{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:YS.CONTROLS_RIGHT,index:0,useCssFullscreen:!1,rotateFullscreen:!1,useScreenOrientation:!1,lockOrientationType:"landscape",switchCallback:null,target:null,disable:!1,needBackIcon:!1}}}]),n}(_I);function TI(){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 SI(){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 PI(){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 AI=function(e){AC(n,e);var t=LC(n);function n(){var e,i;xC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return PC(OC(i=t.call.apply(t,Fm(e=[this]).call(e,o))),"onBarMousedown",(function(e){var t=OC(i).player,n=Wm(i).call(i,".xgplayer-bar");kT.event(e);var r=n.getBoundingClientRect(),o=kT.getEventPos(e,t.zoom),a=r.height-(o.clientY-r.top);if(o.h=a,o.barH=r.height,i.pos=o,!(a<-2))return i.updateVolumePos(a,e),document.addEventListener("mouseup",i.onBarMouseUp),i._d.isStart=!0,!1})),PC(OC(i),"onBarMouseMove",(function(e){var t=OC(i)._d;if(t.isStart){var n=OC(i),r=n.pos,o=n.player;e.preventDefault(),e.stopPropagation(),kT.event(e);var a=kT.getEventPos(e,o.zoom);t.isMoving=!0;var s=r.h-a.clientY+r.clientY;s>r.barH||i.updateVolumePos(s,e)}})),PC(OC(i),"onBarMouseUp",(function(e){kT.event(e),document.removeEventListener("mouseup",i.onBarMouseUp);var t=OC(i)._d;t.isStart=!1,t.isMoving=!1})),PC(OC(i),"onMouseenter",(function(e){i._d.isActive=!0,i.focus(),i.emit("icon_mouseenter",{pluginName:i.pluginName})})),PC(OC(i),"onMouseleave",(function(e){i._d.isActive=!1,i.unFocus(100,!1,e),i.emit("icon_mouseleave",{pluginName:i.pluginName})})),PC(OC(i),"onVolumeChange",(function(e){if(i.player){var t=i.player,n=t.muted,r=t.volume;i._d.isMoving||(Wm(i).call(i,".xgplayer-drag").style.height=n||0===r?"4px":"".concat(100*r,"%"),i.config.showValueLabel&&i.updateVolumeValue()),i.animate(n,r)}})),i}return SC(n,[{key:"registerIcons",value:function(){return{volumeSmall:{icon:SI,class:"xg-volume-small"},volumeLarge:{icon:TI,class:"xg-volume"},volumeMuted:{icon:PI,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,n=t.commonStyle,i=t.volume;if(n.volumeColor)Wm(this).call(this,".xgplayer-drag").style.backgroundColor=n.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"!==ST.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(BT,this.onVolumeChange),this.once(zT,this.onVolumeChange),"Number"!==kT.typeOf(i)&&(this.player.volume=this.config.default),this.onVolumeChange()}}},{key:"updateVolumePos",value:function(e,t){var n=this.player,i=Wm(this).call(this,".xgplayer-drag"),r=Wm(this).call(this,".xgplayer-bar");if(r&&i){var o=nE(e/r.getBoundingClientRect().height*1e3,10);i.style.height="".concat(e,"px");var a=Math.max(Math.min(o/1e3,1),0),s={volume:{from:n.volume,to:a}};n.muted&&(s.muted={from:!0,to:!1}),this.emitUserAction(t,"change_volume",{muted:n.muted,volume:n.volume,props:s}),n.volume=Math.max(Math.min(o/1e3,1),0),n.muted&&(n.muted=!1),this.config.showValueLabel&&this.updateVolumeValue()}}},{key:"updateVolumeValue",value:function(){var e=this.player,t=e.volume,n=e.muted,i=Wm(this).call(this,".xgplayer-value-label"),r=Math.max(Math.min(t,1),0);i.innerText=n?0:Math.round(100*r)}},{key:"focus",value:function(){this.player.focus({autoHide:!1}),this._timerId&&(kT.clearTimeout(this,this._timerId),this._timerId=null),kT.addClass(this.root,"slide-show")}},{key:"unFocus",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0,r=this._d,o=this.player;r.isActive||(this._timerId&&(kT.clearTimeout(this,this._timerId),this._timerId=null),this._timerId=kT.setTimeout(this,(function(){r.isActive||(n?o.blur():o.focus(),kT.removeClass(e.root,"slide-show"),r.isStart&&e.onBarMouseUp(i)),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&&(kT.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"===ST.device?"touchend":"click",this.changeMutedHandler)}},{key:"render",value:function(){var e;if(!this.config.disable){var t=this.config.default||this.player.volume,n=this.config.showValueLabel;return Fm(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(n?'<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:YS.CONTROLS_RIGHT,index:1,disable:!1,showValueLabel:!1,default:.6,miniVolume:.2}}}]),n}(JS);function II(){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 RI(){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 OI="picture-in-picture",MI="inline",LI="fullscreen",DI=function(e){AC(n,e);var t=LC(n);function n(){var e,i;xC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return PC(OC(i=t.call.apply(t,Fm(e=[this]).call(e,o))),"switchPIP",(function(e){if(!i.isPIPAvailable())return!1;e.stopPropagation&&e.stopPropagation(),i.isPip?(i.exitPIP(),i.emitUserAction(e,"change_pip",{props:"pip",from:!0,to:!1}),i.setAttr("data-state","normal")):4===i.player.media.readyState&&(i.requestPIP(),i.emitUserAction(e,"change_pip",{props:"pip",from:!1,to:!0}),i.setAttr("data-state","pip"))})),i}return SC(n,[{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()&&(DC(IC(n.prototype),"afterCreate",this).call(this),this.pMode=MI,this.initPipEvents(),this.config.showIcon&&this.initIcons(),this.once($T,(function(){e.config.showIcon&&(kT.removeClass(Wm(e).call(e,".xgplayer-icon"),"xg-icon-disable"),e.bind("click",e.switchPIP))})))}},{key:"registerIcons",value:function(){return{pipIcon:{icon:II,class:"xg-get-pip"},pipIconExit:{icon:RI,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 n=t.paused;kT.setTimeout(e,(function(){!n&&t.mediaPlay()}),0),!n&&t.mediaPlay(),e.setAttr("data-state","normal"),e.pipWindow=null,t.emit(fS,!1)},this.enterPIPCallback=function(n){t.emit(fS,!0),null!=n&&n.pictureInPictureWindow&&(e.pipWindow=n.pictureInPictureWindow),e.setAttr("data-state","pip")},this.onWebkitpresentationmodechanged=function(n){var i=t.media.webkitPresentationMode;e.pMode===LI&&i!==LI&&t.onFullscreenChange(null,!1),e.pMode=i,i===OI?e.enterPIPCallback(n):i===MI&&e.leavePIPCallback(n)},t.media&&(t.media.addEventListener("enterpictureinpicture",this.enterPIPCallback),t.media.addEventListener("leavepictureinpicture",this.leavePIPCallback),n.checkWebkitSetPresentationMode(t.media)&&t.media.addEventListener("webkitpresentationmodechanged",this.onWebkitpresentationmodechanged))}},{key:"copyStyleIntoPiPWindow",value:function(e){var t,n,i=jb(t=Ub(n=NC(document.styleSheets)).call(n,(function(t){try{var n;return Ub(n=NC(t.cssRules)).call(n,(function(e){return e.cssText})).join("")}catch(r){var i=document.createElement("link");i.rel="stylesheet",i.type=t.type,i.media=t.media,i.href=t.href,e.document.head.appendChild(i)}return""}))).call(t,Boolean).join("\n"),r=document.createElement("style");r.textContent=i,e.document.head.appendChild(r)}},{key:"requestPIP",value:function(){var e=this,t=this.player,i=this.playerConfig,r=this.config;if(this.isPIPAvailable()&&!this.isPip)try{var o=i.poster;if(o&&(t.media.poster="String"===kT.typeOf(o)?o:o.poster),r.preferDocument&&this.isDocPIPAvailable()){var a={};if(r.width&&r.height)a.width=r.width,a.height=r.height;else{var s=t.root.getBoundingClientRect();a.width=s.width,a.height=s.height}documentPictureInPicture.requestWindow(a).then((function(n){var i=r.docPiPNode,o=r.docPiPStyle;e.enterPIPCallback();var a=i||t.root,s=a.parentElement,l=a.previousSibling,u=a.nextSibling;e.copyStyleIntoPiPWindow(n);var c=document.createElement("style");if(c.append("body{padding:0; margin:0;}"),o){var h="";"string"==typeof o?h=o:"function"==typeof o&&(h=o.call(r)),h&&c.append(h)}else a===t.root&&c.append("\n .xgplayer{width: 100%!important; height: 100%!important;}\n ");n.document.head.append(c),n.document.body.append(a),n.addEventListener("pagehide",(function(t){s&&(u?s.insertBefore(a,u):l?s.insertBefore(a,l.nextSibling):s.appendChild(a)),e.leavePIPCallback()}),{once:!0})}))}else n.checkWebkitSetPresentationMode(t.media)?t.media.webkitSetPresentationMode("picture-in-picture"):t.media.requestPictureInPicture();return!0}catch(l){return console.error("requestPiP",l),!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():n.checkWebkitSetPresentationMode(e.media)?e.media.webkitSetPresentationMode("inline"):document.exitPictureInPicture();return!0}catch(i){return console.error("exitPIP",i),!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===OI}},{key:"isPIPAvailable",value:function(){var e=this.player.media;return"Boolean"===kT.typeOf(document.pictureInPictureEnabled)&&document.pictureInPictureEnabled&&("Boolean"===kT.typeOf(e.disablePictureInPicture)&&!e.disablePictureInPicture||e.webkitSupportsPresentationMode&&"Function"===kT.typeOf(e.webkitSetPresentationMode))||this.isDocPIPAvailable()}},{key:"isDocPIPAvailable",value:function(){return"documentPictureInPicture"in window&&/^(https|file)/.test(location.protocol)}},{key:"destroy",value:function(){DC(IC(n.prototype),"destroy",this).call(this);var e=this.player;e.media.removeEventListener("enterpictureinpicture",this.enterPIPCallback),e.media.removeEventListener("leavepictureinpicture",this.leavePIPCallback),n.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(wA(this,"PIP",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"pip"}},{key:"defaultConfig",get:function(){return{position:YS.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}}]),n}(_I),NI=o,FI=ft("iterator"),UI=!NI((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,i){t.delete("b"),n+=i+e})),!e.toJSON||!t.size&&true||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[FI]||"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"!==n||"x"!==new URL("http://x",void 0).host})),HI=g,jI=2147483647,BI=/[^\0-\u007E]/,zI=/[.\u3002\uFF0E\uFF61]/g,VI="Overflow: input needs wider integers to process",KI=RangeError,GI=HI(zI.exec),WI=Math.floor,YI=String.fromCharCode,XI=HI("".charCodeAt),qI=HI([].join),$I=HI([].push),ZI=HI("".replace),JI=HI("".split),QI=HI("".toLowerCase),eR=function(e){return e+22+75*(e<26)},tR=function(e,t,n){var i=0;for(e=n?WI(e/700):e>>1,e+=WI(e/t);e>455;)e=WI(e/35),i+=36;return WI(i+36*e/(e+38))},nR=function(e){var t=[];e=function(e){for(var t=[],n=0,i=e.length;n<i;){var r=XI(e,n++);if(r>=55296&&r<=56319&&n<i){var o=XI(e,n++);56320==(64512&o)?$I(t,((1023&r)<<10)+(1023&o)+65536):($I(t,r),n--)}else $I(t,r)}return t}(e);var n,i,r=e.length,o=128,a=0,s=72;for(n=0;n<e.length;n++)(i=e[n])<128&&$I(t,YI(i));var l=t.length,u=l;for(l&&$I(t,"-");u<r;){var c=jI;for(n=0;n<e.length;n++)(i=e[n])>=o&&i<c&&(c=i);var h=u+1;if(c-o>WI((jI-a)/h))throw KI(VI);for(a+=(c-o)*h,o=c,n=0;n<e.length;n++){if((i=e[n])<o&&++a>jI)throw KI(VI);if(i==o){for(var f=a,d=36;;){var p=d<=s?1:d>=s+26?26:d-s;if(f<p)break;var v=f-p,g=36-p;$I(t,YI(eR(p+v%g))),f=WI(v/g),d+=36}$I(t,YI(eR(f))),s=tR(a,h,u==l),a=0,u++}}a++,o++}return qI(t,"")},iR=An,rR=r,oR=O,aR=g,sR=A,lR=UI,uR=io,cR=oo,hR=L_,fR=Io,dR=zl,pR=Wo,vR=qf,gR=S,yR=Je,mR=$t,_R=ti,kR=nn,bR=ee,wR=Yi,ER=Hr,CR=H,xR=Qh,TR=Wh,SR=ad,PR=Lx,AR=ft("iterator"),IR="URLSearchParams",RR=IR+"Iterator",OR=pR.set,MR=pR.getterFor(IR),LR=pR.getterFor(RR),DR=Object.getOwnPropertyDescriptor,NR=function(e){if(!sR)return rR[e];var t=DR(rR,e);return t&&t.value},FR=NR("fetch"),UR=NR("Request"),HR=NR("Headers"),jR=UR&&UR.prototype,BR=HR&&HR.prototype,zR=rR.RegExp,VR=rR.TypeError,KR=rR.decodeURIComponent,GR=rR.encodeURIComponent,WR=aR("".charAt),YR=aR([].join),XR=aR([].push),qR=aR("".replace),$R=aR([].shift),ZR=aR([].splice),JR=aR("".split),QR=aR("".slice),eO=/\+/g,tO=Array(4),nO=function(e){return tO[e-1]||(tO[e-1]=zR("((?:%[\\da-f]{2}){"+e+"})","gi"))},iO=function(e){try{return KR(e)}catch(HN){return e}},rO=function(e){var t=qR(e,eO," "),n=4;try{return KR(t)}catch(HN){for(;n;)t=qR(t,nO(n--),iO);return t}},oO=/[!'()~]|%20/g,aO={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},sO=function(e){return aO[e]},lO=function(e){return qR(GR(e),oO,sO)},uO=dR((function(e,t){OR(this,{type:RR,iterator:xR(MR(e).entries),kind:t})}),"Iterator",(function(){var e=LR(this),t=e.kind,n=e.iterator.next(),i=n.value;return n.done||(n.value="keys"===t?i.key:"values"===t?i.value:[i.key,i.value]),n}),!0),cO=function(e){this.entries=[],this.url=null,void 0!==e&&(bR(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===WR(e,0)?QR(e,1):e:wR(e)))};cO.prototype={type:IR,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,i,r,o,a,s,l=TR(e);if(l)for(n=(t=xR(e,l)).next;!(i=oR(n,t)).done;){if(o=(r=xR(kR(i.value))).next,(a=oR(o,r)).done||(s=oR(o,r)).done||!oR(o,r).done)throw VR("Expected sequence with length 2");XR(this.entries,{key:wR(a.value),value:wR(s.value)})}else for(var u in e)yR(e,u)&&XR(this.entries,{key:u,value:wR(e[u])})},parseQuery:function(e){if(e)for(var t,n,i=JR(e,"&"),r=0;r<i.length;)(t=i[r++]).length&&(n=JR(t,"="),XR(this.entries,{key:rO($R(n)),value:rO(YR(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],i=0;i<t.length;)e=t[i++],XR(n,lO(e.key)+"="+lO(e.value));return YR(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var hO=function(){vR(this,fO);var e=OR(this,new cO(arguments.length>0?arguments[0]:void 0));sR||(this.length=e.entries.length)},fO=hO.prototype;if(hR(fO,{append:function(e,t){SR(arguments.length,2);var n=MR(this);XR(n.entries,{key:wR(e),value:wR(t)}),sR||this.length++,n.updateURL()},delete:function(e){SR(arguments.length,1);for(var t=MR(this),n=t.entries,i=wR(e),r=0;r<n.length;)n[r].key===i?ZR(n,r,1):r++;sR||(this.length=n.length),t.updateURL()},get:function(e){SR(arguments.length,1);for(var t=MR(this).entries,n=wR(e),i=0;i<t.length;i++)if(t[i].key===n)return t[i].value;return null},getAll:function(e){SR(arguments.length,1);for(var t=MR(this).entries,n=wR(e),i=[],r=0;r<t.length;r++)t[r].key===n&&XR(i,t[r].value);return i},has:function(e){SR(arguments.length,1);for(var t=MR(this).entries,n=wR(e),i=0;i<t.length;)if(t[i++].key===n)return!0;return!1},set:function(e,t){SR(arguments.length,1);for(var n,i=MR(this),r=i.entries,o=!1,a=wR(e),s=wR(t),l=0;l<r.length;l++)(n=r[l]).key===a&&(o?ZR(r,l--,1):(o=!0,n.value=s));o||XR(r,{key:a,value:s}),sR||(this.length=r.length),i.updateURL()},sort:function(){var e=MR(this);PR(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=MR(this).entries,i=mR(e,arguments.length>1?arguments[1]:void 0),r=0;r<n.length;)i((t=n[r++]).value,t.key,this)},keys:function(){return new uO(this,"keys")},values:function(){return new uO(this,"values")},entries:function(){return new uO(this,"entries")}},{enumerable:!0}),uR(fO,AR,fO.entries,{name:"entries"}),uR(fO,"toString",(function(){return MR(this).serialize()}),{enumerable:!0}),sR&&cR(fO,"size",{get:function(){return MR(this).entries.length},configurable:!0,enumerable:!0}),fR(hO,IR),iR({global:!0,constructor:!0,forced:!lR},{URLSearchParams:hO}),!lR&&gR(HR)){var dO=aR(BR.has),pO=aR(BR.set),vO=function(e){if(bR(e)){var t,n=e.body;if(_R(n)===IR)return t=e.headers?new HR(e.headers):new HR,dO(t,"content-type")||pO(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),ER(e,{body:CR(0,wR(n)),headers:CR(0,t)})}return e};if(gR(FR)&&iR({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return FR(e,arguments.length>1?vO(arguments[1]):{})}}),gR(UR)){var gO=function(e){return vR(this,jR),new UR(e,arguments.length>1?vO(arguments[1]):{})};jR.constructor=gO,gO.prototype=jR,iR({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:gO})}}var yO,mO=An,_O=A,kO=UI,bO=r,wO=$t,EO=g,CO=io,xO=oo,TO=qf,SO=Je,PO=EE,AO=fm,IO=qr,RO=hc.codeAt,OO=function(e){var t,n,i=[],r=JI(ZI(QI(e),zI,"."),".");for(t=0;t<r.length;t++)n=r[t],$I(i,GI(BI,n)?"xn--"+nR(n):n);return qI(i,".")},MO=Yi,LO=Io,DO=ad,NO={URLSearchParams:hO,getState:MR},FO=Wo,UO=FO.set,HO=FO.getterFor("URL"),jO=NO.URLSearchParams,BO=NO.getState,zO=bO.URL,VO=bO.TypeError,KO=bO.parseInt,GO=Math.floor,WO=Math.pow,YO=EO("".charAt),XO=EO(/./.exec),qO=EO([].join),$O=EO(1..toString),ZO=EO([].pop),JO=EO([].push),QO=EO("".replace),eM=EO([].shift),tM=EO("".split),nM=EO("".slice),iM=EO("".toLowerCase),rM=EO([].unshift),oM="Invalid scheme",aM="Invalid host",sM="Invalid port",lM=/[a-z]/i,uM=/[\d+-.a-z]/i,cM=/\d/,hM=/^0x/i,fM=/^[0-7]+$/,dM=/^\d+$/,pM=/^[\da-f]+$/i,vM=/[\0\t\n\r #%/:<>?@[\\\]^|]/,gM=/[\0\t\n\r #/:<>?@[\\\]^|]/,yM=/^[\u0000-\u0020]+/,mM=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,_M=/[\t\n\r]/g,kM=function(e){var t,n,i,r;if("number"==typeof e){for(t=[],n=0;n<4;n++)rM(t,e%256),e=GO(e/256);return qO(t,".")}if("object"==typeof e){for(t="",i=function(e){for(var t=null,n=1,i=null,r=0,o=0;o<8;o++)0!==e[o]?(r>n&&(t=i,n=r),i=null,r=0):(null===i&&(i=o),++r);return r>n&&(t=i,n=r),t}(e),n=0;n<8;n++)r&&0===e[n]||(r&&(r=!1),i===n?(t+=n?":":"::",r=!0):(t+=$O(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},bM={},wM=PO({},bM,{" ":1,'"':1,"<":1,">":1,"`":1}),EM=PO({},wM,{"#":1,"?":1,"{":1,"}":1}),CM=PO({},EM,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),xM=function(e,t){var n=RO(e,0);return n>32&&n<127&&!SO(t,e)?e:encodeURIComponent(e)},TM={ftp:21,file:null,http:80,https:443,ws:80,wss:443},SM=function(e,t){var n;return 2==e.length&&XO(lM,YO(e,0))&&(":"==(n=YO(e,1))||!t&&"|"==n)},PM=function(e){var t;return e.length>1&&SM(nM(e,0,2))&&(2==e.length||"/"===(t=YO(e,2))||"\\"===t||"?"===t||"#"===t)},AM=function(e){return"."===e||"%2e"===iM(e)},IM={},RM={},OM={},MM={},LM={},DM={},NM={},FM={},UM={},HM={},jM={},BM={},zM={},VM={},KM={},GM={},WM={},YM={},XM={},qM={},$M={},ZM=function(e,t,n){var i,r,o,a=MO(e);if(t){if(r=this.parse(a))throw VO(r);this.searchParams=null}else{if(void 0!==n&&(i=new ZM(n,!0)),r=this.parse(a,null,i))throw VO(r);(o=BO(new jO)).bindURL(this),this.searchParams=o}};ZM.prototype={type:"URL",parse:function(e,t,n){var i,r,o,a,s,l=this,u=t||IM,c=0,h="",f=!1,d=!1,p=!1;for(e=MO(e),t||(l.scheme="",l.username="",l.password="",l.host=null,l.port=null,l.path=[],l.query=null,l.fragment=null,l.cannotBeABaseURL=!1,e=QO(e,yM,""),e=QO(e,mM,"$1")),e=QO(e,_M,""),i=AO(e);c<=i.length;){switch(r=i[c],u){case IM:if(!r||!XO(lM,r)){if(t)return oM;u=OM;continue}h+=iM(r),u=RM;break;case RM:if(r&&(XO(uM,r)||"+"==r||"-"==r||"."==r))h+=iM(r);else{if(":"!=r){if(t)return oM;h="",u=OM,c=0;continue}if(t&&(l.isSpecial()!=SO(TM,h)||"file"==h&&(l.includesCredentials()||null!==l.port)||"file"==l.scheme&&!l.host))return;if(l.scheme=h,t)return void(l.isSpecial()&&TM[l.scheme]==l.port&&(l.port=null));h="","file"==l.scheme?u=VM:l.isSpecial()&&n&&n.scheme==l.scheme?u=MM:l.isSpecial()?u=FM:"/"==i[c+1]?(u=LM,c++):(l.cannotBeABaseURL=!0,JO(l.path,""),u=XM)}break;case OM:if(!n||n.cannotBeABaseURL&&"#"!=r)return oM;if(n.cannotBeABaseURL&&"#"==r){l.scheme=n.scheme,l.path=IO(n.path),l.query=n.query,l.fragment="",l.cannotBeABaseURL=!0,u=$M;break}u="file"==n.scheme?VM:DM;continue;case MM:if("/"!=r||"/"!=i[c+1]){u=DM;continue}u=UM,c++;break;case LM:if("/"==r){u=HM;break}u=YM;continue;case DM:if(l.scheme=n.scheme,r==yO)l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=IO(n.path),l.query=n.query;else if("/"==r||"\\"==r&&l.isSpecial())u=NM;else if("?"==r)l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=IO(n.path),l.query="",u=qM;else{if("#"!=r){l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=IO(n.path),l.path.length--,u=YM;continue}l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=IO(n.path),l.query=n.query,l.fragment="",u=$M}break;case NM:if(!l.isSpecial()||"/"!=r&&"\\"!=r){if("/"!=r){l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,u=YM;continue}u=HM}else u=UM;break;case FM:if(u=UM,"/"!=r||"/"!=YO(h,c+1))continue;c++;break;case UM:if("/"!=r&&"\\"!=r){u=HM;continue}break;case HM:if("@"==r){f&&(h="%40"+h),f=!0,o=AO(h);for(var v=0;v<o.length;v++){var g=o[v];if(":"!=g||p){var y=xM(g,CM);p?l.password+=y:l.username+=y}else p=!0}h=""}else if(r==yO||"/"==r||"?"==r||"#"==r||"\\"==r&&l.isSpecial()){if(f&&""==h)return"Invalid authority";c-=AO(h).length+1,h="",u=jM}else h+=r;break;case jM:case BM:if(t&&"file"==l.scheme){u=GM;continue}if(":"!=r||d){if(r==yO||"/"==r||"?"==r||"#"==r||"\\"==r&&l.isSpecial()){if(l.isSpecial()&&""==h)return aM;if(t&&""==h&&(l.includesCredentials()||null!==l.port))return;if(a=l.parseHost(h))return a;if(h="",u=WM,t)return;continue}"["==r?d=!0:"]"==r&&(d=!1),h+=r}else{if(""==h)return aM;if(a=l.parseHost(h))return a;if(h="",u=zM,t==BM)return}break;case zM:if(!XO(cM,r)){if(r==yO||"/"==r||"?"==r||"#"==r||"\\"==r&&l.isSpecial()||t){if(""!=h){var m=KO(h,10);if(m>65535)return sM;l.port=l.isSpecial()&&m===TM[l.scheme]?null:m,h=""}if(t)return;u=WM;continue}return sM}h+=r;break;case VM:if(l.scheme="file","/"==r||"\\"==r)u=KM;else{if(!n||"file"!=n.scheme){u=YM;continue}if(r==yO)l.host=n.host,l.path=IO(n.path),l.query=n.query;else if("?"==r)l.host=n.host,l.path=IO(n.path),l.query="",u=qM;else{if("#"!=r){PM(qO(IO(i,c),""))||(l.host=n.host,l.path=IO(n.path),l.shortenPath()),u=YM;continue}l.host=n.host,l.path=IO(n.path),l.query=n.query,l.fragment="",u=$M}}break;case KM:if("/"==r||"\\"==r){u=GM;break}n&&"file"==n.scheme&&!PM(qO(IO(i,c),""))&&(SM(n.path[0],!0)?JO(l.path,n.path[0]):l.host=n.host),u=YM;continue;case GM:if(r==yO||"/"==r||"\\"==r||"?"==r||"#"==r){if(!t&&SM(h))u=YM;else if(""==h){if(l.host="",t)return;u=WM}else{if(a=l.parseHost(h))return a;if("localhost"==l.host&&(l.host=""),t)return;h="",u=WM}continue}h+=r;break;case WM:if(l.isSpecial()){if(u=YM,"/"!=r&&"\\"!=r)continue}else if(t||"?"!=r)if(t||"#"!=r){if(r!=yO&&(u=YM,"/"!=r))continue}else l.fragment="",u=$M;else l.query="",u=qM;break;case YM:if(r==yO||"/"==r||"\\"==r&&l.isSpecial()||!t&&("?"==r||"#"==r)){if(".."===(s=iM(s=h))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(l.shortenPath(),"/"==r||"\\"==r&&l.isSpecial()||JO(l.path,"")):AM(h)?"/"==r||"\\"==r&&l.isSpecial()||JO(l.path,""):("file"==l.scheme&&!l.path.length&&SM(h)&&(l.host&&(l.host=""),h=YO(h,0)+":"),JO(l.path,h)),h="","file"==l.scheme&&(r==yO||"?"==r||"#"==r))for(;l.path.length>1&&""===l.path[0];)eM(l.path);"?"==r?(l.query="",u=qM):"#"==r&&(l.fragment="",u=$M)}else h+=xM(r,EM);break;case XM:"?"==r?(l.query="",u=qM):"#"==r?(l.fragment="",u=$M):r!=yO&&(l.path[0]+=xM(r,bM));break;case qM:t||"#"!=r?r!=yO&&("'"==r&&l.isSpecial()?l.query+="%27":l.query+="#"==r?"%23":xM(r,bM)):(l.fragment="",u=$M);break;case $M:r!=yO&&(l.fragment+=xM(r,wM))}c++}},parseHost:function(e){var t,n,i;if("["==YO(e,0)){if("]"!=YO(e,e.length-1))return aM;if(t=function(e){var t,n,i,r,o,a,s,l=[0,0,0,0,0,0,0,0],u=0,c=null,h=0,f=function(){return YO(e,h)};if(":"==f()){if(":"!=YO(e,1))return;h+=2,c=++u}for(;f();){if(8==u)return;if(":"!=f()){for(t=n=0;n<4&&XO(pM,f());)t=16*t+KO(f(),16),h++,n++;if("."==f()){if(0==n)return;if(h-=n,u>6)return;for(i=0;f();){if(r=null,i>0){if(!("."==f()&&i<4))return;h++}if(!XO(cM,f()))return;for(;XO(cM,f());){if(o=KO(f(),10),null===r)r=o;else{if(0==r)return;r=10*r+o}if(r>255)return;h++}l[u]=256*l[u]+r,2!=++i&&4!=i||u++}if(4!=i)return;break}if(":"==f()){if(h++,!f())return}else if(f())return;l[u++]=t}else{if(null!==c)return;h++,c=++u}}if(null!==c)for(a=u-c,u=7;0!=u&&a>0;)s=l[u],l[u--]=l[c+a-1],l[c+--a]=s;else if(8!=u)return;return l}(nM(e,1,-1)),!t)return aM;this.host=t}else if(this.isSpecial()){if(e=OO(e),XO(vM,e))return aM;if(t=function(e){var t,n,i,r,o,a,s,l=tM(e,".");if(l.length&&""==l[l.length-1]&&l.length--,(t=l.length)>4)return e;for(n=[],i=0;i<t;i++){if(""==(r=l[i]))return e;if(o=10,r.length>1&&"0"==YO(r,0)&&(o=XO(hM,r)?16:8,r=nM(r,8==o?1:2)),""===r)a=0;else{if(!XO(10==o?dM:8==o?fM:pM,r))return e;a=KO(r,o)}JO(n,a)}for(i=0;i<t;i++)if(a=n[i],i==t-1){if(a>=WO(256,5-t))return null}else if(a>255)return null;for(s=ZO(n),i=0;i<n.length;i++)s+=n[i]*WO(256,3-i);return s}(e),null===t)return aM;this.host=t}else{if(XO(gM,e))return aM;for(t="",n=AO(e),i=0;i<n.length;i++)t+=xM(n[i],bM);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return SO(TM,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&SM(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,i=e.password,r=e.host,o=e.port,a=e.path,s=e.query,l=e.fragment,u=t+":";return null!==r?(u+="//",e.includesCredentials()&&(u+=n+(i?":"+i:"")+"@"),u+=kM(r),null!==o&&(u+=":"+o)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?a[0]:a.length?"/"+qO(a,"/"):"",null!==s&&(u+="?"+s),null!==l&&(u+="#"+l),u},setHref:function(e){var t=this.parse(e);if(t)throw VO(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new JM(e.path[0]).origin}catch(HN){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+kM(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(MO(e)+":",IM)},getUsername:function(){return this.username},setUsername:function(e){var t=AO(MO(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=xM(t[n],CM)}},getPassword:function(){return this.password},setPassword:function(e){var t=AO(MO(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=xM(t[n],CM)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?kM(e):kM(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,jM)},getHostname:function(){var e=this.host;return null===e?"":kM(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,BM)},getPort:function(){var e=this.port;return null===e?"":MO(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=MO(e))?this.port=null:this.parse(e,zM))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+qO(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,WM))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=MO(e))?this.query=null:("?"==YO(e,0)&&(e=nM(e,1)),this.query="",this.parse(e,qM)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=MO(e))?("#"==YO(e,0)&&(e=nM(e,1)),this.fragment="",this.parse(e,$M)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var JM=function(e){var t=TO(this,QM),n=DO(arguments.length,1)>1?arguments[1]:void 0,i=UO(t,new ZM(e,!1,n));_O||(t.href=i.serialize(),t.origin=i.getOrigin(),t.protocol=i.getProtocol(),t.username=i.getUsername(),t.password=i.getPassword(),t.host=i.getHost(),t.hostname=i.getHostname(),t.port=i.getPort(),t.pathname=i.getPathname(),t.search=i.getSearch(),t.searchParams=i.getSearchParams(),t.hash=i.getHash())},QM=JM.prototype,eL=function(e,t){return{get:function(){return HO(this)[e]()},set:t&&function(e){return HO(this)[t](e)},configurable:!0,enumerable:!0}};if(_O&&(xO(QM,"href",eL("serialize","setHref")),xO(QM,"origin",eL("getOrigin")),xO(QM,"protocol",eL("getProtocol","setProtocol")),xO(QM,"username",eL("getUsername","setUsername")),xO(QM,"password",eL("getPassword","setPassword")),xO(QM,"host",eL("getHost","setHost")),xO(QM,"hostname",eL("getHostname","setHostname")),xO(QM,"port",eL("getPort","setPort")),xO(QM,"pathname",eL("getPathname","setPathname")),xO(QM,"search",eL("getSearch","setSearch")),xO(QM,"searchParams",eL("getSearchParams")),xO(QM,"hash",eL("getHash","setHash"))),CO(QM,"toJSON",(function(){return HO(this).serialize()}),{enumerable:!0}),CO(QM,"toString",(function(){return HO(this).serialize()}),{enumerable:!0}),zO){var tL=zO.createObjectURL,nL=zO.revokeObjectURL;tL&&CO(JM,"createObjectURL",wO(tL,zO)),nL&&CO(JM,"revokeObjectURL",wO(nL,zO))}LO(JM,"URL"),mO({global:!0,constructor:!0,forced:!kO,sham:!_O},{URL:JM});var iL=An,rL=o,oL=ad,aL=Yi,sL=UI,lL=ae("URL");iL({target:"URL",stat:!0,forced:!(sL&&rL((function(){lL.canParse()})))},{canParse:function(e){var t=oL(arguments.length,1),n=aL(e),i=t<2||void 0===arguments[1]?void 0:aL(arguments[1]);try{return!!new lL(n,i)}catch(HN){return!1}}});var uL=n(te.URL),cL=function(){function e(t){xC(this,e),this.config=t.config,this.parent=t.root,this.root=kT.createDom("ul","",{},"xg-options-list xg-list-slide-scroll ".concat(this.config.className)),t.root.appendChild(this.root);var n=this.config.maxHeight;n&&this.setStyle({maxHeight:n}),this.onItemClick=this.onItemClick.bind(this),this.renderItemList();var i="touch"===this.config.domEventType?"touchend":"click";this._delegates=JS.delegate.call(this,this.root,"li",i,this.onItemClick)}return SC(e,[{key:"renderItemList",value:function(e){var t,n=this,i=this.config,r=this.root;(e?i.data=e:e=i.data,i.style)&&Ub(t=hw(i.style)).call(t,(function(e){r.style[e]=i[e]}));e.length>0&&(this.attrKeys=hw(e[0])),this.root.innerHTML="",Ub(e).call(e,(function(e,t){var i=e.selected?"option-item selected":"option-item";e["data-index"]=t,n.root.appendChild(kT.createDom("li","<span>".concat(e.showText,"</span>"),e,i))}))}},{key:"onItemClick",value:function(e){e.delegateTarget||(e.delegateTarget=e.target);var t=e.delegateTarget;if(t&&kT.hasClass(t,"selected"))return!1;var n="function"==typeof this.config.onItemClick?this.config.onItemClick:null,i=this.root.querySelector(".selected");kT.addClass(t,"selected"),i&&kT.removeClass(i,"selected"),n(e,{from:i?this.getAttrObj(i,this.attrKeys):null,to:this.getAttrObj(t,this.attrKeys)})}},{key:"getAttrObj",value:function(e,t){if(!e||!t)return{};var n={};Ub(t).call(t,(function(t){n[t]=e.getAttribute(t)}));var i=e.getAttribute("data-index");return i&&(n.index=Number(i)),n}},{key:"show",value:function(){kT.removeClass(this.root,"hide"),kT.addClass(this.root,"active")}},{key:"hide",value:function(){kT.removeClass(this.root,"active"),kT.addClass(this.root,"hide")}},{key:"setStyle",value:function(e){var t=this;hw(e).forEach((function(n){t.root.style[n]=e[n]}))}},{key:"destroy",value:function(){var e;this._delegates&&(Ub(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}(),hL=An,fL=E;P.f;var dL=Un,pL=Yi,vL=Xb,gL=X,yL=$b,mL=fL("".startsWith),_L=fL("".slice),kL=Math.min;hL({target:"String",proto:!0,forced:!yL("startsWith")},{startsWith:function(e){var t=pL(gL(this));vL(e);var n=dL(kL(arguments.length>1?arguments[1]:void 0,t.length)),i=pL(e);return mL?mL(t,i,n):_L(t,n,n+i.length)===i}});var bL,wL=Vc("String").startsWith,EL=se,CL=wL,xL=String.prototype,TL=n((function(e){var t=e.startsWith;return"string"==typeof e||e===xL||EL(xL,e)&&t===xL.startsWith?CL:t})),SL={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"},PL=Ky(Ky({},kS),SL),AL=(zy(bL={},SL.SEI,{event:"core_event",shouldCallback:function(e){return"core.sei"===(null==e?void 0:e.eventName)}}),zy(bL,SL.AUTOPLAY_STARTED,{event:XT}),zy(bL,SL.AUTOPLAY_PREVENTED,{event:qT}),zy(bL,SL.FULLSCREEN_CHANGE,{event:rS}),zy(bL,SL.CSS_FULLSCREEN_CHANGE,{event:oS}),zy(bL,SL.MINI_STATE_CHANGE,{event:aS}),zy(bL,SL.DEFINITION_CHANGE,{event:sS}),zy(bL,SL.BEFORE_DEFINITION_CHANGE,{event:lS}),zy(bL,SL.AFTER_DEFINITION_CHANGE,{event:uS}),zy(bL,SL.VIDEO_RESIZE,{event:hS}),zy(bL,SL.PIP_CHANGE,{event:fS}),zy(bL,SL.USER_ACTION,{event:vS}),zy(bL,SL.DOWNLOAD_SPEED_CHANGE,{event:eS}),zy(bL,SL.ABR_SWITCH_START,{event:"switch_definition_start"}),zy(bL,SL.ABR_SWITCH_SUCCESS,{event:"switch_definition_success"}),zy(bL,SL.ABR_SWITCH_FAILED,{event:"switch_definition_fail"}),bL);var IL=/["'&<>]/;function RL(e,t){return function(e){if(qy(e))return e}(e)||function(e,t){var n=null==e?null:void 0!==nc&&Jy(e)||e["@@iterator"];if(null!=n){var i,r,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(hh(s).call(s,i.value),s.length!==t);l=!0);}catch(c){u=!0,r=c}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return s}}(e,t)||gm(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var OL=A,ML=g,LL=pr,DL=Z,NL=ML(M.f),FL=ML([].push),UL=function(e){return function(t){for(var n,i=DL(t),r=LL(i),o=r.length,a=0,s=[];o>a;)n=r[a++],OL&&!NL(i,n)||FL(s,e?[n,i[n]]:i[n]);return s}},HL={entries:UL(!0),values:UL(!1)},jL=HL.entries;An({target:"Object",stat:!0},{entries:function(e){return jL(e)}});var BL=n(te.Object.entries);var zL=Re,VL=qe,KL=K,GL=jn,WL=TypeError,YL=function(e){return function(t,n,i,r){zL(n);var o=VL(t),a=KL(o),s=GL(o),l=e?s-1:0,u=e?-1:1;if(i<2)for(;;){if(l in a){r=a[l],l+=u;break}if(l+=u,e?l<0:s<=l)throw WL("Reduce of empty array with no initial value")}for(;e?l>=0:s>l;l+=u)l in a&&(r=n(r,a[l],l,o));return r}},XL={left:YL(!1),right:YL(!0)}.left;An({target:"Array",proto:!0,forced:!Bf&&ve>79&&ve<83||!Hc("reduce")},{reduce:function(e){var t=arguments.length;return XL(this,e,t,t>1?arguments[1]:void 0)}});var qL=Vc("Array").reduce,$L=se,ZL=qL,JL=Array.prototype,QL=n((function(e){var t=e.reduce;return e===JL||$L(JL,e)&&t===JL.reduce?ZL:t}));var eD=function(){function e(t){var n;mm(this,e),zy(this,"definition",void 0),zy(this,"source",void 0),zy(this,"text",void 0),zy(this,"fallbackUrl",void 0),zy(this,"urls",void 0),zy(this,"_currentUrlRef",void 0);var i=t.url,r=t.definition,o=t.text,a=t.source,s=t.fallbackUrls;this.definition=r,this.text=o,this.source=a,this.urls=Fm(n=[i]).call(n,ym(null!=s?s:[])),this.fallbackUrl=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t={url:e[0],next:null},n=t,i=1;i<e.length;i++){var r=i===e.length-1?t:null,o={url:e[i],next:r};n.next=o,n=o}return t}(this.urls),this._currentUrlRef=this.fallbackUrl}return km(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;return e&&(this._currentUrlRef=e),this._currentUrlRef}}]),e}(),tD=function(){function e(t,n,i){var r=this;mm(this,e),zy(this,"name",void 0),zy(this,"text",void 0),zy(this,"definitions",void 0),this.definitions=Ub(t).call(t,(function(e){return new eD(xE({},e,{source:r}))})),this.name=n,this.text=i}return km(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 n=void 0,i=void 0,r=void 0;if("string"==typeof t?n=t:Array.isArray(t)?r=t:(n=t.url,i=t.fallbackUrls,r=t.sources),"string"==typeof n)return e.normalizeUrl(n,i);if(Array.isArray(r)){if(0===r.length)throw new Error('"sources" cannot be an empty array');return Ub(r).call(r,(function(t){var n;return new e(Ub(n=t.definitions).call(n,(function(e){return"string"==typeof e?{url:e,definition:"unknown"}:e})),t.name,t.text)}))}return[]}},{key:"normalizeUrl",value:function(t,n){var i=new e([],"unknown");return i.add(new eD({definition:"unknown",url:t,source:i,fallbackUrls:n})),[i]}}]),e}(),nD=function(){function e(t){var n,i,r,o;mm(this,e),zy(this,"defaultSource",void 0),zy(this,"defaultDefinition",void 0),zy(this,"maxFallbackRound",void 0),zy(this,"_currentDefinition",void 0),zy(this,"_sources",void 0),zy(this,"_fallbackCount",0);var a=t.url,s=t.defaultDefinition,l=t.defaultSource,u=t.sources,c=t.maxFallbackRound;this.defaultDefinition=s,this.defaultSource=l,this.maxFallbackRound=null!=c?c:1,this._sources=u;var h=a?Wm(this).call(this,a):null===(n=Wm(i=this.sources).call(i,(function(e){return void 0===l||e.name===l})))||void 0===n?void 0:Wm(r=n.definitions).call(r,(function(e){return void 0===s||e.definition===s}));this._currentDefinition=null!=h?h: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 km(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 n,i,r,o,a,s=this;if("string"==typeof e)return Wm(o=QL(a=this.sources).call(a,(function(e,t){return Fm(e).call(e,t.definitions)}),[])).call(o,(function(t){return t.url===e}));var l=Wm(n=this.sources).call(n,(function(t){var n,i;return t.name===(null!==(n=null==e?void 0:e.source)&&void 0!==n?n:null===(i=s.source)||void 0===i?void 0:i.name)})),u=null==l?void 0:Wm(i=l.definitions).call(i,(function(t){var n,i;return t.definition===(null!==(n=null==e?void 0:e.definition)&&void 0!==n?n:null===(i=s.definition)||void 0===i?void 0:i.definition)}));return u||(null!=t&&t.fallbackToFirstDefinition&&null!=l&&null!==(r=l.definitions)&&void 0!==r&&r.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 n,i,r,o,a;return this._sources=tD.normalize(e),this._currentDefinition=null!==(n=Wm(this).call(this,null!=t?t:{source:null!==(i=this.defaultSource)&&void 0!==i?i:null===(r=this._currentDefinition)||void 0===r?void 0:r.source.name,definition:null!==(o=this.defaultDefinition)&&void 0!==o?o:null===(a=this._currentDefinition)||void 0===a?void 0:a.definition}))&&void 0!==n?n:this._sources[0].definitions[0],this.resetFallback(),this}},{key:"resetFallback",value:function(){this._fallbackCount=0}}]),e}();function iD(){var e;"undefined"!=typeof Reflect&&yC?iD=tA(e=yC).call(e):iD=function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=rA(e)););return e}(e,t);if(i){var r=Cy(i,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}};return iD.apply(this,arguments)}function rD(){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 oD=function(e){iA(n,e);var t=aA(n);function n(){var e,i;mm(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return zy(YP(i=t.call.apply(t,Fm(e=[this]).call(e,o))),"_error",void 0),i}return km(n,[{key:"_errorTip",get:function(){var e,t,n,i=this.player.config.i18nManager,r=null===(e=this._error)||void 0===e?void 0:e.errorCode;return this.config.errorTipsText?i.normalize(this.config.errorTipsText):Fm(t="".concat(r?"[".concat(r,"] "):"")).call(t,null===(n=this._error)||void 0===n?void 0:n.message)}},{key:"afterCreate",value:function(){this._handleRefresh=this._handleRefresh.bind(this),this._focus=this._focus.bind(this),this._initEvents(),this._initIcons(),"mobile"===ST.device&&this.bind("touchend",this._focus),this.bind(".veplayer-error-refresh","click",this._handleRefresh)}},{key:"registerIcons",value:function(){return{error:{icon:rD,class:"veplayer-error-svg"}}}},{key:"updateLang",value:function(){this.config.showRefresh&&this._renderRefresh(),this._renderExtraTips()}},{key:"showError",value:function(e){this._error=e instanceof fA?e:pA(e),this.config.showErrorTip&&this._renderText(this._errorTip),this._renderExtraTips(),iD(rA(n.prototype),"show",this).call(this)}},{key:"hideError",value:function(){iD(rA(n.prototype),"hide",this).call(this)}},{key:"destroy",value:function(){"mobile"===ST.device&&this.unbind("touchend",this._focus),this.unbind(".veplayer-error-refresh","click",this._handleRefresh),this.off(PL.FALLBACK_ERROR,this.showError.bind(this)),this.off(HT,this.hideError.bind(this))}},{key:"render",value:function(){var e,t=this.player.config.i18nManager;return Fm(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(PL.FALLBACK_ERROR,this.showError.bind(this)),this.on(HT,this.hideError.bind(this)),this.on(OT,this.hideError.bind(this)),this.on(cS,this.hideError.bind(this))}},{key:"_renderText",value:function(e){var t=Wm(this).call(this,".veplayer-error-tips");t&&(t.innerText=e)}},{key:"_renderExtraTips",value:function(){var e,t=this,n=Wm(this).call(this,".veplayer-error-extra");n&&(n.innerHTML="");var i=this.player.config.i18nManager;null===(e=this.config.extraTips)||void 0===e||e.forEach((function(e){if(e){var n,r=kT.createDom("div",Fm(n="".concat(i.normalize(e.label),": ")).call(n,i.normalize(e.value)),void 0,"veplayer-error-detail-info");t.appendChild(".veplayer-error-extra",r)}}))}},{key:"_handleRefresh",value:function(){var e,t;null===(e=this.player)||void 0===e||e.emit(PL.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,n=Wm(this).call(this,".veplayer-error-refresh");n&&(n.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:JS.POSITIONS.ROOT}}}]),n}(JS),aD=function(e){iA(n,e);var t=aA(n);function n(){var e,i;mm(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return zy(YP(i=t.call.apply(t,Fm(e=[this]).call(e,o))),"_toastNumber",0),zy(YP(i),"_toastMap",{}),i}return km(n,[{key:"toast",value:function(e,t){var n=this,i=t||{},r=i.duration,o=void 0===r?2e3:r,a=i.closable,s=void 0!==a&&a,l=this._toastNumber+1;this._toastNumber=l;var u=this._renderToast(e,s,l);return this.root.appendChild(u),this._toastMap[l]=u,setTimeout((function(){n.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,n){var i=this,r=kT.createDom("div","",void 0,"veplayer-toast-container"),o=kT.checkIsObject(e)?e:kT.createDom("div",e,void 0,"veplayer-toast-txt");if(r.appendChild(o),t){var a=kT.createDom("span","×",void 0,"veplayer-toast-close");a.addEventListener("click",(function(){i.remove(n)})),r.appendChild(a)}return r}}],[{key:"pluginName",get:function(){return"toast"}},{key:"defaultConfig",get:function(){return{index:5}}}]),n}(JS);function sD(){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 lD=function(){function e(t){mm(this,e),zy(this,"_root",void 0),zy(this,"_config",void 0),zy(this,"_parent",void 0),zy(this,"_listDom",void 0),zy(this,"_container",void 0),zy(this,"_titleDom",void 0),zy(this,"_player",void 0),zy(this,"_delegates",void 0),zy(this,"_listType",void 0);var n=t.config,i=t.root,r=t.player;this._config=n,this._parent=i,this._player=r,this._listType=n.listType,this.renderPanel(),this._initEvents(),this._bindDomEvent()}return km(e,[{key:"changeMode",value:function(e){this.updatePanel(e),this._listType=e}},{key:"renderItemList",value:function(e){var t,n=this,i=this._config;return e&&(i.list=e),this._listDom||(this._listDom=kT.createDom("div","",{},"item-list-panel-content")),this._listDom.innerHTML="",null===(t=i.list)||void 0===t||Ub(t).call(t,(function(e,t){var i,r,o=e.selected?"panel-item select-in":"panel-item ".concat(null!==(i=e.className)&&void 0!==i?i:"");e["data-index"]=t;var a=kT.createDom("div","",e,o);e.showText&&("string"==typeof e.showText?a.innerHTML=e.showText:a.appendChild(e.showText)),null===(r=n._listDom)||void 0===r||r.appendChild(a)})),this._listDom}},{key:"renderTitle",value:function(){var e,t,n=this._player.config.i18nManager;if(null!==(e=this._config.panel)&&void 0!==e&&e.title&&this._listType!==uD.Inner)return this._titleDom||(this._titleDom=kT.createDom("div","",{},"xg-mobile-panel-title")),this._titleDom.innerHTML=n.normalize(null===(t=this._config.panel)||void 0===t?void 0:t.title),this._titleDom}},{key:"updatePanel",value:function(e){this._root&&kT.removeClass(this._root,"panel-".concat(this._listType)),this._root&&kT.addClass(this._root,"panel-".concat(e));var t="mobile"===ST.device?"touchend":"click";e===uD.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,n,i=Fm(e="xg-mobile-panel panel-".concat(this._config.listType," ")).call(e,null!==(t=null===(n=this._config)||void 0===n||null===(n=n.panel)||void 0===n?void 0:n.className)&&void 0!==t?t:"");this._root=kT.createDom("div","",{},i),this._parent&&this._parent.appendChild(this._root);var r=this.renderTitle(),o=this.renderItemList();this._container=kT.createDom("div","",{},"xg-mobile-panel-content"),this._root.appendChild(this._container),r&&this._container.appendChild(r),o&&this._container.appendChild(o)}},{key:"show",value:function(){this._root&&(kT.removeClass(this._root,"hide"),kT.addClass(this._root,"active"))}},{key:"hide",value:function(){this._root&&(kT.removeClass(this._root,"active"),kT.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,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e&&"on".concat(t)in e&&"function"==typeof n&&e.addEventListener(t,n,i)}},{key:"_unbind",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e&&"on".concat(t)in e&&"function"==typeof n&&e.removeEventListener(t,n,i)}},{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(rS,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(rS,this._handleOrientationChange.bind(this))}},{key:"_handleOrientationChange",value:function(){var e,t,n,i=uw(e=[90,-90,"90","-90"]).call(e,window.orientation);if(null!==(t=this._player)&&void 0!==t&&t.fullscreen&&i)this.changeMode(uD.Fullscreen);else if(this._listType!==(null===(n=this._config)||void 0===n?void 0:n.listType)){var r;this.changeMode(null===(r=this._config)||void 0===r?void 0:r.listType)}}},{key:"_bindDomEvent",value:function(){var e="mobile"===ST.device?"touchend":"click";this._listType===uD.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=JS.delegate.call(this,this._listDom,".panel-item",e,this._onItemClick.bind(this),!0))}},{key:"_unbindDomEvent",value:function(){var e,t="mobile"===ST.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)&&(Ub(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,n,i,r,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");kT.addClass(o,"selected"),l&&(kT.removeClass(l,"selected"),r=Number(l.getAttribute("data-index")));var u=Number(o.getAttribute("data-index")),c={from:void 0!==wc(r)?null===(n=this._config.list)||void 0===n?void 0:n[r]:void 0,to:null===(i=this._config.list)||void 0===i?void 0:i[u]};null==a||a(e,c),o&&r===u||null==s||s(e,c)}},{key:"_handleHide",value:function(e){var t,n;e.stopPropagation(),e.preventDefault(),null===(t=(n=this._config).hide)||void 0===t||t.call(n)}}]),e}(),uD=function(e){return e.Middle="middle",e.Bottom="bottom",e.Fullscreen="fullscreen",e.Inner="inner",e}(uD||{}),cD=function(e){return e.Icon="Icon",e.Text="Text",e}(cD||{}),hD="mobile"===ST.device,fD=["bottom","fullscreen","inner"],dD=["middle"],pD=["bottom","inner","fullscreen"],vD=["bottom","inner","fullscreen"],gD=function(e){iA(n,e);var t=aA(n);function n(e){var i;return mm(this,n),zy(YP(i=t.call(this,e)),"optionsList",void 0),zy(YP(i),"_isIcon",void 0),zy(YP(i),"_isActive",void 0),zy(YP(i),"_curIndex",void 0),zy(YP(i),"activeEvent",void 0),zy(YP(i),"onEnter",(function(e){e.preventDefault(),e.stopPropagation(),i.emit("icon_mouseenter",{pluginName:i.pluginName}),i.toggle(!0)})),zy(YP(i),"onLeave",(function(e){e.preventDefault(),e.stopPropagation(),i.emit("icon_mouseleave",{pluginName:i.pluginName}),i._isActive&&i.toggle(!1)})),i._isIcon=!1,i._isActive=!1,i._curIndex=0,i}return km(n,[{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&&kT.addClass(this.root,"portrait"),hD&&this.on(KT,(function(){e._isActive&&(e.optionsList&&e.optionsList.hide(),e._isActive=!1)})),t.list&&this.renderItemList(t.list),this.activeEvent=hD?"touchend":"mouseenter",this.bind(this.activeEvent,this.onEnter),this.bind("mouseleave",this.onLeave)}},{key:"initIcons",value:function(){var e=this,t=this.icons,n=hw(t);if(n.length>0&&"Icon"===this.config.renderType)return n.forEach((function(n){e.appendChild(".xgplayer-icon",t[n])})),void(this._isIcon=!0);var i=this.appendChild(".xgplayer-icon",kT.createDom("span","",{},"icon-text"));i&&kT.addClass(i,"btn-text")}},{key:"show",value:function(){!this.config.list||this.config.list.length<1||this.config.hideOnSingleOption&&1===this.config.list.length||kT.addClass(this.root,"show")}},{key:"hide",value:function(){kT.removeClass(this.root,"show")}},{key:"toggle",value:function(e){if(e!==this._isActive){var t=this.player.controls,n=this.config.listType;e?(n&&uw(pD).call(pD,n)?null==t||t.blur():null==t||t.focus(),this.optionsList&&this.optionsList.show()):(n&&uw(pD).call(pD,n)?null==t||t.focus():null==t||t.focusAwhile(),this.optionsList&&this.optionsList.hide()),this._isActive=e}}},{key:"onItemClick",value:function(e,t){var n;e.preventDefault(),e.stopPropagation();var i=this.config.listType;this._curIndex=null===(n=t.to)||void 0===n?void 0:n.index,this.changeCurrentText(),(this.config.isItemClickHide||i&&uw(pD).call(pD,i))&&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,n=null==e?void 0:e[t];if(n){var i,r=Wm(this).call(this,".icon-text"),o=this.player.config.i18nManager;if(r)r.innerHTML=o.normalize(null!==(i=null==n?void 0:n.iconText)&&void 0!==i?i:null==n?void 0:n.text)}}}},{key:"renderItemList",value:function(e,t){var i,r=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 lD&&a.renderTitle());this.config.isShowIcon&&(this.optionsList=o.listType&&uw(vD).call(vD,o.listType)?new lD({config:{list:e||[],onItemClick:function(e,t){r.onItemClick(e,t)},onOptionClick:function(e,t){r.onOptionClick(e,t)},panel:this.config.panel,listType:null!==(i=o.listType)&&void 0!==i?i:n.defaultConfig.listType,isAutoChange:o.isAutoChange,hide:function(){return r.toggle(!1)}},root:s.root,player:s}):new cL({config:{data:e||[],onItemClick:function(e,t){r.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),hD||t&&uw(fD).call(fD,t)||(t="bottom"),hD||t&&uw(dD).call(dD,t)||(t="middle"),t}}],[{key:"pluginName",get:function(){return"optionsIcon"}},{key:"defaultConfig",get:function(){return{position:hD?MN.ROOT_TOP_RIGHT:MN.CONTROLS_RIGHT,listType:hD?"bottom":"middle",index:100,list:[],listStyle:{},hidePortrait:!0,isShowIcon:!1,renderType:hD?"Icon":"Text",isItemClickHide:!0,hideOnSingleOption:!0,isAutoChange:!0}}}]),n}(JS),yD=function(e){iA(n,e);var t=aA(n);function n(){return mm(this,n),t.apply(this,arguments)}return km(n,[{key:"updateLang",value:function(){this.renderItemList()}},{key:"beforeCreate",value:function(e){var t=e.player.config.sources.sourceManager;e.config.list=t.sources}},{key:"afterCreate",value:function(){iD(rA(n.prototype),"afterCreate",this).call(this),this.config.sourceManager.sources.length<2?this.hide():this.renderItemList()}},{key:"registerIcons",value:function(){return{source:{icon:sD}}}},{key:"renderItemList",value:function(){var e=this.config.sourceManager,t=e.sources,i=e.source,r=this.player.config.i18nManager,o=Ub(t).call(t,(function(e){var t;return Ky(Ky({},e),{},{showText:null!==(t=r.normalize(e.text))&&void 0!==t?t:e.name,selected:!1})})),a=mI(o).call(o,(function(e){return e.name===(null==i?void 0:i.name)}));this.config.list=t,a>-1&&(o[a].selected=!0),iD(rA(n.prototype),"renderItemList",this).call(this,o,a)}},{key:"onItemClick",value:function(e,t){var i,r=this;iD(rA(n.prototype),"onItemClick",this).call(this,e,t),null===(i=this.player.config)||void 0===i||i.veplayer.switch({source:t.to.name},{fallbackToFirstDefinition:!0}).catch((function(){r.renderItemList()}))}}],[{key:"pluginName",get:function(){return"sources"}},{key:"defaultConfig",get:function(){return Ky(Ky({},gD.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":"線路"}}}]),n}(gD);function mD(){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 _D={exports:{}};!function(e,n){var i="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",a="[object Boolean]",s="[object Date]",l="[object Function]",u="[object GeneratorFunction]",c="[object Map]",h="[object Number]",f="[object Object]",d="[object Promise]",p="[object RegExp]",v="[object Set]",g="[object String]",y="[object Symbol]",m="[object WeakMap]",_="[object ArrayBuffer]",k="[object DataView]",b="[object Float32Array]",w="[object Float64Array]",E="[object Int8Array]",C="[object Int16Array]",x="[object Int32Array]",T="[object Uint8Array]",S="[object Uint8ClampedArray]",P="[object Uint16Array]",A="[object Uint32Array]",I=/\w*$/,R=/^\[object .+?Constructor\]$/,O=/^(?:0|[1-9]\d*)$/,M={};M[o]=M["[object Array]"]=M[_]=M[k]=M[a]=M[s]=M[b]=M[w]=M[E]=M[C]=M[x]=M[c]=M[h]=M[f]=M[p]=M[v]=M[g]=M[y]=M[T]=M[S]=M[P]=M[A]=!0,M["[object Error]"]=M[l]=M[m]=!1;var L="object"==wc(t)&&t&&t.Object===Object&&t,D="object"==("undefined"==typeof self?"undefined":wc(self))&&self&&self.Object===Object&&self,N=L||D||Function("return this")(),F=n&&!n.nodeType&&n,U=F&&e&&!e.nodeType&&e,H=U&&U.exports===F;function j(e,t){return e.set(t[0],t[1]),e}function B(e,t){return e.add(t),e}function z(e,t,n,i){var r=-1,o=e?e.length:0;for(i&&o&&(n=e[++r]);++r<o;)n=t(n,e[r],r,e);return n}function V(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}function K(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function G(e,t){return function(n){return e(t(n))}}function W(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var Y,X=Array.prototype,q=Function.prototype,$=Object.prototype,Z=N["__core-js_shared__"],J=(Y=/[^.]+$/.exec(Z&&cE(Z)&&cE(Z).IE_PROTO||""))?"Symbol(src)_1."+Y:"",Q=q.toString,ee=$.hasOwnProperty,te=$.toString,ne=RegExp("^"+Q.call(ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ie=H?N.Buffer:void 0,re=N.Symbol,oe=N.Uint8Array,ae=G(LE,Object),se=Object.create,le=$.propertyIsEnumerable,ue=Mw(X),ce=TE,he=ie?ie.isBuffer:void 0,fe=G(hw,Object),de=Ue(N,"DataView"),pe=Ue(N,"Map"),ve=Ue(N,"Promise"),ge=Ue(N,"Set"),ye=Ue(N,"WeakMap"),me=Ue(Object,"create"),_e=Ve(de),ke=Ve(pe),be=Ve(ve),we=Ve(ge),Ee=Ve(ye),Ce=re?re.prototype:void 0,xe=Ce?Ce.valueOf:void 0;function Te(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Se(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Pe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Ae(e){this.__data__=new Se(e)}function Ie(e,t){var n=Ge(e)||function(e){return function(e){return function(e){return!!e&&"object"==wc(e)}(e)&&We(e)}(e)&&ee.call(e,"callee")&&(!le.call(e,"callee")||te.call(e)==o)}(e)?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],i=n.length,r=!!i;for(var a in e)!t&&!ee.call(e,a)||r&&("length"==a||Be(a,i))||n.push(a);return n}function Re(e,t,n){var i=e[t];ee.call(e,t)&&Ke(i,n)&&(void 0!==n||t in e)||(e[t]=n)}function Oe(e,t){for(var n=e.length;n--;)if(Ke(e[n][0],t))return n;return-1}function Me(e,t,n,i,r,d,m){var R;if(i&&(R=d?i(e,r,d,m):i(e)),void 0!==R)return R;if(!qe(e))return e;var O=Ge(e);if(O){if(R=function(e){var t=e.length,n=e.constructor(t);t&&"string"==typeof e[0]&&ee.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!t)return function(e,t){var n=-1,i=e.length;t||(t=Array(i));for(;++n<i;)t[n]=e[n];return t}(e,R)}else{var L=je(e),D=L==l||L==u;if(Ye(e))return function(e,t){if(t)return fw(e).call(e);var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(L==f||L==o||D&&!d){if(V(e))return d?e:{};if(R=function(e){return"function"!=typeof e.constructor||ze(e)?{}:(t=ae(e),qe(t)?se(t):{});var t}(D?{}:e),!t)return function(e,t){return Ne(e,He(e),t)}(e,function(e,t){return e&&Ne(t,$e(t),e)}(R,e))}else{if(!M[L])return d?e:{};R=function(e,t,n,i){var r=e.constructor;switch(t){case _:return De(e);case a:case s:return new r(+e);case k:return function(e,t){var n=t?De(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,i);case b:case w:case E:case C:case x:case T:case S:case P:case A:return function(e,t){var n=t?De(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,i);case c:return function(e,t,n){var i=t?n(K(e),!0):K(e);return z(i,j,new e.constructor)}(e,i,n);case h:case g:return new r(e);case p:return function(e){var t=new e.constructor(e.source,I.exec(e));return t.lastIndex=e.lastIndex,t}(e);case v:return function(e,t,n){var i=t?n(W(e),!0):W(e);return z(i,B,new e.constructor)}(e,i,n);case y:return o=e,xe?Object(xe.call(o)):{}}var o}(e,L,Me,t)}}m||(m=new Ae);var N=m.get(e);if(N)return N;if(m.set(e,R),!O)var F=n?function(e){return function(e,t,n){var i=t(e);return Ge(e)?i:function(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}(i,n(e))}(e,$e,He)}(e):$e(e);return function(e,t){for(var n=-1,i=e?e.length:0;++n<i&&!1!==t(e[n],n,e););}(F||e,(function(r,o){F&&(r=e[o=r]),Re(R,o,Me(r,t,n,i,o,e,m))})),R}function Le(e){return!(!qe(e)||(t=e,J&&J in t))&&(Xe(e)||V(e)?ne:R).test(Ve(e));var t}function De(e){var t=new e.constructor(e.byteLength);return new oe(t).set(new oe(e)),t}function Ne(e,t,n,i){n||(n={});for(var r=-1,o=t.length;++r<o;){var a=t[r],s=i?i(n[a],e[a],a,n,e):void 0;Re(n,a,void 0===s?e[a]:s)}return n}function Fe(e,t){var n,i,r=e.__data__;return("string"==(i=wc(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof t?"string":"hash"]:Ub(r)}function Ue(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Le(n)?n:void 0}Te.prototype.clear=function(){this.__data__=me?me(null):{}},Te.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Te.prototype.get=function(e){var t=this.__data__;if(me){var n=t[e];return n===i?void 0:n}return ee.call(t,e)?t[e]:void 0},Te.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:ee.call(t,e)},Te.prototype.set=function(e,t){return this.__data__[e]=me&&void 0===t?i:t,this},Se.prototype.clear=function(){this.__data__=[]},Se.prototype.delete=function(e){var t=this.__data__,n=Oe(t,e);return!(n<0)&&(n==t.length-1?t.pop():ue.call(t,n,1),!0)},Se.prototype.get=function(e){var t=this.__data__,n=Oe(t,e);return n<0?void 0:t[n][1]},Se.prototype.has=function(e){return Oe(this.__data__,e)>-1},Se.prototype.set=function(e,t){var n=this.__data__,i=Oe(n,e);return i<0?n.push([e,t]):n[i][1]=t,this},Pe.prototype.clear=function(){this.__data__={hash:new Te,map:new(pe||Se),string:new Te}},Pe.prototype.delete=function(e){return Fe(this,e).delete(e)},Pe.prototype.get=function(e){return Fe(this,e).get(e)},Pe.prototype.has=function(e){return Fe(this,e).has(e)},Pe.prototype.set=function(e,t){return Fe(this,e).set(e,t),this},Ae.prototype.clear=function(){this.__data__=new Se},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 n=this.__data__;if(n instanceof Se){var i=n.__data__;if(!pe||i.length<199)return i.push([e,t]),this;n=this.__data__=new Pe(i)}return n.set(e,t),this};var He=ce?G(ce,Object):function(){return[]},je=function(e){return te.call(e)};function Be(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||O.test(e))&&e>-1&&e%1==0&&e<t}function ze(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||$)}function Ve(e){if(null!=e){try{return Q.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Ke(e,t){return e===t||e!=e&&t!=t}(de&&je(new de(new ArrayBuffer(1)))!=k||pe&&je(new pe)!=c||ve&&je(ve.resolve())!=d||ge&&je(new ge)!=v||ye&&je(new ye)!=m)&&(je=function(e){var t=te.call(e),n=t==f?e.constructor:void 0,i=n?Ve(n):void 0;if(i)switch(i){case _e:return k;case ke:return c;case be:return d;case we:return v;case Ee:return m}return t});var Ge=Array.isArray;function We(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!Xe(e)}var Ye=he||function(){return!1};function Xe(e){var t=qe(e)?te.call(e):"";return t==l||t==u}function qe(e){var t=wc(e);return!!e&&("object"==t||"function"==t)}function $e(e){return We(e)?Ie(e):function(e){if(!ze(e))return fe(e);var t=[];for(var n in Object(e))ee.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return Me(e,!0,!0)}}(_D,_D.exports);var kD=n(_D.exports),bD=function(e){iA(i,e);var t,n=aA(i);function i(){var e,t;mm(this,i);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return zy(YP(t=n.call.apply(n,Fm(e=[this]).call(e,o))),"_waitingStartTime",0),zy(YP(t),"_timer",void 0),zy(YP(t),"_toastId",void 0),t}return km(i,[{key:"updateLang",value:function(){this.renderItemList()}},{key:"beforeCreate",value:function(e){var t,n=e.player.config.sources.sourceManager;e.config.list=null===(t=n.source)||void 0===t?void 0:t.definitions}},{key:"afterCreate",value:function(){var e,t;iD(rA(i.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(PL.WAITING,this._waiting.bind(this)),this.on(PL.PLAYING,this._clearTimer.bind(this)),this.on(PL.PAUSE,this._clearTimer.bind(this)),this.on(PL.PLAY,this._clearTimer.bind(this)),this._initTimeUpdateEvent())}},{key:"registerIcons",value:function(){return{source:{icon:mD}}}},{key:"renderItemList",value:function(){var e,t,n,r=this,o=this.player.config.sourceManager,a=null!==(e=null===(t=o.source)||void 0===t?void 0:t.definitions)&&void 0!==e?e:[],s=Ub(a).call(a,(function(e){var t;return{url:e.url,definition:e.definition||"",showText:null!==(t=r.player.config.i18nManager.normalize(e.text))&&void 0!==t?t:e.definition,selected:!1}})),l=mI(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===(n=o.source)||void 0===n?void 0:n.definitions,l>-1&&(s[l].selected=!0),iD(rA(i.prototype),"renderItemList",this).call(this,s,l)}},{key:"onItemClick",value:function(e,t){var n,r=this;this._showToast(t.to),iD(rA(i.prototype),"onItemClick",this).call(this,e,t),null===(n=this.player.config)||void 0===n||n.veplayer.switch({definition:t.to.definition}).catch((function(){r.renderItemList()}))}},{key:"fallback",value:(t=Wy(ty().mark((function e(){var t,n,i,r,o,a,s,l=arguments;return ty().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=l.length>0&&void 0!==l[0]?l[0]:{toast:!0},r=this.player.config.sourceManager,!((o=mI(t=this.config.demotePriority).call(t,(function(e){var t;return e===(null===(t=r.definition)||void 0===t?void 0:t.definition)})))<0)){e.next=5;break}return e.abrupt("return");case 5:if(a=kD(r.definition),s=this._getNextDefinition(o)){e.next=9;break}return e.abrupt("return");case 9:if(!i.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(PL.DEFINITION_FALLBACK,{from:a,to:s}),null===(n=this.player.config)||void 0===n||n.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(PL.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,n=this.player.config.i18nManager;return new Hb((function(i){var r,o,a=null===(r=t.player)||void 0===r?void 0:r.getPlugin("toast");if(a){var s=kT.createDom("div",n.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,u=kT.createDom("span",l,void 0,"veplayer-toast-txt-bt");s.appendChild(u);var c=a.toast(s,{duration:5e3,closable:!0});u.addEventListener("click",(function(){a.remove(c),i(!0)}))}else i(!1)}))}},{key:"_getNextDefinition",value:function(e){var t,n=this.player.config.sourceManager;if(null!==(t=n.source)&&void 0!==t&&t.definitions.length&&!(e+1>=this.config.demotePriority.length)){var i=e+1,r=Wm(n).call(n,{definition:this.config.demotePriority[i]});return r||this._getNextDefinition(i)}}},{key:"_initTimeUpdateEvent",value:function(){var e=this,t=this.player.currentTime;this.on(PL.TIME_UPDATE,(function(){var n=e.player.currentTime;n!==t?(t=n,e._clearTimer()):t=n}))}},{key:"_showToast",value:function(e){var t,n,i,r=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(Fm(n="".concat(a.getText("DEFINITION_SWITCHING")," ")).call(n,null!==(i=e.showText)&&void 0!==i?i:e.definition," ..."),{duration:2e3,closable:!0}),this.player.once(PL.AFTER_DEFINITION_CHANGE,(function(){void 0!==r._toastId&&o.remove(r._toastId)})))}}],[{key:"pluginName",get:function(){return"definition"}},{key:"defaultConfig",get:function(){return Ky(Ky({},gD.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":"清晰度"}}}]),i}(gD),wD={"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: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]"},ED=function(e){return e.BizVod="biz:vod",e.BizLive="biz:live",e.PluginFlv="plugin:flv",e.PluginMp4="plugin:mp4",e.PluginHls="plugin:hls",e.PluginShaka="plugin:shaka",e.PluginRtm="plugin:rtm",e.PluginXgvideo="plugin:xgvideo",e.PluginDrm="plugin:drm",e.PluginAbr="plugin:abr",e}(ED||{}),CD=function(){function e(t){var n=this;mm(this,e),zy(this,"modules",{}),zy(this,"mountPromiseMap",{}),zy(this,"_baseUrl",void 0),zy(this,"_moduleSystem",void 0),zy(this,"load",function(){var e=Wy(ty().mark((function e(t,i){var r,o,a,s,l;return ty().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n._moduleSystem){e.next=2;break}throw new Error('You have to specify moduleSystem first, call "setModuleSystem(moduleSystem)" to set module system');case 2:if(wD[t]){e.next=4;break}throw new Error('Invalid module name: "'.concat(t,'"'));case 4:if("esm"!==n._moduleSystem){e.next=11;break}if(n.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=n.modules[t].exports,e.abrupt("return",null!==(r=o.default)&&void 0!==r?r:o);case 11:if(!n.modules[t]){e.next=21;break}if(1!==n.modules[t].state){e.next=16;break}return e.abrupt("return",n.modules[t].exports);case 16:if(0!==n.modules[t].state){e.next=20;break}return e.abrupt("return",n.mountPromiseMap[t].then((function(e){var t;return null!==(t=e.default)&&void 0!==t?t:e})));case 20:throw null!==(a=n.modules[t].error)&&void 0!==a?a:new Error('Dynamic module "'.concat(t,'" load failed.'));case 21:return s=[n._baseUrl,wD[t]].join("/").replace("[env]","production").replace("[ext]","js"),l={src:null!=i?i:s,name:t,state:0,exports:{__PLUGIN_NAME__:t}},n.modules[t]=l,n.mountPromiseMap[t]=n._mount(l),e.abrupt("return",n.mountPromiseMap[t]);case 26:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()),zy(this,"registerPlugin",(function(e,t){if(!n._moduleSystem)throw new Error("You have to specify moduleSystem first, call setModuleSystem(moduleSystem) to set module system");return"esm"===n._moduleSystem?(n.modules[e]={src:"esm:".concat(e),name:e,state:1,exports:t},n.modules[e].exports):(n.modules[e]?n.modules[e].exports=t:n.modules[e]={src:"umd:".concat(e),name:e,state:1,exports:t},n.modules[e].exports)})),zy(this,"register",(function(e){return Ub(e).call(e,(function(e){return n.registerPlugin(e.__PLUGIN_NAME__,e)}))})),this._baseUrl=t.baseUrl}return km(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 Hb((function(n,i){var r=document.createElement("script");r.src=e.src,r.onload=function(){e.state=1,n(t[e.name].exports),r.onload=null},r.onerror=function(t){e.state=2,e.error=t,i(t),r.onerror=null},document.body.appendChild(r)}))}}]),e}(),xD=h,TD=Z,SD=Dn,PD=jn,AD=Hc,ID=Math.min,RD=[].lastIndexOf,OD=!!RD&&1/[1].lastIndexOf(1,-0)<0,MD=AD("lastIndexOf"),LD=OD||!MD?function(e){if(OD)return xD(RD,this,arguments)||0;var t=TD(this),n=PD(t),i=n-1;for(arguments.length>1&&(i=ID(i,SD(arguments[1]))),i<0&&(i=n+i);i>=0;i--)if(i in t&&t[i]===e)return i||0;return-1}:RD;An({target:"Array",proto:!0,forced:LD!==[].lastIndexOf},{lastIndexOf:LD});var DD,ND,FD=Vc("Array").lastIndexOf,UD=se,HD=FD,jD=Array.prototype,BD=n((function(e){var t=e.lastIndexOf;return e===jD||UD(jD,e)&&t===jD.lastIndexOf?HD:t})),zD=null!==(DD=null===(ND=document.currentScript)||void 0===ND?void 0:ND.src)&&void 0!==DD?DD:"https://tosv.byted.org/obj/lux/sdk/@byted/veplayer/".concat("2.5.1-rc.1","/object/umd/"),VD=new CD({baseUrl:fw(zD).call(zD,0,BD(zD).call(zD,"/"))}),KD=VD.registerPlugin,GD=VD.register;function WD(e,t){return YD.apply(this,arguments)}function YD(){return(YD=Wy(ty().mark((function e(t,n){var i;return ty().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,VD.load(t,n);case 3:return e.abrupt("return",e.sent);case 6:throw e.prev=6,e.t0=e.catch(0),dA(uA.MODULE_LOAD_ERROR,{ext:{name:t,cdn:null===e.t0||void 0===e.t0||null===(i=e.t0.target)||void 0===i?void 0:i.src},error:e.t0});case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))).apply(this,arguments)}var XD=function(e){if(e){TL(e).call(e,"//")&&(e=location.protocol+e);try{return new uL(e)}catch(HN){return}}},qD=['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"'];function $D(e){return function(t){var n;return null==t?void 0:uw(n=t.split("?")[0].toLowerCase()).call(n,e)}}var ZD=$D(".m3u8"),JD=$D(".mp4"),QD=$D(".flv"),eN=$D(".sdp"),tN=$D(".mpd");function nN(){return(nN=Wy(ty().mark((function e(){var t,n;return ty().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,WD(ED.PluginXgvideo);case 2:return t=e.sent,n=t.XGVideoPlugin,e.abrupt("return",null==n?void 0:n.isSupported());case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}Ky(Ky({},kT),{},{getStreamType:function(e){return ZD(e)?"hls":QD(e)?"flv":eN(e)?"rtm":JD(e)?"mp4":tN(e)?"dash":"unknown"},isMseSupported:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Yy.H264;return e===Yy.H265?ST.isHevcSupported():e===Yy.H264?ST.isMSESupport():ST.isMSESupport(e)},isSoftDecodeSupported:function(){return nN.apply(this,arguments)},isMMSSupported:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Yy.H264;return void 0!==window.ManagedMediaSource&&(e===Yy.H264?window.ManagedMediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'):e===Yy.H265?qD.some((function(e){return window.ManagedMediaSource.isTypeSupported(e)})):window.ManagedMediaSource.isTypeSupported(e))},appendSearchParams:function(e,t){var n,i=XD(e);if(!e||!i)return null!==(n=e)&&void 0!==n?n:"";var r,o=TL(e).call(e,"//");for(var a in t){var s,l,u=t[a];if(null!=i&&i.searchParams.has(a))null==i||null===(s=i.searchParams)||void 0===s||s.set(a,u);else null==i||null===(l=i.searchParams)||void 0===l||l.append(a,u)}return e=i.toString(),o?null===(r=e)||void 0===r?void 0:r.replace(location.protocol,""):e},getUrlObject:XD});var iN=ST.isWeixin,rN=ST.os,oN=ST.device,aN=rN.isAndroid,sN=rN.isIos,lN="mobile"===oN,uN=0,cN=!1,hN=function(e){iA(n,e);var t=aA(n);function n(e){var i;return mm(this,n),zy(YP(i=t.call(this,e)),"_hasSetUserAutoplay",void 0),zy(YP(i),"_timer",void 0),zy(YP(i),"_wxTimer",void 0),zy(YP(i),"_state",{mode:0,showUnmuteBt:!1}),zy(YP(i),"userClickPlay",(function(){if(!cN){var e=i.player.play();e&&e.then?e.then((function(){console.log("user action autoplay success"),cN=!0})).catch((function(e){console.warn("user action autoplay fail:",e)})):(console.warn("no play promise"),cN=!0)}})),i}return km(n,[{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(qT,this.handleAutoplayPrevented.bind(this)),this.player.on(XT,this.handleAutoplayStart.bind(this)),this.player.on(BT,this.handleVolumechange.bind(this)),this.setUserActionAutoPlay()}},{key:"setWXAutoPlay",value:function(){iN&&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():aN?this.player.once(HT,this.wxCanPlayFn.bind(this)):sN&&this.player.once($T,this.wxCanPlayFn.bind(this))}},{key:"setUserActionAutoPlay",value:function(){var e=this;this.config.enableUserActionAutoplay&&this.player.once(SL.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(){return 0===this._state.mode?(console.warn("unmute autoplay fail"),this.player.emit(SL.AUTOPLAY_FAIL,{mode:"unmute"}),aN&&iN?void(this._state.mode=2):void(this.config.enableDegradeMuteAutoplay&&this.changeMuteMode())):1===this._state.mode?(console.warn("mute autoplay fail"),this.player.emit(SL.AUTOPLAY_FAIL,{mode:"mute"}),void(this._state.mode=2)):2===this._state.mode?(this.player.emit(SL.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(SL.AUTOPLAY_SUCCESS,{mode:"mute"}),this._state.showUnmuteBt=!0,void this.renderUnmuteBt()):2===this._state.mode?(this.player.emit(SL.AUTOPLAY_SUCCESS,{mode:"click"}),this.player.muted=!1,this._state.showUnmuteBt=!1,void this.renderUnmuteBt()):void 0;this.player.emit(SL.AUTOPLAY_SUCCESS,{mode:"unmute"})}},{key:"handleVolumechange",value:function(){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 n=t.getText("UNMUTE"),i=kT.createDom("div",n,void 0,"veplayer-unmute-bt");e.appendChild(i),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-uN>200){uN=e,this.player.muted=!1,this._state.showUnmuteBt=!1,this.renderUnmuteBt(),this.emit(SL.AUTOPLAY_UNMUTE);var t="mobile"===ST.device,n=eN(this.player.config.url);t&&n&&(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(qT,this.handleAutoplayPrevented.bind(this)),this.player.off(XT,this.handleAutoplayStart.bind(this)),this.player.off(BT,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=lN?"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:JS.POSITIONS.ROOT,enableDegradeMuteAutoplay:!1,enableWxJsBridgeAutoplay:!1,userActionDom:window.document.body,enableUserActionAutoplay:!1}}}]),n}(JS),fN=HL.values;An({target:"Object",stat:!0},{values:function(e){return fN(e)}});var dN=n(te.Object.values);function pN(){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 vN,gN,yN=function(e){iA(n,e);var t=aA(n);function n(){return mm(this,n),t.apply(this,arguments)}return km(n,[{key:"onItemClick",value:function(){}},{key:"onOptionClick",value:function(){this.toggle(!1)}},{key:"updateLang",value:function(){var e,t=this,n=this.player.config.i18nManager;null===(e=this.config.plugins)||void 0===e||e.forEach((function(e){var i,r=null!==(i=n.normalize(e.textTips))&&void 0!==i?i:e.pluginName;if(t.player.root){var o=kT.findDom(t.player.root,".panel-plugin-".concat(e.pluginName," .panel-icon-bt-text"));o&&(o.innerHTML=r)}}))}},{key:"beforeCreate",value:function(e){var t,n=e.player.config.i18nManager;e.config.list=null===(t=e.config.plugins)||void 0===t?void 0:Ub(t).call(t,(function(t,i){var r,o=kT.createDom("div","",{},"panel-icon-bt panel-plugin-".concat(t.pluginName)),a=kT.createDom("div","",{},"panel-icon-svg"),s=null!==(r=n.normalize(t.textTips))&&void 0!==r?r:t.pluginName;return o.appendChild(a),o.appendChild(kT.createDom("span",s,{"plugin-index":i},"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 n=document.querySelector(".panel-plugin-".concat(e.pluginName));n&&kT.addClass(n,"hide")}}},{key:"showChild",value:function(e){if(e){var t;null===(t=e.show)||void 0===t||t.call(e);var n=document.querySelector(".panel-plugin-".concat(e.pluginName));n&&kT.removeClass(n,"hide")}}},{key:"registerIcons",value:function(){return{more:{icon:pN}}}}],[{key:"pluginName",get:function(){return"more"}},{key:"defaultConfig",get:function(){return Ky(Ky({},gD.defaultConfig),{},{index:1,plugins:[],list:[],hideOnSingleOption:!1,isShowIcon:!0,hidePortrait:!1,renderType:cD.Icon,panel:{className:"more-panel-content"}})}}]),n}(gD),mN=function(e){return e.ROOT_TOP_RIGHT="rootTopRight",e.ROOT_TOP_RIGHT_COLLAPSE="rootTopRightCollapse",e}(mN||{}),_N=function(e){iA(n,e);var t=aA(n);function n(){return mm(this,n),t.apply(this,arguments)}return km(n,[{key:"registerIcons",value:function(){return{more:{icon:pN,class:"xgplayer-more-svg"}}}},{key:"children",value:function(){var e=this,t=this._getPlugins(),n=t.plugins,i=t.collapsePlugins,r={};return n.forEach((function(t){r[t.pluginName]={plugin:t,options:{root:e.root}}})),i.length&&(r[yN.pluginName]={plugin:yN,options:{root:this.root,plugins:i}}),r}},{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,n=[],i=[],r=null===(e=this.player.config.ignores)||void 0===e?void 0:Ub(e).call(e,(function(e){return e.toLowerCase()}));return this.config.plugins.forEach((function(e){var o,a=e.pluginName.toLowerCase();null!=r&&uw(r).call(r,a)||("rootTopRight"===(null!==(o=t.player.config[a].position)&&void 0!==o?o:e.defaultConfig.position)?n.push(e):i.push(e))})),{plugins:null!=n?n:[],collapsePlugins:null!=i?i:[]}}}],[{key:"pluginName",get:function(){return"topRightBar"}},{key:"defaultConfig",get:function(){return{position:JS.POSITIONS.ROOT_TOP,plugins:[]}}},{key:"isTopRightPlugin",value:function(e,t){var n,i,r,o,a,s=null!==(i=null===(r=t[null==e||null===(n=e.pluginName)||void 0===n?void 0:n.toLowerCase()])||void 0===r?void 0:r.position)&&void 0!==i?i:null==e||null===(o=e.defaultConfig)||void 0===o?void 0:o.position;return!!uw(a=dN(mN)).call(a,s)}}]),n}(JS),kN=[kI,xI,AI,LA,DI,vA,kA,uI,bA,oD,aD,yD,bD,hN],bN=Fm(vN=[]).call(vN,kN,[sI,FA,_N]),wN=Fm(gN=[]).call(gN,kN,[eI,_N]),EN="pc"===ST.device?bN:wN;function CN(){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 xN(){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}var TN,SN={startPlay:function(){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},play:function(){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},pause:function(){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},fullscreen:xN,exitFullscreen:CN,replay:function(){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},volumeLarge:function(){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},volumeMuted:function(){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},volumeSmall:function(){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}},PN=Ky(Ky({},SN),{},{fullscreen:xN,exitFullscreen:CN}),AN=Ky(Ky({},SN),{},{fullscreen:function(){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},exitFullscreen:function(){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}}),IN="pc"===ST.device?PN:AN,RN=function(){function e(t){var n;if(mm(this,e),zy(this,"_lang",void 0),this._lang=(null==t?void 0:t.lang)||ET()||"en","zh"===this._lang&&(this._lang="zh-cn"),null!=t&&null!==(n=t.i18n)&&void 0!==n&&n.texts){var i,r,o=Ub(i=BL(null==t||null===(r=t.i18n)||void 0===r?void 0:r.texts)).call(i,(function(e){var t=RL(e,2);return{LANG:t[0],TEXT:t[1]}}));e.extend(o)}}return km(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,n,i;if(e){var r=null==IP?void 0:IP.lang;return null!==(t=null==r||null===(n=r[this._lang])||void 0===n?void 0:n[e])&&void 0!==t?t:null==r||null===(i=r.en)||void 0===i?void 0:i[e]}}}],[{key:"langKeys",get:function(){return IP.langKeys}},{key:"isLangValid",value:function(e){var t;return uw(t=IP.langKeys).call(t,e)||"zh"===e}},{key:"extend",value:function(e,t){IP.extend(e,t)}}]),e}(),ON=["autoplay"],MN=Ky(Ky({},JS.POSITIONS),mN),LN={id:"veplayer",width:"100%",height:"100%",decodeType:Xy.Hardware,fullscreen:{useCssFullscreen:!1}},DN=function(e){var t,n,i,r=e.autoplay,o=Om(e,ON);(o.poster&&(o.poster=function(e){var t,n=""+e,i=IL.exec(n);if(!i)return n;var r,o="",a=0;for(r=i.index;r<n.length;r++){switch(n.charCodeAt(r)){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!==r&&(o+=n.substring(a,r)),a=r+1,o+=t}return a!==r?o+n.substring(a,r):o}(o.poster)),o.icons=Ky(Ky({},IN),o.icons?(t=o.icons,n={},BL(null!=t?t:{}).forEach((function(e){var t=RL(e,2),i=t[0],r=t[1];"string"==typeof r?console.warn("icons.".concat(i," has been removed")):n[i]=r})),n):{}),o.autoplay=Boolean(r),r&&"boolean"!=typeof r)&&(o.autoplayMuted=null==r?void 0:r.muted,o.videoAttributes=Ky(Ky({},null!==(i=o.videoAttributes)&&void 0!==i?i:{}),{},{muted:null==r?void 0:r.muted}),o.autoplayPlugin=r);return delete o.i18n,o},NN=function(){function e(){var t,n,i,r,o,a,s,l,u,c,h,f,d=this,p=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};mm(this,e),zy(this,"_player",void 0),zy(this,"_sourceManager",void 0),zy(this,"_preparePlugins",void 0),zy(this,"_previousPrepareResult",void 0),zy(this,"_i18nManager",void 0),zy(this,"_events",{}),zy(this,"_errorCallback",void 0),this._sourceManager=p.sourceManager,this._preparePlugins=p.preparePlugins,this._previousPrepareResult=p.prepareResult,this._i18nManager=null!==(t=p.i18nManager)&&void 0!==t?t:new RN({i18n:p.i18n});var v=DN(Ky(Ky({},p),null===(n=this._previousPrepareResult)||void 0===n?void 0:n.options)),g=Fm(i=[]).call(i,ym(null!==(r=null===(o=this._previousPrepareResult)||void 0===o?void 0:o.plugins)&&void 0!==r?r:[]),ym(null!==(a=p.plugins)&&void 0!==a?a:EN)),y=[],m=[];g.forEach((function(e){_N.isTopRightPlugin(e,p)?y.push(e):m.push(e)})),this._player=new WP(Ky(Ky(Ky({},LN),v),{},{definition:Ky({list:null!==(s=null===(l=this._sourceManager.source)||void 0===l?void 0:l.definitions)&&void 0!==s?s:[],defaultDefinition:null===(u=this._sourceManager.definition)||void 0===u?void 0:u.definition},null!==(c=p.definition)&&void 0!==c?c:{}),url:null===(h=this._sourceManager.definition)||void 0===h?void 0:h.url,sources:Ky(Ky({},null!==(f=p.sources)&&void 0!==f?f:{}),{},{sourceManager:this._sourceManager}),topRightBar:{plugins:y},plugins:m,i18nManager:this._i18nManager,veplayer:this})),this.emit(PL.PLAYER_CREATE_FINISH,this._player),this._errorCallback=function(e){return d._handleFallback(e)},this._player.on(DT,this._errorCallback)}var t,n,i,r,o,a;return km(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.5.1-rc.1"}},{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(RN.isLangValid(e))this._i18nManager.setLang(e),this._player.lang=e;else{var t,n,i,r,o=RN.langKeys.join(","),a={en:Fm(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":Fm(n="不支持当前设置的语言".concat(e,", 支持的语言有")).call(n,o,", 请重新设置")};console.error((null===(i=this._i18nManager)||void 0===i||null===(r=i.normalize)||void 0===r?void 0:r.call(i,a))||a.en)}}},{key:"_src",get:function(){return this._player.currentSrc}},{key:"switch",value:(a=Wy(ty().mark((function e(t,n){var i,r,o,a;return ty().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"!=typeof t||1!==this._sourceManager.sources.length||1!==(null===(i=this._sourceManager.sources)||void 0===i||null===(i=i[0].definitions)||void 0===i?void 0:i.length)){e.next=5;break}return this._sourceManager.updateSources(t),e.next=4,this._switchUrl(t,{seamless:null==n?void 0:n.seamless});case 4:return e.abrupt("return",this._sourceManager.definition);case 5:if(o=Wm(r=this._sourceManager).call(r,t,n)){e.next=8;break}throw new Error("string"==typeof t?"No definition found for url: ".concat(t):Fm(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 a.apply(this,arguments)})},{key:"updatePlaylist",value:function(e,t){var n=this._sourceManager.updateSources(e,t);return this._switch(n.definition)}},{key:"once",value:function(e,t){var n,i=this._transformEvent(e,t),r=i.xgCallback,o=i.xgEventName;r&&(null!==(n=this._events)&&void 0!==n&&n[e]||(this._events[e]=new Ob),this._events[e].set(t,r),this._player.once(o,r))}},{key:"off",value:function(e,t){var n,i=null===(n=this._events[e])||void 0===n?void 0:n.get(t),r=this._transformEvent(e).xgEventName;i&&(this._player.off(r,i),this._events[e].delete(t))}},{key:"emit",value:function(e,t){var n=this._transformEvent(e).xgEventName;this._player.emit(n,t)}},{key:"offAll",value:function(){this._events={},this._player.offAll()}},{key:"on",value:function(e,t){var n,i=this._transformEvent(e,t),r=i.xgCallback,o=i.xgEventName;r&&(null!==(n=this._events)&&void 0!==n&&n[e]||(this._events[e]=new Ob),this._events[e].set(t,r),this._player.on(o,r))}},{key:"play",value:function(){return this._player.play()}},{key:"pause",value:function(){return this._player.pause()}},{key:"requestPIP",value:function(){var e;null===(e=this._player.plugins.pip)||void 0===e||e.requestPIP()}},{key:"exitPIP",value:function(){var e;null===(e=this._player.plugins.pip)||void 0===e||e.exitPIP()}},{key:"retry",value:function(){return this._player.retry()}},{key:"focus",value:function(e){return this._player.focus(e)}},{key:"blur",value:function(e){return this._player.blur(e)}},{key:"canPlayType",value:function(e){return this._player.canPlayType(e)}},{key:"requestFullscreen",value:function(e){return this._player.getFullscreen(e)}},{key:"exitFullscreen",value:function(e){return this._player.exitFullscreen(e)}},{key:"requestCssFullscreen",value:function(e){return this._player.getCssFullscreen(e)}},{key:"exitCssFullscreen",value:function(){return this._player.exitCssFullscreen()}},{key:"registerPlugin",value:function(e,t){return this._player.registerPlugin(e,t)}},{key:"unRegisterPlugin",value:function(e){return this._player.unRegisterPlugin(e)}},{key:"showIcon",value:function(e){var t=this,n=this._player.getPlugin("more");e.forEach((function(e){var i=t._player.getPlugin(e);i&&null!=i&&i.root&&(i.config.position===MN.ROOT_TOP_RIGHT_COLLAPSE?null==n||n.showChild(i):i.show())}))}},{key:"hideIcon",value:function(e){var t=this,n=this._player.getPlugin("more");e.forEach((function(e){var i=t._player.getPlugin(e);i&&null!=i&&i.root&&(i.config.position===MN.ROOT_TOP_RIGHT_COLLAPSE?null==n||n.hideChild(i):i.hide())}))}},{key:"destroy",value:function(){this._player.off(DT,this._errorCallback),this._player.destroy()}},{key:"prepare",value:(o=Wy(ty().mark((function e(t){var n,i,r,o,a,s,l,u,c=this;return ty().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===(n=this._preparePlugins)||void 0===n?void 0:n.call(this,t);case 2:return a=e.sent,s=this._diffPlugins(null!==(i=null===(r=this._previousPrepareResult)||void 0===r?void 0:r.plugins)&&void 0!==i?i:[],null!==(o=null==a?void 0:a.plugins)&&void 0!==o?o:[]),l=s.removedPlugins,u=s.addedPlugins,null==l||l.forEach((function(e){c._player.unRegisterPlugin(e)})),this._previousPrepareResult=a,null!=a&&a.options&&this._player.setConfig(a.options),e.abrupt("return",{plugins:Ub(u).call(u,(function(e){return c._player.registerPlugin(e)})),options:null==a?void 0:a.options});case 8:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"_handleFallback",value:(r=Wy(ty().mark((function e(t){var n,i,r=this;return ty().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._player.addClass(iP),n=this._sourceManager.url,i=this._sourceManager.fallback()){e.next=7;break}return this._player.removeClass(iP),this.emit(PL.FALLBACK_ERROR,pA(t,this._i18nManager)),e.abrupt("return");case 7:this._player.once("canplay",(function(){r._sourceManager.resetFallback()})),this.emit(PL.FALLBACK,{from:{url:n},to:{url:i}}),this._switchUrl(i);case 10:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"_transformEvent",value:function(e,t){var n=this;return e===DT?{xgCallback:t?function(e){t(pA(e,n._i18nManager))}:void 0,xgEventName:e}:function(e,t){var n=AL[e];if(n)return{xgEventName:n.event,xgCallback:t?n.shouldCallback?function(){for(var e,i,r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];null!==(e=n.shouldCallback)&&void 0!==e&&e.call.apply(e,Fm(i=[n]).call(i,o))&&(null==t||t.apply(void 0,o))}:t:void 0};return{xgEventName:e,xgCallback:t}}(e,t)}},{key:"_switch",value:(i=Wy(ty().mark((function e(t){var n,i,r,o,a,s,l,u;return ty().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=kD(this._sourceManager.definition),e.next=3,this.prepare(t.url);case 3:if(e.t0=e.sent,e.t0){e.next=6;break}e.t0={};case 6:if(s=e.t0,l=s.plugins,null!=(u=s.options)&&u.url&&(t.url=null==u?void 0:u.url),this._sourceManager.switch(t),null===(n=this._player)||void 0===n||null===(n=n.plugins)||void 0===n||n.sources.renderItemList(),null===(i=this._player)||void 0===i||null===(i=i.plugins)||void 0===i||i.definition.renderItemList(),(null==t||null===(r=t.source)||void 0===r?void 0:r.name)!==(null==a||null===(o=a.source)||void 0===o?void 0:o.name)&&this.emit(PL.SOURCE_CHANGE),null==l||!l.length){e.next=21;break}return this.emit(PL.DEFINITION_CHANGE),e.next=18,this._callBeforePlayerInitForUrl(l,t.url);case 18:this.emit(PL.AFTER_DEFINITION_CHANGE),e.next=22;break;case 21:this._player.changeDefinition(t,a);case 22:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"_switchUrl",value:(n=Wy(ty().mark((function e(t,n){var i,r,o,a,s,l,u,c=this;return ty().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.prepare(t);case 2:if(e.t0=e.sent,e.t0){e.next=5;break}e.t0={};case 5:if(r=e.t0,o=r.plugins,a=r.options,s=null!==(i=null==a?void 0:a.url)&&void 0!==i?i:t,this._sourceManager.url=s,null==o||!o.length){e.next=14;break}this._callBeforePlayerInitForUrl(o,s),e.next=21;break;case 14:if(l=this._player.switchURL(s,{seamless:null==n?void 0:n.seamless}),u=this._player.currentTime,!l||!l.then){e.next=20;break}return e.abrupt("return",l);case 20:return e.abrupt("return",new Hb((function(e){var t=c._player.paused&&!c._player.isError,n=function(){c._player.currentTime=u,t&&c._player.once(HT,(function(){c._player.pause()})),e()};ST.os.isAndroid?c.once(FT,(function(){n()})):c.once(HT,(function(){n()})),c._player.play()})));case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"_diffPlugins",value:function(e,t){var n=Ub(e).call(e,(function(e){return e.pluginName})),i=Ub(t).call(t,(function(e){return e.pluginName}));return{removedPlugins:jb(n).call(n,(function(e){return!uw(i).call(i,e)})),addedPlugins:jb(t).call(t,(function(e){return!uw(n).call(n,e.pluginName)}))}}},{key:"_callBeforePlayerInitForUrl",value:function(e,t){var n=this;return new Hb((function(i){n._player.config.url=t,null==e||e.forEach((function(e){e.beforePlayerInit()})),n._player.on(PL.CANPLAY,(function(){i(void 0)}))}))}}],[{key:"create",value:(t=Wy(ty().mark((function t(){var n,i,r,o,a,s,l,u,c=arguments;return ty().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=c.length>0&&void 0!==c[0]?c[0]:{},a=c.length>1?c[1]:void 0,s=new nD({sources:tD.normalize({url:o.url,fallbackUrls:o.fallbackUrls,sources:o.playlist}),url:o.url,defaultSource:o.defaultSource,defaultDefinition:o.defaultDefinition,maxFallbackRound:o.maxFallbackRound}),t.next=5,null==o||null===(n=o.preparePlugins)||void 0===n?void 0:n.call(o,null!==(i=s.url)&&void 0!==i?i:"");case 5:return null!=(l=t.sent)&&null!==(r=l.options)&&void 0!==r&&r.url&&(s.url=null==l||null===(u=l.options)||void 0===u?void 0:u.url),o.url=s.url,t.abrupt("return",new(null!=a?a:e)(Ky(Ky({},o),{},{prepareResult:l,sourceManager:s})));case 9:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)})}]),e}();function FN(e){return UN.apply(this,arguments)}function UN(){return(UN=Wy(ty().mark((function e(t){return ty().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,NN.create(Ky({url:"//sf1-cdn-tos.huoshanstatic.com/obj/media-fe/xgplayer_doc_video/mp4/xgplayer-demo-360p.mp4"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}TN="umd",VD.setModuleSystem(TN),void 0!==VePlayer.register?VePlayer.registerPlugin(ED.BizVod,{createVodPlayer:FN}):KD(ED.BizVod,{createVodPlayer:FN}),e.createVodPlayer=FN,e.load=WD,e.register=GD}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).VePlayer={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var i=function(e){return e&&e.Math==Math&&e},r=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof t&&t)||function(){return this}()||t||Function("return this")(),o=function(e){try{return!!e()}catch(t){return!0}},a=!o((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),s=a,l=Function.prototype,u=l.apply,c=l.call,h="object"==typeof Reflect&&Reflect.apply||(s?c.bind(u):function(){return c.apply(u,arguments)}),f=a,d=Function.prototype,p=d.call,v=f&&d.bind.bind(p,p),g=f?v:function(e){return function(){return p.apply(e,arguments)}},y=g,m=y({}.toString),_=y("".slice),k=function(e){return _(m(e),8,-1)},b=k,w=g,E=function(e){if("Function"===b(e))return w(e)},C="object"==typeof document&&document.all,x={all:C,IS_HTMLDDA:void 0===C&&void 0!==C},T=x.all,S=x.IS_HTMLDDA?function(e){return"function"==typeof e||e===T}:function(e){return"function"==typeof e},P={},A=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),I=a,R=Function.prototype.call,O=I?R.bind(R):function(){return R.apply(R,arguments)},M={},L={}.propertyIsEnumerable,D=Object.getOwnPropertyDescriptor,N=D&&!L.call({1:2},1);M.f=N?function(e){var t=D(this,e);return!!t&&t.enumerable}:L;var F,U,H=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},j=o,B=k,z=Object,V=g("".split),K=j((function(){return!z("z").propertyIsEnumerable(0)}))?function(e){return"String"==B(e)?V(e,""):z(e)}:z,G=function(e){return null==e},W=G,Y=TypeError,X=function(e){if(W(e))throw Y("Can't call method on "+e);return e},q=K,$=X,Z=function(e){return q($(e))},J=S,Q=x.all,ee=x.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:J(e)||e===Q}:function(e){return"object"==typeof e?null!==e:J(e)},te={},ne=te,ie=r,re=S,oe=function(e){return re(e)?e:void 0},ae=function(e,t){return arguments.length<2?oe(ne[e])||oe(ie[e]):ne[e]&&ne[e][t]||ie[e]&&ie[e][t]},se=g({}.isPrototypeOf),le="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ue=r,ce=le,he=ue.process,fe=ue.Deno,de=he&&he.versions||fe&&fe.version,pe=de&&de.v8;pe&&(U=(F=pe.split("."))[0]>0&&F[0]<4?1:+(F[0]+F[1])),!U&&ce&&(!(F=ce.match(/Edge\/(\d+)/))||F[1]>=74)&&(F=ce.match(/Chrome\/(\d+)/))&&(U=+F[1]);var ve=U,ge=ve,ye=o,me=r.String,_e=!!Object.getOwnPropertySymbols&&!ye((function(){var e=Symbol();return!me(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ge&&ge<41})),ke=_e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,be=ae,we=S,Ee=se,Ce=Object,xe=ke?function(e){return"symbol"==typeof e}:function(e){var t=be("Symbol");return we(t)&&Ee(t.prototype,Ce(e))},Te=String,Se=function(e){try{return Te(e)}catch(t){return"Object"}},Pe=S,Ae=Se,Ie=TypeError,Re=function(e){if(Pe(e))return e;throw Ie(Ae(e)+" is not a function")},Oe=Re,Me=G,Le=function(e,t){var n=e[t];return Me(n)?void 0:Oe(n)},De=O,Ne=S,Fe=ee,Ue=TypeError,He={exports:{}},je=r,Be=Object.defineProperty,ze=function(e,t){try{Be(je,e,{value:t,configurable:!0,writable:!0})}catch(n){je[e]=t}return t},Ve="__core-js_shared__",Ke=r[Ve]||ze(Ve,{}),Ge=Ke;(He.exports=function(e,t){return Ge[e]||(Ge[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 We=He.exports,Ye=X,Xe=Object,qe=function(e){return Xe(Ye(e))},$e=qe,Ze=g({}.hasOwnProperty),Je=Object.hasOwn||function(e,t){return Ze($e(e),t)},Qe=g,et=0,tt=Math.random(),nt=Qe(1..toString),it=function(e){return"Symbol("+(void 0===e?"":e)+")_"+nt(++et+tt,36)},rt=We,ot=Je,at=it,st=_e,lt=ke,ut=r.Symbol,ct=rt("wks"),ht=lt?ut.for||ut:ut&&ut.withoutSetter||at,ft=function(e){return ot(ct,e)||(ct[e]=st&&ot(ut,e)?ut[e]:ht("Symbol."+e)),ct[e]},dt=O,pt=ee,vt=xe,gt=Le,yt=function(e,t){var n,i;if("string"===t&&Ne(n=e.toString)&&!Fe(i=De(n,e)))return i;if(Ne(n=e.valueOf)&&!Fe(i=De(n,e)))return i;if("string"!==t&&Ne(n=e.toString)&&!Fe(i=De(n,e)))return i;throw Ue("Can't convert object to primitive value")},mt=TypeError,_t=ft("toPrimitive"),kt=function(e,t){if(!pt(e)||vt(e))return e;var n,i=gt(e,_t);if(i){if(void 0===t&&(t="default"),n=dt(i,e,t),!pt(n)||vt(n))return n;throw mt("Can't convert object to primitive value")}return void 0===t&&(t="number"),yt(e,t)},bt=xe,wt=function(e){var t=kt(e,"string");return bt(t)?t:t+""},Et=ee,Ct=r.document,xt=Et(Ct)&&Et(Ct.createElement),Tt=function(e){return xt?Ct.createElement(e):{}},St=Tt,Pt=!A&&!o((function(){return 7!=Object.defineProperty(St("div"),"a",{get:function(){return 7}}).a})),At=A,It=O,Rt=M,Ot=H,Mt=Z,Lt=wt,Dt=Je,Nt=Pt,Ft=Object.getOwnPropertyDescriptor;P.f=At?Ft:function(e,t){if(e=Mt(e),t=Lt(t),Nt)try{return Ft(e,t)}catch(n){}if(Dt(e,t))return Ot(!It(Rt.f,e,t),e[t])};var Ut=o,Ht=S,jt=/#|\.prototype\./,Bt=function(e,t){var n=Vt[zt(e)];return n==Gt||n!=Kt&&(Ht(t)?Ut(t):!!t)},zt=Bt.normalize=function(e){return String(e).replace(jt,".").toLowerCase()},Vt=Bt.data={},Kt=Bt.NATIVE="N",Gt=Bt.POLYFILL="P",Wt=Bt,Yt=Re,Xt=a,qt=E(E.bind),$t=function(e,t){return Yt(e),void 0===t?e:Xt?qt(e,t):function(){return e.apply(t,arguments)}},Zt={},Jt=A&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Qt=ee,en=String,tn=TypeError,nn=function(e){if(Qt(e))return e;throw tn(en(e)+" is not an object")},rn=A,on=Pt,an=Jt,sn=nn,ln=wt,un=TypeError,cn=Object.defineProperty,hn=Object.getOwnPropertyDescriptor,fn="enumerable",dn="configurable",pn="writable";Zt.f=rn?an?function(e,t,n){if(sn(e),t=ln(t),sn(n),"function"==typeof e&&"prototype"===t&&"value"in n&&pn in n&&!n[pn]){var i=hn(e,t);i&&i[pn]&&(e[t]=n.value,n={configurable:dn in n?n[dn]:i[dn],enumerable:fn in n?n[fn]:i[fn],writable:!1})}return cn(e,t,n)}:cn:function(e,t,n){if(sn(e),t=ln(t),sn(n),on)try{return cn(e,t,n)}catch(i){}if("get"in n||"set"in n)throw un("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var vn=Zt,gn=H,yn=A?function(e,t,n){return vn.f(e,t,gn(1,n))}:function(e,t,n){return e[t]=n,e},mn=r,_n=h,kn=E,bn=S,wn=P.f,En=Wt,Cn=te,xn=$t,Tn=yn,Sn=Je,Pn=function(e){var t=function(n,i,r){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,i)}return new e(n,i,r)}return _n(e,this,arguments)};return t.prototype=e.prototype,t},An=function(e,t){var n,i,r,o,a,s,l,u,c,h=e.target,f=e.global,d=e.stat,p=e.proto,v=f?mn:d?mn[h]:(mn[h]||{}).prototype,g=f?Cn:Cn[h]||Tn(Cn,h,{})[h],y=g.prototype;for(o in t)i=!(n=En(f?o:h+(d?".":"#")+o,e.forced))&&v&&Sn(v,o),s=g[o],i&&(l=e.dontCallGetSet?(c=wn(v,o))&&c.value:v[o]),a=i&&l?l:t[o],i&&typeof s==typeof a||(u=e.bind&&i?xn(a,mn):e.wrap&&i?Pn(a):p&&bn(a)?kn(a):a,(e.sham||a&&a.sham||s&&s.sham)&&Tn(u,"sham",!0),Tn(g,o,u),p&&(Sn(Cn,r=h+"Prototype")||Tn(Cn,r,{}),Tn(Cn[r],o,a),e.real&&y&&(n||!y[o])&&Tn(y,o,a)))},In=k,Rn=Array.isArray||function(e){return"Array"==In(e)},On=Math.ceil,Mn=Math.floor,Ln=Math.trunc||function(e){var t=+e;return(t>0?Mn:On)(t)},Dn=function(e){var t=+e;return t!=t||0===t?0:Ln(t)},Nn=Dn,Fn=Math.min,Un=function(e){return e>0?Fn(Nn(e),9007199254740991):0},Hn=Un,jn=function(e){return Hn(e.length)},Bn=TypeError,zn=function(e){if(e>9007199254740991)throw Bn("Maximum allowed index exceeded");return e},Vn=wt,Kn=Zt,Gn=H,Wn=function(e,t,n){var i=Vn(t);i in e?Kn.f(e,i,Gn(0,n)):e[i]=n},Yn={};Yn[ft("toStringTag")]="z";var Xn="[object z]"===String(Yn),qn=Xn,$n=S,Zn=k,Jn=ft("toStringTag"),Qn=Object,ei="Arguments"==Zn(function(){return arguments}()),ti=qn?Zn:function(e){var t,n,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=Qn(e),Jn))?n:ei?Zn(t):"Object"==(i=Zn(t))&&$n(t.callee)?"Arguments":i},ni=S,ii=Ke,ri=g(Function.toString);ni(ii.inspectSource)||(ii.inspectSource=function(e){return ri(e)});var oi=ii.inspectSource,ai=g,si=o,li=S,ui=ti,ci=oi,hi=function(){},fi=[],di=ae("Reflect","construct"),pi=/^\s*(?:class|function)\b/,vi=ai(pi.exec),gi=!pi.exec(hi),yi=function(e){if(!li(e))return!1;try{return di(hi,fi,e),!0}catch(t){return!1}},mi=function(e){if(!li(e))return!1;switch(ui(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return gi||!!vi(pi,ci(e))}catch(t){return!0}};mi.sham=!0;var _i=!di||si((function(){var e;return yi(yi.call)||!yi(Object)||!yi((function(){e=!0}))||e}))?mi:yi,ki=Rn,bi=_i,wi=ee,Ei=ft("species"),Ci=Array,xi=function(e){var t;return ki(e)&&(t=e.constructor,(bi(t)&&(t===Ci||ki(t.prototype))||wi(t)&&null===(t=t[Ei]))&&(t=void 0)),void 0===t?Ci:t},Ti=function(e,t){return new(xi(e))(0===t?0:t)},Si=o,Pi=ve,Ai=ft("species"),Ii=function(e){return Pi>=51||!Si((function(){var t=[];return(t.constructor={})[Ai]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Ri=An,Oi=o,Mi=Rn,Li=ee,Di=qe,Ni=jn,Fi=zn,Ui=Wn,Hi=Ti,ji=Ii,Bi=ve,zi=ft("isConcatSpreadable"),Vi=Bi>=51||!Oi((function(){var e=[];return e[zi]=!1,e.concat()[0]!==e})),Ki=function(e){if(!Li(e))return!1;var t=e[zi];return void 0!==t?!!t:Mi(e)};Ri({target:"Array",proto:!0,arity:1,forced:!Vi||!ji("concat")},{concat:function(e){var t,n,i,r,o,a=Di(this),s=Hi(a,0),l=0;for(t=-1,i=arguments.length;t<i;t++)if(Ki(o=-1===t?a:arguments[t]))for(r=Ni(o),Fi(l+r),n=0;n<r;n++,l++)n in o&&Ui(s,l,o[n]);else Fi(l+1),Ui(s,l++,o);return s.length=l,s}});var Gi=ti,Wi=String,Yi=function(e){if("Symbol"===Gi(e))throw TypeError("Cannot convert a Symbol value to a string");return Wi(e)},Xi={},qi=Dn,$i=Math.max,Zi=Math.min,Ji=function(e,t){var n=qi(e);return n<0?$i(n+t,0):Zi(n,t)},Qi=Z,er=Ji,tr=jn,nr=function(e){return function(t,n,i){var r,o=Qi(t),a=tr(o),s=er(i,a);if(e&&n!=n){for(;a>s;)if((r=o[s++])!=r)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}},ir={includes:nr(!0),indexOf:nr(!1)},rr={},or=Je,ar=Z,sr=ir.indexOf,lr=rr,ur=g([].push),cr=function(e,t){var n,i=ar(e),r=0,o=[];for(n in i)!or(lr,n)&&or(i,n)&&ur(o,n);for(;t.length>r;)or(i,n=t[r++])&&(~sr(o,n)||ur(o,n));return o},hr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],fr=cr,dr=hr,pr=Object.keys||function(e){return fr(e,dr)},vr=A,gr=Jt,yr=Zt,mr=nn,_r=Z,kr=pr;Xi.f=vr&&!gr?Object.defineProperties:function(e,t){mr(e);for(var n,i=_r(t),r=kr(t),o=r.length,a=0;o>a;)yr.f(e,n=r[a++],i[n]);return e};var br,wr=ae("document","documentElement"),Er=it,Cr=We("keys"),xr=function(e){return Cr[e]||(Cr[e]=Er(e))},Tr=nn,Sr=Xi,Pr=hr,Ar=rr,Ir=wr,Rr=Tt,Or="prototype",Mr="script",Lr=xr("IE_PROTO"),Dr=function(){},Nr=function(e){return"<"+Mr+">"+e+"</"+Mr+">"},Fr=function(e){e.write(Nr("")),e.close();var t=e.parentWindow.Object;return e=null,t},Ur=function(){try{br=new ActiveXObject("htmlfile")}catch(r){}var e,t,n;Ur="undefined"!=typeof document?document.domain&&br?Fr(br):(t=Rr("iframe"),n="java"+Mr+":",t.style.display="none",Ir.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Nr("document.F=Object")),e.close(),e.F):Fr(br);for(var i=Pr.length;i--;)delete Ur[Or][Pr[i]];return Ur()};Ar[Lr]=!0;var Hr=Object.create||function(e,t){var n;return null!==e?(Dr[Or]=Tr(e),n=new Dr,Dr[Or]=null,n[Lr]=e):n=Ur(),void 0===t?n:Sr.f(n,t)},jr={},Br=cr,zr=hr.concat("length","prototype");jr.f=Object.getOwnPropertyNames||function(e){return Br(e,zr)};var Vr={},Kr=Ji,Gr=jn,Wr=Wn,Yr=Array,Xr=Math.max,qr=function(e,t,n){for(var i=Gr(e),r=Kr(t,i),o=Kr(void 0===n?i:n,i),a=Yr(Xr(o-r,0)),s=0;r<o;r++,s++)Wr(a,s,e[r]);return a.length=s,a},$r=k,Zr=Z,Jr=jr.f,Qr=qr,eo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Vr.f=function(e){return eo&&"Window"==$r(e)?function(e){try{return Jr(e)}catch(t){return Qr(eo)}}(e):Jr(Zr(e))};var to={};to.f=Object.getOwnPropertySymbols;var no=yn,io=function(e,t,n,i){return i&&i.enumerable?e[t]=n:no(e,t,n),e},ro=Zt,oo=function(e,t,n){return ro.f(e,t,n)},ao={},so=ft;ao.f=so;var lo,uo,co,ho=te,fo=Je,po=ao,vo=Zt.f,go=function(e){var t=ho.Symbol||(ho.Symbol={});fo(t,e)||vo(t,e,{value:po.f(e)})},yo=O,mo=ae,_o=ft,ko=io,bo=function(){var e=mo("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,i=_o("toPrimitive");t&&!t[i]&&ko(t,i,(function(e){return yo(n,this)}),{arity:1})},wo=ti,Eo=Xn?{}.toString:function(){return"[object "+wo(this)+"]"},Co=Xn,xo=Zt.f,To=yn,So=Je,Po=Eo,Ao=ft("toStringTag"),Io=function(e,t,n,i){if(e){var r=n?e:e.prototype;So(r,Ao)||xo(r,Ao,{configurable:!0,value:t}),i&&!Co&&To(r,"toString",Po)}},Ro=S,Oo=r.WeakMap,Mo=Ro(Oo)&&/native code/.test(String(Oo)),Lo=r,Do=ee,No=yn,Fo=Je,Uo=Ke,Ho=xr,jo=rr,Bo="Object already initialized",zo=Lo.TypeError,Vo=Lo.WeakMap;if(Mo||Uo.state){var Ko=Uo.state||(Uo.state=new Vo);Ko.get=Ko.get,Ko.has=Ko.has,Ko.set=Ko.set,lo=function(e,t){if(Ko.has(e))throw zo(Bo);return t.facade=e,Ko.set(e,t),t},uo=function(e){return Ko.get(e)||{}},co=function(e){return Ko.has(e)}}else{var Go=Ho("state");jo[Go]=!0,lo=function(e,t){if(Fo(e,Go))throw zo(Bo);return t.facade=e,No(e,Go,t),t},uo=function(e){return Fo(e,Go)?e[Go]:{}},co=function(e){return Fo(e,Go)}}var Wo={set:lo,get:uo,has:co,enforce:function(e){return co(e)?uo(e):lo(e,{})},getterFor:function(e){return function(t){var n;if(!Do(t)||(n=uo(t)).type!==e)throw zo("Incompatible receiver, "+e+" required");return n}}},Yo=$t,Xo=K,qo=qe,$o=jn,Zo=Ti,Jo=g([].push),Qo=function(e){var t=1==e,n=2==e,i=3==e,r=4==e,o=6==e,a=7==e,s=5==e||o;return function(l,u,c,h){for(var f,d,p=qo(l),v=Xo(p),g=Yo(u,c),y=$o(v),m=0,_=h||Zo,k=t?_(l,y):n||a?_(l,0):void 0;y>m;m++)if((s||m in v)&&(d=g(f=v[m],m,p),e))if(t)k[m]=d;else if(d)switch(e){case 3:return!0;case 5:return f;case 6:return m;case 2:Jo(k,f)}else switch(e){case 4:return!1;case 7:Jo(k,f)}return o?-1:i||r?r:k}},ea={forEach:Qo(0),map:Qo(1),filter:Qo(2),some:Qo(3),every:Qo(4),find:Qo(5),findIndex:Qo(6),filterReject:Qo(7)},ta=An,na=r,ia=O,ra=g,oa=A,aa=_e,sa=o,la=Je,ua=se,ca=nn,ha=Z,fa=wt,da=Yi,pa=H,va=Hr,ga=pr,ya=jr,ma=Vr,_a=to,ka=P,ba=Zt,wa=Xi,Ea=M,Ca=io,xa=oo,Ta=We,Sa=rr,Pa=it,Aa=ft,Ia=ao,Ra=go,Oa=bo,Ma=Io,La=Wo,Da=ea.forEach,Na=xr("hidden"),Fa="Symbol",Ua="prototype",Ha=La.set,ja=La.getterFor(Fa),Ba=Object[Ua],za=na.Symbol,Va=za&&za[Ua],Ka=na.TypeError,Ga=na.QObject,Wa=ka.f,Ya=ba.f,Xa=ma.f,qa=Ea.f,$a=ra([].push),Za=Ta("symbols"),Ja=Ta("op-symbols"),Qa=Ta("wks"),es=!Ga||!Ga[Ua]||!Ga[Ua].findChild,ts=oa&&sa((function(){return 7!=va(Ya({},"a",{get:function(){return Ya(this,"a",{value:7}).a}})).a}))?function(e,t,n){var i=Wa(Ba,t);i&&delete Ba[t],Ya(e,t,n),i&&e!==Ba&&Ya(Ba,t,i)}:Ya,ns=function(e,t){var n=Za[e]=va(Va);return Ha(n,{type:Fa,tag:e,description:t}),oa||(n.description=t),n},is=function(e,t,n){e===Ba&&is(Ja,t,n),ca(e);var i=fa(t);return ca(n),la(Za,i)?(n.enumerable?(la(e,Na)&&e[Na][i]&&(e[Na][i]=!1),n=va(n,{enumerable:pa(0,!1)})):(la(e,Na)||Ya(e,Na,pa(1,{})),e[Na][i]=!0),ts(e,i,n)):Ya(e,i,n)},rs=function(e,t){ca(e);var n=ha(t),i=ga(n).concat(ls(n));return Da(i,(function(t){oa&&!ia(os,n,t)||is(e,t,n[t])})),e},os=function(e){var t=fa(e),n=ia(qa,this,t);return!(this===Ba&&la(Za,t)&&!la(Ja,t))&&(!(n||!la(this,t)||!la(Za,t)||la(this,Na)&&this[Na][t])||n)},as=function(e,t){var n=ha(e),i=fa(t);if(n!==Ba||!la(Za,i)||la(Ja,i)){var r=Wa(n,i);return!r||!la(Za,i)||la(n,Na)&&n[Na][i]||(r.enumerable=!0),r}},ss=function(e){var t=Xa(ha(e)),n=[];return Da(t,(function(e){la(Za,e)||la(Sa,e)||$a(n,e)})),n},ls=function(e){var t=e===Ba,n=Xa(t?Ja:ha(e)),i=[];return Da(n,(function(e){!la(Za,e)||t&&!la(Ba,e)||$a(i,Za[e])})),i};aa||(za=function(){if(ua(Va,this))throw Ka("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?da(arguments[0]):void 0,t=Pa(e),n=function(e){this===Ba&&ia(n,Ja,e),la(this,Na)&&la(this[Na],t)&&(this[Na][t]=!1),ts(this,t,pa(1,e))};return oa&&es&&ts(Ba,t,{configurable:!0,set:n}),ns(t,e)},Ca(Va=za[Ua],"toString",(function(){return ja(this).tag})),Ca(za,"withoutSetter",(function(e){return ns(Pa(e),e)})),Ea.f=os,ba.f=is,wa.f=rs,ka.f=as,ya.f=ma.f=ss,_a.f=ls,Ia.f=function(e){return ns(Aa(e),e)},oa&&xa(Va,"description",{configurable:!0,get:function(){return ja(this).description}})),ta({global:!0,constructor:!0,wrap:!0,forced:!aa,sham:!aa},{Symbol:za}),Da(ga(Qa),(function(e){Ra(e)})),ta({target:Fa,stat:!0,forced:!aa},{useSetter:function(){es=!0},useSimple:function(){es=!1}}),ta({target:"Object",stat:!0,forced:!aa,sham:!oa},{create:function(e,t){return void 0===t?va(e):rs(va(e),t)},defineProperty:is,defineProperties:rs,getOwnPropertyDescriptor:as}),ta({target:"Object",stat:!0,forced:!aa},{getOwnPropertyNames:ss}),Oa(),Ma(za,Fa),Sa[Na]=!0;var us=_e&&!!Symbol.for&&!!Symbol.keyFor,cs=An,hs=ae,fs=Je,ds=Yi,ps=We,vs=us,gs=ps("string-to-symbol-registry"),ys=ps("symbol-to-string-registry");cs({target:"Symbol",stat:!0,forced:!vs},{for:function(e){var t=ds(e);if(fs(gs,t))return gs[t];var n=hs("Symbol")(t);return gs[t]=n,ys[n]=t,n}});var ms=An,_s=Je,ks=xe,bs=Se,ws=us,Es=We("symbol-to-string-registry");ms({target:"Symbol",stat:!0,forced:!ws},{keyFor:function(e){if(!ks(e))throw TypeError(bs(e)+" is not a symbol");if(_s(Es,e))return Es[e]}});var Cs=g([].slice),xs=Rn,Ts=S,Ss=k,Ps=Yi,As=g([].push),Is=An,Rs=ae,Os=h,Ms=O,Ls=g,Ds=o,Ns=S,Fs=xe,Us=Cs,Hs=function(e){if(Ts(e))return e;if(xs(e)){for(var t=e.length,n=[],i=0;i<t;i++){var r=e[i];"string"==typeof r?As(n,r):"number"!=typeof r&&"Number"!=Ss(r)&&"String"!=Ss(r)||As(n,Ps(r))}var o=n.length,a=!0;return function(e,t){if(a)return a=!1,t;if(xs(this))return t;for(var i=0;i<o;i++)if(n[i]===e)return t}}},js=_e,Bs=String,zs=Rs("JSON","stringify"),Vs=Ls(/./.exec),Ks=Ls("".charAt),Gs=Ls("".charCodeAt),Ws=Ls("".replace),Ys=Ls(1..toString),Xs=/[\uD800-\uDFFF]/g,qs=/^[\uD800-\uDBFF]$/,$s=/^[\uDC00-\uDFFF]$/,Zs=!js||Ds((function(){var e=Rs("Symbol")();return"[null]"!=zs([e])||"{}"!=zs({a:e})||"{}"!=zs(Object(e))})),Js=Ds((function(){return'"\\udf06\\ud834"'!==zs("\udf06\ud834")||'"\\udead"'!==zs("\udead")})),Qs=function(e,t){var n=Us(arguments),i=Hs(t);if(Ns(i)||void 0!==e&&!Fs(e))return n[1]=function(e,t){if(Ns(i)&&(t=Ms(i,this,Bs(e),t)),!Fs(t))return t},Os(zs,null,n)},el=function(e,t,n){var i=Ks(n,t-1),r=Ks(n,t+1);return Vs(qs,e)&&!Vs($s,r)||Vs($s,e)&&!Vs(qs,i)?"\\u"+Ys(Gs(e,0),16):e};zs&&Is({target:"JSON",stat:!0,arity:3,forced:Zs||Js},{stringify:function(e,t,n){var i=Us(arguments),r=Os(Zs?Qs:zs,null,i);return Js&&"string"==typeof r?Ws(r,Xs,el):r}});var tl=to,nl=qe;An({target:"Object",stat:!0,forced:!_e||o((function(){tl.f(1)}))},{getOwnPropertySymbols:function(e){var t=tl.f;return t?t(nl(e)):[]}}),go("asyncIterator"),go("hasInstance"),go("isConcatSpreadable"),go("iterator"),go("match"),go("matchAll"),go("replace"),go("search"),go("species"),go("split");var il=bo;go("toPrimitive"),il();var rl=ae,ol=Io;go("toStringTag"),ol(rl("Symbol"),"Symbol"),go("unscopables"),Io(r.JSON,"JSON",!0);var al,sl,ll,ul=te.Symbol,cl={},hl=A,fl=Je,dl=Function.prototype,pl=hl&&Object.getOwnPropertyDescriptor,vl=fl(dl,"name"),gl={EXISTS:vl,PROPER:vl&&"something"===function(){}.name,CONFIGURABLE:vl&&(!hl||hl&&pl(dl,"name").configurable)},yl=!o((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),ml=Je,_l=S,kl=qe,bl=yl,wl=xr("IE_PROTO"),El=Object,Cl=El.prototype,xl=bl?El.getPrototypeOf:function(e){var t=kl(e);if(ml(t,wl))return t[wl];var n=t.constructor;return _l(n)&&t instanceof n?n.prototype:t instanceof El?Cl:null},Tl=o,Sl=S,Pl=ee,Al=Hr,Il=xl,Rl=io,Ol=ft("iterator"),Ml=!1;[].keys&&("next"in(ll=[].keys())?(sl=Il(Il(ll)))!==Object.prototype&&(al=sl):Ml=!0);var Ll=!Pl(al)||Tl((function(){var e={};return al[Ol].call(e)!==e}));Sl((al=Ll?{}:Al(al))[Ol])||Rl(al,Ol,(function(){return this}));var Dl={IteratorPrototype:al,BUGGY_SAFARI_ITERATORS:Ml},Nl=Dl.IteratorPrototype,Fl=Hr,Ul=H,Hl=Io,jl=cl,Bl=function(){return this},zl=function(e,t,n,i){var r=t+" Iterator";return e.prototype=Fl(Nl,{next:Ul(+!i,n)}),Hl(e,r,!1,!0),jl[r]=Bl,e},Vl=g,Kl=Re,Gl=S,Wl=String,Yl=TypeError,Xl=function(e,t,n){try{return Vl(Kl(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(i){}},ql=nn,$l=function(e){if("object"==typeof e||Gl(e))return e;throw Yl("Can't set "+Wl(e)+" as a prototype")},Zl=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Xl(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(i){}return function(n,i){return ql(n),$l(i),t?e(n,i):n.__proto__=i,n}}():void 0),Jl=An,Ql=O,eu=gl,tu=zl,nu=xl,iu=Io,ru=io,ou=cl,au=Dl,su=eu.PROPER,lu=au.BUGGY_SAFARI_ITERATORS,uu=ft("iterator"),cu="keys",hu="values",fu="entries",du=function(){return this},pu=function(e,t,n,i,r,o,a){tu(n,t,i);var s,l,u,c=function(e){if(e===r&&v)return v;if(!lu&&e in d)return d[e];switch(e){case cu:case hu:case fu:return function(){return new n(this,e)}}return function(){return new n(this)}},h=t+" Iterator",f=!1,d=e.prototype,p=d[uu]||d["@@iterator"]||r&&d[r],v=!lu&&p||c(r),g="Array"==t&&d.entries||p;if(g&&(s=nu(g.call(new e)))!==Object.prototype&&s.next&&(iu(s,h,!0,!0),ou[h]=du),su&&r==hu&&p&&p.name!==hu&&(f=!0,v=function(){return Ql(p,this)}),r)if(l={values:c(hu),keys:o?v:c(cu),entries:c(fu)},a)for(u in l)(lu||f||!(u in d))&&ru(d,u,l[u]);else Jl({target:t,proto:!0,forced:lu||f},l);return a&&d[uu]!==v&&ru(d,uu,v,{name:r}),ou[t]=v,l},vu=function(e,t){return{value:e,done:t}},gu=Z,yu=cl,mu=Wo;Zt.f;var _u=pu,ku=vu,bu="Array Iterator",wu=mu.set,Eu=mu.getterFor(bu);_u(Array,"Array",(function(e,t){wu(this,{type:bu,target:gu(e),index:0,kind:t})}),(function(){var e=Eu(this),t=e.target,n=e.kind,i=e.index++;return!t||i>=t.length?(e.target=void 0,ku(void 0,!0)):ku("keys"==n?i:"values"==n?t[i]:[i,t[i]],!1)}),"values"),yu.Arguments=yu.Array;var Cu={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},xu=r,Tu=ti,Su=yn,Pu=cl,Au=ft("toStringTag");for(var Iu in Cu){var Ru=xu[Iu],Ou=Ru&&Ru.prototype;Ou&&Tu(Ou)!==Au&&Su(Ou,Au,Iu),Pu[Iu]=Pu.Array}var Mu=ul;go("dispose");var Lu=Mu;go("asyncDispose");var Du=An,Nu=g,Fu=ae("Symbol"),Uu=Fu.keyFor,Hu=Nu(Fu.prototype.valueOf);Du({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==Uu(Hu(e))}catch(t){return!1}}});for(var ju=An,Bu=We,zu=ae,Vu=g,Ku=xe,Gu=ft,Wu=zu("Symbol"),Yu=Wu.isWellKnown,Xu=zu("Object","getOwnPropertyNames"),qu=Vu(Wu.prototype.valueOf),$u=Bu("wks"),Zu=0,Ju=Xu(Wu),Qu=Ju.length;Zu<Qu;Zu++)try{var ec=Ju[Zu];Ku(Wu[ec])&&Gu(ec)}catch(HN){}ju({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if(Yu&&Yu(e))return!0;try{for(var t=qu(e),n=0,i=Xu($u),r=i.length;n<r;n++)if($u[i[n]]==t)return!0}catch(HN){}return!1}}),go("matcher"),go("metadataKey"),go("observable"),go("metadata"),go("patternMatch"),go("replaceAll");var tc=Lu,nc=n(tc),ic=g,rc=Dn,oc=Yi,ac=X,sc=ic("".charAt),lc=ic("".charCodeAt),uc=ic("".slice),cc=function(e){return function(t,n){var i,r,o=oc(ac(t)),a=rc(n),s=o.length;return a<0||a>=s?e?"":void 0:(i=lc(o,a))<55296||i>56319||a+1===s||(r=lc(o,a+1))<56320||r>57343?e?sc(o,a):i:e?uc(o,a,a+2):r-56320+(i-55296<<10)+65536}},hc={codeAt:cc(!1),charAt:cc(!0)},fc=hc.charAt,dc=Yi,pc=Wo,vc=pu,gc=vu,yc="String Iterator",mc=pc.set,_c=pc.getterFor(yc);vc(String,"String",(function(e){mc(this,{type:yc,string:dc(e),index:0})}),(function(){var e,t=_c(this),n=t.string,i=t.index;return i>=n.length?gc(void 0,!0):(e=fc(n,i),t.index+=e.length,gc(e,!1))}));var kc=ao.f("iterator"),bc=n(kc);function wc(e){return(wc="function"==typeof nc&&"symbol"==typeof bc?function(e){return typeof e}:function(e){return e&&"function"==typeof nc&&e.constructor===nc&&e!==nc.prototype?"symbol":typeof e})(e)}var Ec={exports:{}},Cc=An,xc=A,Tc=Zt.f;Cc({target:"Object",stat:!0,forced:Object.defineProperty!==Tc,sham:!xc},{defineProperty:Tc});var Sc=te.Object,Pc=Ec.exports=function(e,t,n){return Sc.defineProperty(e,t,n)};Sc.defineProperty.sham&&(Pc.sham=!0);var Ac=Ec.exports,Ic=n(Ac);An({target:"Object",stat:!0,sham:!A},{create:Hr});var Rc=te.Object,Oc=n((function(e,t){return Rc.create(e,t)})),Mc=qe,Lc=xl,Dc=yl;An({target:"Object",stat:!0,forced:o((function(){Lc(1)})),sham:!Dc},{getPrototypeOf:function(e){return Lc(Mc(e))}});var Nc=te.Object.getPrototypeOf,Fc=n(Nc),Uc=o,Hc=function(e,t){var n=[][e];return!!n&&Uc((function(){n.call(null,t||function(){return 1},1)}))},jc=ea.forEach,Bc=Hc("forEach")?[].forEach:function(e){return jc(this,e,arguments.length>1?arguments[1]:void 0)};An({target:"Array",proto:!0,forced:[].forEach!=Bc},{forEach:Bc});var zc=te,Vc=function(e){return zc[e+"Prototype"]},Kc=Vc("Array").forEach,Gc=ti,Wc=Je,Yc=se,Xc=Kc,qc=Array.prototype,$c={DOMTokenList:!0,NodeList:!0},Zc=n((function(e){var t=e.forEach;return e===qc||Yc(qc,e)&&t===qc.forEach||Wc($c,Gc(e))?Xc:t})),Jc=A,Qc=Rn,eh=TypeError,th=Object.getOwnPropertyDescriptor,nh=Jc&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(HN){return HN instanceof TypeError}}()?function(e,t){if(Qc(e)&&!th(e,"length").writable)throw eh("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},ih=qe,rh=jn,oh=nh,ah=zn;An({target:"Array",proto:!0,arity:1,forced:o((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(HN){return HN instanceof TypeError}}()},{push:function(e){var t=ih(this),n=rh(t),i=arguments.length;ah(n+i);for(var r=0;r<i;r++)t[n]=arguments[r],n++;return oh(t,n),n}});var sh=Vc("Array").push,lh=se,uh=sh,ch=Array.prototype,hh=n((function(e){var t=e.push;return e===ch||lh(ch,e)&&t===ch.push?uh:t}));An({target:"Object",stat:!0},{setPrototypeOf:Zl});var fh=te.Object.setPrototypeOf,dh=n(fh),ph=ae,vh=jr,gh=to,yh=nn,mh=g([].concat),_h=ph("Reflect","ownKeys")||function(e){var t=vh.f(yh(e)),n=gh.f;return n?mh(t,n(e)):t},kh=Je,bh=_h,wh=P,Eh=Zt,Ch=ee,xh=yn,Th=Error,Sh=g("".replace),Ph=String(Th("zxcasd").stack),Ah=/\n\s*at [^:]*:[^\n]*/,Ih=Ah.test(Ph),Rh=H,Oh=!o((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Rh(1,7)),7!==e.stack)})),Mh=yn,Lh=function(e,t){if(Ih&&"string"==typeof e&&!Th.prepareStackTrace)for(;t--;)e=Sh(e,Ah,"");return e},Dh=Oh,Nh=Error.captureStackTrace,Fh=cl,Uh=ft("iterator"),Hh=Array.prototype,jh=function(e){return void 0!==e&&(Fh.Array===e||Hh[Uh]===e)},Bh=ti,zh=Le,Vh=G,Kh=cl,Gh=ft("iterator"),Wh=function(e){if(!Vh(e))return zh(e,Gh)||zh(e,"@@iterator")||Kh[Bh(e)]},Yh=O,Xh=Re,qh=nn,$h=Se,Zh=Wh,Jh=TypeError,Qh=function(e,t){var n=arguments.length<2?Zh(e):t;if(Xh(n))return qh(Yh(n,e));throw Jh($h(e)+" is not iterable")},ef=O,tf=nn,nf=Le,rf=function(e,t,n){var i,r;tf(e);try{if(!(i=nf(e,"return"))){if("throw"===t)throw n;return n}i=ef(i,e)}catch(HN){r=!0,i=HN}if("throw"===t)throw n;if(r)throw i;return tf(i),n},of=$t,af=O,sf=nn,lf=Se,uf=jh,cf=jn,hf=se,ff=Qh,df=Wh,pf=rf,vf=TypeError,gf=function(e,t){this.stopped=e,this.result=t},yf=gf.prototype,mf=function(e,t,n){var i,r,o,a,s,l,u,c=n&&n.that,h=!(!n||!n.AS_ENTRIES),f=!(!n||!n.IS_RECORD),d=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),v=of(t,c),g=function(e){return i&&pf(i,"normal",e),new gf(!0,e)},y=function(e){return h?(sf(e),p?v(e[0],e[1],g):v(e[0],e[1])):p?v(e,g):v(e)};if(f)i=e.iterator;else if(d)i=e;else{if(!(r=df(e)))throw vf(lf(e)+" is not iterable");if(uf(r)){for(o=0,a=cf(e);a>o;o++)if((s=y(e[o]))&&hf(yf,s))return s;return new gf(!1)}i=ff(e,r)}for(l=f?e.next:i.next;!(u=af(l,i)).done;){try{s=y(u.value)}catch(HN){pf(i,"throw",HN)}if("object"==typeof s&&s&&hf(yf,s))return s}return new gf(!1)},_f=Yi,kf=An,bf=se,wf=xl,Ef=Zl,Cf=function(e,t,n){for(var i=bh(t),r=Eh.f,o=wh.f,a=0;a<i.length;a++){var s=i[a];kh(e,s)||n&&kh(n,s)||r(e,s,o(t,s))}},xf=Hr,Tf=yn,Sf=H,Pf=function(e,t){Ch(t)&&"cause"in t&&xh(e,"cause",t.cause)},Af=function(e,t,n,i){Dh&&(Nh?Nh(e,t):Mh(e,"stack",Lh(n,i)))},If=mf,Rf=function(e,t){return void 0===e?arguments.length<2?"":t:_f(e)},Of=ft("toStringTag"),Mf=Error,Lf=[].push,Df=function(e,t){var n,i=bf(Nf,this);Ef?n=Ef(Mf(),i?wf(this):Nf):(n=i?this:xf(Nf),Tf(n,Of,"Error")),void 0!==t&&Tf(n,"message",Rf(t)),Af(n,Df,n.stack,1),arguments.length>2&&Pf(n,arguments[2]);var r=[];return If(e,Lf,{that:r}),Tf(n,"errors",r),n};Ef?Ef(Df,Mf):Cf(Df,Mf,{name:!0});var Nf=Df.prototype=xf(Mf.prototype,{constructor:Sf(1,Df),message:Sf(1,""),name:Sf(1,"AggregateError")});kf({global:!0,constructor:!0,arity:2},{AggregateError:Df});var Ff,Uf,Hf,jf,Bf="undefined"!=typeof process&&"process"==k(process),zf=ae,Vf=oo,Kf=A,Gf=ft("species"),Wf=function(e){var t=zf(e);Kf&&t&&!t[Gf]&&Vf(t,Gf,{configurable:!0,get:function(){return this}})},Yf=se,Xf=TypeError,qf=function(e,t){if(Yf(t,e))return e;throw Xf("Incorrect invocation")},$f=_i,Zf=Se,Jf=TypeError,Qf=function(e){if($f(e))return e;throw Jf(Zf(e)+" is not a constructor")},ed=nn,td=Qf,nd=G,id=ft("species"),rd=function(e,t){var n,i=ed(e).constructor;return void 0===i||nd(n=ed(i)[id])?t:td(n)},od=TypeError,ad=function(e,t){if(e<t)throw od("Not enough arguments");return e},sd=/(?:ipad|iphone|ipod).*applewebkit/i.test(le),ld=r,ud=h,cd=$t,hd=S,fd=Je,dd=o,pd=wr,vd=Cs,gd=Tt,yd=ad,md=sd,_d=Bf,kd=ld.setImmediate,bd=ld.clearImmediate,wd=ld.process,Ed=ld.Dispatch,Cd=ld.Function,xd=ld.MessageChannel,Td=ld.String,Sd=0,Pd={},Ad="onreadystatechange";dd((function(){Ff=ld.location}));var Id=function(e){if(fd(Pd,e)){var t=Pd[e];delete Pd[e],t()}},Rd=function(e){return function(){Id(e)}},Od=function(e){Id(e.data)},Md=function(e){ld.postMessage(Td(e),Ff.protocol+"//"+Ff.host)};kd&&bd||(kd=function(e){yd(arguments.length,1);var t=hd(e)?e:Cd(e),n=vd(arguments,1);return Pd[++Sd]=function(){ud(t,void 0,n)},Uf(Sd),Sd},bd=function(e){delete Pd[e]},_d?Uf=function(e){wd.nextTick(Rd(e))}:Ed&&Ed.now?Uf=function(e){Ed.now(Rd(e))}:xd&&!md?(jf=(Hf=new xd).port2,Hf.port1.onmessage=Od,Uf=cd(jf.postMessage,jf)):ld.addEventListener&&hd(ld.postMessage)&&!ld.importScripts&&Ff&&"file:"!==Ff.protocol&&!dd(Md)?(Uf=Md,ld.addEventListener("message",Od,!1)):Uf=Ad in gd("script")?function(e){pd.appendChild(gd("script"))[Ad]=function(){pd.removeChild(this),Id(e)}}:function(e){setTimeout(Rd(e),0)});var Ld={set:kd,clear:bd},Dd=function(){this.head=null,this.tail=null};Dd.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.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 Nd,Fd,Ud,Hd,jd,Bd=Dd,zd=/ipad|iphone|ipod/i.test(le)&&"undefined"!=typeof Pebble,Vd=/web0s(?!.*chrome)/i.test(le),Kd=r,Gd=$t,Wd=P.f,Yd=Ld.set,Xd=Bd,qd=sd,$d=zd,Zd=Vd,Jd=Bf,Qd=Kd.MutationObserver||Kd.WebKitMutationObserver,ep=Kd.document,tp=Kd.process,np=Kd.Promise,ip=Wd(Kd,"queueMicrotask"),rp=ip&&ip.value;if(!rp){var op=new Xd,ap=function(){var e,t;for(Jd&&(e=tp.domain)&&e.exit();t=op.get();)try{t()}catch(HN){throw op.head&&Nd(),HN}e&&e.enter()};qd||Jd||Zd||!Qd||!ep?!$d&&np&&np.resolve?((Hd=np.resolve(void 0)).constructor=np,jd=Gd(Hd.then,Hd),Nd=function(){jd(ap)}):Jd?Nd=function(){tp.nextTick(ap)}:(Yd=Gd(Yd,Kd),Nd=function(){Yd(ap)}):(Fd=!0,Ud=ep.createTextNode(""),new Qd(ap).observe(Ud,{characterData:!0}),Nd=function(){Ud.data=Fd=!Fd}),rp=function(e){op.head||Nd(),op.add(e)}}var sp=rp,lp=function(e){try{return{error:!1,value:e()}}catch(HN){return{error:!0,value:HN}}},up=r.Promise,cp="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,hp=!cp&&!Bf&&"object"==typeof window&&"object"==typeof document,fp=r,dp=up,pp=S,vp=Wt,gp=oi,yp=ft,mp=hp,_p=cp,kp=ve,bp=dp&&dp.prototype,wp=yp("species"),Ep=!1,Cp=pp(fp.PromiseRejectionEvent),xp={CONSTRUCTOR:vp("Promise",(function(){var e=gp(dp),t=e!==String(dp);if(!t&&66===kp)return!0;if(!bp.catch||!bp.finally)return!0;if(!kp||kp<51||!/native code/.test(e)){var n=new dp((function(e){e(1)})),i=function(e){e((function(){}),(function(){}))};if((n.constructor={})[wp]=i,!(Ep=n.then((function(){}))instanceof i))return!0}return!t&&(mp||_p)&&!Cp})),REJECTION_EVENT:Cp,SUBCLASSING:Ep},Tp={},Sp=Re,Pp=TypeError,Ap=function(e){var t,n;this.promise=new e((function(e,i){if(void 0!==t||void 0!==n)throw Pp("Bad Promise constructor");t=e,n=i})),this.resolve=Sp(t),this.reject=Sp(n)};Tp.f=function(e){return new Ap(e)};var Ip,Rp,Op=An,Mp=Bf,Lp=r,Dp=O,Np=io,Fp=Io,Up=Wf,Hp=Re,jp=S,Bp=ee,zp=qf,Vp=rd,Kp=Ld.set,Gp=sp,Wp=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(HN){}},Yp=lp,Xp=Bd,qp=Wo,$p=up,Zp=xp,Jp=Tp,Qp="Promise",ev=Zp.CONSTRUCTOR,tv=Zp.REJECTION_EVENT,nv=qp.getterFor(Qp),iv=qp.set,rv=$p&&$p.prototype,ov=$p,av=rv,sv=Lp.TypeError,lv=Lp.document,uv=Lp.process,cv=Jp.f,hv=cv,fv=!!(lv&&lv.createEvent&&Lp.dispatchEvent),dv="unhandledrejection",pv=function(e){var t;return!(!Bp(e)||!jp(t=e.then))&&t},vv=function(e,t){var n,i,r,o=t.value,a=1==t.state,s=a?e.ok:e.fail,l=e.resolve,u=e.reject,c=e.domain;try{s?(a||(2===t.rejection&&kv(t),t.rejection=1),!0===s?n=o:(c&&c.enter(),n=s(o),c&&(c.exit(),r=!0)),n===e.promise?u(sv("Promise-chain cycle")):(i=pv(n))?Dp(i,n,l,u):l(n)):u(o)}catch(HN){c&&!r&&c.exit(),u(HN)}},gv=function(e,t){e.notified||(e.notified=!0,Gp((function(){for(var n,i=e.reactions;n=i.get();)vv(n,e);e.notified=!1,t&&!e.rejection&&mv(e)})))},yv=function(e,t,n){var i,r;fv?((i=lv.createEvent("Event")).promise=t,i.reason=n,i.initEvent(e,!1,!0),Lp.dispatchEvent(i)):i={promise:t,reason:n},!tv&&(r=Lp["on"+e])?r(i):e===dv&&Wp("Unhandled promise rejection",n)},mv=function(e){Dp(Kp,Lp,(function(){var t,n=e.facade,i=e.value;if(_v(e)&&(t=Yp((function(){Mp?uv.emit("unhandledRejection",i,n):yv(dv,n,i)})),e.rejection=Mp||_v(e)?2:1,t.error))throw t.value}))},_v=function(e){return 1!==e.rejection&&!e.parent},kv=function(e){Dp(Kp,Lp,(function(){var t=e.facade;Mp?uv.emit("rejectionHandled",t):yv("rejectionhandled",t,e.value)}))},bv=function(e,t,n){return function(i){e(t,i,n)}},wv=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,gv(e,!0))},Ev=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw sv("Promise can't be resolved itself");var i=pv(t);i?Gp((function(){var n={done:!1};try{Dp(i,t,bv(Ev,n,e),bv(wv,n,e))}catch(HN){wv(n,HN,e)}})):(e.value=t,e.state=1,gv(e,!1))}catch(HN){wv({done:!1},HN,e)}}};ev&&(av=(ov=function(e){zp(this,av),Hp(e),Dp(Ip,this);var t=nv(this);try{e(bv(Ev,t),bv(wv,t))}catch(HN){wv(t,HN)}}).prototype,(Ip=function(e){iv(this,{type:Qp,done:!1,notified:!1,parent:!1,reactions:new Xp,rejection:!1,state:0,value:void 0})}).prototype=Np(av,"then",(function(e,t){var n=nv(this),i=cv(Vp(this,ov));return n.parent=!0,i.ok=!jp(e)||e,i.fail=jp(t)&&t,i.domain=Mp?uv.domain:void 0,0==n.state?n.reactions.add(i):Gp((function(){vv(i,n)})),i.promise})),Rp=function(){var e=new Ip,t=nv(e);this.promise=e,this.resolve=bv(Ev,t),this.reject=bv(wv,t)},Jp.f=cv=function(e){return e===ov||undefined===e?new Rp(e):hv(e)}),Op({global:!0,constructor:!0,wrap:!0,forced:ev},{Promise:ov}),Fp(ov,Qp,!1,!0),Up(Qp);var Cv=ft("iterator"),xv=!1;try{var Tv=0,Sv={next:function(){return{done:!!Tv++}},return:function(){xv=!0}};Sv[Cv]=function(){return this},Array.from(Sv,(function(){throw 2}))}catch(HN){}var Pv=function(e,t){if(!t&&!xv)return!1;var n=!1;try{var i={};i[Cv]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(HN){}return n},Av=up,Iv=xp.CONSTRUCTOR||!Pv((function(e){Av.all(e).then(void 0,(function(){}))})),Rv=O,Ov=Re,Mv=Tp,Lv=lp,Dv=mf;An({target:"Promise",stat:!0,forced:Iv},{all:function(e){var t=this,n=Mv.f(t),i=n.resolve,r=n.reject,o=Lv((function(){var n=Ov(t.resolve),o=[],a=0,s=1;Dv(e,(function(e){var l=a++,u=!1;s++,Rv(n,t,e).then((function(e){u||(u=!0,o[l]=e,--s||i(o))}),r)})),--s||i(o)}));return o.error&&r(o.value),n.promise}});var Nv=An,Fv=xp.CONSTRUCTOR;up&&up.prototype,Nv({target:"Promise",proto:!0,forced:Fv,real:!0},{catch:function(e){return this.then(void 0,e)}});var Uv=O,Hv=Re,jv=Tp,Bv=lp,zv=mf;An({target:"Promise",stat:!0,forced:Iv},{race:function(e){var t=this,n=jv.f(t),i=n.reject,r=Bv((function(){var r=Hv(t.resolve);zv(e,(function(e){Uv(r,t,e).then(n.resolve,i)}))}));return r.error&&i(r.value),n.promise}});var Vv=O,Kv=Tp;An({target:"Promise",stat:!0,forced:xp.CONSTRUCTOR},{reject:function(e){var t=Kv.f(this);return Vv(t.reject,void 0,e),t.promise}});var Gv=nn,Wv=ee,Yv=Tp,Xv=function(e,t){if(Gv(e),Wv(t)&&t.constructor===e)return t;var n=Yv.f(e);return(0,n.resolve)(t),n.promise},qv=An,$v=up,Zv=xp.CONSTRUCTOR,Jv=Xv,Qv=ae("Promise"),eg=!Zv;qv({target:"Promise",stat:!0,forced:true},{resolve:function(e){return Jv(eg&&this===Qv?$v:this,e)}});var tg=O,ng=Re,ig=Tp,rg=lp,og=mf;An({target:"Promise",stat:!0,forced:Iv},{allSettled:function(e){var t=this,n=ig.f(t),i=n.resolve,r=n.reject,o=rg((function(){var n=ng(t.resolve),r=[],o=0,a=1;og(e,(function(e){var s=o++,l=!1;a++,tg(n,t,e).then((function(e){l||(l=!0,r[s]={status:"fulfilled",value:e},--a||i(r))}),(function(e){l||(l=!0,r[s]={status:"rejected",reason:e},--a||i(r))}))})),--a||i(r)}));return o.error&&r(o.value),n.promise}});var ag=O,sg=Re,lg=ae,ug=Tp,cg=lp,hg=mf,fg="No one promise resolved";An({target:"Promise",stat:!0,forced:Iv},{any:function(e){var t=this,n=lg("AggregateError"),i=ug.f(t),r=i.resolve,o=i.reject,a=cg((function(){var i=sg(t.resolve),a=[],s=0,l=1,u=!1;hg(e,(function(e){var c=s++,h=!1;l++,ag(i,t,e).then((function(e){h||u||(u=!0,r(e))}),(function(e){h||u||(h=!0,a[c]=e,--l||o(new n(a,fg)))}))})),--l||o(new n(a,fg))}));return a.error&&o(a.value),i.promise}});var dg=An,pg=up,vg=o,gg=ae,yg=S,mg=rd,_g=Xv,kg=pg&&pg.prototype;dg({target:"Promise",proto:!0,real:!0,forced:!!pg&&vg((function(){kg.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=mg(this,gg("Promise")),n=yg(e);return this.then(n?function(n){return _g(t,e()).then((function(){return n}))}:e,n?function(n){return _g(t,e()).then((function(){throw n}))}:e)}});var bg=te.Promise,wg=Tp,Eg=lp;An({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=wg.f(this),n=Eg(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}});var Cg=bg,xg=n(Cg),Tg=An,Sg=Rn,Pg=g([].reverse),Ag=[1,2];Tg({target:"Array",proto:!0,forced:String(Ag)===String(Ag.reverse())},{reverse:function(){return Sg(this)&&(this.length=this.length),Pg(this)}});var Ig=Vc("Array").reverse,Rg=se,Og=Ig,Mg=Array.prototype,Lg=n((function(e){var t=e.reverse;return e===Mg||Rg(Mg,e)&&t===Mg.reverse?Og:t})),Dg=An,Ng=Rn,Fg=_i,Ug=ee,Hg=Ji,jg=jn,Bg=Z,zg=Wn,Vg=ft,Kg=Cs,Gg=Ii("slice"),Wg=Vg("species"),Yg=Array,Xg=Math.max;Dg({target:"Array",proto:!0,forced:!Gg},{slice:function(e,t){var n,i,r,o=Bg(this),a=jg(o),s=Hg(e,a),l=Hg(void 0===t?a:t,a);if(Ng(o)&&(n=o.constructor,(Fg(n)&&(n===Yg||Ng(n.prototype))||Ug(n)&&null===(n=n[Wg]))&&(n=void 0),n===Yg||void 0===n))return Kg(o,s,l);for(i=new(void 0===n?Yg:n)(Xg(l-s,0)),r=0;s<l;s++,r++)s in o&&zg(i,r,o[s]);return i.length=r,i}});var qg=Vc("Array").slice,$g=se,Zg=qg,Jg=Array.prototype,Qg=function(e){var t=e.slice;return e===Jg||$g(Jg,e)&&t===Jg.slice?Zg:t},ey=n(Qg);function ty(){ty=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,i=Ic||function(e,t,n){e[t]=n.value},r="function"==typeof nc?nc:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function l(e,t,n){return Ic(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(S){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof f?t:f,a=Oc(o.prototype),s=new C(r||[]);return i(a,"_invoke",{value:k(e,n,s)}),a}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(S){return{type:"throw",arg:S}}}e.wrap=u;var h={};function f(){}function d(){}function p(){}var v={};l(v,o,(function(){return this}));var g=Fc&&Fc(Fc(x([])));g&&g!==t&&n.call(g,o)&&(v=g);var y=p.prototype=f.prototype=Oc(v);function m(e){var t;Zc(t=["next","throw","return"]).call(t,(function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function r(i,o,a,s){var l=c(e[i],e,o);if("throw"!==l.type){var u=l.arg,h=u.value;return h&&"object"==wc(h)&&n.call(h,"__await")?t.resolve(h.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(h).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return o=o?o.then(i,i):i()}})}function k(e,t,n){var i="suspendedStart";return function(r,o){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===r)throw o;return{value:void 0,done:!0}}for(n.method=r,n.arg=o;;){var a=n.delegate;if(a){var s=b(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var l=c(e,t,n);if("normal"===l.type){if(i=n.done?"completed":"suspendedYield",l.arg===h)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i="completed",n.method="throw",n.arg=l.arg)}}}function b(e,t){var n=t.method,i=e.iterator[n];if(void 0===i)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var r=c(i,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,h;var o=r.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,h):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function w(e){var t,n={tryLoc:e[0]};1 in e&&(n.catchLoc=e[1]),2 in e&&(n.finallyLoc=e[2],n.afterLoc=e[3]),hh(t=this.tryEntries).call(t,n)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],Zc(e).call(e,w,this),this.reset(!0)}function x(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 i=-1,r=function t(){for(;++i<e.length;)if(n.call(e,i))return t.value=e[i],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:T}}function T(){return{value:void 0,done:!0}}return d.prototype=p,i(y,"constructor",{value:p,configurable:!0}),i(p,"constructor",{value:d,configurable:!0}),d.displayName=l(p,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return dh?dh(e,p):(e.__proto__=p,l(e,s,"GeneratorFunction")),e.prototype=Oc(y),e},e.awrap=function(e){return{__await:e}},m(_.prototype),l(_.prototype,a,(function(){return this})),e.AsyncIterator=_,e.async=function(t,n,i,r,o){void 0===o&&(o=xg);var a=new _(u(t,n,i,r),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},m(y),l(y,s,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var i in t)hh(n).call(n,i);return Lg(n).call(n),function e(){for(;n.length;){var i=n.pop();if(i in t)return e.value=i,e.done=!1,e}return e.done=!0,e}},e.values=x,C.prototype={constructor:C,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,Zc(t=this.tryEntries).call(t,E),!e)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+ey(i).call(i,1))&&(this[i]=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 i(n,i){return a.type="throw",a.arg=e,t.next=n,i&&(t.method="next",t.arg=void 0),!!i}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):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),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var r=i.arg;E(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:x(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},e}var ny=qe,iy=pr;An({target:"Object",stat:!0,forced:o((function(){iy(1)}))},{keys:function(e){return iy(ny(e))}});var ry=te.Object.keys,oy=n(ry),ay=te.Object.getOwnPropertySymbols,sy=n(ay),ly=ea.filter;An({target:"Array",proto:!0,forced:!Ii("filter")},{filter:function(e){return ly(this,e,arguments.length>1?arguments[1]:void 0)}});var uy=Vc("Array").filter,cy=se,hy=uy,fy=Array.prototype,dy=function(e){var t=e.filter;return e===fy||cy(fy,e)&&t===fy.filter?hy:t},py=n(dy),vy={exports:{}},gy=An,yy=o,my=Z,_y=P.f,ky=A;gy({target:"Object",stat:!0,forced:!ky||yy((function(){_y(1)})),sham:!ky},{getOwnPropertyDescriptor:function(e,t){return _y(my(e),t)}});var by=te.Object,wy=vy.exports=function(e,t){return by.getOwnPropertyDescriptor(e,t)};by.getOwnPropertyDescriptor.sham&&(wy.sham=!0);var Ey=vy.exports,Cy=n(Ey),xy=_h,Ty=Z,Sy=P,Py=Wn;An({target:"Object",stat:!0,sham:!A},{getOwnPropertyDescriptors:function(e){for(var t,n,i=Ty(e),r=Sy.f,o=xy(i),a={},s=0;o.length>s;)void 0!==(n=r(i,t=o[s++]))&&Py(a,t,n);return a}});var Ay=te.Object.getOwnPropertyDescriptors,Iy=n(Ay),Ry={exports:{}},Oy=An,My=A,Ly=Xi.f;Oy({target:"Object",stat:!0,forced:Object.defineProperties!==Ly,sham:!My},{defineProperties:Ly});var Dy=te.Object,Ny=Ry.exports=function(e,t){return Dy.defineProperties(e,t)};Dy.defineProperties.sham&&(Ny.sham=!0);var Fy=Ry.exports,Uy=n(Fy),Hy=ao.f("toPrimitive"),jy=n(Hy);function By(e){var t=function(e,t){if("object"!==wc(e)||null===e)return e;var n=e[jy];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==wc(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===wc(t)?t:String(t)}function zy(e,t,n){return(t=By(t))in e?Ic(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vy(e,t){var n=oy(e);if(sy){var i=sy(e);t&&(i=py(i).call(i,(function(t){return Cy(e,t).enumerable}))),hh(n).apply(n,i)}return n}function Ky(e){for(var t=1;t<arguments.length;t++){var n,i,r=null!=arguments[t]?arguments[t]:{};t%2?Zc(n=Vy(Object(r),!0)).call(n,(function(t){zy(e,t,r[t])})):Iy?Uy(e,Iy(r)):Zc(i=Vy(Object(r))).call(i,(function(t){Ic(e,t,Cy(r,t))}))}return e}function Gy(e,t,n,i,r,o,a){try{var s=e[o](a),l=s.value}catch(HN){return void n(HN)}s.done?t(l):xg.resolve(l).then(i,r)}function Wy(e){return function(){var t=this,n=arguments;return new xg((function(i,r){var o=e.apply(t,n);function a(e){Gy(o,i,r,a,s,"next",e)}function s(e){Gy(o,i,r,a,s,"throw",e)}a(void 0)}))}}var Yy=function(e){return e.H265="h265",e.H264="h264",e}(Yy||{}),Xy=function(e){return e.Software="software",e.Hardware="hardware",e}(Xy||{});An({target:"Array",stat:!0},{isArray:Rn});var qy=n(te.Array.isArray);function $y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var Zy=Wh,Jy=n(Zy),Qy=nn,em=rf,tm=$t,nm=O,im=qe,rm=function(e,t,n,i){try{return i?t(Qy(n)[0],n[1]):t(n)}catch(HN){em(e,"throw",HN)}},om=jh,am=_i,sm=jn,lm=Wn,um=Qh,cm=Wh,hm=Array,fm=function(e){var t=im(e),n=am(this),i=arguments.length,r=i>1?arguments[1]:void 0,o=void 0!==r;o&&(r=tm(r,i>2?arguments[2]:void 0));var a,s,l,u,c,h,f=cm(t),d=0;if(!f||this===hm&&om(f))for(a=sm(t),s=n?new this(a):hm(a);a>d;d++)h=o?r(t[d],d):t[d],lm(s,d,h);else for(c=(u=um(t,f)).next,s=n?new this:[];!(l=nm(c,u)).done;d++)h=o?rm(u,r,[l.value,d],!0):l.value,lm(s,d,h);return s.length=d,s},dm=fm;An({target:"Array",stat:!0,forced:!Pv((function(e){Array.from(e)}))},{from:dm});var pm=te.Array.from,vm=n(pm);function gm(e,t){var n;if(e){if("string"==typeof e)return $y(e,t);var i=ey(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?vm(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?$y(e,t):void 0}}function ym(e){return function(e){if(qy(e))return $y(e)}(e)||function(e){if(void 0!==nc&&null!=Jy(e)||null!=e["@@iterator"])return vm(e)}(e)||gm(e)||function(){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 mm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _m(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Ic(e,By(i.key),i)}}function km(e,t,n){return t&&_m(e.prototype,t),n&&_m(e,n),Ic(e,"prototype",{writable:!1}),e}var bm=An,wm=ir.indexOf,Em=Hc,Cm=E([].indexOf),xm=!!Cm&&1/Cm([1],1,-0)<0;bm({target:"Array",proto:!0,forced:xm||!Em("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return xm?Cm(this,e,t)||0:wm(this,e,t)}});var Tm=Vc("Array").indexOf,Sm=se,Pm=Tm,Am=Array.prototype,Im=function(e){var t=e.indexOf;return e===Am||Sm(Am,e)&&t===Am.indexOf?Pm:t},Rm=n(Im);function Om(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},o=oy(e);for(i=0;i<o.length;i++)n=o[i],Rm(t).call(t,n)>=0||(r[n]=e[n]);return r}(e,t);if(sy){var o=sy(e);for(i=0;i<o.length;i++)n=o[i],Rm(t).call(t,n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Mm=Vc("Array").concat,Lm=se,Dm=Mm,Nm=Array.prototype,Fm=n((function(e){var t=e.concat;return e===Nm||Lm(Nm,e)&&t===Nm.concat?Dm:t})),Um=An,Hm=ea.find,jm="find",Bm=!0;jm in[]&&Array(1)[jm]((function(){Bm=!1})),Um({target:"Array",proto:!0,forced:Bm},{find:function(e){return Hm(this,e,arguments.length>1?arguments[1]:void 0)}});var zm=Vc("Array").find,Vm=se,Km=zm,Gm=Array.prototype,Wm=n((function(e){var t=e.find;return e===Gm||Vm(Gm,e)&&t===Gm.find?Km:t})),Ym={exports:{}},Xm=o((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),qm=o,$m=ee,Zm=k,Jm=Xm,Qm=Object.isExtensible,e_=qm((function(){Qm(1)}))||Jm?function(e){return!!$m(e)&&((!Jm||"ArrayBuffer"!=Zm(e))&&(!Qm||Qm(e)))}:Qm,t_=!o((function(){return Object.isExtensible(Object.preventExtensions({}))})),n_=An,i_=g,r_=rr,o_=ee,a_=Je,s_=Zt.f,l_=jr,u_=Vr,c_=e_,h_=t_,f_=!1,d_=it("meta"),p_=0,v_=function(e){s_(e,d_,{value:{objectID:"O"+p_++,weakData:{}}})},g_=Ym.exports={enable:function(){g_.enable=function(){},f_=!0;var e=l_.f,t=i_([].splice),n={};n[d_]=1,e(n).length&&(l_.f=function(n){for(var i=e(n),r=0,o=i.length;r<o;r++)if(i[r]===d_){t(i,r,1);break}return i},n_({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:u_.f}))},fastKey:function(e,t){if(!o_(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a_(e,d_)){if(!c_(e))return"F";if(!t)return"E";v_(e)}return e[d_].objectID},getWeakData:function(e,t){if(!a_(e,d_)){if(!c_(e))return!0;if(!t)return!1;v_(e)}return e[d_].weakData},onFreeze:function(e){return h_&&f_&&c_(e)&&!a_(e,d_)&&v_(e),e}};r_[d_]=!0;var y_=Ym.exports,m_=An,__=r,k_=y_,b_=o,w_=yn,E_=mf,C_=qf,x_=S,T_=ee,S_=Io,P_=Zt.f,A_=ea.forEach,I_=A,R_=Wo.set,O_=Wo.getterFor,M_=io,L_=function(e,t,n){for(var i in t)n&&n.unsafe&&e[i]?e[i]=t[i]:M_(e,i,t[i],n);return e},D_=Hr,N_=oo,F_=L_,U_=$t,H_=qf,j_=G,B_=mf,z_=pu,V_=vu,K_=Wf,G_=A,W_=y_.fastKey,Y_=Wo.set,X_=Wo.getterFor,q_={getConstructor:function(e,t,n,i){var r=e((function(e,r){H_(e,o),Y_(e,{type:t,index:D_(null),first:void 0,last:void 0,size:0}),G_||(e.size=0),j_(r)||B_(r,e[i],{that:e,AS_ENTRIES:n})})),o=r.prototype,a=X_(t),s=function(e,t,n){var i,r,o=a(e),s=l(e,t);return s?s.value=n:(o.last=s={index:r=W_(t,!0),key:t,value:n,previous:i=o.last,next:void 0,removed:!1},o.first||(o.first=s),i&&(i.next=s),G_?o.size++:e.size++,"F"!==r&&(o.index[r]=s)),e},l=function(e,t){var n,i=a(e),r=W_(t);if("F"!==r)return i.index[r];for(n=i.first;n;n=n.next)if(n.key==t)return n};return F_(o,{clear:function(){for(var e=a(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,G_?e.size=0:this.size=0},delete:function(e){var t=this,n=a(t),i=l(t,e);if(i){var r=i.next,o=i.previous;delete n.index[i.index],i.removed=!0,o&&(o.next=r),r&&(r.previous=o),n.first==i&&(n.first=r),n.last==i&&(n.last=o),G_?n.size--:t.size--}return!!i},forEach:function(e){for(var t,n=a(this),i=U_(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(i(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!l(this,e)}}),F_(o,n?{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)}}),G_&&N_(o,"size",{configurable:!0,get:function(){return a(this).size}}),r},setStrong:function(e,t,n){var i=t+" Iterator",r=X_(t),o=X_(i);z_(e,t,(function(e,t){Y_(this,{type:i,target:e,state:r(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?V_("keys"==t?n.key:"values"==t?n.value:[n.key,n.value],!1):(e.target=void 0,V_(void 0,!0))}),n?"entries":"values",!n,!0),K_(t)}};(function(e,t,n){var i,r=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),a=r?"set":"add",s=__[e],l=s&&s.prototype,u={};if(I_&&x_(s)&&(o||l.forEach&&!b_((function(){(new s).entries().next()})))){var c=(i=t((function(t,n){R_(C_(t,c),{type:e,collection:new s}),null!=n&&E_(n,t[a],{that:t,AS_ENTRIES:r})}))).prototype,h=O_(e);A_(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in l)||o&&"clear"==e||w_(c,e,(function(n,i){var r=h(this).collection;if(!t&&o&&!T_(n))return"get"==e&&void 0;var a=r[e](0===n?0:n,i);return t?this:a}))})),o||P_(c,"size",{configurable:!0,get:function(){return h(this).collection.size}})}else i=n.getConstructor(t,e,r,a),k_.enable();S_(i,e,!1,!0),u[e]=i,m_({global:!0,forced:!0},u),o||n.setStrong(i,e,r)})("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),q_);var $_=te.Map,Z_=$t,J_=O,Q_=Re,ek=Qf,tk=G,nk=mf,ik=[].push,rk=function(e){var t,n,i,r,o=arguments.length,a=o>1?arguments[1]:void 0;return ek(this),(t=void 0!==a)&&Q_(a),tk(e)?new this:(n=[],t?(i=0,r=Z_(a,o>2?arguments[2]:void 0),nk(e,(function(e){J_(ik,n,r(e,i++))}))):nk(e,ik,{that:n}),new this(n))};An({target:"Map",stat:!0,forced:!0},{from:rk});var ok=Cs,ak=function(){return new this(ok(arguments))};An({target:"Map",stat:!0,forced:!0},{of:ak});var sk=Se,lk=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(sk(e)+" is not a map")},uk=function(e,t){return 1==t?function(t,n){return t[e](n)}:function(t,n,i){return t[e](n,i)}},ck=ae("Map"),hk={Map:ck,set:uk("set",2),get:uk("get",1),has:uk("has",1),remove:uk("delete",1),proto:ck.prototype},fk=lk,dk=hk.remove;An({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=fk(this),n=!0,i=0,r=arguments.length;i<r;i++)e=dk(t,arguments[i]),n=n&&e;return!!n}});var pk=lk,vk=hk.get,gk=hk.has,yk=hk.set;An({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var n,i,r=pk(this);return gk(r,e)?(n=vk(r,e),"update"in t&&(n=t.update(n,e,r),yk(r,e,n)),n):(i=t.insert(e,r),yk(r,e,i),i)}});var mk=O,_k=function(e,t,n){for(var i,r,o=n||e.next;!(i=mk(o,e)).done;)if(void 0!==(r=t(i.value)))return r},kk=function(e,t,n){return n?_k(e.entries(),(function(e){return t(e[1],e[0])})):e.forEach(t)},bk=$t,wk=lk,Ek=kk;An({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=wk(this),n=bk(e,arguments.length>1?arguments[1]:void 0);return!1!==Ek(t,(function(e,i){if(!n(e,i,t))return!1}),!0)}});var Ck=$t,xk=lk,Tk=kk,Sk=hk.Map,Pk=hk.set;An({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=xk(this),n=Ck(e,arguments.length>1?arguments[1]:void 0),i=new Sk;return Tk(t,(function(e,r){n(e,r,t)&&Pk(i,r,e)})),i}});var Ak=$t,Ik=lk,Rk=kk;An({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=Ik(this),n=Ak(e,arguments.length>1?arguments[1]:void 0),i=Rk(t,(function(e,i){if(n(e,i,t))return{value:e}}),!0);return i&&i.value}});var Ok=$t,Mk=lk,Lk=kk;An({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=Mk(this),n=Ok(e,arguments.length>1?arguments[1]:void 0),i=Lk(t,(function(e,i){if(n(e,i,t))return{key:i}}),!0);return i&&i.key}});var Dk=An,Nk=O,Fk=S,Uk=Re,Hk=mf,jk=hk.Map,Bk=g([].push);Dk({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){var n=new(Fk(this)?this:jk);Uk(t);var i=Uk(n.has),r=Uk(n.get),o=Uk(n.set);return Hk(e,(function(e){var a=t(e);Nk(i,n,a)?Bk(Nk(r,n,a),e):Nk(o,n,a,[e])})),n}});var zk=function(e,t){return e===t||e!=e&&t!=t},Vk=lk,Kk=kk;An({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===Kk(Vk(this),(function(t){if(zk(t,e))return!0}),!0)}});var Gk=O,Wk=mf,Yk=S,Xk=Re,qk=hk.Map;An({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var n=new(Yk(this)?this:qk);Xk(t);var i=Xk(n.set);return Wk(e,(function(e){Gk(i,n,t(e),e)})),n}});var $k=lk,Zk=kk;An({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=Zk($k(this),(function(t,n){if(t===e)return{key:n}}),!0);return t&&t.key}});var Jk=$t,Qk=lk,eb=kk,tb=hk.Map,nb=hk.set;An({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=Qk(this),n=Jk(e,arguments.length>1?arguments[1]:void 0),i=new tb;return eb(t,(function(e,r){nb(i,n(e,r,t),e)})),i}});var ib=$t,rb=lk,ob=kk,ab=hk.Map,sb=hk.set;An({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=rb(this),n=ib(e,arguments.length>1?arguments[1]:void 0),i=new ab;return ob(t,(function(e,r){sb(i,r,n(e,r,t))})),i}});var lb=lk,ub=mf,cb=hk.set;An({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=lb(this),n=arguments.length,i=0;i<n;)ub(arguments[i++],(function(e,n){cb(t,e,n)}),{AS_ENTRIES:!0});return t}});var hb=Re,fb=lk,db=kk,pb=TypeError;An({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=fb(this),n=arguments.length<2,i=n?void 0:arguments[1];if(hb(e),db(t,(function(r,o){n?(n=!1,i=r):i=e(i,r,o,t)})),n)throw pb("Reduce of empty map with no initial value");return i}});var vb=$t,gb=lk,yb=kk;An({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=gb(this),n=vb(e,arguments.length>1?arguments[1]:void 0);return!0===yb(t,(function(e,i){if(n(e,i,t))return!0}),!0)}});var mb=Re,_b=lk,kb=TypeError,bb=hk.get,wb=hk.has,Eb=hk.set;An({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var n=_b(this),i=arguments.length;mb(t);var r=wb(n,e);if(!r&&i<3)throw kb("Updating absent value");var o=r?bb(n,e):mb(i>2?arguments[2]:void 0)(e,n);return Eb(n,e,t(o,e,n)),n}});var Cb=O,xb=Re,Tb=S,Sb=nn,Pb=TypeError,Ab=function(e,t){var n,i=Sb(this),r=xb(i.get),o=xb(i.has),a=xb(i.set),s=arguments.length>2?arguments[2]:void 0;if(!Tb(t)&&!Tb(s))throw Pb("At least one callback required");return Cb(o,i,e)?(n=Cb(r,i,e),Tb(t)&&(n=t(n),Cb(a,i,e,n))):Tb(s)&&(n=s(),Cb(a,i,e,n)),n};An({target:"Map",proto:!0,real:!0,forced:!0},{upsert:Ab}),An({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:Ab});var Ib=$_,Rb=n(Ib),Ob=n(Ib),Mb=ea.map;An({target:"Array",proto:!0,forced:!Ii("map")},{map:function(e){return Mb(this,e,arguments.length>1?arguments[1]:void 0)}});var Lb=Vc("Array").map,Db=se,Nb=Lb,Fb=Array.prototype,Ub=n((function(e){var t=e.map;return e===Fb||Db(Fb,e)&&t===Fb.map?Nb:t})),Hb=n(Cg),jb=n(dy),Bb=ir.includes;An({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(e){return Bb(this,e,arguments.length>1?arguments[1]:void 0)}});var zb=Vc("Array").includes,Vb=ee,Kb=k,Gb=ft("match"),Wb=function(e){var t;return Vb(e)&&(void 0!==(t=e[Gb])?!!t:"RegExp"==Kb(e))},Yb=TypeError,Xb=function(e){if(Wb(e))throw Yb("The method doesn't accept regular expressions");return e},qb=ft("match"),$b=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[qb]=!1,"/./"[e](t)}catch(HN){}}return!1},Zb=An,Jb=Xb,Qb=X,ew=Yi,tw=$b,nw=g("".indexOf);Zb({target:"String",proto:!0,forced:!tw("includes")},{includes:function(e){return!!~nw(ew(Qb(this)),ew(Jb(e)),arguments.length>1?arguments[1]:void 0)}});var iw=Vc("String").includes,rw=se,ow=zb,aw=iw,sw=Array.prototype,lw=String.prototype,uw=n((function(e){var t=e.includes;return e===sw||rw(sw,e)&&t===sw.includes?ow:"string"==typeof e||e===lw||rw(lw,e)&&t===lw.includes?aw:t})),cw=n(Im),hw=n(ry),fw=n(Qg),dw=Se,pw=TypeError,vw=function(e,t){if(!delete e[t])throw pw("Cannot delete property "+dw(t)+" of "+dw(e))},gw=An,yw=qe,mw=Ji,_w=Dn,kw=jn,bw=nh,ww=zn,Ew=Ti,Cw=Wn,xw=vw,Tw=Ii("splice"),Sw=Math.max,Pw=Math.min;gw({target:"Array",proto:!0,forced:!Tw},{splice:function(e,t){var n,i,r,o,a,s,l=yw(this),u=kw(l),c=mw(e,u),h=arguments.length;for(0===h?n=i=0:1===h?(n=0,i=u-c):(n=h-2,i=Pw(Sw(_w(t),0),u-c)),ww(u+n-i),r=Ew(l,i),o=0;o<i;o++)(a=c+o)in l&&Cw(r,o,l[a]);if(r.length=i,n<i){for(o=c;o<u-i;o++)s=o+n,(a=o+i)in l?l[s]=l[a]:xw(l,s);for(o=u;o>u-i+n;o--)xw(l,o-1)}else if(n>i)for(o=u-i;o>c;o--)s=o+n-1,(a=o+i-1)in l?l[s]=l[a]:xw(l,s);for(o=0;o<n;o++)l[o+c]=arguments[o+2];return bw(l,u-i+n),r}});var Aw=Vc("Array").splice,Iw=se,Rw=Aw,Ow=Array.prototype,Mw=n((function(e){var t=e.splice;return e===Ow||Iw(Ow,e)&&t===Ow.splice?Rw:t}));An({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var Lw=n(te.Number.isNaN),Dw="\t\n\v\f\r                 \u2028\u2029\ufeff",Nw=X,Fw=Yi,Uw=Dw,Hw=g("".replace),jw=RegExp("^["+Uw+"]+"),Bw=RegExp("(^|[^"+Uw+"])["+Uw+"]+$"),zw=function(e){return function(t){var n=Fw(Nw(t));return 1&e&&(n=Hw(n,jw,"")),2&e&&(n=Hw(n,Bw,"$1")),n}},Vw={start:zw(1),end:zw(2),trim:zw(3)},Kw=r,Gw=o,Ww=g,Yw=Yi,Xw=Vw.trim,qw=Dw,$w=Kw.parseInt,Zw=Kw.Symbol,Jw=Zw&&Zw.iterator,Qw=/^[+-]?0x/i,eE=Ww(Qw.exec),tE=8!==$w(qw+"08")||22!==$w(qw+"0x16")||Jw&&!Gw((function(){$w(Object(Jw))}))?function(e,t){var n=Xw(Yw(e));return $w(n,t>>>0||(eE(Qw,n)?16:10))}:$w;An({global:!0,forced:parseInt!=tE},{parseInt:tE});var nE=n(te.parseInt),iE=Vc("Array").keys,rE=ti,oE=Je,aE=se,sE=iE,lE=Array.prototype,uE={DOMTokenList:!0,NodeList:!0},cE=n((function(e){var t=e.keys;return e===lE||aE(lE,e)&&t===lE.keys||oE(uE,rE(e))?sE:t})),hE=A,fE=g,dE=O,pE=o,vE=pr,gE=to,yE=M,mE=qe,_E=K,kE=Object.assign,bE=Object.defineProperty,wE=fE([].concat),EE=!kE||pE((function(){if(hE&&1!==kE({b:1},kE(bE({},"a",{enumerable:!0,get:function(){bE(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach((function(e){t[e]=e})),7!=kE({},e)[n]||vE(kE({},t)).join("")!=i}))?function(e,t){for(var n=mE(e),i=arguments.length,r=1,o=gE.f,a=yE.f;i>r;)for(var s,l=_E(arguments[r++]),u=o?wE(vE(l),o(l)):vE(l),c=u.length,h=0;c>h;)s=u[h++],hE&&!dE(a,l,s)||(n[s]=l[s]);return n}:kE,CE=EE;An({target:"Object",stat:!0,arity:2,forced:Object.assign!==CE},{assign:CE});var xE=n(te.Object.assign),TE=n(ay),SE=n(Ey),PE=n(Ay),AE=n(Fy),IE=n(Ac),RE=n(tc),OE=n(kc),ME=n(fh),LE=n(Nc),DE=g,NE=Re,FE=ee,UE=Je,HE=Cs,jE=a,BE=Function,zE=DE([].concat),VE=DE([].join),KE={},GE=jE?BE.bind:function(e){var t=NE(this),n=t.prototype,i=HE(arguments,1),r=function(){var n=zE(i,HE(arguments));return this instanceof r?function(e,t,n){if(!UE(KE,t)){for(var i=[],r=0;r<t;r++)i[r]="a["+r+"]";KE[t]=BE("C,a","return new C("+VE(i,",")+")")}return KE[t](e,n)}(t,n.length,n):t.apply(e,n)};return FE(n)&&(r.prototype=n),r},WE=An,YE=h,XE=GE,qE=Qf,$E=nn,ZE=ee,JE=Hr,QE=o,eC=ae("Reflect","construct"),tC=Object.prototype,nC=[].push,iC=QE((function(){function e(){}return!(eC((function(){}),[],e)instanceof e)})),rC=!QE((function(){eC((function(){}))})),oC=iC||rC;WE({target:"Reflect",stat:!0,forced:oC,sham:oC},{construct:function(e,t){qE(e),$E(t);var n=arguments.length<3?e:qE(arguments[2]);if(rC&&!iC)return eC(e,t,n);if(e==n){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 i=[null];return YE(nC,i,t),new(YE(XE,e,i))}var r=n.prototype,o=JE(ZE(r)?r:tC),a=YE(e,o,t);return ZE(a)?a:o}});var aC=te.Reflect.construct,sC=n(aC),lC=n(aC),uC=Je,cC=O,hC=ee,fC=nn,dC=function(e){return void 0!==e&&(uC(e,"value")||uC(e,"writable"))},pC=P,vC=xl;An({target:"Reflect",stat:!0},{get:function e(t,n){var i,r,o=arguments.length<3?t:arguments[2];return fC(t)===o?t[n]:(i=pC.f(t,n))?dC(i)?i.value:void 0===i.get?void 0:cC(i.get,o):hC(r=vC(t))?e(r,n,o):void 0}});var gC=te.Reflect.get,yC=n(gC),mC=n(gC),_C=n(Zy),kC=n(pm),bC=n(Hy);function wC(e,t){var n=hw(e);if(TE){var i=TE(e);t&&(i=jb(i).call(i,(function(t){return SE(e,t).enumerable}))),n.push.apply(n,i)}return n}function EC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wC(Object(n),!0).forEach((function(t){PC(e,t,n[t])})):PE?AE(e,PE(n)):wC(Object(n)).forEach((function(t){IE(e,t,SE(n,t))}))}return e}function CC(e){return(CC="function"==typeof RE&&"symbol"==typeof OE?function(e){return typeof e}:function(e){return e&&"function"==typeof RE&&e.constructor===RE&&e!==RE.prototype?"symbol":typeof e})(e)}function xC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TC(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),IE(e,UC(i.key),i)}}function SC(e,t,n){return t&&TC(e.prototype,t),n&&TC(e,n),IE(e,"prototype",{writable:!1}),e}function PC(e,t,n){return(t=UC(t))in e?IE(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AC(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}}),IE(e,"prototype",{writable:!1}),t&&RC(e,t)}function IC(e){return(IC=ME?LE.bind():function(e){return e.__proto__||LE(e)})(e)}function RC(e,t){return(RC=ME?ME.bind():function(e,t){return e.__proto__=t,e})(e,t)}function OC(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function MC(e,t){if(t&&("object"===wc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return OC(e)}function LC(e){var t=function(){if("undefined"==typeof Reflect||!lC)return!1;if(lC.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(lC(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=IC(e);if(t){var r=IC(this).constructor;n=lC(i,arguments,r)}else n=i.apply(this,arguments);return MC(this,n)}}function DC(){return DC="undefined"!=typeof Reflect&&mC?mC.bind():function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=IC(e)););return e}(e,t);if(i){var r=SE(i,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},DC.apply(this,arguments)}function NC(e){return function(e){if(Array.isArray(e))return FC(e)}(e)||function(e){if(void 0!==RE&&null!=_C(e)||null!=e["@@iterator"])return kC(e)}(e)||function(e,t){var n;if(!e)return;if("string"==typeof e)return FC(e,t);var i=fw(n=Object.prototype.toString.call(e)).call(n,8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return kC(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return FC(e,t)}(e)||function(){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 FC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function UC(e){var t=function(e,t){if("object"!==wc(e)||null===e)return e;var n=e[bC];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==wc(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===wc(t)?t:String(t)}var HC={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function i(){}function r(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,i,o,a){if("function"!=typeof i)throw new TypeError("The listener must be a function");var s=new r(i,o||e,a),l=n?n+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 i:delete e._events[t]}function s(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,i,r=[];if(0===this._eventsCount)return r;for(i in e=this._events)t.call(e,i)&&r.push(n?fw(i).call(i,1):i);return TE?Fm(r).call(r,TE(e)):r},s.prototype.listeners=function(e){var t=n?n+e:e,i=this._events[t];if(!i)return[];if(i.fn)return[i.fn];for(var r=0,o=i.length,a=new Array(o);r<o;r++)a[r]=i[r].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,i=this._events[t];return i?i.fn?1:i.length:0},s.prototype.emit=function(e,t,i,r,o,a){var s=n?n+e:e;if(!this._events[s])return!1;var l,u,c=this._events[s],h=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),h){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,i),!0;case 4:return c.fn.call(c.context,t,i,r),!0;case 5:return c.fn.call(c.context,t,i,r,o),!0;case 6:return c.fn.call(c.context,t,i,r,o,a),!0}for(u=1,l=new Array(h-1);u<h;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var f,d=c.length;for(u=0;u<d;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),h){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,i);break;case 4:c[u].fn.call(c[u].context,t,i,r);break;default:if(!l)for(f=1,l=new Array(h-1);f<h;f++)l[f-1]=arguments[f];c[u].fn.apply(c[u].context,l)}}return!0},s.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,i,r){var o=n?n+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||r&&!s.once||i&&s.context!==i||a(this,o);else{for(var l=0,u=[],c=s.length;l<c;l++)(s[l].fn!==t||r&&!s[l].once||i&&s[l].context!==i)&&u.push(s[l]);u.length?this._events[o]=1===u.length?u[0]:u:a(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new i,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}(HC);var jC=HC.exports,BC=n(jC),zC=Dn,VC=Yi,KC=X,GC=RangeError,WC=function(e){var t=VC(KC(this)),n="",i=zC(e);if(i<0||i==1/0)throw GC("Wrong number of repetitions");for(;i>0;(i>>>=1)&&(t+=t))1&i&&(n+=t);return n},YC=g,XC=Un,qC=Yi,$C=X,ZC=YC(WC),JC=YC("".slice),QC=Math.ceil,ex=function(e){return function(t,n,i){var r,o,a=qC($C(t)),s=XC(n),l=a.length,u=void 0===i?" ":qC(i);return s<=l||""==u?a:((o=ZC(u,QC((r=s-l)/u.length))).length>r&&(o=JC(o,0,r)),e?a+o:o+a)}},tx={start:ex(!1),end:ex(!0)},nx=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(le),ix=tx.start;An({target:"String",proto:!0,forced:nx},{padStart:function(e){return ix(this,e,arguments.length>1?arguments[1]:void 0)}});var rx=Vc("String").padStart,ox=se,ax=rx,sx=String.prototype,lx=n((function(e){var t=e.padStart;return"string"==typeof e||e===sx||ox(sx,e)&&t===sx.padStart?ax:t})),ux=r,cx=o,hx=Yi,fx=Vw.trim,dx=Dw,px=g("".charAt),vx=ux.parseFloat,gx=ux.Symbol,yx=gx&&gx.iterator,mx=1/vx(dx+"-0")!=-1/0||yx&&!cx((function(){vx(Object(yx))}))?function(e){var t=fx(hx(e)),n=vx(t);return 0===n&&"-"==px(t,0)?-0:n}:vx;An({global:!0,forced:parseFloat!=mx},{parseFloat:mx});var _x=n(te.parseFloat),kx=gl.PROPER,bx=o,wx=Dw,Ex=Vw.trim;An({target:"String",proto:!0,forced:function(e){return bx((function(){return!!wx[e]()||"​…᠎"!=="​…᠎"[e]()||kx&&wx[e].name!==e}))}("trim")},{trim:function(){return Ex(this)}});var Cx=Vc("String").trim,xx=se,Tx=Cx,Sx=String.prototype,Px=n((function(e){var t=e.trim;return"string"==typeof e||e===Sx||xx(Sx,e)&&t===Sx.trim?Tx:t})),Ax=qr,Ix=Math.floor,Rx=function(e,t){var n=e.length,i=Ix(n/2);return n<8?Ox(e,t):Mx(e,Rx(Ax(e,0,i),t),Rx(Ax(e,i),t),t)},Ox=function(e,t){for(var n,i,r=e.length,o=1;o<r;){for(i=o,n=e[o];i&&t(e[i-1],n)>0;)e[i]=e[--i];i!==o++&&(e[i]=n)}return e},Mx=function(e,t,n,i){for(var r=t.length,o=n.length,a=0,s=0;a<r||s<o;)e[a+s]=a<r&&s<o?i(t[a],n[s])<=0?t[a++]:n[s++]:a<r?t[a++]:n[s++];return e},Lx=Rx,Dx=le.match(/firefox\/(\d+)/i),Nx=!!Dx&&+Dx[1],Fx=/MSIE|Trident/.test(le),Ux=le.match(/AppleWebKit\/(\d+)\./),Hx=!!Ux&&+Ux[1],jx=An,Bx=g,zx=Re,Vx=qe,Kx=jn,Gx=vw,Wx=Yi,Yx=o,Xx=Lx,qx=Hc,$x=Nx,Zx=Fx,Jx=ve,Qx=Hx,eT=[],tT=Bx(eT.sort),nT=Bx(eT.push),iT=Yx((function(){eT.sort(void 0)})),rT=Yx((function(){eT.sort(null)})),oT=qx("sort"),aT=!Yx((function(){if(Jx)return Jx<70;if(!($x&&$x>3)){if(Zx)return!0;if(Qx)return Qx<603;var e,t,n,i,r="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(i=0;i<47;i++)eT.push({k:t+i,v:n})}for(eT.sort((function(e,t){return t.v-e.v})),i=0;i<eT.length;i++)t=eT[i].k.charAt(0),r.charAt(r.length-1)!==t&&(r+=t);return"DGBEFHACIJK"!==r}}));jx({target:"Array",proto:!0,forced:iT||!rT||!oT||!aT},{sort:function(e){void 0!==e&&zx(e);var t=Vx(this);if(aT)return void 0===e?tT(t):tT(t,e);var n,i,r=[],o=Kx(t);for(i=0;i<o;i++)i in t&&nT(r,t[i]);for(Xx(r,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:Wx(t)>Wx(n)?1:-1}}(e)),n=Kx(r),i=0;i<n;)t[i]=r[i++];for(;i<o;)Gx(t,i++);return t}});var sT,lT=Vc("Array").sort,uT=se,cT=lT,hT=Array.prototype,fT=n((function(e){var t=e.sort;return e===hT||uT(hT,e)&&t===hT.sort?cT:t})),dT="undefined"!=typeof window&&window.location&&cw(sT=window.location.href).call(sT,"xgplayerdebugger=1")>-1,pT="color: #525252; background-color: #90ee90;",vT="color: #525252; background-color: red;",gT="color: #525252; background-color: yellow; ",yT="%c[xgplayer]",mT={config:{debug:dT?3:0},logInfo:function(e){for(var t,n,i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];this.config.debug>=3&&(n=console).log.apply(n,Fm(t=[yT,pT,e]).call(t,r))},logWarn:function(e){for(var t,n,i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];this.config.debug>=1&&(n=console).warn.apply(n,Fm(t=[yT,gT,e]).call(t,r))},logError:function(e){var t,n;if(!(this.config.debug<1)){for(var i=this.config.debug>=2?"trace":"error",r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];(n=console)[i].apply(n,Fm(t=[yT,vT,e]).call(t,o))}}};var _T=function(){function e(t){xC(this,e),this.bufferedList=t}return SC(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}(),kT={};function bT(e){var t=CC(e);return null!==e&&("object"===t||"function"===t)}function wT(e,t,n){var i,r,o,a,s,l,u=0,c=!1,h=!1,f=!0,d=!t&&0!==t&&"function"==typeof window.requestAnimationFrame;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=i,o=r;return i=r=void 0,u=t,a=e.apply(o,n)}function v(e,t){return d?(window.cancelAnimationFrame(s),window.requestAnimationFrame(e)):setTimeout(e,t)}function g(e){var n=e-l;return void 0===l||n>=t||n<0||h&&e-u>=o}function y(){var e=Date.now();if(g(e))return m(e);s=v(y,function(e){var n=e-u,i=t-(e-l);return h?Math.min(i,o-n):i}(e))}function m(e){return s=void 0,f&&i?p(e):(i=r=void 0,a)}function _(){for(var e=Date.now(),n=g(e),o=arguments.length,f=new Array(o),d=0;d<o;d++)f[d]=arguments[d];if(i=f,r=this,l=e,n){if(void 0===s)return function(e){return u=e,s=v(y,t),c?p(e):a}(l);if(h)return s=v(y,t),p(l)}return void 0===s&&(s=v(y,t)),a}return t=+t||0,bT(n)&&(c=!!n.leading,o=(h="maxWait"in n)?Math.max(+n.maxWait||0,t):o,f="trailing"in n?!!n.trailing:f),_.cancel=function(){void 0!==s&&function(e){if(d)return window.cancelAnimationFrame(e);clearTimeout(e)}(s),u=0,i=l=r=s=void 0},_.flush=function(){return void 0===s?a:m(Date.now())},_.pending=function(){return void 0!==s},_}function ET(){var e=(document.documentElement.getAttribute("lang")||navigator.language||"zh-cn").toLocaleLowerCase();return"zh-cn"===e&&(e="zh"),e}kT.createDom=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=document.createElement(e);return r.className=i,r.innerHTML=t,hw(n).forEach((function(t){var i=t,o=n[t];"video"===e||"audio"===e||"live-video"===e?o&&r.setAttribute(i,o):r.setAttribute(i,o)})),r},kT.createDomFromHtml=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";try{var i=document.createElement("div");i.innerHTML=e;var r=i.children;return i=null,r.length>0?(r=r[0],n&&kT.addClass(r,n),t&&hw(t).forEach((function(e){r.setAttribute(e,t[e])})),r):null}catch(o){return mT.logError("util.createDomFromHtml",o),null}},kT.hasClass=function(e,t){if(!e||!t)return!1;try{return Array.prototype.some.call(e.classList,(function(e){return e===t}))}catch(i){var n=e.className&&"object"===CC(e.className)?e.getAttribute("class"):e.className;return n&&!!n.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}},kT.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(n){kT.hasClass(e,t)||(e.className&&"object"===CC(e.className)?e.setAttribute("class",e.getAttribute("class")+" "+t):e.className+=" "+t)}},kT.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(n){kT.hasClass(e,t)&&t.split(/\s+/g).forEach((function(t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className&&"object"===CC(e.className)?e.setAttribute("class",e.getAttribute("class").replace(n," ")):e.className=e.className.replace(n," ")}))}},kT.toggleClass=function(e,t){e&&t.split(/\s+/g).forEach((function(t){kT.hasClass(e,t)?kT.removeClass(e,t):kT.addClass(e,t)}))},kT.classNames=function(){for(var e=arguments,t=[],n=function(n){if("String"===kT.typeOf(e[n]))t.push(e[n]);else if("Object"===kT.typeOf(e[n])){var i;Ub(i=hw(e[n])).call(i,(function(i){e[n][i]&&t.push(i)}))}},i=0;i<arguments.length;i++)n(i);return t.join(" ")},kT.findDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1?arguments[1]:void 0;try{e=t.querySelector(n)}catch(i){mT.logError("util.findDom",i),0===cw(n).call(n,"#")&&(e=t.getElementById(fw(n).call(n,1)))}return e},kT.getCss=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,!1)[t]},kT.padStart=function(e,t,n){for(var i=String(n),r=t>>0,o=Math.ceil(r/i.length),a=[],s=String(e);o--;)a.push(i);return a.join("").substring(0,r-s.length)+s},kT.format=function(e){if(window.isNaN(e))return"";e=Math.round(e);var t=lx(kT).call(kT,Math.floor(e/3600),2,0),n=lx(kT).call(kT,Math.floor((e-3600*t)/60),2,0),i=lx(kT).call(kT,Math.floor(e-3600*t-60*n),2,0);return("00"===t?[n,i]:[t,n,i]).join(":")},kT.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},kT.typeOf=function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},kT.deepCopy=function(e,t){if("Object"===kT.typeOf(t)&&"Object"===kT.typeOf(e))return hw(t).forEach((function(n){if("Object"!==kT.typeOf(t[n])||t[n]instanceof Node)if("Array"===kT.typeOf(t[n])){var i;e[n]="Array"===kT.typeOf(e[n])?Fm(i=e[n]).call(i,t[n]):t[n]}else e[n]=t[n];else void 0===e[n]||void 0===e[n]?e[n]=t[n]:kT.deepCopy(e[n],t[n])})),e},kT.deepMerge=function(e,t){var n;return Ub(n=hw(t)).call(n,(function(n){var i;"Array"===kT.typeOf(t[n])&&"Array"===kT.typeOf(e[n])?"Array"===kT.typeOf(e[n])&&(i=e[n]).push.apply(i,NC(t[n])):kT.typeOf(e[n])!==kT.typeOf(t[n])||null===e[n]||"Object"!==kT.typeOf(e[n])||t[n]instanceof window.Node?null!==t[n]&&(e[n]=t[n]):kT.deepMerge(e[n],t[n])})),e},kT.getBgImage=function(e){var t=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;if(!t||"none"===t)return"";var n=document.createElement("a");return n.href=t.replace(/url\("|"\)/g,""),n.href},kT.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""},kT.setInterval=function(e,t,n,i){e._interval[t]||(e._interval[t]=window.setInterval(n.bind(e),i))},kT.clearInterval=function(e,t){clearInterval(e._interval[t]),e._interval[t]=null},kT.setTimeout=function(e,t,n){e._timers||(e._timers=[]);var i=setTimeout((function(){t(),kT.clearTimeout(e,i)}),n);return e._timers.push(i),i},kT.clearTimeout=function(e,t){var n=e._timers;if("Array"===kT.typeOf(n)){for(var i=0;i<n.length;i++)if(n[i]===t){Mw(n).call(n,i,1),clearTimeout(t);break}}else clearTimeout(t)},kT.clearAllTimers=function(e){var t=e._timers;"Array"===kT.typeOf(t)&&(Ub(t).call(t,(function(e){clearTimeout(e)})),e._timerIds=[])},kT.createImgBtn=function(e,t,n,i){var r,o,a,s,l,u,c,h,f,d,p,v=kT.createDom("xg-".concat(e),"",{},"xgplayer-".concat(e,"-img"));(v.style.backgroundImage='url("'.concat(t,'")'),n&&i)&&(["px","rem","em","pt","dp","vw","vh","vm","%"].every((function(e){var t,r;return!(cw(n).call(n,e)>-1&&cw(i).call(i,e)>-1)||(u=_x(Px(t=fw(n).call(n,0,cw(n).call(n,e))).call(t)),c=_x(Px(r=fw(i).call(i,0,cw(i).call(i,e))).call(r)),h=e,!1)})),v.style.width=Fm(r="".concat(u)).call(r,h),v.style.height=Fm(o="".concat(c)).call(o,h),v.style.backgroundSize=Fm(a=Fm(s=Fm(l="".concat(u)).call(l,h," ")).call(s,c)).call(a,h),v.style.margin="start"===e?Fm(f=Fm(d=Fm(p="-".concat(c/2)).call(p,h," auto auto -")).call(d,u/2)).call(f,h):"auto 5px auto 5px");return v},kT.Hex2RGBA=function(e,t){var n,i=[];if(/^\#[0-9A-F]{3}$/i.test(e)){var r="#";e.replace(/[0-9A-F]/gi,(function(e){r+=e+e})),e=r}return/^#[0-9A-F]{6}$/i.test(e)?(e.replace(/[0-9A-F]{2}/gi,(function(e){i.push(nE(e,16))})),Fm(n="rgba(".concat(i.join(","),", ")).call(n,t,")")):"rgba(255, 255, 255, 0.1)"},kT.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},kT.checkIsFunction=function(e){return e&&"function"==typeof e},kT.checkIsObject=function(e){return null!==e&&"object"===CC(e)},kT.hide=function(e){e.style.display="none"},kT.show=function(e,t){e.style.display=t||"block"},kT.isUndefined=function(e){if(null==e)return!0},kT.isNotNull=function(e){return!(null==e)},kT.setStyleFromCsstext=function(e,t){if(t)if("String"===kT.typeOf(t)){var n=t.replace(/\s+/g,"").split(";");Ub(n).call(n,(function(t){if(t){var n=t.split(":");n.length>1&&(e.style[n[0]]=n[1])}}))}else{var i;Ub(i=hw(t)).call(i,(function(n){e.style[n]=t[n]}))}},kT.filterStyleFromText=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["width","height","top","left","bottom","right","position","z-index","padding","margin","transform"],i=e.style.cssText;if(!i)return{};var r=i.replace(/\s+/g,"").split(";"),o={},a={};return Ub(r).call(r,(function(e){if(e){var t=e.split(":");t.length>1&&(!function(e,t){for(var n=0,i=t.length;n<i;n++)if(cw(e).call(e,t[n])>-1)return!0;return!1}(t[0],n)?a[t[0]]=t[1]:o[t[0]]=t[1])}})),e.setAttribute("style",""),Ub(t=hw(a)).call(t,(function(t){e.style[t]=a[t]})),o},kT.getStyleFromCsstext=function(e){var t=e.style.cssText;if(!t)return{};var n=t.replace(/\s+/g,"").split(";"),i={};return Ub(n).call(n,(function(e){if(e){var t=e.split(":");t.length>1&&(i[t[0]]=t[1])}})),i},kT.preloadImg=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(e){var i=new window.Image;i.onload=function(e){i=null,t&&t(e)},i.onerror=function(e){i=null,n&&n(e)},i.src=e}},kT.stopPropagation=function(e){e&&e.stopPropagation()},kT.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},kT.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},kT.checkTouchSupport=function(){return"ontouchstart"in window},kT.getBuffered2=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,n=[],i=0;i<e.length;i++)n.push({start:e.start(i)<.5?0:e.start(i),end:e.end(i)});fT(n).call(n,(function(e,t){var n=e.start-t.start;return n||t.end-e.end}));var r=[];if(t)for(var o=0;o<n.length;o++){var a=r.length;if(a){var s=r[a-1].end;n[o].start-s<t?n[o].end>s&&(r[a-1].end=n[o].end):r.push(n[o])}else r.push(n[o])}else r=n;return new _T(r)},kT.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}},kT.requestAnimationFrame=function(e){var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(t)return t(e)},kT.getHostFromUrl=function(e){if("String"!==kT.typeOf(e))return"";var t=e.split("/"),n="";return t.length>3&&t[2]&&(n=t[2]),n},kT.cancelAnimationFrame=function(e){var t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;t&&t(e)},kT.isMSE=function(e){return e.media&&(e=e.media),!!(e&&e instanceof HTMLMediaElement)&&(/^blob/.test(e.currentSrc)||/^blob/.test(e.src))},kT.isBlob=function(e){return"string"==typeof e&&/^blob/.test(e)},kT.generateSessionId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(new Date).getTime();try{e=nE(e)}catch(n){e=0}return t+=e,window.performance&&"function"==typeof window.performance.now&&(t+=nE(window.performance.now())),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?n:3&n|8).toString(16)}))},kT.createEvent=function(e){var t;return"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},kT.adjustTimeByDuration=function(e,t,n){return t&&e&&(e>t||n&&e<t)?t:e},kT.createPositionBar=function(e,t){var n=kT.createDom("xg-bar","",{"data-index":-1},e);return t.appendChild(n),n},kT.getTransformStyle=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0,scale:1,rotate:0},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i={scale:"".concat(t.scale||1),translate:Fm(e="".concat(t.x||0,"%, ")).call(e,t.y||0,"%"),rotate:"".concat(t.rotate||0,"deg")};return hw(i).forEach((function(e){var t,r=new RegExp("".concat(e,"\\([^\\(]+\\)"),"g"),o=Fm(t="".concat(e,"(")).call(t,i[e],")");r.test(n)?(r.lastIndex=-1,n=n.replace(r,o)):n+="".concat(o," ")})),n},kT.convertDeg=function(e){return Math.abs(e)<=1?360*e:e%360},kT.getIndexByTime=function(e,t){var n=t.length,i=-1;if(n<1)return i;if(e<=t[0].end||n<2)i=0;else if(e>t[n-1].end)i=n-1;else for(var r=1;r<n;r++)if(e>t[r-1].end&&e<=t[r].end){i=r;break}return i},kT.getOffsetCurrentTime=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,i=-1;if((i=n>=0&&n<t.length?n:kT.getIndexByTime(e,t))<0)return-1;var r=t.length,o=t[i],a=o.start,s=o.end,l=o.cTime,u=o.offset;return e<a?l:e>=a&&e<=s?e-u:e>s&&i>=r-1?s:-1},kT.getCurrentTimeByOffset=function(e,t){var n=-1;if(!t||t.length<0)return e;for(var i=0;i<t.length;i++)if(e<=t[i].duration){n=i;break}if(-1!==n){var r=t[n].start;return n-1<0?r+e:r+(e-t[n-1].duration)}return e};var CT=/(Android)\s([\d.]+)/,xT=/(Version)\/([\d.]+)/,TT=["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"],ST={get device(){return ST.os.isPc?"pc":"mobile"},get browser(){var e,t;if("undefined"==typeof navigator)return"";var n=navigator.userAgent.toLowerCase(),i={ie:/rv:([\d.]+)\) like gecko/,firefox:/firefox\/([\d.]+)/,chrome:/chrome\/([\d.]+)/,opera:/opera.([\d.]+)/,safari:/version\/([\d.]+).*safari/};return Fm(e=[]).call(e,jb(t=hw(i)).call(t,(function(e){return i[e].test(n)})))[0]},get os(){if("undefined"==typeof navigator)return{};var e=navigator.userAgent,t=/(?:Windows Phone)/.test(e),n=/(?:SymbianOS)/.test(e)||t,i=/(?:Android)/.test(e),r=/(?:Firefox)/.test(e),o=/(?:iPad|PlayBook)/.test(e)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,a=o||i&&!/(?:Mobile)/.test(e)||r&&/(?:Tablet)/.test(e),s=/(?:iPhone)/.test(e)&&!a;return{isTablet:a,isPhone:s,isIpad:o,isIos:s||o,isAndroid:i,isPc:!(s||i||n||a),isSymbian:n,isWindowsPhone:t,isFireFox:r}},get osVersion(){if("undefined"==typeof navigator)return 0;var e=navigator.userAgent,t="",n=(t=/(?:iPhone)|(?:iPad|PlayBook)/.test(e)?xT:CT)?t.exec(e):[];if(n&&n.length>=3){var i=n[2].split(".");return i.length>0?nE(i[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&&Ub(TT).call(TT,(function(n){"probably"===t.canPlayType('video/mp4; codecs="'.concat(n,'"'))&&(e.isSupport=!0,e.mime+="||".concat(n))})),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(HN){return this._logger.error(e,HN),!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 Hb.resolve(t);if(navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo)return navigator.mediaCapabilities.decodingInfo(e);var n=e.video||{},i=e.audio||{};try{var r=MediaSource.isTypeSupported(n.contentType),o=MediaSource.isTypeSupported(i.contentType);return Hb.resolve({supported:r&&o,smooth:!1,powerEfficient:!1})}catch(a){return Hb.resolve(t)}}},PT="3.0.21-rc.5",AT={1:"media",2:"media",3:"media",4:"media",5:"media",6:"media"},IT={1:5101,2:5102,3:5103,4:5104,5:5105,6:5106},RT=SC((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{errorType:"",errorCode:0,errorMessage:"",originError:"",ext:{},mediaError:null};xC(this,e);var i=t&&t.i18n?t.i18n.ERROR_TYPES:null;if(t.media){var r,o=n.mediaError?n.mediaError:t.media.error||{},a=t.duration,s=t.currentTime,l=t.ended,u=t.src,c=t.currentSrc,h=t.media,f=h.readyState,d=h.networkState,p=n.errorCode||o.code;IT[p]&&(p=IT[p]);var v={playerVersion:PT,currentTime:s,duration:a,ended:l,readyState:f,networkState:d,src:u||c,errorType:n.errorType,errorCode:p,message:n.errorMessage||o.message,mediaError:o,originError:n.originError?n.originError.stack:"",host:kT.getHostFromUrl(u||c)};return n.ext&&Ub(r=hw(n.ext)).call(r,(function(e){v[e]=n.ext[e]})),v}if(arguments.length>1){for(var g={playerVersion:PT,domain:document.domain},y=["errorType","currentTime","duration","networkState","readyState","src","currentSrc","ended","errd","errorCode","mediaError"],m=0;m<arguments.length;m++)g[y[m]]=arguments[m];return g.ex=i?(i[arguments[0]]||{}).msg:"",g}})),OT="play",MT="ended",LT="pause",DT="error",NT="seeked",FT="timeupdate",UT="waiting",HT="canplay",jT="durationchange",BT="volumechange",zT="loadeddata",VT="emptied",KT="focus",GT="blur",WT="ready",YT="urlNull",XT="autoplay_started",qT="autoplay_was_prevented",$T="complete",ZT="replay",JT="destroy",QT="urlchange",eS="download_speed_change",tS="leaveplayer",nS="enterplayer",iS="loading",rS="fullscreen_change",oS="cssFullscreen_change",aS="mini_state_change",sS="definition_change",lS="before_definition_change",uS="after_definition_change",cS="retry",hS="video_resize",fS="pip_change",dS="playnext",pS="shortcut",vS="user_action",gS="reset",yS="source_error",mS="source_success",_S=["play","playing","ended","pause","error","seeking","seeked","timeupdate","waiting","canplay","canplaythrough","durationchange","volumechange","loadeddata","loadedmetadata","ratechange","progress","loadstart","emptied","stalled","suspend","abort","lowdecode"],kS=Object.freeze({__proto__:null,ABORT:"abort",AFTER_DEFINITION_CHANGE:uS,AUTOPLAY_PREVENTED:qT,AUTOPLAY_STARTED:XT,BEFORE_DEFINITION_CHANGE:lS,BUFFER_CHANGE:"bufferedChange",CANPLAY:HT,CANPLAY_THROUGH:"canplaythrough",COMPLETE:$T,CSS_FULLSCREEN_CHANGE:oS,DEFINITION_CHANGE:sS,DESTROY:JT,DOWNLOAD_SPEED_CHANGE:eS,DURATION_CHANGE:jT,EMPTIED:VT,ENDED:MT,ENTER_PLAYER:nS,ERROR:DT,FPS_STUCK:"fps_stuck",FULLSCREEN_CHANGE:rS,LEAVE_PLAYER:tS,LOADED_DATA:zT,LOADED_METADATA:"loadedmetadata",LOADING:iS,LOAD_START:"loadstart",MINI_STATE_CHANGE:aS,PAUSE:LT,PIP_CHANGE:fS,PLAY:OT,PLAYER_BLUR:GT,PLAYER_FOCUS:KT,PLAYING:"playing",PLAYNEXT:dS,PROGRESS:"progress",RATE_CHANGE:"ratechange",READY:WT,REPLAY:ZT,RESET:gS,RETRY:cS,ROTATE:"rotate",SCREEN_SHOT:"screenShot",SEEKED:NT,SEEKING:"seeking",SEI_PARSED:"SEI_PARSED",SHORTCUT:pS,SOURCE_ERROR:yS,SOURCE_SUCCESS:mS,STALLED:"stalled",STATS_EVENTS:{STATS_INFO:"stats_info",STATS_DOWNLOAD:"stats_download",STATS_RESET:"stats_reset"},SUSPEND:"suspend",SWITCH_SUBTITLE:"switch_subtitle",TIME_UPDATE:FT,URL_CHANGE:QT,URL_NULL:YT,USER_ACTION:vS,VIDEO_EVENTS:_S,VIDEO_RESIZE:hS,VOLUME_CHANGE:BT,WAITING:UT,XGLOG:"xglog"});function bS(e,t){this&&this.emit&&("error"===e?this.errorHandler(e,t.error):this.emit(e,t))}var wS=function(e){AC(n,e);var t=LC(n);function n(e){var i;xC(this,n),(i=t.call(this,e))._hasStart=!1,i._currentTime=0,i._duration=0,i._internalOp={},i._lastMuted=!1,i.vtype="MP4",i._rate=-1,i.mediaConfig=xE({},{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 r=e["x5-video-player-type"]||e.x5VideoPlayerType;return ST.isWeixin&&ST.os.isAndroid&&r&&(i.mediaConfig["x5-video-player-type"]=r,delete i.mediaConfig.playsinline,delete i.mediaConfig["webkit-playsinline"],delete i.mediaConfig["x5-playsinline"]),e.loop&&(i.mediaConfig.loop="loop"),e.autoplayMuted&&!Object.prototype.hasOwnProperty.call(i.mediaConfig,"muted")&&(i.mediaConfig.muted=!0),i.media=kT.createDom(i.mediaConfig.mediaType,"",i.mediaConfig,""),e.defaultPlaybackRate&&(i.media.defaultPlaybackRate=i.media.playbackRate=e.defaultPlaybackRate),"Number"===kT.typeOf(e.volume)&&(i.volume=e.volume),e.autoplayMuted&&(i.media.muted=!0,i._lastMuted=!0),e.autoplay&&(i.media.autoplay=!0),i._interval={},i.mediaEventMiddleware={},i.attachVideoEvents(),i}return SC(n,[{key:"setEventsMiddleware",value:function(e){var t,n=this;Ub(t=hw(e)).call(t,(function(t){n.mediaEventMiddleware[t]=e[t]}))}},{key:"removeEventsMiddleware",value:function(e){var t,n=this;Ub(t=hw(e)).call(t,(function(e){delete n.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=Ub(_S).call(_S,(function(t){var n,i=Fm(n="on".concat(t.charAt(0).toUpperCase())).call(n,fw(t).call(t,1));return"function"==typeof e[i]&&e.on(t,e[i]),PC({},t,function(e,t){return function(n,i){var r={player:t,eventName:e,originalEvent:n,detail:n.detail||{},timeStamp:n.timeStamp,currentTime:t.currentTime,duration:t.duration,paused:t.paused,ended:t.ended,isInternalOp:!!t._internalOp[n.type],muted:t.muted,volume:t.volume,host:kT.getHostFromUrl(t.currentSrc),vtype:t.vtype};if(t.removeInnerOP(n.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&&(r.isMutedChange=t._lastMuted!==t.muted,t._lastMuted=t.muted),"error"===e&&(r.error=i||t.video.error),t.mediaEventMiddleware[e]){var a=bS.bind(t,e,r);try{t.mediaEventMiddleware[e].call(t,r,a)}catch(s){throw bS.call(t,e,r),s}}else bS.call(t,e,r)}}(t,e))}))),this._evHandlers.forEach((function(e){var n=hw(e)[0];t.addEventListener(n,e[n],!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 n=hw(e)[0];t.removeEventListener(n,e[n],!1)})),this._evHandlers.forEach((function(t){var n,i=hw(t)[0],r=Fm(n="on".concat(i.charAt(0).toUpperCase())).call(n,fw(i).call(i,1));"function"==typeof e[r]&&e.off(i,e[r])})),this._evHandlers=null}},{key:"_attachSourceEvents",value:function(e,t){var n=this;e.removeAttribute("src"),e.load(),t.forEach((function(e,t){n.media.appendChild(kT.createDom("source","",{src:"".concat(e.src),type:"".concat(e.type||""),"data-index":t+1}))}));var i=e.children;if(i){this._videoSourceCount=i.length,this._videoSourceIndex=i.length,this._vLoadeddata=function(e){n.emit(mS,{src:e.target.currentSrc,host:kT.getHostFromUrl(e.target.currentSrc)})};for(var r=null,o=0;o<this._evHandlers.length;o++)if("error"===hw(this._evHandlers[o])[0]){r=this._evHandlers[o];break}!this._sourceError&&(this._sourceError=function(e){var t=nE(e.target.getAttribute("data-index"),10);if(n._videoSourceIndex--,0===n._videoSourceIndex||t>=n._videoSourceCount){var i={code:4,message:"sources_load_error"};r?r.error(e,i):n.errorHandler("error",i)}var o=AT[4];n.emit(yS,new RT(n,{errorType:o,errorCode:4,errorMessage:"sources_load_error",mediaError:{code:4,message:"sources_load_error"},src:e.target.src}))});for(var a=0;a<i.length;a++)i[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 n=0;n<t.length;n++)t[n].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 n=this.media.error||t,i=n.code?AT[n.code]:"other";n.message;this.media.currentSrc||this.media.srcObject||(n={code:6,message:"empty_src"}),this.emit(e,new RT(this,{errorType:i,errorCode:n.code,errorMessage:n.message||"",mediaError:n}))}}},{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 n=this.media.currentTime;if(e)for(var i=0,r=e.length;i<r&&(t[0]=e.start(i),t[1]=e.end(i),!(t[0]<=n&&n<=t[1]));i++);return t[0]-n<=0&&n-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?kT.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 n=0;n<t.length;n++)if((t.start(n)<=this.currentTime||t.start(n)<.1)&&t.end(n)>=this.currentTime)return{start:t.start(n),end:t.end(n)};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(QT,e),this.emit(UT),this._currentTime=0,this._duration=0,kT.isMSE(this.media)?this.onWaiting():(this._detachSourceEvents(this.media),"Array"===kT.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 i,r,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(r=DC(IC(n.prototype),"emit",this)).call.apply(r,Fm(i=[this,e,t]).call(i,a))}},{key:"on",value:function(e,t){for(var i,r,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(r=DC(IC(n.prototype),"on",this)).call.apply(r,Fm(i=[this,e,t]).call(i,a))}},{key:"once",value:function(e,t){for(var i,r,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(r=DC(IC(n.prototype),"once",this)).call.apply(r,Fm(i=[this,e,t]).call(i,a))}},{key:"off",value:function(e,t){for(var i,r,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(r=DC(IC(n.prototype),"off",this)).call.apply(r,Fm(i=[this,e,t]).call(i,a))}},{key:"offAll",value:function(){DC(IC(n.prototype),"removeAllListeners",this).call(this)}}]),n}(BC),ES=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"}};xC(this,e),this.indexedDB=window.indexedDB||window.webkitindexedDB,this.IDBKeyRange=window.IDBKeyRange||window.webkitIDBKeyRange,this.myDB=t}return SC(e,[{key:"openDB",value:function(e){var t=this,n=this,i=this.myDB.version||1,r=n.indexedDB.open(n.myDB.name,i);r.onerror=function(e){},r.onsuccess=function(i){t.myDB.db=i.target.result,e.call(n)},r.onupgradeneeded=function(e){var t=e.target.result;e.target.transaction,t.objectStoreNames.contains(n.myDB.ojstore.name)||t.createObjectStore(n.myDB.ojstore.name,{keyPath:n.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 n,i=this.myDB.db.transaction(e,"readwrite").objectStore(e),r=0;r<t.length;r++)(n=i.add(t[r])).onerror=function(){},n.onsuccess=function(){}}},{key:"putData",value:function(e,t){for(var n,i=this.myDB.db.transaction(e,"readwrite").objectStore(e),r=0;r<t.length;r++)(n=i.put(t[r])).onerror=function(){},n.onsuccess=function(){}}},{key:"getDataByKey",value:function(e,t,n){var i=this,r=this.myDB.db.transaction(e,"readwrite").objectStore(e).get(t);r.onerror=function(){n.call(i,null)},r.onsuccess=function(e){var t=e.target.result;n.call(i,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}(),CS=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],xS=["requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen"],TS=["exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen"],SS="data-xgplayerid";function PS(e,t,n){for(var i,r=arguments.length,o=new Array(r>3?r-3:0),a=3;a<r;a++)o[a-3]=arguments[a];var s,l=t.call.apply(t,Fm(i=[e]).call(i,o));n&&"function"==typeof n&&(l&&l.then?l.then((function(){for(var t,i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];n.call.apply(n,Fm(t=[e]).call(t,r))})):n.call.apply(n,Fm(s=[e]).call(s,o)))}function AS(e,t){var n=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 i,r=arguments,o=this;if(n.pre)try{var a,s;(s=n.pre).call.apply(s,Fm(a=[this]).call(a,fw(Array.prototype).call(arguments)))}catch(v){var l,u;throw v.message=Fm(l=Fm(u="[pluginName: ".concat(this.pluginName,":")).call(u,e,":pre error] >> ")).call(l,v.message),v}if(this.__hooks&&this.__hooks[e])try{var c,h=FS(this,e,t);if(h)if(h.then)h.then((function(e){var i;!1!==e&&PS.apply(void 0,Fm(i=[o,t,n.next]).call(i,NC(r)))})).catch((function(e){throw e}));else PS.apply(void 0,Fm(c=[this,t,n.next]).call(c,fw(Array.prototype).call(arguments)));else if(void 0===h){var f;PS.apply(void 0,Fm(f=[this,t,n.next]).call(f,fw(Array.prototype).call(arguments)))}}catch(v){var d,p;throw v.message=Fm(d=Fm(p="[pluginName: ".concat(this.pluginName,":")).call(p,e,"] >> ")).call(d,v.message),v}else PS.apply(void 0,Fm(i=[this,t,n.next]).call(i,fw(Array.prototype).call(arguments)))}.bind(this)}function IS(e,t){var n=this.__hooks;if(!n||!Array.isArray(n[e]))return-1;for(var i=n[e],r=0;r<i.length;r++)if(i[r]===t)return r;return-1}function RS(e,t){var n=this.__hooks;if(n)return n.hasOwnProperty(e)?(Array.isArray(n[e])||(n[e]=[]),-1===IS.call(this,e,t)&&n[e].push(t),!0):(console.warn("has no supported hook which name [".concat(e,"]")),!1)}function OS(e,t){var n=this.__hooks;if(n){if(Array.isArray(n[e])){var i=n[e],r=IS.call(this,e,t);-1!==r&&Mw(i).call(i,r,1)}delete n[e]}}function MS(e){if(this.plugins&&this.plugins[e.toLowerCase()]){for(var t=this.plugins[e.toLowerCase()],n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return t.useHooks&&t.useHooks.apply(t,i)}}function LS(e){if(this.plugins&&this.plugins[e.toLowerCase()]){var t=this.plugins[e.toLowerCase()];if(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return t.removeHooks&&t.removeHooks.apply(t,i)}}}function DS(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.__hooks={},t&&Ub(t).call(t,(function(t){e.__hooks[t]=null})),IE(e,"hooks",{get:function(){var t;return e.__hooks&&Ub(t=hw(e.__hooks)).call(t,(function(t){if(e.__hooks[t])return t}))}})}function NS(e){e.__hooks=null}function FS(e,t,n){for(var i=arguments.length,r=new Array(i>3?i-3:0),o=3;o<i;o++)r[o-3]=arguments[o];if(e.__hooks&&Array.isArray(e.__hooks[t])){var a,s=e.__hooks[t],l=-1;return function e(t,n,i){for(var r,o,a=arguments.length,u=new Array(a>3?a-3:0),c=3;c<a;c++)u[c-3]=arguments[c];if(l++,0===s.length||l===s.length)return i.call.apply(i,Fm(o=[t,t]).call(o,u));var h,f=s[l],d=f.call.apply(f,Fm(r=[t,t]).call(r,u));return d&&d.then?d.then((function(r){var o;return!1===r?null:e.apply(void 0,Fm(o=[t,n,i]).call(o,u))})).catch((function(e){console.warn("[runHooks]".concat(n," reject"),e.message)})):!1!==d?e.apply(void 0,Fm(h=[t,n,i]).call(h,u)):void 0}.apply(void 0,Fm(a=[e,t,n]).call(a,r))}var u;return n.call.apply(n,Fm(u=[e,e]).call(u,r))}function US(e,t){var n;mT.logError(Fm(n="[".concat(e,"] event or callback cant be undefined or null when call ")).call(n,t))}var HS=function(){function e(t){xC(this,e),kT.checkIsFunction(this.beforeCreate)&&this.beforeCreate(t),DS(this),this.__args=t,this.__events={},this.__onceEvents={},this.config=t.config||{},this.player=null,this.playerConfig={},this.pluginName="",this.__init(t)}return SC(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=kT.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 n=this;e&&t&&this.player?"string"==typeof e?(this.__events[e]=t,this.player.on(e,t)):Array.isArray(e)&&e.forEach((function(e){n.__events[e]=t,n.player.on(e,t)})):US(this.pluginName,"plugin.on(event, callback)")}},{key:"once",value:function(e,t){var n=this;e&&t&&this.player?"string"==typeof e?(this.__onceEvents[e]=t,this.player.once(e,t)):Array.isArray(e)&&e.forEach((function(i){n.__onceEvents[i]=t,n.player.once(e,t)})):US(this.pluginName,"plugin.once(event, callback)")}},{key:"off",value:function(e,t){var n=this;e&&t&&this.player?"string"==typeof e?(delete this.__events[e],this.player.off(e,t)):Array.isArray(e)&&e.forEach((function(i){delete n.__events[e],n.player.off(i,t)})):US(this.pluginName,"plugin.off(event, callback)")}},{key:"offAll",value:function(){var e=this;["__events","__onceEvents"].forEach((function(t){hw(e[t]).forEach((function(n){e[t][n]&&e.off(n,e[t][n]),n&&delete e[t][n]}))})),this.__events={},this.__onceEvents={}}},{key:"emit",value:function(e){var t,n;if(this.player){for(var i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];(n=this.player).emit.apply(n,Fm(t=[e]).call(t,r))}}},{key:"emitUserAction",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.player){var i=EC(EC({},n),{},{pluginName:this.pluginName});this.player.emitUserAction(e,t,i)}}},{key:"hook",value:function(e,t){var n;return AS.call.apply(AS,Fm(n=[this]).call(n,fw(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){for(var n,i=arguments.length,r=new Array(i>2?i-2:0),o=2;o<i;o++)r[o-2]=arguments[o];return RS.call.apply(RS,Fm(n=[this]).call(n,fw(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){for(var n,i=arguments.length,r=new Array(i>2?i-2:0),o=2;o<i;o++)r[o-2]=arguments[o];return OS.call.apply(OS,Fm(n=[this]).call(n,fw(Array.prototype).call(arguments)))}},{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]:"";if(this.player)return n&&(t.pluginName=n),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,n=this.player,i=this.pluginName;this.offAll(),kT.clearAllTimers(this),kT.checkIsFunction(this.destroy)&&this.destroy(),Ub(e=["player","playerConfig","pluginName","logger","__args","__hooks"]).call(e,(function(e){t[e]=null})),n.unRegisterPlugin(i),NS(this)}}],[{key:"defineGetterOrSetter",value:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&IE(e,n,t[n])}},{key:"defineMethod",value:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&"function"==typeof t[n]&&IE(e,n,{configurable:!0,value:t[n]})}},{key:"defaultConfig",get:function(){return{}}},{key:"pluginName",get:function(){return"pluginName"}}]),e}();if("undefined"!=typeof Element&&!Element.prototype.matches){var jS=Element.prototype;jS.matches=jS.matchesSelector||jS.mozMatchesSelector||jS.msMatchesSelector||jS.oMatchesSelector||jS.webkitMatchesSelector}var BS=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}};function zS(e,t,n,i,r){var o=VS.apply(this,arguments);return e.addEventListener(n,o,r),{destroy:function(){e.removeEventListener(n,o,r)}}}function VS(e,t,n,i){return function(n){n.delegateTarget=BS(n.target,t),n.delegateTarget&&i.call(e,n)}}var KS=function(e,t,n,i,r){return"function"==typeof e.addEventListener?zS.apply(null,arguments):"function"==typeof n?zS.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Ub(Array.prototype).call(e,(function(e){return zS(e,t,n,i,r)})))},GS=n(KS),WS={CONTROLS:"controls",ROOT:"root"},YS={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"},XS="xg-icon-disable";function qS(e){return!!e&&(cw(e)&&/^(?:http|data:|\/)/.test(e))}function $S(e,t){var n,i,r=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 kT.addClass(e,r),Ub(i=hw(o)).call(i,(function(t){e.setAttribute(t,o[t])})),e;if(qS(e)||qS(e.url))return o.src=qS(e)?e:e.url||"",s=kT.createDom(e.tag||"img","",o,"xg-img ".concat(r));if("function"==typeof e)try{var l,u;return(s=e())instanceof window.Element?(kT.addClass(s,r),Ub(l=hw(o)).call(l,(function(e){s.setAttribute(e,o[e])})),s):(mT.logWarn(Fm(u="warn>>icons.".concat(t," in config of plugin named [")).call(u,a,"] is a function mast return an Element Object")),null)}catch(c){return mT.logError("Plugin named [".concat(a,"]:createIcon"),c),null}return"string"==typeof e?kT.createDomFromHtml(e,o,r):(mT.logWarn(Fm(n="warn>>icons.".concat(t," in config of plugin named [")).call(n,a,"] is invalid")),null)}function ZS(e,t){var n,i=t.config.icons||t.playerConfig.icons;Ub(n=hw(e)).call(n,(function(n){var r=e[n],o=r&&r.class?r.class:"",a=r&&r.attr?r.attr:{},s=null;i&&i[n]&&(o=function(e,t){var n;return"object"===CC(e)&&e.class&&"string"==typeof e.class?Fm(n="".concat(t," ")).call(n,e.class):t}(i[n],o),a=function(e,t){var n;return"object"===CC(e)&&e.attr&&"object"===CC(e.attr)&&Ub(n=hw(e.attr)).call(n,(function(n){t[n]=e.attr[n]})),t}(i[n],a),s=$S(i[n],n,o,a,t.pluginName)),!s&&r&&(s=$S(r.icon?r.icon:r,a,o,{},t.pluginName)),t.icons[n]=s}))}var JS=function(e){AC(n,e);var t=LC(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return xC(this,n),(e=t.call(this,i)).__delegates=[],e}return SC(n,[{key:"__init",value:function(e){if(DC(IC(n.prototype),"__init",this).call(this,e),e.root){var t=e.root,i=null;this.icons={},this.root=null,this.parent=null,ZS(this.registerIcons()||{},this),this.langText={};var r,o,a,s=this.registerLanguageTexts()||{};o=this,Ub(a=hw(r=s)).call(a,(function(e){IE(o.langText,e,{get:function(){var t=o.lang,n=o.i18n;return n[e]?n[e]:r[e]&&r[e][t]||""}})}));var l="";try{l=this.render()}catch(f){var u;throw mT.logError("Plugin:".concat(this.pluginName,":render"),f),new Error(Fm(u="Plugin:".concat(this.pluginName,":render:")).call(u,f.message))}if(l)(i=n.insert(l,t,e.index)).setAttribute("data-index",e.index);else{if(!e.tag)return;(i=kT.createDom(e.tag,"",e.attr,e.name)).setAttribute("data-index",e.index),t.appendChild(i)}this.root=i,this.parent=t;var c=this.config.attr||{},h=this.config.style||{};this.setAttr(c),this.setStyle(h),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,n=this.children();if(n&&"object"===CC(n))if(hw(n).length>0)Ub(t=hw(n)).call(t,(function(t){var i,r,o=t,a=n[o],s={root:e.root};"function"==typeof a?(i=e.config[o]||{},r=a):"object"===CC(a)&&"function"==typeof a.plugin&&(i=a.options?kT.deepCopy(e.config[o]||{},a.options):e.config[o]||{},r=a.plugin),s.config=i,void 0!==i.index&&(s.index=i.index),i.root&&(s.root=i.root),e.registerPlugin(r,s,o)}))}}},{key:"updateLang",value:function(e){e||(e=this.lang);var t=this.root,n=this.i18n,i=this.langText;t&&function e(t,n){for(var i=0;i<t.children.length;i++)t.children[i].children.length>0?e(t.children[i],n):n(t.children[i])}(t,(function(t){var r=t.getAttribute&&t.getAttribute("lang-key");if(r){var o=n[r.toUpperCase()]||i[r];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]:"",n=this.i18n||{},i=this.langText;e.setAttribute&&e.setAttribute("lang-key",t);var r=n[t]||i[t]||"";r&&(e.innerHTML=r)}},{key:"plugins",value:function(){return this._children}},{key:"disable",value:function(){this.config.disable=!0,kT.addClass(Wm(this).call(this,".xgplayer-icon"),XS)}},{key:"enable",value:function(){this.config.disable=!1,kT.removeClass(Wm(this).call(this,".xgplayer-icon"),XS)}},{key:"children",value:function(){return{}}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";t.root=t.root||this.root;var r=DC(IC(n.prototype),"registerPlugin",this).call(this,e,t,i);return this._children.push(r),r}},{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,i){var r=this;if(arguments.length<3&&"function"==typeof t)Array.isArray(e)?e.forEach((function(e){r.bindEL(e,t)})):this.bindEL(e,t);else{var o,a=n.delegate.call(this,this.root,e,t,i);this.__delegates=Fm(o=this.__delegates).call(o,a)}}},{key:"unbind",value:function(e,t){var n=this;if(arguments.length<3&&"function"==typeof t)Array.isArray(e)?e.forEach((function(e){n.unbindEL(e,t)})):this.unbindEL(e,t);else for(var i,r=Fm(i="".concat(e,"_")).call(i,t),o=0;o<this.__delegates.length;o++)if(this.__delegates[o].key===r){var a;this.__delegates[o].destroy(),Mw(a=this.__delegates).call(a,o,1);break}}},{key:"setStyle",value:function(e,t){var n,i=this;if(this.root)return"String"===kT.typeOf(e)?this.root.style[e]=t:void("Object"===kT.typeOf(e)&&Ub(n=hw(e)).call(n,(function(t){i.root.style[t]=e[t]})))}},{key:"setAttr",value:function(e,t){var n,i=this;if(this.root)return"String"===kT.typeOf(e)?this.root.setAttribute(e,t):void("Object"===kT.typeOf(e)&&Ub(n=hw(e)).call(n,(function(t){i.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 n=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,n)}},{key:"unbindEL",value:function(e,t){var n=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,n)}},{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?Wm(this).call(this,e).appendChild(t):e.appendChild(t)}catch(n){return mT.logError("Plugin:appendChild",n),null}}},{key:"render",value:function(){return""}},{key:"destroy",value:function(){}},{key:"__destroy",value:function(){var e,t,i,r=this,o=this.player;(Ub(e=this.__delegates).call(e,(function(e){e.destroy()})),this.__delegates=[],this._children instanceof Array)&&(Ub(i=this._children).call(i,(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)),DC(IC(n.prototype),"__destroy",this).call(this),this.icons={},Ub(t=["root","parent"]).call(t,(function(e){r[e]=null}))}}],[{key:"insert",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=t.children.length,r=Number(n),o=e instanceof window.Node;if(i){for(var a=0,s=null,l="";a<i;a++){s=t.children[a];var u=Number(s.getAttribute("data-index"));if(u>=r){l="beforebegin";break}u<r&&(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,n,i){var r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=[];if(e instanceof window.Node&&"function"==typeof i)if(Array.isArray(n))n.forEach((function(n){var a,s=GS(e,t,n,i,r);s.key=Fm(a="".concat(t,"_")).call(a,n),o.push(s)}));else{var a,s=GS(e,t,n,i,r);s.key=Fm(a="".concat(t,"_")).call(a,n),o.push(s)}return o}},{key:"ROOT_TYPES",get:function(){return WS}},{key:"POSITIONS",get:function(){return YS}}]),n}(HS),QS=function(){function e(){var t=this;if(xC(this,e),PC(this,"__trigger",(function(e){var n=(new Date).getTime();t.timeStamp=n;for(var i=0;i<e.length;i++)t.__runHandler(e[i].target)})),this.__handlers=[],this.timeStamp=0,this.observer=null,window.ResizeObserver)try{this.observer=new window.ResizeObserver(function(e,t,n){var i=!0,r=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return bT(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),wT(e,t,{leading:i,trailing:r,maxWait:t})}(this.__trigger,100,{trailing:!0})),this.timeStamp=(new Date).getTime()}catch(n){console.error(n)}}return SC(e,[{key:"addObserver",value:function(e,t){if(this.observer){this.observer.observe(e);for(var n=e.getAttribute(SS),i=this.__handlers,r=-1,o=0;o<i.length;o++)i[o]&&e===i[o].target&&(r=o);r>-1?this.__handlers[r].handler=t:this.__handlers.push({target:e,handler:t,playerId:n})}}},{key:"unObserver",value:function(e){var t,n,i=-1;Ub(t=this.__handlers).call(t,(function(t,n){e===t.target&&(i=n)}));try{var r;null===(r=this.observer)||void 0===r||r.unobserve(e)}catch(o){}i>-1&&Mw(n=this.__handlers).call(n,i,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,n=0;n<t.length;n++)if(t[n]&&e===t[n].target){try{t[n].handler(e)}catch(HN){console.error(HN)}return!0}return!1}}]),e}(),eP=null;var tP={pluginGroup:{},init:function(e){var t,n,i=e._pluginInfoId;i||(i=(new Date).getTime(),e._pluginInfoId=i),!e.config.closeResizeObserver&&(t=e.root,n=function(){e.resize()},eP||(eP=new QS),eP.addObserver(t,n)),this.pluginGroup[i]={_originalOptions:e.config||{},_plugins:{}}},formatPluginInfo:function(e,t){var n=null,i=null;return e.plugin&&"function"==typeof e.plugin?(n=e.plugin,i=e.options):(n=e,i={}),t&&(i.config=t||{}),{PLUFGIN:n,options:i}},checkPluginIfExits:function(e,t){for(var n=0;n<t.length;n++)if(e.toLowerCase()===t[n].pluginName.toLowerCase())return!0;return!1},getRootByConfig:function(e,t){for(var n=hw(t),i=null,r=0;r<n.length;r++)if(e.toLowerCase()===n[r].toLowerCase()){i=t[n[r]];break}return"Object"===kT.typeOf(i)?{root:i.root,position:i.position}:{}},lazyRegister:function(e,t){var n=this,i=t.timeout||1500;return Hb.race([t.loader().then((function(t){var i;i=t&&t.__esModule?t.default:t,n.register(e,i,t.options)})),new Hb((function(e,t){setTimeout((function(){t(new Error("timeout"))}),i)}))])},register:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e&&t&&"function"==typeof t&&void 0!==t.prototype){var i=e._pluginInfoId;if(i&&this.pluginGroup[i]){this.pluginGroup[i]._plugins||(this.pluginGroup[i]._plugins={});var r=this.pluginGroup[i]._plugins,o=this.pluginGroup[i]._originalOptions;n.player=e;var a=n.pluginName||t.pluginName;if(!a)throw new Error("The property pluginName is necessary");if(!t.isSupported||t.isSupported(e.config.mediaType,e.config.codecType)){n.config||(n.config={});for(var s=hw(o),l=0;l<s.length;l++)if(a.toLowerCase()===s[l].toLowerCase()){var u=o[s[l]];"Object"===kT.typeOf(u)?n.config=xE({},n.config,o[s[l]]):"Boolean"===kT.typeOf(u)&&(n.config.disable=!u);break}t.defaultConfig&&hw(t.defaultConfig).forEach((function(e){void 0===n.config[e]&&(n.config[e]=t.defaultConfig[e])})),n.root?"string"==typeof n.root&&(n.root=e[n.root]):n.root=e.root,n.index=n.config.index||0;try{r[a.toLowerCase()]&&(this.unRegister(i,a.toLowerCase()),console.warn("the is one plugin with same pluginName [".concat(a,"] exist, destroy the old instance")));var c=new t(n);return r[a.toLowerCase()]=c,r[a.toLowerCase()].func=t,c&&"function"==typeof c.afterCreate&&c.afterCreate(),c}catch(h){throw console.error(h),h}}else console.warn("not supported plugin [".concat(a,"]"))}}},unRegister:function(e,t){e._pluginInfoId&&(e=e._pluginInfoId),t=t.toLowerCase();try{var n=this.pluginGroup[e]._plugins[t];n&&(n.pluginName&&n.__destroy(),delete this.pluginGroup[e]._plugins[t])}catch(r){var i;console.error(Fm(i="[unRegister:".concat(t,"] cgid:[")).call(i,e,"] error"),r)}},deletePlugin:function(e,t){var n=e._pluginInfoId;n&&this.pluginGroup[n]&&this.pluginGroup[n]._plugins&&delete this.pluginGroup[n]._plugins[t]},getPlugins:function(e){var t=e._pluginInfoId;return t&&this.pluginGroup[t]?this.pluginGroup[t]._plugins:{}},findPlugin:function(e,t){var n=e._pluginInfoId;if(!n||!this.pluginGroup[n])return null;var i=t.toLowerCase();return this.pluginGroup[n]._plugins[i]},beforeInit:function(e){var t=this;function n(e){return e&&e.then?e:new Hb((function(e){e()}))}return new Hb((function(i){if(t.pluginGroup)return(e._loadingPlugins&&e._loadingPlugins.length?Hb.all(e._loadingPlugins):Hb.resolve()).then((function(){var r,o=e._pluginInfoId;if(t.pluginGroup[o]){var a=t.pluginGroup[o]._plugins,s=[];hw(a).forEach((function(e){if(a[e]&&a[e].beforePlayerInit)try{var t=a[e].beforePlayerInit();s.push(n(t))}catch(i){throw s.push(n(null)),i}})),Hb.all(Fm(r=[]).call(r,s)).then((function(){i()})).catch((function(e){console.error(e),i()}))}else i()}))}))},afterInit:function(e){var t=e._pluginInfoId;if(t&&this.pluginGroup[t]){var n=this.pluginGroup[t]._plugins;hw(n).forEach((function(e){n[e]&&n[e].afterPlayerInit&&n[e].afterPlayerInit()}))}},setLang:function(e,t){var n=t._pluginInfoId;if(n&&this.pluginGroup[n]){var i=this.pluginGroup[n]._plugins;hw(i).forEach((function(t){if(i[t].updateLang)i[t].updateLang(e);else try{i[t].lang=e}catch(HN){console.warn("".concat(t," setLang"))}}))}},reRender:function(e){var t=this,n=e._pluginInfoId;if(n&&this.pluginGroup[n]){var i=[],r=this.pluginGroup[n]._plugins;hw(r).forEach((function(e){"controls"!==e&&r[e]&&(i.push({plugin:r[e].func,options:r[e].__args}),t.unRegister(n,e))})),i.forEach((function(n){t.register(e,n.plugin,n.options)}))}},onPluginsReady:function(e){var t=e._pluginInfoId;if(t&&this.pluginGroup[t]){var n=this.pluginGroup[t]._plugins||{};hw(n).forEach((function(e){n[e].onPluginsReady&&"function"==typeof n[e].onPluginsReady&&n[e].onPluginsReady()}))}},destroy:function(e){var t=e._pluginInfoId;if(this.pluginGroup[t]){var n,i,r;n=e.root,null===(r=eP)||void 0===r||r.unObserver(n,i);for(var o=this.pluginGroup[t]._plugins,a=0,s=hw(o);a<s.length;a++){var l=s[a];this.unRegister(t,l)}delete this.pluginGroup[t],delete e._pluginInfoId}}},nP="xgplayer",iP="xgplayer-is-enter",rP="xgplayer-pause",oP="xgplayer-playing",aP="xgplayer-ended",sP="xgplayer-isloading",lP="xgplayer-is-error",uP="xgplayer-replay",cP="xgplayer-nostart",hP="xgplayer-inactive",fP="xgplayer-is-fullscreen",dP="xgplayer-is-cssfullscreen",pP="xgplayer-rotate-fullscreen",vP="xgplayer-rotate-parent",gP="xgplayer-fullscreen-parent",yP="xgplayer-fullscreen-inner",mP="no-controls",_P="flex-controls",kP="controls-autohide",bP="top-bar-autohide",wP="not-allow-autoplay",EP="seeking";function CP(){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:ET(),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 xP=function(e){AC(n,e);var t=LC(n);function n(){var e,i;xC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return PC(OC(i=t.call.apply(t,Fm(e=[this]).call(e,o))),"onMouseEnter",(function(e){var t=OC(i),n=t.player;t.playerConfig.closeControlsBlur&&n.focus({autoHide:!1})})),PC(OC(i),"onMouseLeave",(function(e){OC(i).player.focus()})),i}return SC(n,[{key:"beforeCreate",value:function(e){e.config.mode||"mobile"!==ST.device||(e.config.mode="flex"),e.player.config.marginControls&&(e.config.autoHide=!1)}},{key:"afterCreate",value:function(){var e,t=this,n=this.config,i=n.disable,r=n.height,o=n.mode;if(!i){"flex"===o&&this.player.addClass(_P);var a={height:"".concat(r,"px")};Ub(e=hw(a)).call(e,(function(e){t.root.style[e]=a[e]})),this.left=Wm(this).call(this,"xg-left-grid"),this.center=Wm(this).call(this,"xg-center-grid"),this.right=Wm(this).call(this,"xg-right-grid"),this.innerRoot=Wm(this).call(this,"xg-inner-controls"),this.on(aS,(function(e){e?kT.addClass(t.root,"mini-controls"):kT.removeClass(t.root,"mini-controls")}));var s=this.playerConfig.isMobileSimulateMode;"mobile"!==ST.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&&kT.addClass(this.root,kP)}},{key:"pauseAutoHide",value:function(){kT.removeClass(this.root,kP)}},{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]:{},i=arguments.length>2?arguments[2]:void 0;if(this.root){var r=e.defaultConfig||{};if(!t.root){switch(t.position?t.position:t.config&&t.config.position?t.config.position:r.position){case YS.CONTROLS_LEFT:t.root=this.left;break;case YS.CONTROLS_RIGHT:t.root=this.right;break;case YS.CONTROLS_CENTER:t.root=this.center;break;case YS.CONTROLS:t.root=this.root;break;default:t.root=this.left}return DC(IC(n.prototype),"registerPlugin",this).call(this,e,t,i)}}}},{key:"destroy",value:function(){"mobile"!==ST.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,n=e.autoHide,i=e.initShow;if(!e.disable){var r=kT.classNames({"xgplayer-controls":!0},{"flex-controls":"flex"===t},{"bottom-controls":"bottom"===t},PC({},kP,n),{"xgplayer-controls-initshow":i||!n});return'<xg-controls class="'.concat(r,'" 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}}}]),n}(JS),TP={lang:{},langKeys:[],textKeys:[]};function SP(e,t){return hw(t).forEach((function(n){var i,r=kT.typeOf(t[n]),o=kT.typeOf(e[n]);"Array"===r?("Array"!==o&&(e[n]=[]),(i=e[n]).push.apply(i,NC(t[n]))):"Object"===r?("Object"!==o&&(e[n]={}),SP(e[n],t[n])):e[n]=t[n]})),e}function PP(){var e;Ub(e=hw(TP.lang.en)).call(e,(function(e){TP.textKeys[e]=e}))}function AP(e,t){var n=e.LANG;if(t||(t=TP),t.lang){var i=e.TEXT||{};"zh"===n&&(n="zh-cn"),t.lang[n]?SP(t.lang[n],i):(t.langKeys.push(n),t.lang[n]=i),PP()}}AP({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"}});var IP={get textKeys(){return TP.textKeys},get langKeys(){return TP.langKeys},get lang(){var e,t={};return Ub(e=TP.langKeys).call(e,(function(e){t[e]=TP.lang[e]})),TP.lang["zh-cn"]&&(t.zh=TP.lang["zh-cn"]||{}),t},extend:function(e,t){var n=[];if(t||(t=TP),t.lang){var i;if("Array"!==kT.typeOf(e))n=Ub(i=hw(e)).call(i,(function(t){return{LANG:"zh"===t?"zh-cn":t,TEXT:e[t]}}));else n=e;var r=t.lang;Ub(n).call(n,(function(e){"zh"===e.LANG&&(e.LANG="zh-cn"),r[e.LANG]?SP(r[e.LANG]||{},e.TEXT||{}):AP(e,t)})),PP()}},use:AP,init:function(e){var t,n={lang:{},langKeys:[],textKeys:{},pId:e};return SP(n.lang,TP.lang),(t=n.langKeys).push.apply(t,NC(TP.langKeys)),SP(n.textKeys,TP.textKeys),n}},RP=1,OP=2,MP=3,LP=4,DP=5,NP=6,FP=7,UP=["ERROR","INITIAL","READY","ATTACHING","ATTACHED","NOTALLOW","RUNNING","ENDED","DESTROYED"],HP={},jP=null,BP=function(e){AC(n,e);var t=LC(n);function n(){return xC(this,n),t.apply(this,arguments)}return SC(n,[{key:"add",value:function(e){e&&(HP[e.playerId]=e,1===hw(HP).length&&this.setActive(e.playerId,!0))}},{key:"remove",value:function(e){e&&(e.isUserActive,delete HP[e.playerId])}},{key:"_iterate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];for(var n in HP)if(Object.prototype.hasOwnProperty.call(HP,n)){var i=HP[n];if(t){if(e(i))break}else e(i)}}},{key:"forEach",value:function(e){this._iterate(e)}},{key:"find",value:function(e){var t=null;return this._iterate((function(n){var i=e(n);return i&&(t=n),i}),!0),t}},{key:"findAll",value:function(e){var t=[];return this._iterate((function(n){e(n)&&t.push(n)})),t}},{key:"setActive",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(HP[e])return t?this.forEach((function(t){e===t.playerId?(t.isUserActive=!0,t.isInstNext=!1):t.isUserActive=!1})):HP[e].isUserActive=t,e}},{key:"getActiveId",value:function(){for(var e=hw(HP),t=0;t<e.length;t++){var n=HP[e[t]];if(n&&n.isUserActive)return e[t]}return null}},{key:"setNext",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(HP[e])return t?this.forEach((function(t){e===t.playerId?(t.isUserActive=!1,t.isInstNext=!0):t.isInstNext=!1})):HP[e].isInstNext=t,e}}],[{key:"getInstance",value:function(){return jP||(jP=new n),jP}}]),n}(jC.EventEmitter);var zP=["play","pause","replay","retry"],VP=0,KP=0,GP=null,WP=function(e){AC(n,e);var t=LC(n);function n(e){var i;xC(this,n);var r,o=kT.deepMerge(CP(),e);PC(OC(i=t.call(this,o)),"canPlayFunc",(function(){if(i.config){var e=i.config,t=e.autoplay,n=e.defaultPlaybackRate;mT.logInfo("player","canPlayFunc, startTime",i.__startTime),i._seekToStartTime(),i.playbackRate=n,(t||i._useAutoplay)&&i.mediaPlay(),i.off(HT,i.canPlayFunc),i.removeClass(iP)}})),PC(OC(i),"onFullscreenChange",(function(e,t){var n=function(){kT.setTimeout(OC(i),(function(){i.resize()}),100)},r=kT.getFullScreenEl();i._fullActionFrom?i._fullActionFrom="":i.emit(vS,{eventType:"system",action:"switch_fullscreen",pluginName:"player",currentTime:i.currentTime,duration:i.duration,props:[{prop:"fullscreen",from:!0,to:!1}]});var o=function(e,t,n){if(e){var i=e.getAttribute(n);return!(!i||i!==t||"VIDEO"!==e.tagName&&"AUDIO"!==e.tagName)}}(r,i.playerId,SS);if(t||r&&(r===i._fullscreenEl||o))n(),!i.config.closeFocusVideoFocus&&i.media.focus(),i.fullscreen=!0,i.changeFullStyle(i.root,r,fP),i.emit(rS,!0,i._fullScreenOffset),i.cssfullscreen&&i.exitCssFullscreen();else if(i.fullscreen){n();var a=OC(i),s=a._fullScreenOffset;if(a.config.needFullscreenScroll?(window.scrollTo(s.left,s.top),kT.setTimeout(OC(i),(function(){i.fullscreen=!1,i._fullScreenOffset=null}),100)):(!i.config.closeFocusVideoFocus&&i.media.focus(),i.fullscreen=!1,i._fullScreenOffset=null),i.cssfullscreen)i.removeClass(fP);else{var l=i._fullscreenEl;l||!i.root.contains(e.target)&&e.target!==i.root||(l=e.target),i.recoverFullStyle(i.root,l,fP)}i._fullscreenEl=null,i.emit(rS,!1)}})),PC(OC(i),"_onWebkitbeginfullscreen",(function(e){i._fullscreenEl=i.media,i.onFullscreenChange(e,!0)})),PC(OC(i),"_onWebkitendfullscreen",(function(e){i.onFullscreenChange(e,!1)})),DS(OC(i),zP),i.config=o,i._pluginInfoId=kT.generateSessionId(),(r=OC(i)).logInfo=mT.logInfo.bind(r),r.logWarn=mT.logWarn.bind(r),r.logError=mT.logError.bind(r);var a=i.constructor.defaultPreset;if(i.config.presets.length){var s,l=cw(s=i.config.presets).call(s,"default");l>=0&&a&&(i.config.presets[l]=a)}else a&&i.config.presets.push(a);if(i.userTimer=null,i.waitTimer=null,i.handleSource=!0,i._state=RP,i.isAd=!1,i.isError=!1,i._hasStart=!1,i.isSeeking=!1,i.isCanplay=!1,i._useAutoplay=!1,i.__startTime=-1,i.rotateDeg=0,i.isActive=!1,i.fullscreen=!1,i.cssfullscreen=!1,i.isRotateFullscreen=!1,i._fullscreenEl=null,i.timeSegments=[],i._cssfullscreenEl=null,i.curDefinition=null,i._orgCss="",i._fullScreenOffset=null,i._videoHeight=0,i._videoWidth=0,i.videoPos={pi:1,scale:0,rotate:-1,x:0,y:0,h:-1,w:-1,vy:0,vx:0},i.sizeInfo={width:0,height:0,left:0,top:0},i._accPlayed={t:0,acc:0,loopAcc:0},i._offsetInfo={currentTime:-1,duration:0},i.innerContainer=null,i.controls=null,i.topBar=null,i.root=null,i.__i18n=IP.init(i._pluginInfoId),ST.os.isAndroid&&ST.osVersion>0&&ST.osVersion<6&&(i.config.autoplay=!1),i.database=new ES,i.isUserActive=!1,i._onceSeekCanplay=null,i._isPauseBeforeSeek=0,i.innerStates={isActiveLocked:!1},i.instManager=GP,!i._initDOM())return console.error(new Error("can't find the dom which id is ".concat(i.config.id," or this.config.el does not exist"))),MC(i);var u=i.config,c=u.definition,h=void 0===c?{}:c;if(!u.url&&h.list&&h.list.length>0){var f,d=Wm(f=h.list).call(f,(function(e){return e.definition&&e.definition===h.defaultDefinition}));d||(h.defaultDefinition=h.list[0].definition,d=h.list[0]),i.config.url=d.url,i.curDefinition=d}return i._bindEvents(),i._registerPresets(),i._registerPlugins(),tP.onPluginsReady(OC(i)),i.getInitDefinition(),i.setState(OP),kT.setTimeout(OC(i),(function(){i.emit(WT)}),0),i.onReady&&i.onReady(),(i.config.videoInit||i.config.autoplay)&&(!i.hasStart||i.state<LP)&&i.start(),i}return SC(n,[{key:"_initDOM",value:function(){var e,t,n,i,r=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(DT,new RT("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=function(e){for(var t=hw(HP),n=0;n<t.length;n++){var i=HP[t[n]];if(i.root===e)return i}return null}(this.root);a&&(mT.logWarn("The is an Player instance already exists in this.root, destroy it and reinitialize"),a.destroy()),this.root.setAttribute(SS,this.playerId),null===(i=GP)||void 0===i||i.add(this),tP.init(this),this._initBaseDoms();var s=this.constructor.XgVideoProxy;if(s&&this.mediaConfig.mediaType===s.mediaType){var l=this.innerContainer||this.root;this.detachVideoEvents(this.media);var u=new s(l,this.config,this.mediaConfig);this.attachVideoEvents(u),this.media=u}if(this.media.setAttribute(SS,this.playerId),this.config.controls){var c=this.config.controls.root||null,h=tP.register(this,xP,{root:c});this.controls=h}var f="mobile"===this.config.isMobileSimulateMode?"mobile":ST.device;if(this.addClass(Fm(e=Fm(t=Fm(n="".concat(nP," ")).call(n,hP," xgplayer-")).call(t,f," ")).call(e,this.config.controls?"":mP)),this.config.autoplay?this.addClass(iP):this.addClass(cP),this.config.fluid){var d=this.config,p=d.width,v=d.height;"number"==typeof p&&"number"==typeof v||(p=600,v=337.5);var g={width:"100%",height:"0","max-width":"100%","padding-top":"".concat(100*v/p,"%")};hw(g).forEach((function(e){r.root.style[e]=g[e]}))}else["width","height"].forEach((function(e){r.config[e]&&("number"!=typeof r.config[e]?r.root.style[e]=r.config[e]:r.root.style[e]="".concat(r.config[e],"px"))}));var y=this.root.getBoundingClientRect(),m=y.width,_=y.height,k=y.left,b=y.top;return this.sizeInfo.width=m,this.sizeInfo.height=_,this.sizeInfo.left=k,this.sizeInfo.top=b,!0}},{key:"_initBaseDoms",value:function(){this.topBar=null,this.leftBar=null,this.rightBar=null,this.config.marginControls&&(this.innerContainer=kT.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()+fw(t).call(t,1)])})),CS.forEach((function(t){document&&document.addEventListener(t,e.onFullscreenChange)})),ST.os.isIos&&(this.media.addEventListener("webkitbeginfullscreen",this._onWebkitbeginfullscreen),this.media.addEventListener("webkitendfullscreen",this._onWebkitendfullscreen)),this.once(zT,this.resize),this.playFunc=function(){e.config.closeFocusVideoFocus||e.media.focus()},this.once(OT,this.playFunc)}},{key:"_unbindEvents",value:function(){var e=this;this.root.removeEventListener("mousemove",this.mousemoveFunc),CS.forEach((function(t){document.removeEventListener(t,e.onFullscreenChange)})),this.playFunc&&this.off(OT,this.playFunc),this.off(HT,this.canPlayFunc),this.media.removeEventListener("webkitbeginfullscreen",this._onWebkitbeginfullscreen),this.media.removeEventListener("webkitendfullscreen",this._onWebkitendfullscreen)}},{key:"_clearUserTimer",value:function(){this.userTimer&&(kT.clearTimeout(this,this.userTimer),this.userTimer=null)}},{key:"_startInit",value:function(e){var t=this;if(this.media&&(e&&""!==e&&("Array"!==kT.typeOf(e)||0!==e.length)||(e="",this.emit(YT),mT.logWarn("config.url is null, please get url and run player._startInit(url)"),!this.config.nullUrlStart))){this.handleSource&&(this._detachSourceEvents(this.media),"Array"===kT.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"===kT.typeOf(this.config.volume)&&(this.volume=this.config.volume);var n=this.innerContainer?this.innerContainer:this.root;this.media instanceof window.Element&&!n.contains(this.media)&&n.insertBefore(this.media,n.firstChild);var i=this.media.readyState;mT.logInfo("_startInit readyState",i),this.config.autoplay&&(!kT.isMSE(this.media)&&this.load(),(ST.os.isIpad||ST.os.isPhone)&&this.mediaPlay());var r=this.config.startTime;this.__startTime=r>0?r:-1,this.config.startTime=0,i>=2&&this.duration>0?this.canPlayFunc():this.on(HT,this.canPlayFunc),(!this.hasStart||this.state<LP)&&tP.afterInit(this),this.hasStart=!0,this.setState(LP),kT.setTimeout(this,(function(){t.emit($T)}),0)}}},{key:"_registerPlugins",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._loadingPlugins=[];var n=this.config.ignores||[],i=this.config.plugins||[],r=this.config.i18n||[];t&&IP.extend(r,this.__i18n);var o=n.join("||").toLowerCase().split("||"),a=this.plugins;i.forEach((function(n){try{var i=n.plugin?n.plugin.pluginName:n.pluginName;if(i&&cw(o).call(o,i.toLowerCase())>-1)return null;if(!t&&a[i.toLowerCase()])return;if(n.lazy&&n.loader){var r=tP.lazyRegister(e,n);return void(n.forceBeforeInit&&(r.then((function(){var t,n;Mw(t=e._loadingPlugins).call(t,cw(n=e._loadingPlugins).call(n,r),1)})).catch((function(t){var n,i;mT.logError("_registerPlugins:loadingPlugin",t),Mw(n=e._loadingPlugins).call(n,cw(i=e._loadingPlugins).call(i,r),1)})),e._loadingPlugins.push(r)))}return e.registerPlugin(n)}catch(s){mT.logError("_registerPlugins:",s)}}))}},{key:"_registerPresets",value:function(){var e=this;this.config.presets.forEach((function(t){!function(e,t){var n,i,r,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,u=void 0===l?[]:l,c=o.icons,h=void 0===c?{}:c,f=o.i18n,d=void 0===f?[]:f;e.config.plugins||(e.config.plugins=[]),e.config.ignores||(e.config.ignores=[]),(i=e.config.plugins).push.apply(i,NC(s)),(r=e.config.ignores).push.apply(r,NC(u)),Ub(n=hw(h)).call(n,(function(t){e.config.icons[t]||(e.config.icons[t]=h[t])}));var p=e.config.i18n||[];d.push.apply(d,NC(p)),e.config.i18n=d}(e,t)}))}},{key:"_getRootByPosition",value:function(e){var t=null;switch(e){case YS.ROOT_RIGHT:this.rightBar||(this.rightBar=kT.createPositionBar("xg-right-bar",this.root)),t=this.rightBar;break;case YS.ROOT_LEFT:this.leftBar||(this.leftBar=kT.createPositionBar("xg-left-bar",this.root)),t=this.leftBar;break;case YS.ROOT_TOP:this.topBar||(this.topBar=kT.createPositionBar("xg-top-bar",this.root),this.config.topBarAutoHide&&kT.addClass(this.topBar,bP)),t=this.topBar;break;default:t=this.innerContainer||this.root}return t}},{key:"registerPlugin",value:function(e,t){var n=tP.formatPluginInfo(e,t),i=n.PLUFGIN,r=n.options,o=this.config.plugins;!tP.checkPluginIfExits(i.pluginName,o)&&o.push(i);var a=tP.getRootByConfig(i.pluginName,this.config);a.root&&(r.root=a.root),a.position&&(r.position=a.position);var s,l=r.position?r.position:r.config&&r.config.position||i.defaultConfig&&i.defaultConfig.position;return!r.root&&"string"==typeof l&&cw(l).call(l,"controls")>-1?null===(s=this.controls)||void 0===s?void 0:s.registerPlugin(i,r,i.pluginName):(r.root||(r.root=this._getRootByPosition(l)),tP.register(this,i,r))}},{key:"deregister",value:function(e){"string"==typeof e?tP.unRegister(this,e):e instanceof HS&&tP.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 HS&&(t=e.pluginName),t)for(var n=this.config.plugins.length-1;n>-1;n--){if(this.config.plugins[n].pluginName.toLowerCase()===t.toLowerCase()){var i;Mw(i=this.config.plugins).call(i,n,1);break}}}},{key:"plugins",get:function(){return tP.getPlugins(this)}},{key:"getPlugin",value:function(e){var t=tP.findPlugin(this,e);return t&&t.pluginName?t:null}},{key:"addClass",value:function(e){this.root&&(kT.hasClass(this.root,e)||kT.addClass(this.root,e))}},{key:"removeClass",value:function(e){this.root&&kT.removeClass(this.root,e)}},{key:"hasClass",value:function(e){if(this.root)return kT.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>MP))return e||this.config.url||this.getInitDefinition(),this.hasStart=!0,this.setState(MP),this._registerPlugins(!1),tP.beforeInit(this).then((function(){if(t.config){e||(e=t.url||t.config.url);var n=t.preProcessUrl(e);return t._startInit(n.url)}})).catch((function(e){throw e.fileName="player",e.lineNumber="236",mT.logError("start:beforeInit:",e),e}))}},{key:"switchURL",value:function(e,t){var n=this,i=e;"Object"===kT.typeOf(e)&&(i=e.url),i=this.preProcessUrl(i).url;var r=this.currentTime;this.__startTime=r;var o=this.paused&&!this.isError;return this.src=i,new Hb((function(e,t){var r=function(e){n.off("timeupdate",a),n.off("canplay",a),t(e)},a=function(){n._seekToStartTime(),o&&n.pause(),n.off("error",r),e(!0)};n.once("error",r),i?(ST.os.isAndroid?n.once("timeupdate",a):n.once("canplay",a),n.play()):n.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<LP)return this.removeClass(cP),this.addClass(iP),this.start(),void(this._useAutoplay=!0);this.state<NP&&(this.removeClass(cP),!this.isCanplay&&this.addClass(iP));var t=DC(IC(n.prototype),"play",this).call(this);return void 0!==t&&t&&t.then?t.then((function(){e.removeClass(wP),e.addClass(oP),e.state<NP&&(mT.logInfo(">>>>playPromise.then"),e.setState(NP),e.emit(XT))})).catch((function(t){if(mT.logWarn(">>>>playPromise.catch",t.name),e.media&&e.media.error)return e.onError(),void e.removeClass(iP);"NotAllowedError"===t.name&&(e._errorTimer=kT.setTimeout(e,(function(){e._errorTimer=null,e.emit(qT),e.addClass(wP),e.removeClass(iP),e.pause(),e.setState(DP)}),0))})):(mT.logWarn("video.play not return promise"),this.state<NP&&(this.setState(NP),this.removeClass(wP),this.removeClass(cP),this.removeClass(iP),this.addClass(oP),this.emit(XT))),t}},{key:"mediaPause",value:function(){DC(IC(n.prototype),"pause",this).call(this)}},{key:"videoPause",value:function(){DC(IC(n.prototype),"pause",this).call(this)}},{key:"play",value:function(){var e=this;return this.removeClass(rP),FS(this,"play",(function(){return e.mediaPlay()}))}},{key:"pause",value:function(){var e=this;FS(this,"pause",(function(){DC(IC(n.prototype),"pause",e).call(e)}))}},{key:"seek",value:function(e,t){var n=this;if(this.media&&!Lw(Number(e))&&this.hasStart){var i=this.config,r=i.isSeekedPlay,o=i.seekedStatus,a=t||(r?"play":o);e=e<0?0:e>this.duration?nE(this.duration,10):e,!this._isPauseBeforeSeek&&(this._isPauseBeforeSeek=this.paused?2:1),this._onceSeekCanplay&&this.off(NT,this._onceSeekCanplay),this._onceSeekCanplay=function(){switch(n.removeClass(iP),n.isSeeking=!1,a){case"play":n.play();break;case"pause":n.pause();break;default:n._isPauseBeforeSeek>1||n.paused?n.pause():n.play()}n._isPauseBeforeSeek=0,n._onceSeekCanplay=null},this.once(NT,this._onceSeekCanplay),this.state<NP?(this.removeClass(cP),this.currentTime=e,this.play()):this.currentTime=e}}},{key:"getInitDefinition",value:function(){var e,t=this,n=this.config,i=n.definition;!n.url&&i&&i.list&&i.list.length>0&&i.defaultDefinition&&Ub(e=i.list).call(e,(function(e){e.definition===i.defaultDefinition&&(t.config.url=e.url,t.curDefinition=e)}))}},{key:"changeDefinition",value:function(e,t){var n=this,i=this.config.definition;if(Array.isArray(null==i?void 0:i.list)&&i.list.forEach((function(t){(null==e?void 0:e.definition)===t.definition&&(n.curDefinition=t)})),null!=e&&e.bitrate&&"number"!=typeof e.bitrate&&(e.bitrate=nE(e.bitrate,10)||0),this.emit(sS,{from:t,to:e}),this.hasStart){var r=this.switchURL(e.url,EC({seamless:!1!==i.seamless&&"undefined"!=typeof MediaSource&&"function"==typeof MediaSource.isTypeSupported},e));r&&r.then?r.then((function(){n.emit(uS,{from:t,to:e})})):this.emit(uS,{from:t,to:e})}else this.config.url=e.url}},{key:"reload",value:function(){this.load(),this.reloadFunc=function(){this.play()},this.once(zT,this.reloadFunc)}},{key:"resetState",value:function(){var e=this,t=[wP,oP,cP,rP,uP,iP,aP,lP,sP];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(cP),this.emit(gS)}},{key:"reset",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;if(this.resetState(),this.plugins&&(Ub(t).call(t,(function(t){e.deregister(t)})),n)){var i,r=CP();cE(i=hw(this.config)).call(i,(function(t){"undefined"===e.config[t]||"plugins"!==t&&"presets"!==t&&"el"!==t&&"id"!==t||(e.config[t]=r[t])}))}}},{key:"destroy",value:function(){var e,t,i=this,r=this.innerContainer,o=this.root,a=this.media;if(o&&a){if(this.hasStart=!1,this._useAutoplay=!1,o.removeAttribute(SS),this.updateAcc("destroy"),this._unbindEvents(),this._detachSourceEvents(this.media),kT.clearAllTimers(this),this.emit(JT),null===(t=GP)||void 0===t||t.remove(this),tP.destroy(this),NS(this),DC(IC(n.prototype),"destroy",this).call(this),this.fullscreen&&this._fullscreenEl===this.root&&this.exitFullscreen(),r)for(var s=r.children,l=0;l<s.length;l++)r.removeChild(s[l]);!r&&a instanceof window.Node&&o.contains(a)&&o.removeChild(a),Ub(e=["topBar","leftBar","rightBar","innerContainer"]).call(e,(function(e){i[e]&&o.removeChild(i[e]),i[e]=null}));var u=o.className.split(" ");u.length>0?o.className=jb(u).call(u,(function(e){return cw(e).call(e,"xgplayer")<0})).join(" "):o.className="",this.removeAttribute("data-xgfill"),["isSeeking","isCanplay","isActive","cssfullscreen","fullscreen"].forEach((function(e){i[e]=!1}))}}},{key:"replay",value:function(){var e=this;this.removeClass(aP),this.currentTime=0,this.isSeeking=!1,FS(this,"replay",(function(){e.once(NT,(function(){var t=e.mediaPlay();t&&t.catch&&t.catch((function(e){console.log(e)}))})),e.emit(ZT),e.onPlay()}))}},{key:"retry",value:function(){var e=this;this.removeClass(lP),this.addClass(sP),FS(this,"retry",(function(){var t=e.currentTime,n=e.config.url,i=kT.isMSE(e.media)?{url:n}:e.preProcessUrl(n);e.src=i.url,!e.config.isLive&&(e.currentTime=t),e.once(HT,(function(){e.mediaPlay()}))}))}},{key:"changeFullStyle",value:function(e,t,n,i){e&&(i||(i=gP),this._orgCss||(this._orgCss=kT.filterStyleFromText(e)),kT.addClass(e,n),t&&t!==e&&!this._orgPCss&&(this._orgPCss=kT.filterStyleFromText(t),kT.addClass(t,i),t.setAttribute(SS,this.playerId)))}},{key:"recoverFullStyle",value:function(e,t,n,i){i||(i=gP),this._orgCss&&(kT.setStyleFromCsstext(e,this._orgCss),this._orgCss=""),kT.removeClass(e,n),t&&t!==e&&this._orgPCss&&(kT.setStyleFromCsstext(t,this._orgPCss),this._orgPCss="",kT.removeClass(t,i),t.removeAttribute(SS))}},{key:"getFullscreen",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.fullscreenTarget,t=this.root,n=this.media;if("video"!==e&&"media"!==e||(e=this[e]),e||(e=t),this._fullScreenOffset={top:kT.scrollTop(),left:kT.scrollLeft()},this._fullscreenEl=e,this._fullActionFrom="get",kT.getFullScreenEl()===this._fullscreenEl)return this.onFullscreenChange(),Hb.resolve();try{for(var i=0;i<xS.length;i++){var r=xS[i];if(e[r]){var o="webkitRequestFullscreen"===r?e.webkitRequestFullscreen(window.Element.ALLOW_KEYBOARD_INPUT):e[r]();return o&&o.then?o:Hb.resolve()}}return n.fullscreenEnabled||n.webkitSupportsFullscreen?(n.webkitEnterFullscreen(),Hb.resolve()):Hb.reject(new Error("call getFullscreen fail"))}catch(a){return Hb.reject(new Error("call getFullscreen fail"))}}},{key:"exitFullscreen",value:function(e){if(this.isRotateFullscreen&&this.exitRotateFullscreen(),this._fullscreenEl||kT.getFullScreenEl()){this.root;var t=this.media;this._fullActionFrom="exit";try{for(var n=0;n<TS.length;n++){var i=TS[n];if(document[i]){var r=document[i]();return r&&r.then?r:Hb.resolve()}}return t&&t.webkitSupportsFullscreen?(t.webkitExitFullScreen(),Hb.resolve()):Hb.reject(new Error("call exitFullscreen fail"))}catch(o){return Hb.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 n=t?Fm(e="".concat(yP," ")).call(e,dP):dP;this.changeFullStyle(this.root,t,n);var i=this.config.fullscreen,r=void 0===i?{}:i;(!0===r.useCssFullscreen||"function"==typeof r.useCssFullscreen&&r.useCssFullscreen())&&(this.fullscreen=!0,this.emit(rS,!0)),this._cssfullscreenEl=t,this.cssfullscreen=!0,this.emit(oS,!0)}},{key:"exitCssFullscreen",value:function(){var e,t=this._cssfullscreenEl?Fm(e="".concat(yP," ")).call(e,dP):dP;if(this.fullscreen){var n=this.config.fullscreen,i=void 0===n?{}:n;!0===i.useCssFullscreen||"function"==typeof i.useCssFullscreen&&i.useCssFullscreen()?(this.recoverFullStyle(this.root,this._cssfullscreenEl,t),this.fullscreen=!1,this.emit(rS,!1)):this.removeClass(t)}else this.recoverFullStyle(this.root,this._cssfullscreenEl,t);this._cssfullscreenEl=null,this.cssfullscreen=!1,this.emit(oS,!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 n=t?Fm(e="".concat(yP," ")).call(e,pP):pP;this._fullscreenEl=t||this.root,this.changeFullStyle(this.root,t,n,vP),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(rS,!0)}},{key:"exitRotateFullscreen",value:function(e){var t,n=this._fullscreenEl!==this.root?Fm(t="".concat(yP," ")).call(t,pP):pP;this.recoverFullStyle(this.root,this._fullscreenEl,n,vP),this.isRotateFullscreen=!1,this.fullscreen=!1,this.setRotateDeg(0),this.emit(rS,!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(KT,EC({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(GT,EC({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},n=this.innerStates;if(this.isActive=!0,this.removeClass(hP),this._clearUserTimer(),void 0!==t.isLock&&(n.isActiveLocked=t.isLock),!1===t.autoHide||!0===t.isLock||n.isActiveLocked)this._clearUserTimer();else{var i=t&&t.delay?t.delay:this.config.inactive;this.userTimer=kT.setTimeout(this,(function(){e.userTimer=null,e.blur()}),i)}}},{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 n=this.config.closePauseVideoFocus;this.isActive=!1,(t||n||!this.paused&&!this.ended)&&this.addClass(hP)}}},{key:"onEmptied",value:function(){this.updateAcc("emptied")}},{key:"onCanplay",value:function(){this.removeClass(iP),this.removeClass(lP),this.removeClass(sP),this.isCanplay=!0,this.waitTimer&&kT.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(jT,(function(){e._seekToStartTime()})))}},{key:"onLoadstart",value:function(){this.removeClass(lP),this.isCanplay=!1}},{key:"onPlay",value:function(){this.state===FP&&this.setState(NP),this.removeClass(rP),this.ended&&this.removeClass(aP),!this.config.closePlayVideoFocus&&this.focus()}},{key:"onPause",value:function(){this.addClass(rP),this.updateAcc("pause"),this.config.closePauseVideoFocus||(this._clearUserTimer(),this.focus())}},{key:"onEnded",value:function(){this.updateAcc("ended"),this.addClass(aP),this.setState(FP)}},{key:"onError",value:function(){this.isError=!0,this.updateAcc("error"),this.removeClass(wP),this.removeClass(cP),this.removeClass(iP),this.removeClass(sP),this.addClass(lP)}},{key:"onSeeking",value:function(){this.isSeeking||this.updateAcc("seeking"),this.isSeeking=!0,this.addClass(EP)}},{key:"onSeeked",value:function(){this.isSeeking=!1,this.waitTimer&&kT.clearTimeout(this,this.waitTimer),this.removeClass(sP),this.removeClass(EP)}},{key:"onWaiting",value:function(){var e=this;this.waitTimer&&kT.clearTimeout(this,this.waitTimer),this.updateAcc("waiting"),this.waitTimer=kT.setTimeout(this,(function(){e.addClass(sP),e.emit(iS),kT.clearTimeout(e,e.waitTimer),e.waitTimer=null}),this.config.minWaitDelay)}},{key:"onPlaying",value:function(){var e=this;this.isError=!1,[cP,rP,aP,lP,uP,sP].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(sP))&&this.media.readyState>2&&(this.removeClass(sP),kT.clearTimeout(this,this.waitTimer),this.waitTimer=null),!this.paused&&this.state===DP&&this.duration&&(this.setState(NP),this.emit(XT)),this._accPlayed.t||this.paused||this.ended||(this._accPlayed.t=(new Date).getTime())}},{key:"onVolumechange",value:function(){"Number"===kT.typeOf(this.config.volume)&&(this.config.volume=this.volume)}},{key:"onRatechange",value:function(){this.config.defaultPlaybackRate=this.playbackRate}},{key:"emitUserAction",value:function(e,t,n){if(this.media&&t&&e){var i="String"===kT.typeOf(e)?e:e.type||"";n.props&&"Array"!==kT.typeOf(n.props)&&(n.props=[n.props]),this.emit(vS,EC({eventType:i,action:t,currentTime:this.currentTime,duration:this.duration,ended:this.ended,event:e},n))}}},{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})||{},n=t.startDiff,i=void 0===n?0:n,r=t.endDiff,o=void 0===r?0:r,a=this.media.buffered;if(!a||0===a.length||!this.duration)return!0;for(var s=e||this.media.currentTime||.2,l=a.length,u=0;u<l;u++)if(a.start(u)+i<=s&&a.end(u)-o>s)return!0;return!1}},{key:"resizePosition",value:function(){var e=this.videoPos,t=e.vy,n=e.vx,i=e.h,r=e.w,o=this.videoPos.rotate;if(!(o<0&&i<0&&r<0)){var a=this.videoPos._pi;if(!a&&this.media.videoHeight&&(a=this.media.videoWidth/this.media.videoHeight*100),a){this.videoPos.pi=a;var s={rotate:o=o<0?0:o},l=0,u=0,c=1,h=Math.abs(o/90),f=this.root,d=this.innerContainer,p=f.offsetWidth,v=d?d.offsetHeight:f.offsetHeight,g=v,y=p;if(h%2==0)c=i>0?100/i:r>0?100/r:1,s.scale=c,l=t>0?(100-i)/2-t:0,s.y=2===h?0-l:l,u=n>0?(100-r)/2-n:0,s.x=2===h?0-u:u,this.media.style.width="".concat(y,"px"),this.media.style.height="".concat(g,"px");else if(h%2==1){g=p;var m=v-p;u=-m/2/(y=v)*100,s.x=3===h?u+t/2:u-t/2,l=m/2/g*100,s.y=3===h?l+n/2:l-n/2,s.scale=c,this.media.style.width="".concat(y,"px"),this.media.style.height="".concat(g,"px")}var _=kT.getTransformStyle(s,this.media.style.transform||this.media.style.webkitTransform);this.media.style.transform=_,this.media.style.webkitTransform=_}}}},{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,n=this;e&&Ub(t=hw(e)).call(t,(function(t){if("plugins"!==t){n.config[t]=e[t];var i=n.plugins[t.toLowerCase()];i&&"Function"===kT.typeOf(i.setConfig)&&i.setConfig(e[t])}}))}},{key:"playNext",value:function(e){var t=this;this.resetState(),this.setConfig(e),this._currentTime=0,this._duration=0,FS(this,"playnext",(function(){t.start(),t.emit(dS,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 n=this.media,i=n.videoWidth,r=n.videoHeight,o=this.config,a=o.fitVideoSize,s=o.videoFillMode;if("fill"!==s&&"cover"!==s&&"contain"!==s||this.setAttribute("data-xgfill",s),r&&i){this._videoHeight=r,this._videoWidth=i;var l=this.controls&&this.innerContainer?this.controls.root.getBoundingClientRect().height:0,u=t.width,c=t.height-l,h=nE(i/r*1e3,10),f=nE(u/c*1e3,10),d=u,p=c,v={};"auto"===a&&f>h||"fixWidth"===a?(p=u/h*1e3,this.config.fluid?v.paddingTop="".concat(100*p/d,"%"):v.height="".concat(p+l,"px")):("auto"===a&&f<h||"fixHeight"===a)&&(d=h*c/1e3,v.width="".concat(d,"px")),this.fullscreen||this.cssfullscreen||hw(v).forEach((function(t){e.root.style[t]=v[t]})),("fillHeight"===s&&f<h||"fillWidth"===s&&f>h)&&this.setAttribute("data-xgfill","cover");var g={videoScale:h,vWidth:d,vHeight:p,cWidth:d,cHeight:p+l};this.resizePosition(),this.emit(hS,g)}}}},{key:"updateObjectPosition",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.media.updateObjectPosition?this.media.updateObjectPosition(t,n):this.media.style.objectPosition=Fm(e="".concat(100*t,"% ")).call(e,100*n,"%")}},{key:"setState",value:function(e){var t;mT.logInfo("setState",Fm(t="state from:".concat(UP[this.state]," to:")).call(t,UP[e])),this._state=e}},{key:"preProcessUrl",value:function(e,t){var n=this.config,i=n.preProcessUrl,r=n.preProcessUrlOptions,o=xE({},r,t);return kT.isBlob(e)||"function"!=typeof i?{url:e}:i(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(OP),this.emit("hasstart"))}},{key:"isPlaying",get:function(){return this._state===NP||this._state===FP},set:function(e){e?this.setState(NP):this._state>=NP&&this.setState(LP)}},{key:"definitionList",get:function(){return this.config&&this.config.definition&&this.config.definition.list||[]},set:function(e){var t=this,n=this.config.definition,i=null,r=null;n.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&&(i=e),n.defaultDefinition===e.definition&&(r=e)})),!r&&e.length>0&&(r=e[0]),i?this.changeDefinition(i):r&&this.changeDefinition(r)}},{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=nE(this.cumulateTime/e.total*e.dropped,0)),e}},{key:"lang",get:function(){return this.config.lang},set:function(e){var t,n;0!==jb(t=IP.langKeys).call(t,(function(t){return t===e})).length||"zh"===e?(this.config.lang=e,tP.setLang(e,this)):console.error(Fm(n="Sorry, set lang fail, because the language [".concat(e,"] is not supported now, list of all supported languages is [")).call(n,IP.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 PT}},{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 DC(IC(n.prototype),"readyState",this)}},{key:"error",get:function(){var e=DC(IC(n.prototype),"error",this);return this.i18n[e]||e}},{key:"networkState",get:function(){return DC(IC(n.prototype),"networkState",this)}},{key:"fullscreenChanging",get:function(){return!(null===this._fullScreenOffset)}},{key:"cumulateTime",get:function(){var e=this._accPlayed,t=e.acc,n=e.t;return n?(new Date).getTime()-n+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=kT.convertDeg(e))%90==0&&e!==this.videoPos.rotate&&(this.videoPos.rotate=e,this.resizePosition())}},{key:"avgSpeed",get:function(){return KP},set:function(e){KP=e}},{key:"realTimeSpeed",get:function(){return VP},set:function(e){VP=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 n;return AS.call.apply(AS,Fm(n=[this]).call(n,fw(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){var n;return RS.call.apply(RS,Fm(n=[this]).call(n,fw(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){var n;return OS.call.apply(OS,Fm(n=[this]).call(n,fw(Array.prototype).call(arguments)))}},{key:"usePluginHooks",value:function(e,t,n){for(var i,r=arguments.length,o=new Array(r>3?r-3:0),a=3;a<r;a++)o[a-3]=arguments[a];return MS.call.apply(MS,Fm(i=[this]).call(i,fw(Array.prototype).call(arguments)))}},{key:"removePluginHooks",value:function(e,t,n){for(var i,r=arguments.length,o=new Array(r>3?r-3:0),a=3;a<r;a++)o[a-3]=arguments[a];return LS.call.apply(LS,Fm(i=[this]).call(i,fw(Array.prototype).call(arguments)))}},{key:"setUserActive",value:function(e,t){var n;"boolean"==typeof t&&t!==this.muted&&(this.addInnerOP("volumechange"),kT.typeOf(t)===Boolean&&(this.muted=t)),null===(n=GP)||void 0===n||n.setActive(this.playerId,e)}}],[{key:"debugger",get:function(){return mT.config.debug},set:function(e){mT.config.debug=e}},{key:"instManager",get:function(){return GP},set:function(e){GP=e}},{key:"getCurrentUserActivePlayerId",value:function(){var e;return null===(e=GP)||void 0===e?void 0:e.getActiveId()}},{key:"setCurrentUserActive",value:function(e,t){var n;null===(n=GP)||void 0===n||n.setActive(e,t)}},{key:"isHevcSupported",value:function(){return ST.isHevcSupported()}},{key:"probeConfigSupported",value:function(e){return ST.probeConfigSupported(e)}},{key:"install",value:function(e,t){n.plugins||(n.plugins={}),n.plugins[e]||(n.plugins[e]=t)}},{key:"use",value:function(e,t){n.plugins||(n.plugins={}),n.plugins[e]=t}}]),n}(wS);PC(WP,"defaultPreset",null),PC(WP,"XgVideoProxy",null),WP.instManager=BP.getInstance();function YP(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var XP=GE;An({target:"Function",proto:!0,forced:Function.bind!==XP},{bind:XP});var qP,$P,ZP=Vc("Function").bind,JP=se,QP=ZP,eA=Function.prototype,tA=n((function(e){var t=e.bind;return e===eA||JP(eA,e)&&t===eA.bind?QP:t}));function nA(e,t){var n;return(nA=dh?tA(n=dh).call(n):function(e,t){return e.__proto__=t,e})(e,t)}function iA(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Oc(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Ic(e,"prototype",{writable:!1}),t&&nA(e,t)}function rA(e){var t;return(rA=dh?tA(t=Fc).call(t):function(e){return e.__proto__||Fc(e)})(e)}function oA(){if("undefined"==typeof Reflect||!sC)return!1;if(sC.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(sC(Boolean,[],(function(){}))),!0}catch(e){return!1}}function aA(e){var t=oA();return function(){var n,i=rA(e);if(t){var r=rA(this).constructor;n=sC(i,arguments,r)}else n=i.apply(this,arguments);return function(e,t){if(t&&("object"===wc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return YP(e)}(this,n)}}function sA(e,t,n){var i;oA()?sA=tA(i=sC).call(i):sA=function(e,t,n){var i=[null];hh(i).apply(i,t);var r=new(tA(Function).apply(e,i));return n&&nA(r,n.prototype),r};return sA.apply(null,arguments)}function lA(e){var t="function"==typeof Rb?new Rb:void 0;return lA=function(e){if(null===e||(n=e,-1===Rm(i=Function.toString.call(n)).call(i,"[native code]")))return e;var n,i;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 sA(e,arguments,rA(this).constructor)}return r.prototype=Oc(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),nA(r,e)},lA(e)}var uA=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_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_BWAITING_TIMEOUT_ERROR=9002]="RUNTIME_BWAITING_TIMEOUT_ERROR",e[e.MODULE_LOAD_ERROR=110]="MODULE_LOAD_ERROR",e.UNKNOWN="UNKNOWN",e}(uA||{}),cA=(zy(qP={},2100,{messageTextKey:"NETWORK",level:"Error"}),zy(qP,2101,{messageTextKey:"NETWORK_TIMEOUT",level:"Error"}),zy(qP,2103,{messageTextKey:"NETWORK_FORBIDDEN",level:"Error"}),zy(qP,2104,{messageTextKey:"NETWORK_NOTFOUND",level:"Error"}),zy(qP,5101,{messageTextKey:"MEDIA_ERR_ABORTED",level:"Error"}),zy(qP,5102,{messageTextKey:"MEDIA_ERR_NETWORK",level:"Error"}),zy(qP,5103,{messageTextKey:"MEDIA_ERR_DECODE",level:"Error"}),zy(qP,5104,{messageTextKey:"MEDIA_ERR_SRC_NOT_SUPPORTED",level:"Error"}),zy(qP,5105,{messageTextKey:"MEDIA_ERR_CODEC_NOT_SUPPORTED",level:"Error"}),zy(qP,5106,{messageTextKey:"MEDIA_ERR_URL_EMPTY",level:"Error"}),zy(qP,110,{messageTextKey:"MODULE_LOAD_ERROR",level:"Fatal"}),zy(qP,7100,{messageTextKey:"DRM_LICENSE",level:"Fatal"}),qP),hA=(zy($P={},"manifest",{messageTextKey:"MANIFEST",level:"Error"}),zy($P,"network",{messageTextKey:"NETWORK",level:"Error"}),zy($P,"demux",{messageTextKey:"DEMUX",level:"Error"}),zy($P,"remux",{messageTextKey:"REMUX",level:"Error"}),zy($P,"media",{messageTextKey:"MEDIA",level:"Error"}),zy($P,"drm",{messageTextKey:"DRM",level:"Error"}),zy($P,"other",{messageTextKey:"OTHER",level:"Error"}),zy($P,"runtime",{messageTextKey:"RUNTIME",level:"Error"}),$P),fA=function(e){iA(n,e);var t=aA(n);function n(e,i){var r,o,a,s,l,u,c;mm(this,n);var h="string"==typeof e?{message:e}:e,f=null!==(r=null!==(o=null!==(a=null==i?void 0:i.getText(null==h?void 0:h.messageTextKey))&&void 0!==a?a:null==h?void 0:h.message)&&void 0!==o?o:null==h||null===(s=h.error)||void 0===s?void 0:s.message)&&void 0!==r?r:null==i?void 0:i.getText("UNKNOWN");return zy(YP(c=t.call(this,f)),"errorCode",void 0),zy(YP(c),"level",void 0),zy(YP(c),"ext",void 0),c.errorCode=null!==(l=null==h?void 0:h.errorCode)&&void 0!==l?l:"UNKNOWN",c.level=null!==(u=null==h?void 0:h.level)&&void 0!==u?u:"Error",c.ext=null==h?void 0:h.ext,c}return km(n)}(lA(Error));function dA(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return new fA(Ky(Ky({errorCode:e},cA[e]),t),n)}function pA(e,t){var n,i,r=cA[e.errorCode]||hA[e.errorType],o=e.errorCode;return new fA({messageTextKey:null==r?void 0:r.messageTextKey,message:null!==(n=null==e?void 0:e.message)&&void 0!==n?n:o,errorCode:o,level:null!==(i=null==r?void 0:r.level)&&void 0!==i?i:"Error",ext:e},t)}var vA=function(e){AC(n,e);var t=LC(n);function n(){return xC(this,n),t.apply(this,arguments)}return SC(n,[{key:"isEndedShow",get:function(){return this.config.isEndedShow},set:function(e){this.config.isEndedShow=e}},{key:"hide",value:function(){kT.addClass(this.root,"hide")}},{key:"show",value:function(e){kT.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(MT,(function(){e.isEndedShow&&kT.removeClass(e.root,"hide")})),this.config.hideCanplay?(this.once(FT,(function(){e.onTimeUpdate()})),this.on(QT,(function(){kT.removeClass(e.root,"hide"),kT.addClass(e.root,"xg-showplay"),e.once(FT,(function(){e.onTimeUpdate()}))}))):this.on(OT,(function(){kT.addClass(e.root,"hide")}))}},{key:"setConfig",value:function(e){var t=this;hw(e).forEach((function(n){t.config[n]=e[n]}));var n=this.config.poster;this.update(n)}},{key:"onTimeUpdate",value:function(){var e=this;this.player.currentTime?kT.removeClass(this.root,"xg-showplay"):this.once(FT,(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,n=this.config,i=n.poster,r=n.hideCanplay,o=n.fillMode,a=n.notHidden,s=this.getBgSize(o),l=i?Fm(e="background-image:url(".concat(i,");")).call(e,s):s;return Fm(t='<xg-poster class="xgplayer-poster '.concat(a?"xg-not-hidden":r?"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"}}}]),n}(JS);function gA(){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 yA(){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 mA={};function _A(e){var t;e?window.clearTimeout(e):Ub(t=hw(mA)).call(t,(function(e){window.clearTimeout(mA[e].id),delete mA[e]}))}var kA=function(e){AC(n,e);var t=LC(n);function n(e){var i;return xC(this,n),PC(OC(i=t.call(this,e)),"onPlayerReset",(function(){i.autoPlayStart=!1;var e="auto"===i.config.mode?"auto-hide":"hide";i.setAttr("data-state","play"),kT.removeClass(i.root,e),i.show()})),PC(OC(i),"onAutoplayStart",(function(){if(!i.autoPlayStart){var e="auto"===i.config.mode?"auto-hide":"hide";kT.addClass(i.root,e),i.autoPlayStart=!0,i.toggleTo("play")}})),i.autoPlayStart=!1,i}return SC(n,[{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,n=this.playerConfig;this.once(WT,(function(){n&&(n.lang&&"en"===n.lang?kT.addClass(t.root,"lang-is-en"):"jp"===n.lang&&kT.addClass(t.root,"lang-is-jp"))})),this.on(XT,this.onAutoplayStart),this.on(qT,(function(){var t="auto"===e.config.mode?"auto-hide":"hide";e.setAttr("data-state","play"),kT.removeClass(e.root,t),e.show()})),this.on(OT,(function(){e.toggleTo("play")})),this.on(LT,(function(){e.toggleTo("pause")})),this.on(gS,(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 n=e.player.paused;e.emitUserAction(t,"switch_play_pause",{props:"paused",from:n,to:!n})}}),this.bind(["click","touchend"],this.clickHandler)}},{key:"registerIcons",value:function(){return{startPlay:{icon:gA,class:"xg-icon-play"},startPause:{icon:yA,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(){kT.addClass(this.root,"hide")}},{key:"show",value:function(e){kT.removeClass(this.root,"hide")}},{key:"focusHide",value:function(){kT.addClass(this.root,"focus-hide")}},{key:"recover",value:function(){kT.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=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{start:null,end:null};return mA[e]&&window.clearTimeout(mA[e].id),mA[e]={},n.start&&n.start(),mA[e].id=window.setTimeout((function(){n.end&&n.end(),window.clearTimeout(mA[e].id),delete mA[e]}),t),mA[e].id}("pauseplay",400,{start:function(){kT.addClass(t.root,"interact"),t.show(),t.switchStatus(!0)},end:function(){kT.removeClass(t.root,"interact"),!e&&t.hide(),t._animateId=null}})}},{key:"endAnimate",value:function(){kT.removeClass(this.root,"interact"),_A(this._animateId),this._animateId=null}},{key:"switchPausePlay",value:function(e){var t=this.player;(e.cancelable&&e.preventDefault(),e.stopPropagation(),t.state<OP)||(this.player.paused||t.state!==NP?t.play():t.pause())}},{key:"onPlayPause",value:function(e){this.toggleTo(e)}},{key:"toggleTo",value:function(e){var t=this.config,n=this.player;if(n&&!(n.state<NP)&&this.autoPlayStart){if("show"===t.mode)return this.switchStatus(),void this.show();if("auto"!==t.mode){if(t.isShowPause&&n.paused&&!n.ended||t.isShowEnd&&n.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||n.ended)return;this.animate()}}else this.switchStatus()}}},{key:"destroy",value:function(){this.unbind(["click","touchend"],this.clickHandler),_A(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"}}}]),n}(JS),bA=function(e){AC(n,e);var t=LC(n);function n(){return xC(this,n),t.apply(this,arguments)}return SC(n,[{key:"render",value:function(){var e=this.config.innerHtml,t=kT.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 n="",i=1;i<=12;i++)n+='<div class="xgplayer-enter-bar'.concat(i,'"></div>');t.innerHTML='<div class="xgplayer-enter-spinner">'.concat(n,"</div>")}return t}}],[{key:"pluginName",get:function(){return"enter"}},{key:"defaultConfig",get:function(){return{innerHtml:"",logo:""}}}]),n}(JS);function wA(e,t,n){try{var i,r;return Fm(i=Fm(r=' <div class="xg-tips '.concat(n?"hide":" ",'" lang-key="')).call(r,e.i18nKeys[t],'">\n ')).call(i,e.i18n[t],"\n </div>")}catch(o){return'<div class="xg-tips hide"></div>'}}var EA=function(e){AC(n,e);var t=LC(n);function n(){return xC(this,n),t.apply(this,arguments)}return SC(n,[{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 Fm(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:YS.CONTROLS_RIGHT,index:10}}}]),n}(JS);function CA(e){var t=_x(e);return-1===cw(e).call(e,"%")&&!Lw(t)&&t}var xA=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],TA=xA.length;function SA(e){if("string"==typeof e&&(e=document.querySelector(e)),e&&"object"===CC(e)&&e.nodeType){var t=function(e){return window.getComputedStyle(e)}(e);if("none"===t.display)return function(){for(var e={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},t=0;t<TA;t++)e[xA[t]]=0;return e}();var n={};n.width=e.offsetWidth,n.height=e.offsetHeight;for(var i=n.isBorderBox="border-box"===t.boxSizing,r=0;r<TA;r++){var o=xA[r],a=t[o],s=_x(a);n[o]=Lw(s)?0:s}var l=n.paddingLeft+n.paddingRight,u=n.paddingTop+n.paddingBottom,c=n.marginLeft+n.marginRight,h=n.marginTop+n.marginBottom,f=n.borderLeftWidth+n.borderRightWidth,d=n.borderTopWidth+n.borderBottomWidth,p=i,v=CA(t.width);!1!==v&&(n.width=v+(p?0:l+f));var g=CA(t.height);return!1!==g&&(n.height=g+(p?0:u+d)),n.innerWidth=n.width-(l+f),n.innerHeight=n.height-(u+d),n.outerWidth=n.width+c,n.outerHeight=n.height+h,n}}function PA(e,t){for(var n=0;n<e.length;n++){var i=e[n];if(i.identifier===t)return i}}var AA="dragStart",IA="dragMove",RA="dragEnded",OA={mousedown:["mousemove","mouseup"],touchstart:["touchmove","touchend","touchcancel"],pointerdown:["pointermove","pointerup","pointercancel"]},MA=function(e){AC(n,e);var t=LC(n);function n(e){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return xC(this,n),(i=t.call(this)).isEnabled=!0,i.isDragging=!1,i.isDown=!1,i.position={},i.downPoint={},i.dragPoint={x:0,y:0},i.startPos={x:0,y:0},i._root=e instanceof Element?e:document.querySelector(e),i._handlerDom=r.handle instanceof Element?r.handle:document.querySelector(r.handle),i._root&&i._handlerDom?(i._bindStartEvent(),i):MC(i)}return SC(n,[{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)]),Ub(e=OA[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 n=OA[this._startKey];Ub(n).call(n,(function(e){window.addEventListener(e,t["on".concat(e)])})),this._boundPointerEvents=n}}},{key:"_unbindPostStartEvents",value:function(){var e,t=this;this._boundPointerEvents&&(Ub(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=Fm(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=PA(e.changedTouches,this.touchIdentifier);t&&this.dragMove(e,t)}},{key:"ontouchend",value:function(e){var t=PA(e.changedTouches,this.touchIdentifier);t&&this.dragEnd(e,t),e.preventDefault()}},{key:"ontouchcancel",value:function(e){var t=PA(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 n=SA(this._root);this.startPos.x=this.position.x,this.startPos.y=this.position.y,this.startPos.maxY=window.innerHeight-n.height,this.startPos.maxX=window.innerWidth-n.width,this.setLeftTop(),this.isDown=!0,this._bindPostStartEvents(e)}}},{key:"dragRealStart",value:function(e,t){this.isDragging=!0,this.animate(),this.emit(AA,this.startPos)}},{key:"dragEnd",value:function(e,t){this._root&&(this._unbindPostStartEvents(),this.isDragging&&(this._root.style.transform="",this.setLeftTop(),this.emit(RA)),this.presetInfo())}},{key:"_dragPointerMove",value:function(e,t){var n={x:t.pageX-this.downPoint.pageX,y:t.pageY-this.downPoint.pageY};return!this.isDragging&&this.hasDragStarted(n)&&this.dragRealStart(e,t),n}},{key:"dragMove",value:function(e,t){if(e=e||window.event,this.isDown){var n=this.startPos,i=n.x,r=n.y,o=this._dragPointerMove(e,t),a=o.x,s=o.y;a=this.checkContain("x",a,i),s=this.checkContain("y",s,r),this.position.x=i+a,this.position.y=r+s,this.dragPoint.x=a,this.dragPoint.y=s,this.emit(IA,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,n){return t+n<0?0-n:"x"===e&&t+n>this.startPos.maxX?this.startPos.maxX-n:"y"===e&&t+n>this.startPos.maxY?this.startPos.maxY-n:t}},{key:"_getPosition",value:function(){var e=window.getComputedStyle(this._root),t=this._getPositionCoord(e.left,"width"),n=this._getPositionCoord(e.top,"height");this.position.x=Lw(t)?0:t,this.position.y=Lw(n)?0:n,this._addTransformPosition(e)}},{key:"_addTransformPosition",value:function(e){var t=e.transform;if(0===cw(t).call(t,"matrix")){var n=t.split(","),i=0===cw(t).call(t,"matrix3d")?12:4,r=nE(n[i],10),o=nE(n[i+1],10);this.position.x+=r,this.position.y+=o}}},{key:"_getPositionCoord",value:function(e,t){if(-1!==cw(e).call(e,"%")){var n=SA(this._root.parentNode);return n?_x(e)/100*n[t]:0}return nE(e,10)}}]),n}(BC),LA=function(e){AC(n,e);var t=LC(n);function n(e){var i;xC(this,n),PC(OC(i=t.call(this,e)),"onCancelClick",(function(e){i.exitMini(),i.isClose=!0})),PC(OC(i),"onCenterClick",(function(e){var t=OC(i).player;t.paused?t.play():t.pause()})),PC(OC(i),"onScroll",(function(e){if(!(!window.scrollY&&0!==window.scrollY||Math.abs(window.scrollY-i.pos.scrollY)<50)){var t=nE(kT.getCss(i.player.root,"height"));t+=i.config.scrollTop,i.pos.scrollY=window.scrollY,window.scrollY>t+5?!i.isMini&&!i.isClose&&i.getMini():window.scrollY<=t&&(i.isMini&&i.exitMini(),i.isClose=!1)}})),i.isMini=!1,i.isClose=!1;var r=OC(i).config;return i.pos={left:r.left<0?window.innerWidth-r.width-20:r.left,top:r.top<0?window.innerHeight-r.height-20:r.top,height:i.config.height,width:i.config.width,scrollY:window.scrollY||0},i.lastStyle=null,i}return SC(n,[{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(LT,(function(){e.setAttr("data-state","pause")})),this.on(OT,(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 n={config:{onClick:function(){e.getMini()}}};t.controls.registerPlugin(EA,n,EA.pluginName)}var i=kT.checkTouchSupport()?"touchend":"click";this.bind(".mini-cancel-btn",i,this.onCancelClick),this.bind(".play-icon",i,this.onCenterClick),this.config.disableDrag||(this._draggabilly=new MA(this.player.root,{handle:this.root})),this.config.isScrollSwitch&&window.addEventListener("scroll",this.onScroll)}}},{key:"registerIcons",value:function(){return{play:{icon:gA,class:"xg-icon-play"},pause:{icon:yA,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 n=this.player,i=this.playerConfig,r=this.config.target||this.player.root;this.lastStyle={},kT.addClass(n.root,"xgplayer-mini"),Ub(e=["width","height","top","left"]).call(e,(function(e){t.lastStyle[e]=r.style[e],r.style[e]="".concat(t.pos[e],"px")})),i.fluid&&(r.style["padding-top"]=""),this.emit(aS,!0),n.isMini=this.isMini=!0}}},{key:"exitMini",value:function(){var e=this;if(!this.isMini)return!1;var t,n=this.player,i=this.playerConfig,r=this.config.target||this.player.root;(kT.removeClass(n.root,"xgplayer-mini"),this.lastStyle)&&Ub(t=hw(this.lastStyle)).call(t,(function(t){r.style[t]=e.lastStyle[t]}));this.lastStyle=null,i.fluid&&(n.root.style.width="100%",n.root.style.height="0",n.root.style["padding-top"]="".concat(100*i.height/i.width,"%")),this.emit(aS,!1),this.isMini=n.isMini=!1}},{key:"destroy",value:function(){window.removeEventListener("scroll",this.onScroll);var e=kT.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(wA(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}}}]),n}(JS),DA={mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mousemove:"onMouseMove"},NA=["videoClick","videoDbClick"],FA=function(e){AC(n,e);var t=LC(n);function n(){var e,i;xC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return PC(OC(i=t.call.apply(t,Fm(e=[this]).call(e,o))),"onMouseMove",(function(e){var t=OC(i),n=t.player,r=t.playerConfig;n.isActive||(n.focus({autoHide:!r.closeDelayBlur}),!r.closeFocusVideoFocus&&n.media.focus())})),PC(OC(i),"onMouseEnter",(function(e){var t=OC(i),n=t.playerConfig,r=t.player;!n.closeFocusVideoFocus&&r.media.focus(),n.closeDelayBlur?r.focus({autoHide:!1}):r.focus(),i.emit(nS)})),PC(OC(i),"onMouseLeave",(function(e){var t=i.playerConfig,n=t.closePlayerBlur,r=t.leavePlayerTime,o=t.closeDelayBlur;n||o||(r?i.player.focus({autoHide:!0,delay:r}):i.player.blur({ignorePaused:!0})),i.emit(tS)})),PC(OC(i),"onVideoClick",(function(e){var t=OC(i),n=t.player,r=t.playerConfig;e.target&&r.closeVideoClick||e.target!==n.root&&e.target!==n.media&&e.target!==n.innerContainer&&e.target!==n.media.__canvas||(e.preventDefault(),r.closeVideoStopPropagation||e.stopPropagation(),i._clickCount++,i.clickTimer&&(clearTimeout(i.clickTimer),i.clickTimer=null),i.clickTimer=setTimeout((function(){i._clickCount&&(i._clickCount--,FS(OC(i),NA[0],(function(e,t){i.switchPlayPause(t.e)}),{e:e,paused:n.paused}),clearTimeout(i.clickTimer),i.clickTimer=null)}),300))})),PC(OC(i),"onVideoDblClick",(function(e){var t=OC(i),n=t.player,r=t.playerConfig;r.closeVideoDblclick||!e.target||e.target!==n.media&&e.target!==n.media.__canvas||(!r.closeVideoClick&&i._clickCount<2?i._clickCount=0:(i._clickCount=0,i.clickTimer&&(clearTimeout(i.clickTimer),i.clickTimer=null),e.preventDefault(),e.stopPropagation(),FS(OC(i),NA[1],(function(e,t){i.emitUserAction(t.e,"switch_fullscreen",{props:"fullscreen",from:n.fullscreen,to:!n.fullscreen}),n.fullscreen?n.exitFullscreen():n.getFullscreen()}),{e:e,fullscreen:n.fullscreen})))})),i}return SC(n,[{key:"afterCreate",value:function(){var e=this;this._clickCount=0,Ub(NA).call(NA,(function(t){e.__hooks[t]=null})),"mobile"===this.playerConfig.isMobileSimulateMode||"mobile"===ST.device&&!ST.os.isIpad||this.initEvents()}},{key:"initEvents",value:function(){var e,t=this,n=this.player,i=n.media,r=n.root,o=this.playerConfig.enableContextmenu;r&&r.addEventListener("click",this.onVideoClick,!1),r&&r.addEventListener("dblclick",this.onVideoDblClick,!1),Ub(e=hw(DA)).call(e,(function(e){r.addEventListener(e,t[DA[e]],!1)})),!o&&i&&i.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,n=this.player,i=n.video,r=n.root;this.clickTimer&&clearTimeout(this.clickTimer),r.removeEventListener("click",this.onVideoClick,!1),r.removeEventListener("dblclick",this.onVideoDblClick,!1),i.removeEventListener("contextmenu",this.onContextmenu,!1),Ub(e=hw(DA)).call(e,(function(e){r.removeEventListener(e,t[DA[e]],!1)}))}}],[{key:"pluginName",get:function(){return"pc"}},{key:"defaultConfig",get:function(){return{}}}]),n}(HS),UA="press",HA="pressend",jA="doubleclick",BA="click",zA="touchmove",VA="touchstart",KA="touchend",GA={start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},WA={start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseleave"};function YA(e){return e&&e.length>0?e[e.length-1]:null}var XA=function(){function e(t){var n,i=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{eventType:"touch"};xC(this,e),PC(this,"onTouchStart",(function(e){var t=i._pos,n=i.root,r=YA(e.touches);t.x=r?nE(r.pageX,10):e.pageX,t.y=r?nE(r.pageX,10):e.pageX,t.start=!0,i.__setPress(e),n.addEventListener(i.events.end,i.onTouchEnd),n.addEventListener(i.events.cancel,i.onTouchCancel),n.addEventListener(i.events.move,i.onTouchMove),i.trigger(VA,e)})),PC(this,"onTouchCancel",(function(e){i.onTouchEnd(e)})),PC(this,"onTouchEnd",(function(e){var t=i._pos,n=i.root;i.__clearPress(),n.removeEventListener(i.events.cancel,i.onTouchCancel),n.removeEventListener(i.events.end,i.onTouchEnd),n.removeEventListener(i.events.move,i.onTouchMove),e.moving=t.moving,e.press=t.press,t.press&&i.trigger(HA,e),i.trigger(KA,e),!t.press&&!t.moving&&i.__setDb(e),t.press=!1,t.start=!1,t.moving=!1})),PC(this,"onTouchMove",(function(e){var t=i._pos,n=i.config,r=YA(e.touches),o=r?nE(r.pageX,10):e.pageX,a=r?nE(r.pageY,10):e.pageX,s=o-t.x,l=a-t.y;Math.abs(l)<n.miniStep&&Math.abs(s)<n.miniStep||(i.__clearPress(),t.press&&i.trigger(HA,e),t.press=!1,t.moving=!0,i.trigger(zA,e))})),this._pos={moving:!1,start:!1,x:0,y:0},this.config={pressDelay:600,dbClickDelay:200,disablePress:!1,disableDbClick:!1,miniStep:2,needPreventDefault:!0},Ub(n=hw(r)).call(n,(function(e){i.config[e]=r[e]})),this.root=t,this.events="mouse"===r.eventType?WA:GA,this.pressIntrvalId=null,this.dbIntrvalId=null,this.__handlers={},this._initEvent()}return SC(e,[{key:"_initEvent",value:function(){this.root.addEventListener(this.events.start,this.onTouchStart)}},{key:"__setPress",value:function(e){var t=this,n=this.config;this.pressIntrvalId&&this.__clearPress(),this.pressIntrvalId=setTimeout((function(){t.trigger(UA,e),t._pos.press=!0,t.__clearPress()}),n.pressDelay)}},{key:"__clearPress",value:function(){window.clearTimeout(this.pressIntrvalId),this.pressIntrvalId=null}},{key:"__setDb",value:function(e){var t=this,n=this.config;if(this.dbIntrvalId)return this.__clearDb(),void this.trigger(jA,e);this.dbIntrvalId=setTimeout((function(){t.__clearDb(),t._pos.start||t._pos.press||t._pos.moving||t.trigger(BA,e)}),n.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 n,i=this.__handlers[e],r=-1,o=0;o<i.length;o++)if(i[o]===t){r=o;break}if(r>=0)Mw(n=this.__handlers[e]).call(n,r,1)}}},{key:"trigger",value:function(e,t){var n;this.__handlers[e]&&Ub(n=this.__handlers[e]).call(n,(function(n){try{n(t)}catch(HN){console.error("trigger>>:".concat(e),HN)}}))}},{key:"destroy",value:function(){var e=this,t={touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"};hw(t).forEach((function(n){e.root.removeEventListener(n,e[t[n]])}))}}]),e}();function qA(){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 $A="auto",ZA="seeking",JA="playbackrate",QA=["videoClick","videoDbClick"],eI=function(e){AC(n,e);var t=LC(n);function n(e){var i;return xC(this,n),PC(OC(i=t.call(this,e)),"onTouchStart",(function(e){var t=OC(i),n=t.player,r=t.config,o=t.pos,a=t.playerConfig,s=i.getTouche(e);if(s&&!r.disableGesture&&i.duration>0&&!n.ended){o.isStart=!0,i.timer&&clearTimeout(i.timer),kT.checkIsFunction(a.disableSwipeHandler)&&a.disableSwipeHandler(),Wm(i).call(i,".xg-dur").innerHTML=kT.format(i.duration);var l=i.root.getBoundingClientRect();90===n.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 u=nE(s.pageX-o.left,10),c=nE(s.pageY-o.top,10);o.x=90===n.rotateDeg?c:u,o.y=90===n.rotateDeg?u:c,o.scopeL=r.scopeL*o.width,o.scopeR=(1-r.scopeR)*o.width,o.scopeM1=o.width*(1-r.scopeM)/2,o.scopeM2=o.width-o.scopeM1}})),PC(OC(i),"onTouchMove",(function(e){var t=i.getTouche(e),n=OC(i),r=n.pos,o=n.config,a=n.player;if(t&&!o.disableGesture&&i.duration&&r.isStart){var s=o.miniMoveStep,l=o.hideControlsActive,u=nE(t.pageX-r.left,10),c=nE(t.pageY-r.top,10),h=90===a.rotateDeg?c:u,f=90===a.rotateDeg?u:c;if(Math.abs(h-r.x)>s||Math.abs(f-r.y)>s){var d=h-r.x,p=f-r.y,v=r.scope;if(-1===v&&(0===(v=i.checkScope(h,f,d,p,r))&&(l?a.blur():a.focus({autoHide:!1}),!r.time&&(r.time=nE(1e3*a.currentTime,10)+1e3*i.timeOffset)),r.scope=v),-1===v||v>0&&!o.gestureY||0===v&&!o.gestureX)return;i.executeMove(d,p,v,r.width,r.height),r.x=h,r.y=f}}})),PC(OC(i),"onTouchEnd",(function(e){var t=OC(i),n=t.player,r=t.pos,o=t.playerConfig;if(setTimeout((function(){n.getPlugin("progress")&&n.getPlugin("progress").resetSeekState()}),10),r.isStart){r.scope>-1&&e.cancelable&&e.preventDefault();var a=i.config,s=a.disableGesture,l=a.gestureX;!s&&l?i.endLastMove(r.scope):r.time=0,r.scope=-1,i.resetPos(),kT.checkIsFunction(o.enableSwipeHandler)&&o.enableSwipeHandler(),i.changeAction($A)}})),PC(OC(i),"onRootTouchMove",(function(e){!i.config.disableGesture&&i.config.gestureX&&i.checkIsRootTarget(e)&&(e.stopPropagation(),i.pos.isStart?i.onTouchMove(e):i.onTouchStart(e))})),PC(OC(i),"onRootTouchEnd",(function(e){i.pos.scope>-1&&i.onTouchEnd(e)})),i.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},i.timer=null,i}return SC(n,[{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:qA,class:"xg-seek-pre"}}}},{key:"afterCreate",value:function(){var e,t=this;Ub(QA).call(QA,(function(e){t.__hooks[e]=null}));var n=this.playerConfig,i=this.config,r=this.player;!0===n.closeVideoDblclick&&(i.closedbClick=!0),this.resetPos(),kT.isUndefined(n.disableGesture)||(i.disableGesture=!!n.disableGesture),this.appendChild(".xg-seek-icon",this.icons.seekTipIcon),this.xgMask=kT.createDom("xg-mask","",{},"xgmask"),r.root.appendChild(this.xgMask),this.initCustomStyle(),this.registerThumbnail();var o="mouse"===this.domEventType?"mouse":"touch";this.touch=new XA(this.root,{eventType:o,needPreventDefault:!this.config.disableGesture}),this.root.addEventListener("contextmenu",(function(e){e.preventDefault()})),r.root.addEventListener("touchmove",this.onRootTouchMove,!0),r.root.addEventListener("touchend",this.onRootTouchEnd,!0),r.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(jT,(function(){var e=t.player,n=t.config;e.duration>0&&1e3*e.duration<n.moveDuration&&(n.moveDuration=1e3*e.duration)})),this.on([HT,MT],(function(){var e=t.pos,n=e.time;!e.isStart&&n>0&&(t.pos.time=0)}));var s={touchstart:"onTouchStart",touchmove:"onTouchMove",touchend:"onTouchEnd",press:"onPress",pressend:"onPressEnd",click:"onClick",doubleclick:"onDbClick"};if(Ub(e=hw(s)).call(e,(function(e){t.touch.on(e,(function(n){t[s[e]](n)}))})),!i.disableActive){var l=r.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($A)}))})))}}},{key:"registerThumbnail",value:function(){var e=this.player.plugins.thumbnail;if(e&&e.usable){this.thumbnail=e.createThumbnail(null,"mobile-thumbnail");var t=Wm(this).call(this,".time-preview");t.insertBefore(this.thumbnail,t.children[0])}}},{key:"initCustomStyle",value:function(){var e=(this.playerConfig||{}).commonStyle,t=e.playedColor,n=e.progressColor,i=e.timePreviewStyle,r=e.curTimeColor,o=e.durationColor;t&&(Wm(this).call(this,".xg-curbar").style.backgroundColor=t);n&&(Wm(this).call(this,".xg-bar").style.backgroundColor=n);if(i){var a=Wm(this).call(this,".time-preview");hw(i).forEach((function(e){a.style[e]=i[e]}))}var s=r||t,l=o;s&&(Wm(this).call(this,".xg-cur").style.color=s),l&&(Wm(this).call(this,".xg-dur").style.color=l),this.config.disableTimeProgress&&kT.addClass(Wm(this).call(this,".xg-timebar"),"hide")}},{key:"resetPos",value:function(){var e,t=this;this.pos?(this.pos.isStart=!1,this.pos.scope=-1,Ub(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 n=t.plugins.start;n&&n.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,n,i,r){var o=r.width,a=-1;if(e<0||e>o)return a;var s=0===i?Math.abs(n):Math.abs(n/i);return Math.abs(n)>0&&s>=1.73&&e>r.scopeM1&&e<r.scopeM2?a=0:(0===Math.abs(n)||s<=.57)&&(a=e<r.scopeL?1:e>r.scopeR?2:3),a}},{key:"executeMove",value:function(e,t,n,i,r){switch(n){case 0:this.updateTime(e/i*this.config.scopeM);break;case 1:this.updateBrightness(t/r);break;case 2:ST.os.isIos||this.updateVolume(t/r)}}},{key:"endLastMove",value:function(e){var t=this,n=this.pos,i=this.player,r=this.config,o=(n.time-this.timeOffset)/1e3;if(0===e)i.seek(Number(o).toFixed(1)),r.hideControlsEnd?i.blur():i.focus(),this.timer=setTimeout((function(){t.pos.time=0}),500);this.changeAction($A)}},{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,n=this.config,i=this.playerConfig;t.state<NP?i.closeVideoClick||(this.sendUseAction(kT.createEvent("click")),t.play()):!n.closedbClick||i.closeVideoClick?t.isActive?t.blur():t.focus():i.closeVideoClick||((t.isActive||n.focusVideoClick)&&(this.sendUseAction(kT.createEvent("click")),this.switchPlayPause()),t.focus())}},{key:"dbClickHandler",value:function(e){var t=this.config,n=this.player;!t.closedbClick&&n.state>=NP&&(this.sendUseAction(kT.createEvent("dblclick")),this.switchPlayPause())}},{key:"onClick",value:function(e){var t=this,n=this.player;FS(this,QA[0],(function(e,n){t.clickHandler(n.e)}),{e:e,paused:n.paused})}},{key:"onDbClick",value:function(e){var t=this,n=this.player;FS(this,QA[1],(function(e,n){t.dbClickHandler(n.e)}),{e:e,paused:n.paused})}},{key:"onPress",value:function(e){var t=this.pos,n=this.config,i=this.player;n.disablePress||(t.rate=this.player.playbackRate,this.emitUserAction("press","change_rate",{prop:"playbackRate",from:i.playbackRate,to:n.pressRate}),i.playbackRate=n.pressRate,this.changeAction(JA))}},{key:"onPressEnd",value:function(e){var t=this.pos,n=this.config,i=this.player;n.disablePress||(this.emitUserAction("pressend","change_rate",{prop:"playbackRate",from:i.playbackRate,to:t.rate}),i.playbackRate=t.rate,t.rate=1,this.changeAction($A))}},{key:"updateTime",value:function(e){var t=this.player,n=this.config,i=this.player.duration;e=Number(e.toFixed(4));var r=nE(e*n.moveDuration,10)+this.timeOffset;r=(r+=this.pos.time)<0?0:r>1e3*i?1e3*i-200:r,t.getPlugin("time")&&t.getPlugin("time").updateTime(r/1e3),t.getPlugin("progress")&&t.getPlugin("progress").updatePercent(r/1e3/this.duration,!0),this.activeSeekNote(r/1e3,e>0),n.isTouchingSeek&&t.seek(Number((r-this.timeOffset)/1e3).toFixed(1)),this.pos.time=r}},{key:"updateVolume",value:function(e){this.player.rotateDeg&&(e=-e);var t=this.player,n=this.pos;if(e=nE(100*e,10),n.volume+=e,!(Math.abs(n.volume)<10)){var i=nE(10*t.volume,10)-nE(n.volume/10,10);i=i>10?10:i<1?0:i,t.volume=i/10,n.volume=0}}},{key:"updateBrightness",value:function(e){var t=this.pos,n=this.config,i=this.xgMask;if(n.darkness){this.player.rotateDeg&&(e=-e);var r=t.light+.8*e;r=r>n.maxDarkness?n.maxDarkness:r<0?0:r,i&&(i.style.backgroundColor="rgba(0,0,0,".concat(r,")")),t.light=r}}},{key:"activeSeekNote",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.player,i=this.config,r=!(this.duration!==1/0&&this.duration>0);if(e&&"number"==typeof e&&!r&&!i.disableActive){e<0?e=0:e>n.duration&&(e=n.duration-.2),this.changeAction(ZA);var o=n.plugins.start;if(o&&o.focusHide(),Wm(this).call(this,".xg-dur").innerHTML=kT.format(this.duration),Wm(this).call(this,".xg-cur").innerHTML=kT.format(e),Wm(this).call(this,".xg-curbar").style.width="".concat(e/this.duration*100,"%"),t)kT.removeClass(Wm(this).call(this,".xg-seek-show"),"xg-back");else kT.addClass(Wm(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<LP)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,n,i="normal"!==this.config.gradient?"gradient ".concat(this.config.gradient):"gradient";return Fm(e=Fm(t=Fm(n='\n <xg-trigger class="trigger">\n <div class="'.concat(i,'"></div>\n <div class="time-preview">\n <div class="xg-seek-show ')).call(n,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}}}]),n}(JS);An({target:"String",proto:!0},{repeat:WC});var tI=Vc("String").repeat,nI=se,iI=tI,rI=String.prototype,oI=n((function(e){var t=e.repeat;return"string"==typeof e||e===rI||nI(rI,e)&&t===rI.repeat?iI:t}));function aI(e){var t=e.tagName;return!("INPUT"!==t&&"TEXTAREA"!==t&&!e.isContentEditable)}var sI=function(e){AC(n,e);var t=LC(n);function n(){var e,i;xC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return PC(OC(i=t.call.apply(t,Fm(e=[this]).call(e,o))),"onBodyKeyDown",(function(e){if(i.player){var t=e||window.event,n=t.keyCode,r=OC(i),o=r._keyState,a=r.player,s=i.config,l=s.disable,u=s.disableBodyTrigger,c=s.isIgnoreUserActive;l||u||!a.isUserActive&&!c||aI(t.target)||!i.checkIsVisible()||t.metaKey||t.altKey||t.ctrlKey?o.isBodyKeyDown=!1:(oI(e)||o.isKeyDown||((t.target===document.body||i.config.isGlobalTrigger&&!aI(t.target))&&i.checkCode(n,!0)&&(o.isBodyKeyDown=!0),document.addEventListener("keyup",i.onBodyKeyUp)),o.isBodyKeyDown&&i.handleKeyDown(t))}})),PC(OC(i),"onBodyKeyUp",(function(e){i.player&&(document.removeEventListener("keyup",i.onBodyKeyUp),i.handleKeyUp(e))})),PC(OC(i),"onKeydown",(function(e){if(i.player){var t=e||window.event,n=OC(i)._keyState;if(!oI(t)){if(i.config.disable||i.config.disableRootTrigger||t.metaKey||t.altKey||t.ctrlKey)return;!t||37!==t.keyCode&&!i.checkCode(t.keyCode)||t.target!==i.player.root&&t.target!==i.player.video&&t.target!==i.player.controls.el||(n.isKeyDown=!0),i.player.root.addEventListener("keyup",i.onKeyup)}n.isKeyDown&&i.handleKeyDown(t)}})),PC(OC(i),"onKeyup",(function(e){i.player&&(i.player.root.removeEventListener("keyup",i.onKeyup),i.handleKeyUp(e))})),i}return SC(n,[{key:"mergekeyCodeMap",value:function(){var e,t=this,n=this.config.keyCodeMap;n&&Ub(e=hw(n)).call(e,(function(e){var i;t.keyCodeMap[e]?Ub(i=["keyCode","action","disable","pressAction","disablePress","isBodyTarget"]).call(i,(function(i){n[e][i]&&(t.keyCodeMap[e][i]=n[e][i])})):t.keyCodeMap[e]=n[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;hw(e).forEach((function(n){t.config[n]=e[n]}))}},{key:"checkIsVisible",value:function(){if(!this.config.checkVisible)return!0;var e=this.player.root.getBoundingClientRect(),t=e.height,n=e.top,i=e.bottom,r=window.innerHeight;return!(n<0&&n<0-.9*t||i>0&&i-r>.9*t)}},{key:"checkCode",value:function(e,t){var n,i=this,r=!1;return Ub(n=hw(this.keyCodeMap)).call(n,(function(n){i.keyCodeMap[n]&&e===i.keyCodeMap[n].keyCode&&!i.keyCodeMap[n].disable&&(r=!t||t&&!i.keyCodeMap[n].noBodyTarget)})),r}},{key:"downVolume",value:function(e){var t=this.player;if(!(t.volume<=0)){var n=_x((t.volume-.1).toFixed(1)),i={volume:{from:t.volume,to:n}};this.emitUserAction(e,"change_volume",{props:i}),t.volume=n>=0?n:0}}},{key:"upVolume",value:function(e){var t=this.player;if(!(t.volume>=1)){var n=_x((t.volume+.1).toFixed(1)),i={volume:{from:t.volume,to:n}};this.emitUserAction(e,"change_volume",{props:i}),t.volume=n<=1?n:1}}},{key:"seek",value:function(e){var t=this.player,n=t.currentTime,i=t.offsetCurrentTime,r=t.duration,o=t.offsetDuration,a=t.timeSegments,s=i>-1?i:n,l=o||r,u=oI(e)&&this.seekStep>=4?nE(this.seekStep/2,10):this.seekStep;s+u<=l?s+=u:s=l;var c=kT.getCurrentTimeByOffset(s,a),h={currentTime:{from:n,to:c}};this.emitUserAction(e,"seek",{props:h}),this.player.currentTime=c}},{key:"seekBack",value:function(e){var t=this.player,n=t.currentTime,i=t.offsetCurrentTime,r=t.timeSegments,o=(i>-1?i:n)-(oI(e)?nE(this.seekStep/2,10):this.seekStep);o<0&&(o=0);var a={currentTime:{from:n,to:o=kT.getCurrentTimeByOffset(o,r)}};this.emitUserAction(e,"seek",{props:a}),this.player.currentTime=o}},{key:"changePlaybackRate",value:function(e){var t=this._keyState,n=this.config,i=this.player;0===t.playbackRate&&(t.playbackRate=i.playbackRate,i.playbackRate=n.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,n=t.fullscreen,i=t.cssfullscreen;n&&(this.emitUserAction("keyup","switch_fullscreen",{prop:"fullscreen",from:n,to:!n}),t.exitFullscreen()),i&&(this.emitUserAction("keyup","switch_css_fullscreen",{prop:"cssfullscreen",from:i,to:!i}),t.exitCssFullscreen())}},{key:"handleKeyDown",value:function(e){var t=this._keyState;if(oI(e)){t.isPress=!0;var n=Date.now();if(n-t.tt<200)return;t.tt=n}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,n){for(var i,r=hw(this.keyCodeMap),o=0;o<r.length;o++){var a=this.keyCodeMap[r[o]],s=a.action,l=a.keyCode,u=a.disable,c=a.pressAction,h=a.disablePress;if(l===e){if(!(u||n&&h)){var f=n&&c||s;"function"==typeof f?s(t,this.player,n):"string"==typeof f&&"function"==typeof this[f]&&this[f](t,this.player,n),this.emit(pS,EC({key:r[o],target:t.target,isPress:n},this.keyCodeMap[r[o]]))}(i=t).preventDefault(),i.returnValue=!1,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}}}]),n}(HS);function lI(){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 uI=function(e){AC(n,e);var t=LC(n);function n(){return xC(this,n),t.apply(this,arguments)}return SC(n,[{key:"registerIcons",value:function(){return{loadingIcon:lI}}},{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:YS.ROOT}}}]),n}(JS),cI=An,hI=ea.findIndex,fI="findIndex",dI=!0;fI in[]&&Array(1)[fI]((function(){dI=!1})),cI({target:"Array",proto:!0,forced:dI},{findIndex:function(e){return hI(this,e,arguments.length>1?arguments[1]:void 0)}});var pI=Vc("Array").findIndex,vI=se,gI=pI,yI=Array.prototype,mI=n((function(e){var t=e.findIndex;return e===yI||vI(yI,e)&&t===yI.findIndex?gI:t})),_I=function(e){AC(n,e);var t=LC(n);function n(){var e,i;xC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return PC(OC(i=t.call.apply(t,Fm(e=[this]).call(e,o))),"_onMouseenter",(function(e){i.emit("icon_mouseenter",{pluginName:i.pluginName})})),PC(OC(i),"_onMouseLeave",(function(e){i.emit("icon_mouseleave",{pluginName:i.pluginName})})),i}return SC(n,[{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)}}]),n}(JS),kI=function(e){AC(n,e);var t=LC(n);function n(){var e,i;xC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return PC(OC(i=t.call.apply(t,Fm(e=[this]).call(e,o))),"btnClick",(function(e){e.preventDefault(),e.stopPropagation();var t=OC(i).player;return i.emitUserAction(e,"switch_play_pause",{prop:"paused",from:t.paused,to:!t.paused}),t.ended?t.replay():t.paused?(t.play(),i.animate(!1)):(t.pause(),i.animate(!0)),!1})),i}return SC(n,[{key:"afterCreate",value:function(){DC(IC(n.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([OT,LT,DT,VT],(function(){e.animate(t.paused)}))}},{key:"registerIcons",value:function(){return{play:{icon:gA,class:"xg-icon-play"},pause:{icon:yA,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,n=Wm(this).call(this,".xg-tips");e?(this.setAttr("data-state","pause"),n&&this.changeLangTextKey(n,t.PLAY_TIPS)):(this.setAttr("data-state","play"),n&&this.changeLangTextKey(n,t.PAUSE_TIPS))}}},{key:"destroy",value:function(){DC(IC(n.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(wA(this,"PLAY_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"play"}},{key:"defaultConfig",get:function(){return{position:YS.CONTROLS_LEFT,index:0,disable:!1}}}]),n}(_I);function bI(){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 wI=function(e){AC(n,e);var t=LC(n);function n(){return xC(this,n),t.apply(this,arguments)}return SC(n,[{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:bI,class:"xg-fullscreen-back"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(this.root,e.screenBack)}},{key:"show",value:function(){kT.addClass(this.root,"show")}},{key:"hide",value:function(){kT.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:YS.ROOT_TOP,index:0}}}]),n}(JS);function EI(){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 CI(){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 xI=function(e){AC(n,e);var t=LC(n);function n(){var e,i;xC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return PC(OC(i=t.call.apply(t,Fm(e=[this]).call(e,o))),"_onOrientationChange",(function(e){i.player.fullscreen&&i.config.rotateFullscreen&&(90===window.orientation||-90===window.orientation?i.player.setRotateDeg(0):i.player.setRotateDeg(90))})),i}return SC(n,[{key:"afterCreate",value:function(){var e=this;DC(IC(n.prototype),"afterCreate",this).call(this);var t=this.config,i=this.playerConfig;if(!t.disable){t.target&&(this.playerConfig.fullscreenTarget=this.config.target);var r=kT.getFullScreenEl();i.fullscreenTarget===r&&this.player.getFullscreen().catch((function(e){})),this.initIcons(),this.handleFullscreen=this.hook("fullscreenChange",this.toggleFullScreen,{pre:function(t){var n=e.player.fullscreen;e.emitUserAction(t,"switch_fullscreen",{prop:"fullscreen",from:n,to:!n})}}),this.bind(".xgplayer-fullscreen",["touchend","click"],this.handleFullscreen),this.on(rS,(function(t){var n=Wm(e).call(e,".xg-tips");n&&e.changeLangTextKey(n,t?e.i18nKeys.EXITFULLSCREEN_TIPS:e.i18nKeys.FULLSCREEN_TIPS),e.animate(t)})),this.config.needBackIcon&&(this.topBackIcon=this.player.registerPlugin({plugin:wI,options:{config:{onClick:function(t){e.handleFullscreen(t)}}}})),"mobile"===ST.device&&window.addEventListener("orientationchange",this._onOrientationChange)}}},{key:"registerIcons",value:function(){return{fullscreen:{icon:EI,class:"xg-get-fullscreen"},exitFullscreen:{icon:CI,class:"xg-exit-fullscreen"}}}},{key:"destroy",value:function(){DC(IC(n.prototype),"destroy",this).call(this),this.unbind(".xgplayer-icon","mobile"===ST.device?"touchend":"click",this.handleFullscreen),"mobile"===ST.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,n=this.config;!0===n.useCssFullscreen||"function"==typeof n.useCssFullscreen&&n.useCssFullscreen()?(t.fullscreen?t.exitCssFullscreen():t.getCssFullscreen(),this.animate(t.fullscreen)):n.rotateFullscreen?(t.fullscreen?t.exitRotateFullscreen():t.getRotateFullscreen(),this.animate(t.fullscreen)):n.switchCallback&&"function"==typeof n.switchCallback?n.switchCallback(t.fullscreen):t.fullscreen?(t.exitFullscreen(),n.useScreenOrientation&&this.unlockScreen()):(t.getFullscreen().catch((function(e){})),n.useScreenOrientation&&t.aspectRatio>1&&this.lockScreen(n.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(wA(this,"FULLSCREEN_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}},{key:"lockScreen",value:function(e){try{screen.orientation.lock(e).catch((function(e){}))}catch(t){}}},{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:YS.CONTROLS_RIGHT,index:0,useCssFullscreen:!1,rotateFullscreen:!1,useScreenOrientation:!1,lockOrientationType:"landscape",switchCallback:null,target:null,disable:!1,needBackIcon:!1}}}]),n}(_I);function TI(){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 SI(){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 PI(){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 AI=function(e){AC(n,e);var t=LC(n);function n(){var e,i;xC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return PC(OC(i=t.call.apply(t,Fm(e=[this]).call(e,o))),"onBarMousedown",(function(e){var t=OC(i).player,n=Wm(i).call(i,".xgplayer-bar");kT.event(e);var r=n.getBoundingClientRect(),o=kT.getEventPos(e,t.zoom),a=r.height-(o.clientY-r.top);if(o.h=a,o.barH=r.height,i.pos=o,!(a<-2))return i.updateVolumePos(a,e),document.addEventListener("mouseup",i.onBarMouseUp),i._d.isStart=!0,!1})),PC(OC(i),"onBarMouseMove",(function(e){var t=OC(i)._d;if(t.isStart){var n=OC(i),r=n.pos,o=n.player;e.preventDefault(),e.stopPropagation(),kT.event(e);var a=kT.getEventPos(e,o.zoom);t.isMoving=!0;var s=r.h-a.clientY+r.clientY;s>r.barH||i.updateVolumePos(s,e)}})),PC(OC(i),"onBarMouseUp",(function(e){kT.event(e),document.removeEventListener("mouseup",i.onBarMouseUp);var t=OC(i)._d;t.isStart=!1,t.isMoving=!1})),PC(OC(i),"onMouseenter",(function(e){i._d.isActive=!0,i.focus(),i.emit("icon_mouseenter",{pluginName:i.pluginName})})),PC(OC(i),"onMouseleave",(function(e){i._d.isActive=!1,i.unFocus(100,!1,e),i.emit("icon_mouseleave",{pluginName:i.pluginName})})),PC(OC(i),"onVolumeChange",(function(e){if(i.player){var t=i.player,n=t.muted,r=t.volume;i._d.isMoving||(Wm(i).call(i,".xgplayer-drag").style.height=n||0===r?"4px":"".concat(100*r,"%"),i.config.showValueLabel&&i.updateVolumeValue()),i.animate(n,r)}})),i}return SC(n,[{key:"registerIcons",value:function(){return{volumeSmall:{icon:SI,class:"xg-volume-small"},volumeLarge:{icon:TI,class:"xg-volume"},volumeMuted:{icon:PI,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,n=t.commonStyle,i=t.volume;if(n.volumeColor)Wm(this).call(this,".xgplayer-drag").style.backgroundColor=n.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"!==ST.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(BT,this.onVolumeChange),this.once(zT,this.onVolumeChange),"Number"!==kT.typeOf(i)&&(this.player.volume=this.config.default),this.onVolumeChange()}}},{key:"updateVolumePos",value:function(e,t){var n=this.player,i=Wm(this).call(this,".xgplayer-drag"),r=Wm(this).call(this,".xgplayer-bar");if(r&&i){var o=nE(e/r.getBoundingClientRect().height*1e3,10);i.style.height="".concat(e,"px");var a=Math.max(Math.min(o/1e3,1),0),s={volume:{from:n.volume,to:a}};n.muted&&(s.muted={from:!0,to:!1}),this.emitUserAction(t,"change_volume",{muted:n.muted,volume:n.volume,props:s}),n.volume=Math.max(Math.min(o/1e3,1),0),n.muted&&(n.muted=!1),this.config.showValueLabel&&this.updateVolumeValue()}}},{key:"updateVolumeValue",value:function(){var e=this.player,t=e.volume,n=e.muted,i=Wm(this).call(this,".xgplayer-value-label"),r=Math.max(Math.min(t,1),0);i.innerText=n?0:Math.round(100*r)}},{key:"focus",value:function(){this.player.focus({autoHide:!1}),this._timerId&&(kT.clearTimeout(this,this._timerId),this._timerId=null),kT.addClass(this.root,"slide-show")}},{key:"unFocus",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0,r=this._d,o=this.player;r.isActive||(this._timerId&&(kT.clearTimeout(this,this._timerId),this._timerId=null),this._timerId=kT.setTimeout(this,(function(){r.isActive||(n?o.blur():o.focus(),kT.removeClass(e.root,"slide-show"),r.isStart&&e.onBarMouseUp(i)),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&&(kT.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"===ST.device?"touchend":"click",this.changeMutedHandler)}},{key:"render",value:function(){var e;if(!this.config.disable){var t=this.config.default||this.player.volume,n=this.config.showValueLabel;return Fm(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(n?'<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:YS.CONTROLS_RIGHT,index:1,disable:!1,showValueLabel:!1,default:.6,miniVolume:.2}}}]),n}(JS);function II(){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 RI(){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 OI="picture-in-picture",MI="inline",LI="fullscreen",DI=function(e){AC(n,e);var t=LC(n);function n(){var e,i;xC(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return PC(OC(i=t.call.apply(t,Fm(e=[this]).call(e,o))),"switchPIP",(function(e){if(!i.isPIPAvailable())return!1;e.stopPropagation&&e.stopPropagation(),i.isPip?(i.exitPIP(),i.emitUserAction(e,"change_pip",{props:"pip",from:!0,to:!1}),i.setAttr("data-state","normal")):4===i.player.media.readyState&&(i.requestPIP(),i.emitUserAction(e,"change_pip",{props:"pip",from:!1,to:!0}),i.setAttr("data-state","pip"))})),i}return SC(n,[{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()&&(DC(IC(n.prototype),"afterCreate",this).call(this),this.pMode=MI,this.initPipEvents(),this.config.showIcon&&this.initIcons(),this.once($T,(function(){e.config.showIcon&&(kT.removeClass(Wm(e).call(e,".xgplayer-icon"),"xg-icon-disable"),e.bind("click",e.switchPIP))})))}},{key:"registerIcons",value:function(){return{pipIcon:{icon:II,class:"xg-get-pip"},pipIconExit:{icon:RI,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 n=t.paused;kT.setTimeout(e,(function(){!n&&t.mediaPlay()}),0),!n&&t.mediaPlay(),e.setAttr("data-state","normal"),e.pipWindow=null,t.emit(fS,!1)},this.enterPIPCallback=function(n){t.emit(fS,!0),null!=n&&n.pictureInPictureWindow&&(e.pipWindow=n.pictureInPictureWindow),e.setAttr("data-state","pip")},this.onWebkitpresentationmodechanged=function(n){var i=t.media.webkitPresentationMode;e.pMode===LI&&i!==LI&&t.onFullscreenChange(null,!1),e.pMode=i,i===OI?e.enterPIPCallback(n):i===MI&&e.leavePIPCallback(n)},t.media&&(t.media.addEventListener("enterpictureinpicture",this.enterPIPCallback),t.media.addEventListener("leavepictureinpicture",this.leavePIPCallback),n.checkWebkitSetPresentationMode(t.media)&&t.media.addEventListener("webkitpresentationmodechanged",this.onWebkitpresentationmodechanged))}},{key:"copyStyleIntoPiPWindow",value:function(e){var t,n,i=jb(t=Ub(n=NC(document.styleSheets)).call(n,(function(t){try{var n;return Ub(n=NC(t.cssRules)).call(n,(function(e){return e.cssText})).join("")}catch(r){var i=document.createElement("link");i.rel="stylesheet",i.type=t.type,i.media=t.media,i.href=t.href,e.document.head.appendChild(i)}return""}))).call(t,Boolean).join("\n"),r=document.createElement("style");r.textContent=i,e.document.head.appendChild(r)}},{key:"requestPIP",value:function(){var e=this,t=this.player,i=this.playerConfig,r=this.config;if(this.isPIPAvailable()&&!this.isPip)try{var o=i.poster;if(o&&(t.media.poster="String"===kT.typeOf(o)?o:o.poster),r.preferDocument&&this.isDocPIPAvailable()){var a={};if(r.width&&r.height)a.width=r.width,a.height=r.height;else{var s=t.root.getBoundingClientRect();a.width=s.width,a.height=s.height}documentPictureInPicture.requestWindow(a).then((function(n){var i=r.docPiPNode,o=r.docPiPStyle;e.enterPIPCallback();var a=i||t.root,s=a.parentElement,l=a.previousSibling,u=a.nextSibling;e.copyStyleIntoPiPWindow(n);var c=document.createElement("style");if(c.append("body{padding:0; margin:0;}"),o){var h="";"string"==typeof o?h=o:"function"==typeof o&&(h=o.call(r)),h&&c.append(h)}else a===t.root&&c.append("\n .xgplayer{width: 100%!important; height: 100%!important;}\n ");n.document.head.append(c),n.document.body.append(a),n.addEventListener("pagehide",(function(t){s&&(u?s.insertBefore(a,u):l?s.insertBefore(a,l.nextSibling):s.appendChild(a)),e.leavePIPCallback()}),{once:!0})}))}else n.checkWebkitSetPresentationMode(t.media)?t.media.webkitSetPresentationMode("picture-in-picture"):t.media.requestPictureInPicture();return!0}catch(l){return console.error("requestPiP",l),!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():n.checkWebkitSetPresentationMode(e.media)?e.media.webkitSetPresentationMode("inline"):document.exitPictureInPicture();return!0}catch(i){return console.error("exitPIP",i),!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===OI}},{key:"isPIPAvailable",value:function(){var e=this.player.media;return"Boolean"===kT.typeOf(document.pictureInPictureEnabled)&&document.pictureInPictureEnabled&&("Boolean"===kT.typeOf(e.disablePictureInPicture)&&!e.disablePictureInPicture||e.webkitSupportsPresentationMode&&"Function"===kT.typeOf(e.webkitSetPresentationMode))||this.isDocPIPAvailable()}},{key:"isDocPIPAvailable",value:function(){return"documentPictureInPicture"in window&&/^(https|file)/.test(location.protocol)}},{key:"destroy",value:function(){DC(IC(n.prototype),"destroy",this).call(this);var e=this.player;e.media.removeEventListener("enterpictureinpicture",this.enterPIPCallback),e.media.removeEventListener("leavepictureinpicture",this.leavePIPCallback),n.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(wA(this,"PIP",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"pip"}},{key:"defaultConfig",get:function(){return{position:YS.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}}]),n}(_I),NI=o,FI=ft("iterator"),UI=!NI((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,i){t.delete("b"),n+=i+e})),!e.toJSON||!t.size&&true||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[FI]||"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"!==n||"x"!==new URL("http://x",void 0).host})),HI=g,jI=2147483647,BI=/[^\0-\u007E]/,zI=/[.\u3002\uFF0E\uFF61]/g,VI="Overflow: input needs wider integers to process",KI=RangeError,GI=HI(zI.exec),WI=Math.floor,YI=String.fromCharCode,XI=HI("".charCodeAt),qI=HI([].join),$I=HI([].push),ZI=HI("".replace),JI=HI("".split),QI=HI("".toLowerCase),eR=function(e){return e+22+75*(e<26)},tR=function(e,t,n){var i=0;for(e=n?WI(e/700):e>>1,e+=WI(e/t);e>455;)e=WI(e/35),i+=36;return WI(i+36*e/(e+38))},nR=function(e){var t=[];e=function(e){for(var t=[],n=0,i=e.length;n<i;){var r=XI(e,n++);if(r>=55296&&r<=56319&&n<i){var o=XI(e,n++);56320==(64512&o)?$I(t,((1023&r)<<10)+(1023&o)+65536):($I(t,r),n--)}else $I(t,r)}return t}(e);var n,i,r=e.length,o=128,a=0,s=72;for(n=0;n<e.length;n++)(i=e[n])<128&&$I(t,YI(i));var l=t.length,u=l;for(l&&$I(t,"-");u<r;){var c=jI;for(n=0;n<e.length;n++)(i=e[n])>=o&&i<c&&(c=i);var h=u+1;if(c-o>WI((jI-a)/h))throw KI(VI);for(a+=(c-o)*h,o=c,n=0;n<e.length;n++){if((i=e[n])<o&&++a>jI)throw KI(VI);if(i==o){for(var f=a,d=36;;){var p=d<=s?1:d>=s+26?26:d-s;if(f<p)break;var v=f-p,g=36-p;$I(t,YI(eR(p+v%g))),f=WI(v/g),d+=36}$I(t,YI(eR(f))),s=tR(a,h,u==l),a=0,u++}}a++,o++}return qI(t,"")},iR=An,rR=r,oR=O,aR=g,sR=A,lR=UI,uR=io,cR=oo,hR=L_,fR=Io,dR=zl,pR=Wo,vR=qf,gR=S,yR=Je,mR=$t,_R=ti,kR=nn,bR=ee,wR=Yi,ER=Hr,CR=H,xR=Qh,TR=Wh,SR=ad,PR=Lx,AR=ft("iterator"),IR="URLSearchParams",RR=IR+"Iterator",OR=pR.set,MR=pR.getterFor(IR),LR=pR.getterFor(RR),DR=Object.getOwnPropertyDescriptor,NR=function(e){if(!sR)return rR[e];var t=DR(rR,e);return t&&t.value},FR=NR("fetch"),UR=NR("Request"),HR=NR("Headers"),jR=UR&&UR.prototype,BR=HR&&HR.prototype,zR=rR.RegExp,VR=rR.TypeError,KR=rR.decodeURIComponent,GR=rR.encodeURIComponent,WR=aR("".charAt),YR=aR([].join),XR=aR([].push),qR=aR("".replace),$R=aR([].shift),ZR=aR([].splice),JR=aR("".split),QR=aR("".slice),eO=/\+/g,tO=Array(4),nO=function(e){return tO[e-1]||(tO[e-1]=zR("((?:%[\\da-f]{2}){"+e+"})","gi"))},iO=function(e){try{return KR(e)}catch(HN){return e}},rO=function(e){var t=qR(e,eO," "),n=4;try{return KR(t)}catch(HN){for(;n;)t=qR(t,nO(n--),iO);return t}},oO=/[!'()~]|%20/g,aO={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},sO=function(e){return aO[e]},lO=function(e){return qR(GR(e),oO,sO)},uO=dR((function(e,t){OR(this,{type:RR,iterator:xR(MR(e).entries),kind:t})}),"Iterator",(function(){var e=LR(this),t=e.kind,n=e.iterator.next(),i=n.value;return n.done||(n.value="keys"===t?i.key:"values"===t?i.value:[i.key,i.value]),n}),!0),cO=function(e){this.entries=[],this.url=null,void 0!==e&&(bR(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===WR(e,0)?QR(e,1):e:wR(e)))};cO.prototype={type:IR,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,i,r,o,a,s,l=TR(e);if(l)for(n=(t=xR(e,l)).next;!(i=oR(n,t)).done;){if(o=(r=xR(kR(i.value))).next,(a=oR(o,r)).done||(s=oR(o,r)).done||!oR(o,r).done)throw VR("Expected sequence with length 2");XR(this.entries,{key:wR(a.value),value:wR(s.value)})}else for(var u in e)yR(e,u)&&XR(this.entries,{key:u,value:wR(e[u])})},parseQuery:function(e){if(e)for(var t,n,i=JR(e,"&"),r=0;r<i.length;)(t=i[r++]).length&&(n=JR(t,"="),XR(this.entries,{key:rO($R(n)),value:rO(YR(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],i=0;i<t.length;)e=t[i++],XR(n,lO(e.key)+"="+lO(e.value));return YR(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var hO=function(){vR(this,fO);var e=OR(this,new cO(arguments.length>0?arguments[0]:void 0));sR||(this.length=e.entries.length)},fO=hO.prototype;if(hR(fO,{append:function(e,t){SR(arguments.length,2);var n=MR(this);XR(n.entries,{key:wR(e),value:wR(t)}),sR||this.length++,n.updateURL()},delete:function(e){SR(arguments.length,1);for(var t=MR(this),n=t.entries,i=wR(e),r=0;r<n.length;)n[r].key===i?ZR(n,r,1):r++;sR||(this.length=n.length),t.updateURL()},get:function(e){SR(arguments.length,1);for(var t=MR(this).entries,n=wR(e),i=0;i<t.length;i++)if(t[i].key===n)return t[i].value;return null},getAll:function(e){SR(arguments.length,1);for(var t=MR(this).entries,n=wR(e),i=[],r=0;r<t.length;r++)t[r].key===n&&XR(i,t[r].value);return i},has:function(e){SR(arguments.length,1);for(var t=MR(this).entries,n=wR(e),i=0;i<t.length;)if(t[i++].key===n)return!0;return!1},set:function(e,t){SR(arguments.length,1);for(var n,i=MR(this),r=i.entries,o=!1,a=wR(e),s=wR(t),l=0;l<r.length;l++)(n=r[l]).key===a&&(o?ZR(r,l--,1):(o=!0,n.value=s));o||XR(r,{key:a,value:s}),sR||(this.length=r.length),i.updateURL()},sort:function(){var e=MR(this);PR(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=MR(this).entries,i=mR(e,arguments.length>1?arguments[1]:void 0),r=0;r<n.length;)i((t=n[r++]).value,t.key,this)},keys:function(){return new uO(this,"keys")},values:function(){return new uO(this,"values")},entries:function(){return new uO(this,"entries")}},{enumerable:!0}),uR(fO,AR,fO.entries,{name:"entries"}),uR(fO,"toString",(function(){return MR(this).serialize()}),{enumerable:!0}),sR&&cR(fO,"size",{get:function(){return MR(this).entries.length},configurable:!0,enumerable:!0}),fR(hO,IR),iR({global:!0,constructor:!0,forced:!lR},{URLSearchParams:hO}),!lR&&gR(HR)){var dO=aR(BR.has),pO=aR(BR.set),vO=function(e){if(bR(e)){var t,n=e.body;if(_R(n)===IR)return t=e.headers?new HR(e.headers):new HR,dO(t,"content-type")||pO(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),ER(e,{body:CR(0,wR(n)),headers:CR(0,t)})}return e};if(gR(FR)&&iR({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return FR(e,arguments.length>1?vO(arguments[1]):{})}}),gR(UR)){var gO=function(e){return vR(this,jR),new UR(e,arguments.length>1?vO(arguments[1]):{})};jR.constructor=gO,gO.prototype=jR,iR({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:gO})}}var yO,mO=An,_O=A,kO=UI,bO=r,wO=$t,EO=g,CO=io,xO=oo,TO=qf,SO=Je,PO=EE,AO=fm,IO=qr,RO=hc.codeAt,OO=function(e){var t,n,i=[],r=JI(ZI(QI(e),zI,"."),".");for(t=0;t<r.length;t++)n=r[t],$I(i,GI(BI,n)?"xn--"+nR(n):n);return qI(i,".")},MO=Yi,LO=Io,DO=ad,NO={URLSearchParams:hO,getState:MR},FO=Wo,UO=FO.set,HO=FO.getterFor("URL"),jO=NO.URLSearchParams,BO=NO.getState,zO=bO.URL,VO=bO.TypeError,KO=bO.parseInt,GO=Math.floor,WO=Math.pow,YO=EO("".charAt),XO=EO(/./.exec),qO=EO([].join),$O=EO(1..toString),ZO=EO([].pop),JO=EO([].push),QO=EO("".replace),eM=EO([].shift),tM=EO("".split),nM=EO("".slice),iM=EO("".toLowerCase),rM=EO([].unshift),oM="Invalid scheme",aM="Invalid host",sM="Invalid port",lM=/[a-z]/i,uM=/[\d+-.a-z]/i,cM=/\d/,hM=/^0x/i,fM=/^[0-7]+$/,dM=/^\d+$/,pM=/^[\da-f]+$/i,vM=/[\0\t\n\r #%/:<>?@[\\\]^|]/,gM=/[\0\t\n\r #/:<>?@[\\\]^|]/,yM=/^[\u0000-\u0020]+/,mM=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,_M=/[\t\n\r]/g,kM=function(e){var t,n,i,r;if("number"==typeof e){for(t=[],n=0;n<4;n++)rM(t,e%256),e=GO(e/256);return qO(t,".")}if("object"==typeof e){for(t="",i=function(e){for(var t=null,n=1,i=null,r=0,o=0;o<8;o++)0!==e[o]?(r>n&&(t=i,n=r),i=null,r=0):(null===i&&(i=o),++r);return r>n&&(t=i,n=r),t}(e),n=0;n<8;n++)r&&0===e[n]||(r&&(r=!1),i===n?(t+=n?":":"::",r=!0):(t+=$O(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},bM={},wM=PO({},bM,{" ":1,'"':1,"<":1,">":1,"`":1}),EM=PO({},wM,{"#":1,"?":1,"{":1,"}":1}),CM=PO({},EM,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),xM=function(e,t){var n=RO(e,0);return n>32&&n<127&&!SO(t,e)?e:encodeURIComponent(e)},TM={ftp:21,file:null,http:80,https:443,ws:80,wss:443},SM=function(e,t){var n;return 2==e.length&&XO(lM,YO(e,0))&&(":"==(n=YO(e,1))||!t&&"|"==n)},PM=function(e){var t;return e.length>1&&SM(nM(e,0,2))&&(2==e.length||"/"===(t=YO(e,2))||"\\"===t||"?"===t||"#"===t)},AM=function(e){return"."===e||"%2e"===iM(e)},IM={},RM={},OM={},MM={},LM={},DM={},NM={},FM={},UM={},HM={},jM={},BM={},zM={},VM={},KM={},GM={},WM={},YM={},XM={},qM={},$M={},ZM=function(e,t,n){var i,r,o,a=MO(e);if(t){if(r=this.parse(a))throw VO(r);this.searchParams=null}else{if(void 0!==n&&(i=new ZM(n,!0)),r=this.parse(a,null,i))throw VO(r);(o=BO(new jO)).bindURL(this),this.searchParams=o}};ZM.prototype={type:"URL",parse:function(e,t,n){var i,r,o,a,s,l=this,u=t||IM,c=0,h="",f=!1,d=!1,p=!1;for(e=MO(e),t||(l.scheme="",l.username="",l.password="",l.host=null,l.port=null,l.path=[],l.query=null,l.fragment=null,l.cannotBeABaseURL=!1,e=QO(e,yM,""),e=QO(e,mM,"$1")),e=QO(e,_M,""),i=AO(e);c<=i.length;){switch(r=i[c],u){case IM:if(!r||!XO(lM,r)){if(t)return oM;u=OM;continue}h+=iM(r),u=RM;break;case RM:if(r&&(XO(uM,r)||"+"==r||"-"==r||"."==r))h+=iM(r);else{if(":"!=r){if(t)return oM;h="",u=OM,c=0;continue}if(t&&(l.isSpecial()!=SO(TM,h)||"file"==h&&(l.includesCredentials()||null!==l.port)||"file"==l.scheme&&!l.host))return;if(l.scheme=h,t)return void(l.isSpecial()&&TM[l.scheme]==l.port&&(l.port=null));h="","file"==l.scheme?u=VM:l.isSpecial()&&n&&n.scheme==l.scheme?u=MM:l.isSpecial()?u=FM:"/"==i[c+1]?(u=LM,c++):(l.cannotBeABaseURL=!0,JO(l.path,""),u=XM)}break;case OM:if(!n||n.cannotBeABaseURL&&"#"!=r)return oM;if(n.cannotBeABaseURL&&"#"==r){l.scheme=n.scheme,l.path=IO(n.path),l.query=n.query,l.fragment="",l.cannotBeABaseURL=!0,u=$M;break}u="file"==n.scheme?VM:DM;continue;case MM:if("/"!=r||"/"!=i[c+1]){u=DM;continue}u=UM,c++;break;case LM:if("/"==r){u=HM;break}u=YM;continue;case DM:if(l.scheme=n.scheme,r==yO)l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=IO(n.path),l.query=n.query;else if("/"==r||"\\"==r&&l.isSpecial())u=NM;else if("?"==r)l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=IO(n.path),l.query="",u=qM;else{if("#"!=r){l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=IO(n.path),l.path.length--,u=YM;continue}l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=IO(n.path),l.query=n.query,l.fragment="",u=$M}break;case NM:if(!l.isSpecial()||"/"!=r&&"\\"!=r){if("/"!=r){l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,u=YM;continue}u=HM}else u=UM;break;case FM:if(u=UM,"/"!=r||"/"!=YO(h,c+1))continue;c++;break;case UM:if("/"!=r&&"\\"!=r){u=HM;continue}break;case HM:if("@"==r){f&&(h="%40"+h),f=!0,o=AO(h);for(var v=0;v<o.length;v++){var g=o[v];if(":"!=g||p){var y=xM(g,CM);p?l.password+=y:l.username+=y}else p=!0}h=""}else if(r==yO||"/"==r||"?"==r||"#"==r||"\\"==r&&l.isSpecial()){if(f&&""==h)return"Invalid authority";c-=AO(h).length+1,h="",u=jM}else h+=r;break;case jM:case BM:if(t&&"file"==l.scheme){u=GM;continue}if(":"!=r||d){if(r==yO||"/"==r||"?"==r||"#"==r||"\\"==r&&l.isSpecial()){if(l.isSpecial()&&""==h)return aM;if(t&&""==h&&(l.includesCredentials()||null!==l.port))return;if(a=l.parseHost(h))return a;if(h="",u=WM,t)return;continue}"["==r?d=!0:"]"==r&&(d=!1),h+=r}else{if(""==h)return aM;if(a=l.parseHost(h))return a;if(h="",u=zM,t==BM)return}break;case zM:if(!XO(cM,r)){if(r==yO||"/"==r||"?"==r||"#"==r||"\\"==r&&l.isSpecial()||t){if(""!=h){var m=KO(h,10);if(m>65535)return sM;l.port=l.isSpecial()&&m===TM[l.scheme]?null:m,h=""}if(t)return;u=WM;continue}return sM}h+=r;break;case VM:if(l.scheme="file","/"==r||"\\"==r)u=KM;else{if(!n||"file"!=n.scheme){u=YM;continue}if(r==yO)l.host=n.host,l.path=IO(n.path),l.query=n.query;else if("?"==r)l.host=n.host,l.path=IO(n.path),l.query="",u=qM;else{if("#"!=r){PM(qO(IO(i,c),""))||(l.host=n.host,l.path=IO(n.path),l.shortenPath()),u=YM;continue}l.host=n.host,l.path=IO(n.path),l.query=n.query,l.fragment="",u=$M}}break;case KM:if("/"==r||"\\"==r){u=GM;break}n&&"file"==n.scheme&&!PM(qO(IO(i,c),""))&&(SM(n.path[0],!0)?JO(l.path,n.path[0]):l.host=n.host),u=YM;continue;case GM:if(r==yO||"/"==r||"\\"==r||"?"==r||"#"==r){if(!t&&SM(h))u=YM;else if(""==h){if(l.host="",t)return;u=WM}else{if(a=l.parseHost(h))return a;if("localhost"==l.host&&(l.host=""),t)return;h="",u=WM}continue}h+=r;break;case WM:if(l.isSpecial()){if(u=YM,"/"!=r&&"\\"!=r)continue}else if(t||"?"!=r)if(t||"#"!=r){if(r!=yO&&(u=YM,"/"!=r))continue}else l.fragment="",u=$M;else l.query="",u=qM;break;case YM:if(r==yO||"/"==r||"\\"==r&&l.isSpecial()||!t&&("?"==r||"#"==r)){if(".."===(s=iM(s=h))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(l.shortenPath(),"/"==r||"\\"==r&&l.isSpecial()||JO(l.path,"")):AM(h)?"/"==r||"\\"==r&&l.isSpecial()||JO(l.path,""):("file"==l.scheme&&!l.path.length&&SM(h)&&(l.host&&(l.host=""),h=YO(h,0)+":"),JO(l.path,h)),h="","file"==l.scheme&&(r==yO||"?"==r||"#"==r))for(;l.path.length>1&&""===l.path[0];)eM(l.path);"?"==r?(l.query="",u=qM):"#"==r&&(l.fragment="",u=$M)}else h+=xM(r,EM);break;case XM:"?"==r?(l.query="",u=qM):"#"==r?(l.fragment="",u=$M):r!=yO&&(l.path[0]+=xM(r,bM));break;case qM:t||"#"!=r?r!=yO&&("'"==r&&l.isSpecial()?l.query+="%27":l.query+="#"==r?"%23":xM(r,bM)):(l.fragment="",u=$M);break;case $M:r!=yO&&(l.fragment+=xM(r,wM))}c++}},parseHost:function(e){var t,n,i;if("["==YO(e,0)){if("]"!=YO(e,e.length-1))return aM;if(t=function(e){var t,n,i,r,o,a,s,l=[0,0,0,0,0,0,0,0],u=0,c=null,h=0,f=function(){return YO(e,h)};if(":"==f()){if(":"!=YO(e,1))return;h+=2,c=++u}for(;f();){if(8==u)return;if(":"!=f()){for(t=n=0;n<4&&XO(pM,f());)t=16*t+KO(f(),16),h++,n++;if("."==f()){if(0==n)return;if(h-=n,u>6)return;for(i=0;f();){if(r=null,i>0){if(!("."==f()&&i<4))return;h++}if(!XO(cM,f()))return;for(;XO(cM,f());){if(o=KO(f(),10),null===r)r=o;else{if(0==r)return;r=10*r+o}if(r>255)return;h++}l[u]=256*l[u]+r,2!=++i&&4!=i||u++}if(4!=i)return;break}if(":"==f()){if(h++,!f())return}else if(f())return;l[u++]=t}else{if(null!==c)return;h++,c=++u}}if(null!==c)for(a=u-c,u=7;0!=u&&a>0;)s=l[u],l[u--]=l[c+a-1],l[c+--a]=s;else if(8!=u)return;return l}(nM(e,1,-1)),!t)return aM;this.host=t}else if(this.isSpecial()){if(e=OO(e),XO(vM,e))return aM;if(t=function(e){var t,n,i,r,o,a,s,l=tM(e,".");if(l.length&&""==l[l.length-1]&&l.length--,(t=l.length)>4)return e;for(n=[],i=0;i<t;i++){if(""==(r=l[i]))return e;if(o=10,r.length>1&&"0"==YO(r,0)&&(o=XO(hM,r)?16:8,r=nM(r,8==o?1:2)),""===r)a=0;else{if(!XO(10==o?dM:8==o?fM:pM,r))return e;a=KO(r,o)}JO(n,a)}for(i=0;i<t;i++)if(a=n[i],i==t-1){if(a>=WO(256,5-t))return null}else if(a>255)return null;for(s=ZO(n),i=0;i<n.length;i++)s+=n[i]*WO(256,3-i);return s}(e),null===t)return aM;this.host=t}else{if(XO(gM,e))return aM;for(t="",n=AO(e),i=0;i<n.length;i++)t+=xM(n[i],bM);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return SO(TM,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&SM(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,i=e.password,r=e.host,o=e.port,a=e.path,s=e.query,l=e.fragment,u=t+":";return null!==r?(u+="//",e.includesCredentials()&&(u+=n+(i?":"+i:"")+"@"),u+=kM(r),null!==o&&(u+=":"+o)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?a[0]:a.length?"/"+qO(a,"/"):"",null!==s&&(u+="?"+s),null!==l&&(u+="#"+l),u},setHref:function(e){var t=this.parse(e);if(t)throw VO(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new JM(e.path[0]).origin}catch(HN){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+kM(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(MO(e)+":",IM)},getUsername:function(){return this.username},setUsername:function(e){var t=AO(MO(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=xM(t[n],CM)}},getPassword:function(){return this.password},setPassword:function(e){var t=AO(MO(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=xM(t[n],CM)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?kM(e):kM(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,jM)},getHostname:function(){var e=this.host;return null===e?"":kM(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,BM)},getPort:function(){var e=this.port;return null===e?"":MO(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=MO(e))?this.port=null:this.parse(e,zM))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+qO(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,WM))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=MO(e))?this.query=null:("?"==YO(e,0)&&(e=nM(e,1)),this.query="",this.parse(e,qM)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=MO(e))?("#"==YO(e,0)&&(e=nM(e,1)),this.fragment="",this.parse(e,$M)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var JM=function(e){var t=TO(this,QM),n=DO(arguments.length,1)>1?arguments[1]:void 0,i=UO(t,new ZM(e,!1,n));_O||(t.href=i.serialize(),t.origin=i.getOrigin(),t.protocol=i.getProtocol(),t.username=i.getUsername(),t.password=i.getPassword(),t.host=i.getHost(),t.hostname=i.getHostname(),t.port=i.getPort(),t.pathname=i.getPathname(),t.search=i.getSearch(),t.searchParams=i.getSearchParams(),t.hash=i.getHash())},QM=JM.prototype,eL=function(e,t){return{get:function(){return HO(this)[e]()},set:t&&function(e){return HO(this)[t](e)},configurable:!0,enumerable:!0}};if(_O&&(xO(QM,"href",eL("serialize","setHref")),xO(QM,"origin",eL("getOrigin")),xO(QM,"protocol",eL("getProtocol","setProtocol")),xO(QM,"username",eL("getUsername","setUsername")),xO(QM,"password",eL("getPassword","setPassword")),xO(QM,"host",eL("getHost","setHost")),xO(QM,"hostname",eL("getHostname","setHostname")),xO(QM,"port",eL("getPort","setPort")),xO(QM,"pathname",eL("getPathname","setPathname")),xO(QM,"search",eL("getSearch","setSearch")),xO(QM,"searchParams",eL("getSearchParams")),xO(QM,"hash",eL("getHash","setHash"))),CO(QM,"toJSON",(function(){return HO(this).serialize()}),{enumerable:!0}),CO(QM,"toString",(function(){return HO(this).serialize()}),{enumerable:!0}),zO){var tL=zO.createObjectURL,nL=zO.revokeObjectURL;tL&&CO(JM,"createObjectURL",wO(tL,zO)),nL&&CO(JM,"revokeObjectURL",wO(nL,zO))}LO(JM,"URL"),mO({global:!0,constructor:!0,forced:!kO,sham:!_O},{URL:JM});var iL=An,rL=o,oL=ad,aL=Yi,sL=UI,lL=ae("URL");iL({target:"URL",stat:!0,forced:!(sL&&rL((function(){lL.canParse()})))},{canParse:function(e){var t=oL(arguments.length,1),n=aL(e),i=t<2||void 0===arguments[1]?void 0:aL(arguments[1]);try{return!!new lL(n,i)}catch(HN){return!1}}});var uL=n(te.URL),cL=function(){function e(t){xC(this,e),this.config=t.config,this.parent=t.root,this.root=kT.createDom("ul","",{},"xg-options-list xg-list-slide-scroll ".concat(this.config.className)),t.root.appendChild(this.root);var n=this.config.maxHeight;n&&this.setStyle({maxHeight:n}),this.onItemClick=this.onItemClick.bind(this),this.renderItemList();var i="touch"===this.config.domEventType?"touchend":"click";this._delegates=JS.delegate.call(this,this.root,"li",i,this.onItemClick)}return SC(e,[{key:"renderItemList",value:function(e){var t,n=this,i=this.config,r=this.root;(e?i.data=e:e=i.data,i.style)&&Ub(t=hw(i.style)).call(t,(function(e){r.style[e]=i[e]}));e.length>0&&(this.attrKeys=hw(e[0])),this.root.innerHTML="",Ub(e).call(e,(function(e,t){var i=e.selected?"option-item selected":"option-item";e["data-index"]=t,n.root.appendChild(kT.createDom("li","<span>".concat(e.showText,"</span>"),e,i))}))}},{key:"onItemClick",value:function(e){e.delegateTarget||(e.delegateTarget=e.target);var t=e.delegateTarget;if(t&&kT.hasClass(t,"selected"))return!1;var n="function"==typeof this.config.onItemClick?this.config.onItemClick:null,i=this.root.querySelector(".selected");kT.addClass(t,"selected"),i&&kT.removeClass(i,"selected"),n(e,{from:i?this.getAttrObj(i,this.attrKeys):null,to:this.getAttrObj(t,this.attrKeys)})}},{key:"getAttrObj",value:function(e,t){if(!e||!t)return{};var n={};Ub(t).call(t,(function(t){n[t]=e.getAttribute(t)}));var i=e.getAttribute("data-index");return i&&(n.index=Number(i)),n}},{key:"show",value:function(){kT.removeClass(this.root,"hide"),kT.addClass(this.root,"active")}},{key:"hide",value:function(){kT.removeClass(this.root,"active"),kT.addClass(this.root,"hide")}},{key:"setStyle",value:function(e){var t=this;hw(e).forEach((function(n){t.root.style[n]=e[n]}))}},{key:"destroy",value:function(){var e;this._delegates&&(Ub(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}(),hL=An,fL=E;P.f;var dL=Un,pL=Yi,vL=Xb,gL=X,yL=$b,mL=fL("".startsWith),_L=fL("".slice),kL=Math.min;hL({target:"String",proto:!0,forced:!yL("startsWith")},{startsWith:function(e){var t=pL(gL(this));vL(e);var n=dL(kL(arguments.length>1?arguments[1]:void 0,t.length)),i=pL(e);return mL?mL(t,i,n):_L(t,n,n+i.length)===i}});var bL,wL=Vc("String").startsWith,EL=se,CL=wL,xL=String.prototype,TL=n((function(e){var t=e.startsWith;return"string"==typeof e||e===xL||EL(xL,e)&&t===xL.startsWith?CL:t})),SL={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"},PL=Ky(Ky({},kS),SL),AL=(zy(bL={},SL.SEI,{event:"core_event",shouldCallback:function(e){return"core.sei"===(null==e?void 0:e.eventName)}}),zy(bL,SL.AUTOPLAY_STARTED,{event:XT}),zy(bL,SL.AUTOPLAY_PREVENTED,{event:qT}),zy(bL,SL.FULLSCREEN_CHANGE,{event:rS}),zy(bL,SL.CSS_FULLSCREEN_CHANGE,{event:oS}),zy(bL,SL.MINI_STATE_CHANGE,{event:aS}),zy(bL,SL.DEFINITION_CHANGE,{event:sS}),zy(bL,SL.BEFORE_DEFINITION_CHANGE,{event:lS}),zy(bL,SL.AFTER_DEFINITION_CHANGE,{event:uS}),zy(bL,SL.VIDEO_RESIZE,{event:hS}),zy(bL,SL.PIP_CHANGE,{event:fS}),zy(bL,SL.USER_ACTION,{event:vS}),zy(bL,SL.DOWNLOAD_SPEED_CHANGE,{event:eS}),zy(bL,SL.ABR_SWITCH_START,{event:"switch_definition_start"}),zy(bL,SL.ABR_SWITCH_SUCCESS,{event:"switch_definition_success"}),zy(bL,SL.ABR_SWITCH_FAILED,{event:"switch_definition_fail"}),bL);var IL=/["'&<>]/;function RL(e,t){return function(e){if(qy(e))return e}(e)||function(e,t){var n=null==e?null:void 0!==nc&&Jy(e)||e["@@iterator"];if(null!=n){var i,r,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(hh(s).call(s,i.value),s.length!==t);l=!0);}catch(c){u=!0,r=c}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return s}}(e,t)||gm(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var OL=A,ML=g,LL=pr,DL=Z,NL=ML(M.f),FL=ML([].push),UL=function(e){return function(t){for(var n,i=DL(t),r=LL(i),o=r.length,a=0,s=[];o>a;)n=r[a++],OL&&!NL(i,n)||FL(s,e?[n,i[n]]:i[n]);return s}},HL={entries:UL(!0),values:UL(!1)},jL=HL.entries;An({target:"Object",stat:!0},{entries:function(e){return jL(e)}});var BL=n(te.Object.entries);var zL=Re,VL=qe,KL=K,GL=jn,WL=TypeError,YL=function(e){return function(t,n,i,r){zL(n);var o=VL(t),a=KL(o),s=GL(o),l=e?s-1:0,u=e?-1:1;if(i<2)for(;;){if(l in a){r=a[l],l+=u;break}if(l+=u,e?l<0:s<=l)throw WL("Reduce of empty array with no initial value")}for(;e?l>=0:s>l;l+=u)l in a&&(r=n(r,a[l],l,o));return r}},XL={left:YL(!1),right:YL(!0)}.left;An({target:"Array",proto:!0,forced:!Bf&&ve>79&&ve<83||!Hc("reduce")},{reduce:function(e){var t=arguments.length;return XL(this,e,t,t>1?arguments[1]:void 0)}});var qL=Vc("Array").reduce,$L=se,ZL=qL,JL=Array.prototype,QL=n((function(e){var t=e.reduce;return e===JL||$L(JL,e)&&t===JL.reduce?ZL:t}));var eD=function(){function e(t){var n;mm(this,e),zy(this,"definition",void 0),zy(this,"source",void 0),zy(this,"text",void 0),zy(this,"fallbackUrl",void 0),zy(this,"urls",void 0),zy(this,"_currentUrlRef",void 0);var i=t.url,r=t.definition,o=t.text,a=t.source,s=t.fallbackUrls;this.definition=r,this.text=o,this.source=a,this.urls=Fm(n=[i]).call(n,ym(null!=s?s:[])),this.fallbackUrl=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t={url:e[0],next:null},n=t,i=1;i<e.length;i++){var r=i===e.length-1?t:null,o={url:e[i],next:r};n.next=o,n=o}return t}(this.urls),this._currentUrlRef=this.fallbackUrl}return km(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;return e&&(this._currentUrlRef=e),this._currentUrlRef}}]),e}(),tD=function(){function e(t,n,i){var r=this;mm(this,e),zy(this,"name",void 0),zy(this,"text",void 0),zy(this,"definitions",void 0),this.definitions=Ub(t).call(t,(function(e){return new eD(xE({},e,{source:r}))})),this.name=n,this.text=i}return km(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 n=void 0,i=void 0,r=void 0;if("string"==typeof t?n=t:Array.isArray(t)?r=t:(n=t.url,i=t.fallbackUrls,r=t.sources),"string"==typeof n)return e.normalizeUrl(n,i);if(Array.isArray(r)){if(0===r.length)throw new Error('"sources" cannot be an empty array');return Ub(r).call(r,(function(t){var n;return new e(Ub(n=t.definitions).call(n,(function(e){return"string"==typeof e?{url:e,definition:"unknown"}:e})),t.name,t.text)}))}return[]}},{key:"normalizeUrl",value:function(t,n){var i=new e([],"unknown");return i.add(new eD({definition:"unknown",url:t,source:i,fallbackUrls:n})),[i]}}]),e}(),nD=function(){function e(t){var n,i,r,o;mm(this,e),zy(this,"defaultSource",void 0),zy(this,"defaultDefinition",void 0),zy(this,"maxFallbackRound",void 0),zy(this,"_currentDefinition",void 0),zy(this,"_sources",void 0),zy(this,"_fallbackCount",0);var a=t.url,s=t.defaultDefinition,l=t.defaultSource,u=t.sources,c=t.maxFallbackRound;this.defaultDefinition=s,this.defaultSource=l,this.maxFallbackRound=null!=c?c:1,this._sources=u;var h=a?Wm(this).call(this,a):null===(n=Wm(i=this.sources).call(i,(function(e){return void 0===l||e.name===l})))||void 0===n?void 0:Wm(r=n.definitions).call(r,(function(e){return void 0===s||e.definition===s}));this._currentDefinition=null!=h?h: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 km(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 n,i,r,o,a,s=this;if("string"==typeof e)return Wm(o=QL(a=this.sources).call(a,(function(e,t){return Fm(e).call(e,t.definitions)}),[])).call(o,(function(t){return t.url===e}));var l=Wm(n=this.sources).call(n,(function(t){var n,i;return t.name===(null!==(n=null==e?void 0:e.source)&&void 0!==n?n:null===(i=s.source)||void 0===i?void 0:i.name)})),u=null==l?void 0:Wm(i=l.definitions).call(i,(function(t){var n,i;return t.definition===(null!==(n=null==e?void 0:e.definition)&&void 0!==n?n:null===(i=s.definition)||void 0===i?void 0:i.definition)}));return u||(null!=t&&t.fallbackToFirstDefinition&&null!=l&&null!==(r=l.definitions)&&void 0!==r&&r.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 n,i,r,o,a;return this._sources=tD.normalize(e),this._currentDefinition=null!==(n=Wm(this).call(this,null!=t?t:{source:null!==(i=this.defaultSource)&&void 0!==i?i:null===(r=this._currentDefinition)||void 0===r?void 0:r.source.name,definition:null!==(o=this.defaultDefinition)&&void 0!==o?o:null===(a=this._currentDefinition)||void 0===a?void 0:a.definition}))&&void 0!==n?n:this._sources[0].definitions[0],this.resetFallback(),this}},{key:"resetFallback",value:function(){this._fallbackCount=0}}]),e}();function iD(){var e;"undefined"!=typeof Reflect&&yC?iD=tA(e=yC).call(e):iD=function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=rA(e)););return e}(e,t);if(i){var r=Cy(i,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}};return iD.apply(this,arguments)}function rD(){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 oD=function(e){iA(n,e);var t=aA(n);function n(){var e,i;mm(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return zy(YP(i=t.call.apply(t,Fm(e=[this]).call(e,o))),"_error",void 0),i}return km(n,[{key:"_errorTip",get:function(){var e,t,n,i=this.player.config.i18nManager,r=null===(e=this._error)||void 0===e?void 0:e.errorCode;return this.config.errorTipsText?i.normalize(this.config.errorTipsText):Fm(t="".concat(r?"[".concat(r,"] "):"")).call(t,null===(n=this._error)||void 0===n?void 0:n.message)}},{key:"afterCreate",value:function(){this._handleRefresh=this._handleRefresh.bind(this),this._focus=this._focus.bind(this),this._initEvents(),this._initIcons(),"mobile"===ST.device&&this.bind("touchend",this._focus),this.bind(".veplayer-error-refresh","click",this._handleRefresh)}},{key:"registerIcons",value:function(){return{error:{icon:rD,class:"veplayer-error-svg"}}}},{key:"updateLang",value:function(){this.config.showRefresh&&this._renderRefresh(),this._renderExtraTips()}},{key:"showError",value:function(e){this._error=e instanceof fA?e:pA(e),this.config.showErrorTip&&this._renderText(this._errorTip),this._renderExtraTips(),iD(rA(n.prototype),"show",this).call(this)}},{key:"hideError",value:function(){iD(rA(n.prototype),"hide",this).call(this)}},{key:"destroy",value:function(){"mobile"===ST.device&&this.unbind("touchend",this._focus),this.unbind(".veplayer-error-refresh","click",this._handleRefresh),this.off(PL.FALLBACK_ERROR,this.showError.bind(this)),this.off(HT,this.hideError.bind(this))}},{key:"render",value:function(){var e,t=this.player.config.i18nManager;return Fm(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(PL.FALLBACK_ERROR,this.showError.bind(this)),this.on(HT,this.hideError.bind(this)),this.on(OT,this.hideError.bind(this)),this.on(cS,this.hideError.bind(this))}},{key:"_renderText",value:function(e){var t=Wm(this).call(this,".veplayer-error-tips");t&&(t.innerText=e)}},{key:"_renderExtraTips",value:function(){var e,t=this,n=Wm(this).call(this,".veplayer-error-extra");n&&(n.innerHTML="");var i=this.player.config.i18nManager;null===(e=this.config.extraTips)||void 0===e||e.forEach((function(e){if(e){var n,r=kT.createDom("div",Fm(n="".concat(i.normalize(e.label),": ")).call(n,i.normalize(e.value)),void 0,"veplayer-error-detail-info");t.appendChild(".veplayer-error-extra",r)}}))}},{key:"_handleRefresh",value:function(){var e,t;null===(e=this.player)||void 0===e||e.emit(PL.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,n=Wm(this).call(this,".veplayer-error-refresh");n&&(n.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:JS.POSITIONS.ROOT}}}]),n}(JS),aD=function(e){iA(n,e);var t=aA(n);function n(){var e,i;mm(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return zy(YP(i=t.call.apply(t,Fm(e=[this]).call(e,o))),"_toastNumber",0),zy(YP(i),"_toastMap",{}),i}return km(n,[{key:"toast",value:function(e,t){var n=this,i=t||{},r=i.duration,o=void 0===r?2e3:r,a=i.closable,s=void 0!==a&&a,l=this._toastNumber+1;this._toastNumber=l;var u=this._renderToast(e,s,l);return this.root.appendChild(u),this._toastMap[l]=u,setTimeout((function(){n.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,n){var i=this,r=kT.createDom("div","",void 0,"veplayer-toast-container"),o=kT.checkIsObject(e)?e:kT.createDom("div",e,void 0,"veplayer-toast-txt");if(r.appendChild(o),t){var a=kT.createDom("span","×",void 0,"veplayer-toast-close");a.addEventListener("click",(function(){i.remove(n)})),r.appendChild(a)}return r}}],[{key:"pluginName",get:function(){return"toast"}},{key:"defaultConfig",get:function(){return{index:5}}}]),n}(JS);function sD(){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 lD=function(){function e(t){mm(this,e),zy(this,"_root",void 0),zy(this,"_config",void 0),zy(this,"_parent",void 0),zy(this,"_listDom",void 0),zy(this,"_container",void 0),zy(this,"_titleDom",void 0),zy(this,"_player",void 0),zy(this,"_delegates",void 0),zy(this,"_listType",void 0);var n=t.config,i=t.root,r=t.player;this._config=n,this._parent=i,this._player=r,this._listType=n.listType,this.renderPanel(),this._initEvents(),this._bindDomEvent()}return km(e,[{key:"changeMode",value:function(e){this.updatePanel(e),this._listType=e}},{key:"renderItemList",value:function(e){var t,n=this,i=this._config;return e&&(i.list=e),this._listDom||(this._listDom=kT.createDom("div","",{},"item-list-panel-content")),this._listDom.innerHTML="",null===(t=i.list)||void 0===t||Ub(t).call(t,(function(e,t){var i,r,o=e.selected?"panel-item select-in":"panel-item ".concat(null!==(i=e.className)&&void 0!==i?i:"");e["data-index"]=t;var a=kT.createDom("div","",e,o);e.showText&&("string"==typeof e.showText?a.innerHTML=e.showText:a.appendChild(e.showText)),null===(r=n._listDom)||void 0===r||r.appendChild(a)})),this._listDom}},{key:"renderTitle",value:function(){var e,t,n=this._player.config.i18nManager;if(null!==(e=this._config.panel)&&void 0!==e&&e.title&&this._listType!==uD.Inner)return this._titleDom||(this._titleDom=kT.createDom("div","",{},"xg-mobile-panel-title")),this._titleDom.innerHTML=n.normalize(null===(t=this._config.panel)||void 0===t?void 0:t.title),this._titleDom}},{key:"updatePanel",value:function(e){this._root&&kT.removeClass(this._root,"panel-".concat(this._listType)),this._root&&kT.addClass(this._root,"panel-".concat(e));var t="mobile"===ST.device?"touchend":"click";e===uD.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,n,i=Fm(e="xg-mobile-panel panel-".concat(this._config.listType," ")).call(e,null!==(t=null===(n=this._config)||void 0===n||null===(n=n.panel)||void 0===n?void 0:n.className)&&void 0!==t?t:"");this._root=kT.createDom("div","",{},i),this._parent&&this._parent.appendChild(this._root);var r=this.renderTitle(),o=this.renderItemList();this._container=kT.createDom("div","",{},"xg-mobile-panel-content"),this._root.appendChild(this._container),r&&this._container.appendChild(r),o&&this._container.appendChild(o)}},{key:"show",value:function(){this._root&&(kT.removeClass(this._root,"hide"),kT.addClass(this._root,"active"))}},{key:"hide",value:function(){this._root&&(kT.removeClass(this._root,"active"),kT.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,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e&&"on".concat(t)in e&&"function"==typeof n&&e.addEventListener(t,n,i)}},{key:"_unbind",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e&&"on".concat(t)in e&&"function"==typeof n&&e.removeEventListener(t,n,i)}},{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(rS,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(rS,this._handleOrientationChange.bind(this))}},{key:"_handleOrientationChange",value:function(){var e,t,n,i=uw(e=[90,-90,"90","-90"]).call(e,window.orientation);if(null!==(t=this._player)&&void 0!==t&&t.fullscreen&&i)this.changeMode(uD.Fullscreen);else if(this._listType!==(null===(n=this._config)||void 0===n?void 0:n.listType)){var r;this.changeMode(null===(r=this._config)||void 0===r?void 0:r.listType)}}},{key:"_bindDomEvent",value:function(){var e="mobile"===ST.device?"touchend":"click";this._listType===uD.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=JS.delegate.call(this,this._listDom,".panel-item",e,this._onItemClick.bind(this),!0))}},{key:"_unbindDomEvent",value:function(){var e,t="mobile"===ST.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)&&(Ub(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,n,i,r,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");kT.addClass(o,"selected"),l&&(kT.removeClass(l,"selected"),r=Number(l.getAttribute("data-index")));var u=Number(o.getAttribute("data-index")),c={from:void 0!==wc(r)?null===(n=this._config.list)||void 0===n?void 0:n[r]:void 0,to:null===(i=this._config.list)||void 0===i?void 0:i[u]};null==a||a(e,c),o&&r===u||null==s||s(e,c)}},{key:"_handleHide",value:function(e){var t,n;e.stopPropagation(),e.preventDefault(),null===(t=(n=this._config).hide)||void 0===t||t.call(n)}}]),e}(),uD=function(e){return e.Middle="middle",e.Bottom="bottom",e.Fullscreen="fullscreen",e.Inner="inner",e}(uD||{}),cD=function(e){return e.Icon="Icon",e.Text="Text",e}(cD||{}),hD="mobile"===ST.device,fD=["bottom","fullscreen","inner"],dD=["middle"],pD=["bottom","inner","fullscreen"],vD=["bottom","inner","fullscreen"],gD=function(e){iA(n,e);var t=aA(n);function n(e){var i;return mm(this,n),zy(YP(i=t.call(this,e)),"optionsList",void 0),zy(YP(i),"_isIcon",void 0),zy(YP(i),"_isActive",void 0),zy(YP(i),"_curIndex",void 0),zy(YP(i),"activeEvent",void 0),zy(YP(i),"onEnter",(function(e){e.preventDefault(),e.stopPropagation(),i.emit("icon_mouseenter",{pluginName:i.pluginName}),i.toggle(!0)})),zy(YP(i),"onLeave",(function(e){e.preventDefault(),e.stopPropagation(),i.emit("icon_mouseleave",{pluginName:i.pluginName}),i._isActive&&i.toggle(!1)})),i._isIcon=!1,i._isActive=!1,i._curIndex=0,i}return km(n,[{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&&kT.addClass(this.root,"portrait"),hD&&this.on(KT,(function(){e._isActive&&(e.optionsList&&e.optionsList.hide(),e._isActive=!1)})),t.list&&this.renderItemList(t.list),this.activeEvent=hD?"touchend":"mouseenter",this.bind(this.activeEvent,this.onEnter),this.bind("mouseleave",this.onLeave)}},{key:"initIcons",value:function(){var e=this,t=this.icons,n=hw(t);if(n.length>0&&"Icon"===this.config.renderType)return n.forEach((function(n){e.appendChild(".xgplayer-icon",t[n])})),void(this._isIcon=!0);var i=this.appendChild(".xgplayer-icon",kT.createDom("span","",{},"icon-text"));i&&kT.addClass(i,"btn-text")}},{key:"show",value:function(){!this.config.list||this.config.list.length<1||this.config.hideOnSingleOption&&1===this.config.list.length||kT.addClass(this.root,"show")}},{key:"hide",value:function(){kT.removeClass(this.root,"show")}},{key:"toggle",value:function(e){if(e!==this._isActive){var t=this.player.controls,n=this.config.listType;e?(n&&uw(pD).call(pD,n)?null==t||t.blur():null==t||t.focus(),this.optionsList&&this.optionsList.show()):(n&&uw(pD).call(pD,n)?null==t||t.focus():null==t||t.focusAwhile(),this.optionsList&&this.optionsList.hide()),this._isActive=e}}},{key:"onItemClick",value:function(e,t){var n;e.preventDefault(),e.stopPropagation();var i=this.config.listType;this._curIndex=null===(n=t.to)||void 0===n?void 0:n.index,this.changeCurrentText(),(this.config.isItemClickHide||i&&uw(pD).call(pD,i))&&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,n=null==e?void 0:e[t];if(n){var i,r=Wm(this).call(this,".icon-text"),o=this.player.config.i18nManager;if(r)r.innerHTML=o.normalize(null!==(i=null==n?void 0:n.iconText)&&void 0!==i?i:null==n?void 0:n.text)}}}},{key:"renderItemList",value:function(e,t){var i,r=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 lD&&a.renderTitle());this.config.isShowIcon&&(this.optionsList=o.listType&&uw(vD).call(vD,o.listType)?new lD({config:{list:e||[],onItemClick:function(e,t){r.onItemClick(e,t)},onOptionClick:function(e,t){r.onOptionClick(e,t)},panel:this.config.panel,listType:null!==(i=o.listType)&&void 0!==i?i:n.defaultConfig.listType,isAutoChange:o.isAutoChange,hide:function(){return r.toggle(!1)}},root:s.root,player:s}):new cL({config:{data:e||[],onItemClick:function(e,t){r.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),hD||t&&uw(fD).call(fD,t)||(t="bottom"),hD||t&&uw(dD).call(dD,t)||(t="middle"),t}}],[{key:"pluginName",get:function(){return"optionsIcon"}},{key:"defaultConfig",get:function(){return{position:hD?MN.ROOT_TOP_RIGHT:MN.CONTROLS_RIGHT,listType:hD?"bottom":"middle",index:100,list:[],listStyle:{},hidePortrait:!0,isShowIcon:!1,renderType:hD?"Icon":"Text",isItemClickHide:!0,hideOnSingleOption:!0,isAutoChange:!0}}}]),n}(JS),yD=function(e){iA(n,e);var t=aA(n);function n(){return mm(this,n),t.apply(this,arguments)}return km(n,[{key:"updateLang",value:function(){this.renderItemList()}},{key:"beforeCreate",value:function(e){var t=e.player.config.sources.sourceManager;e.config.list=t.sources}},{key:"afterCreate",value:function(){iD(rA(n.prototype),"afterCreate",this).call(this),this.config.sourceManager.sources.length<2?this.hide():this.renderItemList()}},{key:"registerIcons",value:function(){return{source:{icon:sD}}}},{key:"renderItemList",value:function(){var e=this.config.sourceManager,t=e.sources,i=e.source,r=this.player.config.i18nManager,o=Ub(t).call(t,(function(e){var t;return Ky(Ky({},e),{},{showText:null!==(t=r.normalize(e.text))&&void 0!==t?t:e.name,selected:!1})})),a=mI(o).call(o,(function(e){return e.name===(null==i?void 0:i.name)}));this.config.list=t,a>-1&&(o[a].selected=!0),iD(rA(n.prototype),"renderItemList",this).call(this,o,a)}},{key:"onItemClick",value:function(e,t){var i,r=this;iD(rA(n.prototype),"onItemClick",this).call(this,e,t),null===(i=this.player.config)||void 0===i||i.veplayer.switch({source:t.to.name},{fallbackToFirstDefinition:!0}).catch((function(){r.renderItemList()}))}}],[{key:"pluginName",get:function(){return"sources"}},{key:"defaultConfig",get:function(){return Ky(Ky({},gD.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":"線路"}}}]),n}(gD);function mD(){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 _D={exports:{}};!function(e,n){var i="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",a="[object Boolean]",s="[object Date]",l="[object Function]",u="[object GeneratorFunction]",c="[object Map]",h="[object Number]",f="[object Object]",d="[object Promise]",p="[object RegExp]",v="[object Set]",g="[object String]",y="[object Symbol]",m="[object WeakMap]",_="[object ArrayBuffer]",k="[object DataView]",b="[object Float32Array]",w="[object Float64Array]",E="[object Int8Array]",C="[object Int16Array]",x="[object Int32Array]",T="[object Uint8Array]",S="[object Uint8ClampedArray]",P="[object Uint16Array]",A="[object Uint32Array]",I=/\w*$/,R=/^\[object .+?Constructor\]$/,O=/^(?:0|[1-9]\d*)$/,M={};M[o]=M["[object Array]"]=M[_]=M[k]=M[a]=M[s]=M[b]=M[w]=M[E]=M[C]=M[x]=M[c]=M[h]=M[f]=M[p]=M[v]=M[g]=M[y]=M[T]=M[S]=M[P]=M[A]=!0,M["[object Error]"]=M[l]=M[m]=!1;var L="object"==wc(t)&&t&&t.Object===Object&&t,D="object"==("undefined"==typeof self?"undefined":wc(self))&&self&&self.Object===Object&&self,N=L||D||Function("return this")(),F=n&&!n.nodeType&&n,U=F&&e&&!e.nodeType&&e,H=U&&U.exports===F;function j(e,t){return e.set(t[0],t[1]),e}function B(e,t){return e.add(t),e}function z(e,t,n,i){var r=-1,o=e?e.length:0;for(i&&o&&(n=e[++r]);++r<o;)n=t(n,e[r],r,e);return n}function V(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}function K(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function G(e,t){return function(n){return e(t(n))}}function W(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var Y,X=Array.prototype,q=Function.prototype,$=Object.prototype,Z=N["__core-js_shared__"],J=(Y=/[^.]+$/.exec(Z&&cE(Z)&&cE(Z).IE_PROTO||""))?"Symbol(src)_1."+Y:"",Q=q.toString,ee=$.hasOwnProperty,te=$.toString,ne=RegExp("^"+Q.call(ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ie=H?N.Buffer:void 0,re=N.Symbol,oe=N.Uint8Array,ae=G(LE,Object),se=Object.create,le=$.propertyIsEnumerable,ue=Mw(X),ce=TE,he=ie?ie.isBuffer:void 0,fe=G(hw,Object),de=Ue(N,"DataView"),pe=Ue(N,"Map"),ve=Ue(N,"Promise"),ge=Ue(N,"Set"),ye=Ue(N,"WeakMap"),me=Ue(Object,"create"),_e=Ve(de),ke=Ve(pe),be=Ve(ve),we=Ve(ge),Ee=Ve(ye),Ce=re?re.prototype:void 0,xe=Ce?Ce.valueOf:void 0;function Te(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Se(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Pe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Ae(e){this.__data__=new Se(e)}function Ie(e,t){var n=Ge(e)||function(e){return function(e){return function(e){return!!e&&"object"==wc(e)}(e)&&We(e)}(e)&&ee.call(e,"callee")&&(!le.call(e,"callee")||te.call(e)==o)}(e)?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],i=n.length,r=!!i;for(var a in e)!t&&!ee.call(e,a)||r&&("length"==a||Be(a,i))||n.push(a);return n}function Re(e,t,n){var i=e[t];ee.call(e,t)&&Ke(i,n)&&(void 0!==n||t in e)||(e[t]=n)}function Oe(e,t){for(var n=e.length;n--;)if(Ke(e[n][0],t))return n;return-1}function Me(e,t,n,i,r,d,m){var R;if(i&&(R=d?i(e,r,d,m):i(e)),void 0!==R)return R;if(!qe(e))return e;var O=Ge(e);if(O){if(R=function(e){var t=e.length,n=e.constructor(t);t&&"string"==typeof e[0]&&ee.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!t)return function(e,t){var n=-1,i=e.length;t||(t=Array(i));for(;++n<i;)t[n]=e[n];return t}(e,R)}else{var L=je(e),D=L==l||L==u;if(Ye(e))return function(e,t){if(t)return fw(e).call(e);var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(L==f||L==o||D&&!d){if(V(e))return d?e:{};if(R=function(e){return"function"!=typeof e.constructor||ze(e)?{}:(t=ae(e),qe(t)?se(t):{});var t}(D?{}:e),!t)return function(e,t){return Ne(e,He(e),t)}(e,function(e,t){return e&&Ne(t,$e(t),e)}(R,e))}else{if(!M[L])return d?e:{};R=function(e,t,n,i){var r=e.constructor;switch(t){case _:return De(e);case a:case s:return new r(+e);case k:return function(e,t){var n=t?De(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,i);case b:case w:case E:case C:case x:case T:case S:case P:case A:return function(e,t){var n=t?De(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,i);case c:return function(e,t,n){var i=t?n(K(e),!0):K(e);return z(i,j,new e.constructor)}(e,i,n);case h:case g:return new r(e);case p:return function(e){var t=new e.constructor(e.source,I.exec(e));return t.lastIndex=e.lastIndex,t}(e);case v:return function(e,t,n){var i=t?n(W(e),!0):W(e);return z(i,B,new e.constructor)}(e,i,n);case y:return o=e,xe?Object(xe.call(o)):{}}var o}(e,L,Me,t)}}m||(m=new Ae);var N=m.get(e);if(N)return N;if(m.set(e,R),!O)var F=n?function(e){return function(e,t,n){var i=t(e);return Ge(e)?i:function(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}(i,n(e))}(e,$e,He)}(e):$e(e);return function(e,t){for(var n=-1,i=e?e.length:0;++n<i&&!1!==t(e[n],n,e););}(F||e,(function(r,o){F&&(r=e[o=r]),Re(R,o,Me(r,t,n,i,o,e,m))})),R}function Le(e){return!(!qe(e)||(t=e,J&&J in t))&&(Xe(e)||V(e)?ne:R).test(Ve(e));var t}function De(e){var t=new e.constructor(e.byteLength);return new oe(t).set(new oe(e)),t}function Ne(e,t,n,i){n||(n={});for(var r=-1,o=t.length;++r<o;){var a=t[r],s=i?i(n[a],e[a],a,n,e):void 0;Re(n,a,void 0===s?e[a]:s)}return n}function Fe(e,t){var n,i,r=e.__data__;return("string"==(i=wc(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof t?"string":"hash"]:Ub(r)}function Ue(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Le(n)?n:void 0}Te.prototype.clear=function(){this.__data__=me?me(null):{}},Te.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Te.prototype.get=function(e){var t=this.__data__;if(me){var n=t[e];return n===i?void 0:n}return ee.call(t,e)?t[e]:void 0},Te.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:ee.call(t,e)},Te.prototype.set=function(e,t){return this.__data__[e]=me&&void 0===t?i:t,this},Se.prototype.clear=function(){this.__data__=[]},Se.prototype.delete=function(e){var t=this.__data__,n=Oe(t,e);return!(n<0)&&(n==t.length-1?t.pop():ue.call(t,n,1),!0)},Se.prototype.get=function(e){var t=this.__data__,n=Oe(t,e);return n<0?void 0:t[n][1]},Se.prototype.has=function(e){return Oe(this.__data__,e)>-1},Se.prototype.set=function(e,t){var n=this.__data__,i=Oe(n,e);return i<0?n.push([e,t]):n[i][1]=t,this},Pe.prototype.clear=function(){this.__data__={hash:new Te,map:new(pe||Se),string:new Te}},Pe.prototype.delete=function(e){return Fe(this,e).delete(e)},Pe.prototype.get=function(e){return Fe(this,e).get(e)},Pe.prototype.has=function(e){return Fe(this,e).has(e)},Pe.prototype.set=function(e,t){return Fe(this,e).set(e,t),this},Ae.prototype.clear=function(){this.__data__=new Se},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 n=this.__data__;if(n instanceof Se){var i=n.__data__;if(!pe||i.length<199)return i.push([e,t]),this;n=this.__data__=new Pe(i)}return n.set(e,t),this};var He=ce?G(ce,Object):function(){return[]},je=function(e){return te.call(e)};function Be(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||O.test(e))&&e>-1&&e%1==0&&e<t}function ze(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||$)}function Ve(e){if(null!=e){try{return Q.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Ke(e,t){return e===t||e!=e&&t!=t}(de&&je(new de(new ArrayBuffer(1)))!=k||pe&&je(new pe)!=c||ve&&je(ve.resolve())!=d||ge&&je(new ge)!=v||ye&&je(new ye)!=m)&&(je=function(e){var t=te.call(e),n=t==f?e.constructor:void 0,i=n?Ve(n):void 0;if(i)switch(i){case _e:return k;case ke:return c;case be:return d;case we:return v;case Ee:return m}return t});var Ge=Array.isArray;function We(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!Xe(e)}var Ye=he||function(){return!1};function Xe(e){var t=qe(e)?te.call(e):"";return t==l||t==u}function qe(e){var t=wc(e);return!!e&&("object"==t||"function"==t)}function $e(e){return We(e)?Ie(e):function(e){if(!ze(e))return fe(e);var t=[];for(var n in Object(e))ee.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return Me(e,!0,!0)}}(_D,_D.exports);var kD=n(_D.exports),bD=function(e){iA(i,e);var t,n=aA(i);function i(){var e,t;mm(this,i);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return zy(YP(t=n.call.apply(n,Fm(e=[this]).call(e,o))),"_waitingStartTime",0),zy(YP(t),"_timer",void 0),zy(YP(t),"_toastId",void 0),t}return km(i,[{key:"updateLang",value:function(){this.renderItemList()}},{key:"beforeCreate",value:function(e){var t,n=e.player.config.sources.sourceManager;e.config.list=null===(t=n.source)||void 0===t?void 0:t.definitions}},{key:"afterCreate",value:function(){var e,t;iD(rA(i.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(PL.WAITING,this._waiting.bind(this)),this.on(PL.PLAYING,this._clearTimer.bind(this)),this.on(PL.PAUSE,this._clearTimer.bind(this)),this.on(PL.PLAY,this._clearTimer.bind(this)),this._initTimeUpdateEvent())}},{key:"registerIcons",value:function(){return{source:{icon:mD}}}},{key:"renderItemList",value:function(){var e,t,n,r=this,o=this.player.config.sourceManager,a=null!==(e=null===(t=o.source)||void 0===t?void 0:t.definitions)&&void 0!==e?e:[],s=Ub(a).call(a,(function(e){var t;return{url:e.url,definition:e.definition||"",showText:null!==(t=r.player.config.i18nManager.normalize(e.text))&&void 0!==t?t:e.definition,selected:!1}})),l=mI(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===(n=o.source)||void 0===n?void 0:n.definitions,l>-1&&(s[l].selected=!0),iD(rA(i.prototype),"renderItemList",this).call(this,s,l)}},{key:"onItemClick",value:function(e,t){var n,r=this;this._showToast(t.to),iD(rA(i.prototype),"onItemClick",this).call(this,e,t),null===(n=this.player.config)||void 0===n||n.veplayer.switch({definition:t.to.definition}).catch((function(){r.renderItemList()}))}},{key:"fallback",value:(t=Wy(ty().mark((function e(){var t,n,i,r,o,a,s,l=arguments;return ty().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=l.length>0&&void 0!==l[0]?l[0]:{toast:!0},r=this.player.config.sourceManager,!((o=mI(t=this.config.demotePriority).call(t,(function(e){var t;return e===(null===(t=r.definition)||void 0===t?void 0:t.definition)})))<0)){e.next=5;break}return e.abrupt("return");case 5:if(a=kD(r.definition),s=this._getNextDefinition(o)){e.next=9;break}return e.abrupt("return");case 9:if(!i.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(PL.DEFINITION_FALLBACK,{from:a,to:s}),null===(n=this.player.config)||void 0===n||n.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(PL.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,n=this.player.config.i18nManager;return new Hb((function(i){var r,o,a=null===(r=t.player)||void 0===r?void 0:r.getPlugin("toast");if(a){var s=kT.createDom("div",n.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,u=kT.createDom("span",l,void 0,"veplayer-toast-txt-bt");s.appendChild(u);var c=a.toast(s,{duration:5e3,closable:!0});u.addEventListener("click",(function(){a.remove(c),i(!0)}))}else i(!1)}))}},{key:"_getNextDefinition",value:function(e){var t,n=this.player.config.sourceManager;if(null!==(t=n.source)&&void 0!==t&&t.definitions.length&&!(e+1>=this.config.demotePriority.length)){var i=e+1,r=Wm(n).call(n,{definition:this.config.demotePriority[i]});return r||this._getNextDefinition(i)}}},{key:"_initTimeUpdateEvent",value:function(){var e=this,t=this.player.currentTime;this.on(PL.TIME_UPDATE,(function(){var n=e.player.currentTime;n!==t?(t=n,e._clearTimer()):t=n}))}},{key:"_showToast",value:function(e){var t,n,i,r=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(Fm(n="".concat(a.getText("DEFINITION_SWITCHING")," ")).call(n,null!==(i=e.showText)&&void 0!==i?i:e.definition," ..."),{duration:2e3,closable:!0}),this.player.once(PL.AFTER_DEFINITION_CHANGE,(function(){void 0!==r._toastId&&o.remove(r._toastId)})))}}],[{key:"pluginName",get:function(){return"definition"}},{key:"defaultConfig",get:function(){return Ky(Ky({},gD.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":"清晰度"}}}]),i}(gD),wD={"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: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]"},ED=function(e){return e.BizVod="biz:vod",e.BizLive="biz:live",e.PluginFlv="plugin:flv",e.PluginMp4="plugin:mp4",e.PluginHls="plugin:hls",e.PluginShaka="plugin:shaka",e.PluginRtm="plugin:rtm",e.PluginXgvideo="plugin:xgvideo",e.PluginDrm="plugin:drm",e.PluginAbr="plugin:abr",e}(ED||{}),CD=function(){function e(t){var n=this;mm(this,e),zy(this,"modules",{}),zy(this,"mountPromiseMap",{}),zy(this,"_baseUrl",void 0),zy(this,"_moduleSystem",void 0),zy(this,"load",function(){var e=Wy(ty().mark((function e(t,i){var r,o,a,s,l;return ty().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n._moduleSystem){e.next=2;break}throw new Error('You have to specify moduleSystem first, call "setModuleSystem(moduleSystem)" to set module system');case 2:if(wD[t]){e.next=4;break}throw new Error('Invalid module name: "'.concat(t,'"'));case 4:if("esm"!==n._moduleSystem){e.next=11;break}if(n.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=n.modules[t].exports,e.abrupt("return",null!==(r=o.default)&&void 0!==r?r:o);case 11:if(!n.modules[t]){e.next=21;break}if(1!==n.modules[t].state){e.next=16;break}return e.abrupt("return",n.modules[t].exports);case 16:if(0!==n.modules[t].state){e.next=20;break}return e.abrupt("return",n.mountPromiseMap[t].then((function(e){var t;return null!==(t=e.default)&&void 0!==t?t:e})));case 20:throw null!==(a=n.modules[t].error)&&void 0!==a?a:new Error('Dynamic module "'.concat(t,'" load failed.'));case 21:return s=[n._baseUrl,wD[t]].join("/").replace("[env]","production").replace("[ext]","js"),l={src:null!=i?i:s,name:t,state:0,exports:{__PLUGIN_NAME__:t}},n.modules[t]=l,n.mountPromiseMap[t]=n._mount(l),e.abrupt("return",n.mountPromiseMap[t]);case 26:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()),zy(this,"registerPlugin",(function(e,t){if(!n._moduleSystem)throw new Error("You have to specify moduleSystem first, call setModuleSystem(moduleSystem) to set module system");return"esm"===n._moduleSystem?(n.modules[e]={src:"esm:".concat(e),name:e,state:1,exports:t},n.modules[e].exports):(n.modules[e]?n.modules[e].exports=t:n.modules[e]={src:"umd:".concat(e),name:e,state:1,exports:t},n.modules[e].exports)})),zy(this,"register",(function(e){return Ub(e).call(e,(function(e){return n.registerPlugin(e.__PLUGIN_NAME__,e)}))})),this._baseUrl=t.baseUrl}return km(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 Hb((function(n,i){var r=document.createElement("script");r.src=e.src,r.onload=function(){e.state=1,n(t[e.name].exports),r.onload=null},r.onerror=function(t){e.state=2,e.error=t,i(t),r.onerror=null},document.body.appendChild(r)}))}}]),e}(),xD=h,TD=Z,SD=Dn,PD=jn,AD=Hc,ID=Math.min,RD=[].lastIndexOf,OD=!!RD&&1/[1].lastIndexOf(1,-0)<0,MD=AD("lastIndexOf"),LD=OD||!MD?function(e){if(OD)return xD(RD,this,arguments)||0;var t=TD(this),n=PD(t),i=n-1;for(arguments.length>1&&(i=ID(i,SD(arguments[1]))),i<0&&(i=n+i);i>=0;i--)if(i in t&&t[i]===e)return i||0;return-1}:RD;An({target:"Array",proto:!0,forced:LD!==[].lastIndexOf},{lastIndexOf:LD});var DD,ND,FD=Vc("Array").lastIndexOf,UD=se,HD=FD,jD=Array.prototype,BD=n((function(e){var t=e.lastIndexOf;return e===jD||UD(jD,e)&&t===jD.lastIndexOf?HD:t})),zD=null!==(DD=null===(ND=document.currentScript)||void 0===ND?void 0:ND.src)&&void 0!==DD?DD:"https://tosv.byted.org/obj/lux/sdk/@byted/veplayer/".concat("2.5.1-rc.2","/object/umd/"),VD=new CD({baseUrl:fw(zD).call(zD,0,BD(zD).call(zD,"/"))}),KD=VD.registerPlugin,GD=VD.register;function WD(e,t){return YD.apply(this,arguments)}function YD(){return(YD=Wy(ty().mark((function e(t,n){var i;return ty().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,VD.load(t,n);case 3:return e.abrupt("return",e.sent);case 6:throw e.prev=6,e.t0=e.catch(0),dA(uA.MODULE_LOAD_ERROR,{ext:{name:t,cdn:null===e.t0||void 0===e.t0||null===(i=e.t0.target)||void 0===i?void 0:i.src},error:e.t0});case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))).apply(this,arguments)}var XD=function(e){if(e){TL(e).call(e,"//")&&(e=location.protocol+e);try{return new uL(e)}catch(HN){return}}},qD=['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"'];function $D(e){return function(t){var n;return null==t?void 0:uw(n=t.split("?")[0].toLowerCase()).call(n,e)}}var ZD=$D(".m3u8"),JD=$D(".mp4"),QD=$D(".flv"),eN=$D(".sdp"),tN=$D(".mpd");function nN(){return(nN=Wy(ty().mark((function e(){var t,n;return ty().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,WD(ED.PluginXgvideo);case 2:return t=e.sent,n=t.XGVideoPlugin,e.abrupt("return",null==n?void 0:n.isSupported());case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}Ky(Ky({},kT),{},{getStreamType:function(e){return ZD(e)?"hls":QD(e)?"flv":eN(e)?"rtm":JD(e)?"mp4":tN(e)?"dash":"unknown"},isMseSupported:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Yy.H264;return e===Yy.H265?ST.isHevcSupported():e===Yy.H264?ST.isMSESupport():ST.isMSESupport(e)},isSoftDecodeSupported:function(){return nN.apply(this,arguments)},isMMSSupported:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Yy.H264;return void 0!==window.ManagedMediaSource&&(e===Yy.H264?window.ManagedMediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'):e===Yy.H265?qD.some((function(e){return window.ManagedMediaSource.isTypeSupported(e)})):window.ManagedMediaSource.isTypeSupported(e))},appendSearchParams:function(e,t){var n,i=XD(e);if(!e||!i)return null!==(n=e)&&void 0!==n?n:"";var r,o=TL(e).call(e,"//");for(var a in t){var s,l,u=t[a];if(null!=i&&i.searchParams.has(a))null==i||null===(s=i.searchParams)||void 0===s||s.set(a,u);else null==i||null===(l=i.searchParams)||void 0===l||l.append(a,u)}return e=i.toString(),o?null===(r=e)||void 0===r?void 0:r.replace(location.protocol,""):e},getUrlObject:XD});var iN=ST.isWeixin,rN=ST.os,oN=ST.device,aN=rN.isAndroid,sN=rN.isIos,lN="mobile"===oN,uN=0,cN=!1,hN=function(e){iA(n,e);var t=aA(n);function n(e){var i;return mm(this,n),zy(YP(i=t.call(this,e)),"_hasSetUserAutoplay",void 0),zy(YP(i),"_timer",void 0),zy(YP(i),"_wxTimer",void 0),zy(YP(i),"_state",{mode:0,showUnmuteBt:!1}),zy(YP(i),"userClickPlay",(function(){if(!cN){var e=i.player.play();e&&e.then?e.then((function(){console.log("user action autoplay success"),cN=!0})).catch((function(e){console.warn("user action autoplay fail:",e)})):(console.warn("no play promise"),cN=!0)}})),i}return km(n,[{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(qT,this.handleAutoplayPrevented.bind(this)),this.player.on(XT,this.handleAutoplayStart.bind(this)),this.player.on(BT,this.handleVolumechange.bind(this)),this.setUserActionAutoPlay()}},{key:"setWXAutoPlay",value:function(){iN&&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():aN?this.player.once(HT,this.wxCanPlayFn.bind(this)):sN&&this.player.once($T,this.wxCanPlayFn.bind(this))}},{key:"setUserActionAutoPlay",value:function(){var e=this;this.config.enableUserActionAutoplay&&this.player.once(SL.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(){return 0===this._state.mode?(console.warn("unmute autoplay fail"),this.player.emit(SL.AUTOPLAY_FAIL,{mode:"unmute"}),aN&&iN?void(this._state.mode=2):void(this.config.enableDegradeMuteAutoplay&&this.changeMuteMode())):1===this._state.mode?(console.warn("mute autoplay fail"),this.player.emit(SL.AUTOPLAY_FAIL,{mode:"mute"}),void(this._state.mode=2)):2===this._state.mode?(this.player.emit(SL.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(SL.AUTOPLAY_SUCCESS,{mode:"mute"}),this._state.showUnmuteBt=!0,void this.renderUnmuteBt()):2===this._state.mode?(this.player.emit(SL.AUTOPLAY_SUCCESS,{mode:"click"}),this.player.muted=!1,this._state.showUnmuteBt=!1,void this.renderUnmuteBt()):void 0;this.player.emit(SL.AUTOPLAY_SUCCESS,{mode:"unmute"})}},{key:"handleVolumechange",value:function(){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 n=t.getText("UNMUTE"),i=kT.createDom("div",n,void 0,"veplayer-unmute-bt");e.appendChild(i),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-uN>200){uN=e,this.player.muted=!1,this._state.showUnmuteBt=!1,this.renderUnmuteBt(),this.emit(SL.AUTOPLAY_UNMUTE);var t="mobile"===ST.device,n=eN(this.player.config.url);t&&n&&(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(qT,this.handleAutoplayPrevented.bind(this)),this.player.off(XT,this.handleAutoplayStart.bind(this)),this.player.off(BT,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=lN?"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:JS.POSITIONS.ROOT,enableDegradeMuteAutoplay:!1,enableWxJsBridgeAutoplay:!1,userActionDom:window.document.body,enableUserActionAutoplay:!1}}}]),n}(JS),fN=HL.values;An({target:"Object",stat:!0},{values:function(e){return fN(e)}});var dN=n(te.Object.values);function pN(){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 vN,gN,yN=function(e){iA(n,e);var t=aA(n);function n(){return mm(this,n),t.apply(this,arguments)}return km(n,[{key:"onItemClick",value:function(){}},{key:"onOptionClick",value:function(){this.toggle(!1)}},{key:"updateLang",value:function(){var e,t=this,n=this.player.config.i18nManager;null===(e=this.config.plugins)||void 0===e||e.forEach((function(e){var i,r=null!==(i=n.normalize(e.textTips))&&void 0!==i?i:e.pluginName;if(t.player.root){var o=kT.findDom(t.player.root,".panel-plugin-".concat(e.pluginName," .panel-icon-bt-text"));o&&(o.innerHTML=r)}}))}},{key:"beforeCreate",value:function(e){var t,n=e.player.config.i18nManager;e.config.list=null===(t=e.config.plugins)||void 0===t?void 0:Ub(t).call(t,(function(t,i){var r,o=kT.createDom("div","",{},"panel-icon-bt panel-plugin-".concat(t.pluginName)),a=kT.createDom("div","",{},"panel-icon-svg"),s=null!==(r=n.normalize(t.textTips))&&void 0!==r?r:t.pluginName;return o.appendChild(a),o.appendChild(kT.createDom("span",s,{"plugin-index":i},"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 n=document.querySelector(".panel-plugin-".concat(e.pluginName));n&&kT.addClass(n,"hide")}}},{key:"showChild",value:function(e){if(e){var t;null===(t=e.show)||void 0===t||t.call(e);var n=document.querySelector(".panel-plugin-".concat(e.pluginName));n&&kT.removeClass(n,"hide")}}},{key:"registerIcons",value:function(){return{more:{icon:pN}}}}],[{key:"pluginName",get:function(){return"more"}},{key:"defaultConfig",get:function(){return Ky(Ky({},gD.defaultConfig),{},{index:1,plugins:[],list:[],hideOnSingleOption:!1,isShowIcon:!0,hidePortrait:!1,renderType:cD.Icon,panel:{className:"more-panel-content"}})}}]),n}(gD),mN=function(e){return e.ROOT_TOP_RIGHT="rootTopRight",e.ROOT_TOP_RIGHT_COLLAPSE="rootTopRightCollapse",e}(mN||{}),_N=function(e){iA(n,e);var t=aA(n);function n(){return mm(this,n),t.apply(this,arguments)}return km(n,[{key:"registerIcons",value:function(){return{more:{icon:pN,class:"xgplayer-more-svg"}}}},{key:"children",value:function(){var e=this,t=this._getPlugins(),n=t.plugins,i=t.collapsePlugins,r={};return n.forEach((function(t){r[t.pluginName]={plugin:t,options:{root:e.root}}})),i.length&&(r[yN.pluginName]={plugin:yN,options:{root:this.root,plugins:i}}),r}},{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,n=[],i=[],r=null===(e=this.player.config.ignores)||void 0===e?void 0:Ub(e).call(e,(function(e){return e.toLowerCase()}));return this.config.plugins.forEach((function(e){var o,a=e.pluginName.toLowerCase();null!=r&&uw(r).call(r,a)||("rootTopRight"===(null!==(o=t.player.config[a].position)&&void 0!==o?o:e.defaultConfig.position)?n.push(e):i.push(e))})),{plugins:null!=n?n:[],collapsePlugins:null!=i?i:[]}}}],[{key:"pluginName",get:function(){return"topRightBar"}},{key:"defaultConfig",get:function(){return{position:JS.POSITIONS.ROOT_TOP,plugins:[]}}},{key:"isTopRightPlugin",value:function(e,t){var n,i,r,o,a,s=null!==(i=null===(r=t[null==e||null===(n=e.pluginName)||void 0===n?void 0:n.toLowerCase()])||void 0===r?void 0:r.position)&&void 0!==i?i:null==e||null===(o=e.defaultConfig)||void 0===o?void 0:o.position;return!!uw(a=dN(mN)).call(a,s)}}]),n}(JS),kN=[kI,xI,AI,LA,DI,vA,kA,uI,bA,oD,aD,yD,bD,hN],bN=Fm(vN=[]).call(vN,kN,[sI,FA,_N]),wN=Fm(gN=[]).call(gN,kN,[eI,_N]),EN="pc"===ST.device?bN:wN;function CN(){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 xN(){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}var TN,SN={startPlay:function(){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},play:function(){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},pause:function(){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},fullscreen:xN,exitFullscreen:CN,replay:function(){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},volumeLarge:function(){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},volumeMuted:function(){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},volumeSmall:function(){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}},PN=Ky(Ky({},SN),{},{fullscreen:xN,exitFullscreen:CN}),AN=Ky(Ky({},SN),{},{fullscreen:function(){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},exitFullscreen:function(){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}}),IN="pc"===ST.device?PN:AN,RN=function(){function e(t){var n;if(mm(this,e),zy(this,"_lang",void 0),this._lang=(null==t?void 0:t.lang)||ET()||"en","zh"===this._lang&&(this._lang="zh-cn"),null!=t&&null!==(n=t.i18n)&&void 0!==n&&n.texts){var i,r,o=Ub(i=BL(null==t||null===(r=t.i18n)||void 0===r?void 0:r.texts)).call(i,(function(e){var t=RL(e,2);return{LANG:t[0],TEXT:t[1]}}));e.extend(o)}}return km(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,n,i;if(e){var r=null==IP?void 0:IP.lang;return null!==(t=null==r||null===(n=r[this._lang])||void 0===n?void 0:n[e])&&void 0!==t?t:null==r||null===(i=r.en)||void 0===i?void 0:i[e]}}}],[{key:"langKeys",get:function(){return IP.langKeys}},{key:"isLangValid",value:function(e){var t;return uw(t=IP.langKeys).call(t,e)||"zh"===e}},{key:"extend",value:function(e,t){IP.extend(e,t)}}]),e}(),ON=["autoplay"],MN=Ky(Ky({},JS.POSITIONS),mN),LN={id:"veplayer",width:"100%",height:"100%",decodeType:Xy.Hardware,fullscreen:{useCssFullscreen:!1}},DN=function(e){var t,n,i,r=e.autoplay,o=Om(e,ON);(o.poster&&(o.poster=function(e){var t,n=""+e,i=IL.exec(n);if(!i)return n;var r,o="",a=0;for(r=i.index;r<n.length;r++){switch(n.charCodeAt(r)){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!==r&&(o+=n.substring(a,r)),a=r+1,o+=t}return a!==r?o+n.substring(a,r):o}(o.poster)),o.icons=Ky(Ky({},IN),o.icons?(t=o.icons,n={},BL(null!=t?t:{}).forEach((function(e){var t=RL(e,2),i=t[0],r=t[1];"string"==typeof r?console.warn("icons.".concat(i," has been removed")):n[i]=r})),n):{}),o.autoplay=Boolean(r),r&&"boolean"!=typeof r)&&(o.autoplayMuted=null==r?void 0:r.muted,o.videoAttributes=Ky(Ky({},null!==(i=o.videoAttributes)&&void 0!==i?i:{}),{},{muted:null==r?void 0:r.muted}),o.autoplayPlugin=r);return delete o.i18n,o},NN=function(){function e(){var t,n,i,r,o,a,s,l,u,c,h,f,d=this,p=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};mm(this,e),zy(this,"_player",void 0),zy(this,"_sourceManager",void 0),zy(this,"_preparePlugins",void 0),zy(this,"_previousPrepareResult",void 0),zy(this,"_i18nManager",void 0),zy(this,"_events",{}),zy(this,"_errorCallback",void 0),this._sourceManager=p.sourceManager,this._preparePlugins=p.preparePlugins,this._previousPrepareResult=p.prepareResult,this._i18nManager=null!==(t=p.i18nManager)&&void 0!==t?t:new RN({i18n:p.i18n});var v=DN(Ky(Ky({},p),null===(n=this._previousPrepareResult)||void 0===n?void 0:n.options)),g=Fm(i=[]).call(i,ym(null!==(r=null===(o=this._previousPrepareResult)||void 0===o?void 0:o.plugins)&&void 0!==r?r:[]),ym(null!==(a=p.plugins)&&void 0!==a?a:EN)),y=[],m=[];g.forEach((function(e){_N.isTopRightPlugin(e,p)?y.push(e):m.push(e)})),this._player=new WP(Ky(Ky(Ky({},LN),v),{},{definition:Ky({list:null!==(s=null===(l=this._sourceManager.source)||void 0===l?void 0:l.definitions)&&void 0!==s?s:[],defaultDefinition:null===(u=this._sourceManager.definition)||void 0===u?void 0:u.definition},null!==(c=p.definition)&&void 0!==c?c:{}),url:null===(h=this._sourceManager.definition)||void 0===h?void 0:h.url,sources:Ky(Ky({},null!==(f=p.sources)&&void 0!==f?f:{}),{},{sourceManager:this._sourceManager}),topRightBar:{plugins:y},plugins:m,i18nManager:this._i18nManager,veplayer:this})),this.emit(PL.PLAYER_CREATE_FINISH,this._player),this._errorCallback=function(e){return d._handleFallback(e)},this._player.on(DT,this._errorCallback)}var t,n,i,r,o,a;return km(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.5.1-rc.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(RN.isLangValid(e))this._i18nManager.setLang(e),this._player.lang=e;else{var t,n,i,r,o=RN.langKeys.join(","),a={en:Fm(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":Fm(n="不支持当前设置的语言".concat(e,", 支持的语言有")).call(n,o,", 请重新设置")};console.error((null===(i=this._i18nManager)||void 0===i||null===(r=i.normalize)||void 0===r?void 0:r.call(i,a))||a.en)}}},{key:"_src",get:function(){return this._player.currentSrc}},{key:"switch",value:(a=Wy(ty().mark((function e(t,n){var i,r,o,a;return ty().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"!=typeof t||1!==this._sourceManager.sources.length||1!==(null===(i=this._sourceManager.sources)||void 0===i||null===(i=i[0].definitions)||void 0===i?void 0:i.length)){e.next=5;break}return this._sourceManager.updateSources(t),e.next=4,this._switchUrl(t,{seamless:null==n?void 0:n.seamless});case 4:return e.abrupt("return",this._sourceManager.definition);case 5:if(o=Wm(r=this._sourceManager).call(r,t,n)){e.next=8;break}throw new Error("string"==typeof t?"No definition found for url: ".concat(t):Fm(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 a.apply(this,arguments)})},{key:"updatePlaylist",value:function(e,t){var n=this._sourceManager.updateSources(e,t);return this._switch(n.definition)}},{key:"once",value:function(e,t){var n,i=this._transformEvent(e,t),r=i.xgCallback,o=i.xgEventName;r&&(null!==(n=this._events)&&void 0!==n&&n[e]||(this._events[e]=new Ob),this._events[e].set(t,r),this._player.once(o,r))}},{key:"off",value:function(e,t){var n,i=null===(n=this._events[e])||void 0===n?void 0:n.get(t),r=this._transformEvent(e).xgEventName;i&&(this._player.off(r,i),this._events[e].delete(t))}},{key:"emit",value:function(e,t){var n=this._transformEvent(e).xgEventName;this._player.emit(n,t)}},{key:"offAll",value:function(){this._events={},this._player.offAll()}},{key:"on",value:function(e,t){var n,i=this._transformEvent(e,t),r=i.xgCallback,o=i.xgEventName;r&&(null!==(n=this._events)&&void 0!==n&&n[e]||(this._events[e]=new Ob),this._events[e].set(t,r),this._player.on(o,r))}},{key:"play",value:function(){return this._player.play()}},{key:"pause",value:function(){return this._player.pause()}},{key:"requestPIP",value:function(){var e;null===(e=this._player.plugins.pip)||void 0===e||e.requestPIP()}},{key:"exitPIP",value:function(){var e;null===(e=this._player.plugins.pip)||void 0===e||e.exitPIP()}},{key:"retry",value:function(){return this._player.retry()}},{key:"focus",value:function(e){return this._player.focus(e)}},{key:"blur",value:function(e){return this._player.blur(e)}},{key:"canPlayType",value:function(e){return this._player.canPlayType(e)}},{key:"requestFullscreen",value:function(e){return this._player.getFullscreen(e)}},{key:"exitFullscreen",value:function(e){return this._player.exitFullscreen(e)}},{key:"requestCssFullscreen",value:function(e){return this._player.getCssFullscreen(e)}},{key:"exitCssFullscreen",value:function(){return this._player.exitCssFullscreen()}},{key:"registerPlugin",value:function(e,t){return this._player.registerPlugin(e,t)}},{key:"unRegisterPlugin",value:function(e){return this._player.unRegisterPlugin(e)}},{key:"showIcon",value:function(e){var t=this,n=this._player.getPlugin("more");e.forEach((function(e){var i=t._player.getPlugin(e);i&&null!=i&&i.root&&(i.config.position===MN.ROOT_TOP_RIGHT_COLLAPSE?null==n||n.showChild(i):i.show())}))}},{key:"hideIcon",value:function(e){var t=this,n=this._player.getPlugin("more");e.forEach((function(e){var i=t._player.getPlugin(e);i&&null!=i&&i.root&&(i.config.position===MN.ROOT_TOP_RIGHT_COLLAPSE?null==n||n.hideChild(i):i.hide())}))}},{key:"destroy",value:function(){this._player.off(DT,this._errorCallback),this._player.destroy()}},{key:"prepare",value:(o=Wy(ty().mark((function e(t){var n,i,r,o,a,s,l,u,c=this;return ty().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===(n=this._preparePlugins)||void 0===n?void 0:n.call(this,t);case 2:return a=e.sent,s=this._diffPlugins(null!==(i=null===(r=this._previousPrepareResult)||void 0===r?void 0:r.plugins)&&void 0!==i?i:[],null!==(o=null==a?void 0:a.plugins)&&void 0!==o?o:[]),l=s.removedPlugins,u=s.addedPlugins,null==l||l.forEach((function(e){c._player.unRegisterPlugin(e)})),this._previousPrepareResult=a,null!=a&&a.options&&this._player.setConfig(a.options),e.abrupt("return",{plugins:Ub(u).call(u,(function(e){return c._player.registerPlugin(e)})),options:null==a?void 0:a.options});case 8:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"_handleFallback",value:(r=Wy(ty().mark((function e(t){var n,i,r=this;return ty().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._player.addClass(iP),n=this._sourceManager.url,i=this._sourceManager.fallback()){e.next=7;break}return this._player.removeClass(iP),this.emit(PL.FALLBACK_ERROR,pA(t,this._i18nManager)),e.abrupt("return");case 7:this._player.once("canplay",(function(){r._sourceManager.resetFallback()})),this.emit(PL.FALLBACK,{from:{url:n},to:{url:i}}),this._switchUrl(i);case 10:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"_transformEvent",value:function(e,t){var n=this;return e===DT?{xgCallback:t?function(e){t(pA(e,n._i18nManager))}:void 0,xgEventName:e}:function(e,t){var n=AL[e];if(n)return{xgEventName:n.event,xgCallback:t?n.shouldCallback?function(){for(var e,i,r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];null!==(e=n.shouldCallback)&&void 0!==e&&e.call.apply(e,Fm(i=[n]).call(i,o))&&(null==t||t.apply(void 0,o))}:t:void 0};return{xgEventName:e,xgCallback:t}}(e,t)}},{key:"_switch",value:(i=Wy(ty().mark((function e(t){var n,i,r,o,a,s,l,u;return ty().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=kD(this._sourceManager.definition),e.next=3,this.prepare(t.url);case 3:if(e.t0=e.sent,e.t0){e.next=6;break}e.t0={};case 6:if(s=e.t0,l=s.plugins,null!=(u=s.options)&&u.url&&(t.url=null==u?void 0:u.url),this._sourceManager.switch(t),null===(n=this._player)||void 0===n||null===(n=n.plugins)||void 0===n||n.sources.renderItemList(),null===(i=this._player)||void 0===i||null===(i=i.plugins)||void 0===i||i.definition.renderItemList(),(null==t||null===(r=t.source)||void 0===r?void 0:r.name)!==(null==a||null===(o=a.source)||void 0===o?void 0:o.name)&&this.emit(PL.SOURCE_CHANGE),null==l||!l.length){e.next=21;break}return this.emit(PL.DEFINITION_CHANGE),e.next=18,this._callBeforePlayerInitForUrl(l,t.url);case 18:this.emit(PL.AFTER_DEFINITION_CHANGE),e.next=22;break;case 21:this._player.changeDefinition(t,a);case 22:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"_switchUrl",value:(n=Wy(ty().mark((function e(t,n){var i,r,o,a,s,l,u,c=this;return ty().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.prepare(t);case 2:if(e.t0=e.sent,e.t0){e.next=5;break}e.t0={};case 5:if(r=e.t0,o=r.plugins,a=r.options,s=null!==(i=null==a?void 0:a.url)&&void 0!==i?i:t,this._sourceManager.url=s,null==o||!o.length){e.next=14;break}this._callBeforePlayerInitForUrl(o,s),e.next=21;break;case 14:if(l=this._player.switchURL(s,{seamless:null==n?void 0:n.seamless}),u=this._player.currentTime,!l||!l.then){e.next=20;break}return e.abrupt("return",l);case 20:return e.abrupt("return",new Hb((function(e){var t=c._player.paused&&!c._player.isError,n=function(){c._player.currentTime=u,t&&c._player.once(HT,(function(){c._player.pause()})),e()};ST.os.isAndroid?c.once(FT,(function(){n()})):c.once(HT,(function(){n()})),c._player.play()})));case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"_diffPlugins",value:function(e,t){var n=Ub(e).call(e,(function(e){return e.pluginName})),i=Ub(t).call(t,(function(e){return e.pluginName}));return{removedPlugins:jb(n).call(n,(function(e){return!uw(i).call(i,e)})),addedPlugins:jb(t).call(t,(function(e){return!uw(n).call(n,e.pluginName)}))}}},{key:"_callBeforePlayerInitForUrl",value:function(e,t){var n=this;return new Hb((function(i){n._player.config.url=t,null==e||e.forEach((function(e){e.beforePlayerInit()})),n._player.on(PL.CANPLAY,(function(){i(void 0)}))}))}}],[{key:"create",value:(t=Wy(ty().mark((function t(){var n,i,r,o,a,s,l,u,c=arguments;return ty().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=c.length>0&&void 0!==c[0]?c[0]:{},a=c.length>1?c[1]:void 0,s=new nD({sources:tD.normalize({url:o.url,fallbackUrls:o.fallbackUrls,sources:o.playlist}),url:o.url,defaultSource:o.defaultSource,defaultDefinition:o.defaultDefinition,maxFallbackRound:o.maxFallbackRound}),t.next=5,null==o||null===(n=o.preparePlugins)||void 0===n?void 0:n.call(o,null!==(i=s.url)&&void 0!==i?i:"");case 5:return null!=(l=t.sent)&&null!==(r=l.options)&&void 0!==r&&r.url&&(s.url=null==l||null===(u=l.options)||void 0===u?void 0:u.url),o.url=s.url,t.abrupt("return",new(null!=a?a:e)(Ky(Ky({},o),{},{prepareResult:l,sourceManager:s})));case 9:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)})}]),e}();function FN(e){return UN.apply(this,arguments)}function UN(){return(UN=Wy(ty().mark((function e(t){return ty().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,NN.create(Ky({url:"//sf1-cdn-tos.huoshanstatic.com/obj/media-fe/xgplayer_doc_video/mp4/xgplayer-demo-360p.mp4"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}TN="umd",VD.setModuleSystem(TN),void 0!==VePlayer.register?VePlayer.registerPlugin(ED.BizVod,{createVodPlayer:FN}):KD(ED.BizVod,{createVodPlayer:FN}),e.createVodPlayer=FN,e.load=WD,e.register=GD}));