@byteplus/veplayer 1.10.0 → 1.11.1-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.min.js DELETED
@@ -1,2 +0,0 @@
1
- // @byteplus/veplayer@1.10.0 Built @3/11/2025, 9:40:45 PM
2
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).VePlayer=t()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n={exports:{}},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 e&&e)||function(){return this}()||e||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,c=l.apply,u=l.call,h="object"==typeof Reflect&&Reflect.apply||(s?u.bind(c):function(){return u.apply(c,arguments)}),d=a,f=Function.prototype,p=f.call,v=d&&f.bind.bind(p,p),g=d?v:function(e){return function(){return p.apply(e,arguments)}},y=g,m=y({}.toString),_=y("".slice),b=function(e){return _(m(e),8,-1)},k=b,E=g,w=function(e){if("Function"===k(e))return E(e)},S="object"==typeof document&&document.all,T={all:S,IS_HTMLDDA:void 0===S&&void 0!==S},C=T.all,x=T.IS_HTMLDDA?function(e){return"function"==typeof e||e===C}:function(e){return"function"==typeof e},D={},I=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),R=a,L=Function.prototype.call,P=R?L.bind(L):function(){return L.apply(L,arguments)},A={},O={}.propertyIsEnumerable,M=Object.getOwnPropertyDescriptor,N=M&&!O.call({1:2},1);A.f=N?function(e){var t=M(this,e);return!!t&&t.enumerable}:O;var z,U,B=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},F=o,H=b,j=Object,G=g("".split),V=F((function(){return!j("z").propertyIsEnumerable(0)}))?function(e){return"String"==H(e)?G(e,""):j(e)}:j,K=function(e){return null==e},W=K,Y=TypeError,q=function(e){if(W(e))throw Y("Can't call method on "+e);return e},X=V,$=q,Z=function(e){return X($(e))},Q=x,J=T.all,ee=T.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:Q(e)||e===J}:function(e){return"object"==typeof e?null!==e:Q(e)},te={},ne=te,ie=r,re=x,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)||"",ce=r,ue=le,he=ce.process,de=ce.Deno,fe=he&&he.versions||de&&de.version,pe=fe&&fe.v8;pe&&(U=(z=pe.split("."))[0]>0&&z[0]<4?1:+(z[0]+z[1])),!U&&ue&&(!(z=ue.match(/Edge\/(\d+)/))||z[1]>=74)&&(z=ue.match(/Chrome\/(\d+)/))&&(U=+z[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})),be=_e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ke=ae,Ee=x,we=se,Se=Object,Te=be?function(e){return"symbol"==typeof e}:function(e){var t=ke("Symbol");return Ee(t)&&we(t.prototype,Se(e))},Ce=String,xe=function(e){try{return Ce(e)}catch(t){return"Object"}},De=x,Ie=xe,Re=TypeError,Le=function(e){if(De(e))return e;throw Re(Ie(e)+" is not a function")},Pe=Le,Ae=K,Oe=function(e,t){var n=e[t];return Ae(n)?void 0:Pe(n)},Me=P,Ne=x,ze=ee,Ue=TypeError,Be={exports:{}},Fe=r,He=Object.defineProperty,je=function(e,t){try{He(Fe,e,{value:t,configurable:!0,writable:!0})}catch(n){Fe[e]=t}return t},Ge="__core-js_shared__",Ve=r[Ge]||je(Ge,{}),Ke=Ve;(Be.exports=function(e,t){return Ke[e]||(Ke[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=Be.exports,Ye=q,qe=Object,Xe=function(e){return qe(Ye(e))},$e=Xe,Ze=g({}.hasOwnProperty),Qe=Object.hasOwn||function(e,t){return Ze($e(e),t)},Je=g,et=0,tt=Math.random(),nt=Je(1..toString),it=function(e){return"Symbol("+(void 0===e?"":e)+")_"+nt(++et+tt,36)},rt=We,ot=Qe,at=it,st=_e,lt=be,ct=r.Symbol,ut=rt("wks"),ht=lt?ct.for||ct:ct&&ct.withoutSetter||at,dt=function(e){return ot(ut,e)||(ut[e]=st&&ot(ct,e)?ct[e]:ht("Symbol."+e)),ut[e]},ft=P,pt=ee,vt=Te,gt=Oe,yt=function(e,t){var n,i;if("string"===t&&Ne(n=e.toString)&&!ze(i=Me(n,e)))return i;if(Ne(n=e.valueOf)&&!ze(i=Me(n,e)))return i;if("string"!==t&&Ne(n=e.toString)&&!ze(i=Me(n,e)))return i;throw Ue("Can't convert object to primitive value")},mt=TypeError,_t=dt("toPrimitive"),bt=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=ft(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)},kt=Te,Et=function(e){var t=bt(e,"string");return kt(t)?t:t+""},wt=ee,St=r.document,Tt=wt(St)&&wt(St.createElement),Ct=function(e){return Tt?St.createElement(e):{}},xt=Ct,Dt=!I&&!o((function(){return 7!=Object.defineProperty(xt("div"),"a",{get:function(){return 7}}).a})),It=I,Rt=P,Lt=A,Pt=B,At=Z,Ot=Et,Mt=Qe,Nt=Dt,zt=Object.getOwnPropertyDescriptor;D.f=It?zt:function(e,t){if(e=At(e),t=Ot(t),Nt)try{return zt(e,t)}catch(n){}if(Mt(e,t))return Pt(!Rt(Lt.f,e,t),e[t])};var Ut=o,Bt=x,Ft=/#|\.prototype\./,Ht=function(e,t){var n=Gt[jt(e)];return n==Kt||n!=Vt&&(Bt(t)?Ut(t):!!t)},jt=Ht.normalize=function(e){return String(e).replace(Ft,".").toLowerCase()},Gt=Ht.data={},Vt=Ht.NATIVE="N",Kt=Ht.POLYFILL="P",Wt=Ht,Yt=Le,qt=a,Xt=w(w.bind),$t=function(e,t){return Yt(e),void 0===t?e:qt?Xt(e,t):function(){return e.apply(t,arguments)}},Zt={},Qt=I&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Jt=ee,en=String,tn=TypeError,nn=function(e){if(Jt(e))return e;throw tn(en(e)+" is not an object")},rn=I,on=Dt,an=Qt,sn=nn,ln=Et,cn=TypeError,un=Object.defineProperty,hn=Object.getOwnPropertyDescriptor,dn="enumerable",fn="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:fn in n?n[fn]:i[fn],enumerable:dn in n?n[dn]:i[dn],writable:!1})}return un(e,t,n)}:un:function(e,t,n){if(sn(e),t=ln(t),sn(n),on)try{return un(e,t,n)}catch(i){}if("get"in n||"set"in n)throw cn("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var vn=Zt,gn=B,yn=I?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,bn=w,kn=x,En=D.f,wn=Wt,Sn=te,Tn=$t,Cn=yn,xn=Qe,Dn=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},In=function(e,t){var n,i,r,o,a,s,l,c,u,h=e.target,d=e.global,f=e.stat,p=e.proto,v=d?mn:f?mn[h]:(mn[h]||{}).prototype,g=d?Sn:Sn[h]||Cn(Sn,h,{})[h],y=g.prototype;for(o in t)i=!(n=wn(d?o:h+(f?".":"#")+o,e.forced))&&v&&xn(v,o),s=g[o],i&&(l=e.dontCallGetSet?(u=En(v,o))&&u.value:v[o]),a=i&&l?l:t[o],i&&typeof s==typeof a||(c=e.bind&&i?Tn(a,mn):e.wrap&&i?Dn(a):p&&kn(a)?bn(a):a,(e.sham||a&&a.sham||s&&s.sham)&&Cn(c,"sham",!0),Cn(g,o,c),p&&(xn(Sn,r=h+"Prototype")||Cn(Sn,r,{}),Cn(Sn[r],o,a),e.real&&y&&(n||!y[o])&&Cn(y,o,a)))},Rn=In,Ln=I,Pn=Zt.f;Rn({target:"Object",stat:!0,forced:Object.defineProperty!==Pn,sham:!Ln},{defineProperty:Pn});var An=te.Object,On=n.exports=function(e,t,n){return An.defineProperty(e,t,n)};An.defineProperty.sham&&(On.sham=!0);var Mn=t(n.exports),Nn=b,zn=Array.isArray||function(e){return"Array"==Nn(e)},Un=Math.ceil,Bn=Math.floor,Fn=Math.trunc||function(e){var t=+e;return(t>0?Bn:Un)(t)},Hn=function(e){var t=+e;return t!=t||0===t?0:Fn(t)},jn=Hn,Gn=Math.min,Vn=function(e){return e>0?Gn(jn(e),9007199254740991):0},Kn=Vn,Wn=function(e){return Kn(e.length)},Yn=TypeError,qn=function(e){if(e>9007199254740991)throw Yn("Maximum allowed index exceeded");return e},Xn=Et,$n=Zt,Zn=B,Qn=function(e,t,n){var i=Xn(t);i in e?$n.f(e,i,Zn(0,n)):e[i]=n},Jn={};Jn[dt("toStringTag")]="z";var ei="[object z]"===String(Jn),ti=ei,ni=x,ii=b,ri=dt("toStringTag"),oi=Object,ai="Arguments"==ii(function(){return arguments}()),si=ti?ii: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=oi(e),ri))?n:ai?ii(t):"Object"==(i=ii(t))&&ni(t.callee)?"Arguments":i},li=x,ci=Ve,ui=g(Function.toString);li(ci.inspectSource)||(ci.inspectSource=function(e){return ui(e)});var hi=ci.inspectSource,di=g,fi=o,pi=x,vi=si,gi=hi,yi=function(){},mi=[],_i=ae("Reflect","construct"),bi=/^\s*(?:class|function)\b/,ki=di(bi.exec),Ei=!bi.exec(yi),wi=function(e){if(!pi(e))return!1;try{return _i(yi,mi,e),!0}catch(t){return!1}},Si=function(e){if(!pi(e))return!1;switch(vi(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Ei||!!ki(bi,gi(e))}catch(t){return!0}};Si.sham=!0;var Ti=!_i||fi((function(){var e;return wi(wi.call)||!wi(Object)||!wi((function(){e=!0}))||e}))?Si:wi,Ci=zn,xi=Ti,Di=ee,Ii=dt("species"),Ri=Array,Li=function(e){var t;return Ci(e)&&(t=e.constructor,(xi(t)&&(t===Ri||Ci(t.prototype))||Di(t)&&null===(t=t[Ii]))&&(t=void 0)),void 0===t?Ri:t},Pi=function(e,t){return new(Li(e))(0===t?0:t)},Ai=o,Oi=ve,Mi=dt("species"),Ni=function(e){return Oi>=51||!Ai((function(){var t=[];return(t.constructor={})[Mi]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},zi=In,Ui=o,Bi=zn,Fi=ee,Hi=Xe,ji=Wn,Gi=qn,Vi=Qn,Ki=Pi,Wi=Ni,Yi=ve,qi=dt("isConcatSpreadable"),Xi=Yi>=51||!Ui((function(){var e=[];return e[qi]=!1,e.concat()[0]!==e})),$i=function(e){if(!Fi(e))return!1;var t=e[qi];return void 0!==t?!!t:Bi(e)};zi({target:"Array",proto:!0,arity:1,forced:!Xi||!Wi("concat")},{concat:function(e){var t,n,i,r,o,a=Hi(this),s=Ki(a,0),l=0;for(t=-1,i=arguments.length;t<i;t++)if($i(o=-1===t?a:arguments[t]))for(r=ji(o),Gi(l+r),n=0;n<r;n++,l++)n in o&&Vi(s,l,o[n]);else Gi(l+1),Vi(s,l++,o);return s.length=l,s}});var Zi=si,Qi=String,Ji=function(e){if("Symbol"===Zi(e))throw TypeError("Cannot convert a Symbol value to a string");return Qi(e)},er={},tr=Hn,nr=Math.max,ir=Math.min,rr=function(e,t){var n=tr(e);return n<0?nr(n+t,0):ir(n,t)},or=Z,ar=rr,sr=Wn,lr=function(e){return function(t,n,i){var r,o=or(t),a=sr(o),s=ar(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}},cr={includes:lr(!0),indexOf:lr(!1)},ur={},hr=Qe,dr=Z,fr=cr.indexOf,pr=ur,vr=g([].push),gr=function(e,t){var n,i=dr(e),r=0,o=[];for(n in i)!hr(pr,n)&&hr(i,n)&&vr(o,n);for(;t.length>r;)hr(i,n=t[r++])&&(~fr(o,n)||vr(o,n));return o},yr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],mr=gr,_r=yr,br=Object.keys||function(e){return mr(e,_r)},kr=I,Er=Qt,wr=Zt,Sr=nn,Tr=Z,Cr=br;er.f=kr&&!Er?Object.defineProperties:function(e,t){Sr(e);for(var n,i=Tr(t),r=Cr(t),o=r.length,a=0;o>a;)wr.f(e,n=r[a++],i[n]);return e};var xr,Dr=ae("document","documentElement"),Ir=it,Rr=We("keys"),Lr=function(e){return Rr[e]||(Rr[e]=Ir(e))},Pr=nn,Ar=er,Or=yr,Mr=ur,Nr=Dr,zr=Ct,Ur="prototype",Br="script",Fr=Lr("IE_PROTO"),Hr=function(){},jr=function(e){return"<"+Br+">"+e+"</"+Br+">"},Gr=function(e){e.write(jr("")),e.close();var t=e.parentWindow.Object;return e=null,t},Vr=function(){try{xr=new ActiveXObject("htmlfile")}catch(r){}var e,t,n;Vr="undefined"!=typeof document?document.domain&&xr?Gr(xr):(t=zr("iframe"),n="java"+Br+":",t.style.display="none",Nr.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(jr("document.F=Object")),e.close(),e.F):Gr(xr);for(var i=Or.length;i--;)delete Vr[Ur][Or[i]];return Vr()};Mr[Fr]=!0;var Kr=Object.create||function(e,t){var n;return null!==e?(Hr[Ur]=Pr(e),n=new Hr,Hr[Ur]=null,n[Fr]=e):n=Vr(),void 0===t?n:Ar.f(n,t)},Wr={},Yr=gr,qr=yr.concat("length","prototype");Wr.f=Object.getOwnPropertyNames||function(e){return Yr(e,qr)};var Xr={},$r=rr,Zr=Wn,Qr=Qn,Jr=Array,eo=Math.max,to=function(e,t,n){for(var i=Zr(e),r=$r(t,i),o=$r(void 0===n?i:n,i),a=Jr(eo(o-r,0)),s=0;r<o;r++,s++)Qr(a,s,e[r]);return a.length=s,a},no=b,io=Z,ro=Wr.f,oo=to,ao="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Xr.f=function(e){return ao&&"Window"==no(e)?function(e){try{return ro(e)}catch(t){return oo(ao)}}(e):ro(io(e))};var so={};so.f=Object.getOwnPropertySymbols;var lo=yn,co=function(e,t,n,i){return i&&i.enumerable?e[t]=n:lo(e,t,n),e},uo=Zt,ho=function(e,t,n){return uo.f(e,t,n)},fo={},po=dt;fo.f=po;var vo,go,yo,mo=te,_o=Qe,bo=fo,ko=Zt.f,Eo=function(e){var t=mo.Symbol||(mo.Symbol={});_o(t,e)||ko(t,e,{value:bo.f(e)})},wo=P,So=ae,To=dt,Co=co,xo=function(){var e=So("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,i=To("toPrimitive");t&&!t[i]&&Co(t,i,(function(e){return wo(n,this)}),{arity:1})},Do=si,Io=ei?{}.toString:function(){return"[object "+Do(this)+"]"},Ro=ei,Lo=Zt.f,Po=yn,Ao=Qe,Oo=Io,Mo=dt("toStringTag"),No=function(e,t,n,i){if(e){var r=n?e:e.prototype;Ao(r,Mo)||Lo(r,Mo,{configurable:!0,value:t}),i&&!Ro&&Po(r,"toString",Oo)}},zo=x,Uo=r.WeakMap,Bo=zo(Uo)&&/native code/.test(String(Uo)),Fo=r,Ho=ee,jo=yn,Go=Qe,Vo=Ve,Ko=Lr,Wo=ur,Yo="Object already initialized",qo=Fo.TypeError,Xo=Fo.WeakMap;if(Bo||Vo.state){var $o=Vo.state||(Vo.state=new Xo);$o.get=$o.get,$o.has=$o.has,$o.set=$o.set,vo=function(e,t){if($o.has(e))throw qo(Yo);return t.facade=e,$o.set(e,t),t},go=function(e){return $o.get(e)||{}},yo=function(e){return $o.has(e)}}else{var Zo=Ko("state");Wo[Zo]=!0,vo=function(e,t){if(Go(e,Zo))throw qo(Yo);return t.facade=e,jo(e,Zo,t),t},go=function(e){return Go(e,Zo)?e[Zo]:{}},yo=function(e){return Go(e,Zo)}}var Qo={set:vo,get:go,has:yo,enforce:function(e){return yo(e)?go(e):vo(e,{})},getterFor:function(e){return function(t){var n;if(!Ho(t)||(n=go(t)).type!==e)throw qo("Incompatible receiver, "+e+" required");return n}}},Jo=$t,ea=V,ta=Xe,na=Wn,ia=Pi,ra=g([].push),oa=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,c,u,h){for(var d,f,p=ta(l),v=ea(p),g=Jo(c,u),y=na(v),m=0,_=h||ia,b=t?_(l,y):n||a?_(l,0):void 0;y>m;m++)if((s||m in v)&&(f=g(d=v[m],m,p),e))if(t)b[m]=f;else if(f)switch(e){case 3:return!0;case 5:return d;case 6:return m;case 2:ra(b,d)}else switch(e){case 4:return!1;case 7:ra(b,d)}return o?-1:i||r?r:b}},aa={forEach:oa(0),map:oa(1),filter:oa(2),some:oa(3),every:oa(4),find:oa(5),findIndex:oa(6),filterReject:oa(7)},sa=In,la=r,ca=P,ua=g,ha=I,da=_e,fa=o,pa=Qe,va=se,ga=nn,ya=Z,ma=Et,_a=Ji,ba=B,ka=Kr,Ea=br,wa=Wr,Sa=Xr,Ta=so,Ca=D,xa=Zt,Da=er,Ia=A,Ra=co,La=ho,Pa=We,Aa=ur,Oa=it,Ma=dt,Na=fo,za=Eo,Ua=xo,Ba=No,Fa=Qo,Ha=aa.forEach,ja=Lr("hidden"),Ga="Symbol",Va="prototype",Ka=Fa.set,Wa=Fa.getterFor(Ga),Ya=Object[Va],qa=la.Symbol,Xa=qa&&qa[Va],$a=la.TypeError,Za=la.QObject,Qa=Ca.f,Ja=xa.f,es=Sa.f,ts=Ia.f,ns=ua([].push),is=Pa("symbols"),rs=Pa("op-symbols"),os=Pa("wks"),as=!Za||!Za[Va]||!Za[Va].findChild,ss=ha&&fa((function(){return 7!=ka(Ja({},"a",{get:function(){return Ja(this,"a",{value:7}).a}})).a}))?function(e,t,n){var i=Qa(Ya,t);i&&delete Ya[t],Ja(e,t,n),i&&e!==Ya&&Ja(Ya,t,i)}:Ja,ls=function(e,t){var n=is[e]=ka(Xa);return Ka(n,{type:Ga,tag:e,description:t}),ha||(n.description=t),n},cs=function(e,t,n){e===Ya&&cs(rs,t,n),ga(e);var i=ma(t);return ga(n),pa(is,i)?(n.enumerable?(pa(e,ja)&&e[ja][i]&&(e[ja][i]=!1),n=ka(n,{enumerable:ba(0,!1)})):(pa(e,ja)||Ja(e,ja,ba(1,{})),e[ja][i]=!0),ss(e,i,n)):Ja(e,i,n)},us=function(e,t){ga(e);var n=ya(t),i=Ea(n).concat(ps(n));return Ha(i,(function(t){ha&&!ca(hs,n,t)||cs(e,t,n[t])})),e},hs=function(e){var t=ma(e),n=ca(ts,this,t);return!(this===Ya&&pa(is,t)&&!pa(rs,t))&&(!(n||!pa(this,t)||!pa(is,t)||pa(this,ja)&&this[ja][t])||n)},ds=function(e,t){var n=ya(e),i=ma(t);if(n!==Ya||!pa(is,i)||pa(rs,i)){var r=Qa(n,i);return!r||!pa(is,i)||pa(n,ja)&&n[ja][i]||(r.enumerable=!0),r}},fs=function(e){var t=es(ya(e)),n=[];return Ha(t,(function(e){pa(is,e)||pa(Aa,e)||ns(n,e)})),n},ps=function(e){var t=e===Ya,n=es(t?rs:ya(e)),i=[];return Ha(n,(function(e){!pa(is,e)||t&&!pa(Ya,e)||ns(i,is[e])})),i};da||(qa=function(){if(va(Xa,this))throw $a("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?_a(arguments[0]):void 0,t=Oa(e),n=function(e){this===Ya&&ca(n,rs,e),pa(this,ja)&&pa(this[ja],t)&&(this[ja][t]=!1),ss(this,t,ba(1,e))};return ha&&as&&ss(Ya,t,{configurable:!0,set:n}),ls(t,e)},Ra(Xa=qa[Va],"toString",(function(){return Wa(this).tag})),Ra(qa,"withoutSetter",(function(e){return ls(Oa(e),e)})),Ia.f=hs,xa.f=cs,Da.f=us,Ca.f=ds,wa.f=Sa.f=fs,Ta.f=ps,Na.f=function(e){return ls(Ma(e),e)},ha&&La(Xa,"description",{configurable:!0,get:function(){return Wa(this).description}})),sa({global:!0,constructor:!0,wrap:!0,forced:!da,sham:!da},{Symbol:qa}),Ha(Ea(os),(function(e){za(e)})),sa({target:Ga,stat:!0,forced:!da},{useSetter:function(){as=!0},useSimple:function(){as=!1}}),sa({target:"Object",stat:!0,forced:!da,sham:!ha},{create:function(e,t){return void 0===t?ka(e):us(ka(e),t)},defineProperty:cs,defineProperties:us,getOwnPropertyDescriptor:ds}),sa({target:"Object",stat:!0,forced:!da},{getOwnPropertyNames:fs}),Ua(),Ba(qa,Ga),Aa[ja]=!0;var vs=_e&&!!Symbol.for&&!!Symbol.keyFor,gs=In,ys=ae,ms=Qe,_s=Ji,bs=We,ks=vs,Es=bs("string-to-symbol-registry"),ws=bs("symbol-to-string-registry");gs({target:"Symbol",stat:!0,forced:!ks},{for:function(e){var t=_s(e);if(ms(Es,t))return Es[t];var n=ys("Symbol")(t);return Es[t]=n,ws[n]=t,n}});var Ss=In,Ts=Qe,Cs=Te,xs=xe,Ds=vs,Is=We("symbol-to-string-registry");Ss({target:"Symbol",stat:!0,forced:!Ds},{keyFor:function(e){if(!Cs(e))throw TypeError(xs(e)+" is not a symbol");if(Ts(Is,e))return Is[e]}});var Rs=g([].slice),Ls=zn,Ps=x,As=b,Os=Ji,Ms=g([].push),Ns=In,zs=ae,Us=h,Bs=P,Fs=g,Hs=o,js=x,Gs=Te,Vs=Rs,Ks=function(e){if(Ps(e))return e;if(Ls(e)){for(var t=e.length,n=[],i=0;i<t;i++){var r=e[i];"string"==typeof r?Ms(n,r):"number"!=typeof r&&"Number"!=As(r)&&"String"!=As(r)||Ms(n,Os(r))}var o=n.length,a=!0;return function(e,t){if(a)return a=!1,t;if(Ls(this))return t;for(var i=0;i<o;i++)if(n[i]===e)return t}}},Ws=_e,Ys=String,qs=zs("JSON","stringify"),Xs=Fs(/./.exec),$s=Fs("".charAt),Zs=Fs("".charCodeAt),Qs=Fs("".replace),Js=Fs(1..toString),el=/[\uD800-\uDFFF]/g,tl=/^[\uD800-\uDBFF]$/,nl=/^[\uDC00-\uDFFF]$/,il=!Ws||Hs((function(){var e=zs("Symbol")();return"[null]"!=qs([e])||"{}"!=qs({a:e})||"{}"!=qs(Object(e))})),rl=Hs((function(){return'"\\udf06\\ud834"'!==qs("\udf06\ud834")||'"\\udead"'!==qs("\udead")})),ol=function(e,t){var n=Vs(arguments),i=Ks(t);if(js(i)||void 0!==e&&!Gs(e))return n[1]=function(e,t){if(js(i)&&(t=Bs(i,this,Ys(e),t)),!Gs(t))return t},Us(qs,null,n)},al=function(e,t,n){var i=$s(n,t-1),r=$s(n,t+1);return Xs(tl,e)&&!Xs(nl,r)||Xs(nl,e)&&!Xs(tl,i)?"\\u"+Js(Zs(e,0),16):e};qs&&Ns({target:"JSON",stat:!0,arity:3,forced:il||rl},{stringify:function(e,t,n){var i=Vs(arguments),r=Us(il?ol:qs,null,i);return rl&&"string"==typeof r?Qs(r,el,al):r}});var sl=so,ll=Xe;In({target:"Object",stat:!0,forced:!_e||o((function(){sl.f(1)}))},{getOwnPropertySymbols:function(e){var t=sl.f;return t?t(ll(e)):[]}}),Eo("asyncIterator"),Eo("hasInstance"),Eo("isConcatSpreadable"),Eo("iterator"),Eo("match"),Eo("matchAll"),Eo("replace"),Eo("search"),Eo("species"),Eo("split");var cl=xo;Eo("toPrimitive"),cl();var ul=ae,hl=No;Eo("toStringTag"),hl(ul("Symbol"),"Symbol"),Eo("unscopables"),No(r.JSON,"JSON",!0);var dl,fl,pl,vl=te.Symbol,gl={},yl=I,ml=Qe,_l=Function.prototype,bl=yl&&Object.getOwnPropertyDescriptor,kl=ml(_l,"name"),El={EXISTS:kl,PROPER:kl&&"something"===function(){}.name,CONFIGURABLE:kl&&(!yl||yl&&bl(_l,"name").configurable)},wl=!o((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Sl=Qe,Tl=x,Cl=Xe,xl=wl,Dl=Lr("IE_PROTO"),Il=Object,Rl=Il.prototype,Ll=xl?Il.getPrototypeOf:function(e){var t=Cl(e);if(Sl(t,Dl))return t[Dl];var n=t.constructor;return Tl(n)&&t instanceof n?n.prototype:t instanceof Il?Rl:null},Pl=o,Al=x,Ol=ee,Ml=Kr,Nl=Ll,zl=co,Ul=dt("iterator"),Bl=!1;[].keys&&("next"in(pl=[].keys())?(fl=Nl(Nl(pl)))!==Object.prototype&&(dl=fl):Bl=!0);var Fl=!Ol(dl)||Pl((function(){var e={};return dl[Ul].call(e)!==e}));Al((dl=Fl?{}:Ml(dl))[Ul])||zl(dl,Ul,(function(){return this}));var Hl={IteratorPrototype:dl,BUGGY_SAFARI_ITERATORS:Bl},jl=Hl.IteratorPrototype,Gl=Kr,Vl=B,Kl=No,Wl=gl,Yl=function(){return this},ql=function(e,t,n,i){var r=t+" Iterator";return e.prototype=Gl(jl,{next:Vl(+!i,n)}),Kl(e,r,!1,!0),Wl[r]=Yl,e},Xl=g,$l=Le,Zl=x,Ql=String,Jl=TypeError,ec=function(e,t,n){try{return Xl($l(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(i){}},tc=nn,nc=function(e){if("object"==typeof e||Zl(e))return e;throw Jl("Can't set "+Ql(e)+" as a prototype")},ic=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=ec(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(i){}return function(n,i){return tc(n),nc(i),t?e(n,i):n.__proto__=i,n}}():void 0),rc=In,oc=P,ac=El,sc=ql,lc=Ll,cc=No,uc=co,hc=gl,dc=Hl,fc=ac.PROPER,pc=dc.BUGGY_SAFARI_ITERATORS,vc=dt("iterator"),gc="keys",yc="values",mc="entries",_c=function(){return this},bc=function(e,t,n,i,r,o,a){sc(n,t,i);var s,l,c,u=function(e){if(e===r&&v)return v;if(!pc&&e in f)return f[e];switch(e){case gc:case yc:case mc:return function(){return new n(this,e)}}return function(){return new n(this)}},h=t+" Iterator",d=!1,f=e.prototype,p=f[vc]||f["@@iterator"]||r&&f[r],v=!pc&&p||u(r),g="Array"==t&&f.entries||p;if(g&&(s=lc(g.call(new e)))!==Object.prototype&&s.next&&(cc(s,h,!0,!0),hc[h]=_c),fc&&r==yc&&p&&p.name!==yc&&(d=!0,v=function(){return oc(p,this)}),r)if(l={values:u(yc),keys:o?v:u(gc),entries:u(mc)},a)for(c in l)(pc||d||!(c in f))&&uc(f,c,l[c]);else rc({target:t,proto:!0,forced:pc||d},l);return a&&f[vc]!==v&&uc(f,vc,v,{name:r}),hc[t]=v,l},kc=function(e,t){return{value:e,done:t}},Ec=Z,wc=gl,Sc=Qo;Zt.f;var Tc=bc,Cc=kc,xc="Array Iterator",Dc=Sc.set,Ic=Sc.getterFor(xc);Tc(Array,"Array",(function(e,t){Dc(this,{type:xc,target:Ec(e),index:0,kind:t})}),(function(){var e=Ic(this),t=e.target,n=e.kind,i=e.index++;return!t||i>=t.length?(e.target=void 0,Cc(void 0,!0)):Cc("keys"==n?i:"values"==n?t[i]:[i,t[i]],!1)}),"values"),wc.Arguments=wc.Array;var Rc={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},Lc=r,Pc=si,Ac=yn,Oc=gl,Mc=dt("toStringTag");for(var Nc in Rc){var zc=Lc[Nc],Uc=zc&&zc.prototype;Uc&&Pc(Uc)!==Mc&&Ac(Uc,Mc,Nc),Oc[Nc]=Oc.Array}var Bc=vl;Eo("dispose");var Fc=Bc;Eo("asyncDispose");var Hc=In,jc=g,Gc=ae("Symbol"),Vc=Gc.keyFor,Kc=jc(Gc.prototype.valueOf);Hc({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==Vc(Kc(e))}catch(t){return!1}}});for(var Wc=In,Yc=We,qc=ae,Xc=g,$c=Te,Zc=dt,Qc=qc("Symbol"),Jc=Qc.isWellKnown,eu=qc("Object","getOwnPropertyNames"),tu=Xc(Qc.prototype.valueOf),nu=Yc("wks"),iu=0,ru=eu(Qc),ou=ru.length;iu<ou;iu++)try{var au=ru[iu];$c(Qc[au])&&Zc(au)}catch(tSe){}Wc({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if(Jc&&Jc(e))return!0;try{for(var t=tu(e),n=0,i=eu(nu),r=i.length;n<r;n++)if(nu[i[n]]==t)return!0}catch(tSe){}return!1}}),Eo("matcher"),Eo("metadataKey"),Eo("observable"),Eo("metadata"),Eo("patternMatch"),Eo("replaceAll");var su=Fc,lu=t(su),cu=g,uu=Hn,hu=Ji,du=q,fu=cu("".charAt),pu=cu("".charCodeAt),vu=cu("".slice),gu=function(e){return function(t,n){var i,r,o=hu(du(t)),a=uu(n),s=o.length;return a<0||a>=s?e?"":void 0:(i=pu(o,a))<55296||i>56319||a+1===s||(r=pu(o,a+1))<56320||r>57343?e?fu(o,a):i:e?vu(o,a,a+2):r-56320+(i-55296<<10)+65536}},yu={codeAt:gu(!1),charAt:gu(!0)},mu=yu.charAt,_u=Ji,bu=Qo,ku=bc,Eu=kc,wu="String Iterator",Su=bu.set,Tu=bu.getterFor(wu);ku(String,"String",(function(e){Su(this,{type:wu,string:_u(e),index:0})}),(function(){var e,t=Tu(this),n=t.string,i=t.index;return i>=n.length?Eu(void 0,!0):(e=mu(n,i),t.index+=e.length,Eu(e,!1))}));var Cu=fo.f("iterator"),xu=t(Cu);function Du(e){return(Du="function"==typeof lu&&"symbol"==typeof xu?function(e){return typeof e}:function(e){return e&&"function"==typeof lu&&e.constructor===lu&&e!==lu.prototype?"symbol":typeof e})(e)}var Iu=fo.f("toPrimitive"),Ru=t(Iu);function Lu(e){var t=function(e,t){if("object"!==Du(e)||null===e)return e;var n=e[Ru];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==Du(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Du(t)?t:String(t)}function Pu(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),Mn(e,Lu(i.key),i)}}function Au(e,t,n){return t&&Pu(e.prototype,t),n&&Pu(e,n),Mn(e,"prototype",{writable:!1}),e}function Ou(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}In({target:"Object",stat:!0,sham:!I},{create:Kr});var Mu=te.Object,Nu=t((function(e,t){return Mu.create(e,t)}));In({target:"Object",stat:!0},{setPrototypeOf:ic});var zu=t(te.Object.setPrototypeOf),Uu=g,Bu=Le,Fu=ee,Hu=Qe,ju=Rs,Gu=a,Vu=Function,Ku=Uu([].concat),Wu=Uu([].join),Yu={},qu=Gu?Vu.bind:function(e){var t=Bu(this),n=t.prototype,i=ju(arguments,1),r=function(){var n=Ku(i,ju(arguments));return this instanceof r?function(e,t,n){if(!Hu(Yu,t)){for(var i=[],r=0;r<t;r++)i[r]="a["+r+"]";Yu[t]=Vu("C,a","return new C("+Wu(i,",")+")")}return Yu[t](e,n)}(t,n.length,n):t.apply(e,n)};return Fu(n)&&(r.prototype=n),r},Xu=qu;In({target:"Function",proto:!0,forced:Function.bind!==Xu},{bind:Xu});var $u=te,Zu=function(e){return $u[e+"Prototype"]},Qu=Zu("Function").bind,Ju=se,eh=Qu,th=Function.prototype,nh=t((function(e){var t=e.bind;return e===th||Ju(th,e)&&t===th.bind?eh:t}));function ih(e,t){var n;return(ih=zu?nh(n=zu).call(n):function(e,t){return e.__proto__=t,e})(e,t)}function rh(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Nu(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Mn(e,"prototype",{writable:!1}),t&&ih(e,t)}var oh=Ti,ah=xe,sh=TypeError,lh=function(e){if(oh(e))return e;throw sh(ah(e)+" is not a constructor")},ch=In,uh=h,hh=qu,dh=lh,fh=nn,ph=ee,vh=Kr,gh=o,yh=ae("Reflect","construct"),mh=Object.prototype,_h=[].push,bh=gh((function(){function e(){}return!(yh((function(){}),[],e)instanceof e)})),kh=!gh((function(){yh((function(){}))})),Eh=bh||kh;ch({target:"Reflect",stat:!0,forced:Eh,sham:Eh},{construct:function(e,t){dh(e),fh(t);var n=arguments.length<3?e:dh(arguments[2]);if(kh&&!bh)return yh(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 uh(_h,i,t),new(uh(hh,e,i))}var r=n.prototype,o=vh(ph(r)?r:mh),a=uh(e,o,t);return ph(a)?a:o}});var wh=te.Reflect.construct,Sh=t(wh),Th=Xe,Ch=Ll,xh=wl;In({target:"Object",stat:!0,forced:o((function(){Ch(1)})),sham:!xh},{getPrototypeOf:function(e){return Ch(Th(e))}});var Dh=te.Object.getPrototypeOf,Ih=t(Dh);function Rh(e){var t;return(Rh=zu?nh(t=Ih).call(t):function(e){return e.__proto__||Ih(e)})(e)}function Lh(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ph(e,t){if(t&&("object"===Du(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Lh(e)}function Ah(e){var t=function(){if("undefined"==typeof Reflect||!Sh)return!1;if(Sh.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Sh(Boolean,[],(function(){}))),!0}catch(cK){return!1}}();return function(){var n,i=Rh(e);if(t){var r=Rh(this).constructor;n=Sh(i,arguments,r)}else n=i.apply(this,arguments);return Ph(this,n)}}In({target:"Array",stat:!0},{isArray:zn});var Oh=t(te.Array.isArray);function Mh(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 Nh=si,zh=Oe,Uh=K,Bh=gl,Fh=dt("iterator"),Hh=function(e){if(!Uh(e))return zh(e,Fh)||zh(e,"@@iterator")||Bh[Nh(e)]},jh=Hh,Gh=t(jh),Vh=P,Kh=nn,Wh=Oe,Yh=function(e,t,n){var i,r;Kh(e);try{if(!(i=Wh(e,"return"))){if("throw"===t)throw n;return n}i=Vh(i,e)}catch(tSe){r=!0,i=tSe}if("throw"===t)throw n;if(r)throw i;return Kh(i),n},qh=nn,Xh=Yh,$h=gl,Zh=dt("iterator"),Qh=Array.prototype,Jh=function(e){return void 0!==e&&($h.Array===e||Qh[Zh]===e)},ed=P,td=Le,nd=nn,id=xe,rd=Hh,od=TypeError,ad=function(e,t){var n=arguments.length<2?rd(e):t;if(td(n))return nd(ed(n,e));throw od(id(e)+" is not iterable")},sd=$t,ld=P,cd=Xe,ud=function(e,t,n,i){try{return i?t(qh(n)[0],n[1]):t(n)}catch(tSe){Xh(e,"throw",tSe)}},hd=Jh,dd=Ti,fd=Wn,pd=Qn,vd=ad,gd=Hh,yd=Array,md=function(e){var t=cd(e),n=dd(this),i=arguments.length,r=i>1?arguments[1]:void 0,o=void 0!==r;o&&(r=sd(r,i>2?arguments[2]:void 0));var a,s,l,c,u,h,d=gd(t),f=0;if(!d||this===yd&&hd(d))for(a=fd(t),s=n?new this(a):yd(a);a>f;f++)h=o?r(t[f],f):t[f],pd(s,f,h);else for(u=(c=vd(t,d)).next,s=n?new this:[];!(l=ld(u,c)).done;f++)h=o?ud(c,r,[l.value,f],!0):l.value,pd(s,f,h);return s.length=f,s},_d=dt("iterator"),bd=!1;try{var kd=0,Ed={next:function(){return{done:!!kd++}},return:function(){bd=!0}};Ed[_d]=function(){return this},Array.from(Ed,(function(){throw 2}))}catch(tSe){}var wd=function(e,t){if(!t&&!bd)return!1;var n=!1;try{var i={};i[_d]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(tSe){}return n},Sd=md;In({target:"Array",stat:!0,forced:!wd((function(e){Array.from(e)}))},{from:Sd});var Td=te.Array.from,Cd=t(Td);var xd=In,Dd=zn,Id=Ti,Rd=ee,Ld=rr,Pd=Wn,Ad=Z,Od=Qn,Md=dt,Nd=Rs,zd=Ni("slice"),Ud=Md("species"),Bd=Array,Fd=Math.max;xd({target:"Array",proto:!0,forced:!zd},{slice:function(e,t){var n,i,r,o=Ad(this),a=Pd(o),s=Ld(e,a),l=Ld(void 0===t?a:t,a);if(Dd(o)&&(n=o.constructor,(Id(n)&&(n===Bd||Dd(n.prototype))||Rd(n)&&null===(n=n[Ud]))&&(n=void 0),n===Bd||void 0===n))return Nd(o,s,l);for(i=new(void 0===n?Bd:n)(Fd(l-s,0)),r=0;s<l;s++,r++)s in o&&Od(i,r,o[s]);return i.length=r,i}});var Hd=Zu("Array").slice,jd=se,Gd=Hd,Vd=Array.prototype,Kd=function(e){var t=e.slice;return e===Vd||jd(Vd,e)&&t===Vd.slice?Gd:t},Wd=t(Kd);function Yd(e,t){var n;if(e){if("string"==typeof e)return Mh(e,t);var i=Wd(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Cd(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Mh(e,t):void 0}}function qd(e){return function(e){if(Oh(e))return Mh(e)}(e)||function(e){if(void 0!==lu&&null!=Gh(e)||null!=e["@@iterator"])return Cd(e)}(e)||Yd(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.")}()}var Xd=Xe,$d=br;In({target:"Object",stat:!0,forced:o((function(){$d(1)}))},{keys:function(e){return $d(Xd(e))}});var Zd=te.Object.keys,Qd=t(Zd),Jd=te.Object.getOwnPropertySymbols,ef=t(Jd),tf=aa.filter;In({target:"Array",proto:!0,forced:!Ni("filter")},{filter:function(e){return tf(this,e,arguments.length>1?arguments[1]:void 0)}});var nf=Zu("Array").filter,rf=se,of=nf,af=Array.prototype,sf=function(e){var t=e.filter;return e===af||rf(af,e)&&t===af.filter?of:t},lf=t(sf),cf={exports:{}},uf=In,hf=o,df=Z,ff=D.f,pf=I;uf({target:"Object",stat:!0,forced:!pf||hf((function(){ff(1)})),sham:!pf},{getOwnPropertyDescriptor:function(e,t){return ff(df(e),t)}});var vf=te.Object,gf=cf.exports=function(e,t){return vf.getOwnPropertyDescriptor(e,t)};vf.getOwnPropertyDescriptor.sham&&(gf.sham=!0);var yf=cf.exports,mf=t(yf),_f=I,bf=zn,kf=TypeError,Ef=Object.getOwnPropertyDescriptor,wf=_f&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(tSe){return tSe instanceof TypeError}}()?function(e,t){if(bf(e)&&!Ef(e,"length").writable)throw kf("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},Sf=Xe,Tf=Wn,Cf=wf,xf=qn;In({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(tSe){return tSe instanceof TypeError}}()},{push:function(e){var t=Sf(this),n=Tf(t),i=arguments.length;xf(n+i);for(var r=0;r<i;r++)t[n]=arguments[r],n++;return Cf(t,n),n}});var Df=Zu("Array").push,If=se,Rf=Df,Lf=Array.prototype,Pf=t((function(e){var t=e.push;return e===Lf||If(Lf,e)&&t===Lf.push?Rf:t})),Af=o,Of=function(e,t){var n=[][e];return!!n&&Af((function(){n.call(null,t||function(){return 1},1)}))},Mf=aa.forEach,Nf=Of("forEach")?[].forEach:function(e){return Mf(this,e,arguments.length>1?arguments[1]:void 0)};In({target:"Array",proto:!0,forced:[].forEach!=Nf},{forEach:Nf});var zf=Zu("Array").forEach,Uf=si,Bf=Qe,Ff=se,Hf=zf,jf=Array.prototype,Gf={DOMTokenList:!0,NodeList:!0},Vf=t((function(e){var t=e.forEach;return e===jf||Ff(jf,e)&&t===jf.forEach||Bf(Gf,Uf(e))?Hf:t})),Kf=ae,Wf=Wr,Yf=so,qf=nn,Xf=g([].concat),$f=Kf("Reflect","ownKeys")||function(e){var t=Wf.f(qf(e)),n=Yf.f;return n?Xf(t,n(e)):t},Zf=$f,Qf=Z,Jf=D,ep=Qn;In({target:"Object",stat:!0,sham:!I},{getOwnPropertyDescriptors:function(e){for(var t,n,i=Qf(e),r=Jf.f,o=Zf(i),a={},s=0;o.length>s;)void 0!==(n=r(i,t=o[s++]))&&ep(a,t,n);return a}});var tp=te.Object.getOwnPropertyDescriptors,np=t(tp),ip={exports:{}},rp=In,op=I,ap=er.f;rp({target:"Object",stat:!0,forced:Object.defineProperties!==ap,sham:!op},{defineProperties:ap});var sp=te.Object,lp=ip.exports=function(e,t){return sp.defineProperties(e,t)};sp.defineProperties.sham&&(lp.sham=!0);var cp=t(ip.exports);function up(e,t,n){return(t=Lu(t))in e?Mn(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hp(e,t){var n=Qd(e);if(ef){var i=ef(e);t&&(i=lf(i).call(i,(function(t){return mf(e,t).enumerable}))),Pf(n).apply(n,i)}return n}function dp(e){for(var t=1;t<arguments.length;t++){var n,i,r=null!=arguments[t]?arguments[t]:{};t%2?Vf(n=hp(Object(r),!0)).call(n,(function(t){up(e,t,r[t])})):np?cp(e,np(r)):Vf(i=hp(Object(r))).call(i,(function(t){Mn(e,t,mf(r,t))}))}return e}var fp=In,pp=cr.indexOf,vp=Of,gp=w([].indexOf),yp=!!gp&&1/gp([1],1,-0)<0;fp({target:"Array",proto:!0,forced:yp||!vp("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return yp?gp(this,e,t)||0:pp(this,e,t)}});var mp=Zu("Array").indexOf,_p=se,bp=mp,kp=Array.prototype,Ep=function(e){var t=e.indexOf;return e===kp||_p(kp,e)&&t===kp.indexOf?bp:t},wp=t(Ep);function Sp(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},o=Qd(e);for(i=0;i<o.length;i++)n=o[i],wp(t).call(t,n)>=0||(r[n]=e[n]);return r}(e,t);if(ef){var o=ef(e);for(i=0;i<o.length;i++)n=o[i],wp(t).call(t,n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Tp=Qe,Cp=$f,xp=D,Dp=Zt,Ip=ee,Rp=yn,Lp=Error,Pp=g("".replace),Ap=String(Lp("zxcasd").stack),Op=/\n\s*at [^:]*:[^\n]*/,Mp=Op.test(Ap),Np=B,zp=!o((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Np(1,7)),7!==e.stack)})),Up=yn,Bp=function(e,t){if(Mp&&"string"==typeof e&&!Lp.prepareStackTrace)for(;t--;)e=Pp(e,Op,"");return e},Fp=zp,Hp=Error.captureStackTrace,jp=$t,Gp=P,Vp=nn,Kp=xe,Wp=Jh,Yp=Wn,qp=se,Xp=ad,$p=Hh,Zp=Yh,Qp=TypeError,Jp=function(e,t){this.stopped=e,this.result=t},ev=Jp.prototype,tv=function(e,t,n){var i,r,o,a,s,l,c,u=n&&n.that,h=!(!n||!n.AS_ENTRIES),d=!(!n||!n.IS_RECORD),f=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),v=jp(t,u),g=function(e){return i&&Zp(i,"normal",e),new Jp(!0,e)},y=function(e){return h?(Vp(e),p?v(e[0],e[1],g):v(e[0],e[1])):p?v(e,g):v(e)};if(d)i=e.iterator;else if(f)i=e;else{if(!(r=$p(e)))throw Qp(Kp(e)+" is not iterable");if(Wp(r)){for(o=0,a=Yp(e);a>o;o++)if((s=y(e[o]))&&qp(ev,s))return s;return new Jp(!1)}i=Xp(e,r)}for(l=d?e.next:i.next;!(c=Gp(l,i)).done;){try{s=y(c.value)}catch(tSe){Zp(i,"throw",tSe)}if("object"==typeof s&&s&&qp(ev,s))return s}return new Jp(!1)},nv=Ji,iv=In,rv=se,ov=Ll,av=ic,sv=function(e,t,n){for(var i=Cp(t),r=Dp.f,o=xp.f,a=0;a<i.length;a++){var s=i[a];Tp(e,s)||n&&Tp(n,s)||r(e,s,o(t,s))}},lv=Kr,cv=yn,uv=B,hv=function(e,t){Ip(t)&&"cause"in t&&Rp(e,"cause",t.cause)},dv=function(e,t,n,i){Fp&&(Hp?Hp(e,t):Up(e,"stack",Bp(n,i)))},fv=tv,pv=function(e,t){return void 0===e?arguments.length<2?"":t:nv(e)},vv=dt("toStringTag"),gv=Error,yv=[].push,mv=function(e,t){var n,i=rv(_v,this);av?n=av(gv(),i?ov(this):_v):(n=i?this:lv(_v),cv(n,vv,"Error")),void 0!==t&&cv(n,"message",pv(t)),dv(n,mv,n.stack,1),arguments.length>2&&hv(n,arguments[2]);var r=[];return fv(e,yv,{that:r}),cv(n,"errors",r),n};av?av(mv,gv):sv(mv,gv,{name:!0});var _v=mv.prototype=lv(gv.prototype,{constructor:uv(1,mv),message:uv(1,""),name:uv(1,"AggregateError")});iv({global:!0,constructor:!0,arity:2},{AggregateError:mv});var bv,kv,Ev,wv,Sv="undefined"!=typeof process&&"process"==b(process),Tv=ae,Cv=ho,xv=I,Dv=dt("species"),Iv=function(e){var t=Tv(e);xv&&t&&!t[Dv]&&Cv(t,Dv,{configurable:!0,get:function(){return this}})},Rv=se,Lv=TypeError,Pv=function(e,t){if(Rv(t,e))return e;throw Lv("Incorrect invocation")},Av=nn,Ov=lh,Mv=K,Nv=dt("species"),zv=function(e,t){var n,i=Av(e).constructor;return void 0===i||Mv(n=Av(i)[Nv])?t:Ov(n)},Uv=TypeError,Bv=function(e,t){if(e<t)throw Uv("Not enough arguments");return e},Fv=/(?:ipad|iphone|ipod).*applewebkit/i.test(le),Hv=r,jv=h,Gv=$t,Vv=x,Kv=Qe,Wv=o,Yv=Dr,qv=Rs,Xv=Ct,$v=Bv,Zv=Fv,Qv=Sv,Jv=Hv.setImmediate,eg=Hv.clearImmediate,tg=Hv.process,ng=Hv.Dispatch,ig=Hv.Function,rg=Hv.MessageChannel,og=Hv.String,ag=0,sg={},lg="onreadystatechange";Wv((function(){bv=Hv.location}));var cg=function(e){if(Kv(sg,e)){var t=sg[e];delete sg[e],t()}},ug=function(e){return function(){cg(e)}},hg=function(e){cg(e.data)},dg=function(e){Hv.postMessage(og(e),bv.protocol+"//"+bv.host)};Jv&&eg||(Jv=function(e){$v(arguments.length,1);var t=Vv(e)?e:ig(e),n=qv(arguments,1);return sg[++ag]=function(){jv(t,void 0,n)},kv(ag),ag},eg=function(e){delete sg[e]},Qv?kv=function(e){tg.nextTick(ug(e))}:ng&&ng.now?kv=function(e){ng.now(ug(e))}:rg&&!Zv?(wv=(Ev=new rg).port2,Ev.port1.onmessage=hg,kv=Gv(wv.postMessage,wv)):Hv.addEventListener&&Vv(Hv.postMessage)&&!Hv.importScripts&&bv&&"file:"!==bv.protocol&&!Wv(dg)?(kv=dg,Hv.addEventListener("message",hg,!1)):kv=lg in Xv("script")?function(e){Yv.appendChild(Xv("script"))[lg]=function(){Yv.removeChild(this),cg(e)}}:function(e){setTimeout(ug(e),0)});var fg={set:Jv,clear:eg},pg=function(){this.head=null,this.tail=null};pg.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 vg,gg,yg,mg,_g,bg=pg,kg=/ipad|iphone|ipod/i.test(le)&&"undefined"!=typeof Pebble,Eg=/web0s(?!.*chrome)/i.test(le),wg=r,Sg=$t,Tg=D.f,Cg=fg.set,xg=bg,Dg=Fv,Ig=kg,Rg=Eg,Lg=Sv,Pg=wg.MutationObserver||wg.WebKitMutationObserver,Ag=wg.document,Og=wg.process,Mg=wg.Promise,Ng=Tg(wg,"queueMicrotask"),zg=Ng&&Ng.value;if(!zg){var Ug=new xg,Bg=function(){var e,t;for(Lg&&(e=Og.domain)&&e.exit();t=Ug.get();)try{t()}catch(tSe){throw Ug.head&&vg(),tSe}e&&e.enter()};Dg||Lg||Rg||!Pg||!Ag?!Ig&&Mg&&Mg.resolve?((mg=Mg.resolve(void 0)).constructor=Mg,_g=Sg(mg.then,mg),vg=function(){_g(Bg)}):Lg?vg=function(){Og.nextTick(Bg)}:(Cg=Sg(Cg,wg),vg=function(){Cg(Bg)}):(gg=!0,yg=Ag.createTextNode(""),new Pg(Bg).observe(yg,{characterData:!0}),vg=function(){yg.data=gg=!gg}),zg=function(e){Ug.head||vg(),Ug.add(e)}}var Fg=zg,Hg=function(e){try{return{error:!1,value:e()}}catch(tSe){return{error:!0,value:tSe}}},jg=r.Promise,Gg="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Vg=!Gg&&!Sv&&"object"==typeof window&&"object"==typeof document,Kg=r,Wg=jg,Yg=x,qg=Wt,Xg=hi,$g=dt,Zg=Vg,Qg=Gg,Jg=ve,ey=Wg&&Wg.prototype,ty=$g("species"),ny=!1,iy=Yg(Kg.PromiseRejectionEvent),ry={CONSTRUCTOR:qg("Promise",(function(){var e=Xg(Wg),t=e!==String(Wg);if(!t&&66===Jg)return!0;if(!ey.catch||!ey.finally)return!0;if(!Jg||Jg<51||!/native code/.test(e)){var n=new Wg((function(e){e(1)})),i=function(e){e((function(){}),(function(){}))};if((n.constructor={})[ty]=i,!(ny=n.then((function(){}))instanceof i))return!0}return!t&&(Zg||Qg)&&!iy})),REJECTION_EVENT:iy,SUBCLASSING:ny},oy={},ay=Le,sy=TypeError,ly=function(e){var t,n;this.promise=new e((function(e,i){if(void 0!==t||void 0!==n)throw sy("Bad Promise constructor");t=e,n=i})),this.resolve=ay(t),this.reject=ay(n)};oy.f=function(e){return new ly(e)};var cy,uy,hy=In,dy=Sv,fy=r,py=P,vy=co,gy=No,yy=Iv,my=Le,_y=x,by=ee,ky=Pv,Ey=zv,wy=fg.set,Sy=Fg,Ty=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(tSe){}},Cy=Hg,xy=bg,Dy=Qo,Iy=jg,Ry=ry,Ly=oy,Py="Promise",Ay=Ry.CONSTRUCTOR,Oy=Ry.REJECTION_EVENT,My=Dy.getterFor(Py),Ny=Dy.set,zy=Iy&&Iy.prototype,Uy=Iy,By=zy,Fy=fy.TypeError,Hy=fy.document,jy=fy.process,Gy=Ly.f,Vy=Gy,Ky=!!(Hy&&Hy.createEvent&&fy.dispatchEvent),Wy="unhandledrejection",Yy=function(e){var t;return!(!by(e)||!_y(t=e.then))&&t},qy=function(e,t){var n,i,r,o=t.value,a=1==t.state,s=a?e.ok:e.fail,l=e.resolve,c=e.reject,u=e.domain;try{s?(a||(2===t.rejection&&Jy(t),t.rejection=1),!0===s?n=o:(u&&u.enter(),n=s(o),u&&(u.exit(),r=!0)),n===e.promise?c(Fy("Promise-chain cycle")):(i=Yy(n))?py(i,n,l,c):l(n)):c(o)}catch(tSe){u&&!r&&u.exit(),c(tSe)}},Xy=function(e,t){e.notified||(e.notified=!0,Sy((function(){for(var n,i=e.reactions;n=i.get();)qy(n,e);e.notified=!1,t&&!e.rejection&&Zy(e)})))},$y=function(e,t,n){var i,r;Ky?((i=Hy.createEvent("Event")).promise=t,i.reason=n,i.initEvent(e,!1,!0),fy.dispatchEvent(i)):i={promise:t,reason:n},!Oy&&(r=fy["on"+e])?r(i):e===Wy&&Ty("Unhandled promise rejection",n)},Zy=function(e){py(wy,fy,(function(){var t,n=e.facade,i=e.value;if(Qy(e)&&(t=Cy((function(){dy?jy.emit("unhandledRejection",i,n):$y(Wy,n,i)})),e.rejection=dy||Qy(e)?2:1,t.error))throw t.value}))},Qy=function(e){return 1!==e.rejection&&!e.parent},Jy=function(e){py(wy,fy,(function(){var t=e.facade;dy?jy.emit("rejectionHandled",t):$y("rejectionhandled",t,e.value)}))},em=function(e,t,n){return function(i){e(t,i,n)}},tm=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Xy(e,!0))},nm=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw Fy("Promise can't be resolved itself");var i=Yy(t);i?Sy((function(){var n={done:!1};try{py(i,t,em(nm,n,e),em(tm,n,e))}catch(tSe){tm(n,tSe,e)}})):(e.value=t,e.state=1,Xy(e,!1))}catch(tSe){tm({done:!1},tSe,e)}}};Ay&&(By=(Uy=function(e){ky(this,By),my(e),py(cy,this);var t=My(this);try{e(em(nm,t),em(tm,t))}catch(tSe){tm(t,tSe)}}).prototype,(cy=function(e){Ny(this,{type:Py,done:!1,notified:!1,parent:!1,reactions:new xy,rejection:!1,state:0,value:void 0})}).prototype=vy(By,"then",(function(e,t){var n=My(this),i=Gy(Ey(this,Uy));return n.parent=!0,i.ok=!_y(e)||e,i.fail=_y(t)&&t,i.domain=dy?jy.domain:void 0,0==n.state?n.reactions.add(i):Sy((function(){qy(i,n)})),i.promise})),uy=function(){var e=new cy,t=My(e);this.promise=e,this.resolve=em(nm,t),this.reject=em(tm,t)},Ly.f=Gy=function(e){return e===Uy||undefined===e?new uy(e):Vy(e)}),hy({global:!0,constructor:!0,wrap:!0,forced:Ay},{Promise:Uy}),gy(Uy,Py,!1,!0),yy(Py);var im=jg,rm=ry.CONSTRUCTOR||!wd((function(e){im.all(e).then(void 0,(function(){}))})),om=P,am=Le,sm=oy,lm=Hg,cm=tv;In({target:"Promise",stat:!0,forced:rm},{all:function(e){var t=this,n=sm.f(t),i=n.resolve,r=n.reject,o=lm((function(){var n=am(t.resolve),o=[],a=0,s=1;cm(e,(function(e){var l=a++,c=!1;s++,om(n,t,e).then((function(e){c||(c=!0,o[l]=e,--s||i(o))}),r)})),--s||i(o)}));return o.error&&r(o.value),n.promise}});var um=In,hm=ry.CONSTRUCTOR;jg&&jg.prototype,um({target:"Promise",proto:!0,forced:hm,real:!0},{catch:function(e){return this.then(void 0,e)}});var dm=P,fm=Le,pm=oy,vm=Hg,gm=tv;In({target:"Promise",stat:!0,forced:rm},{race:function(e){var t=this,n=pm.f(t),i=n.reject,r=vm((function(){var r=fm(t.resolve);gm(e,(function(e){dm(r,t,e).then(n.resolve,i)}))}));return r.error&&i(r.value),n.promise}});var ym=P,mm=oy;In({target:"Promise",stat:!0,forced:ry.CONSTRUCTOR},{reject:function(e){var t=mm.f(this);return ym(t.reject,void 0,e),t.promise}});var _m=nn,bm=ee,km=oy,Em=function(e,t){if(_m(e),bm(t)&&t.constructor===e)return t;var n=km.f(e);return(0,n.resolve)(t),n.promise},wm=In,Sm=jg,Tm=ry.CONSTRUCTOR,Cm=Em,xm=ae("Promise"),Dm=!Tm;wm({target:"Promise",stat:!0,forced:true},{resolve:function(e){return Cm(Dm&&this===xm?Sm:this,e)}});var Im=P,Rm=Le,Lm=oy,Pm=Hg,Am=tv;In({target:"Promise",stat:!0,forced:rm},{allSettled:function(e){var t=this,n=Lm.f(t),i=n.resolve,r=n.reject,o=Pm((function(){var n=Rm(t.resolve),r=[],o=0,a=1;Am(e,(function(e){var s=o++,l=!1;a++,Im(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 Om=P,Mm=Le,Nm=ae,zm=oy,Um=Hg,Bm=tv,Fm="No one promise resolved";In({target:"Promise",stat:!0,forced:rm},{any:function(e){var t=this,n=Nm("AggregateError"),i=zm.f(t),r=i.resolve,o=i.reject,a=Um((function(){var i=Mm(t.resolve),a=[],s=0,l=1,c=!1;Bm(e,(function(e){var u=s++,h=!1;l++,Om(i,t,e).then((function(e){h||c||(c=!0,r(e))}),(function(e){h||c||(h=!0,a[u]=e,--l||o(new n(a,Fm)))}))})),--l||o(new n(a,Fm))}));return a.error&&o(a.value),i.promise}});var Hm=In,jm=jg,Gm=o,Vm=ae,Km=x,Wm=zv,Ym=Em,qm=jm&&jm.prototype;Hm({target:"Promise",proto:!0,real:!0,forced:!!jm&&Gm((function(){qm.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Wm(this,Vm("Promise")),n=Km(e);return this.then(n?function(n){return Ym(t,e()).then((function(){return n}))}:e,n?function(n){return Ym(t,e()).then((function(){throw n}))}:e)}});var Xm=te.Promise,$m=oy,Zm=Hg;In({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=$m.f(this),n=Zm(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}});var Qm=Xm,Jm=t(Qm),e_=In,t_=zn,n_=g([].reverse),i_=[1,2];e_({target:"Array",proto:!0,forced:String(i_)===String(i_.reverse())},{reverse:function(){return t_(this)&&(this.length=this.length),n_(this)}});var r_=Zu("Array").reverse,o_=se,a_=r_,s_=Array.prototype,l_=function(e){var t=e.reverse;return e===s_||o_(s_,e)&&t===s_.reverse?a_:t},c_=t(l_);function u_(){u_=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,i=Mn||function(e,t,n){e[t]=n.value},r="function"==typeof lu?lu:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function l(e,t,n){return Mn(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(x){l=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof d?t:d,a=Nu(o.prototype),s=new S(r||[]);return i(a,"_invoke",{value:b(e,n,s)}),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(x){return{type:"throw",arg:x}}}e.wrap=c;var h={};function d(){}function f(){}function p(){}var v={};l(v,o,(function(){return this}));var g=Ih&&Ih(Ih(T([])));g&&g!==t&&n.call(g,o)&&(v=g);var y=p.prototype=d.prototype=Nu(v);function m(e){var t;Vf(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=u(e[i],e,o);if("throw"!==l.type){var c=l.arg,h=c.value;return h&&"object"==Du(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){c.value=e,a(c)}),(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 b(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=k(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=u(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 k(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,k(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=u(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 E(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]),Pf(t=this.tryEntries).call(t,n)}function w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],Vf(e).call(e,E,this),this.reset(!0)}function T(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var 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:C}}function C(){return{value:void 0,done:!0}}return f.prototype=p,i(y,"constructor",{value:p,configurable:!0}),i(p,"constructor",{value:f,configurable:!0}),f.displayName=l(p,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return zu?zu(e,p):(e.__proto__=p,l(e,s,"GeneratorFunction")),e.prototype=Nu(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=Jm);var a=new _(c(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)Pf(n).call(n,i);return c_(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=T,S.prototype={constructor:S,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,Vf(t=this.tryEntries).call(t,w),!e)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+Wd(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),w(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;w(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},e}function h_(e,t,n,i,r,o,a){try{var s=e[o](a),l=s.value}catch(tSe){return void n(tSe)}s.done?t(l):Jm.resolve(l).then(i,r)}function d_(e){return function(){var t=this,n=arguments;return new Jm((function(i,r){var o=e.apply(t,n);function a(e){h_(o,i,r,a,s,"next",e)}function s(e){h_(o,i,r,a,s,"throw",e)}a(void 0)}))}}var f_=Zu("Array").concat,p_=se,v_=f_,g_=Array.prototype,y_=t((function(e){var t=e.concat;return e===g_||p_(g_,e)&&t===g_.concat?v_:t})),m_=cr.includes;In({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(e){return m_(this,e,arguments.length>1?arguments[1]:void 0)}});var __=Zu("Array").includes,b_=ee,k_=b,E_=dt("match"),w_=function(e){var t;return b_(e)&&(void 0!==(t=e[E_])?!!t:"RegExp"==k_(e))},S_=TypeError,T_=function(e){if(w_(e))throw S_("The method doesn't accept regular expressions");return e},C_=dt("match"),x_=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[C_]=!1,"/./"[e](t)}catch(i){}}return!1},D_=In,I_=T_,R_=q,L_=Ji,P_=x_,A_=g("".indexOf);D_({target:"String",proto:!0,forced:!P_("includes")},{includes:function(e){return!!~A_(L_(R_(this)),L_(I_(e)),arguments.length>1?arguments[1]:void 0)}});var O_=Zu("String").includes,M_=se,N_=__,z_=O_,U_=Array.prototype,B_=String.prototype,F_=t((function(e){var t=e.includes;return e===U_||M_(U_,e)&&t===U_.includes?N_:"string"==typeof e||e===B_||M_(B_,e)&&t===B_.includes?z_:t})),H_=aa.map;In({target:"Array",proto:!0,forced:!Ni("map")},{map:function(e){return H_(this,e,arguments.length>1?arguments[1]:void 0)}});var j_=Zu("Array").map,G_=se,V_=j_,K_=Array.prototype,W_=t((function(e){var t=e.map;return e===K_||G_(K_,e)&&t===K_.map?V_:t})),Y_=Hn,q_=Ji,X_=q,$_=RangeError,Z_=function(e){var t=q_(X_(this)),n="",i=Y_(e);if(i<0||i==1/0)throw $_("Wrong number of repetitions");for(;i>0;(i>>>=1)&&(t+=t))1&i&&(n+=t);return n};In({target:"String",proto:!0},{repeat:Z_});var Q_=Zu("String").repeat,J_=se,eb=Q_,tb=String.prototype,nb=t((function(e){var t=e.repeat;return"string"==typeof e||e===tb||J_(tb,e)&&t===tb.repeat?eb:t})),ib=t(sf),rb=t(Qm),ob=In,ab=aa.find,sb="find",lb=!0;sb in[]&&Array(1)[sb]((function(){lb=!1})),ob({target:"Array",proto:!0,forced:lb},{find:function(e){return ab(this,e,arguments.length>1?arguments[1]:void 0)}});var cb=Zu("Array").find,ub=se,hb=cb,db=Array.prototype,fb=t((function(e){var t=e.find;return e===db||ub(db,e)&&t===db.find?hb:t})),pb=I,vb=g,gb=br,yb=Z,mb=vb(A.f),_b=vb([].push),bb=function(e){return function(t){for(var n,i=yb(t),r=gb(i),o=r.length,a=0,s=[];o>a;)n=r[a++],pb&&!mb(i,n)||_b(s,e?[n,i[n]]:i[n]);return s}},kb={entries:bb(!0),values:bb(!1)},Eb=kb.values;In({target:"Object",stat:!0},{values:function(e){return Eb(e)}});var wb=t(te.Object.values),Sb={exports:{}},Tb=o((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),Cb=o,xb=ee,Db=b,Ib=Tb,Rb=Object.isExtensible,Lb=Cb((function(){Rb(1)}))||Ib?function(e){return!!xb(e)&&((!Ib||"ArrayBuffer"!=Db(e))&&(!Rb||Rb(e)))}:Rb,Pb=!o((function(){return Object.isExtensible(Object.preventExtensions({}))})),Ab=In,Ob=g,Mb=ur,Nb=ee,zb=Qe,Ub=Zt.f,Bb=Wr,Fb=Xr,Hb=Lb,jb=Pb,Gb=!1,Vb=it("meta"),Kb=0,Wb=function(e){Ub(e,Vb,{value:{objectID:"O"+Kb++,weakData:{}}})},Yb=Sb.exports={enable:function(){Yb.enable=function(){},Gb=!0;var e=Bb.f,t=Ob([].splice),n={};n[Vb]=1,e(n).length&&(Bb.f=function(n){for(var i=e(n),r=0,o=i.length;r<o;r++)if(i[r]===Vb){t(i,r,1);break}return i},Ab({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Fb.f}))},fastKey:function(e,t){if(!Nb(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!zb(e,Vb)){if(!Hb(e))return"F";if(!t)return"E";Wb(e)}return e[Vb].objectID},getWeakData:function(e,t){if(!zb(e,Vb)){if(!Hb(e))return!0;if(!t)return!1;Wb(e)}return e[Vb].weakData},onFreeze:function(e){return jb&&Gb&&Hb(e)&&!zb(e,Vb)&&Wb(e),e}};Mb[Vb]=!0;var qb=Sb.exports,Xb=In,$b=r,Zb=qb,Qb=o,Jb=yn,ek=tv,tk=Pv,nk=x,ik=ee,rk=No,ok=Zt.f,ak=aa.forEach,sk=I,lk=Qo.set,ck=Qo.getterFor,uk=function(e,t,n){var i,r=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),a=r?"set":"add",s=$b[e],l=s&&s.prototype,c={};if(sk&&nk(s)&&(o||l.forEach&&!Qb((function(){(new s).entries().next()})))){var u=(i=t((function(t,n){lk(tk(t,u),{type:e,collection:new s}),null!=n&&ek(n,t[a],{that:t,AS_ENTRIES:r})}))).prototype,h=ck(e);ak(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in l)||o&&"clear"==e||Jb(u,e,(function(n,i){var r=h(this).collection;if(!t&&o&&!ik(n))return"get"==e&&void 0;var a=r[e](0===n?0:n,i);return t?this:a}))})),o||ok(u,"size",{configurable:!0,get:function(){return h(this).collection.size}})}else i=n.getConstructor(t,e,r,a),Zb.enable();return rk(i,e,!1,!0),c[e]=i,Xb({global:!0,forced:!0},c),o||n.setStrong(i,e,r),i},hk=co,dk=function(e,t,n){for(var i in t)n&&n.unsafe&&e[i]?e[i]=t[i]:hk(e,i,t[i],n);return e},fk=Kr,pk=ho,vk=dk,gk=$t,yk=Pv,mk=K,_k=tv,bk=bc,kk=kc,Ek=Iv,wk=I,Sk=qb.fastKey,Tk=Qo.set,Ck=Qo.getterFor,xk={getConstructor:function(e,t,n,i){var r=e((function(e,r){yk(e,o),Tk(e,{type:t,index:fk(null),first:void 0,last:void 0,size:0}),wk||(e.size=0),mk(r)||_k(r,e[i],{that:e,AS_ENTRIES:n})})),o=r.prototype,a=Ck(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=Sk(t,!0),key:t,value:n,previous:i=o.last,next:void 0,removed:!1},o.first||(o.first=s),i&&(i.next=s),wk?o.size++:e.size++,"F"!==r&&(o.index[r]=s)),e},l=function(e,t){var n,i=a(e),r=Sk(t);if("F"!==r)return i.index[r];for(n=i.first;n;n=n.next)if(n.key==t)return n};return vk(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,wk?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),wk?n.size--:t.size--}return!!i},forEach:function(e){for(var t,n=a(this),i=gk(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)}}),vk(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)}}),wk&&pk(o,"size",{configurable:!0,get:function(){return a(this).size}}),r},setStrong:function(e,t,n){var i=t+" Iterator",r=Ck(t),o=Ck(i);bk(e,t,(function(e,t){Tk(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)?kk("keys"==t?n.key:"values"==t?n.value:[n.key,n.value],!1):(e.target=void 0,kk(void 0,!0))}),n?"entries":"values",!n,!0),Ek(t)}};uk("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),xk);var Dk=te.Set,Ik=xe,Rk=function(e){if("object"==typeof e&&"size"in e&&"has"in e&&"add"in e&&"delete"in e&&"keys"in e)return e;throw TypeError(Ik(e)+" is not a set")},Lk=function(e,t){return 1==t?function(t,n){return t[e](n)}:function(t,n,i){return t[e](n,i)}},Pk=Lk,Ak=ae("Set"),Ok=Ak.prototype,Mk={Set:Ak,add:Pk("add",1),has:Pk("has",1),remove:Pk("delete",1),proto:Ok},Nk=P,zk=function(e,t,n){for(var i,r,o=n||e.next;!(i=Nk(o,e)).done;)if(void 0!==(r=t(i.value)))return r},Uk=zk,Bk=function(e,t,n){return n?Uk(e.keys(),t):e.forEach(t)},Fk=Bk,Hk=Mk.Set,jk=Mk.add,Gk=function(e){var t=new Hk;return Fk(e,(function(e){jk(t,e)})),t},Vk=function(e){return e.size},Kk=Le,Wk=nn,Yk=P,qk=Hn,Xk=TypeError,$k=Math.max,Zk=function(e,t,n,i){this.set=e,this.size=t,this.has=n,this.keys=i};Zk.prototype={getIterator:function(){return Wk(Yk(this.keys,this.set))},includes:function(e){return Yk(this.has,this.set,e)}};var Qk=function(e){Wk(e);var t=+e.size;if(t!=t)throw Xk("Invalid size");return new Zk(e,$k(qk(t),0),Kk(e.has),Kk(e.keys))},Jk=Rk,eE=Gk,tE=Vk,nE=Qk,iE=Bk,rE=zk,oE=Mk.has,aE=Mk.remove,sE=function(e){var t=Jk(this),n=nE(e),i=eE(t);return tE(t)<=n.size?iE(t,(function(e){n.includes(e)&&aE(i,e)})):rE(n.getIterator(),(function(e){oE(t,e)&&aE(i,e)})),i},lE=function(){return!1},cE=sE;In({target:"Set",proto:!0,real:!0,forced:!lE()},{difference:cE});var uE=Rk,hE=Vk,dE=Qk,fE=Bk,pE=zk,vE=Mk.Set,gE=Mk.add,yE=Mk.has,mE=function(e){var t=uE(this),n=dE(e),i=new vE;return hE(t)>n.size?pE(n.getIterator(),(function(e){yE(t,e)&&gE(i,e)})):fE(t,(function(e){n.includes(e)&&gE(i,e)})),i},_E=mE;In({target:"Set",proto:!0,real:!0,forced:!lE()},{intersection:_E});var bE=Rk,kE=Mk.has,EE=Vk,wE=Qk,SE=Bk,TE=zk,CE=Yh,xE=function(e){var t=bE(this),n=wE(e);if(EE(t)<=n.size)return!1!==SE(t,(function(e){if(n.includes(e))return!1}),!0);var i=n.getIterator();return!1!==TE(i,(function(e){if(kE(t,e))return CE(i,"normal",!1)}))},DE=xE;In({target:"Set",proto:!0,real:!0,forced:!lE()},{isDisjointFrom:DE});var IE=Rk,RE=Vk,LE=Bk,PE=Qk,AE=function(e){var t=IE(this),n=PE(e);return!(RE(t)>n.size)&&!1!==LE(t,(function(e){if(!n.includes(e))return!1}),!0)},OE=AE;In({target:"Set",proto:!0,real:!0,forced:!lE()},{isSubsetOf:OE});var ME=Rk,NE=Mk.has,zE=Vk,UE=Qk,BE=zk,FE=Yh,HE=function(e){var t=ME(this),n=UE(e);if(zE(t)<n.size)return!1;var i=n.getIterator();return!1!==BE(i,(function(e){if(!NE(t,e))return FE(i,"normal",!1)}))},jE=HE;In({target:"Set",proto:!0,real:!0,forced:!lE()},{isSupersetOf:jE});var GE=Rk,VE=Gk,KE=Qk,WE=zk,YE=Mk.add,qE=Mk.has,XE=Mk.remove,$E=function(e){var t=GE(this),n=KE(e).getIterator(),i=VE(t);return WE(n,(function(e){qE(t,e)?XE(i,e):YE(i,e)})),i},ZE=$E;In({target:"Set",proto:!0,real:!0,forced:!lE()},{symmetricDifference:ZE});var QE=Rk,JE=Mk.add,ew=Gk,tw=Qk,nw=zk,iw=function(e){var t=QE(this),n=tw(e).getIterator(),i=ew(t);return nw(n,(function(e){JE(i,e)})),i},rw=iw;In({target:"Set",proto:!0,real:!0,forced:!lE()},{union:rw});var ow=Dk,aw=$t,sw=P,lw=Le,cw=lh,uw=K,hw=tv,dw=[].push,fw=function(e){var t,n,i,r,o=arguments.length,a=o>1?arguments[1]:void 0;return cw(this),(t=void 0!==a)&&lw(a),uw(e)?new this:(n=[],t?(i=0,r=aw(a,o>2?arguments[2]:void 0),hw(e,(function(e){sw(dw,n,r(e,i++))}))):hw(e,dw,{that:n}),new this(n))};In({target:"Set",stat:!0,forced:!0},{from:fw});var pw=Rs,vw=function(){return new this(pw(arguments))};In({target:"Set",stat:!0,forced:!0},{of:vw});var gw=Rk,yw=Mk.add;In({target:"Set",proto:!0,real:!0,forced:!0},{addAll:function(){for(var e=gw(this),t=0,n=arguments.length;t<n;t++)yw(e,arguments[t]);return e}});var mw=Rk,_w=Mk.remove;In({target:"Set",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=mw(this),n=!0,i=0,r=arguments.length;i<r;i++)e=_w(t,arguments[i]),n=n&&e;return!!n}});var bw=$t,kw=Rk,Ew=Bk;In({target:"Set",proto:!0,real:!0,forced:!0},{every:function(e){var t=kw(this),n=bw(e,arguments.length>1?arguments[1]:void 0);return!1!==Ew(t,(function(e){if(!n(e,e,t))return!1}),!0)}});var ww=si,Sw=Qe,Tw=K,Cw=gl,xw=dt("iterator"),Dw=Object,Iw=x,Rw=function(e){if(Tw(e))return!1;var t=Dw(e);return void 0!==t[xw]||"@@iterator"in t||Sw(Cw,ww(t))},Lw=ee,Pw=ae("Set"),Aw=function(e){return function(e){return Lw(e)&&"number"==typeof e.size&&Iw(e.has)&&Iw(e.keys)}(e)?e:Rw(e)?new Pw(e):e},Ow=P,Mw=Aw,Nw=sE;In({target:"Set",proto:!0,real:!0,forced:!0},{difference:function(e){return Ow(Nw,this,Mw(e))}});var zw=$t,Uw=Rk,Bw=Bk,Fw=Mk.Set,Hw=Mk.add;In({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(e){var t=Uw(this),n=zw(e,arguments.length>1?arguments[1]:void 0),i=new Fw;return Bw(t,(function(e){n(e,e,t)&&Hw(i,e)})),i}});var jw=$t,Gw=Rk,Vw=Bk;In({target:"Set",proto:!0,real:!0,forced:!0},{find:function(e){var t=Gw(this),n=jw(e,arguments.length>1?arguments[1]:void 0),i=Vw(t,(function(e){if(n(e,e,t))return{value:e}}),!0);return i&&i.value}});var Kw=P,Ww=Aw,Yw=mE;In({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(e){return Kw(Yw,this,Ww(e))}});var qw=P,Xw=Aw,$w=xE;In({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(e){return qw($w,this,Xw(e))}});var Zw=P,Qw=Aw,Jw=AE;In({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(e){return Zw(Jw,this,Qw(e))}});var eS=P,tS=Aw,nS=HE;In({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(e){return eS(nS,this,tS(e))}});var iS=In,rS=g,oS=Rk,aS=Bk,sS=Ji,lS=rS([].join),cS=rS([].push);iS({target:"Set",proto:!0,real:!0,forced:!0},{join:function(e){var t=oS(this),n=void 0===e?",":sS(e),i=[];return aS(t,(function(e){cS(i,e)})),lS(i,n)}});var uS=$t,hS=Rk,dS=Bk,fS=Mk.Set,pS=Mk.add;In({target:"Set",proto:!0,real:!0,forced:!0},{map:function(e){var t=hS(this),n=uS(e,arguments.length>1?arguments[1]:void 0),i=new fS;return dS(t,(function(e){pS(i,n(e,e,t))})),i}});var vS=Le,gS=Rk,yS=Bk,mS=TypeError;In({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=gS(this),n=arguments.length<2,i=n?void 0:arguments[1];if(vS(e),yS(t,(function(r){n?(n=!1,i=r):i=e(i,r,r,t)})),n)throw mS("Reduce of empty set with no initial value");return i}});var _S=$t,bS=Rk,kS=Bk;In({target:"Set",proto:!0,real:!0,forced:!0},{some:function(e){var t=bS(this),n=_S(e,arguments.length>1?arguments[1]:void 0);return!0===kS(t,(function(e){if(n(e,e,t))return!0}),!0)}});var ES=P,wS=Aw,SS=$E;In({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(e){return ES(SS,this,wS(e))}});var TS=P,CS=Aw,xS=iw;In({target:"Set",proto:!0,real:!0,forced:!0},{union:function(e){return TS(xS,this,CS(e))}});var DS=t(ow);function IS(e,t){return function(e){if(Oh(e))return e}(e)||function(e,t){var n=null==e?null:void 0!==lu&&Gh(e)||e["@@iterator"];if(null!=n){var i,r,o,a,s=[],l=!0,c=!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)&&(Pf(s).call(s,i.value),s.length!==t);l=!0);}catch(u){c=!0,r=u}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw r}}return s}}(e,t)||Yd(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 RS=I,LS=g,PS=P,AS=o,OS=br,MS=so,NS=A,zS=Xe,US=V,BS=Object.assign,FS=Object.defineProperty,HS=LS([].concat),jS=!BS||AS((function(){if(RS&&1!==BS({b:1},BS(FS({},"a",{enumerable:!0,get:function(){FS(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!=BS({},e)[n]||OS(BS({},t)).join("")!=i}))?function(e,t){for(var n=zS(e),i=arguments.length,r=1,o=MS.f,a=NS.f;i>r;)for(var s,l=US(arguments[r++]),c=o?HS(OS(l),o(l)):OS(l),u=c.length,h=0;u>h;)s=c[h++],RS&&!PS(a,l,s)||(n[s]=l[s]);return n}:BS,GS=jS;In({target:"Object",stat:!0,arity:2,forced:Object.assign!==GS},{assign:GS});var VS=t(te.Object.assign),KS=In,WS=aa.findIndex,YS="findIndex",qS=!0;YS in[]&&Array(1)[YS]((function(){qS=!1})),KS({target:"Array",proto:!0,forced:qS},{findIndex:function(e){return WS(this,e,arguments.length>1?arguments[1]:void 0)}});var XS=Zu("Array").findIndex,$S=se,ZS=XS,QS=Array.prototype,JS=t((function(e){var t=e.findIndex;return e===QS||$S(QS,e)&&t===QS.findIndex?ZS:t})),eT=xe,tT=TypeError,nT=function(e,t){if(!delete e[t])throw tT("Cannot delete property "+eT(t)+" of "+eT(e))},iT=In,rT=Xe,oT=rr,aT=Hn,sT=Wn,lT=wf,cT=qn,uT=Pi,hT=Qn,dT=nT,fT=Ni("splice"),pT=Math.max,vT=Math.min;iT({target:"Array",proto:!0,forced:!fT},{splice:function(e,t){var n,i,r,o,a,s,l=rT(this),c=sT(l),u=oT(e,c),h=arguments.length;for(0===h?n=i=0:1===h?(n=0,i=c-u):(n=h-2,i=vT(pT(aT(t),0),c-u)),cT(c+n-i),r=uT(l,i),o=0;o<i;o++)(a=u+o)in l&&hT(r,o,l[a]);if(r.length=i,n<i){for(o=u;o<c-i;o++)s=o+n,(a=o+i)in l?l[s]=l[a]:dT(l,s);for(o=c;o>c-i+n;o--)dT(l,o-1)}else if(n>i)for(o=c-i;o>u;o--)s=o+n-1,(a=o+i-1)in l?l[s]=l[a]:dT(l,s);for(o=0;o<n;o++)l[o+u]=arguments[o+2];return lT(l,c-i+n),r}});var gT=Zu("Array").splice,yT=se,mT=gT,_T=Array.prototype,bT=t((function(e){var t=e.splice;return e===_T||yT(_T,e)&&t===_T.splice?mT:t})),kT=t(Zd),ET=Le,wT=Xe,ST=V,TT=Wn,CT=TypeError,xT=function(e){return function(t,n,i,r){ET(n);var o=wT(t),a=ST(o),s=TT(o),l=e?s-1:0,c=e?-1:1;if(i<2)for(;;){if(l in a){r=a[l],l+=c;break}if(l+=c,e?l<0:s<=l)throw CT("Reduce of empty array with no initial value")}for(;e?l>=0:s>l;l+=c)l in a&&(r=n(r,a[l],l,o));return r}},DT={left:xT(!1),right:xT(!0)}.left;In({target:"Array",proto:!0,forced:!Sv&&ve>79&&ve<83||!Of("reduce")},{reduce:function(e){var t=arguments.length;return DT(this,e,t,t>1?arguments[1]:void 0)}});var IT=Zu("Array").reduce,RT=se,LT=IT,PT=Array.prototype,AT=t((function(e){var t=e.reduce;return e===PT||RT(PT,e)&&t===PT.reduce?LT:t})),OT=kb.entries;In({target:"Object",stat:!0},{entries:function(e){return OT(e)}});var MT=t(te.Object.entries);function NT(e,t){return e===t||e!=e&&t!=t}function zT(e,t){for(var n=e.length;n--;)if(NT(e[n][0],t))return n;return-1}var UT=Array.prototype,BT=bT(UT);function FT(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}FT.prototype.clear=function(){this.__data__=[],this.size=0},FT.prototype.delete=function(e){var t=this.__data__,n=zT(t,e);return!(n<0)&&(n==t.length-1?t.pop():BT.call(t,n,1),--this.size,!0)},FT.prototype.get=function(e){var t=this.__data__,n=zT(t,e);return n<0?void 0:t[n][1]},FT.prototype.has=function(e){return zT(this.__data__,e)>-1},FT.prototype.set=function(e,t){var n=this.__data__,i=zT(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this};var HT="object"==("undefined"==typeof global?"undefined":Du(global))&&global&&global.Object===Object&&global,jT="object"==("undefined"==typeof self?"undefined":Du(self))&&self&&self.Object===Object&&self,GT=HT||jT||Function("return this")(),VT=GT.Symbol,KT=Object.prototype,WT=KT.hasOwnProperty,YT=KT.toString,qT=VT?VT.toStringTag:void 0;var XT=Object.prototype.toString;var $T="[object Null]",ZT="[object Undefined]",QT=VT?VT.toStringTag:void 0;function JT(e){return null==e?void 0===e?ZT:$T:QT&&QT in Object(e)?function(e){var t=WT.call(e,qT),n=e[qT];try{e[qT]=void 0;var i=!0}catch(cK){}var r=YT.call(e);return i&&(t?e[qT]=n:delete e[qT]),r}(e):function(e){return XT.call(e)}(e)}function eC(e){var t=Du(e);return null!=e&&("object"==t||"function"==t)}var tC="[object AsyncFunction]",nC="[object Function]",iC="[object GeneratorFunction]",rC="[object Proxy]";function oC(e){if(!eC(e))return!1;var t=JT(e);return t==nC||t==iC||t==tC||t==rC}var aC,sC=Zu("Array").keys,lC=si,cC=Qe,uC=se,hC=sC,dC=Array.prototype,fC={DOMTokenList:!0,NodeList:!0},pC=t((function(e){var t=e.keys;return e===dC||uC(dC,e)&&t===dC.keys||cC(fC,lC(e))?hC:t})),vC=GT["__core-js_shared__"],gC=(aC=/[^.]+$/.exec(vC&&pC(vC)&&pC(vC).IE_PROTO||""))?"Symbol(src)_1."+aC:"";var yC=Function.prototype.toString;function mC(e){if(null!=e){try{return yC.call(e)}catch(cK){}try{return e+""}catch(cK){}}return""}var _C=/^\[object .+?Constructor\]$/,bC=Function.prototype,kC=Object.prototype,EC=bC.toString,wC=kC.hasOwnProperty,SC=RegExp("^"+EC.call(wC).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function TC(e){return!(!eC(e)||(t=e,gC&&gC in t))&&(oC(e)?SC:_C).test(mC(e));var t}function CC(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return TC(n)?n:void 0}var xC=CC(GT,"Map"),DC=CC(Object,"create");var IC=Object.prototype.hasOwnProperty;var RC=Object.prototype.hasOwnProperty;function LC(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function PC(e,t){var n,i,r=e.__data__;return("string"==(i=Du(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof t?"string":"hash"]:W_(r)}function AC(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}LC.prototype.clear=function(){this.__data__=DC?DC(null):{},this.size=0},LC.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},LC.prototype.get=function(e){var t=this.__data__;if(DC){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return IC.call(t,e)?t[e]:void 0},LC.prototype.has=function(e){var t=this.__data__;return DC?void 0!==t[e]:RC.call(t,e)},LC.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=DC&&void 0===t?"__lodash_hash_undefined__":t,this},AC.prototype.clear=function(){this.size=0,this.__data__={hash:new LC,map:new(xC||FT),string:new LC}},AC.prototype.delete=function(e){var t=PC(this,e).delete(e);return this.size-=t?1:0,t},AC.prototype.get=function(e){return PC(this,e).get(e)},AC.prototype.has=function(e){return PC(this,e).has(e)},AC.prototype.set=function(e,t){var n=PC(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this};function OC(e){var t=this.__data__=new FT(e);this.size=t.size}OC.prototype.clear=function(){this.__data__=new FT,this.size=0},OC.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},OC.prototype.get=function(e){return this.__data__.get(e)},OC.prototype.has=function(e){return this.__data__.has(e)},OC.prototype.set=function(e,t){var n=this.__data__;if(n instanceof FT){var i=n.__data__;if(!xC||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new AC(i)}return n.set(e,t),this.size=n.size,this};var MC=function(){try{var e=CC(Object,"defineProperty");return e({},"",{}),e}catch(cK){}}(),NC=MC;function zC(e,t,n){"__proto__"==t&&NC?NC(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var UC=Object.prototype.hasOwnProperty;function BC(e,t,n){var i=e[t];UC.call(e,t)&&NT(i,n)&&(void 0!==n||t in e)||zC(e,t,n)}function FC(e,t,n,i){var r=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=i?i(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),r?zC(n,s,l):BC(n,s,l)}return n}function HC(e){return null!=e&&"object"==Du(e)}function jC(e){return HC(e)&&"[object Arguments]"==JT(e)}var GC=Object.prototype,VC=GC.hasOwnProperty,KC=GC.propertyIsEnumerable,WC=jC(function(){return arguments}())?jC:function(e){return HC(e)&&VC.call(e,"callee")&&!KC.call(e,"callee")},YC=WC,qC=Array.isArray;var XC="object"==("undefined"==typeof exports?"undefined":Du(exports))&&exports&&!exports.nodeType&&exports,$C=XC&&"object"==("undefined"==typeof module?"undefined":Du(module))&&module&&!module.nodeType&&module,ZC=$C&&$C.exports===XC?GT.Buffer:void 0,QC=(ZC?ZC.isBuffer:void 0)||function(){return!1},JC=9007199254740991,ex=/^(?:0|[1-9]\d*)$/;function tx(e,t){var n=Du(e);return!!(t=null==t?JC:t)&&("number"==n||"symbol"!=n&&ex.test(e))&&e>-1&&e%1==0&&e<t}var nx=9007199254740991;function ix(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=nx}var rx={};function ox(e){return function(t){return e(t)}}rx["[object Float32Array]"]=rx["[object Float64Array]"]=rx["[object Int8Array]"]=rx["[object Int16Array]"]=rx["[object Int32Array]"]=rx["[object Uint8Array]"]=rx["[object Uint8ClampedArray]"]=rx["[object Uint16Array]"]=rx["[object Uint32Array]"]=!0,rx["[object Arguments]"]=rx["[object Array]"]=rx["[object ArrayBuffer]"]=rx["[object Boolean]"]=rx["[object DataView]"]=rx["[object Date]"]=rx["[object Error]"]=rx["[object Function]"]=rx["[object Map]"]=rx["[object Number]"]=rx["[object Object]"]=rx["[object RegExp]"]=rx["[object Set]"]=rx["[object String]"]=rx["[object WeakMap]"]=!1;var ax="object"==("undefined"==typeof exports?"undefined":Du(exports))&&exports&&!exports.nodeType&&exports,sx=ax&&"object"==("undefined"==typeof module?"undefined":Du(module))&&module&&!module.nodeType&&module,lx=sx&&sx.exports===ax&&HT.process,cx=function(){try{var e=sx&&sx.require&&sx.require("util").types;return e||lx&&lx.binding&&lx.binding("util")}catch(cK){}}(),ux=cx&&cx.isTypedArray,hx=ux?ox(ux):function(e){return HC(e)&&ix(e.length)&&!!rx[JT(e)]},dx=Object.prototype.hasOwnProperty;function fx(e,t){var n=qC(e),i=!n&&YC(e),r=!n&&!i&&QC(e),o=!n&&!i&&!r&&hx(e),a=n||i||r||o,s=a?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],l=s.length;for(var c in e)!t&&!dx.call(e,c)||a&&("length"==c||r&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||tx(c,l))||s.push(c);return s}var px=Object.prototype;function vx(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||px)}function gx(e,t){return function(n){return e(t(n))}}var yx=gx(kT,Object),mx=Object.prototype.hasOwnProperty;function _x(e){return null!=e&&ix(e.length)&&!oC(e)}function bx(e){return _x(e)?fx(e):function(e){if(!vx(e))return yx(e);var t=[];for(var n in Object(e))mx.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}var kx=Object.prototype.hasOwnProperty;function Ex(e){if(!eC(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=vx(e),n=[];for(var i in e)("constructor"!=i||!t&&kx.call(e,i))&&n.push(i);return n}function wx(e){return _x(e)?fx(e,!0):Ex(e)}var Sx=t(Kd),Tx="object"==("undefined"==typeof exports?"undefined":Du(exports))&&exports&&!exports.nodeType&&exports,Cx=Tx&&"object"==("undefined"==typeof module?"undefined":Du(module))&&module&&!module.nodeType&&module,xx=Cx&&Cx.exports===Tx?GT.Buffer:void 0,Dx=xx?xx.allocUnsafe:void 0;function Ix(e,t){if(t)return Sx(e).call(e);var n=e.length,i=Dx?Dx(n):new e.constructor(n);return e.copy(i),i}function Rx(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t}var Lx=t(Jd);function Px(){return[]}var Ax=Object.prototype.propertyIsEnumerable,Ox=Lx,Mx=Ox?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,i=null==e?0:e.length,r=0,o=[];++n<i;){var a=e[n];t(a,n,e)&&(o[r++]=a)}return o}(Ox(e),(function(t){return Ax.call(e,t)})))}:Px;function Nx(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}var zx=t(Dh),Ux=gx(zx,Object),Bx=Lx?function(e){for(var t=[];e;)Nx(t,Mx(e)),e=Ux(e);return t}:Px;function Fx(e,t,n){var i=t(e);return qC(e)?i:Nx(i,n(e))}function Hx(e){return Fx(e,bx,Mx)}function jx(e){return Fx(e,wx,Bx)}var Gx=CC(GT,"DataView"),Vx=CC(GT,"Promise"),Kx=CC(GT,"Set"),Wx=CC(GT,"WeakMap"),Yx="[object Map]",qx="[object Promise]",Xx="[object Set]",$x="[object WeakMap]",Zx="[object DataView]",Qx=mC(Gx),Jx=mC(xC),eD=mC(Vx),tD=mC(Kx),nD=mC(Wx),iD=JT;(Gx&&iD(new Gx(new ArrayBuffer(1)))!=Zx||xC&&iD(new xC)!=Yx||Vx&&iD(Vx.resolve())!=qx||Kx&&iD(new Kx)!=Xx||Wx&&iD(new Wx)!=$x)&&(iD=function(e){var t=JT(e),n="[object Object]"==t?e.constructor:void 0,i=n?mC(n):"";if(i)switch(i){case Qx:return Zx;case Jx:return Yx;case eD:return qx;case tD:return Xx;case nD:return $x}return t});var rD=iD,oD=Object.prototype.hasOwnProperty;var aD=GT.Uint8Array;function sD(e){var t=new e.constructor(e.byteLength);return new aD(t).set(new aD(e)),t}var lD=/\w*$/;var cD=VT?VT.prototype:void 0,uD=cD?cD.valueOf:void 0;function hD(e,t){var n=t?sD(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var dD="[object Boolean]",fD="[object Date]",pD="[object Map]",vD="[object Number]",gD="[object RegExp]",yD="[object Set]",mD="[object String]",_D="[object Symbol]",bD="[object ArrayBuffer]",kD="[object DataView]",ED="[object Float32Array]",wD="[object Float64Array]",SD="[object Int8Array]",TD="[object Int16Array]",CD="[object Int32Array]",xD="[object Uint8Array]",DD="[object Uint8ClampedArray]",ID="[object Uint16Array]",RD="[object Uint32Array]";function LD(e,t,n){var i,r,o,a=e.constructor;switch(t){case bD:return sD(e);case dD:case fD:return new a(+e);case kD:return function(e,t){var n=t?sD(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case ED:case wD:case SD:case TD:case CD:case xD:case DD:case ID:case RD:return hD(e,n);case pD:return new a;case vD:case mD:return new a(e);case gD:return(o=new(r=e).constructor(r.source,lD.exec(r))).lastIndex=r.lastIndex,o;case yD:return new a;case _D:return i=e,uD?Object(uD.call(i)):{}}}var PD=Object.create,AD=function(){function e(){}return function(t){if(!eC(t))return{};if(PD)return PD(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function OD(e){return"function"!=typeof e.constructor||vx(e)?{}:AD(Ux(e))}var MD=cx&&cx.isMap,ND=MD?ox(MD):function(e){return HC(e)&&"[object Map]"==rD(e)};var zD=cx&&cx.isSet,UD=zD?ox(zD):function(e){return HC(e)&&"[object Set]"==rD(e)},BD=1,FD=2,HD=4,jD="[object Arguments]",GD="[object Function]",VD="[object GeneratorFunction]",KD="[object Object]",WD={};function YD(e,t,n,i,r,o){var a,s=t&BD,l=t&FD,c=t&HD;if(n&&(a=r?n(e,i,r,o):n(e)),void 0!==a)return a;if(!eC(e))return e;var u=qC(e);if(u){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&oD.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return Rx(e,a)}else{var h=rD(e),d=h==GD||h==VD;if(QC(e))return Ix(e,s);if(h==KD||h==jD||d&&!r){if(a=l||d?{}:OD(e),!s)return l?function(e,t){return FC(e,Bx(e),t)}(e,function(e,t){return e&&FC(t,wx(t),e)}(a,e)):function(e,t){return FC(e,Mx(e),t)}(e,function(e,t){return e&&FC(t,bx(t),e)}(a,e))}else{if(!WD[h])return r?e:{};a=LD(e,h,s)}}o||(o=new OC);var f=o.get(e);if(f)return f;o.set(e,a),UD(e)?e.forEach((function(i){a.add(YD(i,t,n,i,e,o))})):ND(e)&&e.forEach((function(i,r){a.set(r,YD(i,t,n,r,e,o))}));var p=u?void 0:(c?l?jx:Hx:l?wx:bx)(e);return function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););}(p||e,(function(i,r){p&&(i=e[r=i]),BC(a,r,YD(i,t,n,r,e,o))})),a}WD[jD]=WD["[object Array]"]=WD["[object ArrayBuffer]"]=WD["[object DataView]"]=WD["[object Boolean]"]=WD["[object Date]"]=WD["[object Float32Array]"]=WD["[object Float64Array]"]=WD["[object Int8Array]"]=WD["[object Int16Array]"]=WD["[object Int32Array]"]=WD["[object Map]"]=WD["[object Number]"]=WD[KD]=WD["[object RegExp]"]=WD["[object Set]"]=WD["[object String]"]=WD["[object Symbol]"]=WD["[object Uint8Array]"]=WD["[object Uint8ClampedArray]"]=WD["[object Uint16Array]"]=WD["[object Uint32Array]"]=!0,WD["[object Error]"]=WD[GD]=WD["[object WeakMap]"]=!1;function qD(e){return YD(e,5)}function XD(e,t,n){(void 0!==n&&!NT(e[t],n)||void 0===n&&!(t in e))&&zC(e,t,n)}var $D,ZD=function(e,t,n){for(var i=-1,r=Object(e),o=n(e),a=o.length;a--;){var s=o[$D?a:++i];if(!1===t(r[s],s,r))break}return e};var QD="[object Object]",JD=Function.prototype,eI=Object.prototype,tI=JD.toString,nI=eI.hasOwnProperty,iI=tI.call(Object);function rI(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function oI(e,t,n,i,r,o,a){var s=rI(e,n),l=rI(t,n),c=a.get(l);if(c)XD(e,n,c);else{var u,h=o?o(s,l,n+"",e,t,a):void 0,d=void 0===h;if(d){var f=qC(l),p=!f&&QC(l),v=!f&&!p&&hx(l);h=l,f||p||v?qC(s)?h=s:HC(u=s)&&_x(u)?h=Rx(s):p?(d=!1,h=Ix(l,!0)):v?(d=!1,h=hD(l,!0)):h=[]:function(e){if(!HC(e)||JT(e)!=QD)return!1;var t=Ux(e);if(null===t)return!0;var n=nI.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&tI.call(n)==iI}(l)||YC(l)?(h=s,YC(s)?h=function(e){return FC(e,wx(e))}(s):eC(s)&&!oC(s)||(h=OD(l))):d=!1}d&&(a.set(l,h),r(h,l,i,o,a),a.delete(l)),XD(e,n,h)}}function aI(e,t,n,i,r){e!==t&&ZD(t,(function(o,a){if(r||(r=new OC),eC(o))oI(e,t,a,n,aI,i,r);else{var s=i?i(rI(e,a),o,a+"",e,t,r):void 0;void 0===s&&(s=o),XD(e,a,s)}}),wx)}function sI(e){return e}var lI=Math.max;var cI=NC?function(e,t){return NC(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:sI,uI=cI,hI=Date.now;var dI,fI,pI,vI=(dI=uI,fI=0,pI=0,function(){var e=hI(),t=16-(e-pI);if(pI=e,t>0){if(++fI>=800)return arguments[0]}else fI=0;return dI.apply(void 0,arguments)}),gI=vI;function yI(e,t){return gI(function(e,t,n){return t=lI(void 0===t?e.length-1:t,0),function(){for(var i=arguments,r=-1,o=lI(i.length-t,0),a=Array(o);++r<o;)a[r]=i[t+r];r=-1;for(var s=Array(t+1);++r<t;)s[r]=i[r];return s[t]=n(a),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,s)}}(e,t,sI),e+"")}function mI(e){return yI((function(t,n){var i=-1,r=n.length,o=r>1?n[r-1]:void 0,a=r>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(r--,o):void 0,a&&function(e,t,n){if(!eC(n))return!1;var i=Du(t);return!!("number"==i?_x(n)&&tx(t,n.length):"string"==i&&t in n)&&NT(n[t],e)}(n[0],n[1],a)&&(o=r<3?void 0:o,r=1),t=Object(t);++i<r;){var s=n[i];s&&e(t,s,i,o)}return t}))}var _I=mI((function(e,t,n,i){aI(e,t,n,i)}));function bI(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new AC;++t<n;)this.add(e[t])}function kI(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}function EI(e,t){return e.has(t)}bI.prototype.add=bI.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},bI.prototype.has=function(e){return this.__data__.has(e)};var wI=1,SI=2;function TI(e,t,n,i,r,o){var a=n&wI,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var h=-1,d=!0,f=n&SI?new bI:void 0;for(o.set(e,t),o.set(t,e);++h<s;){var p=e[h],v=t[h];if(i)var g=a?i(v,p,h,t,e,o):i(p,v,h,e,t,o);if(void 0!==g){if(g)continue;d=!1;break}if(f){if(!kI(t,(function(e,t){if(!EI(f,t)&&(p===e||r(p,e,n,i,o)))return f.push(t)}))){d=!1;break}}else if(p!==v&&!r(p,v,n,i,o)){d=!1;break}}return o.delete(e),o.delete(t),d}function CI(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function xI(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var DI=1,II=2,RI="[object Boolean]",LI="[object Date]",PI="[object Error]",AI="[object Map]",OI="[object Number]",MI="[object RegExp]",NI="[object Set]",zI="[object String]",UI="[object Symbol]",BI="[object ArrayBuffer]",FI="[object DataView]",HI=VT?VT.prototype:void 0,jI=HI?HI.valueOf:void 0;var GI=1,VI=Object.prototype.hasOwnProperty;var KI=1,WI="[object Arguments]",YI="[object Array]",qI="[object Object]",XI=Object.prototype.hasOwnProperty;function $I(e,t,n,i,r,o){var a=qC(e),s=qC(t),l=a?YI:rD(e),c=s?YI:rD(t),u=(l=l==WI?qI:l)==qI,h=(c=c==WI?qI:c)==qI,d=l==c;if(d&&QC(e)){if(!QC(t))return!1;a=!0,u=!1}if(d&&!u)return o||(o=new OC),a||hx(e)?TI(e,t,n,i,r,o):function(e,t,n,i,r,o,a){switch(n){case FI:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case BI:return!(e.byteLength!=t.byteLength||!o(new aD(e),new aD(t)));case RI:case LI:case OI:return NT(+e,+t);case PI:return e.name==t.name&&e.message==t.message;case MI:case zI:return e==t+"";case AI:var s=CI;case NI:var l=i&DI;if(s||(s=xI),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;i|=II,a.set(e,t);var u=TI(s(e),s(t),i,r,o,a);return a.delete(e),u;case UI:if(jI)return jI.call(e)==jI.call(t)}return!1}(e,t,l,n,i,r,o);if(!(n&KI)){var f=u&&XI.call(e,"__wrapped__"),p=h&&XI.call(t,"__wrapped__");if(f||p){var v=f?e.value():e,g=p?t.value():t;return o||(o=new OC),r(v,g,n,i,o)}}return!!d&&(o||(o=new OC),function(e,t,n,i,r,o){var a=n&GI,s=Hx(e),l=s.length;if(l!=Hx(t).length&&!a)return!1;for(var c=l;c--;){var u=s[c];if(!(a?u in t:VI.call(t,u)))return!1}var h=o.get(e),d=o.get(t);if(h&&d)return h==t&&d==e;var f=!0;o.set(e,t),o.set(t,e);for(var p=a;++c<l;){var v=e[u=s[c]],g=t[u];if(i)var y=a?i(g,v,u,t,e,o):i(v,g,u,e,t,o);if(!(void 0===y?v===g||r(v,g,n,i,o):y)){f=!1;break}p||(p="constructor"==u)}if(f&&!p){var m=e.constructor,_=t.constructor;m==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof m&&m instanceof m&&"function"==typeof _&&_ instanceof _||(f=!1)}return o.delete(e),o.delete(t),f}(e,t,n,i,r,o))}function ZI(e,t,n,i,r){return e===t||(null==e||null==t||!HC(e)&&!HC(t)?e!=e&&t!=t:$I(e,t,n,i,ZI,r))}var QI=1,JI=2;function eR(e){return e==e&&!eC(e)}function tR(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function nR(e){var t=function(e){for(var t=bx(e),n=t.length;n--;){var i=t[n],r=e[i];t[n]=[i,r,eR(r)]}return t}(e);return 1==t.length&&t[0][2]?tR(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,i){var r=n.length,o=r,a=!i;if(null==e)return!o;for(e=Object(e);r--;){var s=n[r];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++r<o;){var l=(s=n[r])[0],c=e[l],u=s[1];if(a&&s[2]){if(void 0===c&&!(l in e))return!1}else{var h=new OC;if(i)var d=i(c,u,l,e,t,h);if(!(void 0===d?ZI(u,c,QI|JI,i,h):d))return!1}}return!0}(n,e,t)}}var iR="[object Symbol]";function rR(e){return"symbol"==Du(e)||HC(e)&&JT(e)==iR}var oR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,aR=/^\w*$/;function sR(e,t){if(qC(e))return!1;var n=Du(e);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!rR(e))||(aR.test(e)||!oR.test(e)||null!=t&&e in Object(t))}var lR="Expected a function";function cR(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(lR);var n=function n(){var i=arguments,r=t?t.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var a=e.apply(this,i);return n.cache=o.set(r,a)||o,a};return n.cache=new(cR.Cache||AC),n}cR.Cache=AC;var uR=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,hR=/\\(\\)?/g,dR=function(e){var t=cR(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(uR,(function(e,n,i,r){t.push(i?r.replace(hR,"$1"):n||e)})),t})),fR=dR;var pR=1/0,vR=VT?VT.prototype:void 0,gR=vR?vR.toString:void 0;function yR(e){if("string"==typeof e)return e;if(qC(e))return function(e,t){for(var n=-1,i=null==e?0:e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r}(e,yR)+"";if(rR(e))return gR?gR.call(e):"";var t=e+"";return"0"==t&&1/e==-pR?"-0":t}function mR(e,t){return qC(e)?e:sR(e,t)?[e]:fR(function(e){return null==e?"":yR(e)}(e))}var _R=1/0;function bR(e){if("string"==typeof e||rR(e))return e;var t=e+"";return"0"==t&&1/e==-_R?"-0":t}function kR(e,t){for(var n=0,i=(t=mR(t,e)).length;null!=e&&n<i;)e=e[bR(t[n++])];return n&&n==i?e:void 0}function ER(e,t,n){var i=null==e?void 0:kR(e,t);return void 0===i?n:i}function wR(e,t){return null!=e&&t in Object(e)}function SR(e,t){return null!=e&&function(e,t,n){for(var i=-1,r=(t=mR(t,e)).length,o=!1;++i<r;){var a=bR(t[i]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++i!=r?o:!!(r=null==e?0:e.length)&&ix(r)&&tx(a,r)&&(qC(e)||YC(e))}(e,t,wR)}var TR=1,CR=2;function xR(e){return sR(e)?(t=bR(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return kR(t,e)}}(e);var t}function DR(e){return"function"==typeof e?e:null==e?sI:"object"==Du(e)?qC(e)?(t=e[0],n=e[1],sR(t)&&eR(n)?tR(bR(t),n):function(e){var i=ER(e,t);return void 0===i&&i===n?SR(e,t):ZI(n,i,TR|CR)}):nR(e):xR(e);var t,n}function IR(e){return e!=e}function RR(e,t){return!!(null==e?0:e.length)&&function(e,t,n){return t==t?function(e,t,n){for(var i=n-1,r=e.length;++i<r;)if(e[i]===t)return i;return-1}(e,t,n):function(e,t,n,i){for(var r=e.length,o=n+(i?1:-1);i?o--:++o<r;)if(t(e[o],o,e))return o;return-1}(e,IR,n)}(e,t,0)>-1}function LR(e,t,n){for(var i=-1,r=null==e?0:e.length;++i<r;)if(n(t,e[i]))return!0;return!1}var PR=Kx&&1/xI(new Kx([,-0]))[1]==1/0?function(e){return new Kx(e)}:function(){},AR=200;function OR(e,t){return e&&e.length?function(e,t,n){var i=-1,r=RR,o=e.length,a=!0,s=[],l=s;if(n)a=!1,r=LR;else if(o>=AR){var c=t?null:PR(e);if(c)return xI(c);a=!1,r=EI,l=new bI}else l=t?[]:s;e:for(;++i<o;){var u=e[i],h=t?t(u):u;if(u=n||0!==u?u:0,a&&h==h){for(var d=l.length;d--;)if(l[d]===h)continue e;t&&l.push(h),s.push(u)}else r(l,h,n)||(l!==s&&l.push(h),s.push(u))}return s}(e,DR(t)):[]}var MR,NR=function(e){return e.DRM_ENCRYPT="drm_encrypt",e.PRIVATE_ENCRYPT="private_encrypt",e.PRIVATE_ENCRYPT_UPGRADE="private_encrypt_upgrade",e.STANDARD_ENCRYPT="standard_encrypt",e}(NR||{}),zR=function(e){return e.H264="h264",e.H265="h265",e.H266="h266",e.AAC="aac",e.MP3="mp3",e.OPUS="opus",e.UNKNOWN="unknown",e}(zR||{}),UR=(up(MR={},"h265",'video/mp4; codecs="hev1.1.6.L120.90"'),up(MR,"h264",'video/mp4; codecs="avc1.42c01e"'),MR),BR=function(e){return e.H264="h264",e}(BR||{}),FR=function(e){return e.MP4="mp4",e.DASH="dash",e.HLS="hls",e}(FR||{}),HR=function(e){return e.M4A="m4a",e.MP4="mp4",e.MP3="mp3",e.DASH="dash",e.HLS="hls",e.OGG="ogg",e}(HR||{});uk("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),xk);var jR=te.Map;In({target:"Map",stat:!0,forced:!0},{from:fw}),In({target:"Map",stat:!0,forced:!0},{of:vw});var GR=xe,VR=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(GR(e)+" is not a map")},KR=Lk,WR=ae("Map"),YR={Map:WR,set:KR("set",2),get:KR("get",1),has:KR("has",1),remove:KR("delete",1),proto:WR.prototype},qR=VR,XR=YR.remove;In({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=qR(this),n=!0,i=0,r=arguments.length;i<r;i++)e=XR(t,arguments[i]),n=n&&e;return!!n}});var $R=VR,ZR=YR.get,QR=YR.has,JR=YR.set;In({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var n,i,r=$R(this);return QR(r,e)?(n=ZR(r,e),"update"in t&&(n=t.update(n,e,r),JR(r,e,n)),n):(i=t.insert(e,r),JR(r,e,i),i)}});var eL=zk,tL=function(e,t,n){return n?eL(e.entries(),(function(e){return t(e[1],e[0])})):e.forEach(t)},nL=$t,iL=VR,rL=tL;In({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=iL(this),n=nL(e,arguments.length>1?arguments[1]:void 0);return!1!==rL(t,(function(e,i){if(!n(e,i,t))return!1}),!0)}});var oL=$t,aL=VR,sL=tL,lL=YR.Map,cL=YR.set;In({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=aL(this),n=oL(e,arguments.length>1?arguments[1]:void 0),i=new lL;return sL(t,(function(e,r){n(e,r,t)&&cL(i,r,e)})),i}});var uL=$t,hL=VR,dL=tL;In({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=hL(this),n=uL(e,arguments.length>1?arguments[1]:void 0),i=dL(t,(function(e,i){if(n(e,i,t))return{value:e}}),!0);return i&&i.value}});var fL=$t,pL=VR,vL=tL;In({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=pL(this),n=fL(e,arguments.length>1?arguments[1]:void 0),i=vL(t,(function(e,i){if(n(e,i,t))return{key:i}}),!0);return i&&i.key}});var gL=In,yL=P,mL=x,_L=Le,bL=tv,kL=YR.Map,EL=g([].push);gL({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){var n=new(mL(this)?this:kL);_L(t);var i=_L(n.has),r=_L(n.get),o=_L(n.set);return bL(e,(function(e){var a=t(e);yL(i,n,a)?EL(yL(r,n,a),e):yL(o,n,a,[e])})),n}});var wL=function(e,t){return e===t||e!=e&&t!=t},SL=VR,TL=tL;In({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===TL(SL(this),(function(t){if(wL(t,e))return!0}),!0)}});var CL=P,xL=tv,DL=x,IL=Le,RL=YR.Map;In({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var n=new(DL(this)?this:RL);IL(t);var i=IL(n.set);return xL(e,(function(e){CL(i,n,t(e),e)})),n}});var LL=VR,PL=tL;In({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=PL(LL(this),(function(t,n){if(t===e)return{key:n}}),!0);return t&&t.key}});var AL=$t,OL=VR,ML=tL,NL=YR.Map,zL=YR.set;In({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=OL(this),n=AL(e,arguments.length>1?arguments[1]:void 0),i=new NL;return ML(t,(function(e,r){zL(i,n(e,r,t),e)})),i}});var UL=$t,BL=VR,FL=tL,HL=YR.Map,jL=YR.set;In({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=BL(this),n=UL(e,arguments.length>1?arguments[1]:void 0),i=new HL;return FL(t,(function(e,r){jL(i,r,n(e,r,t))})),i}});var GL=VR,VL=tv,KL=YR.set;In({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=GL(this),n=arguments.length,i=0;i<n;)VL(arguments[i++],(function(e,n){KL(t,e,n)}),{AS_ENTRIES:!0});return t}});var WL=Le,YL=VR,qL=tL,XL=TypeError;In({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=YL(this),n=arguments.length<2,i=n?void 0:arguments[1];if(WL(e),qL(t,(function(r,o){n?(n=!1,i=r):i=e(i,r,o,t)})),n)throw XL("Reduce of empty map with no initial value");return i}});var $L=$t,ZL=VR,QL=tL;In({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=ZL(this),n=$L(e,arguments.length>1?arguments[1]:void 0);return!0===QL(t,(function(e,i){if(n(e,i,t))return!0}),!0)}});var JL=Le,eP=VR,tP=TypeError,nP=YR.get,iP=YR.has,rP=YR.set;In({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var n=eP(this),i=arguments.length;JL(t);var r=iP(n,e);if(!r&&i<3)throw tP("Updating absent value");var o=r?nP(n,e):JL(i>2?arguments[2]:void 0)(e,n);return rP(n,e,t(o,e,n)),n}});var oP=P,aP=Le,sP=x,lP=nn,cP=TypeError,uP=function(e,t){var n,i=lP(this),r=aP(i.get),o=aP(i.has),a=aP(i.set),s=arguments.length>2?arguments[2]:void 0;if(!sP(t)&&!sP(s))throw cP("At least one callback required");return oP(o,i,e)?(n=oP(r,i,e),sP(t)&&(n=t(n),oP(a,i,e,n))):sP(s)&&(n=s(),oP(a,i,e,n)),n};In({target:"Map",proto:!0,real:!0,forced:!0},{upsert:uP}),In({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:uP});var hP=t(jR),dP=Qe,fP=function(e){return void 0!==e&&(dP(e,"value")||dP(e,"writable"))},pP=P,vP=ee,gP=nn,yP=fP,mP=D,_P=Ll;In({target:"Reflect",stat:!0},{get:function e(t,n){var i,r,o=arguments.length<3?t:arguments[2];return gP(t)===o?t[n]:(i=mP.f(t,n))?yP(i)?i.value:void 0===i.get?void 0:pP(i.get,o):vP(r=_P(t))?e(r,n,o):void 0}});var bP=te.Reflect.get,kP=t(bP),EP=t(bP),wP=P,SP=nn,TP=ee,CP=fP,xP=Zt,DP=D,IP=Ll,RP=B;In({target:"Reflect",stat:!0,forced:o((function(){var e=function(){},t=xP.f(new e,"a",{configurable:!0});return!1!==Reflect.set(e.prototype,"a",1,t)}))},{set:function e(t,n,i){var r,o,a,s=arguments.length<4?t:arguments[3],l=DP.f(SP(t),n);if(!l){if(TP(o=IP(t)))return e(o,n,i,s);l=RP(0)}if(CP(l)){if(!1===l.writable||!TP(s))return!1;if(r=DP.f(s,n)){if(r.get||r.set||!1===r.writable)return!1;r.value=i,xP.f(s,n,r)}else xP.f(s,n,RP(0,i))}else{if(void 0===(a=l.set))return!1;wP(a,s,i)}return!0}});var LP=t(te.Reflect.set),PP=In,AP=o,OP=Xr.f;PP({target:"Object",stat:!0,forced:AP((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:OP});var MP=te.Object,NP=t((function(e){return MP.getOwnPropertyNames(e)})),zP=t(yf),UP=In,BP=ee,FP=qb.onFreeze,HP=Pb,jP=o,GP=Object.seal;UP({target:"Object",stat:!0,forced:jP((function(){GP(1)})),sham:!HP},{seal:function(e){return GP&&BP(e)?GP(FP(e)):e}});var VP=t(te.Object.seal),KP=function(){var e,t=null;function n(e){return!!e&&("object"===Du(e)||"function"==typeof e)}function i(e){if(null!==e&&!n(e))throw new TypeError("Object prototype may only be an Object or null: "+e)}var r=Object,o=Boolean(r.create)||!({__proto__:null}instanceof r),a=r.create||(o?function(e){return i(e),{__proto__:e}}:function(e){if(i(e),null===e)throw new SyntaxError("Native Object.create is required to create objects with null prototype");var t=function(){};return t.prototype=e,new t}),s=function(){return null},l=zx||([].__proto__===Array.prototype?function(e){var t=e.__proto__;return n(t)?t:null}:s);return e=function(c,u){if(void 0===(this&&this instanceof e?this.constructor:void 0))throw new TypeError("Constructor Proxy requires 'new'");if(!n(c)||!n(u))throw new TypeError("Cannot create proxy with a non-object as target or handler");var h=function(){};t=function(){c=null,h=function(e){throw new TypeError("Cannot perform '".concat(e,"' on a proxy that has been revoked"))}},setTimeout((function(){t=null}),0);var d=u;for(var f in u={get:null,set:null,apply:null,construct:null},d){if(!(f in u))throw new TypeError("Proxy polyfill does not support trap '".concat(f,"'"));u[f]=d[f]}"function"==typeof d&&(u.apply=d.apply.bind(d));var p,v=l(c),g=!1,y=!1;"function"==typeof c?(p=function(){var e=this&&this.constructor===p,t=Sx(Array.prototype).call(arguments);return h(e?"construct":"apply"),e&&u.construct?u.construct.call(this,c,t):!e&&u.apply?u.apply(c,this,t):e?(t.unshift(c),new(c.bind.apply(c,t))):c.apply(this,t)},g=!0):c instanceof Array?(p=[],y=!0):p=o||null!==v?a(v):{};var m=u.get?function(e){return h("get"),u.get(this,e,p)}:function(e){return h("get"),this[e]},_=u.set?function(e,t){h("set"),u.set(this,e,t,p)}:function(e,t){h("set"),this[e]=t},b=NP(c),k={};b.forEach((function(e){if(!g&&!y||!(e in p)){var t=zP(c,e),n={enumerable:Boolean(t.enumerable),get:m.bind(c,e),set:_.bind(c,e)};r.defineProperty(p,e,n),k[e]=!0}}));var E=!0;if(g||y){var w=r.setPrototypeOf||([].__proto__===Array.prototype?function(e,t){return i(t),e.__proto__=t,e}:s);v&&w(p,v)||(E=!1)}if(u.get||!E)for(var S in c)k[S]||r.defineProperty(p,S,{get:m.bind(c,S)});return VP(c),VP(p),p},e.revocable=function(n,i){return{proxy:new e(n,i),revoke:t}},e},WP=t(KP)(),YP=new(function(){function e(){Ou(this,e),this.subscribeId=0,this.watcherMap=new hP}return Au(e,[{key:"observe",value:function(e){var t=this,n=new WP(e,{set:function(e,i,r){var o=EP(e,i);LP(e,i,r);var a=t.watcherMap.get(n);return a&&(t.flushCallback(a),t.flushPropertyCallback(a,i,o,r)),!0}});return this.watcherMap.set(n,{pending:!1,queue:[],property:{}}),n}},{key:"subscribe",value:function(e,t){var n=this.watcherMap.get(e);if(n)return this.subscribeId++,n.queue.push({id:this.subscribeId,callback:t}),this.subscribeId}},{key:"unsubscribe",value:function(e,t){var n=this.watcherMap.get(e);if(n){var i=n.queue,r=JS(i).call(i,(function(e){return e.id===t}));void 0!==r&&r>-1&&bT(i).call(i,r,1)}}},{key:"subscribeProperty",value:function(e,t,n){var i=this.watcherMap.get(e);if(i)return this.subscribeId++,i.property[t]||(i.property[t]={pending:!1,timer:0,pre:null,queue:[]}),i.property[t].queue.push({id:this.subscribeId,callback:n}),this.subscribeId}},{key:"unsubscribeProperty",value:function(e,t,n){var i=this.watcherMap.get(e);if(i){var r=i.property[t];if(r){var o=r.queue,a=JS(o).call(o,(function(e){return e.id===n}));void 0!==a&&a>-1&&bT(o).call(o,a,1)}}}},{key:"flushCallback",value:function(e){e.pending||(e.pending=!0,setTimeout((function(){e.queue.forEach((function(e){return e.callback()})),e.pending=!1}),0))}},{key:"flushPropertyCallback",value:function(e,t,n,i){var r=e.property[t];r&&(clearTimeout(r.timer),!1===r.pending&&(r.pending=!0,r.pre=n),r.timer=setTimeout((function(){r.queue.forEach((function(e){return e.callback(r.pre,i)})),r.pending=!1}),0))}}]),e}()),qP=t(Ep);In({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var XP=t(te.Number.isNaN),$P=t(tp),ZP=t(su),QP=t(Cu),JP=t(wh),eA=t(jh),tA=t(Td),nA=t(Iu);function iA(e,t){var n=kT(e);if(Lx){var i=Lx(e);t&&(i=ib(i).call(i,(function(t){return zP(e,t).enumerable}))),n.push.apply(n,i)}return n}function rA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?iA(Object(n),!0).forEach((function(t){cA(e,t,n[t])})):$P?Object.defineProperties(e,$P(n)):iA(Object(n)).forEach((function(t){Object.defineProperty(e,t,zP(n,t))}))}return e}function oA(e){return(oA="function"==typeof ZP&&"symbol"==typeof QP?function(e){return typeof e}:function(e){return e&&"function"==typeof ZP&&e.constructor===ZP&&e!==ZP.prototype?"symbol":typeof e})(e)}function aA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sA(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),Object.defineProperty(e,_A(i.key),i)}}function lA(e,t,n){return t&&sA(e.prototype,t),n&&sA(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function cA(e,t,n){return(t=_A(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uA(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dA(e,t)}function hA(e){return(hA=Object.setPrototypeOf?zx.bind():function(e){return e.__proto__||zx(e)})(e)}function dA(e,t){return(dA=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function fA(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pA(e,t){if(t&&("object"===Du(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return fA(e)}function vA(e){var t=function(){if("undefined"==typeof Reflect||!JP)return!1;if(JP.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(JP(Boolean,[],(function(){}))),!0}catch(cK){return!1}}();return function(){var n,i=hA(e);if(t){var r=hA(this).constructor;n=JP(i,arguments,r)}else n=i.apply(this,arguments);return pA(this,n)}}function gA(){return gA="undefined"!=typeof Reflect&&EP?EP.bind():function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=hA(e)););return e}(e,t);if(i){var r=zP(i,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},gA.apply(this,arguments)}function yA(e){return function(e){if(Array.isArray(e))return mA(e)}(e)||function(e){if(void 0!==ZP&&null!=eA(e)||null!=e["@@iterator"])return tA(e)}(e)||function(e,t){var n;if(!e)return;if("string"==typeof e)return mA(e,t);var i=Sx(n=Object.prototype.toString.call(e)).call(n,8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return tA(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return mA(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 mA(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 _A(e){var t=function(e,t){if("object"!==Du(e)||null===e)return e;var n=e[nA];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==Du(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Du(t)?t:String(t)}var bA={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?Sx(i).call(i,1):i);return Lx?y_(r).call(r,Lx(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,c,u=this._events[s],h=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),h){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,i),!0;case 4:return u.fn.call(u.context,t,i,r),!0;case 5:return u.fn.call(u.context,t,i,r,o),!0;case 6:return u.fn.call(u.context,t,i,r,o,a),!0}for(c=1,l=new Array(h-1);c<h;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var d,f=u.length;for(c=0;c<f;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),h){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,i);break;case 4:u[c].fn.call(u[c].context,t,i,r);break;default:if(!l)for(d=1,l=new Array(h-1);d<h;d++)l[d-1]=arguments[d];u[c].fn.apply(u[c].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,c=[],u=s.length;l<u;l++)(s[l].fn!==t||r&&!s[l].once||i&&s[l].context!==i)&&c.push(s[l]);c.length?this._events[o]=1===c.length?c[0]:c:a(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=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}(bA);var kA=bA.exports,EA=t(kA),wA=g,SA=Vn,TA=Ji,CA=q,xA=wA(Z_),DA=wA("".slice),IA=Math.ceil,RA=function(e){return function(t,n,i){var r,o,a=TA(CA(t)),s=SA(n),l=a.length,c=void 0===i?" ":TA(i);return s<=l||""==c?a:((o=xA(c,IA((r=s-l)/c.length))).length>r&&(o=DA(o,0,r)),e?a+o:o+a)}},LA={start:RA(!1),end:RA(!0)},PA=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(le),AA=LA.start;In({target:"String",proto:!0,forced:PA},{padStart:function(e){return AA(this,e,arguments.length>1?arguments[1]:void 0)}});var OA=Zu("String").padStart,MA=se,NA=OA,zA=String.prototype,UA=t((function(e){var t=e.padStart;return"string"==typeof e||e===zA||MA(zA,e)&&t===zA.padStart?NA:t})),BA="\t\n\v\f\r                 \u2028\u2029\ufeff",FA=q,HA=Ji,jA=BA,GA=g("".replace),VA=RegExp("^["+jA+"]+"),KA=RegExp("(^|[^"+jA+"])["+jA+"]+$"),WA=function(e){return function(t){var n=HA(FA(t));return 1&e&&(n=GA(n,VA,"")),2&e&&(n=GA(n,KA,"$1")),n}},YA={start:WA(1),end:WA(2),trim:WA(3)},qA=El.PROPER,XA=o,$A=BA,ZA=YA.trim;In({target:"String",proto:!0,forced:function(e){return XA((function(){return!!$A[e]()||"​…᠎"!=="​…᠎"[e]()||qA&&$A[e].name!==e}))}("trim")},{trim:function(){return ZA(this)}});var QA=Zu("String").trim,JA=se,eO=QA,tO=String.prototype,nO=t((function(e){var t=e.trim;return"string"==typeof e||e===tO||JA(tO,e)&&t===tO.trim?eO:t})),iO=to,rO=Math.floor,oO=function(e,t){var n=e.length,i=rO(n/2);return n<8?aO(e,t):sO(e,oO(iO(e,0,i),t),oO(iO(e,i),t),t)},aO=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},sO=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},lO=oO,cO=le.match(/firefox\/(\d+)/i),uO=!!cO&&+cO[1],hO=/MSIE|Trident/.test(le),dO=le.match(/AppleWebKit\/(\d+)\./),fO=!!dO&&+dO[1],pO=In,vO=g,gO=Le,yO=Xe,mO=Wn,_O=nT,bO=Ji,kO=o,EO=lO,wO=Of,SO=uO,TO=hO,CO=ve,xO=fO,DO=[],IO=vO(DO.sort),RO=vO(DO.push),LO=kO((function(){DO.sort(void 0)})),PO=kO((function(){DO.sort(null)})),AO=wO("sort"),OO=!kO((function(){if(CO)return CO<70;if(!(SO&&SO>3)){if(TO)return!0;if(xO)return xO<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++)DO.push({k:t+i,v:n})}for(DO.sort((function(e,t){return t.v-e.v})),i=0;i<DO.length;i++)t=DO[i].k.charAt(0),r.charAt(r.length-1)!==t&&(r+=t);return"DGBEFHACIJK"!==r}}));pO({target:"Array",proto:!0,forced:LO||!PO||!AO||!OO},{sort:function(e){void 0!==e&&gO(e);var t=yO(this);if(OO)return void 0===e?IO(t):IO(t,e);var n,i,r=[],o=mO(t);for(i=0;i<o;i++)i in t&&RO(r,t[i]);for(EO(r,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:bO(t)>bO(n)?1:-1}}(e)),n=mO(r),i=0;i<n;)t[i]=r[i++];for(;i<o;)_O(t,i++);return t}});var MO,NO=Zu("Array").sort,zO=se,UO=NO,BO=Array.prototype,FO=t((function(e){var t=e.sort;return e===BO||zO(BO,e)&&t===BO.sort?UO:t})),HO="undefined"!=typeof window&&window.location&&qP(MO=window.location.href).call(MO,"xgplayerdebugger=1")>-1,jO="color: #525252; background-color: #90ee90;",GO="color: #525252; background-color: red;",VO="color: #525252; background-color: yellow; ",KO="%c[xgplayer]",WO={config:{debug:HO?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,y_(t=[KO,jO,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,y_(t=[KO,VO,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,y_(t=[KO,GO,e]).call(t,o))}}};var YO=function(){function e(t){aA(this,e),this.bufferedList=t}return lA(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}(),qO={};function XO(e){var t=oA(e);return null!==e&&("object"===t||"function"===t)}function $O(e,t,n){var i,r,o,a,s,l,c=0,u=!1,h=!1,d=!0,f=!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,c=t,a=e.apply(o,n)}function v(e,t){return f?(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-c>=o}function y(){var e=Date.now();if(g(e))return m(e);s=v(y,function(e){var n=e-c,i=t-(e-l);return h?Math.min(i,o-n):i}(e))}function m(e){return s=void 0,d&&i?p(e):(i=r=void 0,a)}function _(){for(var e=Date.now(),n=g(e),o=arguments.length,d=new Array(o),f=0;f<o;f++)d[f]=arguments[f];if(i=d,r=this,l=e,n){if(void 0===s)return function(e){return c=e,s=v(y,t),u?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,XO(n)&&(u=!!n.leading,o=(h="maxWait"in n)?Math.max(+n.maxWait||0,t):o,d="trailing"in n?!!n.trailing:d),_.cancel=function(){void 0!==s&&function(e){if(f)return window.cancelAnimationFrame(e);clearTimeout(e)}(s),c=0,i=l=r=s=void 0},_.flush=function(){return void 0===s?a:m(Date.now())},_.pending=function(){return void 0!==s},_}qO.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,kT(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},qO.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&&qO.addClass(r,n),t&&kT(t).forEach((function(e){r.setAttribute(e,t[e])})),r):null}catch(o){return WO.logError("util.createDomFromHtml",o),null}},qO.hasClass=function(e,t){if(!e||!t)return!1;try{return Array.prototype.some.call(e.classList,(function(e){return e===t}))}catch(cK){var n=e.className&&"object"===oA(e.className)?e.getAttribute("class"):e.className;return n&&!!n.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}},qO.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(cK){qO.hasClass(e,t)||(e.className&&"object"===oA(e.className)?e.setAttribute("class",e.getAttribute("class")+" "+t):e.className+=" "+t)}},qO.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(cK){qO.hasClass(e,t)&&t.split(/\s+/g).forEach((function(t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className&&"object"===oA(e.className)?e.setAttribute("class",e.getAttribute("class").replace(n," ")):e.className=e.className.replace(n," ")}))}},qO.toggleClass=function(e,t){e&&t.split(/\s+/g).forEach((function(t){qO.hasClass(e,t)?qO.removeClass(e,t):qO.addClass(e,t)}))},qO.classNames=function(){for(var e=arguments,t=[],n=function(n){if("String"===qO.typeOf(e[n]))t.push(e[n]);else if("Object"===qO.typeOf(e[n])){var i;W_(i=kT(e[n])).call(i,(function(i){e[n][i]&&t.push(i)}))}},i=0;i<arguments.length;i++)n(i);return t.join(" ")},qO.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(cK){WO.logError("util.findDom",cK),0===qP(n).call(n,"#")&&(e=t.getElementById(Sx(n).call(n,1)))}return e},qO.getCss=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,!1)[t]},qO.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},qO.format=function(e){if(window.isNaN(e))return"";e=Math.round(e);var t=UA(qO).call(qO,Math.floor(e/3600),2,0),n=UA(qO).call(qO,Math.floor((e-3600*t)/60),2,0),i=UA(qO).call(qO,Math.floor(e-3600*t-60*n),2,0);return("00"===t?[n,i]:[t,n,i]).join(":")},qO.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},qO.typeOf=function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},qO.deepCopy=function(e,t){if("Object"===qO.typeOf(t)&&"Object"===qO.typeOf(e))return kT(t).forEach((function(n){if("Object"!==qO.typeOf(t[n])||t[n]instanceof Node)if("Array"===qO.typeOf(t[n])){var i;e[n]="Array"===qO.typeOf(e[n])?y_(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]:qO.deepCopy(e[n],t[n])})),e},qO.deepMerge=function(e,t){var n;return W_(n=kT(t)).call(n,(function(n){var i;"Array"===qO.typeOf(t[n])&&"Array"===qO.typeOf(e[n])?"Array"===qO.typeOf(e[n])&&(i=e[n]).push.apply(i,yA(t[n])):qO.typeOf(e[n])!==qO.typeOf(t[n])||null===e[n]||"Object"!==qO.typeOf(e[n])||t[n]instanceof window.Node?null!==t[n]&&(e[n]=t[n]):qO.deepMerge(e[n],t[n])})),e},qO.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},qO.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""},qO.setInterval=function(e,t,n,i){e._interval[t]||(e._interval[t]=window.setInterval(n.bind(e),i))},qO.clearInterval=function(e,t){clearInterval(e._interval[t]),e._interval[t]=null},qO.setTimeout=function(e,t,n){e._timers||(e._timers=[]);var i=setTimeout((function(){t(),qO.clearTimeout(e,i)}),n);return e._timers.push(i),i},qO.clearTimeout=function(e,t){var n=e._timers;if("Array"===qO.typeOf(n)){for(var i=0;i<n.length;i++)if(n[i]===t){bT(n).call(n,i,1),clearTimeout(t);break}}else clearTimeout(t)},qO.clearAllTimers=function(e){var t=e._timers;"Array"===qO.typeOf(t)&&(W_(t).call(t,(function(e){clearTimeout(e)})),e._timerIds=[])},qO.createImgBtn=function(e,t,n,i){var r,o,a,s,l,c,u,h,d,f,p,v=qO.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!(qP(n).call(n,e)>-1&&qP(i).call(i,e)>-1)||(c=parseFloat(nO(t=Sx(n).call(n,0,qP(n).call(n,e))).call(t)),u=parseFloat(nO(r=Sx(i).call(i,0,qP(i).call(i,e))).call(r)),h=e,!1)})),v.style.width=y_(r="".concat(c)).call(r,h),v.style.height=y_(o="".concat(u)).call(o,h),v.style.backgroundSize=y_(a=y_(s=y_(l="".concat(c)).call(l,h," ")).call(s,u)).call(a,h),v.style.margin="start"===e?y_(d=y_(f=y_(p="-".concat(u/2)).call(p,h," auto auto -")).call(f,c/2)).call(d,h):"auto 5px auto 5px");return v},qO.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(parseInt(e,16))})),y_(n="rgba(".concat(i.join(","),", ")).call(n,t,")")):"rgba(255, 255, 255, 0.1)"},qO.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},qO.checkIsFunction=function(e){return e&&"function"==typeof e},qO.checkIsObject=function(e){return null!==e&&"object"===oA(e)},qO.hide=function(e){e.style.display="none"},qO.show=function(e,t){e.style.display=t||"block"},qO.isUndefined=function(e){if(null==e)return!0},qO.isNotNull=function(e){return!(null==e)},qO.setStyleFromCsstext=function(e,t){if(t)if("String"===qO.typeOf(t)){var n=t.replace(/\s+/g,"").split(";");W_(n).call(n,(function(t){if(t){var n=t.split(":");n.length>1&&(e.style[n[0]]=n[1])}}))}else{var i;W_(i=kT(t)).call(i,(function(n){e.style[n]=t[n]}))}},qO.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 W_(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(qP(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",""),W_(t=kT(a)).call(t,(function(t){e.style[t]=a[t]})),o},qO.getStyleFromCsstext=function(e){var t=e.style.cssText;if(!t)return{};var n=t.replace(/\s+/g,"").split(";"),i={};return W_(n).call(n,(function(e){if(e){var t=e.split(":");t.length>1&&(i[t[0]]=t[1])}})),i},qO.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}},qO.stopPropagation=function(e){e&&e.stopPropagation()},qO.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},qO.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},qO.checkTouchSupport=function(){return"ontouchstart"in window},qO.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)});FO(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 YO(r)},qO.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}},qO.requestAnimationFrame=function(e){var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(t)return t(e)},qO.getHostFromUrl=function(e){if("String"!==qO.typeOf(e))return"";var t=e.split("/"),n="";return t.length>3&&t[2]&&(n=t[2]),n},qO.cancelAnimationFrame=function(e){var t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;t&&t(e)},qO.isMSE=function(e){return e.media&&(e=e.media),!!(e&&e instanceof HTMLMediaElement)&&(/^blob/.test(e.currentSrc)||/^blob/.test(e.src))},qO.isBlob=function(e){return"string"==typeof e&&/^blob/.test(e)},qO.generateSessionId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(new Date).getTime();try{e=parseInt(e)}catch(cK){e=0}return t+=e,window.performance&&"function"==typeof window.performance.now&&(t+=parseInt(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)}))},qO.createEvent=function(e){var t;return"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},qO.adjustTimeByDuration=function(e,t,n){return t&&e&&(e>t||n&&e<t)?t:e},qO.createPositionBar=function(e,t){var n=qO.createDom("xg-bar","",{"data-index":-1},e);return t.appendChild(n),n},qO.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:y_(e="".concat(t.x||0,"%, ")).call(e,t.y||0,"%"),rotate:"".concat(t.rotate||0,"deg")};return kT(i).forEach((function(e){var t,r=new RegExp("".concat(e,"\\([^\\(]+\\)"),"g"),o=y_(t="".concat(e,"(")).call(t,i[e],")");r.test(n)?(r.lastIndex=-1,n=n.replace(r,o)):n+="".concat(o," ")})),n},qO.convertDeg=function(e){return Math.abs(e)<=1?360*e:e%360},qO.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},qO.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:qO.getIndexByTime(e,t))<0)return-1;var r=t.length,o=t[i],a=o.start,s=o.end,l=o.cTime,c=o.offset;return e<a?l:e>=a&&e<=s?e-c:e>s&&i>=r-1?s:-1},qO.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 ZO=/(Android)\s([\d.]+)/,QO=/(Version)\/([\d.]+)/,JO=["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"],eM={get device(){return eM.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 y_(e=[]).call(e,ib(t=kT(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)?QO:ZO)?t.exec(e):[];if(n&&n.length>=3){var i=n[2].split(".");return i.length>0?parseInt(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&&W_(JO).call(JO,(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(tSe){return this._logger.error(e,tSe),!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 rb.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 rb.resolve({supported:r&&o,smooth:!1,powerEfficient:!1})}catch(cK){return rb.resolve(t)}}},tM="3.0.20-rc.7",nM={1:"media",2:"media",3:"media",4:"media",5:"media",6:"media"},iM={1:5101,2:5102,3:5103,4:5104,5:5105,6:5106},rM=lA((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{errorType:"",errorCode:0,errorMessage:"",originError:"",ext:{},mediaError:null};aA(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,c=t.src,u=t.currentSrc,h=t.media,d=h.readyState,f=h.networkState,p=n.errorCode||o.code;iM[p]&&(p=iM[p]);var v={playerVersion:tM,currentTime:s,duration:a,ended:l,readyState:d,networkState:f,src:c||u,errorType:n.errorType,errorCode:p,message:n.errorMessage||o.message,mediaError:o,originError:n.originError?n.originError.stack:"",host:qO.getHostFromUrl(c||u)};return n.ext&&W_(r=kT(n.ext)).call(r,(function(e){v[e]=n.ext[e]})),v}if(arguments.length>1){for(var g={playerVersion:tM,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}})),oM="play",aM="playing",sM="ended",lM="pause",cM="error",uM="seeking",hM="seeked",dM="timeupdate",fM="waiting",pM="canplay",vM="durationchange",gM="volumechange",yM="loadeddata",mM="ratechange",_M="progress",bM="loadstart",kM="emptied",EM="focus",wM="blur",SM="ready",TM="urlNull",CM="autoplay_started",xM="autoplay_was_prevented",DM="complete",IM="replay",RM="destroy",LM="urlchange",PM="download_speed_change",AM="leaveplayer",OM="enterplayer",MM="loading",NM="fullscreen_change",zM="cssFullscreen_change",UM="mini_state_change",BM="definition_change",FM="after_definition_change",HM="SEI_PARSED",jM="video_resize",GM="pip_change",VM="rotate",KM="screenShot",WM="playnext",YM="shortcut",qM="xglog",XM="user_action",$M="reset",ZM="source_error",QM="source_success",JM=["play","playing","ended","pause","error","seeking","seeked","timeupdate","waiting","canplay","canplaythrough","durationchange","volumechange","loadeddata","loadedmetadata","ratechange","progress","loadstart","emptied","stalled","suspend","abort","lowdecode"],eN={STATS_INFO:"stats_info",STATS_DOWNLOAD:"stats_download",STATS_RESET:"stats_reset"},tN="fps_stuck",nN=Object.freeze({__proto__:null,ABORT:"abort",AFTER_DEFINITION_CHANGE:FM,AUTOPLAY_PREVENTED:xM,AUTOPLAY_STARTED:CM,BEFORE_DEFINITION_CHANGE:"before_definition_change",BUFFER_CHANGE:"bufferedChange",CANPLAY:pM,CANPLAY_THROUGH:"canplaythrough",COMPLETE:DM,CSS_FULLSCREEN_CHANGE:zM,DEFINITION_CHANGE:BM,DESTROY:RM,DOWNLOAD_SPEED_CHANGE:PM,DURATION_CHANGE:vM,EMPTIED:kM,ENDED:sM,ENTER_PLAYER:OM,ERROR:cM,FPS_STUCK:tN,FULLSCREEN_CHANGE:NM,LEAVE_PLAYER:AM,LOADED_DATA:yM,LOADED_METADATA:"loadedmetadata",LOADING:MM,LOAD_START:bM,MINI_STATE_CHANGE:UM,PAUSE:lM,PIP_CHANGE:GM,PLAY:oM,PLAYER_BLUR:wM,PLAYER_FOCUS:EM,PLAYING:aM,PLAYNEXT:WM,PROGRESS:_M,RATE_CHANGE:mM,READY:SM,REPLAY:IM,RESET:$M,RETRY:"retry",ROTATE:VM,SCREEN_SHOT:KM,SEEKED:hM,SEEKING:uM,SEI_PARSED:HM,SHORTCUT:YM,SOURCE_ERROR:ZM,SOURCE_SUCCESS:QM,STALLED:"stalled",STATS_EVENTS:eN,SUSPEND:"suspend",SWITCH_SUBTITLE:"switch_subtitle",TIME_UPDATE:dM,URL_CHANGE:LM,URL_NULL:TM,USER_ACTION:XM,VIDEO_EVENTS:JM,VIDEO_RESIZE:jM,VOLUME_CHANGE:gM,WAITING:fM,XGLOG:qM});function iN(e,t){this&&this.emit&&("error"===e?this.errorHandler(e,t.error):this.emit(e,t))}var rN=function(e){uA(n,e);var t=vA(n);function n(e){var i;aA(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=VS({},{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 eM.isWeixin&&eM.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=qO.createDom(i.mediaConfig.mediaType,"",i.mediaConfig,""),e.defaultPlaybackRate&&(i.media.defaultPlaybackRate=i.media.playbackRate=e.defaultPlaybackRate),"Number"===qO.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 lA(n,[{key:"setEventsMiddleware",value:function(e){var t,n=this;W_(t=kT(e)).call(t,(function(t){n.mediaEventMiddleware[t]=e[t]}))}},{key:"removeEventsMiddleware",value:function(e){var t,n=this;W_(t=kT(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=W_(JM).call(JM,(function(t){var n,i=y_(n="on".concat(t.charAt(0).toUpperCase())).call(n,Sx(t).call(t,1));return"function"==typeof e[i]&&e.on(t,e[i]),cA({},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:qO.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=iN.bind(t,e,r);try{t.mediaEventMiddleware[e].call(t,r,a)}catch(s){throw iN.call(t,e,r),s}}else iN.call(t,e,r)}}(t,e))}))),this._evHandlers.forEach((function(e){var n=kT(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=kT(e)[0];t.removeEventListener(n,e[n],!1)})),this._evHandlers.forEach((function(t){var n,i=kT(t)[0],r=y_(n="on".concat(i.charAt(0).toUpperCase())).call(n,Sx(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(qO.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(QM,{src:e.target.currentSrc,host:qO.getHostFromUrl(e.target.currentSrc)})};for(var r=null,o=0;o<this._evHandlers.length;o++)if("error"===kT(this._evHandlers[o])[0]){r=this._evHandlers[o];break}!this._sourceError&&(this._sourceError=function(e){var t=parseInt(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=nM[4];n.emit(ZM,new rM(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?nM[n.code]:"other";n.message;this.media.currentSrc||(n={code:6,message:"empty_src"}),this.emit(e,new rM(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?qO.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(LM,e),this.emit(fM),this._currentTime=0,this._duration=0,qO.isMSE(this.media)?this.onWaiting():(this._detachSourceEvents(this.media),"Array"===qO.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=gA(hA(n.prototype),"emit",this)).call.apply(r,y_(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=gA(hA(n.prototype),"on",this)).call.apply(r,y_(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=gA(hA(n.prototype),"once",this)).call.apply(r,y_(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=gA(hA(n.prototype),"off",this)).call.apply(r,y_(i=[this,e,t]).call(i,a))}},{key:"offAll",value:function(){gA(hA(n.prototype),"removeAllListeners",this).call(this)}}]),n}(EA),oN=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"}};aA(this,e),this.indexedDB=window.indexedDB||window.webkitindexedDB,this.IDBKeyRange=window.IDBKeyRange||window.webkitIDBKeyRange,this.myDB=t}return lA(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}(),aN=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],sN=["requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen"],lN=["exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen"],cN="data-xgplayerid";function uN(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,y_(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,y_(t=[e]).call(t,r))})):n.call.apply(n,y_(s=[e]).call(s,o)))}function hN(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,y_(a=[this]).call(a,Sx(Array.prototype).call(arguments)))}catch(cK){var l,c;throw cK.message=y_(l=y_(c="[pluginName: ".concat(this.pluginName,":")).call(c,e,":pre error] >> ")).call(l,cK.message),cK}if(this.__hooks&&this.__hooks[e])try{var u,h=_N(this,e,t);if(h)if(h.then)h.then((function(e){var i;!1!==e&&uN.apply(void 0,y_(i=[o,t,n.next]).call(i,yA(r)))})).catch((function(e){throw e}));else uN.apply(void 0,y_(u=[this,t,n.next]).call(u,Sx(Array.prototype).call(arguments)));else if(void 0===h){var d;uN.apply(void 0,y_(d=[this,t,n.next]).call(d,Sx(Array.prototype).call(arguments)))}}catch(cK){var f,p;throw cK.message=y_(f=y_(p="[pluginName: ".concat(this.pluginName,":")).call(p,e,"] >> ")).call(f,cK.message),cK}else uN.apply(void 0,y_(i=[this,t,n.next]).call(i,Sx(Array.prototype).call(arguments)))}.bind(this)}function dN(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 fN(e,t){var n=this.__hooks;if(n)return n.hasOwnProperty(e)?(Array.isArray(n[e])||(n[e]=[]),-1===dN.call(this,e,t)&&n[e].push(t),!0):(console.warn("has no supported hook which name [".concat(e,"]")),!1)}function pN(e,t){var n=this.__hooks;if(n){if(Array.isArray(n[e])){var i=n[e],r=dN.call(this,e,t);-1!==r&&bT(i).call(i,r,1)}delete n[e]}}function vN(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 gN(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 yN(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.__hooks={},t&&W_(t).call(t,(function(t){e.__hooks[t]=null})),Object.defineProperty(e,"hooks",{get:function(){var t;return e.__hooks&&W_(t=kT(e.__hooks)).call(t,(function(t){if(e.__hooks[t])return t}))}})}function mN(e){e.__hooks=null}function _N(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,c=new Array(a>3?a-3:0),u=3;u<a;u++)c[u-3]=arguments[u];if(l++,0===s.length||l===s.length)return i.call.apply(i,y_(o=[t,t]).call(o,c));var h,d=s[l],f=d.call.apply(d,y_(r=[t,t]).call(r,c));return f&&f.then?f.then((function(r){var o;return!1===r?null:e.apply(void 0,y_(o=[t,n,i]).call(o,c))})).catch((function(e){console.warn("[runHooks]".concat(n," reject"),e.message)})):!1!==f?e.apply(void 0,y_(h=[t,n,i]).call(h,c)):void 0}.apply(void 0,y_(a=[e,t,n]).call(a,r))}var c;return n.call.apply(n,y_(c=[e,e]).call(c,r))}function bN(e,t){var n;WO.logError(y_(n="[".concat(e,"] event or callback cant be undefined or null when call ")).call(n,t))}var kN=function(){function e(t){aA(this,e),qO.checkIsFunction(this.beforeCreate)&&this.beforeCreate(t),yN(this),this.__args=t,this.__events={},this.__onceEvents={},this.config=t.config||{},this.player=null,this.playerConfig={},this.pluginName="",this.__init(t)}return lA(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=qO.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)})):bN(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)})):bN(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)})):bN(this.pluginName,"plugin.off(event, callback)")}},{key:"offAll",value:function(){var e=this;["__events","__onceEvents"].forEach((function(t){kT(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,y_(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=rA(rA({},n),{},{pluginName:this.pluginName});this.player.emitUserAction(e,t,i)}}},{key:"hook",value:function(e,t){var n;return hN.call.apply(hN,y_(n=[this]).call(n,Sx(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 fN.call.apply(fN,y_(n=[this]).call(n,Sx(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 pN.call.apply(pN,y_(n=[this]).call(n,Sx(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(),qO.clearAllTimers(this),qO.checkIsFunction(this.destroy)&&this.destroy(),W_(e=["player","playerConfig","pluginName","logger","__args","__hooks"]).call(e,(function(e){t[e]=null})),n.unRegisterPlugin(i),mN(this)}}],[{key:"defineGetterOrSetter",value:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&Object.defineProperty(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]&&Object.defineProperty(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 EN=Element.prototype;EN.matches=EN.matchesSelector||EN.mozMatchesSelector||EN.msMatchesSelector||EN.oMatchesSelector||EN.webkitMatchesSelector}var wN=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}};function SN(e,t,n,i,r){var o=TN.apply(this,arguments);return e.addEventListener(n,o,r),{destroy:function(){e.removeEventListener(n,o,r)}}}function TN(e,t,n,i){return function(n){n.delegateTarget=wN(n.target,t),n.delegateTarget&&i.call(e,n)}}var CN=function(e,t,n,i,r){return"function"==typeof e.addEventListener?SN.apply(null,arguments):"function"==typeof n?SN.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),W_(Array.prototype).call(e,(function(e){return SN(e,t,n,i,r)})))},xN=t(CN),DN={CONTROLS:"controls",ROOT:"root"},IN={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"},RN="xg-icon-disable";function LN(e){return!!e&&(qP(e)&&/^(?:http|data:|\/)/.test(e))}function PN(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 qO.addClass(e,r),W_(i=kT(o)).call(i,(function(t){e.setAttribute(t,o[t])})),e;if(LN(e)||LN(e.url))return o.src=LN(e)?e:e.url||"",s=qO.createDom(e.tag||"img","",o,"xg-img ".concat(r));if("function"==typeof e)try{var l,c;return(s=e())instanceof window.Element?(qO.addClass(s,r),W_(l=kT(o)).call(l,(function(e){s.setAttribute(e,o[e])})),s):(WO.logWarn(y_(c="warn>>icons.".concat(t," in config of plugin named [")).call(c,a,"] is a function mast return an Element Object")),null)}catch(cK){return WO.logError("Plugin named [".concat(a,"]:createIcon"),cK),null}return"string"==typeof e?qO.createDomFromHtml(e,o,r):(WO.logWarn(y_(n="warn>>icons.".concat(t," in config of plugin named [")).call(n,a,"] is invalid")),null)}function AN(e,t){var n,i=t.config.icons||t.playerConfig.icons;W_(n=kT(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"===oA(e)&&e.class&&"string"==typeof e.class?y_(n="".concat(t," ")).call(n,e.class):t}(i[n],o),a=function(e,t){var n;return"object"===oA(e)&&e.attr&&"object"===oA(e.attr)&&W_(n=kT(e.attr)).call(n,(function(n){t[n]=e.attr[n]})),t}(i[n],a),s=PN(i[n],n,o,a,t.pluginName)),!s&&r&&(s=PN(r.icon?r.icon:r,a,o,{},t.pluginName)),t.icons[n]=s}))}var ON=function(e){uA(n,e);var t=vA(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return aA(this,n),(e=t.call(this,i)).__delegates=[],e}return lA(n,[{key:"__init",value:function(e){if(gA(hA(n.prototype),"__init",this).call(this,e),e.root){var t=e.root,i=null;this.icons={},this.root=null,this.parent=null,AN(this.registerIcons()||{},this),this.langText={};var r,o,a,s=this.registerLanguageTexts()||{};o=this,W_(a=kT(r=s)).call(a,(function(e){Object.defineProperty(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(cK){var c;throw WO.logError("Plugin:".concat(this.pluginName,":render"),cK),new Error(y_(c="Plugin:".concat(this.pluginName,":render:")).call(c,cK.message))}if(l)(i=n.insert(l,t,e.index)).setAttribute("data-index",e.index);else{if(!e.tag)return;(i=qO.createDom(e.tag,"",e.attr,e.name)).setAttribute("data-index",e.index),t.appendChild(i)}this.root=i,this.parent=t;var u=this.config.attr||{},h=this.config.style||{};this.setAttr(u),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"===oA(n))if(kT(n).length>0)W_(t=kT(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"===oA(a)&&"function"==typeof a.plugin&&(i=a.options?qO.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,qO.addClass(fb(this).call(this,".xgplayer-icon"),RN)}},{key:"enable",value:function(){this.config.disable=!1,qO.removeClass(fb(this).call(this,".xgplayer-icon"),RN)}},{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=gA(hA(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=y_(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=y_(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(),bT(a=this.__delegates).call(a,o,1);break}}},{key:"setStyle",value:function(e,t){var n,i=this;if(this.root)return"String"===qO.typeOf(e)?this.root.style[e]=t:void("Object"===qO.typeOf(e)&&W_(n=kT(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"===qO.typeOf(e)?this.root.setAttribute(e,t):void("Object"===qO.typeOf(e)&&W_(n=kT(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?fb(this).call(this,e).appendChild(t):e.appendChild(t)}catch(n){return WO.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;(W_(e=this.__delegates).call(e,(function(e){e.destroy()})),this.__delegates=[],this._children instanceof Array)&&(W_(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)),gA(hA(n.prototype),"__destroy",this).call(this),this.icons={},W_(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 c=Number(s.getAttribute("data-index"));if(c>=r){l="beforebegin";break}c<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=xN(e,t,n,i,r);s.key=y_(a="".concat(t,"_")).call(a,n),o.push(s)}));else{var a,s=xN(e,t,n,i,r);s.key=y_(a="".concat(t,"_")).call(a,n),o.push(s)}return o}},{key:"ROOT_TYPES",get:function(){return DN}},{key:"POSITIONS",get:function(){return IN}}]),n}(kN),MN=function(){function e(){var t=this;if(aA(this,e),cA(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 XO(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),$O(e,t,{leading:i,trailing:r,maxWait:t})}(this.__trigger,100,{trailing:!0})),this.timeStamp=(new Date).getTime()}catch(cK){console.error(cK)}}return lA(e,[{key:"addObserver",value:function(e,t){if(this.observer){this.observer.observe(e);for(var n=e.getAttribute(cN),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;W_(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(cK){}i>-1&&bT(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(tSe){console.error(tSe)}return!0}return!1}}]),e}(),NN=null;var zN={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()},NN||(NN=new MN),NN.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=kT(t),i=null,r=0;r<n.length;r++)if(e.toLowerCase()===n[r].toLowerCase()){i=t[n[r]];break}return"Object"===qO.typeOf(i)?{root:i.root,position:i.position}:{}},lazyRegister:function(e,t){var n=this,i=t.timeout||1500;return rb.race([t.loader().then((function(t){var i;i=t&&t.__esModule?t.default:t,n.register(e,i,t.options)})),new rb((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=kT(o),l=0;l<s.length;l++)if(a.toLowerCase()===s[l].toLowerCase()){var c=o[s[l]];"Object"===qO.typeOf(c)?n.config=VS({},n.config,o[s[l]]):"Boolean"===qO.typeOf(c)&&(n.config.disable=!c);break}t.defaultConfig&&kT(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 u=new t(n);return r[a.toLowerCase()]=u,r[a.toLowerCase()].func=t,u&&"function"==typeof u.afterCreate&&u.afterCreate(),u}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(cK){var i;console.error(y_(i="[unRegister:".concat(t,"] cgid:[")).call(i,e,"] error"),cK)}},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 rb((function(e){e()}))}return new rb((function(i){if(t.pluginGroup)return(e._loadingPlugins&&e._loadingPlugins.length?rb.all(e._loadingPlugins):rb.resolve()).then((function(){var r,o=e._pluginInfoId;if(t.pluginGroup[o]){var a=t.pluginGroup[o]._plugins,s=[];kT(a).forEach((function(e){if(a[e]&&a[e].beforePlayerInit)try{var t=a[e].beforePlayerInit();s.push(n(t))}catch(cK){throw s.push(n(null)),cK}})),rb.all(y_(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;kT(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;kT(i).forEach((function(t){if(i[t].updateLang)i[t].updateLang(e);else try{i[t].lang=e}catch(tSe){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;kT(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||{};kT(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=NN)||void 0===r||r.unObserver(n,i);for(var o=this.pluginGroup[t]._plugins,a=0,s=kT(o);a<s.length;a++){var l=s[a];this.unRegister(t,l)}delete this.pluginGroup[t],delete e._pluginInfoId}}},UN={DEFAULT:"xgplayer",DEFAULT_SKIN:"xgplayer-skin-default",ENTER:"xgplayer-is-enter",PAUSED:"xgplayer-pause",PLAYING:"xgplayer-playing",ENDED:"xgplayer-ended",CANPLAY:"xgplayer-canplay",LOADING:"xgplayer-isloading",ERROR:"xgplayer-is-error",REPLAY:"xgplayer-replay",NO_START:"xgplayer-nostart",ACTIVE:"xgplayer-active",INACTIVE:"xgplayer-inactive",FULLSCREEN:"xgplayer-is-fullscreen",CSS_FULLSCREEN:"xgplayer-is-cssfullscreen",ROTATE_FULLSCREEN:"xgplayer-rotate-fullscreen",PARENT_ROTATE_FULLSCREEN:"xgplayer-rotate-parent",PARENT_FULLSCREEN:"xgplayer-fullscreen-parent",INNER_FULLSCREEN:"xgplayer-fullscreen-inner",NO_CONTROLS:"no-controls",FLEX_CONTROLS:"flex-controls",CONTROLS_FOLLOW:"controls-follow",CONTROLS_AUTOHIDE:"controls-autohide",TOP_BAR_AUTOHIDE:"top-bar-autohide",NOT_ALLOW_AUTOPLAY:"not-allow-autoplay",SEEKING:"seeking",PC:"xgplayer-pc",MOBILE:"xgplayer-mobile",MINI:"xgplayer-mini"};function BN(){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:(e=(document.documentElement.getAttribute("lang")||navigator.language||"zh-cn").toLocaleLowerCase(),"zh-cn"===e&&(e="zh"),e),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 e}var FN=function(e){uA(n,e);var t=vA(n);function n(){var e,i;aA(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return cA(fA(i=t.call.apply(t,y_(e=[this]).call(e,o))),"onMouseEnter",(function(e){var t=fA(i),n=t.player;t.playerConfig.closeControlsBlur&&n.focus({autoHide:!1})})),cA(fA(i),"onMouseLeave",(function(e){fA(i).player.focus()})),i}return lA(n,[{key:"beforeCreate",value:function(e){e.config.mode||"mobile"!==eM.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(UN.FLEX_CONTROLS);var a={height:"".concat(r,"px")};W_(e=kT(a)).call(e,(function(e){t.root.style[e]=a[e]})),this.left=fb(this).call(this,"xg-left-grid"),this.center=fb(this).call(this,"xg-center-grid"),this.right=fb(this).call(this,"xg-right-grid"),this.innerRoot=fb(this).call(this,"xg-inner-controls"),this.on(UM,(function(e){e?qO.addClass(t.root,"mini-controls"):qO.removeClass(t.root,"mini-controls")}));var s=this.playerConfig.isMobileSimulateMode;"mobile"!==eM.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&&qO.addClass(this.root,UN.CONTROLS_AUTOHIDE)}},{key:"pauseAutoHide",value:function(){qO.removeClass(this.root,UN.CONTROLS_AUTOHIDE)}},{key:"show",value:function(e){this.root.style.display="",this.player.focus()}},{key:"hide",value:function(){this.root.style.display="none"}},{key:"mode",get:function(){return this.config.mode}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},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 IN.CONTROLS_LEFT:t.root=this.left;break;case IN.CONTROLS_RIGHT:t.root=this.right;break;case IN.CONTROLS_CENTER:t.root=this.center;break;case IN.CONTROLS:t.root=this.root;break;default:t.root=this.left}return gA(hA(n.prototype),"registerPlugin",this).call(this,e,t,i)}}}},{key:"destroy",value:function(){"mobile"!==eM.device&&(this.unbind("mouseenter",this.onMouseEnter),this.unbind("mouseleave",this.onMouseLeave))}},{key:"render",value:function(){var e=this.config,t=e.mode,n=e.autoHide,i=e.initShow;if(!e.disable){var r=qO.classNames({"xgplayer-controls":!0},{"flex-controls":"flex"===t},{"bottom-controls":"bottom"===t},cA({},UN.CONTROLS_AUTOHIDE,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}(ON),HN={lang:{},langKeys:[],textKeys:[]};function jN(e,t){return kT(t).forEach((function(n){var i,r=qO.typeOf(t[n]),o=qO.typeOf(e[n]);"Array"===r?("Array"!==o&&(e[n]=[]),(i=e[n]).push.apply(i,yA(t[n]))):"Object"===r?("Object"!==o&&(e[n]={}),jN(e[n],t[n])):e[n]=t[n]})),e}function GN(){var e;W_(e=kT(HN.lang.en)).call(e,(function(e){HN.textKeys[e]=e}))}function VN(e,t){var n=e.LANG;if(t||(t=HN),t.lang){var i=e.TEXT||{};"zh"===n&&(n="zh-cn"),t.lang[n]?jN(t.lang[n],i):(t.langKeys.push(n),t.lang[n]=i),GN()}}VN({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 KN={get textKeys(){return HN.textKeys},get langKeys(){return HN.langKeys},get lang(){var e,t={};return W_(e=HN.langKeys).call(e,(function(e){t[e]=HN.lang[e]})),HN.lang["zh-cn"]&&(t.zh=HN.lang["zh-cn"]||{}),t},extend:function(e,t){var n=[];if(t||(t=HN),t.lang){var i;if("Array"!==qO.typeOf(e))n=W_(i=kT(e)).call(i,(function(t){return{LANG:"zh"===t?"zh-cn":t,TEXT:e[t]}}));else n=e;var r=t.lang;W_(n).call(n,(function(e){"zh"===e.LANG&&(e.LANG="zh-cn"),r[e.LANG]?jN(r[e.LANG]||{},e.TEXT||{}):VN(e,t)})),GN()}},use:VN,init:function(e){var t,n={lang:{},langKeys:[],textKeys:{},pId:e};return jN(n.lang,HN.lang),(t=n.langKeys).push.apply(t,yA(HN.langKeys)),jN(n.textKeys,HN.textKeys),n}},WN={INITIAL:1,READY:2,ATTACHING:3,ATTACHED:4,NOTALLOW:5,RUNNING:6,ENDED:7,DESTROYED:8},YN=["ERROR","INITIAL","READY","ATTACHING","ATTACHED","NOTALLOW","RUNNING","ENDED","DESTROYED"],qN={},XN=null,$N=function(e){uA(n,e);var t=vA(n);function n(){return aA(this,n),t.apply(this,arguments)}return lA(n,[{key:"add",value:function(e){e&&(qN[e.playerId]=e,1===kT(qN).length&&this.setActive(e.playerId,!0))}},{key:"remove",value:function(e){e&&(e.isUserActive,delete qN[e.playerId])}},{key:"_iterate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];for(var n in qN)if(Object.prototype.hasOwnProperty.call(qN,n)){var i=qN[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(qN[e])return t?this.forEach((function(t){e===t.playerId?(t.isUserActive=!0,t.isInstNext=!1):t.isUserActive=!1})):qN[e].isUserActive=t,e}},{key:"getActiveId",value:function(){for(var e=kT(qN),t=0;t<e.length;t++){var n=qN[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(qN[e])return t?this.forEach((function(t){e===t.playerId?(t.isUserActive=!1,t.isInstNext=!0):t.isInstNext=!1})):qN[e].isInstNext=t,e}}],[{key:"getInstance",value:function(){return XN||(XN=new n),XN}}]),n}(kA.EventEmitter);var ZN=["play","pause","replay","retry"],QN=0,JN=0,ez=null,tz=function(e){uA(n,e);var t=vA(n);function n(e){var i;aA(this,n);var r,o=qO.deepMerge(BN(),e);cA(fA(i=t.call(this,o)),"canPlayFunc",(function(){if(i.config){var e=i.config,t=e.autoplay,n=e.defaultPlaybackRate;WO.logInfo("player","canPlayFunc, startTime",i.__startTime),i._seekToStartTime(),i.playbackRate=n,(t||i._useAutoplay)&&i.mediaPlay(),i.off(pM,i.canPlayFunc),i.removeClass(UN.ENTER)}})),cA(fA(i),"onFullscreenChange",(function(e,t){var n=function(){qO.setTimeout(fA(i),(function(){i.resize()}),100)},r=qO.getFullScreenEl();i._fullActionFrom?i._fullActionFrom="":i.emit(XM,{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,cN);if(t||r&&(r===i._fullscreenEl||o))n(),!i.config.closeFocusVideoFocus&&i.media.focus(),i.fullscreen=!0,i.changeFullStyle(i.root,r,UN.FULLSCREEN),i.emit(NM,!0,i._fullScreenOffset),i.cssfullscreen&&i.exitCssFullscreen();else if(i.fullscreen){n();var a=fA(i),s=a._fullScreenOffset;if(a.config.needFullscreenScroll?(window.scrollTo(s.left,s.top),qO.setTimeout(fA(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(UN.FULLSCREEN);else{var l=i._fullscreenEl;l||!i.root.contains(e.target)&&e.target!==i.root||(l=e.target),i.recoverFullStyle(i.root,l,UN.FULLSCREEN)}i._fullscreenEl=null,i.emit(NM,!1)}})),cA(fA(i),"_onWebkitbeginfullscreen",(function(e){i._fullscreenEl=i.media,i.onFullscreenChange(e,!0)})),cA(fA(i),"_onWebkitendfullscreen",(function(e){i.onFullscreenChange(e,!1)})),yN(fA(i),ZN),i.config=o,i._pluginInfoId=qO.generateSessionId(),(r=fA(i)).logInfo=WO.logInfo.bind(r),r.logWarn=WO.logWarn.bind(r),r.logError=WO.logError.bind(r);var a=i.constructor.defaultPreset;if(i.config.presets.length){var s,l=qP(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=WN.INITIAL,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=KN.init(i._pluginInfoId),eM.os.isAndroid&&eM.osVersion>0&&eM.osVersion<6&&(i.config.autoplay=!1),i.database=new oN,i.isUserActive=!1,i._onceSeekCanplay=null,i._isPauseBeforeSeek=0,i.innerStates={isActiveLocked:!1},i.instManager=ez,!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"))),pA(i);var c=i.config,u=c.definition,h=void 0===u?{}:u;if(!c.url&&h.list&&h.list.length>0){var d,f=fb(d=h.list).call(d,(function(e){return e.definition&&e.definition===h.defaultDefinition}));f||(h.defaultDefinition=h.list[0].definition,f=h.list[0]),i.config.url=f.url,i.curDefinition=f}return i._bindEvents(),i._registerPresets(),i._registerPlugins(),zN.onPluginsReady(fA(i)),i.getInitDefinition(),i.setState(WN.READY),qO.setTimeout(fA(i),(function(){i.emit(SM)}),0),i.onReady&&i.onReady(),(i.config.videoInit||i.config.autoplay)&&(!i.hasStart||i.state<WN.ATTACHED)&&i.start(),i}return lA(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(cM,new rM("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=kT(qN),n=0;n<t.length;n++){var i=qN[t[n]];if(i.root===e)return i}return null}(this.root);a&&(WO.logWarn("The is an Player instance already exists in this.root, destroy it and reinitialize"),a.destroy()),this.root.setAttribute(cN,this.playerId),null===(i=ez)||void 0===i||i.add(this),zN.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 c=new s(l,this.config,this.mediaConfig);this.attachVideoEvents(c),this.media=c}if(this.media.setAttribute(cN,this.playerId),this.config.controls){var u=this.config.controls.root||null,h=zN.register(this,FN,{root:u});this.controls=h}var d="mobile"===this.config.isMobileSimulateMode?"mobile":eM.device;if(this.addClass(y_(e=y_(t=y_(n="".concat(UN.DEFAULT," ")).call(n,UN.INACTIVE," xgplayer-")).call(t,d," ")).call(e,this.config.controls?"":UN.NO_CONTROLS)),this.config.autoplay?this.addClass(UN.ENTER):this.addClass(UN.NO_START),this.config.fluid){var f=this.config,p=f.width,v=f.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,"%")};kT(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,b=y.left,k=y.top;return this.sizeInfo.width=m,this.sizeInfo.height=_,this.sizeInfo.left=b,this.sizeInfo.top=k,!0}},{key:"_initBaseDoms",value:function(){this.topBar=null,this.leftBar=null,this.rightBar=null,this.config.marginControls&&(this.innerContainer=qO.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()+Sx(t).call(t,1)])})),aN.forEach((function(t){document&&document.addEventListener(t,e.onFullscreenChange)})),eM.os.isIos&&(this.media.addEventListener("webkitbeginfullscreen",this._onWebkitbeginfullscreen),this.media.addEventListener("webkitendfullscreen",this._onWebkitendfullscreen)),this.once(yM,this.resize),this.playFunc=function(){e.config.closeFocusVideoFocus||e.media.focus()},this.once(oM,this.playFunc)}},{key:"_unbindEvents",value:function(){var e=this;this.root.removeEventListener("mousemove",this.mousemoveFunc),aN.forEach((function(t){document.removeEventListener(t,e.onFullscreenChange)})),this.playFunc&&this.off(oM,this.playFunc),this.off(pM,this.canPlayFunc),this.media.removeEventListener("webkitbeginfullscreen",this._onWebkitbeginfullscreen),this.media.removeEventListener("webkitendfullscreen",this._onWebkitendfullscreen)}},{key:"_clearUserTimer",value:function(){this.userTimer&&(qO.clearTimeout(this,this.userTimer),this.userTimer=null)}},{key:"_startInit",value:function(e){var t=this;if(this.media&&(e&&""!==e&&("Array"!==qO.typeOf(e)||0!==e.length)||(e="",this.emit(TM),WO.logWarn("config.url is null, please get url and run player._startInit(url)"),!this.config.nullUrlStart))){this.handleSource&&(this._detachSourceEvents(this.media),"Array"===qO.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"===qO.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;WO.logInfo("_startInit readyState",i),this.config.autoplay&&(!qO.isMSE(this.media)&&this.load(),(eM.os.isIpad||eM.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(pM,this.canPlayFunc),(!this.hasStart||this.state<WN.ATTACHED)&&zN.afterInit(this),this.hasStart=!0,this.setState(WN.ATTACHED),qO.setTimeout(this,(function(){t.emit(DM)}),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&&KN.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&&qP(o).call(o,i.toLowerCase())>-1)return null;if(!t&&a[i.toLowerCase()])return;if(n.lazy&&n.loader){var r=zN.lazyRegister(e,n);return void(n.forceBeforeInit&&(r.then((function(){var t,n;bT(t=e._loadingPlugins).call(t,qP(n=e._loadingPlugins).call(n,r),1)})).catch((function(t){var n,i;WO.logError("_registerPlugins:loadingPlugin",t),bT(n=e._loadingPlugins).call(n,qP(i=e._loadingPlugins).call(i,r),1)})),e._loadingPlugins.push(r)))}return e.registerPlugin(n)}catch(s){WO.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,c=void 0===l?[]:l,u=o.icons,h=void 0===u?{}:u,d=o.i18n,f=void 0===d?[]:d;e.config.plugins||(e.config.plugins=[]),e.config.ignores||(e.config.ignores=[]),(i=e.config.plugins).push.apply(i,yA(s)),(r=e.config.ignores).push.apply(r,yA(c)),W_(n=kT(h)).call(n,(function(t){e.config.icons[t]||(e.config.icons[t]=h[t])}));var p=e.config.i18n||[];f.push.apply(f,yA(p)),e.config.i18n=f}(e,t)}))}},{key:"_getRootByPosition",value:function(e){var t=null;switch(e){case IN.ROOT_RIGHT:this.rightBar||(this.rightBar=qO.createPositionBar("xg-right-bar",this.root)),t=this.rightBar;break;case IN.ROOT_LEFT:this.leftBar||(this.leftBar=qO.createPositionBar("xg-left-bar",this.root)),t=this.leftBar;break;case IN.ROOT_TOP:this.topBar||(this.topBar=qO.createPositionBar("xg-top-bar",this.root),this.config.topBarAutoHide&&qO.addClass(this.topBar,UN.TOP_BAR_AUTOHIDE)),t=this.topBar;break;default:t=this.innerContainer||this.root}return t}},{key:"registerPlugin",value:function(e,t){var n=zN.formatPluginInfo(e,t),i=n.PLUFGIN,r=n.options,o=this.config.plugins;!zN.checkPluginIfExits(i.pluginName,o)&&o.push(i);var a=zN.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&&qP(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)),zN.register(this,i,r))}},{key:"deregister",value:function(e){"string"==typeof e?zN.unRegister(this,e):e instanceof kN&&zN.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 kN&&(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;bT(i=this.config.plugins).call(i,n,1);break}}}},{key:"plugins",get:function(){return zN.getPlugins(this)}},{key:"getPlugin",value:function(e){var t=zN.findPlugin(this,e);return t&&t.pluginName?t:null}},{key:"addClass",value:function(e){this.root&&(qO.hasClass(this.root,e)||qO.addClass(this.root,e))}},{key:"removeClass",value:function(e){this.root&&qO.removeClass(this.root,e)}},{key:"hasClass",value:function(e){if(this.root)return qO.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>WN.ATTACHING))return e||this.config.url||this.getInitDefinition(),this.hasStart=!0,this.setState(WN.ATTACHING),this._registerPlugins(!1),zN.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",WO.logError("start:beforeInit:",e),e}))}},{key:"switchURL",value:function(e,t){var n=this,i=e;"Object"===qO.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 rb((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?(eM.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<WN.ATTACHED)return this.removeClass(UN.NO_START),this.addClass(UN.ENTER),this.start(),void(this._useAutoplay=!0);this.state<WN.RUNNING&&(this.removeClass(UN.NO_START),!this.isCanplay&&this.addClass(UN.ENTER));var t=gA(hA(n.prototype),"play",this).call(this);return void 0!==t&&t&&t.then?t.then((function(){e.removeClass(UN.NOT_ALLOW_AUTOPLAY),e.addClass(UN.PLAYING),e.state<WN.RUNNING&&(WO.logInfo(">>>>playPromise.then"),e.setState(WN.RUNNING),e.emit(CM))})).catch((function(t){if(WO.logWarn(">>>>playPromise.catch",t.name),e.media&&e.media.error)return e.onError(),void e.removeClass(UN.ENTER);"NotAllowedError"===t.name&&(e._errorTimer=qO.setTimeout(e,(function(){e._errorTimer=null,e.emit(xM),e.addClass(UN.NOT_ALLOW_AUTOPLAY),e.removeClass(UN.ENTER),e.pause(),e.setState(WN.NOTALLOW)}),0))})):(WO.logWarn("video.play not return promise"),this.state<WN.RUNNING&&(this.setState(WN.RUNNING),this.removeClass(UN.NOT_ALLOW_AUTOPLAY),this.removeClass(UN.NO_START),this.removeClass(UN.ENTER),this.addClass(UN.PLAYING),this.emit(CM))),t}},{key:"mediaPause",value:function(){gA(hA(n.prototype),"pause",this).call(this)}},{key:"videoPause",value:function(){gA(hA(n.prototype),"pause",this).call(this)}},{key:"play",value:function(){var e=this;return this.removeClass(UN.PAUSED),_N(this,"play",(function(){return e.mediaPlay()}))}},{key:"pause",value:function(){var e=this;_N(this,"pause",(function(){gA(hA(n.prototype),"pause",e).call(e)}))}},{key:"seek",value:function(e,t){var n=this;if(this.media&&!XP(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?parseInt(this.duration,10):e,!this._isPauseBeforeSeek&&(this._isPauseBeforeSeek=this.paused?2:1),this._onceSeekCanplay&&this.off(hM,this._onceSeekCanplay),this._onceSeekCanplay=function(){switch(n.removeClass(UN.ENTER),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(hM,this._onceSeekCanplay),this.state<WN.RUNNING?(this.removeClass(UN.NO_START),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&&W_(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=parseInt(e.bitrate,10)||0),this.emit(BM,{from:t,to:e}),this.hasStart){var r=this.switchURL(e.url,rA({seamless:!1!==i.seamless&&"undefined"!=typeof MediaSource&&"function"==typeof MediaSource.isTypeSupported},e));r&&r.then?r.then((function(){n.emit(FM,{from:t,to:e})})):this.emit(FM,{from:t,to:e})}else this.config.url=e.url}},{key:"reload",value:function(){this.load(),this.reloadFunc=function(){this.play()},this.once(yM,this.reloadFunc)}},{key:"resetState",value:function(){var e=this,t=[UN.NOT_ALLOW_AUTOPLAY,UN.PLAYING,UN.NO_START,UN.PAUSED,UN.REPLAY,UN.ENTER,UN.ENDED,UN.ERROR,UN.LOADING];this.hasStart=!1,this.isError=!1,this._useAutoplay=!1,this.mediaPause(),this._accPlayed.acc=0,this._accPlayed.t=0,this._accPlayed.loopAcc=0,t.forEach((function(t){e.removeClass(t)})),this.addClass(UN.NO_START),this.emit($M)}},{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&&(W_(t).call(t,(function(t){e.deregister(t)})),n)){var i,r=BN();pC(i=kT(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(cN),this.updateAcc("destroy"),this._unbindEvents(),this._detachSourceEvents(this.media),qO.clearAllTimers(this),this.emit(RM),null===(t=ez)||void 0===t||t.remove(this),zN.destroy(this),mN(this),gA(hA(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),W_(e=["topBar","leftBar","rightBar","innerContainer"]).call(e,(function(e){i[e]&&o.removeChild(i[e]),i[e]=null}));var c=o.className.split(" ");c.length>0?o.className=ib(c).call(c,(function(e){return qP(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(UN.ENDED),this.currentTime=0,this.isSeeking=!1,_N(this,"replay",(function(){e.once(hM,(function(){var t=e.mediaPlay();t&&t.catch&&t.catch((function(e){console.log(e)}))})),e.emit(IM),e.onPlay()}))}},{key:"retry",value:function(){var e=this;this.removeClass(UN.ERROR),this.addClass(UN.LOADING),_N(this,"retry",(function(){var t=e.currentTime,n=e.config.url,i=qO.isMSE(e.media)?{url:n}:e._preProcessUrl(n);e.src=i.url,!e.config.isLive&&(e.currentTime=t),e.once(pM,(function(){e.mediaPlay()}))}))}},{key:"changeFullStyle",value:function(e,t,n,i){e&&(i||(i=UN.PARENT_FULLSCREEN),this._orgCss||(this._orgCss=qO.filterStyleFromText(e)),qO.addClass(e,n),t&&t!==e&&!this._orgPCss&&(this._orgPCss=qO.filterStyleFromText(t),qO.addClass(t,i),t.setAttribute(cN,this.playerId)))}},{key:"recoverFullStyle",value:function(e,t,n,i){i||(i=UN.PARENT_FULLSCREEN),this._orgCss&&(qO.setStyleFromCsstext(e,this._orgCss),this._orgCss=""),qO.removeClass(e,n),t&&t!==e&&this._orgPCss&&(qO.setStyleFromCsstext(t,this._orgPCss),this._orgPCss="",qO.removeClass(t,i),t.removeAttribute(cN))}},{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:qO.scrollTop(),left:qO.scrollLeft()},this._fullscreenEl=e,this._fullActionFrom="get",qO.getFullScreenEl()===this._fullscreenEl)return this.onFullscreenChange(),rb.resolve();try{for(var i=0;i<sN.length;i++){var r=sN[i];if(e[r]){var o="webkitRequestFullscreen"===r?e.webkitRequestFullscreen(window.Element.ALLOW_KEYBOARD_INPUT):e[r]();return o&&o.then?o:rb.resolve()}}return n.fullscreenEnabled||n.webkitSupportsFullscreen?(n.webkitEnterFullscreen(),rb.resolve()):rb.reject(new Error("call getFullscreen fail"))}catch(a){return rb.reject(new Error("call getFullscreen fail"))}}},{key:"exitFullscreen",value:function(e){if(this.isRotateFullscreen&&this.exitRotateFullscreen(),this._fullscreenEl||qO.getFullScreenEl()){this.root;var t=this.media;this._fullActionFrom="exit";try{for(var n=0;n<lN.length;n++){var i=lN[n];if(document[i]){var r=document[i]();return r&&r.then?r:rb.resolve()}}return t&&t.webkitSupportsFullscreen?(t.webkitExitFullScreen(),rb.resolve()):rb.reject(new Error("call exitFullscreen fail"))}catch(o){return rb.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?y_(e="".concat(UN.INNER_FULLSCREEN," ")).call(e,UN.CSS_FULLSCREEN):UN.CSS_FULLSCREEN;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(NM,!0)),this._cssfullscreenEl=t,this.cssfullscreen=!0,this.emit(zM,!0)}},{key:"exitCssFullscreen",value:function(){var e,t=this._cssfullscreenEl?y_(e="".concat(UN.INNER_FULLSCREEN," ")).call(e,UN.CSS_FULLSCREEN):UN.CSS_FULLSCREEN;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(NM,!1)):this.removeClass(t)}else this.recoverFullStyle(this.root,this._cssfullscreenEl,t);this._cssfullscreenEl=null,this.cssfullscreen=!1,this.emit(zM,!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?y_(e="".concat(UN.INNER_FULLSCREEN," ")).call(e,UN.ROTATE_FULLSCREEN):UN.ROTATE_FULLSCREEN;this._fullscreenEl=t||this.root,this.changeFullStyle(this.root,t,n,UN.PARENT_ROTATE_FULLSCREEN),this.isRotateFullscreen=!0,this.fullscreen=!0,this.setRotateDeg(90),this._rootStyle=this.root.getAttribute("style"),this.root.style.width="".concat(window.innerHeight,"px"),this.emit(NM,!0)}},{key:"exitRotateFullscreen",value:function(e){var t,n=this._fullscreenEl!==this.root?y_(t="".concat(UN.INNER_FULLSCREEN," ")).call(t,UN.ROTATE_FULLSCREEN):UN.ROTATE_FULLSCREEN;this.recoverFullStyle(this.root,this._fullscreenEl,n,UN.PARENT_ROTATE_FULLSCREEN),this.isRotateFullscreen=!1,this.fullscreen=!1,this.setRotateDeg(0),this.emit(NM,!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(EM,rA({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(wM,rA({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(UN.INACTIVE),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=qO.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(UN.INACTIVE)}}},{key:"onEmptied",value:function(){this.updateAcc("emptied")}},{key:"onCanplay",value:function(){this.removeClass(UN.ENTER),this.removeClass(UN.ERROR),this.removeClass(UN.LOADING),this.isCanplay=!0,this.waitTimer&&qO.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(vM,(function(){e._seekToStartTime()})))}},{key:"onLoadstart",value:function(){this.removeClass(UN.ERROR),this.isCanplay=!1}},{key:"onPlay",value:function(){this.state===WN.ENDED&&this.setState(WN.RUNNING),this.removeClass(UN.PAUSED),this.ended&&this.removeClass(UN.ENDED),!this.config.closePlayVideoFocus&&this.focus()}},{key:"onPause",value:function(){this.addClass(UN.PAUSED),this.updateAcc("pause"),this.config.closePauseVideoFocus||(this._clearUserTimer(),this.focus())}},{key:"onEnded",value:function(){this.updateAcc("ended"),this.addClass(UN.ENDED),this.setState(WN.ENDED)}},{key:"onError",value:function(){this.isError=!0,this.updateAcc("error"),this.removeClass(UN.NOT_ALLOW_AUTOPLAY),this.removeClass(UN.NO_START),this.removeClass(UN.ENTER),this.removeClass(UN.LOADING),this.addClass(UN.ERROR)}},{key:"onSeeking",value:function(){this.isSeeking||this.updateAcc("seeking"),this.isSeeking=!0,this.addClass(UN.SEEKING)}},{key:"onSeeked",value:function(){this.isSeeking=!1,this.waitTimer&&qO.clearTimeout(this,this.waitTimer),this.removeClass(UN.LOADING),this.removeClass(UN.SEEKING)}},{key:"onWaiting",value:function(){var e=this;this.waitTimer&&qO.clearTimeout(this,this.waitTimer),this.updateAcc("waiting"),this.waitTimer=qO.setTimeout(this,(function(){e.addClass(UN.LOADING),e.emit(MM),qO.clearTimeout(e,e.waitTimer),e.waitTimer=null}),this.config.minWaitDelay)}},{key:"onPlaying",value:function(){var e=this;this.isError=!1,[UN.NO_START,UN.PAUSED,UN.ENDED,UN.ERROR,UN.REPLAY,UN.LOADING].forEach((function(t){e.removeClass(t)})),this._accPlayed.t||this.paused||this.ended||(this._accPlayed.t=(new Date).getTime())}},{key:"onTimeupdate",value:function(){!this._videoHeight&&this.media.videoHeight&&this.resize(),(this.waitTimer||this.hasClass(UN.LOADING))&&this.media.readyState>2&&(this.removeClass(UN.LOADING),qO.clearTimeout(this,this.waitTimer),this.waitTimer=null),!this.paused&&this.state===WN.NOTALLOW&&this.duration&&(this.setState(WN.RUNNING),this.emit(CM)),this._accPlayed.t||this.paused||this.ended||(this._accPlayed.t=(new Date).getTime())}},{key:"onVolumechange",value:function(){"Number"===qO.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"===qO.typeOf(e)?e:e.type||"";n.props&&"Array"!==qO.typeOf(n.props)&&(n.props=[n.props]),this.emit(XM,rA({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,c=0;c<l;c++)if(a.start(c)+i<=s&&a.end(c)-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,c=0,u=1,h=Math.abs(o/90),d=this.root,f=this.innerContainer,p=d.offsetWidth,v=f?f.offsetHeight:d.offsetHeight,g=v,y=p;if(h%2==0)u=i>0?100/i:r>0?100/r:1,s.scale=u,l=t>0?(100-i)/2-t:0,s.y=2===h?0-l:l,c=n>0?(100-r)/2-n:0,s.x=2===h?0-c:c,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;c=-m/2/(y=v)*100,s.x=3===h?c+t/2:c-t/2,l=m/2/g*100,s.y=3===h?l+n/2:l-n/2,s.scale=u,this.media.style.width="".concat(y,"px"),this.media.style.height="".concat(g,"px")}var _=qO.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&&W_(t=kT(e)).call(t,(function(t){if("plugins"!==t){n.config[t]=e[t];var i=n.plugins[t.toLowerCase()];i&&"Function"===qO.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,_N(this,"playnext",(function(){t.start(),t.emit(WM,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,c=t.width,u=t.height-l,h=parseInt(i/r*1e3,10),d=parseInt(c/u*1e3,10),f=c,p=u,v={};"auto"===a&&d>h||"fixWidth"===a?(p=c/h*1e3,this.config.fluid?v.paddingTop="".concat(100*p/f,"%"):v.height="".concat(p+l,"px")):("auto"===a&&d<h||"fixHeight"===a)&&(f=h*u/1e3,v.width="".concat(f,"px")),this.fullscreen||this.cssfullscreen||kT(v).forEach((function(t){e.root.style[t]=v[t]})),("fillHeight"===s&&d<h||"fillWidth"===s&&d>h)&&this.setAttribute("data-xgfill","cover");var g={videoScale:h,vWidth:f,vHeight:p,cWidth:f,cHeight:p+l};this.resizePosition(),this.emit(jM,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=y_(e="".concat(100*t,"% ")).call(e,100*n,"%")}},{key:"setState",value:function(e){var t;WO.logInfo("setState",y_(t="state from:".concat(YN[this.state]," to:")).call(t,YN[e])),this._state=e}},{key:"_preProcessUrl",value:function(e,t){var n=this.config,i=n.preProcessUrl,r=n.preProcessUrlOptions,o=VS({},r,t);return qO.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(WN.READY),this.emit("hasstart"))}},{key:"isPlaying",get:function(){return this._state===WN.RUNNING||this._state===WN.ENDED},set:function(e){e?this.setState(WN.RUNNING):this._state>=WN.RUNNING&&this.setState(WN.ATTACHED)}},{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=parseInt(this.cumulateTime/e.total*e.dropped,0)),e}},{key:"lang",get:function(){return this.config.lang},set:function(e){var t,n;0!==ib(t=KN.langKeys).call(t,(function(t){return t===e})).length||"zh"===e?(this.config.lang=e,zN.setLang(e,this)):console.error(y_(n="Sorry, set lang fail, because the language [".concat(e,"] is not supported now, list of all supported languages is [")).call(n,KN.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 tM}},{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 gA(hA(n.prototype),"readyState",this)}},{key:"error",get:function(){var e=gA(hA(n.prototype),"error",this);return this.i18n[e]||e}},{key:"networkState",get:function(){return gA(hA(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=qO.convertDeg(e))%90==0&&e!==this.videoPos.rotate&&(this.videoPos.rotate=e,this.resizePosition())}},{key:"avgSpeed",get:function(){return JN},set:function(e){JN=e}},{key:"realTimeSpeed",get:function(){return QN},set:function(e){QN=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 hN.call.apply(hN,y_(n=[this]).call(n,Sx(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){var n;return fN.call.apply(fN,y_(n=[this]).call(n,Sx(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){var n;return pN.call.apply(pN,y_(n=[this]).call(n,Sx(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 vN.call.apply(vN,y_(i=[this]).call(i,Sx(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 gN.call.apply(gN,y_(i=[this]).call(i,Sx(Array.prototype).call(arguments)))}},{key:"setUserActive",value:function(e,t){var n;"boolean"==typeof t&&t!==this.muted&&(this.addInnerOP("volumechange"),qO.typeOf(t)===Boolean&&(this.muted=t)),null===(n=ez)||void 0===n||n.setActive(this.playerId,e)}}],[{key:"debugger",get:function(){return WO.config.debug},set:function(e){WO.config.debug=e}},{key:"instManager",get:function(){return ez},set:function(e){ez=e}},{key:"getCurrentUserActivePlayerId",value:function(){var e;return null===(e=ez)||void 0===e?void 0:e.getActiveId()}},{key:"setCurrentUserActive",value:function(e,t){var n;null===(n=ez)||void 0===n||n.setActive(e,t)}},{key:"isHevcSupported",value:function(){return eM.isHevcSupported()}},{key:"probeConfigSupported",value:function(e){return eM.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}(rN);function nz(){return(new Date).getTime()}cA(tz,"defaultPreset",null),cA(tz,"XgVideoProxy",null),tz.instManager=$N.getInstance();var iz="loadstart",rz="loadeddata",oz="firstFrame",az="waitingStart",sz="waitingEnd",lz="seekStart",cz="seekEnd",uz=function(e){uA(n,e);var t=vA(n);function n(){var e,i;aA(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return cA(fA(i=t.call.apply(t,y_(e=[this]).call(e,o))),"_onTimeupdate",(function(){i._state.isTimeUpdate=!0,i._state.autoplayStart&&(WO.logInfo("[xgLogger]".concat(i.player.playerId," _onTimeupdate")),i._sendFF("onTimeupdate"))})),cA(fA(i),"_onAutoplayStart",(function(){WO.logInfo("[xgLogger]".concat(i.player.playerId," _onAutoplayStart")),i._state.autoplayStart=!0,i.vt&&i._sendFF("onAutoplayStart")})),cA(fA(i),"_onReset",(function(){i._state={autoplayStart:!1,isFFLoading:!1,isTimeUpdate:!1,isFFSend:!1,isLs:!1},i.vt=0,i.pt=0,i.fvt=0,i.newPointTime=nz(),i.loadedCostTime=0,i.startCostTime=0,i._isSeeking=!1,i.seekingStart=0,i.waitingStart=0,i.fixedWaitingStart=0,i._isWaiting=!1,i._waitTimer&&qO.clearTimeout(fA(i),i._waitTimer),i._waittTimer&&qO.clearTimeout(fA(i),i._waittTimer),i._waitTimer=null,i._waittTimer=null,i._waitType=0})),cA(fA(i),"_onSeeking",(function(){i.seekingStart||(i.suspendWaitingStatus("seek"),i.seekingStart=nz(),i.emitLog(lz,{start:nz()}))})),cA(fA(i),"_onSeeked",(function(){i.suspendSeekingStatus("seeked")})),cA(fA(i),"_onWaitingLoadStart",(function(){i._isWaiting||i.vt||(i._isWaiting=!0,i.waitingStart=nz(),i.fixedWaitingStart=nz(),i._waitType=1,i.emitLog(az,{fixedStart:i.fixedWaitingStart,start:i.waitingStart,type:1,endType:"loadstart"}))})),cA(fA(i),"_onWaiting",(function(){!i._isWaiting&&i.vt&&(i._isWaiting=!0,i.vt?i.seekingStart?i._waitType=2:i._waitType=0:i._waitType=1,i.fixedWaitingStart=nz(),i._waitTimer=qO.setTimeout(fA(i),(function(){i._isWaiting&&(i.waitingStart=nz(),qO.clearTimeout(fA(i),i._waitTimer),i._waitTimer=null,i._startWaitTimeout(),i.emitLog(az,{fixedStart:i.fixedWaitingStart,start:i.waitingStart,type:i._waitType,endType:2===i._waitType?"seek":"playing"}))}),200))})),cA(fA(i),"_onError",(function(){i.suspendSeekingStatus("error"),i.suspendWaitingStatus("error")})),cA(fA(i),"_onPlaying",(function(){i._isWaiting&&i.suspendWaitingStatus("playing")})),i}return lA(n,[{key:"afterCreate",value:function(){var e=this;this._onReset(),this._waitType="firstFrame",this._initOnceEvents(),this.newPointTime=nz(),this.loadedCostTime=0,this.startCostTime=0,this.on(bM,(function(){var t,n,i,r=e._state,o=r.autoplayStart,a=r.isFFSend;e.startCostTime=nz()-e.newPointTime,WO.logInfo("[xgLogger]".concat(e.player.playerId," LOAD_START"),y_(t=y_(n=y_(i="autoplayStart:".concat(o," isFFSend:")).call(i,a," startCostTime:")).call(n,e.startCostTime," newPointTime")).call(t,e.newPointTime)),a||(!r.isLs&&e.emitLog(iz,{}),r.isLs=!0,r.isTimeUpdate=!1,r.isFFLoading=!0,e.pt=nz(),e.vt=0,e.fvt=0,e._initOnceEvents(),e._onWaitingLoadStart())})),this.on(yM,(function(){var t,n;e.vt=nz(),e.fvt=e.vt-e.pt,e.loadedCostTime=e.vt-e.newPointTime;var i=e._state,r=i.isTimeUpdate,o=i.isFFSend,a=i.autoplayStart;WO.logInfo("[xgLogger]".concat(e.player.playerId," LOADED_DATA"),y_(t=y_(n="fvt:".concat(e.fvt," isTimeUpdate:")).call(n,e._state.isTimeUpdate," loadedCostTime:")).call(t,e.loadedCostTime)),(r||a)&&e._sendFF("loadedData"),o||e.emitLog(rz,{}),e.suspendWaitingStatus("loadeddata")})),this.on(uM,this._onSeeking),this.on(hM,this._onSeeked),this.on(RM,(function(){e.endState("destroy")})),this.on(LM,(function(){e.endState("urlChange"),WO.logInfo("[xgLogger]".concat(e.player.playerId," URL_CHANGE")),e._state.isFFSend&&e._onReset()})),this.on([aM,pM],this._onPlaying),this.on(fM,this._onWaiting),this.on(cM,this._onError),this.on($M,(function(){WO.logInfo("[xgLogger]".concat(e.player.playerId," RESET")),e.endState("reset"),e._initOnceEvents(),e._onReset()}))}},{key:"_initOnceEvents",value:function(){this.off(CM,this._onAutoplayStart),this.off(dM,this._onTimeupdate),this.once(CM,this._onAutoplayStart),this.once(dM,this._onTimeupdate)}},{key:"_sendFF",value:function(e){var t,n,i;this.s=nz();var r=this._state,o=r.isFFLoading,a=r.isFFSend;WO.logInfo("[xgLogger]".concat(this.player.playerId," _sendFF"),y_(t=y_(n=y_(i="".concat(e," fvt:")).call(i,this.fvt," isFFLoading:")).call(n,o," !isFFSend:")).call(t,!a)),this.vt>0&&o&&!a&&(WO.logInfo("[xgLogger]".concat(this.player.playerId," emitLog_firstFrame"),e),this._state.isFFLoading=!1,this._state.isFFSend=!0,this.emitLog(oz,{fvt:this.fvt,costTime:this.fvt,vt:this.vt,startCostTime:this.startCostTime,loadedCostTime:this.loadedCostTime}))}},{key:"_startWaitTimeout",value:function(){var e=this;this._waittTimer&&qO.clearTimeout(this,this._waittTimer),this._waittTimer=qO.setTimeout(this,(function(){e.suspendWaitingStatus("timeout"),qO.clearTimeout(e,e._waittTimer),e._waittTimer=null}),this.config.waitTimeout)}},{key:"endState",value:function(e){this.suspendWaitingStatus(e),this.suspendSeekingStatus(e)}},{key:"suspendSeekingStatus",value:function(e){if(this.seekingStart){var t=nz(),n=t-this.seekingStart;this.seekingStart=0,this.emitLog(cz,{end:t,costTime:n,endType:e})}}},{key:"suspendWaitingStatus",value:function(e){if(this._waitTimer&&(qO.clearTimeout(this,this._waitTimer),this._waitTimer=null),this._waittTimer&&(qO.clearTimeout(this,this._waittTimer),this._waittTimer=null),this._isWaiting=!1,this.waitingStart){var t=nz(),n=t-this.waitingStart,i=t-this.fixedWaitingStart,r=this.config.waitTimeout;this._isWaiting=!1,this.waitingStart=0,this.fixedWaitingStart=0,this.emitLog(sz,{fixedCostTime:i>r?r:i,costTime:n>r?r:n,type:"loadeddata"===e?1:this._waitType,endType:2===this._waitType?"seek":e})}}},{key:"emitLog",value:function(e,t){var n=this.player;this.emit(qM,rA({t:nz(),host:qO.getHostFromUrl(n.currentSrc),vtype:n.vtype,eventType:e,currentTime:this.player.currentTime,readyState:n.video.readyState,networkState:n.video.networkState},t))}}],[{key:"pluginName",get:function(){return"xgLogger"}},{key:"defaultConfig",get:function(){return{waitTimeout:1e4}}}]),n}(ON);function hz(){return(new DOMParser).parseFromString('<svg class="xgplayer-replay-svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 78 78" width="78" height="78">\n <path fill="#fff" transform="translate(20, 20)" d="M8.22708362,13.8757234 L11.2677371,12.6472196 C11.7798067,12.4403301 12.3626381,12.6877273 12.5695276,13.1997969 L12.9441342,14.1269807 C13.1510237,14.6390502 12.9036264,15.2218816 12.3915569,15.4287712 L6.8284538,17.6764107 L5.90126995,18.0510173 C5.38920044,18.2579068 4.80636901,18.0105096 4.5994795,17.49844 L1.97723335,11.0081531 C1.77034384,10.4960836 2.0177411,9.91325213 2.52981061,9.70636262 L3.45699446,9.33175602 C3.96906396,9.12486652 4.5518954,9.37226378 4.75878491,9.88433329 L5.67885163,12.1615783 C7.99551726,6.6766934 13.3983951,3 19.5,3 C27.7842712,3 34.5,9.71572875 34.5,18 C34.5,26.2842712 27.7842712,33 19.5,33 C15.4573596,33 11.6658607,31.3912946 8.87004692,28.5831991 C8.28554571,27.9961303 8.28762719,27.0463851 8.87469603,26.4618839 C9.46176488,25.8773827 10.4115101,25.8794641 10.9960113,26.466533 C13.2344327,28.7147875 16.263503,30 19.5,30 C26.127417,30 31.5,24.627417 31.5,18 C31.5,11.372583 26.127417,6 19.5,6 C14.4183772,6 9.94214483,9.18783811 8.22708362,13.8757234 Z"></path>\n</svg>\n',"image/svg+xml").firstChild}var dz=function(e){uA(n,e);var t=vA(n);function n(){return aA(this,n),t.apply(this,arguments)}return lA(n,[{key:"registerIcons",value:function(){return{replay:hz}}},{key:"afterCreate",value:function(){var e=this;ON.insert(this.icons.replay,this.root,0),this.__handleReplay=this.hook("replayClick",(function(){e.player.replay()}),{pre:function(e){e.preventDefault(),e.stopPropagation()}}),this.bind(".xgplayer-replay",["click","touchend"],this.__handleReplay),this.on(sM,(function(){if(e.playerConfig.loop||qO.addClass(e.player.root,"replay"),!e.config.disable){e.show();var t=e.root.querySelector("path");if(t){var n=window.getComputedStyle(t).getPropertyValue("transform");if("string"==typeof n&&qP(n).call(n,"none")>-1)return null;t.setAttribute("transform",n)}}})),this.on(oM,(function(){e.hide()}))}},{key:"handleReplay",value:function(e){e.preventDefault(),e.stopPropagation(),this.player.replay(),qO.removeClass(this.player.root,"replay")}},{key:"show",value:function(e){this.config.disable||(this.root.style.display="flex")}},{key:"enable",value:function(){this.config.disable=!1}},{key:"disable",value:function(){this.config.disable=!0,this.hide()}},{key:"destroy",value:function(){this.unbind(".xgplayer-replay",["click","touchend"],this.__handleReplay)}},{key:"render",value:function(){var e;return y_(e='<xg-replay class="xgplayer-replay">\n <xg-replay-txt class="xgplayer-replay-txt" lang-key="'.concat(this.i18nKeys.REPLAY,'">')).call(e,this.i18n.REPLAY,"</xg-replay-txt>\n </xg-replay>")}}],[{key:"pluginName",get:function(){return"replay"}},{key:"defaultConfig",get:function(){return{disable:!1}}}]),n}(ON),fz=function(e){uA(n,e);var t=vA(n);function n(){return aA(this,n),t.apply(this,arguments)}return lA(n,[{key:"isEndedShow",get:function(){return this.config.isEndedShow},set:function(e){this.config.isEndedShow=e}},{key:"hide",value:function(){qO.addClass(this.root,"hide")}},{key:"show",value:function(e){qO.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(sM,(function(){e.isEndedShow&&qO.removeClass(e.root,"hide")})),this.config.hideCanplay?(this.once(dM,(function(){e.onTimeUpdate()})),this.on(LM,(function(){qO.removeClass(e.root,"hide"),qO.addClass(e.root,"xg-showplay"),e.once(dM,(function(){e.onTimeUpdate()}))}))):this.on(oM,(function(){qO.addClass(e.root,"hide")}))}},{key:"setConfig",value:function(e){var t=this;kT(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?qO.removeClass(this.root,"xg-showplay"):this.once(dM,(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?y_(e="background-image:url(".concat(i,");")).call(e,s):s;return y_(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}(ON);function pz(){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 vz(){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 gz={};function yz(e){var t;e?window.clearTimeout(e):W_(t=kT(gz)).call(t,(function(e){window.clearTimeout(gz[e].id),delete gz[e]}))}var mz=function(e){uA(n,e);var t=vA(n);function n(e){var i;return aA(this,n),cA(fA(i=t.call(this,e)),"onPlayerReset",(function(){i.autoPlayStart=!1;var e="auto"===i.config.mode?"auto-hide":"hide";i.setAttr("data-state","play"),qO.removeClass(i.root,e),i.show()})),cA(fA(i),"onAutoplayStart",(function(){if(!i.autoPlayStart){var e="auto"===i.config.mode?"auto-hide":"hide";qO.addClass(i.root,e),i.autoPlayStart=!0,i.toggleTo("play")}})),i.autoPlayStart=!1,i}return lA(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(SM,(function(){n&&(n.lang&&"en"===n.lang?qO.addClass(t.root,"lang-is-en"):"jp"===n.lang&&qO.addClass(t.root,"lang-is-jp"))})),this.on(CM,this.onAutoplayStart),this.on(xM,(function(){var t="auto"===e.config.mode?"auto-hide":"hide";e.setAttr("data-state","play"),qO.removeClass(e.root,t),e.show()})),this.on(oM,(function(){e.toggleTo("play")})),this.on(lM,(function(){e.toggleTo("pause")})),this.on($M,(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:pz,class:"xg-icon-play"},startPause:{icon:vz,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(){qO.addClass(this.root,"hide")}},{key:"show",value:function(e){qO.removeClass(this.root,"hide")}},{key:"focusHide",value:function(){qO.addClass(this.root,"focus-hide")}},{key:"recover",value:function(){qO.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 gz[e]&&window.clearTimeout(gz[e].id),gz[e]={},n.start&&n.start(),gz[e].id=window.setTimeout((function(){n.end&&n.end(),window.clearTimeout(gz[e].id),delete gz[e]}),t),gz[e].id}("pauseplay",400,{start:function(){qO.addClass(t.root,"interact"),t.show(),t.switchStatus(!0)},end:function(){qO.removeClass(t.root,"interact"),!e&&t.hide(),t._animateId=null}})}},{key:"endAnimate",value:function(){qO.removeClass(this.root,"interact"),yz(this._animateId),this._animateId=null}},{key:"switchPausePlay",value:function(e){var t=this.player;(e.cancelable&&e.preventDefault(),e.stopPropagation(),t.state<WN.READY)||(this.player.paused||t.state!==WN.RUNNING?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<WN.RUNNING)&&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),yz(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}(ON),_z=function(e){uA(n,e);var t=vA(n);function n(){return aA(this,n),t.apply(this,arguments)}return lA(n,[{key:"render",value:function(){var e=this.config.innerHtml,t=qO.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}(ON);function bz(e,t,n){try{var i,r;return y_(i=y_(r=' <div class="xg-tips '.concat(n?"hide":" ",'" lang-key="')).call(r,e.i18nKeys[t],'">\n ')).call(i,e.i18n[t],"\n </div>")}catch(cK){return'<div class="xg-tips hide"></div>'}}var kz=function(e){uA(n,e);var t=vA(n);function n(){return aA(this,n),t.apply(this,arguments)}return lA(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 y_(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:IN.CONTROLS_RIGHT,index:10}}}]),n}(ON);function Ez(e){var t=parseFloat(e);return-1===qP(e).call(e,"%")&&!XP(t)&&t}var wz=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],Sz=wz.length;function Tz(e){if("string"==typeof e&&(e=document.querySelector(e)),e&&"object"===oA(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<Sz;t++)e[wz[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<Sz;r++){var o=wz[r],a=t[o],s=parseFloat(a);n[o]=XP(s)?0:s}var l=n.paddingLeft+n.paddingRight,c=n.paddingTop+n.paddingBottom,u=n.marginLeft+n.marginRight,h=n.marginTop+n.marginBottom,d=n.borderLeftWidth+n.borderRightWidth,f=n.borderTopWidth+n.borderBottomWidth,p=i,v=Ez(t.width);!1!==v&&(n.width=v+(p?0:l+d));var g=Ez(t.height);return!1!==g&&(n.height=g+(p?0:c+f)),n.innerWidth=n.width-(l+d),n.innerHeight=n.height-(c+f),n.outerWidth=n.width+u,n.outerHeight=n.height+h,n}}function Cz(e,t){for(var n=0;n<e.length;n++){var i=e[n];if(i.identifier===t)return i}}var xz="dragStart",Dz="dragMove",Iz="dragEnded",Rz={mousedown:["mousemove","mouseup"],touchstart:["touchmove","touchend","touchcancel"],pointerdown:["pointermove","pointerup","pointercancel"]},Lz=function(e){uA(n,e);var t=vA(n);function n(e){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return aA(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):pA(i)}return lA(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)]),W_(e=Rz[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=Rz[this._startKey];W_(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&&(W_(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=y_(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=Cz(e.changedTouches,this.touchIdentifier);t&&this.dragMove(e,t)}},{key:"ontouchend",value:function(e){var t=Cz(e.changedTouches,this.touchIdentifier);t&&this.dragEnd(e,t),e.preventDefault()}},{key:"ontouchcancel",value:function(e){var t=Cz(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=Tz(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(xz,this.startPos)}},{key:"dragEnd",value:function(e,t){this._root&&(this._unbindPostStartEvents(),this.isDragging&&(this._root.style.transform="",this.setLeftTop(),this.emit(Iz)),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(Dz,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=XP(t)?0:t,this.position.y=XP(n)?0:n,this._addTransformPosition(e)}},{key:"_addTransformPosition",value:function(e){var t=e.transform;if(0===qP(t).call(t,"matrix")){var n=t.split(","),i=0===qP(t).call(t,"matrix3d")?12:4,r=parseInt(n[i],10),o=parseInt(n[i+1],10);this.position.x+=r,this.position.y+=o}}},{key:"_getPositionCoord",value:function(e,t){if(-1!==qP(e).call(e,"%")){var n=Tz(this._root.parentNode);return n?parseFloat(e)/100*n[t]:0}return parseInt(e,10)}}]),n}(EA),Pz=function(e){uA(n,e);var t=vA(n);function n(e){var i;aA(this,n),cA(fA(i=t.call(this,e)),"onCancelClick",(function(e){i.exitMini(),i.isClose=!0})),cA(fA(i),"onCenterClick",(function(e){var t=fA(i).player;t.paused?t.play():t.pause()})),cA(fA(i),"onScroll",(function(e){if(!(!window.scrollY&&0!==window.scrollY||Math.abs(window.scrollY-i.pos.scrollY)<50)){var t=parseInt(qO.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=fA(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 lA(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(lM,(function(){e.setAttr("data-state","pause")})),this.on(oM,(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(kz,n,kz.pluginName)}var i=qO.checkTouchSupport()?"touchend":"click";this.bind(".mini-cancel-btn",i,this.onCancelClick),this.bind(".play-icon",i,this.onCenterClick),this.config.disableDrag||(this._draggabilly=new Lz(this.player.root,{handle:this.root})),this.config.isScrollSwitch&&window.addEventListener("scroll",this.onScroll)}}},{key:"registerIcons",value:function(){return{play:{icon:pz,class:"xg-icon-play"},pause:{icon:vz,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={},qO.addClass(n.root,"xgplayer-mini"),W_(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(UM,!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;(qO.removeClass(n.root,"xgplayer-mini"),this.lastStyle)&&W_(t=kT(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(UM,!1),this.isMini=n.isMini=!1}},{key:"destroy",value:function(){window.removeEventListener("scroll",this.onScroll);var e=qO.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(bz(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}(ON),Az={mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mousemove:"onMouseMove"},Oz=["videoClick","videoDbClick"],Mz=function(e){uA(n,e);var t=vA(n);function n(){var e,i;aA(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return cA(fA(i=t.call.apply(t,y_(e=[this]).call(e,o))),"onMouseMove",(function(e){var t=fA(i),n=t.player,r=t.playerConfig;n.isActive||(n.focus({autoHide:!r.closeDelayBlur}),!r.closeFocusVideoFocus&&n.media.focus())})),cA(fA(i),"onMouseEnter",(function(e){var t=fA(i),n=t.playerConfig,r=t.player;!n.closeFocusVideoFocus&&r.media.focus(),n.closeDelayBlur?r.focus({autoHide:!1}):r.focus(),i.emit(OM)})),cA(fA(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(AM)})),cA(fA(i),"onVideoClick",(function(e){var t=fA(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--,_N(fA(i),Oz[0],(function(e,t){i.switchPlayPause(t.e)}),{e:e,paused:n.paused}),clearTimeout(i.clickTimer),i.clickTimer=null)}),300))})),cA(fA(i),"onVideoDblClick",(function(e){var t=fA(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(),_N(fA(i),Oz[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 lA(n,[{key:"afterCreate",value:function(){var e=this;this._clickCount=0,W_(Oz).call(Oz,(function(t){e.__hooks[t]=null})),"mobile"===this.playerConfig.isMobileSimulateMode||"mobile"===eM.device&&!eM.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),W_(e=kT(Az)).call(e,(function(e){r.addEventListener(e,t[Az[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),W_(e=kT(Az)).call(e,(function(e){r.removeEventListener(e,t[Az[e]],!1)}))}}],[{key:"pluginName",get:function(){return"pc"}},{key:"defaultConfig",get:function(){return{}}}]),n}(kN),Nz="press",zz="pressend",Uz="doubleclick",Bz="click",Fz="touchmove",Hz="touchstart",jz="touchend",Gz={start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},Vz={start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseleave"};function Kz(e){return e&&e.length>0?e[e.length-1]:null}var Wz=function(){function e(t){var n,i=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{eventType:"touch"};aA(this,e),cA(this,"onTouchStart",(function(e){var t=i._pos,n=i.root,r=Kz(e.touches);t.x=r?parseInt(r.pageX,10):e.pageX,t.y=r?parseInt(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(Hz,e)})),cA(this,"onTouchCancel",(function(e){i.onTouchEnd(e)})),cA(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(zz,e),i.trigger(jz,e),!t.press&&!t.moving&&i.__setDb(e),t.press=!1,t.start=!1,t.moving=!1})),cA(this,"onTouchMove",(function(e){var t=i._pos,n=i.config,r=Kz(e.touches),o=r?parseInt(r.pageX,10):e.pageX,a=r?parseInt(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(zz,e),t.press=!1,t.moving=!0,i.trigger(Fz,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},W_(n=kT(r)).call(n,(function(e){i.config[e]=r[e]})),this.root=t,this.events="mouse"===r.eventType?Vz:Gz,this.pressIntrvalId=null,this.dbIntrvalId=null,this.__handlers={},this._initEvent()}return lA(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(Nz,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(Uz,e);this.dbIntrvalId=setTimeout((function(){t.__clearDb(),t._pos.start||t._pos.press||t._pos.moving||t.trigger(Bz,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)bT(n=this.__handlers[e]).call(n,r,1)}}},{key:"trigger",value:function(e,t){var n;this.__handlers[e]&&W_(n=this.__handlers[e]).call(n,(function(n){try{n(t)}catch(tSe){console.error("trigger>>:".concat(e),tSe)}}))}},{key:"destroy",value:function(){var e=this,t={touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"};kT(t).forEach((function(n){e.root.removeEventListener(n,e[t[n]])}))}}]),e}();function Yz(){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 qz="auto",Xz="seeking",$z="playbackrate",Zz=["videoClick","videoDbClick"],Qz=function(e){uA(n,e);var t=vA(n);function n(e){var i;return aA(this,n),cA(fA(i=t.call(this,e)),"onTouchStart",(function(e){var t=fA(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),qO.checkIsFunction(a.disableSwipeHandler)&&a.disableSwipeHandler(),fb(i).call(i,".xg-dur").innerHTML=qO.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 c=parseInt(s.pageX-o.left,10),u=parseInt(s.pageY-o.top,10);o.x=90===n.rotateDeg?u:c,o.y=90===n.rotateDeg?c:u,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}})),cA(fA(i),"onTouchMove",(function(e){var t=i.getTouche(e),n=fA(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,c=parseInt(t.pageX-r.left,10),u=parseInt(t.pageY-r.top,10),h=90===a.rotateDeg?u:c,d=90===a.rotateDeg?c:u;if(Math.abs(h-r.x)>s||Math.abs(d-r.y)>s){var f=h-r.x,p=d-r.y,v=r.scope;if(-1===v&&(0===(v=i.checkScope(h,d,f,p,r))&&(l?a.blur():a.focus({autoHide:!1}),!r.time&&(r.time=parseInt(1e3*a.currentTime,10)+1e3*i.timeOffset)),r.scope=v),-1===v||v>0&&!o.gestureY||0===v&&!o.gestureX)return;i.executeMove(f,p,v,r.width,r.height),r.x=h,r.y=d}}})),cA(fA(i),"onTouchEnd",(function(e){var t=fA(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(),qO.checkIsFunction(o.enableSwipeHandler)&&o.enableSwipeHandler(),i.changeAction(qz)}})),cA(fA(i),"onRootTouchMove",(function(e){!i.config.disableGesture&&i.config.gestureX&&i.checkIsRootTarget(e)&&(e.stopPropagation(),i.pos.isStart?i.onTouchMove(e):i.onTouchStart(e))})),cA(fA(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 lA(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:Yz,class:"xg-seek-pre"}}}},{key:"afterCreate",value:function(){var e,t=this;W_(Zz).call(Zz,(function(e){t.__hooks[e]=null}));var n=this.playerConfig,i=this.config,r=this.player;!0===n.closeVideoDblclick&&(i.closedbClick=!0),this.resetPos(),qO.isUndefined(n.disableGesture)||(i.disableGesture=!!n.disableGesture),this.appendChild(".xg-seek-icon",this.icons.seekTipIcon),this.xgMask=qO.createDom("xg-mask","",{},"xgmask"),r.root.appendChild(this.xgMask),this.initCustomStyle(),this.registerThumbnail();var o="mouse"===this.domEventType?"mouse":"touch";this.touch=new Wz(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(vM,(function(){var e=t.player,n=t.config;e.duration>0&&1e3*e.duration<n.moveDuration&&(n.moveDuration=1e3*e.duration)})),this.on([pM,sM],(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(W_(e=kT(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(qz)}))})))}}},{key:"registerThumbnail",value:function(){var e=this.player.plugins.thumbnail;if(e&&e.usable){this.thumbnail=e.createThumbnail(null,"mobile-thumbnail");var t=fb(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&&(fb(this).call(this,".xg-curbar").style.backgroundColor=t);n&&(fb(this).call(this,".xg-bar").style.backgroundColor=n);if(i){var a=fb(this).call(this,".time-preview");kT(i).forEach((function(e){a.style[e]=i[e]}))}var s=r||t,l=o;s&&(fb(this).call(this,".xg-cur").style.color=s),l&&(fb(this).call(this,".xg-dur").style.color=l),this.config.disableTimeProgress&&qO.addClass(fb(this).call(this,".xg-timebar"),"hide")}},{key:"resetPos",value:function(){var e,t=this;this.pos?(this.pos.isStart=!1,this.pos.scope=-1,W_(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:eM.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(qz)}},{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<WN.RUNNING?i.closeVideoClick||(this.sendUseAction(qO.createEvent("click")),t.play()):!n.closedbClick||i.closeVideoClick?t.isActive?t.blur():t.focus():i.closeVideoClick||((t.isActive||n.focusVideoClick)&&(this.sendUseAction(qO.createEvent("click")),this.switchPlayPause()),t.focus())}},{key:"dbClickHandler",value:function(e){var t=this.config,n=this.player;!t.closedbClick&&n.state>=WN.RUNNING&&(this.sendUseAction(qO.createEvent("dblclick")),this.switchPlayPause())}},{key:"onClick",value:function(e){var t=this,n=this.player;_N(this,Zz[0],(function(e,n){t.clickHandler(n.e)}),{e:e,paused:n.paused})}},{key:"onDbClick",value:function(e){var t=this,n=this.player;_N(this,Zz[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($z))}},{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(qz))}},{key:"updateTime",value:function(e){var t=this.player,n=this.config,i=this.player.duration;e=Number(e.toFixed(4));var r=parseInt(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=parseInt(100*e,10),n.volume+=e,!(Math.abs(n.volume)<10)){var i=parseInt(10*t.volume,10)-parseInt(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(Xz);var o=n.plugins.start;if(o&&o.focusHide(),fb(this).call(this,".xg-dur").innerHTML=qO.format(this.duration),fb(this).call(this,".xg-cur").innerHTML=qO.format(e),fb(this).call(this,".xg-curbar").style.width="".concat(e/this.duration*100,"%"),t)qO.removeClass(fb(this).call(this,".xg-seek-show"),"xg-back");else qO.addClass(fb(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<WN.ATTACHED)return!1;e.ended||(e.paused?e.play():e.pause())}},{key:"disableGesture",value:function(){this.config.disableGesture=!0}},{key:"enableGesture",value:function(){this.config.disableGesture=!1}},{key:"destroy",value:function(){var e=this.player;this.timer&&clearTimeout(this.timer),this.thumbnail=null,e.root.removeChild(this.xgMask),this.xgMask=null,this.touch&&this.touch.destroy(),this.touch=null,e.root.removeEventListener("touchmove",this.onRootTouchMove,!0),e.root.removeEventListener("touchend",this.onRootTouchEnd,!0),e.root.removeEventListener("touchcancel",this.onRootTouchEnd,!0);var t=this.player.controls;t&&t.center&&(t.center.removeEventListener("touchmove",this.onRootTouchMove,!0),t.center.removeEventListener("touchend",this.onRootTouchEnd,!0),t.center.removeEventListener("touchcancel",this.onRootTouchEnd,!0))}},{key:"render",value:function(){var e,t,n,i="normal"!==this.config.gradient?"gradient ".concat(this.config.gradient):"gradient";return y_(e=y_(t=y_(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}(ON);function Jz(e){var t=e.tagName;return!("INPUT"!==t&&"TEXTAREA"!==t&&!e.isContentEditable)}var eU=function(e){uA(n,e);var t=vA(n);function n(){var e,i;aA(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return cA(fA(i=t.call.apply(t,y_(e=[this]).call(e,o))),"onBodyKeyDown",(function(e){if(i.player){var t=e||window.event,n=t.keyCode,r=fA(i),o=r._keyState,a=r.player,s=i.config,l=s.disable,c=s.disableBodyTrigger,u=s.isIgnoreUserActive;l||c||!a.isUserActive&&!u||Jz(t.target)||!i.checkIsVisible()||t.metaKey||t.altKey||t.ctrlKey?o.isBodyKeyDown=!1:(nb(e)||o.isKeyDown||((t.target===document.body||i.config.isGlobalTrigger&&!Jz(t.target))&&i.checkCode(n,!0)&&(o.isBodyKeyDown=!0),document.addEventListener("keyup",i.onBodyKeyUp)),o.isBodyKeyDown&&i.handleKeyDown(t))}})),cA(fA(i),"onBodyKeyUp",(function(e){i.player&&(document.removeEventListener("keyup",i.onBodyKeyUp),i.handleKeyUp(e))})),cA(fA(i),"onKeydown",(function(e){if(i.player){var t=e||window.event,n=fA(i)._keyState;if(!nb(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)}})),cA(fA(i),"onKeyup",(function(e){i.player&&(i.player.root.removeEventListener("keyup",i.onKeyup),i.handleKeyUp(e))})),i}return lA(n,[{key:"mergekeyCodeMap",value:function(){var e,t=this,n=this.config.keyCodeMap;n&&W_(e=kT(n)).call(e,(function(e){var i;t.keyCodeMap[e]?W_(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;kT(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 W_(n=kT(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=parseFloat((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=parseFloat((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,c=nb(e)&&this.seekStep>=4?parseInt(this.seekStep/2,10):this.seekStep;s+c<=l?s+=c:s=l;var u=qO.getCurrentTimeByOffset(s,a),h={currentTime:{from:n,to:u}};this.emitUserAction(e,"seek",{props:h}),this.player.currentTime=u}},{key:"seekBack",value:function(e){var t=this.player,n=t.currentTime,i=t.offsetCurrentTime,r=t.timeSegments,o=(i>-1?i:n)-(nb(e)?parseInt(this.seekStep/2,10):this.seekStep);o<0&&(o=0);var a={currentTime:{from:n,to:o=qO.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(nb(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=kT(this.keyCodeMap),o=0;o<r.length;o++){var a=this.keyCodeMap[r[o]],s=a.action,l=a.keyCode,c=a.disable,u=a.pressAction,h=a.disablePress;if(l===e){if(!(c||n&&h)){var d=n&&u||s;"function"==typeof d?s(t,this.player,n):"string"==typeof d&&"function"==typeof this[d]&&this[d](t,this.player,n),this.emit(YM,rA({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}(kN);function tU(){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 nU=function(e){uA(n,e);var t=vA(n);function n(){return aA(this,n),t.apply(this,arguments)}return lA(n,[{key:"registerIcons",value:function(){return{loadingIcon:tU}}},{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:IN.ROOT}}}]),n}(ON),iU=[{tag:"xg-cache",className:"xgplayer-progress-cache",styleKey:"cachedColor"},{tag:"xg-played",className:"xgplayer-progress-played",styleKey:"playedColor"}],rU=function(){function e(t){aA(this,e),this.fragments=t.fragments||[],0===this.fragments.length&&this.fragments.push({percent:1}),this._callBack=t.actionCallback,this.fragConfig={fragFocusClass:t.fragFocusClass||"inner-focus-point",fragAutoFocus:!!t.fragAutoFocus,fragClass:t.fragClass||""},this.style=t.style||{playedColor:"",cachedColor:"",progressColor:""},this.duration=0,this.cachedIndex=0,this.playedIndex=0,this.focusIndex=-1}return lA(e,[{key:"updateDuration",value:function(e){var t=this;this.duration=e;var n=0,i=this.fragments;this.fragments=W_(i).call(i,(function(e){return e.start=parseInt(n,10),e.end=parseInt(n+e.percent*t.duration,10),e.duration=parseInt(e.percent*t.duration,10),n+=e.percent*t.duration,e}))}},{key:"updateProgress",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"played",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{newIndex:0,curIndex:0,millisecond:0},n=this.progressList,i=this.fragments;if(!(n.length<1)){var r=t.newIndex,o=t.curIndex,a=t.millisecond;r!==o&&W_(n).call(n,(function(t,n){n<r?t[e].style.width="100%":n>r&&(t[e].style.width=0)}));var s=i[r],l=0===a?0:(a-s.start)/s.duration;n[r][e].style.width=l<0?0:"".concat(100*l,"%")}}},{key:"updateFocus",value:function(e){if(this.fragConfig.fragAutoFocus&&!(this.fragments.length<2))if(e){var t=JS(this).call(this,1e3*e.currentTime,this.focusIndex);if(t>=0&&t!==this.focusIndex){this.focusIndex>-1&&this.unHightLight(this.focusIndex),this.setHightLight(t);var n={index:t,preIndex:this.focusIndex,fragment:this.fragments[this.focusIndex]};this.focusIndex=t,this._callBack&&this._callBack(n)}}else if(this.focusIndex>-1){this.unHightLight(this.focusIndex);var i={index:-1,preIndex:this.focusIndex,fragment:null};this._callBack&&this._callBack(i),this.focusIndex=-1}}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{cached:0,played:0},t=arguments.length>1?arguments[1]:void 0;if(!this.duration||parseInt(1e3*t,10)!==this.duration){if(!t&&0!==t)return;this.updateDuration(parseInt(1e3*t,10))}var n=this.playedIndex,i=this.cachedIndex;if("Undefined"!==qO.typeOf(e.played)){var r=JS(this).call(this,1e3*e.played,n);if(r<0)return;this.updateProgress("played",{newIndex:r,curIndex:n,millisecond:parseInt(1e3*e.played,10)}),this.playedIndex=r}if("Undefined"!==qO.typeOf(e.cached)){var o=JS(this).call(this,1e3*e.cached,i);if(o<0)return;this.updateProgress("cached",{newIndex:o,curIndex:i,millisecond:parseInt(1e3*e.cached,10)}),this.cachedIndex=o}}},{key:"findIndex",value:function(e,t){var n=this.fragments;if(!n||0===n.length)return-1;if(1===n.length)return 0;if(t>-1&&t<n.length&&e>n[t].start&&e<n[t].end)return t;if(e>n[n.length-1].start)return n.length-1;for(var i=0;i<n.length;i++)if(e>n[i].start&&e<=n[i].end){t=i;break}return t}},{key:"findHightLight",value:function(){for(var e=this.root.children,t=0;t<e.length;t++)if(qO.hasClass(e[t],this.fragConfig.fragFocusClass))return{dom:e[t],pos:e[t].getBoundingClientRect()}}},{key:"findFragment",value:function(e){var t=this.root.children;return e<0||e>=t.length?null:{dom:t[e],pos:t[e].getBoundingClientRect()}}},{key:"unHightLight",value:function(){for(var e=this.root.children,t=0;t<e.length;t++)qO.removeClass(e[t],this.fragConfig.fragFocusClass)}},{key:"setHightLight",value:function(e){var t=this.root.children;if(e<t.length)return qO.addClass(t[e],this.fragConfig.fragFocusClass),{dom:t[e],pos:t[e].getBoundingClientRect()}}},{key:"destroy",value:function(){this.progressList=null,this.fragments=null,this.root.innerHTML=""}},{key:"reset",value:function(e){var t=this;if(kT(this.fragConfig).forEach((function(n){void 0!==e[n]&&(t.fragConfig[n]=e[n])})),e.fragments){if(this.fragments=0===e.fragments.length?[{percent:1}]:e.fragments,this.updateDuration(this.duration),this.playedIndex=0,this.cachedIndex=0,this.root)for(var n=this.root.children;n.length>0;)this.root.removeChild(n[0]);this.render()}}},{key:"render",value:function(){var e=this,t=this.style.progressColor;if(this.root||(this.root=qO.createDom("xg-inners","",{},"progress-list")),this.fragments){var n,i=this.fragConfig,r=i.fragClass,o=i.fragFocusClass;this.progressList=W_(n=this.fragments).call(n,(function(n){var i,a,s=qO.createDom("xg-inner","",{style:t?y_(i="background:".concat(t,"; flex: ")).call(i,n.percent):"flex: ".concat(n.percent)},y_(a="".concat(n.isFocus?o:""," xgplayer-progress-inner ")).call(a,r));return e.root.appendChild(s),iU.forEach((function(t){s.appendChild(qO.createDom(t.tag,"",{style:t.styleKey?"background: ".concat(e.style[t.styleKey],"; width:0;"):"width:0;"},t.className))})),{cached:s.children[0],played:s.children[1]}}))}return this.root}}]),e}(),oU={POINT:"inner-focus-point",HIGHLIGHT:"inner-focus-highlight"},aU=function(e){uA(n,e);var t=vA(n);function n(e){var i;return aA(this,n),cA(fA(i=t.call(this,e)),"onMoveOnly",(function(e,t){var n=fA(i),r=n.pos,o=n.config,a=n.player,s=t;if(e){qO.event(e);var l=qO.getEventPos(e,a.zoom),c=90===a.rotateDeg?l.clientY:l.clientX;if(r.moving&&Math.abs(r.x-c)<o.miniMoveStep)return;r.moving=!0,r.x=c,s=i.computeTime(e,c)}i.triggerCallbacks("dragmove",s,e),i._updateInnerFocus(s)})),cA(fA(i),"onBodyClick",(function(e){i.pos.isLocked&&(i.pos.isLocked=!1,e.preventDefault(),e.stopPropagation())})),cA(fA(i),"_mouseDownHandler",(function(e,t){i._state.time=t.currentTime,i.updateWidth(t.currentTime,t.seekTime,t.percent,0),i._updateInnerFocus(t)})),cA(fA(i),"_mouseUpHandler",(function(e,t){fA(i).pos.moving&&i.updateWidth(t.currentTime,t.seekTime,t.percent,2)})),cA(fA(i),"_mouseMoveHandler",(function(e,t){var n=fA(i),r=n._state,o=n.pos,a=n.config,s=n.player;r.time<t.currentTime?t.forward=!0:t.forward=!1,r.time=t.currentTime,o.isDown&&!o.moving&&(o.moving=!0,a.isPauseMoving&&s.pause(),i.triggerCallbacks("dragstart",t,e),i.emitUserAction("drag","dragstart",t)),i.updateWidth(t.currentTime,t.seekTime,t.percent,1),i.triggerCallbacks("dragmove",t,e),i._updateInnerFocus(t)})),cA(fA(i),"onMouseDown",(function(e){var t=fA(i),n=t._state,r=t.player,o=t.pos,a=t.config,s=t.playerConfig,l=qO.getEventPos(e,r.zoom),c=90===r.rotateDeg?l.clientY:l.clientX;if(!(r.isMini||a.closeMoveSeek||!s.allowSeekAfterEnded&&r.ended)){if(r.duration||r.isPlaying){e.stopPropagation(),i.focus(),qO.checkIsFunction(s.disableSwipeHandler)&&s.disableSwipeHandler(),qO.checkIsFunction(a.onMoveStart)&&a.onMoveStart(),qO.event(e),o.x=c,o.isDown=!0,o.moving=!1,n.prePlayTime=r.currentTime,r.focus({autoHide:!1}),i.isProgressMoving=!0,qO.addClass(i.progressBtn,"active");var u=i.computeTime(e,c);return u.prePlayTime=n.prePlayTime,i._mouseDownHandlerHook(e,u),"touchstart"===e.type?(i.root.addEventListener("touchmove",i.onMouseMove),i.root.addEventListener("touchend",i.onMouseUp),i.root.addEventListener("touchcancel",i.onMouseUp)):(i.unbind("mousemove",i.onMoveOnly),document.addEventListener("mousemove",i.onMouseMove,!1),document.addEventListener("mouseup",i.onMouseUp,!1)),!0}r.play()}})),cA(fA(i),"onMouseUp",(function(e){var t=fA(i),n=t.player,r=t.config,o=t.pos,a=t.playerConfig,s=t._state;e.stopPropagation(),e.preventDefault(),qO.checkIsFunction(a.enableSwipeHandler)&&a.enableSwipeHandler(),qO.checkIsFunction(r.onMoveEnd)&&r.onMoveEnd(),qO.event(e),qO.removeClass(i.progressBtn,"active");var l=i.computeTime(e,o.x);l.prePlayTime=s.prePlayTime,o.moving?(i.triggerCallbacks("dragend",l,e),i.emitUserAction("drag","dragend",l)):(i.triggerCallbacks("click",l,e),i.emitUserAction("click","click",l)),i._mouseUpHandlerHook(e,l),o.moving=!1,o.isDown=!1,o.x=0,o.y=0,o.isLocked=!0,s.prePlayTime=0,s.time=0;var c=e.type;"touchend"===c||"touchcancel"===c?(i.root.removeEventListener("touchmove",i.onMouseMove),i.root.removeEventListener("touchend",i.onMouseUp),i.root.removeEventListener("touchcancel",i.onMouseUp),i.blur()):(document.removeEventListener("mousemove",i.onMouseMove,!1),document.removeEventListener("mouseup",i.onMouseUp,!1),o.isEnter?"mobile"!==a.isMobileSimulateMode&&i.bind("mousemove",i.onMoveOnly):i.onMouseLeave(e)),qO.setTimeout(fA(i),(function(){i.resetSeekState()}),1),n.focus()})),cA(fA(i),"onMouseMove",(function(e){var t=fA(i),n=t._state,r=t.pos,o=t.player,a=t.config;qO.checkTouchSupport()&&e.preventDefault(),qO.event(e);var s=qO.getEventPos(e,o.zoom),l=90===o.rotateDeg?s.clientY:s.clientX,c=Math.abs(r.x-l);if(!(r.moving&&c<a.miniMoveStep||!r.moving&&c<a.miniStartStep)){r.x=l;var u=i.computeTime(e,l);u.prePlayTime=n.prePlayTime,i._mouseMoveHandlerHook(e,u)}})),cA(fA(i),"onMouseOut",(function(e){i.triggerCallbacks("mouseout",null,e)})),cA(fA(i),"onMouseOver",(function(e){i.triggerCallbacks("mouseover",null,e)})),cA(fA(i),"onMouseEnter",(function(e){var t=fA(i),n=t.player,r=t.pos;if(!(r.isDown||r.isEnter||n.isMini||!n.config.allowSeekAfterEnded&&n.ended)){r.isEnter=!0,i.bind("mousemove",i.onMoveOnly),i.bind("mouseleave",i.onMouseLeave),qO.event(e);var o=qO.getEventPos(e,n.zoom),a=90===n.rotateDeg?o.clientY:o.clientX,s=i.computeTime(e,a);i.triggerCallbacks("mouseenter",s,e),i.focus()}})),cA(fA(i),"onMouseLeave",(function(e){i.triggerCallbacks("mouseleave",null,e),i.unlock(),i._updateInnerFocus(null)})),cA(fA(i),"onVideoResize",(function(){var e=i.pos,t=e.x,n=e.isDown;if(e.isEnter&&!n){var r=i.computeTime(null,t);i.onMoveOnly(null,r)}})),i.useable=!1,i.isProgressMoving=!1,i.__dragCallBacks=[],i._state={now:-1,direc:0,time:0,prePlayTime:-1},i._disableBlur=!1,"boolean"==typeof i.config.isDragingSeek&&(console.warn("[XGPLAYER] 'isDragingSeek' is deprecated, please use 'isDraggingSeek' instead"),i.config.isDraggingSeek=i.config.isDragingSeek),i}return lA(n,[{key:"offsetDuration",get:function(){return this.playerConfig.customDuration||this.player.offsetDuration||this.player.duration}},{key:"duration",get:function(){return this.playerConfig.customDuration||this.player.duration}},{key:"timeOffset",get:function(){return this.playerConfig.timeOffset||0}},{key:"currentTime",get:function(){var e=this.player,t=e.offsetCurrentTime,n=e.currentTime;return t>=0?t:n+this.timeOffset}},{key:"changeState",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.useable=e}},{key:"show",value:function(e){this.root&&(this.root.style.display="flex")}},{key:"_initInner",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t&&0!==t.length||(t=[{percent:1}]);var i,r=rA(rA({fragments:t},n),{},{actionCallback:function(t){e.emitUserAction("fragment_focus","fragment_focus",t)}});this.innerList?this.innerList.reset(r):(this.innerList=new rU(r),this.outer.insertBefore(this.innerList.render(),this.outer.children[0]),W_(i=["findHightLight","unHightLight","setHightLight","findFragment"]).call(i,(function(t){e[t]=e.innerList[t].bind(e.innerList)})))}},{key:"_updateInnerFocus",value:function(e){this.innerList&&this.innerList.updateFocus(e)}},{key:"afterCreate",value:function(){if(!this.config.disable&&!this.playerConfig.isLive){this.pos={x:0,y:0,moving:!1,isDown:!1,isEnter:!1,isLocked:!1},this.outer=fb(this).call(this,"xg-outer");var e=this.config,t=e.fragFocusClass,n=e.fragAutoFocus,i=e.fragClass;this._initInner(this.config.fragments,{fragFocusClass:t,fragAutoFocus:n,fragClass:i,style:this.playerConfig.commonStyle||{}}),"mobile"===eM.device&&(this.config.isDraggingSeek=!1,this.isMobile=!0),this.progressBtn=fb(this).call(this,".xgplayer-progress-btn"),this.listenEvents(),this.bindDomEvents(),this.initCustomStyle()}}},{key:"listenEvents",value:function(){var e=this;this.on(vM,(function(){e.onMouseLeave()})),this.on(dM,(function(){e.onTimeupdate()})),this.on(hM,(function(){e.onTimeupdate(),e.onCacheUpdate()})),this.on(_M,(function(){e.onCacheUpdate()})),this.on(sM,(function(){e.onCacheUpdate(!0),e.onTimeupdate(!0),e._state.now=0})),this.on(kM,(function(){e.onReset()})),this.on(jM,(function(){e.onVideoResize()}))}},{key:"setConfig",value:function(e){var t=this,n=null;kT(e).forEach((function(i){t.config[i]=e[i],"fragments"===i&&(n=e[i])})),n&&this._initInner(n,e)}},{key:"initCustomStyle",value:function(){var e=(this.playerConfig||{}).commonStyle.sliderBtnStyle,t=this.progressBtn;if(e)if("string"==typeof e)t.style.boxShadow=e;else if("object"===oA(e)){var n;W_(n=kT(e)).call(n,(function(n){t.style[n]=e[n]}))}}},{key:"triggerCallbacks",value:function(e,t,n){var i;this.__dragCallBacks.length>0&&W_(i=this.__dragCallBacks).call(i,(function(i){if(i&&i.handler&&i.type===e)try{i.handler(t,n)}catch(tSe){console.error("[XGPLAYER][triggerCallbacks] ".concat(i," error"),tSe)}}))}},{key:"addCallBack",value:function(e,t){t&&"function"==typeof t&&this.__dragCallBacks.push({type:e,handler:t})}},{key:"removeCallBack",value:function(e,t){var n=this.__dragCallBacks,i=-1;W_(n).call(n,(function(n,r){n&&n.type===e&&n.handler===t&&(i=r)})),i>-1&&bT(n).call(n,i,1)}},{key:"unlock",value:function(){var e=this.player,t=this.pos;t.isEnter=!1,t.isLocked=!1,e.isMini||(this.unbind("mousemove",this.onMoveOnly),t.isDown?this.unbind("mouseleave",this.onMouseLeave):this.blur())}},{key:"bindDomEvents",value:function(){var e=this.player.config;this._mouseDownHandlerHook=this.hook("dragstart",this._mouseDownHandler),this._mouseUpHandlerHook=this.hook("dragend",this._mouseUpHandler),this._mouseMoveHandlerHook=this.hook("drag",this._mouseMoveHandler),"touch"!==this.domEventType&&"compatible"!==this.domEventType||this.root.addEventListener("touchstart",this.onMouseDown),"mouse"!==this.domEventType&&"compatible"!==this.domEventType||(this.bind("mousedown",this.onMouseDown),"mobile"!==e.isMobileSimulateMode&&this.bind("mouseenter",this.onMouseEnter),this.bind("mouseover",this.onMouseOver),this.bind("mouseout",this.onMouseOut),this.player.root.addEventListener("click",this.onBodyClick,!0))}},{key:"focus",value:function(){this.player.controls.pauseAutoHide(),qO.addClass(this.root,"active")}},{key:"blur",value:function(){this._disableBlur||(this.player.controls.recoverAutoHide(),qO.removeClass(this.root,"active"))}},{key:"disableBlur",value:function(){this._disableBlur=!0}},{key:"enableBlur",value:function(){this._disableBlur=!1}},{key:"updateWidth",value:function(e,t,n,i){var r=this.config,o=this.player;if(!r.isCloseClickSeek||0!==i){var a=t=t>=o.duration?o.duration-r.endedDiff:Number(t).toFixed(1);this.updatePercent(n),this.updateTime(e),(1!==i||r.isDraggingSeek&&"audio"!==o.config.mediaType)&&(this._state.now=a,this._state.direc=a>o.currentTime?0:1,o.seek(a))}}},{key:"computeTime",value:function(e,t){var n,i,r=this.player,o=this.root.getBoundingClientRect(),a=o.width,s=o.height,l=o.top,c=o.left,u=t;90===r.rotateDeg?(n=s,i=l):(n=a,i=c);var h=u-i,d=(h=h>n?n:h<0?0:h)/n;d=d<0?0:d>1?1:d;var f=parseInt(d*this.offsetDuration*1e3,10)/1e3;return{percent:d,currentTime:f,seekTime:qO.getCurrentTimeByOffset(f,r.timeSegments),offset:h,width:n,left:i,e:e}}},{key:"updateTime",value:function(e){var t=this.player,n=this.duration;e>n?e=n:e<0&&(e=0);var i=t.plugins.time;i&&i.updateTime(e)}},{key:"resetSeekState",value:function(){this.isProgressMoving=!1;var e=this.player.plugins.time;e&&e.resetActive()}},{key:"updatePercent",value:function(e,t){if(this.isProgressMoving=!0,!this.config.disable){e=e>1?1:e<0?0:e,this.progressBtn.style.left="".concat(100*e,"%"),this.innerList.update({played:e*this.offsetDuration},this.offsetDuration);var n=this.player.plugins.miniprogress;n&&n.update({played:e*this.offsetDuration},this.offsetDuration)}}},{key:"onTimeupdate",value:function(e){var t=this.player,n=this._state,i=this.offsetDuration;if(!(t.isSeeking&&t.media.seeking||this.isProgressMoving)&&t.hasStart){if(n.now>-1){var r=parseInt(1e3*n.now,10)-parseInt(1e3*t.currentTime,10);if(0===n.direc&&r>300||1===n.direc&&r>-300)return void(n.now=-1);n.now=-1}var o=this.currentTime;o=qO.adjustTimeByDuration(o,i,e),this.innerList.update({played:o},i),this.progressBtn.style.left="".concat(o/i*100,"%")}}},{key:"onCacheUpdate",value:function(e){var t=this.player,n=this.duration;if(t){var i=t.bufferedPoint.end;i=qO.adjustTimeByDuration(i,n,e),this.innerList.update({cached:i},n)}}},{key:"onReset",value:function(){this.innerList.update({played:0,cached:0},0),this.progressBtn.style.left="0%"}},{key:"destroy",value:function(){var e=this.player;this.thumbnailPlugin=null,this.innerList.destroy(),this.innerList=null;var t=this.domEventType;"touch"!==t&&"compatible"!==t||(this.root.removeEventListener("touchstart",this.onMouseDown),this.root.removeEventListener("touchmove",this.onMouseMove),this.root.removeEventListener("touchend",this.onMouseUp),this.root.removeEventListener("touchcancel",this.onMouseUp)),"mouse"!==t&&"compatible"!==t||(this.unbind("mousedown",this.onMouseDown),this.unbind("mouseenter",this.onMouseEnter),this.unbind("mousemove",this.onMoveOnly),this.unbind("mouseleave",this.onMouseLeave),document.removeEventListener("mousemove",this.onMouseMove,!1),document.removeEventListener("mouseup",this.onMouseUp,!1),e.root.removeEventListener("click",this.onBodyClick,!0))}},{key:"render",value:function(){if(!this.config.disable&&!this.playerConfig.isLive){var e=this.player.controls?this.player.controls.config.mode:"";return'\n <xg-progress class="xgplayer-progress '.concat("bottom"===e?"xgplayer-progress-bottom":"",'">\n <xg-outer class="xgplayer-progress-outer">\n <xg-progress-btn class="xgplayer-progress-btn"></xg-progress-btn>\n </xg-outer>\n </xg-progress>\n ')}}}],[{key:"pluginName",get:function(){return"progress"}},{key:"defaultConfig",get:function(){return{position:IN.CONTROLS_CENTER,index:0,disable:!1,isDraggingSeek:!0,closeMoveSeek:!1,isPauseMoving:!1,isCloseClickSeek:!1,fragments:[{percent:1}],fragFocusClass:oU.POINT,fragClass:"",fragAutoFocus:!1,miniMoveStep:5,miniStartStep:2,onMoveStart:function(){},onMoveEnd:function(){},endedDiff:.2}}},{key:"FRAGMENT_FOCUS_CLASS",get:function(){return oU}}]),n}(ON),sU=function(e){uA(n,e);var t=vA(n);function n(){var e,i;aA(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return cA(fA(i=t.call.apply(t,y_(e=[this]).call(e,o))),"_onMouseenter",(function(e){i.emit("icon_mouseenter",{pluginName:i.pluginName})})),cA(fA(i),"_onMouseLeave",(function(e){i.emit("icon_mouseleave",{pluginName:i.pluginName})})),i}return lA(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}(ON),lU=function(e){uA(n,e);var t=vA(n);function n(){var e,i;aA(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return cA(fA(i=t.call.apply(t,y_(e=[this]).call(e,o))),"btnClick",(function(e){e.preventDefault(),e.stopPropagation();var t=fA(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 lA(n,[{key:"afterCreate",value:function(){gA(hA(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([oM,lM,cM,kM],(function(){e.animate(t.paused)}))}},{key:"registerIcons",value:function(){return{play:{icon:pz,class:"xg-icon-play"},pause:{icon:vz,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=fb(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(){gA(hA(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(bz(this,"PLAY_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"play"}},{key:"defaultConfig",get:function(){return{position:IN.CONTROLS_LEFT,index:0,disable:!1}}}]),n}(sU);function cU(){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 uU=function(e){uA(n,e);var t=vA(n);function n(){return aA(this,n),t.apply(this,arguments)}return lA(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:cU,class:"xg-fullscreen-back"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(this.root,e.screenBack)}},{key:"show",value:function(){qO.addClass(this.root,"show")}},{key:"hide",value:function(){qO.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:IN.ROOT_TOP,index:0}}}]),n}(ON);function hU(){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 dU(){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 fU=function(e){uA(n,e);var t=vA(n);function n(){var e,i;aA(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return cA(fA(i=t.call.apply(t,y_(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 lA(n,[{key:"afterCreate",value:function(){var e=this;gA(hA(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=qO.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(NM,(function(t){var n=fb(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:uU,options:{config:{onClick:function(t){e.handleFullscreen(t)}}}})),"mobile"===eM.device&&window.addEventListener("orientationchange",this._onOrientationChange)}}},{key:"registerIcons",value:function(){return{fullscreen:{icon:hU,class:"xg-get-fullscreen"},exitFullscreen:{icon:dU,class:"xg-exit-fullscreen"}}}},{key:"destroy",value:function(){gA(hA(n.prototype),"destroy",this).call(this),this.unbind(".xgplayer-icon","mobile"===eM.device?"touchend":"click",this.handleFullscreen),"mobile"===eM.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&&(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(bz(this,"FULLSCREEN_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}},{key:"lockScreen",value:function(e){try{screen.orientation.lock(e).catch((function(e){}))}catch(cK){}}},{key:"unlockScreen",value:function(){try{screen.orientation.unlock().catch((function(e){}))}catch(cK){}}}],[{key:"pluginName",get:function(){return"fullscreen"}},{key:"defaultConfig",get:function(){return{position:IN.CONTROLS_RIGHT,index:0,useCssFullscreen:!1,rotateFullscreen:!1,useScreenOrientation:!1,lockOrientationType:"landscape",switchCallback:null,target:null,disable:!1,needBackIcon:!1}}}]),n}(sU),pU=function(e){uA(n,e);var t=vA(n);function n(e){var i;return aA(this,n),(i=t.call(this,e)).isActiving=!1,i}return lA(n,[{key:"duration",get:function(){var e=this.player,t=e.offsetDuration,n=e.duration;return this.playerConfig.customDuration||t||n}},{key:"currentTime",get:function(){var e=this.player,t=e.offsetCurrentTime,n=e.currentTime;return t>=0?t:n}},{key:"timeOffset",get:function(){return this.playerConfig.timeOffset||0}},{key:"afterCreate",value:function(){var e=this.player.controls.config.mode;this.mode="flex"===e?"flex":"normal",this.config.disable||("flex"===this.mode&&(this.createCenterTime(),this.root.style.display="none"),this.durationDom=fb(this).call(this,".time-duration"),this.timeDom=fb(this).call(this,".time-current"),this.listenEvents())}},{key:"listenEvents",value:function(){var e=this;this.on([vM,hM,dM],(function(t){"durationchange"===t.eventName&&(e.isActiving=!1),e.onTimeUpdate()})),this.on(sM,(function(){e.onTimeUpdate(!0)})),this.on(kM,(function(){e.onReset()}))}},{key:"show",value:function(e){if("flex"===this.mode)return this.centerCurDom&&(this.centerCurDom.style.display="block"),void(this.centerDurDom&&(this.centerDurDom.style.display="block"));this.root.style.display="block"}},{key:"hide",value:function(){if("flex"===this.mode)return this.centerCurDom&&(this.centerCurDom.style.display="none"),void(this.centerDurDom&&(this.centerDurDom.style.display="none"));this.root.style.display="none"}},{key:"onTimeUpdate",value:function(e){var t=this.player,n=this.config,i=this.duration;if(!n.disable&&!this.isActiving&&t.hasStart){var r=this.currentTime+this.timeOffset;r=qO.adjustTimeByDuration(r,i,e),"flex"===this.mode?(this.centerCurDom.innerHTML=this.minWidthTime(qO.format(r)),i!==1/0&&i>0&&(this.centerDurDom.innerHTML=qO.format(i))):(this.timeDom.innerHTML=this.minWidthTime(qO.format(r)),i!==1/0&&i>0&&(this.durationDom.innerHTML=qO.format(i)))}}},{key:"onReset",value:function(){"flex"===this.mode?(this.centerCurDom.innerHTML=this.minWidthTime(qO.format(0)),this.centerDurDom.innerHTML=qO.format(0)):(this.timeDom.innerHTML=this.minWidthTime(qO.format(0)),this.durationDom.innerHTML=qO.format(0))}},{key:"createCenterTime",value:function(){var e=this.player;if(e.controls&&e.controls.center){var t=e.controls.center;this.centerCurDom=qO.createDom("xg-icon","00:00",{},"xgplayer-time xg-time-left"),this.centerDurDom=qO.createDom("xg-icon","00:00",{},"xgplayer-time xg-time-right"),t.children.length>0?t.insertBefore(this.centerCurDom,t.children[0]):t.appendChild(this.centerCurDom),t.appendChild(this.centerDurDom)}}},{key:"afterPlayerInit",value:function(){var e=this.config;this.duration===1/0||this.playerConfig.isLive?(qO.hide(this.durationDom),qO.hide(this.timeDom),qO.hide(fb(this).call(this,".time-separator")),qO.show(fb(this).call(this,".time-live-tag"))):qO.hide(fb(this).call(this,".time-live-tag"));e.hide?this.hide():this.show()}},{key:"changeLiveState",value:function(e){e?(qO.hide(this.durationDom),qO.hide(this.timeDom),qO.hide(fb(this).call(this,".time-separator")),qO.show(fb(this).call(this,".time-live-tag"))):(qO.hide(fb(this).call(this,".time-live-tag")),qO.show(fb(this).call(this,".time-separator")),qO.show(this.durationDom),qO.show(this.timeDom))}},{key:"updateTime",value:function(e){this.isActiving=!0,!e&&0!==e||e>this.duration||("flex"!==this.mode?this.timeDom.innerHTML=this.minWidthTime(qO.format(e)):this.centerCurDom.innerHTML=this.minWidthTime(qO.format(e)))}},{key:"minWidthTime",value:function(e){var t;return W_(t=e.split(":")).call(t,(function(e){return'<span class="time-min-width">'.concat(e,"</span>")})).join(":")}},{key:"resetActive",value:function(){var e=this,t=this.player,n=function(){e.isActiving=!1};this.off(hM,n),t.isSeeking&&t.media.seeking?this.once(hM,n):this.isActiving=!1}},{key:"destroy",value:function(){var e=this.player.controls.center;this.centerCurDom&&e.removeChild(this.centerCurDom),this.centerCurDom=null,this.centerDurDom&&e.removeChild(this.centerDurDom),this.centerDurDom=null}},{key:"render",value:function(){if(!this.config.disable)return'<xg-icon class="xgplayer-time">\n <span class="time-current">00:00</span>\n <span class="time-separator">/</span>\n <span class="time-duration">00:00</span>\n <span class="time-live-tag">'.concat(this.i18n.LIVE_TIP,"</span>\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"time"}},{key:"defaultConfig",get:function(){return{position:IN.CONTROLS_LEFT,index:2,disable:!1}}}]),n}(ON),vU=function(e){uA(n,e);var t=vA(n);function n(){var e,i;aA(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return cA(fA(i=t.call.apply(t,y_(e=[this]).call(e,o))),"_onDurationChange",(function(){i.updateSegments();var e=i.player,t=e.currentTime,n=e.timeSegments;if(i._checkIfEnabled(n)){var r=qO.getIndexByTime(t,n),o=qO.getOffsetCurrentTime(t,n,r);i.player.offsetCurrentTime=o,i.changeIndex(r,n)}})),cA(fA(i),"_onLoadedData",(function(){var e=i.player.timeSegments;if(i._checkIfEnabled(e)){var t=qO.getOffsetCurrentTime(0,e);i.player.offsetCurrentTime=t,i.changeIndex(0,e),i.curPos.start>0&&(i.player.currentTime=i.curPos.start)}})),cA(fA(i),"_onTimeupdate",(function(){var e=i.player,t=e.currentTime,n=e.timeSegments;if(i._checkIfEnabled(n)){var r=n.length;i.lastCurrentTime=t;var o=qO.getIndexByTime(t,n);o!==i.curIndex&&i.changeIndex(o,n);var a=qO.getOffsetCurrentTime(t,n,o);if(i.player.offsetCurrentTime=a,i.curPos){var s=i.curPos,l=s.start,c=s.end;t<l?i.player.currentTime=l:t>c&&o>=r-1&&i.player.pause()}}})),cA(fA(i),"_onSeeking",(function(){var e=i.player,t=e.currentTime,n=e.timeSegments;if(i._checkIfEnabled(n))if(t<n[0].start)i.player.currentTime=n[0].start;else if(t>n[n.length-1].end)i.player.currentTime=n[n.length-1].end;else{var r=qO.getIndexByTime(t,n);if(r>=0){var o=i.getSeekTime(t,i.lastCurrentTime,r,n);o>=0&&(i.player.currentTime=o)}}})),cA(fA(i),"_onPlay",(function(){var e=i.player,t=e.currentTime,n=e.timeSegments;i._checkIfEnabled(n)&&t>=n[n.length-1].end&&(i.player.currentTime=n[0].start)})),i}return lA(n,[{key:"afterCreate",value:function(){this.curIndex=-1,this.curPos=null,this.lastCurrentTime=0,this.updateSegments(),this.on(vM,this._onDurationChange),this.on(yM,this._onLoadedData),this.on(dM,this._onTimeupdate),this.on(uM,this._onSeeking),this.on(oM,this._onPlay)}},{key:"setConfig",value:function(e){var t=this;if(e){var n=kT(e);n.length<1||(n.forEach((function(n){t.config[n]=e[n]})),this.updateSegments())}}},{key:"updateSegments",value:function(){var e=this.config,t=e.disable,n=e.segments,i=this.player;if(t||!n||0===n.length)i.timeSegments=[],i.offsetDuration=0,i.offsetCurrentTime=-1;else{var r=this.formatTimeSegments(n,i.duration);i.timeSegments=r,i.offsetDuration=r.length>0?r[r.length-1].duration:0}}},{key:"formatTimeSegments",value:function(e,t){var n=[];return e?(FO(e).call(e,(function(e,t){return e.start-t.start})),e.forEach((function(e,i){var r={};if(r.start=e.start<0?0:e.start,r.end=t>0&&e.end>t?t:e.end,!(t>0&&r.start>t)){n.push(r);var o=r.end-r.start;if(0===i)r.offset=e.start,r.cTime=0,r.segDuration=o,r.duration=o;else{var a=n[i-1];r.offset=a.offset+(r.start-a.end),r.cTime=a.duration+a.cTime,r.segDuration=o,r.duration=a.duration+o}}})),n):[]}},{key:"getSeekTime",value:function(e,t,n,i){var r=-1,o=i[n],a=o.start,s=o.end;if(e>=a&&e<=s)return r;var l=e-t;if(l<0&&e<a){var c=t>a?t-a:0;return r=n-1>=0?i[n-1].end+l+c:0}return-1}},{key:"_checkIfEnabled",value:function(e){return!(!e||e.length<1)}},{key:"changeIndex",value:function(e,t){this.curIndex=e,e>=0&&t.length>0?this.curPos=t[e]:this.curPos=null}}],[{key:"pluginName",get:function(){return"TimeSegmentsControls"}},{key:"defaultConfig",get:function(){return{disable:!0,segments:[]}}}]),n}(kN);function gU(){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 yU(){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 mU(){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 _U=function(e){uA(n,e);var t=vA(n);function n(){var e,i;aA(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return cA(fA(i=t.call.apply(t,y_(e=[this]).call(e,o))),"onBarMousedown",(function(e){var t=fA(i).player,n=fb(i).call(i,".xgplayer-bar");qO.event(e);var r=n.getBoundingClientRect(),o=qO.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})),cA(fA(i),"onBarMouseMove",(function(e){var t=fA(i)._d;if(t.isStart){var n=fA(i),r=n.pos,o=n.player;e.preventDefault(),e.stopPropagation(),qO.event(e);var a=qO.getEventPos(e,o.zoom);t.isMoving=!0;var s=r.h-a.clientY+r.clientY;s>r.barH||i.updateVolumePos(s,e)}})),cA(fA(i),"onBarMouseUp",(function(e){qO.event(e),document.removeEventListener("mouseup",i.onBarMouseUp);var t=fA(i)._d;t.isStart=!1,t.isMoving=!1})),cA(fA(i),"onMouseenter",(function(e){i._d.isActive=!0,i.focus(),i.emit("icon_mouseenter",{pluginName:i.pluginName})})),cA(fA(i),"onMouseleave",(function(e){i._d.isActive=!1,i.unFocus(100,!1,e),i.emit("icon_mouseleave",{pluginName:i.pluginName})})),cA(fA(i),"onVolumeChange",(function(e){if(i.player){var t=i.player,n=t.muted,r=t.volume;i._d.isMoving||(fb(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 lA(n,[{key:"registerIcons",value:function(){return{volumeSmall:{icon:yU,class:"xg-volume-small"},volumeLarge:{icon:gU,class:"xg-volume"},volumeMuted:{icon:mU,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)fb(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"!==eM.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(gM,this.onVolumeChange),this.once(yM,this.onVolumeChange),"Number"!==qO.typeOf(i)&&(this.player.volume=this.config.default),this.onVolumeChange()}}},{key:"updateVolumePos",value:function(e,t){var n=this.player,i=fb(this).call(this,".xgplayer-drag"),r=fb(this).call(this,".xgplayer-bar");if(r&&i){var o=parseInt(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=fb(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&&(qO.clearTimeout(this,this._timerId),this._timerId=null),qO.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&&(qO.clearTimeout(this,this._timerId),this._timerId=null),this._timerId=qO.setTimeout(this,(function(){r.isActive||(n?o.blur():o.focus(),qO.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&&(qO.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"===eM.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 y_(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:IN.CONTROLS_RIGHT,index:1,disable:!1,showValueLabel:!1,default:.6,miniVolume:.2}}}]),n}(ON);function bU(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="-4 -6 40 40" fill="none">\n <g>\n <path transform="scale(1.5 1.5)" d="M11.6665 9.16663H4.1665C2.78579 9.16663 1.6665 10.2859 1.6665 11.6666V15.8333C1.6665 17.214 2.78579 18.3333 4.1665 18.3333H11.6665C13.0472 18.3333 14.1665 17.214 14.1665 15.8333V11.6666C14.1665 10.2859 13.0472 9.16663 11.6665 9.16663Z" fill="white"/>\n <path transform="scale(1.5 1.5)" fill-rule="evenodd" clip-rule="evenodd" d="M3.88148 4.06298C3.75371 4.21005 3.67667 4.40231 3.67749 4.61242C3.67847 4.87253 3.79852 5.10435 3.98581 5.25646L6.99111 8.05895C7.32771 8.37283 7.85502 8.35443 8.16891 8.01782C8.48279 7.68122 8.46437 7.15391 8.12778 6.84003L6.62061 5.43457L9.8198 5.4224C9.82848 5.42239 9.8372 5.42221 9.84591 5.4219C10.9714 5.38233 12.0885 5.6285 13.0931 6.13744C14.0976 6.64635 14.957 7.40148 15.5908 8.33234C16.2246 9.2632 16.6122 10.3394 16.7177 11.4606C16.823 12.5819 16.6427 13.7115 16.1934 14.7442C16.0098 15.1661 16.203 15.6571 16.6251 15.8408C17.0471 16.0243 17.5381 15.8311 17.7216 15.4091C18.2833 14.1183 18.5087 12.7063 18.3771 11.3047C18.2453 9.90318 17.7607 8.55792 16.9684 7.39433C16.1761 6.23073 15.1021 5.28683 13.8463 4.65065C12.5946 4.01651 11.203 3.70872 9.80072 3.75583L6.43415 3.76862L7.96326 2.12885C8.27715 1.79225 8.25872 1.26494 7.92213 0.951061C7.58553 0.63718 7.05822 0.655585 6.74433 0.99219L3.90268 4.0395C3.89545 4.04724 3.88841 4.05509 3.88154 4.06303L3.88148 4.06298Z" fill="white"/>\n </g>\n <defs>\n <clipPath>\n <rect width="40" height="40" fill="white"/>\n </clipPath>\n </defs>\n</svg>\n',"image/svg+xml").firstChild}var kU=function(e){uA(n,e);var t=vA(n);function n(e){var i;return aA(this,n),(i=t.call(this,e)).rotateDeg=i.config.rotateDeg||0,i}return lA(n,[{key:"afterCreate",value:function(){var e=this;if(!this.config.disable){gA(hA(n.prototype),"afterCreate",this).call(this),this.appendChild(".xgplayer-icon",this.icons.rotate),this.onBtnClick=this.onBtnClick.bind(this),this.bind(".xgplayer-icon",["click","touchend"],this.onBtnClick),this.on(jM,(function(){e.rotateDeg&&e.config.innerRotate&&qO.setTimeout(e,(function(){e.updateRotateDeg(e.rotateDeg,e.config.innerRotate)}),100)}));var t=this.player.root;this.rootWidth=t.style.width||t.offsetWidth||t.clientWidth,this.rootHeight=t.style.height||t.offsetHeight||t.clientHeight,this.rotateDeg&&this.updateRotateDeg(this.rotateDeg,this.config.innerRotate)}}},{key:"destroy",value:function(){gA(hA(n.prototype),"destroy",this).call(this),this.unbind(".xgplayer-icon",["click","touchend"],this.onBtnClick)}},{key:"onBtnClick",value:function(e){e.preventDefault(),e.stopPropagation(),this.emitUserAction(e,"rotate"),this.rotate(this.config.clockwise,this.config.innerRotate,1)}},{key:"updateRotateDeg",value:function(e,t){var n,i,r;if(e||(e=0),t)this.player.videoRotateDeg=e;else{var o=this.player,a=this.rootWidth,s=this.rootHeight,l=o.root,c=o.innerContainer,u=o.media,h=l.offsetWidth,d=c&&t?c.offsetHeight:l.offsetHeight,f=a,p=s,v=0,g=0;.75!==e&&.25!==e||(f="".concat(d,"px"),p="".concat(h,"px"),v=-(d-h)/2,g=-(h-d)/2);var y=y_(n=y_(i="translate(".concat(v,"px,")).call(i,g,"px) rotate(")).call(n,e,"turn)"),m={transformOrigin:"center center",transform:y,webKitTransform:y,height:p,width:f},_=t?u:l,b=t?o.getPlugin("poster"):null;W_(r=kT(m)).call(r,(function(e){_.style[e]=m[e],b&&b.root&&(b.root.style[e]=m[e])}))}}},{key:"rotate",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=this.player;this.rotateDeg||(this.rotateDeg=0);var r=e?1:-1;this.rotateDeg=(this.rotateDeg+1+.25*r*n)%1,this.updateRotateDeg(this.rotateDeg,t),i.emit(VM,360*this.rotateDeg)}},{key:"registerIcons",value:function(){return{rotate:bU}}},{key:"render",value:function(){if(!this.config.disable)return'\n <xg-icon class="xgplayer-rotate">\n <div class="xgplayer-icon">\n </div>\n '.concat(bz(this,"ROTATE_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"rotate"}},{key:"defaultConfig",get:function(){return{position:IN.CONTROLS_RIGHT,index:6,innerRotate:!0,clockwise:!1,rotateDeg:0,disable:!1}}}]),n}(sU);function EU(){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 wU(){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 SU="picture-in-picture",TU="inline",CU="fullscreen",xU=function(e){uA(n,e);var t=vA(n);function n(){var e,i;aA(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return cA(fA(i=t.call.apply(t,y_(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 lA(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()&&(gA(hA(n.prototype),"afterCreate",this).call(this),this.pMode=TU,this.initPipEvents(),this.config.showIcon&&this.initIcons(),this.once(DM,(function(){e.config.showIcon&&(qO.removeClass(fb(e).call(e,".xgplayer-icon"),"xg-icon-disable"),e.bind("click",e.switchPIP))})))}},{key:"registerIcons",value:function(){return{pipIcon:{icon:EU,class:"xg-get-pip"},pipIconExit:{icon:wU,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;qO.setTimeout(e,(function(){!n&&t.mediaPlay()}),0),!n&&t.mediaPlay(),e.setAttr("data-state","normal"),e.pipWindow=null,t.emit(GM,!1)},this.enterPIPCallback=function(n){t.emit(GM,!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===CU&&i!==CU&&t.onFullscreenChange(null,!1),e.pMode=i,i===SU?e.enterPIPCallback(n):i===TU&&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=ib(t=W_(n=yA(document.styleSheets)).call(n,(function(t){try{var n;return W_(n=yA(t.cssRules)).call(n,(function(e){return e.cssText})).join("")}catch(cK){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"===qO.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,c=a.nextSibling;e.copyStyleIntoPiPWindow(n);var u=document.createElement("style");if(u.append("body{padding:0; margin:0;}"),o){var h="";"string"==typeof o?h=o:"function"==typeof o&&(h=o.call(r)),h&&u.append(h)}else a===t.root&&u.append("\n .xgplayer{width: 100%!important; height: 100%!important;}\n ");n.document.head.append(u),n.document.body.append(a),n.addEventListener("pagehide",(function(t){s&&(c?s.insertBefore(a,c):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===SU}},{key:"isPIPAvailable",value:function(){var e=this.player.media;return"Boolean"===qO.typeOf(document.pictureInPictureEnabled)&&document.pictureInPictureEnabled&&("Boolean"===qO.typeOf(e.disablePictureInPicture)&&!e.disablePictureInPicture||e.webkitSupportsPresentationMode&&"Function"===qO.typeOf(e.webkitSetPresentationMode))||this.isDocPIPAvailable()}},{key:"isDocPIPAvailable",value:function(){return"documentPictureInPicture"in window&&/^(https|file)/.test(location.protocol)}},{key:"destroy",value:function(){gA(hA(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(bz(this,"PIP",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"pip"}},{key:"defaultConfig",get:function(){return{position:IN.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}(sU);function DU(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="40" viewBox="10 0 24 40">\n <path transform="scale(0.038 0.028)" d="M800 380v768h-128v-352l-320 320v-704l320 320v-352z"></path>\n</svg>\n',"image/svg+xml").firstChild}var IU=function(e){uA(n,e);var t=vA(n);function n(e){var i;return aA(this,n),cA(fA(i=t.call(this,e)),"playNext",(function(e){var t=fA(i).player;e.preventDefault(),e.stopPropagation(),i.idx+1<i.config.urlList.length?(i.idx++,i.nextHandler(i.config.urlList[i.idx],i.idx),t.emit(WM,i.idx+1)):(i.nextHandler(),t.emit(WM))})),i.idx=-1,i}return lA(n,[{key:"afterCreate",value:function(){this.config.urlList&&0!==this.config.urlList.length&&(this.appendChild(".xgplayer-icon",this.icons.playNext),this.initEvents())}},{key:"registerIcons",value:function(){return{playNext:DU}}},{key:"initEvents",value:function(){this.nextHandler=this.hook("nextClick",this.changeSrc);var e="mobile"===eM.device?"touchend":"click";this.bind(e,this.playNext),this.show()}},{key:"changeSrc",value:function(e){var t=this.player;e&&(t.pause(),t.currentTime=0,t.switchURL?t.switchURL(e):t.src=e,t.config.url=e,t.play())}},{key:"destroy",value:function(){this.unbind(["touchend","click"],this.playNext)}},{key:"render",value:function(){if(this.config.urlList&&0!==this.config.urlList.length)return'\n <xg-icon class="xgplayer-playnext">\n <div class="xgplayer-icon">\n </div>\n '.concat(bz(this,"PLAYNEXT_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>\n ")}}],[{key:"pluginName",get:function(){return"playNext"}},{key:"defaultConfig",get:function(){return{position:IN.CONTROLS_LEFT,index:1,url:null,urlList:[]}}}]),n}(ON),RU=o,LU=dt("iterator"),PU=!RU((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[LU]||"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})),AU=g,OU=2147483647,MU=/[^\0-\u007E]/,NU=/[.\u3002\uFF0E\uFF61]/g,zU="Overflow: input needs wider integers to process",UU=RangeError,BU=AU(NU.exec),FU=Math.floor,HU=String.fromCharCode,jU=AU("".charCodeAt),GU=AU([].join),VU=AU([].push),KU=AU("".replace),WU=AU("".split),YU=AU("".toLowerCase),qU=function(e){return e+22+75*(e<26)},XU=function(e,t,n){var i=0;for(e=n?FU(e/700):e>>1,e+=FU(e/t);e>455;)e=FU(e/35),i+=36;return FU(i+36*e/(e+38))},$U=function(e){var t=[];e=function(e){for(var t=[],n=0,i=e.length;n<i;){var r=jU(e,n++);if(r>=55296&&r<=56319&&n<i){var o=jU(e,n++);56320==(64512&o)?VU(t,((1023&r)<<10)+(1023&o)+65536):(VU(t,r),n--)}else VU(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&&VU(t,HU(i));var l=t.length,c=l;for(l&&VU(t,"-");c<r;){var u=OU;for(n=0;n<e.length;n++)(i=e[n])>=o&&i<u&&(u=i);var h=c+1;if(u-o>FU((OU-a)/h))throw UU(zU);for(a+=(u-o)*h,o=u,n=0;n<e.length;n++){if((i=e[n])<o&&++a>OU)throw UU(zU);if(i==o){for(var d=a,f=36;;){var p=f<=s?1:f>=s+26?26:f-s;if(d<p)break;var v=d-p,g=36-p;VU(t,HU(qU(p+v%g))),d=FU(v/g),f+=36}VU(t,HU(qU(d))),s=XU(a,h,c==l),a=0,c++}}a++,o++}return GU(t,"")},ZU=In,QU=r,JU=P,eB=g,tB=I,nB=PU,iB=co,rB=ho,oB=dk,aB=No,sB=ql,lB=Qo,cB=Pv,uB=x,hB=Qe,dB=$t,fB=si,pB=nn,vB=ee,gB=Ji,yB=Kr,mB=B,_B=ad,bB=Hh,kB=Bv,EB=lO,wB=dt("iterator"),SB="URLSearchParams",TB=SB+"Iterator",CB=lB.set,xB=lB.getterFor(SB),DB=lB.getterFor(TB),IB=Object.getOwnPropertyDescriptor,RB=function(e){if(!tB)return QU[e];var t=IB(QU,e);return t&&t.value},LB=RB("fetch"),PB=RB("Request"),AB=RB("Headers"),OB=PB&&PB.prototype,MB=AB&&AB.prototype,NB=QU.RegExp,zB=QU.TypeError,UB=QU.decodeURIComponent,BB=QU.encodeURIComponent,FB=eB("".charAt),HB=eB([].join),jB=eB([].push),GB=eB("".replace),VB=eB([].shift),KB=eB([].splice),WB=eB("".split),YB=eB("".slice),qB=/\+/g,XB=Array(4),$B=function(e){return XB[e-1]||(XB[e-1]=NB("((?:%[\\da-f]{2}){"+e+"})","gi"))},ZB=function(e){try{return UB(e)}catch(tSe){return e}},QB=function(e){var t=GB(e,qB," "),n=4;try{return UB(t)}catch(tSe){for(;n;)t=GB(t,$B(n--),ZB);return t}},JB=/[!'()~]|%20/g,eF={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},tF=function(e){return eF[e]},nF=function(e){return GB(BB(e),JB,tF)},iF=sB((function(e,t){CB(this,{type:TB,iterator:_B(xB(e).entries),kind:t})}),"Iterator",(function(){var e=DB(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),rF=function(e){this.entries=[],this.url=null,void 0!==e&&(vB(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===FB(e,0)?YB(e,1):e:gB(e)))};rF.prototype={type:SB,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,i,r,o,a,s,l=bB(e);if(l)for(n=(t=_B(e,l)).next;!(i=JU(n,t)).done;){if(o=(r=_B(pB(i.value))).next,(a=JU(o,r)).done||(s=JU(o,r)).done||!JU(o,r).done)throw zB("Expected sequence with length 2");jB(this.entries,{key:gB(a.value),value:gB(s.value)})}else for(var c in e)hB(e,c)&&jB(this.entries,{key:c,value:gB(e[c])})},parseQuery:function(e){if(e)for(var t,n,i=WB(e,"&"),r=0;r<i.length;)(t=i[r++]).length&&(n=WB(t,"="),jB(this.entries,{key:QB(VB(n)),value:QB(HB(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],i=0;i<t.length;)e=t[i++],jB(n,nF(e.key)+"="+nF(e.value));return HB(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var oF=function(){cB(this,aF);var e=CB(this,new rF(arguments.length>0?arguments[0]:void 0));tB||(this.length=e.entries.length)},aF=oF.prototype;if(oB(aF,{append:function(e,t){kB(arguments.length,2);var n=xB(this);jB(n.entries,{key:gB(e),value:gB(t)}),tB||this.length++,n.updateURL()},delete:function(e){kB(arguments.length,1);for(var t=xB(this),n=t.entries,i=gB(e),r=0;r<n.length;)n[r].key===i?KB(n,r,1):r++;tB||(this.length=n.length),t.updateURL()},get:function(e){kB(arguments.length,1);for(var t=xB(this).entries,n=gB(e),i=0;i<t.length;i++)if(t[i].key===n)return t[i].value;return null},getAll:function(e){kB(arguments.length,1);for(var t=xB(this).entries,n=gB(e),i=[],r=0;r<t.length;r++)t[r].key===n&&jB(i,t[r].value);return i},has:function(e){kB(arguments.length,1);for(var t=xB(this).entries,n=gB(e),i=0;i<t.length;)if(t[i++].key===n)return!0;return!1},set:function(e,t){kB(arguments.length,1);for(var n,i=xB(this),r=i.entries,o=!1,a=gB(e),s=gB(t),l=0;l<r.length;l++)(n=r[l]).key===a&&(o?KB(r,l--,1):(o=!0,n.value=s));o||jB(r,{key:a,value:s}),tB||(this.length=r.length),i.updateURL()},sort:function(){var e=xB(this);EB(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=xB(this).entries,i=dB(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 iF(this,"keys")},values:function(){return new iF(this,"values")},entries:function(){return new iF(this,"entries")}},{enumerable:!0}),iB(aF,wB,aF.entries,{name:"entries"}),iB(aF,"toString",(function(){return xB(this).serialize()}),{enumerable:!0}),tB&&rB(aF,"size",{get:function(){return xB(this).entries.length},configurable:!0,enumerable:!0}),aB(oF,SB),ZU({global:!0,constructor:!0,forced:!nB},{URLSearchParams:oF}),!nB&&uB(AB)){var sF=eB(MB.has),lF=eB(MB.set),cF=function(e){if(vB(e)){var t,n=e.body;if(fB(n)===SB)return t=e.headers?new AB(e.headers):new AB,sF(t,"content-type")||lF(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),yB(e,{body:mB(0,gB(n)),headers:mB(0,t)})}return e};if(uB(LB)&&ZU({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return LB(e,arguments.length>1?cF(arguments[1]):{})}}),uB(PB)){var uF=function(e){return cB(this,OB),new PB(e,arguments.length>1?cF(arguments[1]):{})};OB.constructor=uF,uF.prototype=OB,ZU({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:uF})}}var hF,dF=In,fF=I,pF=PU,vF=r,gF=$t,yF=g,mF=co,_F=ho,bF=Pv,kF=Qe,EF=jS,wF=md,SF=to,TF=yu.codeAt,CF=function(e){var t,n,i=[],r=WU(KU(YU(e),NU,"."),".");for(t=0;t<r.length;t++)n=r[t],VU(i,BU(MU,n)?"xn--"+$U(n):n);return GU(i,".")},xF=Ji,DF=No,IF=Bv,RF={URLSearchParams:oF,getState:xB},LF=Qo,PF=LF.set,AF=LF.getterFor("URL"),OF=RF.URLSearchParams,MF=RF.getState,NF=vF.URL,zF=vF.TypeError,UF=vF.parseInt,BF=Math.floor,FF=Math.pow,HF=yF("".charAt),jF=yF(/./.exec),GF=yF([].join),VF=yF(1..toString),KF=yF([].pop),WF=yF([].push),YF=yF("".replace),qF=yF([].shift),XF=yF("".split),$F=yF("".slice),ZF=yF("".toLowerCase),QF=yF([].unshift),JF="Invalid scheme",eH="Invalid host",tH="Invalid port",nH=/[a-z]/i,iH=/[\d+-.a-z]/i,rH=/\d/,oH=/^0x/i,aH=/^[0-7]+$/,sH=/^\d+$/,lH=/^[\da-f]+$/i,cH=/[\0\t\n\r #%/:<>?@[\\\]^|]/,uH=/[\0\t\n\r #/:<>?@[\\\]^|]/,hH=/^[\u0000-\u0020]+/,dH=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,fH=/[\t\n\r]/g,pH=function(e){var t,n,i,r;if("number"==typeof e){for(t=[],n=0;n<4;n++)QF(t,e%256),e=BF(e/256);return GF(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+=VF(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},vH={},gH=EF({},vH,{" ":1,'"':1,"<":1,">":1,"`":1}),yH=EF({},gH,{"#":1,"?":1,"{":1,"}":1}),mH=EF({},yH,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),_H=function(e,t){var n=TF(e,0);return n>32&&n<127&&!kF(t,e)?e:encodeURIComponent(e)},bH={ftp:21,file:null,http:80,https:443,ws:80,wss:443},kH=function(e,t){var n;return 2==e.length&&jF(nH,HF(e,0))&&(":"==(n=HF(e,1))||!t&&"|"==n)},EH=function(e){var t;return e.length>1&&kH($F(e,0,2))&&(2==e.length||"/"===(t=HF(e,2))||"\\"===t||"?"===t||"#"===t)},wH=function(e){return"."===e||"%2e"===ZF(e)},SH={},TH={},CH={},xH={},DH={},IH={},RH={},LH={},PH={},AH={},OH={},MH={},NH={},zH={},UH={},BH={},FH={},HH={},jH={},GH={},VH={},KH=function(e,t,n){var i,r,o,a=xF(e);if(t){if(r=this.parse(a))throw zF(r);this.searchParams=null}else{if(void 0!==n&&(i=new KH(n,!0)),r=this.parse(a,null,i))throw zF(r);(o=MF(new OF)).bindURL(this),this.searchParams=o}};KH.prototype={type:"URL",parse:function(e,t,n){var i,r,o,a,s,l=this,c=t||SH,u=0,h="",d=!1,f=!1,p=!1;for(e=xF(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=YF(e,hH,""),e=YF(e,dH,"$1")),e=YF(e,fH,""),i=wF(e);u<=i.length;){switch(r=i[u],c){case SH:if(!r||!jF(nH,r)){if(t)return JF;c=CH;continue}h+=ZF(r),c=TH;break;case TH:if(r&&(jF(iH,r)||"+"==r||"-"==r||"."==r))h+=ZF(r);else{if(":"!=r){if(t)return JF;h="",c=CH,u=0;continue}if(t&&(l.isSpecial()!=kF(bH,h)||"file"==h&&(l.includesCredentials()||null!==l.port)||"file"==l.scheme&&!l.host))return;if(l.scheme=h,t)return void(l.isSpecial()&&bH[l.scheme]==l.port&&(l.port=null));h="","file"==l.scheme?c=zH:l.isSpecial()&&n&&n.scheme==l.scheme?c=xH:l.isSpecial()?c=LH:"/"==i[u+1]?(c=DH,u++):(l.cannotBeABaseURL=!0,WF(l.path,""),c=jH)}break;case CH:if(!n||n.cannotBeABaseURL&&"#"!=r)return JF;if(n.cannotBeABaseURL&&"#"==r){l.scheme=n.scheme,l.path=SF(n.path),l.query=n.query,l.fragment="",l.cannotBeABaseURL=!0,c=VH;break}c="file"==n.scheme?zH:IH;continue;case xH:if("/"!=r||"/"!=i[u+1]){c=IH;continue}c=PH,u++;break;case DH:if("/"==r){c=AH;break}c=HH;continue;case IH:if(l.scheme=n.scheme,r==hF)l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=SF(n.path),l.query=n.query;else if("/"==r||"\\"==r&&l.isSpecial())c=RH;else if("?"==r)l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=SF(n.path),l.query="",c=GH;else{if("#"!=r){l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=SF(n.path),l.path.length--,c=HH;continue}l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=SF(n.path),l.query=n.query,l.fragment="",c=VH}break;case RH:if(!l.isSpecial()||"/"!=r&&"\\"!=r){if("/"!=r){l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,c=HH;continue}c=AH}else c=PH;break;case LH:if(c=PH,"/"!=r||"/"!=HF(h,u+1))continue;u++;break;case PH:if("/"!=r&&"\\"!=r){c=AH;continue}break;case AH:if("@"==r){d&&(h="%40"+h),d=!0,o=wF(h);for(var v=0;v<o.length;v++){var g=o[v];if(":"!=g||p){var y=_H(g,mH);p?l.password+=y:l.username+=y}else p=!0}h=""}else if(r==hF||"/"==r||"?"==r||"#"==r||"\\"==r&&l.isSpecial()){if(d&&""==h)return"Invalid authority";u-=wF(h).length+1,h="",c=OH}else h+=r;break;case OH:case MH:if(t&&"file"==l.scheme){c=BH;continue}if(":"!=r||f){if(r==hF||"/"==r||"?"==r||"#"==r||"\\"==r&&l.isSpecial()){if(l.isSpecial()&&""==h)return eH;if(t&&""==h&&(l.includesCredentials()||null!==l.port))return;if(a=l.parseHost(h))return a;if(h="",c=FH,t)return;continue}"["==r?f=!0:"]"==r&&(f=!1),h+=r}else{if(""==h)return eH;if(a=l.parseHost(h))return a;if(h="",c=NH,t==MH)return}break;case NH:if(!jF(rH,r)){if(r==hF||"/"==r||"?"==r||"#"==r||"\\"==r&&l.isSpecial()||t){if(""!=h){var m=UF(h,10);if(m>65535)return tH;l.port=l.isSpecial()&&m===bH[l.scheme]?null:m,h=""}if(t)return;c=FH;continue}return tH}h+=r;break;case zH:if(l.scheme="file","/"==r||"\\"==r)c=UH;else{if(!n||"file"!=n.scheme){c=HH;continue}if(r==hF)l.host=n.host,l.path=SF(n.path),l.query=n.query;else if("?"==r)l.host=n.host,l.path=SF(n.path),l.query="",c=GH;else{if("#"!=r){EH(GF(SF(i,u),""))||(l.host=n.host,l.path=SF(n.path),l.shortenPath()),c=HH;continue}l.host=n.host,l.path=SF(n.path),l.query=n.query,l.fragment="",c=VH}}break;case UH:if("/"==r||"\\"==r){c=BH;break}n&&"file"==n.scheme&&!EH(GF(SF(i,u),""))&&(kH(n.path[0],!0)?WF(l.path,n.path[0]):l.host=n.host),c=HH;continue;case BH:if(r==hF||"/"==r||"\\"==r||"?"==r||"#"==r){if(!t&&kH(h))c=HH;else if(""==h){if(l.host="",t)return;c=FH}else{if(a=l.parseHost(h))return a;if("localhost"==l.host&&(l.host=""),t)return;h="",c=FH}continue}h+=r;break;case FH:if(l.isSpecial()){if(c=HH,"/"!=r&&"\\"!=r)continue}else if(t||"?"!=r)if(t||"#"!=r){if(r!=hF&&(c=HH,"/"!=r))continue}else l.fragment="",c=VH;else l.query="",c=GH;break;case HH:if(r==hF||"/"==r||"\\"==r&&l.isSpecial()||!t&&("?"==r||"#"==r)){if(".."===(s=ZF(s=h))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(l.shortenPath(),"/"==r||"\\"==r&&l.isSpecial()||WF(l.path,"")):wH(h)?"/"==r||"\\"==r&&l.isSpecial()||WF(l.path,""):("file"==l.scheme&&!l.path.length&&kH(h)&&(l.host&&(l.host=""),h=HF(h,0)+":"),WF(l.path,h)),h="","file"==l.scheme&&(r==hF||"?"==r||"#"==r))for(;l.path.length>1&&""===l.path[0];)qF(l.path);"?"==r?(l.query="",c=GH):"#"==r&&(l.fragment="",c=VH)}else h+=_H(r,yH);break;case jH:"?"==r?(l.query="",c=GH):"#"==r?(l.fragment="",c=VH):r!=hF&&(l.path[0]+=_H(r,vH));break;case GH:t||"#"!=r?r!=hF&&("'"==r&&l.isSpecial()?l.query+="%27":l.query+="#"==r?"%23":_H(r,vH)):(l.fragment="",c=VH);break;case VH:r!=hF&&(l.fragment+=_H(r,gH))}u++}},parseHost:function(e){var t,n,i;if("["==HF(e,0)){if("]"!=HF(e,e.length-1))return eH;if(t=function(e){var t,n,i,r,o,a,s,l=[0,0,0,0,0,0,0,0],c=0,u=null,h=0,d=function(){return HF(e,h)};if(":"==d()){if(":"!=HF(e,1))return;h+=2,u=++c}for(;d();){if(8==c)return;if(":"!=d()){for(t=n=0;n<4&&jF(lH,d());)t=16*t+UF(d(),16),h++,n++;if("."==d()){if(0==n)return;if(h-=n,c>6)return;for(i=0;d();){if(r=null,i>0){if(!("."==d()&&i<4))return;h++}if(!jF(rH,d()))return;for(;jF(rH,d());){if(o=UF(d(),10),null===r)r=o;else{if(0==r)return;r=10*r+o}if(r>255)return;h++}l[c]=256*l[c]+r,2!=++i&&4!=i||c++}if(4!=i)return;break}if(":"==d()){if(h++,!d())return}else if(d())return;l[c++]=t}else{if(null!==u)return;h++,u=++c}}if(null!==u)for(a=c-u,c=7;0!=c&&a>0;)s=l[c],l[c--]=l[u+a-1],l[u+--a]=s;else if(8!=c)return;return l}($F(e,1,-1)),!t)return eH;this.host=t}else if(this.isSpecial()){if(e=CF(e),jF(cH,e))return eH;if(t=function(e){var t,n,i,r,o,a,s,l=XF(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"==HF(r,0)&&(o=jF(oH,r)?16:8,r=$F(r,8==o?1:2)),""===r)a=0;else{if(!jF(10==o?sH:8==o?aH:lH,r))return e;a=UF(r,o)}WF(n,a)}for(i=0;i<t;i++)if(a=n[i],i==t-1){if(a>=FF(256,5-t))return null}else if(a>255)return null;for(s=KF(n),i=0;i<n.length;i++)s+=n[i]*FF(256,3-i);return s}(e),null===t)return eH;this.host=t}else{if(jF(uH,e))return eH;for(t="",n=wF(e),i=0;i<n.length;i++)t+=_H(n[i],vH);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return kF(bH,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&kH(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,c=t+":";return null!==r?(c+="//",e.includesCredentials()&&(c+=n+(i?":"+i:"")+"@"),c+=pH(r),null!==o&&(c+=":"+o)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?a[0]:a.length?"/"+GF(a,"/"):"",null!==s&&(c+="?"+s),null!==l&&(c+="#"+l),c},setHref:function(e){var t=this.parse(e);if(t)throw zF(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new WH(e.path[0]).origin}catch(tSe){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+pH(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(xF(e)+":",SH)},getUsername:function(){return this.username},setUsername:function(e){var t=wF(xF(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=_H(t[n],mH)}},getPassword:function(){return this.password},setPassword:function(e){var t=wF(xF(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=_H(t[n],mH)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?pH(e):pH(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,OH)},getHostname:function(){var e=this.host;return null===e?"":pH(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,MH)},getPort:function(){var e=this.port;return null===e?"":xF(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=xF(e))?this.port=null:this.parse(e,NH))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+GF(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,FH))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=xF(e))?this.query=null:("?"==HF(e,0)&&(e=$F(e,1)),this.query="",this.parse(e,GH)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=xF(e))?("#"==HF(e,0)&&(e=$F(e,1)),this.fragment="",this.parse(e,VH)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var WH=function(e){var t=bF(this,YH),n=IF(arguments.length,1)>1?arguments[1]:void 0,i=PF(t,new KH(e,!1,n));fF||(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())},YH=WH.prototype,qH=function(e,t){return{get:function(){return AF(this)[e]()},set:t&&function(e){return AF(this)[t](e)},configurable:!0,enumerable:!0}};if(fF&&(_F(YH,"href",qH("serialize","setHref")),_F(YH,"origin",qH("getOrigin")),_F(YH,"protocol",qH("getProtocol","setProtocol")),_F(YH,"username",qH("getUsername","setUsername")),_F(YH,"password",qH("getPassword","setPassword")),_F(YH,"host",qH("getHost","setHost")),_F(YH,"hostname",qH("getHostname","setHostname")),_F(YH,"port",qH("getPort","setPort")),_F(YH,"pathname",qH("getPathname","setPathname")),_F(YH,"search",qH("getSearch","setSearch")),_F(YH,"searchParams",qH("getSearchParams")),_F(YH,"hash",qH("getHash","setHash"))),mF(YH,"toJSON",(function(){return AF(this).serialize()}),{enumerable:!0}),mF(YH,"toString",(function(){return AF(this).serialize()}),{enumerable:!0}),NF){var XH=NF.createObjectURL,$H=NF.revokeObjectURL;XH&&mF(WH,"createObjectURL",gF(XH,NF)),$H&&mF(WH,"revokeObjectURL",gF($H,NF))}DF(WH,"URL"),dF({global:!0,constructor:!0,forced:!pF,sham:!fF},{URL:WH});var ZH=In,QH=o,JH=Bv,ej=Ji,tj=PU,nj=ae("URL");ZH({target:"URL",stat:!0,forced:!(tj&&QH((function(){nj.canParse()})))},{canParse:function(e){var t=JH(arguments.length,1),n=ej(e),i=t<2||void 0===arguments[1]?void 0:ej(arguments[1]);try{return!!new nj(n,i)}catch(tSe){return!1}}});var ij=t(te.URL),rj={exports:{}};rj.exports=function e(t,n,i){var r,o,a,s=window,l="application/octet-stream",c=i||l,u=t,h=!n&&!i&&u,d=document.createElement("a"),f=function(e){return String(e)},p=s.Blob||s.MozBlob||s.WebKitBlob||f,v=n||"download";if(p=p.call?p.bind(s):Blob,"true"===String(this)&&(c=(u=[u,c])[0],u=u[1]),h&&h.length<2048&&(v=h.split("/").pop().split("?")[0],d.href=h,-1!==qP(a=d.href).call(a,h))){var g=new XMLHttpRequest;return g.open("GET",h,!0),g.responseType="blob",g.onload=function(t){e(t.target.response,v,l)},setTimeout((function(){g.send()}),0),g}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(u)){if(!(u.length>2096103.424&&p!==f))return navigator.msSaveBlob?navigator.msSaveBlob(b(u),v):k(u);c=(u=b(u)).type||l}else if(/([\x80-\xff])/.test(u)){for(var y=0,m=new Uint8Array(u.length),_=m.length;y<_;++y)m[y]=u.charCodeAt(y);u=new p([m],{type:c})}function b(e){for(var t=e.split(/[:;,]/),n=t[1],i=("base64"==t[2]?atob:decodeURIComponent)(t.pop()),r=i.length,o=0,a=new Uint8Array(r);o<r;++o)a[o]=i.charCodeAt(o);return new p([a],{type:n})}function k(e,t){if("download"in d)return d.href=e,d.setAttribute("download",v),d.className="download-js-link",d.innerHTML="downloading...",d.style.display="none",document.body.appendChild(d),setTimeout((function(){d.click(),document.body.removeChild(d),!0===t&&setTimeout((function(){ij.revokeObjectURL(d.href)}),250)}),66),!0;if(/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent))return/^data:/.test(e)&&(e="data:"+e.replace(/^data:([\w\/\-\+]+)/,l)),window.open(e)||confirm("Displaying New Document\n\nUse Save As... to download, then click back to return to this page.")&&(location.href=e),!0;var n=document.createElement("iframe");document.body.appendChild(n),!t&&/^data:/.test(e)&&(e="data:"+e.replace(/^data:([\w\/\-\+]+)/,l)),n.src=e,setTimeout((function(){document.body.removeChild(n)}),333)}if(r=u instanceof p?u:new p([u],{type:c}),navigator.msSaveBlob)return navigator.msSaveBlob(r,v);if(ij)k(ij.createObjectURL(r),!0);else{if("string"==typeof r||r.constructor===f)try{return k("data:"+c+";base64,"+s.btoa(r))}catch(E){return k("data:"+c+","+encodeURIComponent(r))}(o=new FileReader).onload=function(e){k(this.result)},o.readAsDataURL(r)}return!0};var oj=t(rj.exports);function aj(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24">\n <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g transform="translate(-488.000000, -340.000000)" fill="#FFFFFF">\n <g id="Group-2">\n <g id="volme_big-copy" transform="translate(488.000000, 340.000000)">\n <rect id="Rectangle-18" x="11" y="4" width="2" height="12" rx="1"></rect>\n <rect id="Rectangle-2" x="3" y="18" width="18" height="2" rx="1"></rect>\n <rect id="Rectangle-2" transform="translate(4.000000, 17.500000) rotate(90.000000) translate(-4.000000, -17.500000) " x="1.5" y="16.5" width="5" height="2" rx="1"></rect><rect id="Rectangle-2-Copy-3" transform="translate(20.000000, 17.500000) rotate(90.000000) translate(-20.000000, -17.500000) " x="17.5" y="16.5" width="5" height="2" rx="1"></rect>\n <path d="M9.48791171,8.26502656 L9.48791171,14.2650266 C9.48791171,14.8173113 9.04019646,15.2650266 8.48791171,15.2650266 C7.93562696,15.2650266 7.48791171,14.8173113 7.48791171,14.2650266 L7.48791171,7.26502656 C7.48791171,6.71274181 7.93562696,6.26502656 8.48791171,6.26502656 L15.4879117,6.26502656 C16.0401965,6.26502656 16.4879117,6.71274181 16.4879117,7.26502656 C16.4879117,7.81731131 16.0401965,8.26502656 15.4879117,8.26502656 L9.48791171,8.26502656 Z" id="Combined-Shape" transform="translate(11.987912, 10.765027) scale(1, -1) rotate(45.000000) translate(-11.987912, -10.765027) "></path>\n </g>\n </g>\n </g>\n </g>\n</svg>\n',"image/svg+xml").firstChild}var sj=function(e){uA(n,e);var t=vA(n);function n(e){var i;return aA(this,n),cA(fA(i=t.call(this,e)),"download",(function(e){if(!i.isLock){i.emitUserAction(e,"download");var t=i.playerConfig.url,n="";"String"===qO.typeOf(t)?n=t:"Array"===qO.typeOf(t)&&t.length>0&&(n=t[0].src);var r=i.getAbsoluteURL(n);oj(r),i.isLock=!0,i.timer=window.setTimeout((function(){i.isLock=!1,window.clearTimeout(i.timer),i.timer=null}),300)}})),i.timer=null,i.isLock=!1,i}return lA(n,[{key:"afterCreate",value:function(){gA(hA(n.prototype),"afterCreate",this).call(this),this.config.disable||(this.appendChild(".xgplayer-icon",this.icons.download),this._handler=this.hook("click",this.download,{pre:function(e){e.preventDefault(),e.stopPropagation()}}),this.bind(["click","touchend"],this._handler))}},{key:"registerIcons",value:function(){return{download:aj}}},{key:"getAbsoluteURL",value:function(e){if(!e.match(/^https?:\/\//)){var t=document.createElement("div");t.innerHTML='<a href="'.concat(e,'">x</a>'),e=t.firstChild.href}return e}},{key:"destroy",value:function(){gA(hA(n.prototype),"destroy",this).call(this),this.unbind(["click","touchend"],this.download),window.clearTimeout(this.timer),this.timer=null}},{key:"render",value:function(){if(!this.config.disable)return'<xg-icon class="xgplayer-download">\n <div class="xgplayer-icon">\n </div>\n '.concat(bz(this,"DOWNLOAD_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"download"}},{key:"defaultConfig",get:function(){return{position:IN.CONTROLS_RIGHT,index:3,disable:!0}}}]),n}(sU),lj=function(e){uA(n,e);var t=vA(n);function n(){return aA(this,n),t.apply(this,arguments)}return lA(n,[{key:"beforeCreate",value:function(e){"boolean"==typeof e.player.config.screenShot&&(e.config.disable=!e.player.config.screenShot)}},{key:"afterCreate",value:function(){gA(hA(n.prototype),"afterCreate",this).call(this),this.appendChild(".xgplayer-icon",this.icons.screenshotIcon);var e=this.config;this.initSize=function(t){e.fitVideo&&(e.width=t.vWidth,e.height=t.vHeight)},this.once(jM,this.initSize)}},{key:"onPluginsReady",value:function(){this.show(),this.onClickBtn=this.onClickBtn.bind(this),this.bind(["click","touchend"],this.onClickBtn)}},{key:"saveScreenShot",value:function(e,t){var n,i=document.createElement("a");i.href=e,i.download=t;try{"undefined"!=typeof MouseEvent?n=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window}):(n=document.createEvent("MouseEvents")).initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null)}catch(cK){console.error("MouseEvent unsupported",cK)}n&&i.dispatchEvent(n)}},{key:"createCanvas",value:function(e,t){var n=document.createElement("canvas"),i=n.getContext("2d");this.canvasCtx=i,this.canvas=n,n.width=e||this.config.width,n.height=t||this.config.height,i.imageSmoothingEnabled=!0,i.imageSmoothingEnabled&&(i.imageSmoothingQuality="high")}},{key:"onClickBtn",value:function(e){var t=this;e.preventDefault(),e.stopPropagation(),this.emitUserAction(e,"shot");var n=this.config;this.shot(n.width,n.height).then((function(e){t.emit(KM,e),n.saveImg&&t.saveScreenShot(e,n.name+n.format)}))}},{key:"shot",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{quality:.92,type:"image/png"},r=this.config,o=this.player,a=i.quality||r.quality,s=i.type||r.type;return new rb((function(i,l){var c,u=null;if(o.media.canvas)u=o.media.canvas;else{n.canvas?(n.canvas.width=e||r.width,n.canvas.height=t||r.height):n.createCanvas(e,t),u=n.canvas,c=n.canvasCtx;var h,d,f,p,v=o.media.videoWidth/o.media.videoHeight,g=u.width/u.height,y=o.media.videoWidth,m=o.media.videoHeight;v>g?(f=u.width,p=u.width/v,h=0,d=Math.round((u.height-p)/2)):v===g?(f=u.width,p=u.height,h=0,d=0):v<g&&(f=u.height*v,p=u.height,h=Math.round((u.width-f)/2),d=0),c.drawImage(o.media,0,0,y,m,h,d,f,p)}var _=u.toDataURL(s,a).replace(s,"image/octet-stream");i(_=_.replace(/^data:image\/[^;]+/,"data:application/octet-stream"))}))}},{key:"registerIcons",value:function(){return{screenshotIcon:null}}},{key:"destroy",value:function(){gA(hA(n.prototype),"destroy",this).call(this),this.unbind(["click","touchend"],this.onClickBtn),this.off(jM,this.initSize)}},{key:"render",value:function(){var e,t;if(!this.config.disable){var n=this.icons.screenshotIcon?"xgplayer-icon":"xgplayer-icon btn-text",i="SCREENSHOT";return y_(e='\n <xg-icon class="xgplayer-shot">\n <div class="'.concat(n,'">\n ')).call(e,this.icons.screenshotIcon?"":y_(t='<span lang-key="'.concat(this.i18nKeys[i],'">')).call(t,this.i18n[i],"</span>"),"\n </div>\n </xg-icon>")}}}],[{key:"pluginName",get:function(){return"screenShot"}},{key:"defaultConfig",get:function(){return{position:IN.CONTROLS_RIGHT,index:5,quality:.92,type:"image/png",format:".png",width:600,height:337,saveImg:!0,fitVideo:!0,disable:!1,name:"screenshot"}}}]),n}(sU),cj=function(){function e(t){aA(this,e),this.config=t.config,this.parent=t.root,this.root=qO.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=ON.delegate.call(this,this.root,"li",i,this.onItemClick)}return lA(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)&&W_(t=kT(i.style)).call(t,(function(e){r.style[e]=i[e]}));e.length>0&&(this.attrKeys=kT(e[0])),this.root.innerHTML="",W_(e).call(e,(function(e,t){var i=e.selected?"option-item selected":"option-item";e["data-index"]=t,n.root.appendChild(qO.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&&qO.hasClass(t,"selected"))return!1;var n="function"==typeof this.config.onItemClick?this.config.onItemClick:null,i=this.root.querySelector(".selected");qO.addClass(t,"selected"),i&&qO.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={};W_(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(){qO.removeClass(this.root,"hide"),qO.addClass(this.root,"active")}},{key:"hide",value:function(){qO.removeClass(this.root,"active"),qO.addClass(this.root,"hide")}},{key:"setStyle",value:function(e){var t=this;kT(e).forEach((function(n){t.root.style[n]=e[n]}))}},{key:"destroy",value:function(){var e;this._delegates&&(W_(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}(),uj="side",hj="middle",dj="default",fj="click",pj="hover";var vj="mobile"===eM.device,gj=function(e){uA(n,e);var t=vA(n);function n(e){var i;return aA(this,n),cA(fA(i=t.call(this,e)),"onEnter",(function(e){e.stopPropagation(),i.emit("icon_mouseenter",{pluginName:i.pluginName}),i.switchActiveState(e)})),cA(fA(i),"switchActiveState",(function(e){e.stopPropagation(),i.config.toggleMode===fj?i.toggle(!i.isActive):i.toggle(!0)})),cA(fA(i),"onLeave",(function(e){e.stopPropagation(),i.emit("icon_mouseleave",{pluginName:i.pluginName}),i.config.listType!==uj&&i.isActive&&i.toggle(!1)})),cA(fA(i),"onListEnter",(function(e){i.enterType=2})),cA(fA(i),"onListLeave",(function(e){i.enterType=0,i.isActive&&i.toggle(!1)})),i.isIcons=!1,i.isActive=!1,i.curValue=null,i.curIndex=0,i}return lA(n,[{key:"updateLang",value:function(e){this.renderItemList(this.config.list,this.curIndex)}},{key:"afterCreate",value:function(){var e=this,t=this.config;this.initIcons(),(vj=vj||"touch"===this.domEventType)&&"mobile"===eM.device&&t.listType===dj&&(t.listType=uj),t.hidePortrait&&qO.addClass(this.root,"portrait"),this.on([jM,NM],(function(){e._resizeList()})),this.once(pM,(function(){t.list&&t.list.length>0&&(e.renderItemList(t.list),e.show())})),vj&&this.on(EM,(function(){e.isActive&&(e.optionsList&&e.optionsList.hide(),e.isActive=!1)})),vj?(t.toggleMode=fj,this.activeEvent="touchend"):this.activeEvent=t.toggleMode===fj?"click":"mouseenter",t.toggleMode===fj?this.bind(this.activeEvent,this.switchActiveState):(this.bind(this.activeEvent,this.onEnter),this.bind("mouseleave",this.onLeave)),this.isIcons&&this.bind("click",this.onIconClick)}},{key:"initIcons",value:function(){var e=this,t=this.icons,n=kT(t),i=!1;n.length>0&&(n.forEach((function(n){e.appendChild(".xgplayer-icon",t[n]),!i&&(i=t[n])})),this.isIcons=i),i||(this.appendChild(".xgplayer-icon",qO.createDom("span","",{},"icon-text")),qO.addClass(fb(this).call(this,".xgplayer-icon"),"btn-text"))}},{key:"show",value:function(e){!this.config.list||this.config.list.length<2||qO.addClass(this.root,"show")}},{key:"hide",value:function(){qO.removeClass(this.root,"show")}},{key:"getTextByLang",value:function(e,t,n){if(void 0===e)return"";var i=this.config.list;!n&&(n=this.player.lang),t=!t||qO.isUndefined(e[t])?"text":t,"number"==typeof e&&(e=i[e]);try{return"object"===oA(e[t])?e[t][n]||e[t].en:e[t]}catch(r){return console.warn(r),""}}},{key:"toggle",value:function(e){if(e!==this.isActive&&!this.config.disable){var t=this.player.controls,n=this.config.listType;e?(n===uj?t.blur():t.focus(),this.optionsList&&this.optionsList.show()):(n===uj?t.focus():t.focusAwhile(),this.optionsList&&this.optionsList.hide()),this.isActive=e}}},{key:"onItemClick",value:function(e,t){e.stopPropagation();var n=this.config,i=n.listType,r=n.list;this.curIndex=t.to.index,this.curItem=r[this.curIndex],this.changeCurrentText(),(this.config.isItemClickHide||vj||i===uj)&&this.toggle(!1)}},{key:"onIconClick",value:function(e){}},{key:"changeCurrentText",value:function(){if(!this.isIcons){var e=this.config.list,t=e[this.curIndex<e.length?this.curIndex:0];t&&(fb(this).call(this,".icon-text").innerHTML=this.getTextByLang(t,"iconText"))}}},{key:"renderItemList",value:function(e,t){var n=this,i=this.config,r=this.optionsList,o=this.player;if("number"==typeof t&&(this.curIndex=t,this.curItem=i.list[t]),r)return r.renderItemList(e),void this.changeCurrentText();var a,s,l={config:{data:e||[],className:(a=i.listType,s=i.position,a===uj?s===IN.CONTROLS_LEFT?"xg-side-list xg-left-side":"xg-side-list xg-right-side":""),onItemClick:function(e,t){n.onItemClick(e,t)},domEventType:vj?"touch":"mouse"},root:i.listType===uj?o.innerContainer||o.root:this.root};if(this.config.isShowIcon){var c=this.player.root.getBoundingClientRect().height,u=i.listType===hj?c-50:c;u&&i.heightLimit&&(l.config.maxHeight="".concat(u,"px")),this.optionsList=new cj(l),this.changeCurrentText(),this.show()}this._resizeList()}},{key:"_resizeList",value:function(){if(this.config.heightLimit){var e=this.player.root.getBoundingClientRect().height,t=this.config.listType===hj?e-50:e;this.optionsList&&this.optionsList.setStyle({maxHeight:"".concat(t,"px")})}}},{key:"destroy",value:function(){this.config.toggleMode===fj?this.unbind(this.activeEvent,this.switchActiveState):(this.unbind(this.activeEvent,this.onEnter),this.unbind("mouseleave",this.onLeave)),this.isIcons&&this.unbind("click",this.onIconClick),this.optionsList&&(this.optionsList.destroy(),this.optionsList=null)}},{key:"render",value:function(){if(this.config.isShowIcon)return'<xg-icon class="xg-options-icon '.concat(this.config.className||"",'">\n <div class="xgplayer-icon">\n </div>\n </xg-icon>')}}],[{key:"pluginName",get:function(){return"optionsIcon"}},{key:"defaultConfig",get:function(){return{position:IN.CONTROLS_RIGHT,index:100,list:[],listType:"default",listStyle:{},hidePortrait:!0,isShowIcon:!1,isItemClickHide:!0,toggleMode:pj,heightLimit:!0}}}]),n}(ON),yj=function(e){uA(n,e);var t=vA(n);function n(e){var i;return aA(this,n),(i=t.call(this,e)).curTime=0,i.isPaused=!0,i}return lA(n,[{key:"beforeCreate",value:function(e){var t=e.config.list;Array.isArray(t)&&t.length>0&&(e.config.list=W_(t).call(t,(function(e){return!e.text&&e.name&&(e.text=e.name),e.text||(e.text=e.definition),e})))}},{key:"afterCreate",value:function(){var e=this;gA(hA(n.prototype),"afterCreate",this).call(this),this.on("resourceReady",(function(t){e.changeDefinitionList(t)})),this.on(BM,(function(t){e.renderItemList(e.config.list,t.to)})),this.player.definitionList.length<2&&this.hide()}},{key:"show",value:function(e){!this.config.list||this.config.list.length<2||qO.addClass(this.root,"show")}},{key:"initDefinition",value:function(){var e=this.config,t=e.list,n=e.defaultDefinition;if(t.length>0){var i=null;W_(t).call(t,(function(e){e.definition===n&&(i=e)})),i||(i=t[0]),this.changeDefinition(i)}}},{key:"renderItemList",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.list||[],i=arguments.length>1?arguments[1]:void 0,r=i&&i.definition?i.definition:this.config.defaultDefinition;i&&t.forEach((function(e){e.selected=!1}));var o=0,a=W_(t).call(t,(function(t,n){var i=rA(rA({},t),{},{showText:e.getTextByLang(t)||t.definition,selected:!1});return(t.selected||t.definition&&t.definition==r)&&(i.selected=!0,o=n),i}));gA(hA(n.prototype),"renderItemList",this).call(this,a,o)}},{key:"changeDefinitionList",value:function(e){Array.isArray(e)&&(this.config.list=W_(e).call(e,(function(e){return!e.text&&e.name&&(e.text=e.name),e.text||(e.text=e.definition),e})),this.renderItemList(),this.config.list.length<2?this.hide():this.show())}},{key:"changeDefinition",value:function(e,t){this.player.changeDefinition(e,t)}},{key:"onItemClick",value:function(e,t){var i=this.player.definitionList;gA(hA(n.prototype),"onItemClick",this).apply(this,arguments),this.emitUserAction(e,"change_definition",{from:t.from,to:t.to});for(var r=0;r<i.length;r++)t.to&&i[r].definition===t.to.definition&&(t.to.url=i[r].url),t.from&&i[r].definition===t.from.definition&&(t.from.url=i[r].url);this.player.changeDefinition(t.to,t.from)}}],[{key:"pluginName",get:function(){return"definition"}},{key:"defaultConfig",get:function(){return rA(rA({},gj.defaultConfig),{},{position:IN.CONTROLS_RIGHT,index:3,list:[],defaultDefinition:"",disable:!1,hidePortrait:!1,className:"xgplayer-definition",isShowIcon:!0})}}]),n}(gj),mj=function(e){uA(n,e);var t=vA(n);function n(e){var i;return aA(this,n),(i=t.call(this,e)).curRate=1,i}return lA(n,[{key:"beforeCreate",value:function(e){var t=e.player.config.playbackRate,n=t?Array.isArray(t)?t:e.config.list:[];Array.isArray(n)&&(e.config.list=W_(n).call(n,(function(e){return"number"==typeof e?e={rate:e,text:"".concat(e,"x")}:!e.text&&e.rate&&(e.text="".concat(e.rate,"x")),e})))}},{key:"afterCreate",value:function(){var e=this;gA(hA(n.prototype),"afterCreate",this).call(this),this.on(mM,(function(){e.curValue!==e.player.playbackRate&&e.renderItemList()})),this.renderItemList()}},{key:"show",value:function(e){this.config.list&&0!==this.config.list.length&&gA(hA(n.prototype),"show",this).call(this)}},{key:"onItemClick",value:function(e,t){gA(hA(n.prototype),"onItemClick",this).call(this,e,t);var i=e.delegateTarget,r=Number(i.getAttribute("rate"));if(!r||r===this.curValue)return!1;var o={playbackRate:{from:this.player.playbackRate,to:r}};this.emitUserAction(e,"change_rate",{props:o}),this.curValue=r,this.player.playbackRate=r}},{key:"renderItemList",value:function(){var e,t=this,i=this.player.playbackRate||1;this.curValue=i;var r=-1,o=W_(e=this.config.list).call(e,(function(e,n){var o={rate:e.rate};return o.rate===i&&(o.selected=!0,r=n),o.showText=t.getTextByLang(e),o}));gA(hA(n.prototype),"renderItemList",this).call(this,o,r)}},{key:"changeCurrentText",value:function(){if(!this.isIcons){var e=this.config.list,t=e[this.curIndex<e.length?this.curIndex:0],n="";n=!t||this.curIndex<0?"".concat(this.player.playbackRate,"x"):this.getTextByLang(t,"iconText"),fb(this).call(this,".icon-text").innerHTML=n}}},{key:"destroy",value:function(){gA(hA(n.prototype),"destroy",this).call(this)}}],[{key:"pluginName",get:function(){return"playbackRate"}},{key:"defaultConfig",get:function(){return rA(rA({},gj.defaultConfig),{},{position:IN.CONTROLS_RIGHT,index:4,list:[2,1.5,1,.75,.5],className:"xgplayer-playbackrate",isShowIcon:!0,hidePortrait:!1})}}]),n}(gj);function _j(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="31" height="40" viewBox="0 -5 31 40">\n <path fill="#fff" transform="scale(1.3, 1.3)" class=\'path_full\' d="M9,10v1a.9.9,0,0,1-1,1,.9.9,0,0,1-1-1V9A.9.9,0,0,1,8,8h2a.9.9,0,0,1,1,1,.9.9,0,0,1-1,1Zm6,4V13a1,1,0,0,1,2,0v2a.9.9,0,0,1-1,1H14a1,1,0,0,1,0-2Zm3-7H6V17H18Zm2,0V17a2,2,0,0,1-2,2H6a2,2,0,0,1-2-2V7A2,2,0,0,1,6,5H18A2,2,0,0,1,20,7Z"></path>\n</svg>\n',"image/svg+xml").firstChild}function bj(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="31" height="40" viewBox="0 -5 31 40">\n <path fill="#fff" transform="scale(1.3, 1.3)" d="M9,10V9a.9.9,0,0,1,1-1,.9.9,0,0,1,1,1v2a.9.9,0,0,1-1,1H8a.9.9,0,0,1-1-1,.9.9,0,0,1,1-1Zm6,4v1a1,1,0,0,1-2,0V13a.9.9,0,0,1,1-1h2a1,1,0,0,1,0,2Zm3-7H6V17H18Zm2,0V17a2,2,0,0,1-2,2H6a2,2,0,0,1-2-2V7A2,2,0,0,1,6,5H18A2,2,0,0,1,20,7Z"></path>\n</svg>\n',"image/svg+xml").firstChild}var kj=function(e){uA(n,e);var t=vA(n);function n(){return aA(this,n),t.apply(this,arguments)}return lA(n,[{key:"beforeCreate",value:function(e){"boolean"==typeof e.player.config.cssFullscreen&&(e.config.disable=!e.player.config.cssFullscreen)}},{key:"afterCreate",value:function(){var e=this;gA(hA(n.prototype),"afterCreate",this).call(this),this.config.disable||(this.config.target&&(this.playerConfig.fullscreenTarget=this.config.target),this.initIcons(),this.on(zM,(function(t){e.animate(t)})),this.btnClick=this.btnClick.bind(this),this.handleCssFullscreen=this.hook("cssFullscreen_change",this.btnClick,{pre:function(e){e.preventDefault(),e.stopPropagation()}}),this.bind(["click","touchend"],this.handleCssFullscreen))}},{key:"initIcons",value:function(){var e=this.icons,t=fb(this).call(this,".xgplayer-icon");t.appendChild(e.cssFullscreen),t.appendChild(e.exitCssFullscreen)}},{key:"btnClick",value:function(e){e.preventDefault(),e.stopPropagation();var t=this.player.isCssfullScreen;this.emitUserAction(e,"switch_cssfullscreen",{cssfullscreen:t}),t?this.player.exitCssFullscreen():this.player.getCssFullscreen()}},{key:"animate",value:function(e){this.root&&(e?this.setAttr("data-state","full"):this.setAttr("data-state","normal"),this.switchTips(e))}},{key:"switchTips",value:function(e){var t=this.i18nKeys,n=fb(this).call(this,".xg-tips");n&&this.changeLangTextKey(n,e?t.EXITCSSFULLSCREEN_TIPS:t.CSSFULLSCREEN_TIPS)}},{key:"registerIcons",value:function(){return{cssFullscreen:{icon:_j,class:"xg-get-cssfull"},exitCssFullscreen:{icon:bj,class:"xg-exit-cssfull"}}}},{key:"destroy",value:function(){gA(hA(n.prototype),"destroy",this).call(this),this.unbind(["click","touchend"],this.btnClick)}},{key:"render",value:function(){if(!this.config.disable)return"<xg-icon class='xgplayer-cssfullscreen'>\n <div class=\"xgplayer-icon\">\n </div>\n ".concat(bz(this,"CSSFULLSCREEN_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"cssFullscreen"}},{key:"defaultConfig",get:function(){return{position:IN.CONTROLS_RIGHT,index:1,disable:!1,target:null}}}]),n}(sU),Ej=function(e){uA(n,e);var t=vA(n);function n(){return aA(this,n),t.apply(this,arguments)}return lA(n,[{key:"afterCreate",value:function(){var e=this;this.clickHandler=this.hook("errorRetry",this.errorRetry,{pre:function(e){e.preventDefault(),e.stopPropagation()}}),this.onError=this.hook("showError",this.handleError),this.bind(".xgplayer-error-refresh","click",this.clickHandler),this.on(cM,(function(t){e.onError(t)}))}},{key:"errorRetry",value:function(e){this.emitUserAction(e,"error_retry",{}),this.player.retry()}},{key:"handleError",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.player,i=t.errorType,r=n.errorNote?this.i18n[n.errorNote]:"";if(!r)switch(i){case"decoder":r=this.i18n.MEDIA_ERR_DECODE;break;case"network":r=this.i18n.MEDIA_ERR_NETWORK;break;default:r=this.i18n.MEDIA_ERR_SRC_NOT_SUPPORTED}fb(this).call(this,".xgplayer-error-text").innerHTML=r,fb(this).call(this,".xgplayer-error-tips").innerHTML=y_(e="".concat(this.i18n.REFRESH_TIPS,'<span class="xgplayer-error-refresh">')).call(e,this.i18n.REFRESH,"</span>")}},{key:"destroy",value:function(){this.unbind(".xgplayer-error-refresh","click",this.clickHandler)}},{key:"render",value:function(){return'<xg-error class="xgplayer-error">\n <div class="xgplayer-errornote">\n <span class="xgplayer-error-text"></span>\n <span class="xgplayer-error-tips"><em class="xgplayer-error-refresh"></em></span>\n </div>\n </xg-error>'}}],[{key:"pluginName",get:function(){return"error"}}]),n}(ON),wj=function(e){uA(n,e);var t=vA(n);function n(){return aA(this,n),t.apply(this,arguments)}return lA(n,[{key:"afterCreate",value:function(){var e=this;this.intervalId=0,this.customConfig=null,this.bind(".highlight",["click","touchend"],(function(t){(e.config.onClick||e.customOnClick)&&(t.preventDefault(),t.stopPropagation(),e.customOnClick?e.customOnClick(t):e.config.onClick(t))})),this.player.showPrompt=function(){e.showPrompt.apply(e,arguments)},this.player.hidePrompt=function(){e.hide()}}},{key:"setStyle",value:function(e){var t,n=this;W_(t=kT(e)).call(t,(function(t){n.root.style[t]=e[t]}))}},{key:"showPrompt",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(e){this.customOnClick=i;var r=this.config.interval;if(this.intervalId&&(clearTimeout(this.intervalId),this.intervalId=null),qO.addClass(this.root,"show"),"arrow"===n.mode&&qO.addClass(this.root,"arrow"),"string"==typeof e)fb(this).call(this,".xgplayer-prompt-detail").innerHTML=e;else fb(this).call(this,".xgplayer-prompt-detail").innerHTML="".concat(e.text||"")+"".concat(e.highlight?'<i class="highlight">'.concat(e.highlight,"</i>"):"");if(n.style&&this.setStyle(n.style),"boolean"==typeof n.autoHide?n.autoHide:this.config.autoHide){var o=n.interval||r;this.intervalId=setTimeout((function(){t.hide()}),o)}}}},{key:"hide",value:function(){qO.removeClass(this.root,"show"),qO.removeClass(this.root,"arrow"),this.root.removeAttribute("style"),this.customOnClick=null}},{key:"render",value:function(){return'<xg-prompt class="xgplayer-prompt '.concat(UN.CONTROLS_FOLLOW,'">\n <span class="xgplayer-prompt-detail"></span>\n </xg-prompt>')}}],[{key:"pluginName",get:function(){return"prompt"}},{key:"defaultConfig",get:function(){return{interval:3e3,style:{},mode:"arrow",autoHide:!0,detail:{text:"",highlight:""},onClick:function(){}}}}]),n}(ON),Sj={time:0,text:"",id:1,duration:1,color:"#fff",style:{},width:6,height:6};function Tj(e){var t;W_(t=kT(Sj)).call(t,(function(t){void 0===e[t]&&(e[t]=Sj[t])}))}var Cj={_updateDotDom:function(e,t){var n;if(t){var i=this.calcuPosition(e.time,e.duration),r=e.style||{};r.left="".concat(i.left,"%"),r.width="".concat(i.width,"%"),t.setAttribute("data-text",e.text),t.setAttribute("data-time",e.time),i.isMini?qO.addClass(t,"mini"):qO.removeClass(t,"mini"),W_(n=kT(r)).call(n,(function(e){t.style[e]=r[e]}))}},initDots:function(){var e,t=this;W_(e=this._ispots).call(e,(function(e){t.createDot(e,!1)})),this.ispotsInit=!0},createDot:function(e){var t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this.player.plugins.progress;if(i&&(n&&(Tj(e),this._ispots.push(e)),this.ispotsInit||!n)){var r=this.calcuPosition(e.time,e.duration),o=e.style||{};o.left="".concat(r.left,"%"),o.width="".concat(r.width,"%");var a="xgspot_".concat(e.id," xgplayer-spot");r.isMini&&(a+=" mini");var s=e.template?'<div class="xgplayer-spot-pop">'.concat(e.template,"</div>"):"",l=qO.createDom("xg-spot",s,{"data-text":e.text,"data-time":e.time,"data-id":e.id},a);W_(t=kT(o)).call(t,(function(e){l.style[e]=o[e]})),i.outer&&i.outer.appendChild(l),this.positionDot(l,e.id)}},findDot:function(e){var t;if(this.player.plugins.progress){var n=ib(t=this._ispots).call(t,(function(t,n){return t.id===e}));return n.length>0?n[0]:null}},updateDot:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.player.plugins.progress;if(n){var i,r=this.findDot(e.id);if(r)W_(i=kT(e)).call(i,(function(t){r[t]=e[t]}));if(this.ispotsInit){var o=fb(n).call(n,'xg-spot[data-id="'.concat(e.id,'"]'));o&&(this._updateDotDom(e,o),t&&this.showDot(e.id))}}},deleteDot:function(e){var t=this._ispots,n=this.player.plugins.progress;if(n){for(var i=[],r=0;r<t.length;r++)t[r].id===e&&i.push(r);for(var o=i.length-1;o>=0;o--)if(bT(t).call(t,i[o],1),this.ispotsInit){var a=fb(n).call(n,'xg-spot[data-id="'.concat(e,'"]'));a&&a.parentElement.removeChild(a)}}},deleteAllDots:function(){var e=this.player.plugins.progress;if(e)if(this.ispotsInit){for(var t=e.root.getElementsByTagName("xg-spot"),n=t.length-1;n>=0;n--)e.outer.removeChild(t[n]);this._ispots=[]}else this._ispots=[]},updateAllDots:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=this.player.plugins.progress;if(n)if(this.ispotsInit){this._ispots=[];var i=n.root.getElementsByTagName("xg-spot"),r=i.length;if(r>t.length)for(var o=r-1;o>t.length-1;o--)n.outer.removeChild(i[o]);t.forEach((function(t,n){n<r?(i[n].setAttribute("data-id","".concat(t.id)),e._ispots.push(t),e.updateDot(t)):e.createDot(t)}))}else this._ispots=t},positionDots:function(){var e=this,t=this._ispots,n=this.playerSize,i=this.player.sizeInfo,r=this.player.plugins.progress;r&&i.width!==n.width&&(n.width=i.width,n.left=i.left,t.forEach((function(t){var n=fb(r).call(r,'xg-spot[data-id="'.concat(t.id,'"]'));n&&e.positionDot(n,t.id)})))},positionDot:function(e,t){var n=qO.findDom(e,".xgplayer-spot-pop");if(n){var i=this.playerSize,r=e.getBoundingClientRect(),o=n.getBoundingClientRect(),a=r.left-i.left,s=i.width-a-r.width/2;if(a<o.width/2||i.width<o.width){var l=o.width/2-a;n.style.left="".concat(l,"px")}else if(s<o.width/2){var c=s-o.width/2+r.width/2;n.style.left="".concat(c,"px")}else n.style.left="50%"}},updateDuration:function(){var e=this,t=this.player.plugins.progress;t&&this._ispots.forEach((function(n){var i=fb(t).call(t,'xg-spot[data-id="'.concat(n.id,'"]'));e._updateDotDom(n,i)}))},getAllDotsDom:function(){var e=this.player.plugins.progress;return e?e.root.getElementsByTagName("xg-spot"):[]},getDotDom:function(e){var t=this.player.plugins.progress;if(t)return fb(t).call(t,'xg-spot[data-id="'.concat(e,'"]'))}};var xj={dragmove:"onProgressMove",dragstart:"onProgressDragStart",dragend:"onProgressDragEnd",click:"onProgressClick",mouseover:"onProgressMouseOver",mouseenter:"onProgressMouseOver"},Dj=function(e){uA(n,e);var t=vA(n);function n(e){var i;return aA(this,n),cA(fA(i=t.call(this,e)),"onMousemove",(function(e){i.config.disable||(qO.hasClass(e.target,"xg-spot-content")&&i.config.isHideThumbnailHover?i.player.plugins.progress.onMouseLeave(e):(i._state.f||qO.hasClass(e.target,"xg-spot-content"))&&(qO.event(e),e.stopPropagation()))})),cA(fA(i),"onMousedown",(function(e){i.config.disable||(i._state.f||qO.hasClass(e.target,"xg-spot-content"))&&(qO.event(e),e.stopPropagation())})),cA(fA(i),"onMouseup",(function(e){if(i.isDrag){var t=i.player.plugins.progress;t&&t.pos&&(t.onMouseUp(e),!t.pos.isEnter&&t.onMouseLeave(e))}})),cA(fA(i),"onDotMouseLeave",(function(e){if(!i.config.disable){i._curDot.removeEventListener("mouseleave",i.onDotMouseLeave),i.blurDot(e.target),i._curDot=null;var t=i.player.plugins.progress;t&&t.enableBlur(),i.show()}})),cA(fA(i),"onProgressMouseOver",(function(e,t){if(!i.config.disable&&qO.hasClass(t.target,"xgplayer-spot")&&!i._curDot){i._curDot=t.target,i.focusDot(t.target),i._curDot.children.length>0&&i.hide();var n=i.player.plugins.progress;n&&n.disableBlur(),i._curDot.addEventListener("mouseleave",i.onDotMouseLeave)}})),i._ispots=[],i.videoPreview=null,i.videothumbnail=null,i.thumbnail=null,i.timeStr="",i._state={now:0,f:!1},i}return lA(n,[{key:"beforeCreate",value:function(e){var t=e.player.plugins.progress;t&&(e.root=t.root)}},{key:"afterCreate",value:function(){var e=this;this._curDot=null,this.handlerSpotClick=this.hook("spotClick",(function(t,n){n.seekTime&&e.player.seek(n.seekTime)})),this.transformTimeHook=this.hook("transformTime",(function(t){e.setTimeContent(qO.format(t))})),function(e){var t,n=e.config,i=e.player;W_(t=kT(Cj)).call(t,(function(t){e[t]=Cj[t].bind(e)}));var r=i.config.progressDot||n.ispots||[];e._ispots=W_(r).call(r,(function(e){return Tj(e),e})),e.ispotsInit=!1,e.playerSize={left:i.sizeInfo.left,width:i.sizeInfo.width},e.on(vM,(function(){e.ispotsInit?e.updateDuration():e.initDots()})),e.on(jM,(function(){e.positionDots()}))}(this),this.on(vM,(function(){e.show()})),this.config.disable&&this.disable(),this.extTextRoot=fb(this).call(this,".xg-spot-ext-text")}},{key:"setConfig",value:function(e){var t,n=this;e&&W_(t=kT(e)).call(t,(function(t){n.config[t]=e[t]}))}},{key:"onPluginsReady",value:function(){this.player.plugins.progress&&(this.previewLine=fb(this).call(this,".xg-spot-line"),this.timePoint=fb(this).call(this,".xgplayer-progress-point"),this.timeText=fb(this).call(this,".xg-spot-time"),this.tipText=fb(this).call(this,".spot-inner-text"),this._hasThumnail=!1,this.registerThumbnail(),this.bindEvents())}},{key:"bindEvents",value:function(){var e,t=this,n=this.player.plugins.progress;if(n&&(W_(e=kT(xj)).call(e,(function(e){t[xj[e]]=t[xj[e]].bind(t),n.addCallBack(e,t[xj[e]])})),"mobile"!==eM.device)){this.bind(".xg-spot-info","mousemove",this.onMousemove),this.bind(".xg-spot-info","mousedown",this.onMousedown),this.bind(".xg-spot-info","mouseup",this.onMouseup);var i=this.hook("previewClick",(function(){}));this.handlerPreviewClick=function(e){e.stopPropagation(),i(parseInt(1e3*t._state.now,10)/1e3,e)},this.bind(".xg-spot-content","mouseup",this.handlerPreviewClick)}}},{key:"onProgressMove",value:function(e,t){!this.config.disable&&this.player.duration&&this.updatePosition(e.offset,e.width,e.currentTime,e.e)}},{key:"onProgressDragStart",value:function(e){!this.config.disable&&this.player.duration&&(this.isDrag=!0,this.videoPreview&&qO.addClass(this.videoPreview,"show"))}},{key:"onProgressDragEnd",value:function(e){!this.config.disable&&this.player.duration&&(this.isDrag=!1,this.videoPreview&&qO.removeClass(this.videoPreview,"show"))}},{key:"onProgressClick",value:function(e,t){var n;this.config.disable||qO.hasClass(t.target,"xgplayer-spot")&&(t.stopPropagation(),t.preventDefault(),W_(n=["time","id","text"]).call(n,(function(n){e[n]=t.target.getAttribute("data-".concat(n))})),e.time&&(e.time=Number(e.time)),this.handlerSpotClick(t,e))}},{key:"updateLinePos",value:function(e,t){var n=this.root,i=this.previewLine,r=this.player,o=this.config,a="flex"===r.controls.mode,s=n.getBoundingClientRect().width;if(s||!this._hasThumnail){var l,c=e-(s=this._hasThumnail&&s<o.width?o.width:s)/2;c<0&&!a?(c=0,l=e-s/2):c>t-s&&!a?(l=c-(t-s),c=t-s):l=0,void 0!==l&&(i.style.transform="translateX(".concat(l.toFixed(2),"px)")),n.style.transform="translateX(".concat(c.toFixed(2),"px) translateZ(0)")}}},{key:"updateTimeText",value:function(e){var t=this.timeText,n=this.timePoint;t.innerHTML=e,!this.thumbnail&&(n.innerHTML=e)}},{key:"updatePosition",value:function(e,t,n,i){var r=this.root,o=this.config,a=this._state;if(r){a.now=n,this.transformTimeHook(n);var s=this.timeStr;i&&i.target&&qO.hasClass(i.target,"xgplayer-spot")?(this.showTips(i.target.getAttribute("data-text"),!1,s),this.focusDot(i.target),a.f=!0,o.isFocusDots&&a.f&&(a.now=parseInt(i.target.getAttribute("data-time"),10))):o.defaultText?(a.f=!1,this.showTips(o.defaultText,!0,s)):(a.f=!1,this.hideTips("")),this.updateTimeText(s),this.updateThumbnails(a.now),this.updateLinePos(e,t)}}},{key:"setTimeContent",value:function(e){this.timeStr=e}},{key:"updateThumbnails",value:function(e){var t=this.player,n=this.videoPreview,i=this.config,r=t.plugins.thumbnail;if(r&&r.usable){this.thumbnail&&r.update(this.thumbnail,e,i.width,i.height);var o=n&&n.getBoundingClientRect();this.videothumbnail&&r.update(this.videothumbnail,e,o.width,o.height)}}},{key:"registerThumbnail",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("mobile"!==eM.device){var t=this.player,n=this.config,i=t.getPlugin("thumbnail");if(i&&i.setConfig(e),i&&i.usable&&n.isShowThumbnail){qO.removeClass(this.root,"short-line no-thumbnail"),"short"===n.mode&&qO.addClass(this.root,"short-line"),this._hasThumnail=!0;var r=fb(this).call(this,".xg-spot-thumbnail");this.thumbnail=i.createThumbnail(r,"progress-thumbnail"),n.isShowCoverPreview&&(this.videoPreview=qO.createDom("xg-video-preview","",{},"xgvideo-preview"),t.root.appendChild(this.videoPreview),this.videothumbnail=i.createThumbnail(this.videoPreview,"xgvideo-thumbnail")),this.updateThumbnails(0)}else qO.addClass(this.root,"short-line no-thumbnail")}}},{key:"calcuPosition",value:function(e,t){var n=this.player.plugins.progress,i=this.player,r=n.root.getBoundingClientRect().width,o=i.duration/r*6;return e+t>i.duration&&(t=i.duration-e),i.duration,i.duration,{left:e/i.duration*100,width:t/i.duration*100,isMini:t<o}}},{key:"showDot",value:function(e){var t=this.findDot(e);if(t){var n=this.root.getBoundingClientRect().width,i=t.time/this.player.duration*n;this.updatePosition(i,n,t.time)}}},{key:"focusDot",value:function(e,t){e&&(t||(t=e.getAttribute("data-id")),qO.addClass(e,"active"),this._activeDotId=t)}},{key:"blurDot",value:function(e){if(!e){var t=this._activeDotId;e=this.getDotDom(t)}e&&(qO.removeClass(e,"active"),this._activeDotId=null)}},{key:"showTips",value:function(e,t){var n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(qO.addClass(this.root,"no-timepoint"),e)&&(qO.addClass(fb(this).call(this,".xg-spot-content"),"show-text"),t&&"production"===this.config.mode?(qO.addClass(this.root,"product"),this.tipText.textContent=e):(qO.removeClass(this.root,"product"),this.tipText.textContent=this._hasThumnail?e:y_(n="".concat(i," ")).call(n,e)))}},{key:"hideTips",value:function(){qO.removeClass(this.root,"no-timepoint"),this.tipText.textContent="",qO.removeClass(fb(this).call(this,".xg-spot-content"),"show-text"),qO.removeClass(this.root,"product")}},{key:"hide",value:function(){qO.addClass(this.root,"hide")}},{key:"show",value:function(e){qO.removeClass(this.root,"hide")}},{key:"enable",value:function(){var e=this.config,t=this.playerConfig;this.config.disable=!1,this.show(),!this.thumbnail&&e.isShowThumbnail&&this.registerThumbnail(t.thumbnail||{})}},{key:"disable",value:function(){this.config.disable=!0,this.hide()}},{key:"destroy",value:function(){var e,t=this,n=this.player.plugins.progress;n&&W_(e=kT(xj)).call(e,(function(e){n.removeCallBack(e,t[xj[e]])})),this.videothumbnail=null,this.thumbnail=null,this.videoPreview&&this.player.root.removeChild(this.videoPreview),this.unbind(".xg-spot-info","mousemove",this.onMousemove),this.unbind(".xg-spot-info","mousedown",this.onMousedown),this.unbind(".xg-spot-info","mouseup",this.onMouseup),this.unbind(".xg-spot-content","mouseup",this.handlerPreviewClick)}},{key:"render",value:function(){return"mobile"===eM.device||"mobile"===this.playerConfig.isMobileSimulateMode?"":'<div class="xg-spot-info hide '.concat("short"===this.config.mode?"short-line":"",'">\n <div class="xg-spot-content">\n <div class="xg-spot-thumbnail">\n <span class="xg-spot-time"></span>\n </div>\n <div class="xg-spot-text"><span class="spot-inner-text"></span></div>\n </div>\n <div class="xgplayer-progress-point">00:00</div>\n <div class="xg-spot-ext-text"></div>\n <div class="xg-spot-line"></div>\n </div>')}}],[{key:"pluginName",get:function(){return"progresspreview"}},{key:"defaultConfig",get:function(){return{index:1,miniWidth:6,ispots:[],defaultText:"",isFocusDots:!0,isHideThumbnailHover:!0,isShowThumbnail:!0,isShowCoverPreview:!1,mode:"",disable:!1,width:160,height:90}}}]),n}(ON),Ij=function(e){uA(n,e);var t=vA(n);function n(e){var i;return aA(this,n),(i=t.call(this,e)).ratio=1,i.interval=null,i._preloadMark={},i}return lA(n,[{key:"afterCreate",value:function(){var e=this;this.usable&&this.initThumbnail(),this.on([vM],(function(){var t=e.config,n=t.pic_num,i=t.interval;e.usable&&(e.interval=i>0?i:Math.round(1e3*e.player.duration/n)/1e3)}))}},{key:"setConfig",value:function(e){var t=this;if(e){var n=kT(e);n.length<1||(n.forEach((function(n){t.config[n]=e[n]})),this.usable&&this.initThumbnail())}}},{key:"usable",get:function(){var e=this.config,t=e.urls,n=e.pic_num;return t&&t.length>0&&n>0}},{key:"initThumbnail",value:function(){var e=this.config,t=e.width,n=e.height,i=e.pic_num,r=e.interval;this.ratio=t/n*100,this.interval=r||Math.round(this.player.duration/i),this._preloadMark={}}},{key:"getUrlByIndex",value:function(e){return e>=0&&e<this.config.urls.length?this.config.urls[e]:""}},{key:"preload",value:function(e){var t=this;if(!this._preloadMark[e]){var n=this.config.urls,i=n.length,r=[];e>0&&r.push(e-1),r.push(e),e>0&&e<i-1&&r.push(e+1),W_(r).call(r,(function(e){!t._preloadMark[e]&&e>=0&&e<i&&(t._preloadMark[e]=1,qO.preloadImg(n[e],(function(){t._preloadMark[e]=2})))}))}}},{key:"getPosition",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this.config,o=r.pic_num,a=r.row,s=r.col,l=r.width,c=r.height;this.interval=Math.round(this.player.duration/o);var u=Math.ceil(e/this.interval),h=(u=u>o?o:u)<a*s?0:Math.ceil(u/(a*s))-1,d=u-h*(s*a),f=d>0?Math.ceil(d/s)-1:0,p=d>0?d-f*s-1:0,v=0,g=0;n&&i?n/i<l/c?v=(g=i)*(l/c):g=(v=n)/(l/c):i?n||(v=(g=i||c)*(l/c)):g=(v=n||l)/(l/c);var y=this.getUrlByIndex(h);return{urlIndex:h,rowIndex:f,colIndex:p,url:y,height:g,width:v,style:{backgroundImage:"url(".concat(y,")"),backgroundSize:"".concat(v*s,"px auto"),backgroundPosition:y_(t="-".concat(p*v,"px -")).call(t,f*g,"px"),width:"".concat(v,"px"),height:"".concat(g,"px")}}}},{key:"update",value:function(e,t){var n,i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",s=this.config,l=s.pic_num,c=s.urls;if(!(l<=0)&&c&&0!==c.length){var u=this.getPosition(t,r,o);this.preload(u.urlIndex),W_(n=kT(u.style)).call(n,(function(t){e.style[t]=u.style[t]})),W_(i=kT(a)).call(i,(function(t){e.style[t]=a[t]}))}}},{key:"changeConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.setConfig(e)}},{key:"createThumbnail",value:function(e,t){var n=qO.createDom("xg-thumbnail","",{},"thumbnail ".concat(t));return e&&e.appendChild(n),n}}],[{key:"pluginName",get:function(){return"thumbnail"}},{key:"defaultConfig",get:function(){return{isShow:!1,urls:[],pic_num:0,col:0,row:0,height:90,width:160,scale:1,className:"",hidePortrait:!1}}}]),n}(ON);function Rj(e){return e?"background:".concat(e,";"):""}var Lj=function(e){uA(n,e);var t=vA(n);function n(){var e,i;aA(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return cA(fA(i=t.call.apply(t,y_(e=[this]).call(e,o))),"onTimeupdate",(function(){var e=i.player.ended,t=fA(i).offsetDuration,n=i.currentTime;n=qO.adjustTimeByDuration(n,t,e),i.update({played:n},t)})),i}return lA(n,[{key:"offsetDuration",get:function(){return this.playerConfig.customDuration||this.player.offsetDuration||this.player.duration}},{key:"currentTime",get:function(){var e=this.player,t=e.offsetCurrentTime,n=e.currentTime;return t>=0?t:n}},{key:"afterCreate",value:function(){var e=this;this.root&&(this.on(dM,this.onTimeupdate),this.on(kM,(function(){e.reset()})))}},{key:"reset",value:function(){this.update({played:0,cached:0},0)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{cached:0,played:0},t=arguments.length>1?arguments[1]:void 0;if(t&&this.root){if(e.cached)fb(this).call(this,"xg-mini-progress-cache").style.width="".concat(e.cached/t*100,"%");if(e.played)fb(this).call(this,"xg-mini-progress-played").style.width="".concat(e.played/t*100,"%")}}},{key:"render",value:function(){var e,t,n,i,r=this.playerConfig,o=r.commonStyle;if(r.miniprogress){var a=this.config,s=a.mode,l=a.height,c={cached:Rj(o.cachedColor),played:Rj(o.playedColor),progress:Rj(o.progressColor),height:l>0&&2!==l?"height: ".concat(l,"px;"):""};return y_(e=y_(t=y_(n=y_(i='<xg-mini-progress class="xg-mini-progress '.concat("show"===s?"xg-mini-progress-show":"",'" style="')).call(i,c.progress," ")).call(n,c.height,'">\n <xg-mini-progress-cache class="xg-mini-progress-cache" style="')).call(t,c.cached,'"></xg-mini-progress-cache>\n <xg-mini-progress-played class="xg-mini-progress-played" style="')).call(e,c.played,'"></xg-mini-progress-played>\n </xg-mini-progress>')}}}],[{key:"pluginName",get:function(){return"MiniProgress"}},{key:"defaultConfig",get:function(){return{mode:"auto",height:2}}}]),n}(ON),Pj="realtime",Aj="firstframe",Oj="poster";var Mj=null,Nj=function(e){uA(n,e);var t=vA(n);function n(){var e,i;aA(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return cA(fA(i=t.call.apply(t,y_(e=[this]).call(e,o))),"onLoadedData",(function(e){i.player&&(i._frameCount=i.config.startFrameCount,i.stop(),i.renderOnTimeupdate(e),i.off(dM,i.renderOnTimeupdate),i.on(dM,i.renderOnTimeupdate))})),cA(fA(i),"onVisibilitychange",(function(e){"visible"===document.visibilityState?i._checkIfCanStart()&&i.start():"hidden"===document.visibilityState&&i.stop()})),cA(fA(i),"renderOnTimeupdate",(function(e){if(i._frameCount>0)i.renderOnce(),i._frameCount--;else{i._isLoaded=!0,i.off(dM,i.renderOnTimeupdate);var t=i.config.startInterval;!i.player.paused&&i._checkIfCanStart()&&i.start(0,t)}})),cA(fA(i),"start",(function(e,t){var n=i.player.video,r=function(){try{return parseInt(window.performance.now(),10)}catch(cK){return(new Date).getTime()}}(),o=i.checkVideoIsSupport(n);o&&i.canvasCtx&&(t||(t=i.interval),i.stop(),n.videoWidth&&n.videoHeight&&(i.videoPI=n.videoHeight>0?parseInt(n.videoWidth/n.videoHeight*100,10):0,(i.config.mode===Pj||r-i.preTime>=t)&&(n&&n.videoWidth&&i.update(o,i.videoPI),i.preTime=r)),i.frameId="timer"===i._loopType?qO.setTimeout(fA(i),i.start,t):qO.requestAnimationFrame(i.start))})),cA(fA(i),"stop",(function(){i.frameId&&("timer"===i._loopType?qO.clearTimeout(fA(i),i.frameId):qO.cancelAnimationFrame(i.frameId),i.frameId=null)})),i}return lA(n,[{key:"afterCreate",value:function(){var e=this;!0===this.playerConfig.dynamicBg&&(this.config.disable=!1),n.isSupport||(this.config.disable=!0);var t=this.config,i=t.disable,r=t.mode,o=t.frameRate;i||(this._pos={width:0,height:0,rwidth:0,rheight:0,x:0,y:0,pi:0},this.isStart=!1,this._isLoaded=!1,this.videoPI=0,this.preTime=0,this.interval=parseInt(1e3/o,10),this.canvas=null,this.canvasCtx=null,this._frameCount=0,this._loopType=this.config.mode!==Pj&&this.interval>=1e3?"timer":"animation",this.once(DM,(function(){e.player&&(e.init(),e.renderByPoster(),e.player.paused||e.start())})),r!==Oj&&(r!==Aj&&(this.on(kM,(function(){e.stop()})),this.on(oM,(function(){var t=e.config.startInterval;e._checkIfCanStart()&&e.start(0,t)})),this.on(lM,(function(){e.stop()}))),this.on(yM,this.onLoadedData),this.on(bM,(function(){e._isLoaded=!1,e.stop()})),document.addEventListener("visibilitychange",this.onVisibilitychange)))}},{key:"setConfig",value:function(e){var t=this;kT(e).forEach((function(n){"root"===n&&e[n]!==t.config[n]?t.reRender(e[n]):"frameRate"===n?t.interval=parseInt(1e3/e[n],10):"disable"===n&&e[n]&&t.stop(),t.config[n]=e[n]}))}},{key:"init",value:function(e){var t=this.player,i=this.config;this.canvasFilter=n.supportCanvasFilter();try{var r=e||i.root;r||(r=i.isInnerRender&&t.innerContainer||t.root),r.insertAdjacentHTML("afterbegin",'<div class="xgplayer-dynamic-bg" data-index="'.concat(i.index,'"><canvas>\n </canvas><xgmask></xgmask></div>')),this.root=r.children[0],this.canvas=fb(this).call(this,"canvas"),this.canvasFilter||(this.canvas.style.filter=ib(i),this.canvas.style.webkitFilter=ib(i)),this.mask=fb(this).call(this,"xgmask"),i.addMask&&(this.mask.style.background=i.maskBg),this.canvasCtx=this.canvas.getContext("2d")}catch(cK){WO.logError("plugin:DynamicBg",cK)}}},{key:"reRender",value:function(e){if(this.config.disable||this.root){this.stop();var t=this.root?this.root.parentElement:null;if(t!==e&&t.removeChild(this.root),e){this.init(e),this.renderOnce();var n=this.config.startInterval;this._checkIfCanStart()&&this.start(0,n)}else this.root=null}}},{key:"checkVideoIsSupport",value:function(e){if(!e)return null;var t=e&&e instanceof window.HTMLVideoElement?e:e.canvas?e.canvas:e.flyVideo?e.flyVideo:null;if(t&&("safari"!==eM.browser||!qO.isMSE(t)))return t;var n=t?t.tagName.toLowerCase():"";return"canvas"===n||"img"===n?t:null}},{key:"renderByPoster",value:function(){var e=this.playerConfig.poster;if(e){var t="String"===qO.typeOf(e)?e:"String"===qO.typeOf(e.poster)?e.poster:null;this.updateImg(t)}}},{key:"_checkIfCanStart",value:function(){var e=this.config.mode;return this._isLoaded&&!this.player.paused&&e!==Aj&&e!==Oj}},{key:"renderOnce",value:function(){var e=this.player.video;if(e.videoWidth&&e.videoHeight){this.videoPI=parseInt(e.videoWidth/e.videoHeight*100,10);var t=this.checkVideoIsSupport(e);t&&this.update(t,this.videoPI)}}},{key:"updateImg",value:function(e){var t=this;if(e){var n=this.canvas.getBoundingClientRect(),i=n.width,r=n.height,o=new window.Image;o.onload=function(){if(t.canvas&&!t.frameId&&!t.isStart){t.canvas.height=r,t.canvas.width=i;var e=parseInt(i/r*100,10);t.update(o,e),o=null}},o.src=e}}},{key:"update",value:function(e,t){if(this.canvas&&this.canvasCtx&&t)try{var n=this._pos,i=this.config,r=this.canvas.getBoundingClientRect(),o=r.width,a=r.height;if(o!==n.width||a!==n.height||n.pi!==t){var s=parseInt(o/a*100,10);n.pi=t,n.width!==o&&(n.width=this.canvas.width=o),n.height!==a&&(n.height=this.canvas.height=a);var l=a,c=o;s<t?c=parseInt(a*t/100,10):s>t&&(l=parseInt(100*o/t,10)),n.rwidth=c*i.multiple,n.rheight=l*i.multiple,n.x=(o-n.rwidth)/2,n.y=(a-n.rheight)/2}this.canvasFilter&&(this.canvasCtx.filter=ib(i)),this.canvasCtx.drawImage(e,n.x,n.y,n.rwidth,n.rheight)}catch(cK){WO.logError("plugin:DynamicBg",cK)}}},{key:"destroy",value:function(){this.stop(),document.removeEventListener("visibilitychange",this.onVisibilitychange),this.canvasCtx=null,this.canvas=null}},{key:"render",value:function(){return""}}],[{key:"pluginName",get:function(){return"dynamicBg"}},{key:"defaultConfig",get:function(){return{isInnerRender:!1,disable:!0,index:-1,mode:"framerate",frameRate:10,filter:"blur(50px)",startFrameCount:2,startInterval:0,addMask:!0,multiple:1.2,maskBg:"rgba(0,0,0,0.7)"}}},{key:"isSupport",get:function(){return"boolean"==typeof Mj?Mj:Mj=function(){try{return!!document.createElement("canvas").getContext}catch(cK){return!1}}()}},{key:"supportCanvasFilter",value:function(){return!("safari"===eM.browser||"firefox"===eM.browser)}}]),n}(ON),zj={LANG:"zh-cn",TEXT:{ERROR_TYPES:{network:{code:1,msg:"视频下载错误"},mse:{code:2,msg:"流追加错误"},parse:{code:3,msg:"解析错误"},format:{code:4,msg:"格式错误"},decoder:{code:5,msg:"解码错误"},runtime:{code:6,msg:"语法错误"},timeout:{code:7,msg:"播放超时"},other:{code:8,msg:"其他错误"}},HAVE_NOTHING:"没有关于音频/视频是否就绪的信息",HAVE_METADATA:"音频/视频的元数据已就绪",HAVE_CURRENT_DATA:"关于当前播放位置的数据是可用的,但没有足够的数据来播放下一帧/毫秒",HAVE_FUTURE_DATA:"当前及至少下一帧的数据是可用的",HAVE_ENOUGH_DATA:"可用数据足以开始播放",NETWORK_EMPTY:"音频/视频尚未初始化",NETWORK_IDLE:"音频/视频是活动的且已选取资源,但并未使用网络",NETWORK_LOADING:"浏览器正在下载数据",NETWORK_NO_SOURCE:"未找到音频/视频来源",MEDIA_ERR_ABORTED:"取回过程被用户中止",MEDIA_ERR_NETWORK:"网络错误",MEDIA_ERR_DECODE:"解码错误",MEDIA_ERR_SRC_NOT_SUPPORTED:"不支持的音频/视频格式",REPLAY:"重播",ERROR:"网络连接似乎出现了问题",PLAY_TIPS:"播放",PAUSE_TIPS:"暂停",PLAYNEXT_TIPS:"下一集",DOWNLOAD_TIPS:"下载",ROTATE_TIPS:"旋转",RELOAD_TIPS:"重新载入",FULLSCREEN_TIPS:"进入全屏",EXITFULLSCREEN_TIPS:"退出全屏",CSSFULLSCREEN_TIPS:"进入样式全屏",EXITCSSFULLSCREEN_TIPS:"退出样式全屏",TEXTTRACK:"字幕",PIP:"画中画",SCREENSHOT:"截图",LIVE:"正在直播",OFF:"关闭",OPEN:"开启",MINI_DRAG:"点击按住可拖动视频",MINISCREEN:"小屏幕",REFRESH_TIPS:"请试试",REFRESH:"刷新",FORWARD:"快进中",LIVE_TIP:"直播"}},Uj=te,Bj=h;Uj.JSON||(Uj.JSON={stringify:JSON.stringify});var Fj=function(e,t,n){return Bj(Uj.JSON.stringify,null,arguments)},Hj=t(Fj),jj="info",Gj=eN,Vj=function(e){uA(n,e);var t=vA(n);function n(){var e,i;aA(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return cA(fA(i=t.call.apply(t,y_(e=[this]).call(e,o))),"_recordUserActions",(function(e){var t=i._getTime(),n=VS({},e,{msg:e.msg||e.action});i._stats[jj].push(rA(rA({type:"userAction"},t),{},{payload:n}))})),cA(fA(i),"_onReset",(function(){i.reset()})),cA(fA(i),"_recordInfo",(function(e){i.info(e)})),cA(fA(i),"_downloadStats",(function(){var e=i.getStats(),t=new Blob([Hj(e)],{type:"application/json"}),n=ij.createObjectURL(t),r=document.createElement("a");r.style.display="none",r.href=n,r.download="player.txt",r.disabled=!1,r.click()})),i}return lA(n,[{key:"_getTime",value:function(){return{timestamp:Date.now(),timeFormat:(new Date).toISOString()}}},{key:"afterCreate",value:function(){this.reset(),this.on(XM,this._recordUserActions),this.on(Gj.STATS_INFO,this._recordInfo),this.on(Gj.STATS_DOWNLOAD,this._downloadStats),this.on(Gj.STATS_RESET,this._onReset)}},{key:"destroy",value:function(){this.offAll()}},{key:"downloadStats",value:function(){this._downloadStats()}},{key:"info",value:function(e){e.profile?this._infoProfile(e):this._info(e)}},{key:"_info",value:function(e){var t=this._getTime();this._stats[jj].push(rA(rA({},t),{},{payload:e}))}},{key:"_infoProfile",value:function(e){if(e&&e.startMs){var t=rA({cat:"function",dur:Date.now()-e.startMs,name:e.name||e.msg,ph:"X",pid:0,tid:0,ts:e.startMs,profile:!0},e);this._info(t)}else console.warn("infoProfile need object data, include startMs")}},{key:"reset",value:function(){var e;this._stats=(cA(e={},jj,[]),cA(e,"media",{}),e)}},{key:"getStats",value:function(){for(var e=this.player.media,t=[],n=0;n<e.buffered.length;n++)t.push({start:e.buffered.start(n),end:e.buffered.end(n)});var i={currentTime:e.currentTime,readyState:e.readyState,buffered:t,paused:e.paused,ended:e.ended};return this._stats.media=i,{raw:this._stats,timestat:this._getTimeStats(),profile:this._getProfile()}}},{key:"_getTimeStats",value:function(){var e=this._stats[jj];return W_(e).call(e,(function(e){var t,n,i=e.payload.data,r="";try{i instanceof Error?r=i.msg:void 0!==i&&(r=Hj(i))}catch(tSe){console.log("err",tSe)}return y_(t=y_(n="[".concat(e.timeFormat,"] : ")).call(n,e.payload.msg," ")).call(t,r," ")}))}},{key:"_getProfile",value:function(){var e={traceEvents:[]};return this._stats[jj].forEach((function(t){t.payload.profile&&e.traceEvents.push(t.payload)})),e}}],[{key:"pluginName",get:function(){return"stats"}},{key:"defaultConfig",get:function(){return{}}}]),n}(kN),Kj=function(e){uA(n,e);var t=vA(n);function n(){var e,i;aA(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return cA(fA(i=t.call.apply(t,y_(e=[this]).call(e,o))),"onGapJump",(function(){var e=fA(i),t=e.player,r=e.config;if(t.media.readyState!==HTMLMediaElement.HAVE_NOTHING){if(t.media.seeking){if(!i.seekingEventReceived)return}else i.seekingEventReceived=!1;if(!t.media.paused||0===t.media.currentTime||!i.hasPlayed){var o=t.media.buffered,a=r.smallGapLimit||.5,s=r.gapDetectionThreshold||.3,l=t.media.currentTime,c=i._getIndex(o,l,s);if(null!==c&&0!==c){console.log("GapJump bufferRange ",o.start(c),o.end(c));var u=o.start(c)+.1;if(!(u>t.media.duration)){var h=u-l,d=h<=a;h<n.BROWSER_GAP_TOLERANCE||d&&(!1!==r.useGapJump&&(t.media.currentTime=i.isSafari?u+.1:u),i.player&&i.player.emit("detectGap"),console.log("gapJump gapIndex",c," isGapSamll:",d," currentTime:",t.media.currentTime," jumpSize:",l-t.media.currentTime),.08!==u&&t&&t.emit("log",{type:"oneevent",end_type:"gap",vid:t.config.vid,ext:{video_postion:Math.floor(1e3*u)}}))}}}}})),i}return lA(n,[{key:"afterCreate",value:function(){var e=this;!1!==this.config.useGapJump&&(this.hasPlayed=!1,this.seekingEventReceived=!1,this.isSafari=/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),this.on(fM,this.onGapJump),this.on(oM,(function(){e.hasPlayed=!0})),this.on(uM,(function(){e.seekingEventReceived=!0})))}},{key:"_getIndex",value:function(e,t,n){if(!e||!e.length)return null;if(1===e.length&&e.end(0)-e.start(0)<1e-6)return null;for(var i=this._getBuffered(e),r=null,o=0;o<i.length;o++){if(i[o].start>t&&(0===o||i[o-1].end-t<=n)){r=o;break}}return r}},{key:"_getBuffered",value:function(e){if(!e)return[];for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t}}],[{key:"pluginName",get:function(){return"gapJump"}},{key:"defaultConfig",get:function(){return{useGapJump:!1,smallGapLimit:.5,gapDetectionThreshold:.3}}}]),n}(ON);Kj.BROWSER_GAP_TOLERANCE=.001;var Wj=function(e){uA(n,e);var t=vA(n);function n(){var e,i;aA(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return cA(fA(i=t.call.apply(t,y_(e=[this]).call(e,o))),"onWaiting",(function(){var e=fA(i).config;i.jumpCnt>e.jumpCntMax||i.timer||!1===e.useWaitingTimeoutJump||(i.timer=setTimeout(i.onJump,1e3*e.waitingTime))})),cA(fA(i),"onJump",(function(){var e=fA(i),t=e.player,n=e.config;if(clearTimeout(i.timer),i.timer=null,!(i.jumpCnt>n.jumpCntMax||!1===n.useWaitingTimeoutJump||t.media.paused&&0!==t.media.currentTime&&i.hasPlayed)){i.jumpSize=n.jumpSize*(i.jumpCnt+1),i.jumpCnt===n.jumpSize&&i.jumpSize<6&&(i.jumpSize=6);var r=t.currentTime+i.jumpSize;r>t.media.duration||(i.jumpCnt++,t.currentTime=r)}})),i}return lA(n,[{key:"afterCreate",value:function(){var e=this,t=this.config,n=t.useWaitingTimeoutJump,i=t.jumpSize;!1!==n&&(this.hasPlayed=!1,this.jumpCnt=0,this.timer=null,this.jumpSize=i,this.on(fM,this.onWaiting),this.on([aM,pM],(function(){clearTimeout(e.timer),e.timer=null,e.jumpSize=e.config.jumpSize})),this.on(oM,(function(){e.hasPlayed=!0})))}}],[{key:"pluginName",get:function(){return"waitingTimeoutJump"}},{key:"defaultConfig",get:function(){return{useWaitingTimeoutJump:!1,waitingTime:15,jumpSize:2,jumpCntMax:4}}}]),n}(ON),Yj="cdn",qj=["cdn"],Xj=function(e){uA(n,e);var t=vA(n);function n(){var e,i;aA(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return cA(fA(i=t.call.apply(t,y_(e=[this]).call(e,o))),"getSpeed",(function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Yj;if(!i.speedListCache||!i.speedListCache[t])return 0;if(i.speedListCache[t].length<=0)return 0;var n=0;return W_(e=i.speedListCache[t]).call(e,(function(e){n+=e})),Math.floor(n/i.speedListCache[t].length)})),cA(fA(i),"startTimer",(function(){qO.isMSE(i.player.video)||(i.initSpeedList(),i.cnt=0,i.timer=setTimeout(i.testSpeed,i.config.testTimeStep))})),cA(fA(i),"initSpeedList",(function(){i.speedListCache={},qj.forEach((function(e){i.speedListCache[e]=[]}))})),cA(fA(i),"_onRealSpeedChange",(function(e){e.speed&&i.appendList(e.speed,e.type||Yj)})),cA(fA(i),"testSpeed",(function(){if(clearTimeout(i.timer),i.timer=null,i.player&&i.config.openSpeed){var e=i.config,t=e.url,n=e.loadSize,r=e.testCnt,o=e.testTimeStep,a=t+(qP(t).call(t,"?")<0?"?testst=":"&testst=")+Date.now();if(!(i.cnt>=r)){i.cnt++;try{var s=(new Date).getTime(),l=null,c=new XMLHttpRequest;i.xhr=c,c.open("GET",a);var u={},h=Math.floor(10*Math.random());u.Range="bytes="+h+"-"+(n+h),u&&kT(u).forEach((function(e){c.setRequestHeader(e,u[e])})),c.onreadystatechange=function(){if(4===c.readyState){i.xhr=null,l=(new Date).getTime();var e=c.getResponseHeader("Content-Length")/1024*8,t=Math.round(1e3*e/(l-s));i.appendList(t),i.timer=setTimeout(i.testSpeed,o)}},c.send()}catch(cK){console.error(cK)}}}})),cA(fA(i),"appendList",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Yj;if(i.speedListCache&&i.speedListCache[t]){var n=i.config.saveSpeedMax;i.speedListCache[t].length>=n&&i.speedListCache[t].shift(),i.speedListCache[t].push(e);var r=fA(i).player;r&&(t===Yj?r.realTimeSpeed=e:r[i.getSpeedName("realTime",t)]=e),i.updateSpeed(t)}})),cA(fA(i),"updateSpeed",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Yj,t=i.getSpeed(e),n=fA(i).player;if(n)if(e===Yj)n.avgSpeed&&t===n.avgSpeed||(n.avgSpeed=t,n.emit(PM,{speed:t,realTimeSpeed:n.realTimeSpeed}));else{var r=i.getSpeedName("avg",e);n[r]&&t===n[r]||(n[r]=t,n.emit(PM,{speed:t,realTimeSpeed:n.realTimeSpeed}))}})),i}return lA(n,[{key:"afterCreate",value:function(){var e=this.config,t=e.openSpeed,n=e.addSpeedTypeList;(null==n?void 0:n.length)>0&&qj.push.apply(qj,yA(n)),this.initSpeedList(),this.on("real_time_speed",this._onRealSpeedChange),this.timer=null,this.cnt=0,this.xhr=null,t&&this.on([yM,IM],this.startTimer)}},{key:"getSpeedName",value:function(e,t){return e+"Speed"+t.toUpperCase()}},{key:"openSpeed",get:function(){return this.config.openSpeed},set:function(e){if(this.config.openSpeed=e,!e&&this.timer)return clearTimeout(this.timer),void(this.timer=null);if(this.config.openSpeed){if(this.timer)return;this.timer=setTimeout(this.testSpeed,this.config.testTimeStep)}}},{key:"destroy",value:function(){var e=this;this.off("real_time_speed",this._onRealSpeedChange),this.off([yM,IM],this.startTimer),qj.forEach((function(t){e.speedListCache&&e.speedListCache[t]&&(e.speedListCache[t]=[])})),this.speedListCache&&(this.speedListCache={}),clearTimeout(this.timer),this.timer=null,this.xhr&&4!==this.xhr.readyState&&(this.xhr.cancel&&this.xhr.cancel(),this.xhr=null)}}],[{key:"pluginName",get:function(){return"testspeed"}},{key:"defaultConfig",get:function(){return{openSpeed:!1,testCnt:3,loadSize:204800,testTimeStep:3e3,url:"",saveSpeedMax:5,addSpeedTypeList:[]}}}]),n}(ON),$j=function(e){uA(n,e);var t=vA(n);function n(){return aA(this,n),t.apply(this,arguments)}return lA(n,[{key:"afterCreate",value:function(){var e=this,t=this.player,n=this.config,i=t.media||t.video;(this.timer=null,this._lastDecodedFrames=0,this._currentStuckCount=0,this._lastCheckPoint=null,this._payload=[],n.disabled)||i.getVideoPlaybackQuality&&(this.on(oM,(function(){e._startTick()})),this.on(lM,(function(){e._stopTick()})),this.on(sM,(function(){e._stopTick()})),this.on(kM,(function(){e._stopTick()})))}},{key:"_startTick",value:function(){var e=this;this._stopTick(),this._timer=setTimeout((function(){e._checkDecodeFPS(),e._startTick()}),this.config.tick)}},{key:"_stopTick",value:function(){clearTimeout(this._timer),this._timer=null}},{key:"_checkBuffer",value:function(e,t){for(var n=!1,i=[],r=0;r<t.length;r++){var o=t.start(r),a=t.end(r);if(i.push({start:o,end:a}),o<=e&&e<=a-1){n=!0;break}}return{enoughBuffer:n,buffers:i}}},{key:"_checkStuck",value:function(e,t,n,i){var r=this.player.media||this.player.video,o=document.hidden,a=r.paused,s=r.readyState,l=r.currentTime,c=r.buffered;if(!(o||a||s<4)){var u=this._checkBuffer(l,c),h=u.enoughBuffer,d=u.buffers;h&&(e<=this.config.reportFrame?(this._currentStuckCount++,this._payload.push({currentTime:l,buffers:d,curDecodedFrames:e,totalVideoFrames:t,droppedVideoFrames:n,checkInterval:i}),this._currentStuckCount>=this.config.stuckCount&&(this.emit(tN,this._payload),this._reset())):this._reset())}}},{key:"_reset",value:function(){this._payload=[],this._currentStuckCount=0}},{key:"_checkDecodeFPS",value:function(){var e=this.player.media||this.player.video;if(e){var t=e.getVideoPlaybackQuality(),n=t.totalVideoFrames,i=t.droppedVideoFrames,r=performance.now();if(n&&this._lastCheckPoint){var o=n-this._lastDecodedFrames,a=r-this._lastCheckPoint;this._checkStuck(o,n,i,a)}this._lastDecodedFrames=n,this._lastCheckPoint=r}}},{key:"destroy",value:function(){this._stopTick()}}],[{key:"pluginName",get:function(){return"FpsDetect"}},{key:"defaultConfig",get:function(){return{disabled:!1,tick:1e3,stuckCount:3,reportFrame:0}}}]),n}(ON);KN.use(zj);var Zj=lA((function e(t,n){var i,r,o,a,s;aA(this,e);var l=n&&"mobile"===n.isMobileSimulateMode,c=n.isLive?[]:[vU,aU,Lj,Dj,pU],u=y_(i=[]).call(i,c,[lU,fU,kU,IU,yj,mj,sj,lj,_U,xU]),h=[dz,fz,mz,nU,_z,Ej,wj,Ij,Pz];this.plugins=y_(r=[Vj,uz]).call(r,yA(u),h,[Kj,Wj]);var d=l?"mobile":eM.device;switch(d){case"pc":(o=this.plugins).push.apply(o,[eU,Mz,kj,Xj,$j]);break;case"mobile":(a=this.plugins).push.apply(a,[Qz]);break;default:(s=this.plugins).push.apply(s,[eU,Mz,kj])}(eM.os.isIpad||"pc"===d)&&this.plugins.push(Nj),eM.os.isIpad&&this.plugins.push(Mz),this.ignores=[],this.i18n=[]})),Qj=function(e){uA(n,e);var t=vA(n);function n(){return aA(this,n),t.apply(this,arguments)}return lA(n)}(tz);cA(Qj,"defaultPreset",Zj),cA(Qj,"Util",qO),cA(Qj,"Sniffer",eM),cA(Qj,"Errors",rM),cA(Qj,"Events",nN),cA(Qj,"Plugin",ON),cA(Qj,"BasePlugin",kN),cA(Qj,"I18N",KN),cA(Qj,"STATE_CLASS",UN),cA(Qj,"InstManager",$N);var Jj={LANG:"zh-hk",TEXT:{ERROR_TYPES:{network:{code:1,msg:"視頻下載錯誤"},mse:{code:2,msg:"劉追加錯誤"},parse:{code:3,msg:"解析錯誤"},format:{code:4,msg:"格式錯誤"},decoder:{code:5,msg:"解碼錯誤"},runtime:{code:6,msg:"語法錯誤"},timeout:{code:7,msg:"播放超時"},other:{code:8,msg:"其他錯誤"}},HAVE_NOTHING:"沒有關於音頻/視頻是否就緒的信息",HAVE_METADATA:"音頻/視頻的元數據已就緒",HAVE_CURRENT_DATA:"關於當前播放位置的數據是可用的,但沒有足夠的數據來播放下壹幀/毫秒",HAVE_FUTURE_DATA:"當前及至少下壹幀的數據是可用的",HAVE_ENOUGH_DATA:"可用數據足以開始播放",NETWORK_EMPTY:"音頻/視頻尚未初始化",NETWORK_IDLE:"音頻/視頻是活動的且已選取資源,但並未使用網絡",NETWORK_LOADING:"瀏覽器正在下載數據",NETWORK_NO_SOURCE:"未找到音頻/視頻來源",MEDIA_ERR_ABORTED:"取回過程被用戶中止",MEDIA_ERR_NETWORK:"下載錯誤",MEDIA_ERR_DECODE:"解碼錯誤",MEDIA_ERR_SRC_NOT_SUPPORTED:"不支持的音頻/視頻格式",REPLAY:"重播",ERROR:"網絡連接似乎出現了問題",PLAY_TIPS:"播放",PAUSE_TIPS:"暫停",PLAYNEXT_TIPS:"下壹集",DOWNLOAD_TIPS:"下載",ROTATE_TIPS:"旋轉",RELOAD_TIPS:"重新載入",FULLSCREEN_TIPS:"進入全屏",EXITFULLSCREEN_TIPS:"退出全屏",CSSFULLSCREEN_TIPS:"進入樣式全屏",EXITCSSFULLSCREEN_TIPS:"退出樣式全屏",TEXTTRACK:"字幕",PIP:"畫中畫",SCREENSHOT:"截圖",LIVE:"正在直播",OFF:"關閉",OPEN:"開啟",MINI_DRAG:"點擊按住可拖動視頻",MINISCREEN:"小屏幕",REFRESH_TIPS:"請試試",REFRESH:"刷新",FORWARD:"快进中",LIVE_TIP:"直播"}},eG={LANG:"jp",TEXT:{ERROR_TYPES:{network:{code:1,msg:"ビデオダウンロードエラー"},mse:{code:2,msg:"ストリーム追加エラー"},parse:{code:3,msg:"解析エラー"},format:{code:4,msg:"間違ったフォーマット"},decoder:{code:5,msg:"デコードエラー"},runtime:{code:6,msg:"文法エラー"},timeout:{code:7,msg:"再生タイムアウト"},other:{code:8,msg:"その他のエラー"}},HAVE_NOTHING:"オーディオ/ビデオが準備できているか情報がありません",HAVE_METADATA:"オーディオ/ビデオのメタデータは準備できています",HAVE_CURRENT_DATA:"現在の再生位置に関するデータは利用可能ですが、次のフレーム/ミリ秒を再生するのに十分なデータがありません",HAVE_FUTURE_DATA:"現在、少なくとも次のフレームのデータが利用可能です",HAVE_ENOUGH_DATA:"利用可能なデータは再生を開始するのに十分です",NETWORK_EMPTY:"オーディオ/ビデオが初期化されていません",NETWORK_IDLE:"オーディオ/ビデオはアクティブでリソースが選択されていますが、ネットワークが使用されていません",NETWORK_LOADING:"ブラウザーはデータをダウンロードしています",NETWORK_NO_SOURCE:"オーディオ/ビデオ のソースが見つかりません",MEDIA_ERR_ABORTED:"ユーザーによってフェッチプロセスが中止されました",MEDIA_ERR_NETWORK:"ダウンロード中にエラーが発生しました",MEDIA_ERR_DECODE:"デコード中にエラーが発生しました",MEDIA_ERR_SRC_NOT_SUPPORTED:"オーディオ/ビデオ の形式がサポートされていません",REPLAY:"リプレイ",ERROR:"ネットワークの接続に問題が発生しました",PLAY_TIPS:"プレイ",PAUSE_TIPS:"一時停止",PLAYNEXT_TIPS:"次をプレイ",DOWNLOAD_TIPS:"ダウンロード",ROTATE_TIPS:"回転",RELOAD_TIPS:"再読み込み",FULLSCREEN_TIPS:"フルスクリーン",EXITFULLSCREEN_TIPS:"フルスクリーンを終了",CSSFULLSCREEN_TIPS:"シアターモード",EXITCSSFULLSCREEN_TIPS:"シアターモードを終了",TEXTTRACK:"字幕",PIP:"ミニプレーヤー",SCREENSHOT:"スクリーンショット",LIVE:"生放送",OFF:"オフ",OPEN:"開いた",MINI_DRAG:"ボタンを押して働画をドラッグする",MINISCREEN:"小さな画面",REFRESH:"リフレッシュ",REFRESH_TIPS:"してみてください",FORWARD:"早送り",LIVE_TIP:"生放送"}},tG=t(fo.f("toStringTag")),nG=In,iG=w;D.f;var rG=Vn,oG=Ji,aG=T_,sG=q,lG=x_,cG=iG("".startsWith),uG=iG("".slice),hG=Math.min;nG({target:"String",proto:!0,forced:!lG("startsWith")},{startsWith:function(e){var t=oG(sG(this));aG(e);var n=rG(hG(arguments.length>1?arguments[1]:void 0,t.length)),i=oG(e);return cG?cG(t,i,n):uG(t,n,n+i.length)===i}});var dG,fG=Zu("String").startsWith,pG=se,vG=fG,gG=String.prototype,yG=t((function(e){var t=e.startsWith;return"string"==typeof e||e===gG||pG(gG,e)&&t===gG.startsWith?vG:t})),mG={origin:{index:1,next:"uhd",prev:null},uhd:{index:2,next:"hd",prev:"origin"},hd:{index:3,next:"sd",prev:"uhd"},sd:{index:4,next:"ld",prev:"hd"},ld:{index:5,next:"ao",prev:"sd"},ao:{index:6,next:null,prev:"ld"}},_G=["zh","en","jp","zh-hk"],bG={NORMAL:0,INNER:1,FULLSCREEN:2},kG=function(e){return e[e.VALID=10]="VALID",e[e.TRANSCODING=30]="TRANSCODING",e[e.NO_SET_AUDIT=1e3]="NO_SET_AUDIT",e[e.OFFLINE=1002]="OFFLINE",e[e.NO_AUTH=2001]="NO_AUTH",e[e.UN_AUTH=2002]="UN_AUTH",e}(kG||{}),EG=5e9,wG={jp:"キャンセル",en:"Cancel",zh:"取消","zh-hk":"取消"},SG=function(e){return e.WIDEVINE="widevine",e.FAIRPLAY="fairplay",e.PLAYREADY="playready",e}(SG||{}),TG="undefined"!=typeof window&&window.location&&qP(dG=window.location.href).call(dG,"veplayerdebugger=1")>-1,CG="color: #fff; background-color: #5f5f5f;",xG="color: #fff; background-color: #f53f3f;",DG="color: #fff; background-color: #ff7d00;",IG="color: #fff; background: #4281ff",RG="%c VePlayer %c ".concat("1.10.0"," "),LG={config:{debug:TG?3:1},log: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&&(t=console).log.apply(t,y_(n=[RG,CG,IG,e]).call(n,r))},warn: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&&(t=console).warn.apply(t,y_(n=[RG,DG,IG,e]).call(n,r))},error: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];(t=console)[i].apply(t,y_(n=[RG,xG,IG,e]).call(n,o))}}};localStorage.getItem("velog")&&(LG.config.debug=3);var PG=r;In({global:!0,forced:PG.globalThis!==PG},{globalThis:PG});var AG=t(r),OG={exports:{}};!function(e,t){e.exports=function(){var e=1e3,t=6e4,n=36e5,i="millisecond",r="second",o="minute",a="hour",s="day",l="week",c="month",u="quarter",h="year",d="date",f="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},y=function(e,t,n){var i=String(e);return!i||i.length>=t?e:""+Array(t+1-i.length).join(n)+e},m={s:y,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),i=Math.floor(n/60),r=n%60;return(t<=0?"+":"-")+y(i,2,"0")+":"+y(r,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var i=12*(n.year()-t.year())+(n.month()-t.month()),r=t.clone().add(i,c),o=n-r<0,a=t.clone().add(i+(o?-1:1),c);return+(-(i+(n-r)/(o?r-a:a-r))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:h,w:l,d:s,D:d,h:a,m:o,s:r,ms:i,Q:u}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},_="en",b={};b[_]=g;var k=function(e){return e instanceof T},E=function e(t,n,i){var r;if(!t)return _;if("string"==typeof t){var o=t.toLowerCase();b[o]&&(r=o),n&&(b[o]=n,r=o);var a=t.split("-");if(!r&&a.length>1)return e(a[0])}else{var s=t.name;b[s]=t,r=s}return!i&&r&&(_=r),r||!i&&_},w=function(e,t){if(k(e))return e.clone();var n="object"==Du(t)?t:{};return n.date=e,n.args=arguments,new T(n)},S=m;S.l=E,S.i=k,S.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var T=function(){function g(e){this.$L=E(e.locale,null,!0),this.parse(e)}var y=g.prototype;return y.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(S.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var i=t.match(p);if(i){var r=i[2]-1||0,o=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,o)):new Date(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,o)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},y.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},y.$utils=function(){return S},y.isValid=function(){return!(this.$d.toString()===f)},y.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},y.isAfter=function(e,t){return w(e)<this.startOf(t)},y.isBefore=function(e,t){return this.endOf(t)<w(e)},y.$g=function(e,t,n){return S.u(e)?this[t]:this.set(n,e)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(e,t){var n=this,i=!!S.u(t)||t,u=S.p(e),f=function(e,t){var r=S.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return i?r:r.endOf(s)},p=function(e,t){var r;return S.w(n.toDate()[e].apply(n.toDate("s"),Sx(r=i?[0,0,0,0]:[23,59,59,999]).call(r,t)),n)},v=this.$W,g=this.$M,y=this.$D,m="set"+(this.$u?"UTC":"");switch(u){case h:return i?f(1,0):f(31,11);case c:return i?f(1,g):f(0,g+1);case l:var _=this.$locale().weekStart||0,b=(v<_?v+7:v)-_;return f(i?y-b:y+(6-b),g);case s:case d:return p(m+"Hours",0);case a:return p(m+"Minutes",1);case o:return p(m+"Seconds",2);case r:return p(m+"Milliseconds",3);default:return this.clone()}},y.endOf=function(e){return this.startOf(e,!1)},y.$set=function(e,t){var n,l=S.p(e),u="set"+(this.$u?"UTC":""),f=(n={},n[s]=u+"Date",n[d]=u+"Date",n[c]=u+"Month",n[h]=u+"FullYear",n[a]=u+"Hours",n[o]=u+"Minutes",n[r]=u+"Seconds",n[i]=u+"Milliseconds",n)[l],p=l===s?this.$D+(t-this.$W):t;if(l===c||l===h){var v=this.clone().set(d,1);v.$d[f](p),v.init(),this.$d=v.set(d,Math.min(this.$D,v.daysInMonth())).$d}else f&&this.$d[f](p);return this.init(),this},y.set=function(e,t){return this.clone().$set(e,t)},y.get=function(e){return this[S.p(e)]()},y.add=function(i,u){var d,f=this;i=Number(i);var p=S.p(u),v=function(e){var t=w(f);return S.w(t.date(t.date()+Math.round(e*i)),f)};if(p===c)return this.set(c,this.$M+i);if(p===h)return this.set(h,this.$y+i);if(p===s)return v(1);if(p===l)return v(7);var g=(d={},d[o]=t,d[a]=n,d[r]=e,d)[p]||1,y=this.$d.getTime()+i*g;return S.w(y,this)},y.subtract=function(e,t){return this.add(-1*e,t)},y.format=function(e){var t,n=this,i=this.$locale();if(!this.isValid())return i.invalidDate||f;var r=e||"YYYY-MM-DDTHH:mm:ssZ",o=S.z(this),a=this.$H,s=this.$m,l=this.$M,c=i.weekdays,u=i.months,h=function(e,t,i,o){var a;return e&&(e[t]||e(n,r))||Sx(a=i[t]).call(a,0,o)},d=function(e){return S.s(a%12||12,e,"0")},p=i.meridiem||function(e,t,n){var i=e<12?"AM":"PM";return n?i.toLowerCase():i},g={YY:Sx(t=String(this.$y)).call(t,-2),YYYY:this.$y,M:l+1,MM:S.s(l+1,2,"0"),MMM:h(i.monthsShort,l,u,3),MMMM:h(u,l),D:this.$D,DD:S.s(this.$D,2,"0"),d:String(this.$W),dd:h(i.weekdaysMin,this.$W,c,2),ddd:h(i.weekdaysShort,this.$W,c,3),dddd:c[this.$W],H:String(a),HH:S.s(a,2,"0"),h:d(1),hh:d(2),a:p(a,s,!0),A:p(a,s,!1),m:String(s),mm:S.s(s,2,"0"),s:String(this.$s),ss:S.s(this.$s,2,"0"),SSS:S.s(this.$ms,3,"0"),Z:o};return r.replace(v,(function(e,t){return t||g[e]||o.replace(":","")}))},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(i,d,f){var p,v=S.p(d),g=w(i),y=(g.utcOffset()-this.utcOffset())*t,m=this-g,_=S.m(this,g);return _=(p={},p[h]=_/12,p[c]=_,p[u]=_/3,p[l]=(m-y)/6048e5,p[s]=(m-y)/864e5,p[a]=m/n,p[o]=m/t,p[r]=m/e,p)[v]||m,f?_:S.a(_)},y.daysInMonth=function(){return this.endOf(c).$D},y.$locale=function(){return b[this.$L]},y.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),i=E(e,t,!0);return i&&(n.$L=i),n},y.clone=function(){return S.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},g}(),C=T.prototype;return w.prototype=C,[["$ms",i],["$s",r],["$m",o],["$H",a],["$W",s],["$M",c],["$y",h],["$D",d]].forEach((function(e){C[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||(e(t,T,w),e.$i=!0),w},w.locale=E,w.isDayjs=k,w.unix=function(e){return w(1e3*e)},w.en=b[_],w.Ls=b,w.p={},w}()}(OG);var MG=t(OG.exports),NG={exports:{}};!function(e,t){var n,i,r;e.exports=(n="minute",i=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g,function(e,t,o){var a=t.prototype;o.utc=function(e){return new t({date:e,utc:!0,args:arguments})},a.utc=function(e){var t=o(this.toDate(),{locale:this.$L,utc:!0});return e?t.add(this.utcOffset(),n):t},a.local=function(){return o(this.toDate(),{locale:this.$L,utc:!1})};var s=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var l=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else l.call(this)};var c=a.utcOffset;a.utcOffset=function(e,t){var o=this.$utils().u;if(o(e))return this.$u?0:o(this.$offset)?c.call(this):this.$offset;if("string"==typeof e&&null===(e=function(e){void 0===e&&(e="");var t=e.match(i);if(!t)return null;var n=(""+t[0]).match(r)||["-",0,0],o=n[0],a=60*+n[1]+ +n[2];return 0===a?0:"+"===o?a:-a}(e)))return this;var a=Math.abs(e)<=16?60*e:e,s=this;if(t)return s.$offset=a,s.$u=0===e,s;if(0!==e){var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(a+l,n)).$offset=a,s.$x.$localOffset=l}else s=this.utc();return s};var u=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return u.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var h=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?o(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():h.call(this)};var d=a.diff;a.diff=function(e,t,n){if(e&&this.$u===e.$u)return d.call(this,e,t,n);var i=this.local(),r=o(e).local();return d.call(i,r,t,n)}})}(NG);var zG=t(NG.exports),UG=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){void 0!==ZP&&tG&&Object.defineProperty(e,tG,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==Du(e)&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=22)}([function(e,t,n){var i=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=i)},function(e,t,n){var i=n(12)("wks"),r=n(13),o=n(0).Symbol,a="function"==typeof o;(e.exports=function(e){return i[e]||(i[e]=a&&o[e]||(a?o:r)("Symbol."+e))}).store=i},function(e,t,n){var i=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=i)},function(e,t,n){var i=n(4);e.exports=function(e){if(!i(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){var i="function"==typeof ZP&&"symbol"==Du(QP)?function(e){return Du(e)}:function(e){return e&&"function"==typeof ZP&&e.constructor===ZP&&e!==ZP.prototype?"symbol":Du(e)};e.exports=function(e){return"object"===(void 0===e?"undefined":i(e))?null!==e:"function"==typeof e}},function(e,t,n){var i=n(6);e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,r){return e.call(t,n,i,r)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){e.exports=!n(15)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,n){var i={}.toString;e.exports=function(e){var t;return Sx(t=i.call(e)).call(t,8,-1)}},function(e,t,n){var i=n(3),r=n(26),o=n(27),a=Object.defineProperty;t.f=n(7)?Object.defineProperty:function(e,t,n){if(i(e),t=o(t,!0),i(n),r)try{return a(e,t,n)}catch(s){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){e.exports=!1},function(e,t,n){var i=n(8),r=n(1)("toStringTag"),o="Arguments"==i(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=Object(e),r))?n:o?i(t):"Object"==(a=i(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){var i=n(2),r=n(0),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:i.version,mode:n(10)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){var i=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++i+r).toString(36))}},function(e,t,n){var i=n(9),r=n(28);e.exports=n(7)?function(e,t,n){return i.f(e,t,r(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,n){var i=n(4),r=n(0).document,o=i(r)&&i(r.createElement);e.exports=function(e){return o?r.createElement(e):{}}},function(e,t,n){var i=n(0),r=n(14),o=n(18),a=n(13)("src"),s=n(29),l=(""+s).split("toString");n(2).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var c="function"==typeof n;c&&(o(n,"name")||r(n,"name",t)),e[t]!==n&&(c&&(o(n,a)||r(n,a,e[t]?""+e[t]:l.join(String(t)))),e===i?e[t]=n:s?e[t]?e[t]=n:r(e,t,n):(delete e[t],r(e,t,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[a]||s.call(this)}))},function(e,t,n){var i={}.hasOwnProperty;e.exports=function(e,t){return i.call(e,t)}},function(e,t,n){e.exports={}},function(e,t,n){var i,r,o,a=n(5),s=n(38),l=n(39),c=n(16),u=n(0),h=u.process,d=u.setImmediate,f=u.clearImmediate,p=u.MessageChannel,v=u.Dispatch,g=0,y={},m=function(){var e=+this;if(y.hasOwnProperty(e)){var t=y[e];delete y[e],t()}},_=function(e){m.call(e.data)};d&&f||(d=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return y[++g]=function(){s("function"==typeof e?e:Function(e),t)},i(g),g},f=function(e){delete y[e]},"process"==n(8)(h)?i=function(e){h.nextTick(a(m,e,1))}:v&&v.now?i=function(e){v.now(a(m,e,1))}:p?(o=(r=new p).port2,r.port1.onmessage=_,i=a(o.postMessage,o,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(i=function(e){u.postMessage(e+"","*")},u.addEventListener("message",_,!1)):i="onreadystatechange"in c("script")?function(e){l.appendChild(c("script")).onreadystatechange=function(){l.removeChild(this),m.call(e)}}:function(e){setTimeout(a(m,e,1),0)}),e.exports={set:d,clear:f}},function(e,t,n){var i=n(6);function r(e){var t,n;this.promise=new e((function(e,i){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=i})),this.resolve=i(t),this.reject=i(n)}e.exports.f=function(e){return new r(e)}},function(e,t,n){e.exports=n(23)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),n(24);var i,r=(i=n(48))&&i.__esModule?i:{default:i};t.default={url:r.default},e.exports=t.default},function(e,t,n){var i,r,o,a,s=n(10),l=n(0),c=n(5),u=n(11),h=n(25),d=n(4),f=n(6),p=n(30),v=n(31),g=n(37),y=n(20).set,m=n(40)(),_=n(21),b=n(41),k=n(42),E=n(43),w=l.TypeError,S=l.process,T=S&&S.versions,C=T&&T.v8||"",x=l.Promise,D="process"==u(S),I=function(){},R=r=_.f,L=!!function(){try{var e=x.resolve(1),t=(e.constructor={})[n(1)("species")]=function(e){e(I,I)};return(D||"function"==typeof PromiseRejectionEvent)&&e.then(I)instanceof t&&0!==qP(C).call(C,"6.6")&&-1===qP(k).call(k,"Chrome/66")}catch(i){}}(),P=function(e){var t;return!(!d(e)||"function"!=typeof(t=e.then))&&t},A=function(e,t){if(!e._n){e._n=!0;var n=e._c;m((function(){for(var i=e._v,r=1==e._s,o=0,a=function(t){var n,o,a,s=r?t.ok:t.fail,l=t.resolve,c=t.reject,u=t.domain;try{s?(r||(2==e._h&&N(e),e._h=1),!0===s?n=i:(u&&u.enter(),n=s(i),u&&(u.exit(),a=!0)),n===t.promise?c(w("Promise-chain cycle")):(o=P(n))?o.call(n,l,c):l(n)):c(i)}catch(h){u&&!a&&u.exit(),c(h)}};n.length>o;)a(n[o++]);e._c=[],e._n=!1,t&&!e._h&&O(e)}))}},O=function(e){y.call(l,(function(){var t,n,i,r=e._v,o=M(e);if(o&&(t=b((function(){D?S.emit("unhandledRejection",r,e):(n=l.onunhandledrejection)?n({promise:e,reason:r}):(i=l.console)&&i.error&&i.error("Unhandled promise rejection",r)})),e._h=D||M(e)?2:1),e._a=void 0,o&&t.e)throw t.v}))},M=function(e){return 1!==e._h&&0===(e._a||e._c).length},N=function(e){y.call(l,(function(){var t;D?S.emit("rejectionHandled",e):(t=l.onrejectionhandled)&&t({promise:e,reason:e._v})}))},z=function(e){var t,n=this;n._d||(n._d=!0,(n=n._w||n)._v=e,n._s=2,n._a||(n._a=Sx(t=n._c).call(t)),A(n,!0))},U=function e(t){var n,i=this;if(!i._d){i._d=!0,i=i._w||i;try{if(i===t)throw w("Promise can't be resolved itself");(n=P(t))?m((function(){var r={_w:i,_d:!1};try{n.call(t,c(e,r,1),c(z,r,1))}catch(o){z.call(r,o)}})):(i._v=t,i._s=1,A(i,!1))}catch(r){z.call({_w:i,_d:!1},r)}}};L||(x=function(e){p(this,x,"Promise","_h"),f(e),i.call(this);try{e(c(U,this,1),c(z,this,1))}catch(t){z.call(this,t)}},(i=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(44)(x.prototype,{then:function(e,t){var n=R(g(this,x));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=D?S.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&A(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new i;this.promise=e,this.resolve=c(U,e,1),this.reject=c(z,e,1)},_.f=R=function(e){return e===x||e===a?new o(e):r(e)}),h(h.G+h.W+h.F*!L,{Promise:x}),n(45)(x,"Promise"),n(46)("Promise"),a=n(2).Promise,h(h.S+h.F*!L,"Promise",{reject:function(e){var t=R(this);return(0,t.reject)(e),t.promise}}),h(h.S+h.F*(s||!L),"Promise",{resolve:function(e){return E(s&&this===a?x:this,e)}}),h(h.S+h.F*!(L&&n(47)((function(e){x.all(e).catch(I)}))),"Promise",{all:function(e){var t=this,n=R(t),i=n.resolve,r=n.reject,o=b((function(){var n=[],o=0,a=1;v(e,!1,(function(e){var s=o++,l=!1;n.push(void 0),a++,t.resolve(e).then((function(e){l||(l=!0,n[s]=e,--a||i(n))}),r)})),--a||i(n)}));return o.e&&r(o.v),n.promise},race:function(e){var t=this,n=R(t),i=n.reject,r=b((function(){v(e,!1,(function(e){t.resolve(e).then(n.resolve,i)}))}));return r.e&&i(r.v),n.promise}})},function(e,t,n){var i=n(0),r=n(2),o=n(14),a=n(17),s=n(5),l=function e(t,n,l){var c,u,h,d,f=t&e.F,p=t&e.G,v=t&e.P,g=t&e.B,y=p?i:t&e.S?i[n]||(i[n]={}):(i[n]||{}).prototype,m=p?r:r[n]||(r[n]={}),_=m.prototype||(m.prototype={});for(c in p&&(l=n),l)h=((u=!f&&y&&void 0!==y[c])?y:l)[c],d=g&&u?s(h,i):v&&"function"==typeof h?s(Function.call,h):h,y&&a(y,c,h,t&e.U),m[c]!=h&&o(m,c,d),v&&_[c]!=h&&(_[c]=h)};i.core=r,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t,n){e.exports=!n(7)&&!n(15)((function(){return 7!=Object.defineProperty(n(16)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var i=n(4);e.exports=function(e,t){if(!i(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!i(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){e.exports=n(12)("native-function-to-string",Function.toString)},function(e,t,n){e.exports=function(e,t,n,i){if(!(e instanceof t)||void 0!==i&&i in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var i=n(5),r=n(32),o=n(33),a=n(3),s=n(34),l=n(36),c={},u={},h=e.exports=function(e,t,n,h,d){var f,p,v,g,y=d?function(){return e}:l(e),m=i(n,h,t?2:1),_=0;if("function"!=typeof y)throw TypeError(e+" is not iterable!");if(o(y)){for(f=s(e.length);f>_;_++)if((g=t?m(a(p=e[_])[0],p[1]):m(e[_]))===c||g===u)return g}else for(v=y.call(e);!(p=v.next()).done;)if((g=r(v,m,p.value,t))===c||g===u)return g};h.BREAK=c,h.RETURN=u},function(e,t,n){var i=n(3);e.exports=function(e,t,n,r){try{return r?t(i(n)[0],n[1]):t(n)}catch(a){var o=e.return;throw void 0!==o&&i(o.call(e)),a}}},function(e,t,n){var i=n(19),r=n(1)("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||o[r]===e)}},function(e,t,n){var i=n(35),r=Math.min;e.exports=function(e){return e>0?r(i(e),9007199254740991):0}},function(e,t,n){var i=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:i)(e)}},function(e,t,n){var i=n(11),r=n(1)("iterator"),o=n(19);e.exports=n(2).getIteratorMethod=function(e){if(null!=e)return e[r]||e["@@iterator"]||o[i(e)]}},function(e,t,n){var i=n(3),r=n(6),o=n(1)("species");e.exports=function(e,t){var n,a=i(e).constructor;return void 0===a||null==(n=i(a)[o])?t:r(n)}},function(e,t,n){e.exports=function(e,t,n){var i=void 0===n;switch(t.length){case 0:return i?e():e.call(n);case 1:return i?e(t[0]):e.call(n,t[0]);case 2:return i?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return i?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return i?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var i=n(0).document;e.exports=i&&i.documentElement},function(e,t,n){var i=n(0),r=n(20).set,o=i.MutationObserver||i.WebKitMutationObserver,a=i.process,s=i.Promise,l="process"==n(8)(a);e.exports=function(){var e,t,n,c=function(){var i,r;for(l&&(i=a.domain)&&i.exit();e;){r=e.fn,e=e.next;try{r()}catch(o){throw e?n():t=void 0,o}}t=void 0,i&&i.enter()};if(l)n=function(){a.nextTick(c)};else if(!o||i.navigator&&i.navigator.standalone)if(s&&s.resolve){var u=s.resolve(void 0);n=function(){u.then(c)}}else n=function(){r.call(i,c)};else{var h=!0,d=document.createTextNode("");new o(c).observe(d,{characterData:!0}),n=function(){d.data=h=!h}}return function(i){var r={fn:i,next:void 0};t&&(t.next=r),e||(e=r,n()),t=r}}},function(e,t,n){e.exports=function(e){try{return{e:!1,v:e()}}catch(t){return{e:!0,v:t}}}},function(e,t,n){var i=n(0).navigator;e.exports=i&&i.userAgent||""},function(e,t,n){var i=n(3),r=n(4),o=n(21);e.exports=function(e,t){if(i(e),r(t)&&t.constructor===e)return t;var n=o.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){var i=n(17);e.exports=function(e,t,n){for(var r in t)i(e,r,t[r],n);return e}},function(e,t,n){var i=n(9).f,r=n(18),o=n(1)("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,o)&&i(e,o,{configurable:!0,value:t})}},function(e,t,n){var i=n(0),r=n(9),o=n(7),a=n(1)("species");e.exports=function(e){var t=i[e];o&&t&&!t[a]&&r.f(t,a,{configurable:!0,get:function(){return this}})}},function(e,t,n){var i=n(1)("iterator"),r=!1;try{var o=[7][i]();o.return=function(){r=!0},tA(o,(function(){throw 2}))}catch(a){}e.exports=function(e,t){if(!t&&!r)return!1;var n=!1;try{var o=[7],a=o[i]();a.next=function(){return{done:n=!0}},o[i]=function(){return a},e(o)}catch(s){}return n}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof ZP&&"symbol"==Du(QP)?function(e){return Du(e)}:function(e){return e&&"function"==typeof ZP&&e.constructor===ZP&&e!==ZP.prototype?"symbol":Du(e)};t.default=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!e||!t)return rb.reject("vid, host and token can't be empty");var s=void 0;try{s=(0,o.getUri)(e,t,n,r)}catch(l){return rb.reject(l.message)}return new a.default({type:"json",method:"GET",url:s}).then((function(e){var t=void 0;if(e&&e.response)switch(i(e.response)){case"string":t=JSON.parse(e.response).Result;break;case"object":t=e.response.Result;break;default:t=e.response}else t=e;return t}))};var r,o=n(49),a=(r=n(51))&&r.__esModule?r:{default:r};e.exports=t.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getUri=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments[3];try{e=JSON.parse((0,i.decode)(e))}catch(s){throw new Error("base64 decode error: "+s.message)}!1===o.jointSsl||r(n,"ssl")||r(n,"Ssl")||(n.Ssl=1);var a=(/^http/.test(t)?t:"//"+t)+"?"+e.GetPlayInfoToken+function(e){var t=[];for(var n in e)r(e,n)&&t.push(n+"="+e[n]);return t.length>0?"&"+t.join("&"):""}(n);return a};var i=n(50),r=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e){var t=void 0,n=void 0,i=void 0,r=void 0,o=void 0,a=void 0,s=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1],l=e.length;for(o=0,a="";o<l;){do{t=s[255&e.charCodeAt(o++)]}while(o<l&&-1===t);if(-1===t)break;do{n=s[255&e.charCodeAt(o++)]}while(o<l&&-1===n);if(-1===n)break;a+=String.fromCharCode(t<<2|(48&n)>>4);do{if(61==(i=255&e.charCodeAt(o++)))return a;i=s[i]}while(o<l&&-1===i);if(-1===i)break;a+=String.fromCharCode((15&n)<<4|(60&i)>>2);do{if(61==(r=255&e.charCodeAt(o++)))return a;r=s[r]}while(o<l&&-1===r);if(-1===r)break;a+=String.fromCharCode((3&i)<<6|r)}return a}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=t.url,i=t.method,r=void 0===i?"GET":i,o=t.data,a=void 0===o?{}:o,s=t.headers,l=void 0===s?{}:s;return new rb((function(e,t){var i=new window.XMLHttpRequest,o=r.toUpperCase(),s=[];if("GET"!==o)throw new Error("xhr "+o+" is not supported");for(var c in a)s.push(c+"="+a[c]);for(var u in i.open(o,""+n,!0),i.responseType="",l)Object.prototype.hasOwnProperty.call(l,u)&&i.setRequestHeader(u,""+l[u]);i.onload=function(){200===i.status||206===i.status?e(i):t(i)},i.onerror=i.ontimeout=function(){return t(i)},i.send()}))},e.exports=t.default}]),BG=t(UG);MG.extend(zG);var FG=function(e){return e.VIDEO="video",e.EVIDEO="evideo",e.DRM_EVIDEO="drm_evideo",e}(FG||{});function HG(e){try{return JSON.parse(e)}catch(cK){return LG.warn("[utils/json] decode fail: ".concat(e),cK),null}}function jG(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GetPlayInfoToken";if(e){var n={},i=HG(window.atob(e));if(i&&"string"==typeof i[t]){var r=i[t].split("&");W_(r).call(r,(function(e){var t=e.split("=");t[0]&&t[1]&&(n[t[0]]=t[1])}))}return n}}function GG(e){var t={},n=decodeURIComponent(e).split("&");return W_(n).call(n,(function(e){var n=e.split("=");n[0]&&n[1]&&(t[decodeURIComponent(n[0])]=decodeURIComponent(n[1]))})),t}var VG=function(e){var t,n;if(null==e||!e.playAuthToken)return!1;var i=jG(null==e?void 0:e.playAuthToken),r=null!==(t=null==i||null===(n=i.FileType)||void 0===n?void 0:n.toLowerCase())&&void 0!==t?t:"video";return!!i&&("evideo"===r||"eaudio"===r)},KG=function(e){var t,n,i;if(null!=e&&e.playAuthToken){var r,o=jG(null==e?void 0:e.playAuthToken),a=null!==(t=null==o||null===(n=o.FileType)||void 0===n?void 0:n.toLowerCase())&&void 0!==t?t:"video",s=null==o||null===(i=o.Format)||void 0===i?void 0:i.toLowerCase();return s||(F_(r=wb(FG)).call(r,a)?FR.MP4:HR.M4A)}},WG=function(e){if(!e["X-Expires"]||!e["X-Date"])return!1;var t=parseInt(e["X-Expires"]);if(isNaN(t))return!1;var n=e["X-Date"].replace(/T/g," ").replace(/Z/g,""),i=MG.utc(n,"YYYYMMDD hhmmss");return!!i.isValid()&&i.add(t,"seconds").isBefore(MG())};function YG(e,t){var n=["240p","360p","480p","540p","720p","1080p","2k","4k","od","oe"],i=e.Definition,r=t.Definition;if(F_(n).call(n,i)&&F_(n).call(n,r)){var o=JS(n).call(n,(function(e){return e.toLocaleLowerCase()===i.toLocaleLowerCase()}));return JS(n).call(n,(function(e){return e.toLocaleLowerCase()===r.toLocaleLowerCase()}))-o}return t.Bitrate&&e.Bitrate?t.Bitrate-e.Bitrate:-1}function qG(e){var t=e.playAuthToken,n=e.playDomain,i=e.reqParams,r=void 0===i?{}:i,o=e.definitionMap,a=e.needThumbs,s=void 0!==a&&a,l=e.needBarrageMask,c=void 0!==l&&l,u=e.autoDemoteDefinition,h=e.autoDemoteDefinitionTextKey;if(t){var d=dp(dp({},r),{},{NeedThumbs:s?1:0,NeedBarrageMask:c?1:0});return new rb((function(e,i){BG.url(t,n,d).then((function(t){var n=t.Data||t,i=n.Status,r=n.PlayInfoList,a=void 0===r?[]:r,s=n.PosterUrl,l=n.Vid,c=n.Duration,d=n.BarrageMaskUrl,f=n.ThumbInfoList,p=void 0===f?[]:f,v=n.EnableAdaptive,g=n.AdaptiveBitrateStreamingInfo;if(i===kG.VALID&&a.length){var y,m,_=FO(y=W_(a).call(a,(function(e){var t;return dp(dp({vid:l,url:e.MainPlayUrl,streamType:e.Format,backupUrl:e.BackupPlayUrl,backUrlList:[e.BackupPlayUrl],fileType:e.FileType,format:e.Format,bitrate:e.Bitrate,size:e.Size,kid:e.PlayAuthId,vwidth:e.Width,vheight:e.Height,vtype:null===(t=e.Format)||void 0===t?void 0:t.toLocaleUpperCase(),codec:e.Codec,urlExpireTimestamp:SV(e.MainUrlExpire,10,EG),drmType:e.DrmType},e),oV(e,{definitionMap:o,autoDemoteDefinition:u,autoDemoteDefinitionTextKey:h}))}))).call(y,YG);e({playList:_,type:null===(m=_[0])||void 0===m?void 0:m.Format,poster:s,vid:l,duration:c,dashOpts:t.Data?t:{Data:dp(dp({},t),{},{VideoID:l})},thumbs:p,barrageMaskUrl:d,enableAdaptive:v,adaptiveBitrateStreamingInfo:g})}else e({playList:[],poster:s,vid:l,duration:c,dashOpts:t.Data?t:{Data:t},thumbs:p,barrageMaskUrl:d,enableAdaptive:v,adaptiveBitrateStreamingInfo:g}),LG.error("HAS NO VIDEO INFORMATION CORRECTLY, PLEASE CHECK THE TOKEN.")})).catch((function(e){LG.log("err",e),i(e)}))}))}return rb.resolve(void 0)}function XG(e,t,n,i){return $G.apply(this,arguments)}function $G(){return($G=d_(u_().mark((function e(t,n,i,r){return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t();case 3:case 15:return e.abrupt("return",e.sent);case 6:if(e.prev=6,e.t0=e.catch(0),!--n||!i(e.t0)){e.next=12;break}return e.abrupt("return",XG(t,n,i,r));case 12:if(!r||"function"!=typeof r){e.next=16;break}return e.next=15,r(e.t0);case 16:throw e.t0;case 17:case"end":return e.stop()}}),e,null,[[0,6]])})))).apply(this,arguments)}function ZG(e,t,n,i){var r;return n+"/?"+i+"&"+W_(r=MT({ThirdPartyDrmType:e,Kid:t})).call(r,(function(e){var t,n=IS(e,2),i=n[0],r=n[1];return Array.isArray(r)?W_(r).call(r,(function(e){var t;return y_(t="".concat(encodeURIComponent(i),"=")).call(t,encodeURIComponent(e))})).join("&"):y_(t="".concat(encodeURIComponent(i),"=")).call(t,encodeURIComponent(r))})).join("&")}var QG="__veplayer_";function JG(){try{return Math.round(window.performance.now())}catch(tSe){return(new Date).getTime()}}var eV=function(e){return e[e.DEFAULT=0]="DEFAULT",e[e.ERROR=-1]="ERROR",e[e.TIMEOUT=-2]="TIMEOUT",e}(eV||{});function tV(e,t){return new rb((function(n,i){try{e||i(new Error("url is undefined"));var r=JG(),o=r,a=new window.XMLHttpRequest,s={status:0,statusText:"",connectTime:0,raw:a};a.open("get",e),a.onreadystatechange=function(){2===a.readyState&&(s.headers=function(e){var t={};if(e instanceof window.XMLHttpRequest)try{var n=e.getAllResponseHeaders();nO(n).call(n).split(/[\r\n]+/).forEach((function(e){var n=e.split(": "),i=n.shift();t[i]=n.join(": ")}))}catch(tSe){return t}return t}(a),s.connectTime=JG()-o,s.status=a.status,s.statusText=a.statusText,r=JG())},a.onload=function(){s.response=a.response,n(s)},a.onprogress=function(e){var t,n=JG()-r;t=parseInt(""+e.loaded/1e3/(n/1e3),10),s.speed=0|t,s.costTime=n},a.onerror=function(){s.status||(s.status=-1,s.costTime=JG()-r),i(s)},a.ontimeout=function(){s.status||(s.status=-2,s.costTime=JG()-r),n(s)},a.onabort=function(){n(s)},null!=t&&t.type&&(a.responseType=t.type),a.timeout=(null==t?void 0:t.timeout)||1e4,a.setRequestHeader("Range","bytes=".concat((null==t?void 0:t.range)||"0-1048576")),a.send()}catch(cK){i(cK)}}))}function nV(e){return(t=e)&&"object"===Du(t)&&"responseText"in t&&"status"in t&&"statusText"in t?e.responseText:function(e){return!(!e||"object"!==Du(e))&&"json"in e&&"text"in e&&"status"in e}(e)?e.text():e;var t}function iV(e){var t,n;if(e.url)return null!=e&&null!==(t=e.plugins)&&void 0!==t&&null!==(t=t.encrypthlsplugin)&&void 0!==t&&t.hls||null!=e&&null!==(n=e.plugins)&&void 0!==n&&n.mp4encryptplayer?1:+qO.isMSE(e.media)}function rV(e){var t,n,i=0;return null==e||null===(t=e.instManager)||void 0===t||null===(n=t.forEach)||void 0===n||n.call(t,(function(){return i++,!0})),i}var oV=function(e,t){var n=t||{},i=n.definitionMap,r=n.autoDemoteDefinition,o=n.autoDemoteDefinitionTextKey;if(!e||!e.Definition&&!e.Quality)return{definition:"240P"};var a=e.Definition||e.Quality;if(i){var s,l={definition:a},c=i[a];return l=c?"string"==typeof c?{definition:c}:dp({definition:a},c||{}):{definition:a},r&&r.toLocaleLowerCase()===(null===(s=l)||void 0===s||null===(s=s.definition)||void 0===s?void 0:s.toLocaleLowerCase())&&(l={definition:"auto",definitionTextKey:o,mapDefinition:l.definition}),l}return{definition:a}},aV=function(){function e(){Ou(this,e),this.timeID=null,this.func=null}return Au(e,[{key:"repeat",value:function(e,t){this.timeID=1,this.repeatInterval(e,t)}},{key:"repeatInterval",value:function(e,t){var n=this;this.timeID&&(null===this.func&&(this.func=e),this.func===e&&(this.timeID&&clearTimeout(this.timeID),this.timeID=null,this.timeID=setTimeout((function(){e(),n.repeatInterval(e,t)}),t)))}},{key:"clear",value:function(){clearTimeout(this.timeID),this.timeID=null}}]),e}(),sV=aV,lV=["Strategy","disabled","config"],cV={mp4:["video/mp4","audio/mp4"],hls:["application/vnd.apple.mpegurl","application/x-mpegurl","audio/mpegurl"],webm:["audio/webm","video/webm"],mov:["video/quicktime"]},uV=function(e){var t;return e&&0<qP(t=e.toLowerCase()).call(t,".sdp")};function hV(e){var t;if(Array.isArray(e)&&e.length){var n;if(e[0].type){for(var i="",r=0,o=MT(cV);r<o.length;r++){var a=IS(o[r],2),s=a[0],l=a[1];if(F_(l).call(l,s)){i=s;break}}if(i)return i}t=null===(n=e[0])||void 0===n?void 0:n.src}else t="string"==typeof e?e:"";return function(e){var t;return e&&0<qP(t=e.toLowerCase()).call(t,".m3u8")}(t)?"hls":function(e){var t;return e&&0<qP(t=e.toLowerCase()).call(t,".flv")}(t)?"flv":uV(t)?"rtm":function(e){var t;return e&&0<qP(t=e.toLowerCase()).call(t,".mp4")}(t)?"mp4":function(e){var t;return e&&0<qP(t=e.toLowerCase()).call(t,".mpd")}(t)?"dash":"mp4"}function dV(e){return e&&e.then?e:rb.resolve(e)}var fV=function(e,t){var n,i;if(t&&e)return W_(n=kT(e)).call(n,(function(n){n.toLowerCase()===t.toLowerCase()&&(i=e[n])})),i};function pV(){var e=(document.documentElement.getAttribute("lang")||navigator.language||"zh-cn").toLocaleLowerCase();return"zh-cn"!==e&&"cn"!==e||(e="zh"),e}function vV(e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=setTimeout((function(){t&&LG.warn(t),n=null}),arguments.length>1&&void 0!==arguments[1]?arguments[1]:200);return e.then?e.then((function(){return clearTimeout(n)})):(clearTimeout(n),n=null),e}function gV(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return new rb((function(i,r){e().then(i).catch((function(o){setTimeout((function(){1!==t?gV(e,t-1,n).then(i,r):r(o)}),n)}))}))}function yV(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'video/mp4; codecs="avc1.42E01E,mp4a.40.2"';if(!window.MediaSource)return!1;try{return window.MediaSource.isTypeSupported(e)}catch(tSe){return LG.error("mse error",tSe),!1}}var mV="undefined"!=typeof window,_V=mV&&navigator.userAgent.toLocaleLowerCase(),bV=mV&&/^((?!chrome|android).)*safari/.test(_V);function kV(e){var t={sg:{__PLAY_DOMAIN__:"https://vod.byteplusapi.com",__BACKUP_PLAY_DOMAIN__:"https://open.byteplusapi.com",__LOG_TEA_ID__:323254,__LOG_CHANNEL__:"sg",__UMD_PRE_PATH__:"https://sf-unpkg.bytepluscdn.com/obj/byteplusfe-sg/sdk/@byteplus/veplayer/1.10.0/plugin"}};return e&&t[e]||t.sg}function EV(e){var t=[];return e.forEach((function(e){fb(t).call(t,(function(t){var n,i;return(null==t||null===(n=t.pluginName)||void 0===n?void 0:n.toLowerCase())===(null==e||null===(i=e.pluginName)||void 0===i?void 0:i.toLowerCase())}))||t.push(e)})),t}function wV(e){var t;return"string"==typeof e?e:null==e||null===(t=e[0])||void 0===t?void 0:t.src}function SV(e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=parseInt(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:10);return XP(n)?t:n}function TV(e){if(!e||"boolean"==typeof e)return{config:{}};e.Strategy,e.disabled;var t=e.config,n=Sp(e,lV);return dp(dp({},e),{},{config:dp(dp({},n),null!=t?t:{})})}function CV(e){var t,n,i,r,o=e.getPlugin("drm"),a=e.getPlugin("EncryptHlsPlugin"),s=e.getPlugin("Mp4EncryptPlayer"),l=e.getPlugin("DASHPlugin"),c=(null==a||null===(t=a.config)||void 0===t?void 0:t.drmKeyToken)||(null==s||null===(n=s.config)||void 0===n?void 0:n.drmKeyToken)||(null==l||null===(i=l.config)||void 0===i?void 0:i.drmKeyToken),u=null==a||null===(r=a.config)||void 0===r?void 0:r.keyToken;return o?NR.DRM_ENCRYPT:c?NR.PRIVATE_ENCRYPT:u?NR.STANDARD_ENCRYPT:void 0}function xV(e){var t,n,i,r=null==e||null===(t=e.plugins)||void 0===t||null===(t=t.encrypthlsplugin)||void 0===t?void 0:t._playOriginalUrl,o=null==e||null===(n=e.curDefinition)||void 0===n?void 0:n.main_url;return r||o||(null===(i=e.curDefinition)||void 0===i?void 0:i.url)||e.config.url}var DV=/["'&<>]/;var IV,RV,LV=t(l_),PV=nn,AV=P,OV=Qe,MV=se,NV=function(){var e=PV(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},zV=RegExp.prototype,UV=se,BV=function(e){var t=e.flags;return void 0!==t||"flags"in zV||OV(e,"flags")||!MV(zV,e)?t:AV(NV,e)},FV=RegExp.prototype,HV=t((function(e){return e===FV||UV(FV,e)?BV(e):e.flags})),jV=function(){return(jV=VS||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function GV(e,t,n,i){return new(n||(n=rb))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){e.done?r(e.value):new n((function(t){t(e.value)})).then(a,s)}l((i=i.apply(e,t||[])).next())}))}function VV(e,t){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof ZP&&(o[QP]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function KV(e,t){var n="function"==typeof ZP&&eA(e);if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(s){r={error:s}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function WV(){for(var e=[],t=0;t<arguments.length;t++)e=y_(e).call(e,KV(arguments[t]));return e}var YV,qV=function(){function e(){this._hooks={},this._cache=[],this._hooksCache={}}return e.prototype.on=function(e,t){e&&t&&"function"==typeof t&&(this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(t))},e.prototype.once=function(e,t){var n=this;e&&t&&"function"==typeof t&&this.on(e,(function i(r){t(r),n.off(e,i)}))},e.prototype.off=function(e,t){if(e&&this._hooks[e]&&this._hooks[e].length)if(t){var n,i,r=qP(n=this._hooks[e]).call(n,t);-1!==r&&bT(i=this._hooks[e]).call(i,r,1)}else this._hooks[e]=[]},e.prototype.emit=function(e,t,n){if(n){var i;if(!e)return;-1!==qP(i=this._cache).call(i,n)?this._emit(e,t):(this._hooksCache.hasOwnProperty(n)||(this._hooksCache[n]={}),this._hooksCache[n].hasOwnProperty(e)||(this._hooksCache[n][e]=[]),this._hooksCache[n][e].push(t))}else this._emit(e,t)},e.prototype._emit=function(e,t){e&&this._hooks[e]&&this._hooks[e].length&&WV(this._hooks[e]).forEach((function(e){try{e(t)}catch(n){}}))},e.prototype.set=function(e){var t;e&&-1===qP(t=this._cache).call(t,e)&&this._cache.push(e)},e}(),XV=function(e){return null!=e&&"[object Object]"==Object.prototype.toString.call(e)},$V=function(e){return Array.isArray(e)},ZV=(YV=+Date.now()+Number(Sx(IV=""+Math.random()).call(IV,2,8)),function(){return YV+=1}),QV=function(e){return function(e,t,n){if("string"==typeof e&&"number"==typeof n){var i,r=[];n=n<=25?n:n%25;var o=String.fromCharCode(n+97);i=e.split(o);for(var a=0;a<i.length;a++){var s=parseInt(i[a],n);s=1*s^64;var l=String.fromCharCode(s);r.push(l)}return r.join("")}}(e,0,25)},JV=function(){return!!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)},eK=function(e){JV()?window.addEventListener("pagehide",e,!1):window.addEventListener("beforeunload",e,!1)},tK=function(){var e=0;return["hidden","msHidden","webkitHidden"].forEach((function(t){void 0!==document[t]&&(e=1)})),e},nK=function(e){var t=document.createElement("a");return t.href=e,t},iK=function(e){var t={};try{var n=nK(e).search;(n=Sx(n).call(n,1)).split("&").forEach((function(e){var n,i,r=e.split("=");r.length&&(n=r[0],i=r[1]);try{t[n]=decodeURIComponent(void 0===i?"":i)}catch(o){t[n]=i}}))}catch(i){}return t},rK=void 0!==AG?AG:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function oK(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function aK(e,t){return e(t={exports:{}},t.exports),t.exports}var sK,lK,cK,uK=aK((function(e,t){var n;n=function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var i in n)t[i]=n[i]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(i){function r(){}function o(t,n,o){if("undefined"!=typeof document){"number"==typeof(o=e({path:"/"},r.defaults,o)).expires&&(o.expires=new Date(1*new Date+864e5*o.expires)),o.expires=o.expires?o.expires.toUTCString():"";try{var a=Hj(n);/^[\{\[]/.test(a)&&(n=a)}catch(c){}n=i.write?i.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var s="";for(var l in o)o[l]&&(s+="; "+l,!0!==o[l]&&(s+="="+o[l].split(";")[0]));return document.cookie=t+"="+n+s}}function a(e,n){if("undefined"!=typeof document){for(var r={},o=document.cookie?document.cookie.split("; "):[],a=0;a<o.length;a++){var s=o[a].split("="),l=Sx(s).call(s,1).join("=");n||'"'!==l.charAt(0)||(l=Sx(l).call(l,1,-1));try{var c=t(s[0]);if(l=(i.read||i)(l,c)||t(l),n)try{l=JSON.parse(l)}catch(u){}if(r[c]=l,e===c)break}catch(u){}}return e?r[e]:r}}return r.set=o,r.get=function(e){return a(e,!1)},r.getJSON=function(e){return a(e,!0)},r.remove=function(t,n){o(t,"",e(n,{expires:-1}))},r.defaults={},r.withConverter=n,r}((function(){}))},e.exports=n()})),hK=function(e,t){try{return uK.get(e)}catch(n){return""}},dK=function(e,t,n,i){try{var r=i||document.domain,o=+new Date+(n||6048e5);uK.set(e,t,{expires:new Date(o),path:"/",domain:r})}catch(a){}},fK=function(){function e(){this.cache={}}return e.prototype.setItem=function(e,t){this.cache[e]=t},e.prototype.getItem=function(e){return this.cache[e]},e.prototype.removeItem=function(e){this.cache[e]=void 0},e.prototype.getCookie=function(e,t){return hK(e)},e.prototype.setCookie=function(e,t,n,i){dK(e,t,n,i)},e}(),pK={getItem:function(e){try{var t=localStorage.getItem(e),n=t;try{t&&"string"==typeof t&&(n=JSON.parse(t))}catch(i){}return n||{}}catch(i){}return{}},setItem:function(e,t){try{var n="string"==typeof t?t:Hj(t);localStorage.setItem(e,n)}catch(i){}},removeItem:function(e){try{localStorage.removeItem(e)}catch(t){}},getCookie:function(e,t){return hK(e)},setCookie:function(e,t,n,i){dK(e,t,n,i)},isSupportLS:function(){try{return localStorage.setItem("_ranger-test-key","hi"),localStorage.getItem("_ranger-test-key"),localStorage.removeItem("_ranger-test-key"),!0}catch(cK){return!1}}()},vK={getItem:function(e){try{var t=sessionStorage.getItem(e),n=t;try{t&&"string"==typeof t&&(n=JSON.parse(t))}catch(i){}return n||{}}catch(i){}return{}},setItem:function(e,t){try{var n="string"==typeof t?t:Hj(t);sessionStorage.setItem(e,n)}catch(i){}},removeItem:function(e){try{sessionStorage.removeItem(e)}catch(t){}},getCookie:function(e,t){return hK(e)},setCookie:function(e,t,n,i){dK(e,t,n,i)},isSupportSession:function(){try{return sessionStorage.setItem("_ranger-test-key","hi"),sessionStorage.getItem("_ranger-test-key"),sessionStorage.removeItem("_ranger-test-key"),!0}catch(cK){return!1}}()},gK=function(){function e(e,t){this._storage=t&&"session"===t?vK:!e&&pK.isSupportLS?pK:new fK}return e.prototype.getItem=function(e){return this._storage.getItem(e)},e.prototype.setItem=function(e,t){this._storage.setItem(e,t)},e.prototype.getCookie=function(e,t){return this._storage.getCookie(e,t)},e.prototype.setCookie=function(e,t,n,i){this._storage.setCookie(e,t,n,i)},e.prototype.removeItem=function(e){this._storage.removeItem(e)},e}(),yK=function(){function e(e,t,n){this.appid=e,this.domain=t,this.userAgent=window.navigator.userAgent,this.appVersion=window.navigator.appVersion,this.cookie_expire=n}return e.prototype.init=function(){var e,t=window.navigator.userAgent,n=window.navigator.language,i=document.referrer,r=i?nK(i).hostname:"",o=iK(window.location.href),a=/Mobile|htc|mini|Android|iP(ad|od|hone)/.test(this.appVersion)?"wap":"web",s=(null===(e=window.navigator.connection)||void 0===e?void 0:e.effectiveType)||"";this.utm=function(e,t,n,i){var r=new gK(!1),o=new gK(!1,"session"),a=e?"_tea_utm_cache_"+e:"_tea_utm_cache",s=e?"_$utm_from_url_"+e:"_$utm_from_url",l={},c=["tr_shareuser","tr_admaster","tr_param1","tr_param2","tr_param3","tr_param4","$utm_from_url"],u={ad_id:Number(t.ad_id)||void 0,campaign_id:Number(t.campaign_id)||void 0,creative_id:Number(t.creative_id)||void 0,utm_source:t.utm_source,utm_medium:t.utm_medium,utm_campaign:t.utm_campaign,utm_term:t.utm_term,utm_content:t.utm_content,tr_shareuser:t.tr_shareuser,tr_admaster:t.tr_admaster,tr_param1:t.tr_param1,tr_param2:t.tr_param2,tr_param3:t.tr_param3,tr_param4:t.tr_param4};try{var h=!1;for(var d in u)u[d]&&(-1!==qP(c).call(c,d)?(l.hasOwnProperty("tracer_data")||(l.tracer_data={}),l.tracer_data[d]=u[d]):l[d]=u[d],h=!0);if(h)o.setItem(s,"1"),r.setCookie(a,Hj(l),i,n);else{var f=r.getCookie(a,n);f&&(l=JSON.parse(f))}1==o.getItem(s)&&(l.hasOwnProperty("tracer_data")||(l.tracer_data={}),l.tracer_data.$utm_from_url=1)}catch(p){return u}return l}(this.appid,o,this.domain,this.cookie_expire);var l=this.browser(),c=this.os();return{browser:l.browser,browser_version:l.browser_version,platform:a,os_name:c.os_name,os_version:c.os_version,userAgent:t,screen_width:window.screen&&window.screen.width,screen_height:window.screen&&window.screen.height,device_model:this.getDeviceModel(c.os_name),language:n,referrer:i,referrer_host:r,network_type:s,utm:this.utm,latest_data:this.last(i,r)}},e.prototype.last=function(e,t){var n="",i="",r="",o=location.hostname,a=!1;if(e&&t&&o!==t){n=e,i=t,a=!0;var s=iK(e);s.keyword&&(r=s.keyword)}return{$latest_referrer:n,$latest_referrer_host:i,$latest_search_keyword:r,isLast:a}},e.prototype.browser=function(){var e,t,n="",i=""+parseFloat(this.appVersion),r=this.userAgent;return-1!==qP(r).call(r,"Edge")||-1!==qP(r).call(r,"Edg")?(n="Microsoft Edge",-1!==qP(r).call(r,"Edge")?(e=qP(r).call(r,"Edge"),i=r.substring(e+5)):(e=qP(r).call(r,"Edg"),i=r.substring(e+4))):-1!==(e=qP(r).call(r,"MSIE"))?(n="Microsoft Internet Explorer",i=r.substring(e+5)):-1!==(e=qP(r).call(r,"Lark"))?(n="Lark",i=r.substring(e+5,e+11)):-1!==qP(r).call(r,"Chrome")?-1!==(e=qP(r).call(r,"TTWebView"))?(n="TTWebView",i=r.substring(e+10,e+23)):(-1!==(e=qP(r).call(r,"Chrome"))||-1!==(e=qP(r).call(r,"Chrome")))&&(n="Chrome",i=r.substring(e+7)):-1!==qP(r).call(r,"Safari")?-1!==(e=qP(r).call(r,"Safari"))&&(n="Safari",i=r.substring(e+7),-1!==(e=qP(r).call(r,"Version"))&&(i=r.substring(e+8))):-1!==(e=qP(r).call(r,"Firefox"))&&(n="Firefox",i=r.substring(e+8)),-1!==(t=qP(i).call(i,";"))&&(i=i.substring(0,t)),-1!==(t=qP(i).call(i," "))&&(i=i.substring(0,t)),-1!==(t=qP(i).call(i,")"))&&(i=i.substring(0,t)),{browser:n,browser_version:i}},e.prototype.os=function(){for(var e,t="",n="",i=[{s:"Windows 10",r:/(Windows 10.0|Windows NT 10.0|Windows NT 10.1)/},{s:"Windows 8.1",r:/(Windows 8.1|Windows NT 6.3)/},{s:"Windows 8",r:/(Windows 8|Windows NT 6.2)/},{s:"Windows 7",r:/(Windows 7|Windows NT 6.1)/},{s:"Android",r:/Android/},{s:"iOS",r:/(iPhone|iPad|iPod)/},{s:"Mac OS X",r:/Mac OS X/},{s:"Mac OS",r:/(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/},{s:"ChromeOS",r:/CrOS/},{s:"Linux",r:/(Linux|X11)/},{s:"Sun OS",r:/SunOS/}],r=0;r<i.length;r++){var o=i[r];if(o.r.test(this.userAgent)){"Mac OS X"===(t=o.s)&&this.isNewIpad()&&(t="iOS");break}}var a,s,l=function(e,t){var n=e.exec(t);return n&&n[1]?n[1]:""},c=function(e,t){var n=RegExp("(?:^|[^A-Z0-9-_]|[^A-Z0-9-]_|sprd-)(?:"+e+")","i").exec(t);return n?Sx(n).call(n,1)[0]:""};switch(/Windows/.test(t)&&(n=l(/Windows (.*)/,t),t="windows"),t){case"Mac OS X":n=c("Mac[ +]OS[ +]X(?:[ /](?:Version )?(\\d+(?:[_\\.]\\d+)+))?",this.userAgent),t="mac";break;case"Android":(s=l(/Android ([\.\_\d]+)/,a=this.userAgent))||(s=l(/Android\/([\.\_\d]+)/,a)),n=s,t="android";break;case"iOS":n=this.isNewIpad()?c("Mac[ +]OS[ +]X(?:[ /](?:Version )?(\\d+(?:[_\\.]\\d+)+))?",this.userAgent):(n=/OS (\d+)_(\d+)_?(\d+)?/.exec(this.appVersion))?n[1]+"."+n[2]+"."+(0|n[3]):"",t="ios";break;case"chromeOS":var u=qP(e=this.userAgent).call(e,"x86_64");n=this.userAgent.substring(u+7,u+16)}return{os_name:t,os_version:n}},e.prototype.getDeviceModel=function(e){var t="";try{if("android"===e)navigator.userAgent.split(";").forEach((function(e){qP(e).call(e,"Build/")>-1&&(t=Sx(e).call(e,0,qP(e).call(e,"Build/")))}));else if("ios"===e||"mac"===e||"windows"===e)if(this.isNewIpad())t="iPad";else{var n=navigator.userAgent.replace("Mozilla/5.0 (",""),i=qP(n).call(n,";");t=Sx(n).call(n,0,i)}}catch(r){return nO(t).call(t)}return nO(t).call(t)},e.prototype.isNewIpad=function(){return void 0!==this.userAgent&&"MacIntel"===navigator.platform&&"number"==typeof navigator.maxTouchPoints&&navigator.maxTouchPoints>1},e}(),mK={sg_central:"1fz22z22z1nz21z4mz4bz4bz21z1ez18z1jz1gz49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k",us_east:"1fz22z22z1nz21z4mz4bz4bz1kz18z1jz1gz24z18z49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k",sg_central_tt:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z21z1ez4az22z1gz1iz22z1mz1iz24z4az1az1mz1k",us_east_tt:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z24z18z4az22z1gz1iz22z1mz1iz24z4az1az1mz1k",us_ttp:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az22z1gz1iz22z1mz1iz24z4az23z21",us_ttp_w:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az22z1gz1iz22z1mz1iz25z4az23z21",us_ttp2:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z22z22z1nz4ez4az23z21z4az22z1gz1iz22z1mz1iz4az1az1mz1k",eu_ttp_gcp:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z24z18z49z23z21z1cz18z21z22z4ez18z4az22z1gz1iz22z1mz1iz24z4az1az1mz1k",eu_central:"1fz22z22z1nz21z4mz4bz4bz18z25z21z1dz20z49z1kz1az21z4az19z27z22z1cz1gz1lz22z1jz18z1nz1gz4az1az1mz1k",eu_ttp_ie2:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z1gz1cz4ez4az22z1gz1iz22z1mz1iz25z4az1cz23",eu_ttp2:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4dz4iz49z1lz1mz20z1kz18z1jz49z1lz1mz4dz18z4az22z1gz1iz22z1mz1iz25z4az1cz23"},_K=function(){return new DS(kT(mK))},bK=function(){return kT(mK)},kK={sg:"1fz22z22z1nz21z4mz4bz4bz21z1ez18z1jz1gz49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k",va:"1fz22z22z1nz21z4mz4bz4bz1kz18z1jz1gz24z18z49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k",my:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z19z1bz49z1kz27z4az1jz18z20z1iz1mz1dz1dz1gz1az1cz4az1az1mz1k"},EK={va:"1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az1gz22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",sg:"1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",in:"1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az1gz22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k"},wK={sg:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z21z1ez4az22z1gz1iz22z1mz1iz24z4az1az1mz1k",va:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z24z18z4az22z1gz1iz22z1mz1iz24z4az1az1mz1k",in:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z24z18z49z23z21z1cz18z21z22z4ez18z4az22z1gz1iz22z1mz1iz24z4az1az1mz1k",ie2:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z1gz1cz4ez4az22z1gz1iz22z1mz1iz25z4az1cz23"},SK={sg:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az22z1gz1iz22z1mz1iz25z4az23z21",va:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az22z1gz1iz22z1mz1iz24z4az23z21",ie2:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z1gz1cz4ez4az22z1gz1iz22z1mz1iz25z4az1cz23"},TK=W_(RV=["1fz22z22z1nz21z4mz4bz4bz1bz18z22z18z4az19z27z22z1cz1bz18z1lz1az1cz4az1lz1cz22","1fz22z22z1nz21z4mz4bz4bz22z1cz18z49z24z18z4az22z1gz1iz22z1mz1iz49z20z1mz25z4az1lz1cz22","1fz22z22z1nz21z4mz4bz4bz22z1cz18z4az22z1gz1iz22z1mz1iz49z1cz23z4az1lz1cz22","1fz22z22z1nz21z4mz4bz4bz22z1cz18z4az22z1gz1iz22z1mz1iz49z23z21z22z21z4az1lz1cz22","1fz22z22z1nz21z4mz4bz4bz1gz1mz49z21z1ez4az22z1gz1iz22z1mz1iz49z20z1mz25z4az1lz1cz22","1fz22z22z1nz21z4mz4bz4bz1gz1mz49z24z18z4az22z1gz1iz22z1mz1iz49z20z1mz25z4az1lz1cz22"]).call(RV,(function(e){return QV(e)}));(cK=sK||(sK={})).Init="init",cK.Config="config",cK.Start="start",cK.Ready="ready",cK.TokenComplete="token-complete",cK.TokenStorage="token-storage",cK.TokenFetch="token-fetch",cK.TokenError="token-error",cK.ConfigUuid="config-uuid",cK.ConfigWebId="config-webid",cK.ConfigDiD="config-deviceid",cK.ConfigDomain="config-domain",cK.CustomWebId="custom-webid",cK.TokenChange="token-change",cK.TokenReset="token-reset",cK.ConfigTransform="config-transform",cK.EnvTransform="env-transform",cK.SessionReset="session-reset",cK.SessionResetTime="session-reset-time",cK.Event="event",cK.Events="events",cK.EventNow="event-now",cK.CleanEvents="clean-events",cK.BeconEvent="becon-event",cK.SubmitBefore="submit-before",cK.SubmitScuess="submit-scuess",cK.SubmitAfter="submit-after",cK.SubmitError="submit-error",cK.SubmitVerify="submit-verify",cK.DestoryInstance="destory-instance",cK.LogSettingReady="log-setting-ready",cK.Stay="stay",cK.ResetStay="reset-stay",cK.StayReady="stay-ready",cK.SetStay="set-stay",cK.RouteChange="route-change",cK.RouteReady="route-ready",cK.Ab="ab",cK.AbVar="ab-var",cK.AbAllVars="ab-all-vars",cK.AbConfig="ab-config",cK.AbExternalVersion="ab-external-version",cK.AbVersionChangeOn="ab-version-change-on",cK.AbVersionChangeOff="ab-version-change-off",cK.AbOpenLayer="ab-open-layer",cK.AbCloseLayer="ab-close-layer",cK.AbReady="ab-ready",cK.AbComplete="ab-complete",cK.AbTimeout="ab-timeout",cK.Profile="profile",cK.ProfileSet="profile-set",cK.ProfileSetOnce="profile-set-once",cK.ProfileUnset="profile-unset",cK.ProfileIncrement="profile-increment",cK.ProfileAppend="profile-append",cK.ProfileClear="profile-clear",cK.Autotrack="autotrack",cK.AutotrackReady="autotrack-ready",cK.CepReady="cep-ready",cK.TracerReady="tracer-ready",cK.sessionRecord="session-record",cK.SessionRecordStart="session-record-start",cK.SessionRecordPause="session-record-pause",cK.SessionRecordEnd="session-record-end",cK.SessionRecordReport="session-record-report",cK.TrackEventDuration="track-event-duration",cK.TrackEventDurationStart="track-event-duration-start",cK.TrackEventDurationEnd="track-event-duration-end",cK.TrackEventDurationPause="track-event-duration-pause",cK.TrackEventDurationResume="tracl-event-duration-resume",cK.VisualCollectReady="visual-collect-ready",cK.VisualApiReady="visual-api-ready",cK.VisualApiUpdate="visual-api-update",function(e){e.DEBUGGER_MESSAGE="debugger-message",e.DEBUGGER_MESSAGE_SDK="debugger-message-sdk",e.DEBUGGER_MESSAGE_FETCH="debugger-message-fetch",e.DEBUGGER_MESSAGE_FETCH_RESULT="debugger-message-fetch-result",e.DEBUGGER_MESSAGE_EVENT="debugger-message-event",e.DEVTOOL_WEB_READY="devtool-web-ready"}(lK||(lK={}));var CK=sK,xK=void 0,DK=(new Date).getTimezoneOffset(),IK=parseInt(""+-DK/60,10),RK=60*DK,LK=function(){function e(e,t){var n=this;this.is_first_time=!0,this.configPersist=!1,this.initConfig=t,this.collect=e;var i=new yK(t.app_id,t.cookie_domain||"",t.cookie_expire||6048e5).init(),r="__tea_cache_first_"+t.app_id;this.configKey="__tea_cache_config_"+t.app_id,this.sessionStorage=new gK(!1,"session"),this.localStorage=new gK(!1,"local"),this.channelUrl=this.getChannelForUrl(),t.configPersist&&(this.configPersist=!0,this.storage=1===t.configPersist?this.sessionStorage:this.localStorage);var o=this.localStorage.getItem(r);o&&1==o?this.is_first_time=!1:(this.is_first_time=!0,this.localStorage.setItem(r,"1")),this.envInfo={user:{user_unique_id:xK,user_type:xK,user_id:xK,user_is_auth:xK,user_is_login:xK,device_id:xK,web_id:xK,ip_addr_id:xK,user_unique_id_type:xK},header:{app_id:xK,app_name:xK,app_install_id:xK,install_id:xK,app_package:xK,app_channel:xK,app_version:xK,ab_version:xK,os_name:i.os_name,os_version:i.os_version,device_model:i.device_model,ab_client:xK,traffic_type:xK,network_type:i.network_type,client_ip:xK,device_brand:xK,os_api:xK,access:xK,language:i.language,region:xK,app_language:xK,app_region:xK,creative_id:i.utm.creative_id,ad_id:i.utm.ad_id,campaign_id:i.utm.campaign_id,log_type:xK,rnd:xK,platform:i.platform,sdk_version:"5.3.8_oversea",sdk_lib:"js",province:xK,city:xK,timezone:IK,tz_offset:RK,tz_name:xK,sim_region:xK,carrier:xK,resolution:i.screen_width+"x"+i.screen_height,browser:i.browser,browser_version:i.browser_version,referrer:i.referrer,referrer_host:i.referrer_host,width:i.screen_width,height:i.screen_height,screen_width:i.screen_width,screen_height:i.screen_height,utm_term:i.utm.utm_term,utm_content:i.utm.utm_content,utm_source:i.utm.utm_source,utm_medium:i.utm.utm_medium,utm_campaign:i.utm.utm_campaign,tracer_data:Hj(i.utm.tracer_data),custom:i.network_type?{network_type:i.network_type}:{}}},this.ab_version="",this.ab_uuid_cache={},this.evtParams={},this.reportErrorCallback=function(){},this.isLast=!1,this.setCustom(i),this.initDomain(),this.initABData(),this.collect.on("route-change",(function(e){n.changeReferInfo(e.config)}))}return e.prototype.initDomain=function(e){var t=this.initConfig.channel_domain;if(t)this.domain=t;else{var n=e||this.initConfig.report_channel||this.initConfig.channel,i=this.getChannelDomain(n);i||(console.warn("current channel: "+n+" is not exist, use va instead, please check!!!!"),i=kK.sg),this.domain=QV(i)}},e.prototype.setDomain=function(e){this.customDomain=!0,this.domain=e},e.prototype.getDomain=function(e){return this.customDomain||e&&this.initDomain(e),this.domain},e.prototype.getChannelDomain=function(e){var t,n,i=e||this.initConfig.report_channel||this.initConfig.channel;return _K().has(i)?mK[i]:"tcpy"===(null===(t=this.initConfig)||void 0===t?void 0:t.channel_type)?wK[i]:"ttp"===(null===(n=this.initConfig)||void 0===n?void 0:n.channel_type)?SK[i]:kK[i]},e.prototype.getChannelForUrl=function(){var e;return this.initConfig.channel_type?{WEBID_URL:"/v1/user/webid",TOB_URL:"",REPORT_URL:"/v1/list"}:this.initConfig.report_channel?-1!==qP(e=["sg_central","us_east"]).call(e,this.initConfig.report_channel)?{WEBID_URL:"/webid",TOB_URL:"/tobid",REPORT_URL:"/list"}:{WEBID_URL:"/v1/user/webid",TOB_URL:"",REPORT_URL:"/v1/list"}:{WEBID_URL:"/webid",TOB_URL:"/tobid",REPORT_URL:"/list"}},e.prototype.initABData=function(){var e,t="__tea_sdk_ab_version_"+this.initConfig.app_id;e=this.localStorage.getItem(t),this.setAbCache(e)},e.prototype.setAbCache=function(e){this.ab_cache=e},e.prototype.getAbCache=function(){return this.ab_cache},e.prototype.clearAbCache=function(){this.ab_cache={},this.ab_version=""},e.prototype.setAbVersion=function(e){this.ab_version=e},e.prototype.getAbVersion=function(){return this.ab_version},e.prototype.setAbUuidCache=function(e,t){var n,i=t||this.envInfo.user.user_unique_id;this.ab_uuid_cache[""+i]||(this.ab_uuid_cache[""+i]=[]),-1===qP(n=this.ab_uuid_cache[""+i]).call(n,e)&&this.ab_uuid_cache[""+i].push(e)},e.prototype.getAbUuidCache=function(e){return this.ab_uuid_cache[""+e]},e.prototype.getUrl=function(e){var t="";switch(e){case"event":t=this.channelUrl.REPORT_URL;break;case"webid":t=this.channelUrl.WEBID_URL;break;case"tobid":t=this.channelUrl.TOB_URL}var n="";return this.initConfig.caller&&(n="?sdk_version=5.3.8_oversea&sdk_name=web&app_id="+this.initConfig.app_id+"&caller="+this.initConfig.caller),""+this.getDomain()+t+n},e.prototype.setCustom=function(e){if(e&&e.latest_data&&e.latest_data.isLast)for(var t in delete e.latest_data.isLast,this.isLast=!0,e.latest_data)this.envInfo.header.custom[t]=e.latest_data[t]},e.prototype.setAppid=function(e){this.envInfo.header.app_id=e},e.prototype.changeReferInfo=function(e){var t=e;this.set({referrer:t.referrer});var n="";try{n=new ij(t.referrer).host}catch(i){}this.set({referrer_host:n||this.envInfo.header.referrer_host})},e.prototype.set=function(e){var t=this;kT(e).forEach((function(n){if(void 0!==e[n]&&null!==e[n]||t.delete(n),"traffic_type"===n&&t.isLast&&(t.envInfo.header.custom.$latest_traffic_source_type=e[n]),"evtParams"===n)t.evtParams=jV(jV({},t.evtParams||{}),e.evtParams||{});else if("_staging_flag"===n)t.evtParams=jV(jV({},t.evtParams||{}),{_staging_flag:e._staging_flag});else if("reportErrorCallback"===n&&"function"==typeof e[n])t.reportErrorCallback=e[n];else{var i,r,o,a="",s="";if(qP(n).call(n,".")>-1){var l=n.split(".");a=l[0],s=l[1]}a?"user"===a||"header"===a?t.envInfo[a][s]=e[n]:(t.envInfo.header.custom[s]=e[n],t.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Add Custom Params",level:"info",time:Date.now(),infoType:"sdk",secType:"HEADER",common:"custom"})):Object.hasOwnProperty.call(t.envInfo.user,n)?(qP(i=["user_type","ip_addr_id"]).call(i,n)>-1?t.envInfo.user[n]=e[n]?Number(e[n]):e[n]:qP(r=["user_id","web_id","user_unique_id","user_unique_id_type"]).call(r,n)>-1?t.envInfo.user[n]=e[n]?String(e[n]):e[n]:qP(o=["user_is_auth","user_is_login"]).call(o,n)>-1?t.envInfo.user[n]=Boolean(e[n]):"device_id"===n&&(t.envInfo.user[n]=e[n]),t.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Set Common Params",level:"info",time:Date.now(),infoType:"sdk",secType:"USER",common:n})):Object.hasOwnProperty.call(t.envInfo.header,n)?(t.envInfo.header[n]=e[n],t.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Set Common Params",level:"info",time:Date.now(),infoType:"sdk",secType:"HEADER",common:n})):(t.envInfo.header.custom[n]=e[n],t.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Add Custom Params",level:"info",time:Date.now(),infoType:"sdk",secType:"HEADER",common:"custom"}))}}))},e.prototype.get=function(e){try{return e?"evtParams"===e?this.evtParams:"reportErrorCallback"===e?this[e]:Object.hasOwnProperty.call(this.envInfo.user,e)?this.envInfo.user[e]:Object.hasOwnProperty.call(this.envInfo.header,e)?this.envInfo.header[e]:JSON.parse(Hj(this.envInfo[e])):JSON.parse(Hj(this.envInfo))}catch(t){console.log("get config stringify error "),this.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Something Error",level:"error",time:Date.now(),data:t.message,infoType:"sdk"})}},e.prototype.setStore=function(e){try{if(!this.configPersist)return;var t=this.storage.getItem(this.configKey)||{};if(t&&kT(e).length){var n=VS(e,t);this.storage.setItem(this.configKey,n)}}catch(i){console.log("setStore error"),this.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Something Error",level:"error",time:Date.now(),data:i.message,infoType:"sdk"})}},e.prototype.getStore=function(){try{if(!this.configPersist)return null;var e=this.storage.getItem(this.configKey)||{};return e&&kT(e).length?e:null}catch(t){return this.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Something Error",level:"error",time:Date.now(),data:t.message,infoType:"sdk"}),null}},e.prototype.delete=function(e){try{if(!this.configPersist)return;var t=this.storage.getItem(this.configKey)||{};t&&Object.hasOwnProperty.call(t,e)&&(delete t[e],this.storage.setItem(this.configKey,t))}catch(n){this.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Something Error",level:"error",time:Date.now(),data:n.message,infoType:"sdk"}),console.log("delete error")}},e}(),PK=function(){function e(e,t){this.isLog=t||!1,this.name=e||""}return e.prototype.info=function(e){this.isLog&&console.log("%c %s","color: yellow; background-color: black;","[Tea instance: "+this.name+"] "+e)},e.prototype.warn=function(e){this.isLog&&console.warn("%c %s","color: #4D1B00;","[Tea instance: "+this.name+"] "+e)},e.prototype.error=function(e){this.isLog&&console.error("%c %s","color: #FFF; background-color: #F53F3F;","[Tea instance: "+this.name+"] "+e)},e.prototype.throw=function(e){throw this.error(this.name),new Error(e)},e}(),AK=function(){function e(){this.spiderBot=["Baiduspider","googlebot","360Spider","haosouspider","YoudaoBot","Yisouspider","Googlebot","Headless","Applebot","Bingbot","PetalBot"]}return e.prototype.checkSpider=function(e){if(!e.enable_spider)return!1;var t=window.navigator.userAgent;if(!t)return!0;var n=!1;return this.spiderBot.forEach((function(e){-1!==qP(t).call(t,e)&&(n=!0)})),n},e}(),OK=function(){function e(e,t){this.collect=e,this.native=t}var t=e.prototype;return t.bridgeInject=function(){try{return!!this.native&&(AppLogBridge?(console.log("AppLogBridge is injected"),!0):(console.log("AppLogBridge is not inject"),!1))}catch(e){return console.log("AppLogBridge is not inject"),!1}},t.bridgeReady=function(){var e=this;return new rb((function(t,n){try{e.bridgeInject()?AppLogBridge.hasStarted((function(e){console.log("AppLogBridge is started? : "+e),e?t(!0):n(!1)})):n(!1)}catch(i){console.log("AppLogBridge, error:"+Hj(i.stack)),n(!1)}}))},t.setNativeAppId=function(e){try{AppLogBridge.setNativeAppId(Hj(e)),console.log("change bridge appid, event report with appid: "+e)}catch(t){console.error("setNativeAppId error")}},t.setConfig=function(e){var t=this;try{kT(e).forEach((function(n){"user_unique_id"===n?t.setUserUniqueId(e[n]):e[n]?t.addHeaderInfo(n,e[n]):t.removeHeaderInfo(n)}))}catch(n){console.error("setConfig error")}},t.setUserUniqueId=function(e){try{AppLogBridge.setUserUniqueId(e)}catch(t){console.error("setUserUniqueId error")}},t.addHeaderInfo=function(e,t){try{AppLogBridge.addHeaderInfo(e,t)}catch(n){console.error("addHeaderInfo error")}},t.setHeaderInfo=function(e){try{AppLogBridge.setHeaderInfo(Hj(e))}catch(t){console.error("setHeaderInfo error")}},t.removeHeaderInfo=function(e){try{AppLogBridge.removeHeaderInfo(e)}catch(t){console.error("removeHeaderInfo error")}},t.reportPv=function(e){this.onEventV3("predefine_pageview",e)},t.onEventV3=function(e,t){try{AppLogBridge.onEventV3(e,t),this.collect.emit(DebuggerMesssge.DEBUGGER_MESSAGE,{type:DebuggerMesssge.DEBUGGER_MESSAGE_EVENT,info:"bridge report success",time:Date.now(),data:[{events:[{event:e,params:t}]}],code:200,status:"success"})}catch(n){console.error("onEventV3 error")}},t.profileSet=function(e){try{AppLogBridge.profileSet(e)}catch(t){console.error("profileSet error")}},t.profileSetOnce=function(e){try{AppLogBridge.profileSetOnce(e)}catch(t){console.error("profileSetOnce error")}},t.profileIncrement=function(e){try{AppLogBridge.profileIncrement(e)}catch(t){console.error("profileIncrement error")}},t.profileUnset=function(e){try{AppLogBridge.profileUnset(e)}catch(t){console.error("profileUnset error")}},t.profileAppend=function(e){try{AppLogBridge.profileAppend(e)}catch(t){console.error("profileAppend error")}},e}(),MK=aK((function(e,t){e.exports=function e(t,n,i){function r(a,s){if(!n[a]){if(!t[a]){if(!s&&oK)return oK();if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return r(t[a][1][e]||e)}),c,c.exports,e,t,n,i)}return n[a].exports}for(var o=oK,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(e,t,n){(function(e){var n,i,r=e.MutationObserver||e.WebKitMutationObserver;if(r){var o=0,a=new r(u),s=e.document.createTextNode("");a.observe(s,{characterData:!0}),n=function(){s.data=o=++o%2}}else if(e.setImmediate||void 0===e.MessageChannel)n="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){u(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(u,0)};else{var l=new e.MessageChannel;l.port1.onmessage=u,n=function(){l.port2.postMessage(0)}}var c=[];function u(){var e,t;i=!0;for(var n=c.length;n;){for(t=c,c=[],e=-1;++e<n;)t[e]();n=c.length}i=!1}t.exports=function(e){1!==c.push(e)||i||n()}}).call(this,void 0!==rK?rK:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,n){var i=e(1);function r(){}var o={},a=["REJECTED"],s=["FULFILLED"],l=["PENDING"];function c(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,e!==r&&f(this,e)}function u(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function h(e,t,n){i((function(){var i;try{i=t(n)}catch(r){return o.reject(e,r)}i===e?o.reject(e,new TypeError("Cannot resolve promise with itself")):o.resolve(e,i)}))}function d(e){var t=e&&e.then;if(e&&("object"==Du(e)||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function f(e,t){var n=!1;function i(t){n||(n=!0,o.reject(e,t))}function r(t){n||(n=!0,o.resolve(e,t))}var a=p((function(){t(r,i)}));"error"===a.status&&i(a.value)}function p(e,t){var n={};try{n.value=e(t),n.status="success"}catch(i){n.status="error",n.value=i}return n}t.exports=c,c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,t){if("function"!=typeof e&&this.state===s||"function"!=typeof t&&this.state===a)return this;var n=new this.constructor(r);return this.state!==l?h(n,this.state===s?e:t,this.outcome):this.queue.push(new u(n,e,t)),n},u.prototype.callFulfilled=function(e){o.resolve(this.promise,e)},u.prototype.otherCallFulfilled=function(e){h(this.promise,this.onFulfilled,e)},u.prototype.callRejected=function(e){o.reject(this.promise,e)},u.prototype.otherCallRejected=function(e){h(this.promise,this.onRejected,e)},o.resolve=function(e,t){var n=p(d,t);if("error"===n.status)return o.reject(e,n.value);var i=n.value;if(i)f(e,i);else{e.state=s,e.outcome=t;for(var r=-1,a=e.queue.length;++r<a;)e.queue[r].callFulfilled(t)}return e},o.reject=function(e,t){e.state=a,e.outcome=t;for(var n=-1,i=e.queue.length;++n<i;)e.queue[n].callRejected(t);return e},c.resolve=function(e){return e instanceof this?e:o.resolve(new this(r),e)},c.reject=function(e){var t=new this(r);return o.reject(t,e)},c.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,i=!1;if(!n)return this.resolve([]);for(var a=new Array(n),s=0,l=-1,c=new this(r);++l<n;)u(e[l],l);return c;function u(e,r){t.resolve(e).then((function(e){a[r]=e,++s!==n||i||(i=!0,o.resolve(c,a))}),(function(e){i||(i=!0,o.reject(c,e))}))}},c.race=function(e){if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var t=e.length,n=!1;if(!t)return this.resolve([]);for(var i,a=-1,s=new this(r);++a<t;)i=e[a],this.resolve(i).then((function(e){n||(n=!0,o.resolve(s,e))}),(function(e){n||(n=!0,o.reject(s,e))}));return s}},{1:1}],3:[function(e,t,n){(function(t){"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,void 0!==rK?rK:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,t,n){var i,r="function"==typeof ZP&&"symbol"==Du(QP)?function(e){return Du(e)}:function(e){return e&&"function"==typeof ZP&&e.constructor===ZP&&e!==ZP.prototype?"symbol":Du(e)},o=function(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){return}}();function a(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(r){if("TypeError"!==r.name)throw r;for(var n=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),i=0;i<e.length;i+=1)n.append(e[i]);return n.getBlob(t.type)}}void 0===rb&&e(3);var s=rb;function l(e,t){t&&e.then((function(e){t(null,e)}),(function(e){t(e)}))}function c(e,t,n){"function"==typeof t&&e.then(t),"function"==typeof n&&e.catch(n)}function u(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function h(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var d=void 0,f={},p=Object.prototype.toString;function v(e){var t=f[e.name],n={};n.promise=new s((function(e,t){n.resolve=e,n.reject=t})),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then((function(){return n.promise})):t.dbReady=n.promise}function g(e){var t=f[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function y(e,t){var n=f[e.name].deferredOperations.pop();if(n)return n.reject(t),n.promise}function m(e,t){return new s((function(n,i){if(f[e.name]=f[e.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},e.db){if(!t)return n(e.db);v(e),e.db.close()}var r=[e.name];t&&r.push(e.version);var a=o.open.apply(o,r);t&&(a.onupgradeneeded=function(t){var n=a.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore("local-forage-detect-blob-support")}catch(i){if("ConstraintError"!==i.name)throw i;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),a.onerror=function(e){e.preventDefault(),i(a.error)},a.onsuccess=function(){var t=a.result;t.onversionchange=function(e){e.target.close()},n(t),g(e)}}))}function _(e){return m(e,!1)}function b(e){return m(e,!0)}function k(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),i=e.version<e.db.version,r=e.version>e.db.version;if(i&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),r||n){if(n){var o=e.db.version+1;o>e.version&&(e.version=o)}return!0}return!1}function E(e){return a([function(e){for(var t=e.length,n=new ArrayBuffer(t),i=new Uint8Array(n),r=0;r<t;r++)i[r]=e.charCodeAt(r);return n}(atob(e.data))],{type:e.type})}function w(e){return e&&e.__local_forage_encoded_blob}function S(e){var t=this,n=t._initReady().then((function(){var e=f[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return c(n,e,e),n}function T(e,t,n,i){void 0===i&&(i=1);try{var r=e.db.transaction(e.storeName,t);n(null,r)}catch(o){if(i>0&&(!e.db||"InvalidStateError"===o.name||"NotFoundError"===o.name))return s.resolve().then((function(){if(!e.db||"NotFoundError"===o.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),b(e)})).then((function(){return function(e){v(e);for(var t=f[e.name],n=t.forages,i=0;i<n.length;i++){var r=n[i];r._dbInfo.db&&(r._dbInfo.db.close(),r._dbInfo.db=null)}return e.db=null,_(e).then((function(t){return e.db=t,k(e)?b(e):t})).then((function(i){e.db=t.db=i;for(var r=0;r<n.length;r++)n[r]._dbInfo.db=i})).catch((function(t){throw y(e,t),t}))}(e).then((function(){T(e,t,n,i-1)}))})).catch(n);n(o)}}var C={_driver:"asyncStorage",_initStorage:function(e){var t,n=this,i={db:null};if(e)for(var r in e)i[r]=e[r];var o=f[i.name];o||(o={forages:[],db:null,dbReady:null,deferredOperations:[]},f[i.name]=o),o.forages.push(n),n._initReady||(n._initReady=n.ready,n.ready=S);var a=[];function l(){return s.resolve()}for(var c=0;c<o.forages.length;c++){var u=o.forages[c];u!==n&&a.push(u._initReady().catch(l))}var h=Sx(t=o.forages).call(t,0);return s.all(a).then((function(){return i.db=o.db,_(i)})).then((function(e){return i.db=e,k(i,n._defaultConfig.version)?b(i):e})).then((function(e){i.db=o.db=e,n._dbInfo=i;for(var t=0;t<h.length;t++){var r=h[t];r!==n&&(r._dbInfo.db=i.db,r._dbInfo.version=i.version)}}))},_support:function(){try{var e;if(!o||!o.open)return!1;var t="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),n="function"==typeof fetch&&-1!==qP(e=fetch.toString()).call(e,"[native code");return(!t||n)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(i){return!1}}(),iterate:function(e,t){var n=this,i=new s((function(t,i){n.ready().then((function(){T(n._dbInfo,"readonly",(function(r,o){if(r)return i(r);try{var a=o.objectStore(n._dbInfo.storeName).openCursor(),s=1;a.onsuccess=function(){var n=a.result;if(n){var i=n.value;w(i)&&(i=E(i));var r=e(i,n.key,s++);void 0!==r?t(r):n.continue()}else t()},a.onerror=function(){i(a.error)}}catch(l){i(l)}}))})).catch(i)}));return l(i,t),i},getItem:function(e,t){var n=this;e=u(e);var i=new s((function(t,i){n.ready().then((function(){T(n._dbInfo,"readonly",(function(r,o){if(r)return i(r);try{var a=o.objectStore(n._dbInfo.storeName).get(e);a.onsuccess=function(){var e=a.result;void 0===e&&(e=null),w(e)&&(e=E(e)),t(e)},a.onerror=function(){i(a.error)}}catch(s){i(s)}}))})).catch(i)}));return l(i,t),i},setItem:function(e,t,n){var i=this;e=u(e);var r=new s((function(n,r){var o;i.ready().then((function(){return o=i._dbInfo,"[object Blob]"===p.call(t)?function(e){return"boolean"==typeof d?s.resolve(d):(t=e,new s((function(e){var n=t.transaction("local-forage-detect-blob-support","readwrite"),i=a([""]);n.objectStore("local-forage-detect-blob-support").put(i,"key"),n.onabort=function(t){t.preventDefault(),t.stopPropagation(),e(!1)},n.oncomplete=function(){var t=navigator.userAgent.match(/Chrome\/(\d+)/),n=navigator.userAgent.match(/Edge\//);e(n||!t||parseInt(t[1],10)>=43)}})).catch((function(){return!1}))).then((function(e){return d=e}));var t}(o.db).then((function(e){return e?t:(n=t,new s((function(e,t){var i=new FileReader;i.onerror=t,i.onloadend=function(t){var i=btoa(t.target.result||"");e({__local_forage_encoded_blob:!0,data:i,type:n.type})},i.readAsBinaryString(n)})));var n})):t})).then((function(t){T(i._dbInfo,"readwrite",(function(o,a){if(o)return r(o);try{var s=a.objectStore(i._dbInfo.storeName);null===t&&(t=void 0);var l=s.put(t,e);a.oncomplete=function(){void 0===t&&(t=null),n(t)},a.onabort=a.onerror=function(){try{var e=l.error?l.error:l.transaction.error;r(e)}catch(t){r(t)}}}catch(c){r(c)}}))})).catch(r)}));return l(r,n),r},removeItem:function(e,t){var n=this;e=u(e);var i=new s((function(t,i){n.ready().then((function(){T(n._dbInfo,"readwrite",(function(r,o){if(r)return i(r);try{var a=o.objectStore(n._dbInfo.storeName).delete(e);o.oncomplete=function(){t()},o.onerror=function(){i(a.error)},o.onabort=function(){try{var e=a.error?a.error:a.transaction.error;i(e)}catch(t){i(t)}}}catch(s){i(s)}}))})).catch(i)}));return l(i,t),i},clear:function(e){var t=this,n=new s((function(e,n){t.ready().then((function(){T(t._dbInfo,"readwrite",(function(i,r){if(i)return n(i);try{var o=r.objectStore(t._dbInfo.storeName).clear();r.oncomplete=function(){e()},r.onabort=r.onerror=function(){try{var e=o.error?o.error:o.transaction.error;n(e)}catch(t){n(t)}}}catch(a){n(a)}}))})).catch(n)}));return l(n,e),n},length:function(e){var t=this,n=new s((function(e,n){t.ready().then((function(){T(t._dbInfo,"readonly",(function(i,r){if(i)return n(i);try{var o=r.objectStore(t._dbInfo.storeName).count();o.onsuccess=function(){e(o.result)},o.onerror=function(){n(o.error)}}catch(a){n(a)}}))})).catch(n)}));return l(n,e),n},key:function(e,t){var n=this,i=new s((function(t,i){e<0?t(null):n.ready().then((function(){T(n._dbInfo,"readonly",(function(r,o){if(r)return i(r);try{var a=o.objectStore(n._dbInfo.storeName),s=!1,l=(a.openKeyCursor||a.openCursor).call(a);l.onsuccess=function(){var n=l.result;n?0===e||s?t(n.key):(s=!0,n.advance(e)):t(null)},l.onerror=function(){i(l.error)}}catch(c){i(c)}}))})).catch(i)}));return l(i,t),i},keys:function(e){var t=this,n=new s((function(e,n){t.ready().then((function(){T(t._dbInfo,"readonly",(function(i,r){if(i)return n(i);try{var o=r.objectStore(t._dbInfo.storeName),a=(o.openKeyCursor||o.openCursor).call(o),s=[];a.onsuccess=function(){var t=a.result;t?(s.push(t.key),t.continue()):e(s)},a.onerror=function(){n(a.error)}}catch(l){n(l)}}))})).catch(n)}));return l(n,e),n},dropInstance:function(e,t){t=h.apply(this,arguments);var n=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var i;if(e.name){var r=e.name===n.name&&this._dbInfo.db?s.resolve(this._dbInfo.db):_(e).then((function(t){var n=f[e.name],i=n.forages;n.db=t;for(var r=0;r<i.length;r++)i[r]._dbInfo.db=t;return t}));i=e.storeName?r.then((function(t){if(t.objectStoreNames.contains(e.storeName)){var n=t.version+1;v(e);var i=f[e.name],r=i.forages;t.close();for(var a=0;a<r.length;a++){var l=r[a];l._dbInfo.db=null,l._dbInfo.version=n}return new s((function(t,i){var r=o.open(e.name,n);r.onerror=function(e){r.result.close(),i(e)},r.onupgradeneeded=function(){r.result.deleteObjectStore(e.storeName)},r.onsuccess=function(){var e=r.result;e.close(),t(e)}})).then((function(e){i.db=e;for(var t=0;t<r.length;t++){var n=r[t];n._dbInfo.db=e,g(n._dbInfo)}})).catch((function(t){throw(y(e,t)||s.resolve()).catch((function(){})),t}))}})):r.then((function(t){v(e);var n=f[e.name],i=n.forages;t.close();for(var r=0;r<i.length;r++)i[r]._dbInfo.db=null;return new s((function(t,n){var i=o.deleteDatabase(e.name);i.onerror=function(){var e=i.result;e&&e.close(),n(i.error)},i.onblocked=function(){console.warn('dropInstance blocked for database "'+e.name+'" until all open connections are closed')},i.onsuccess=function(){var e=i.result;e&&e.close(),t(e)}})).then((function(e){n.db=e;for(var t=0;t<i.length;t++)g(i[t]._dbInfo)})).catch((function(t){throw(y(e,t)||s.resolve()).catch((function(){})),t}))}))}else i=s.reject("Invalid arguments");return l(i,t),i}},x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",D=/^~~local_forage_type~([^~]+)~/,I=Object.prototype.toString;function R(e){var t,n,i,r,o,a=.75*e.length,s=e.length,l=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var c=new ArrayBuffer(a),u=new Uint8Array(c);for(t=0;t<s;t+=4)n=qP(x).call(x,e[t]),i=qP(x).call(x,e[t+1]),r=qP(x).call(x,e[t+2]),o=qP(x).call(x,e[t+3]),u[l++]=n<<2|i>>4,u[l++]=(15&i)<<4|r>>2,u[l++]=(3&r)<<6|63&o;return c}function L(e){var t,n=new Uint8Array(e),i="";for(t=0;t<n.length;t+=3)i+=x[n[t]>>2],i+=x[(3&n[t])<<4|n[t+1]>>4],i+=x[(15&n[t+1])<<2|n[t+2]>>6],i+=x[63&n[t+2]];return n.length%3==2?i=i.substring(0,i.length-1)+"=":n.length%3==1&&(i=i.substring(0,i.length-2)+"=="),i}var P={serialize:function(e,t){var n="";if(e&&(n=I.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===I.call(e.buffer))){var i,r="__lfsc__:";e instanceof ArrayBuffer?(i=e,r+="arbf"):(i=e.buffer,"[object Int8Array]"===n?r+="si08":"[object Uint8Array]"===n?r+="ui08":"[object Uint8ClampedArray]"===n?r+="uic8":"[object Int16Array]"===n?r+="si16":"[object Uint16Array]"===n?r+="ur16":"[object Int32Array]"===n?r+="si32":"[object Uint32Array]"===n?r+="ui32":"[object Float32Array]"===n?r+="fl32":"[object Float64Array]"===n?r+="fl64":t(new Error("Failed to get type for BinaryArray"))),t(r+L(i))}else if("[object Blob]"===n){var o=new FileReader;o.onload=function(){var n="~~local_forage_type~"+e.type+"~"+L(this.result);t("__lfsc__:blob"+n)},o.readAsArrayBuffer(e)}else try{t(Hj(e))}catch(a){console.error("Couldn't convert value into a JSON string: ",e),t(null,a)}},deserialize:function(e){if("__lfsc__:"!==e.substring(0,9))return JSON.parse(e);var t,n=e.substring(13),i=e.substring(9,13);if("blob"===i&&D.test(n)){var r=n.match(D);t=r[1],n=n.substring(r[0].length)}var o=R(n);switch(i){case"arbf":return o;case"blob":return a([o],{type:t});case"si08":return new Int8Array(o);case"ui08":return new Uint8Array(o);case"uic8":return new Uint8ClampedArray(o);case"si16":return new Int16Array(o);case"ur16":return new Uint16Array(o);case"si32":return new Int32Array(o);case"ui32":return new Uint32Array(o);case"fl32":return new Float32Array(o);case"fl64":return new Float64Array(o);default:throw new Error("Unkown type: "+i)}},stringToBuffer:R,bufferToString:L};function A(e,t,n,i){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,i)}function O(e,t,n,i,r,o){e.executeSql(n,i,r,(function(e,a){a.code===a.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,s){s.rows.length?o(e,a):A(e,t,(function(){e.executeSql(n,i,r,o)}),o)}),o):o(e,a)}),o)}function M(e,t,n,i){var r=this;e=u(e);var o=new s((function(o,a){r.ready().then((function(){void 0===t&&(t=null);var s=t,l=r._dbInfo;l.serializer.serialize(t,(function(t,c){c?a(c):l.db.transaction((function(n){O(n,l,"INSERT OR REPLACE INTO "+l.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){o(s)}),(function(e,t){a(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(i>0)return void o(M.apply(r,[e,s,n,i-1]));a(t)}}))}))})).catch(a)}));return l(o,n),o}var N={_driver:"webSQLStorage",_initStorage:function(e){var t=this,n={db:null};if(e)for(var i in e)n[i]="string"!=typeof e[i]?e[i].toString():e[i];var r=new s((function(e,i){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(r){return i(r)}n.db.transaction((function(r){A(r,n,(function(){t._dbInfo=n,e()}),(function(e,t){i(t)}))}),i)}));return n.serializer=P,r},_support:"function"==typeof openDatabase,iterate:function(e,t){var n=this,i=new s((function(t,i){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){O(n,r,"SELECT * FROM "+r.storeName,[],(function(n,i){for(var o=i.rows,a=o.length,s=0;s<a;s++){var l=o.item(s),c=l.value;if(c&&(c=r.serializer.deserialize(c)),void 0!==(c=e(c,l.key,s+1)))return void t(c)}t()}),(function(e,t){i(t)}))}))})).catch(i)}));return l(i,t),i},getItem:function(e,t){var n=this;e=u(e);var i=new s((function(t,i){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){O(n,r,"SELECT * FROM "+r.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,n){var i=n.rows.length?n.rows.item(0).value:null;i&&(i=r.serializer.deserialize(i)),t(i)}),(function(e,t){i(t)}))}))})).catch(i)}));return l(i,t),i},setItem:function(e,t,n){return M.apply(this,[e,t,n,1])},removeItem:function(e,t){var n=this;e=u(e);var i=new s((function(t,i){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){O(n,r,"DELETE FROM "+r.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){i(t)}))}))})).catch(i)}));return l(i,t),i},clear:function(e){var t=this,n=new s((function(e,n){t.ready().then((function(){var i=t._dbInfo;i.db.transaction((function(t){O(t,i,"DELETE FROM "+i.storeName,[],(function(){e()}),(function(e,t){n(t)}))}))})).catch(n)}));return l(n,e),n},length:function(e){var t=this,n=new s((function(e,n){t.ready().then((function(){var i=t._dbInfo;i.db.transaction((function(t){O(t,i,"SELECT COUNT(key) as c FROM "+i.storeName,[],(function(t,n){var i=n.rows.item(0).c;e(i)}),(function(e,t){n(t)}))}))})).catch(n)}));return l(n,e),n},key:function(e,t){var n=this,i=new s((function(t,i){n.ready().then((function(){var r=n._dbInfo;r.db.transaction((function(n){O(n,r,"SELECT key FROM "+r.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,n){var i=n.rows.length?n.rows.item(0).key:null;t(i)}),(function(e,t){i(t)}))}))})).catch(i)}));return l(i,t),i},keys:function(e){var t=this,n=new s((function(e,n){t.ready().then((function(){var i=t._dbInfo;i.db.transaction((function(t){O(t,i,"SELECT key FROM "+i.storeName,[],(function(t,n){for(var i=[],r=0;r<n.rows.length;r++)i.push(n.rows.item(r).key);e(i)}),(function(e,t){n(t)}))}))})).catch(n)}));return l(n,e),n},dropInstance:function(e,t){t=h.apply(this,arguments);var n=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var i,r=this;return l(i=e.name?new s((function(t){var i;i=e.name===n.name?r._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:i,storeNames:[e.storeName]}):t(function(e){return new s((function(t,n){e.transaction((function(i){i.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(n,i){for(var r=[],o=0;o<i.rows.length;o++)r.push(i.rows.item(o).name);t({db:e,storeNames:r})}),(function(e,t){n(t)}))}),(function(e){n(e)}))}))}(i))})).then((function(e){return new s((function(t,n){e.db.transaction((function(i){function r(e){return new s((function(t,n){i.executeSql("DROP TABLE IF EXISTS "+e,[],(function(){t()}),(function(e,t){n(t)}))}))}for(var o=[],a=0,l=e.storeNames.length;a<l;a++)o.push(r(e.storeNames[a]));s.all(o).then((function(){t()})).catch((function(e){n(e)}))}),(function(e){n(e)}))}))})):s.reject("Invalid arguments"),t),i}};function z(e,t){var n=e.name+"/";return e.storeName!==t.storeName&&(n+=e.storeName+"/"),n}var U={_driver:"localStorageWrapper",_initStorage:function(e){var t={};if(e)for(var n in e)t[n]=e[n];return t.keyPrefix=z(e,this._defaultConfig),!function(){try{return localStorage.setItem("_localforage_support_test",!0),localStorage.removeItem("_localforage_support_test"),!1}catch(e){return!0}}()||localStorage.length>0?(this._dbInfo=t,t.serializer=P,s.resolve()):s.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,t){var n=this,i=n.ready().then((function(){for(var t=n._dbInfo,i=t.keyPrefix,r=i.length,o=localStorage.length,a=1,s=0;s<o;s++){var l=localStorage.key(s);if(0===qP(l).call(l,i)){var c=localStorage.getItem(l);if(c&&(c=t.serializer.deserialize(c)),void 0!==(c=e(c,l.substring(r),a++)))return c}}}));return l(i,t),i},getItem:function(e,t){var n=this;e=u(e);var i=n.ready().then((function(){var t=n._dbInfo,i=localStorage.getItem(t.keyPrefix+e);return i&&(i=t.serializer.deserialize(i)),i}));return l(i,t),i},setItem:function(e,t,n){var i=this;e=u(e);var r=i.ready().then((function(){void 0===t&&(t=null);var n=t;return new s((function(r,o){var a=i._dbInfo;a.serializer.serialize(t,(function(t,i){if(i)o(i);else try{localStorage.setItem(a.keyPrefix+e,t),r(n)}catch(s){"QuotaExceededError"!==s.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==s.name||o(s),o(s)}}))}))}));return l(r,n),r},removeItem:function(e,t){var n=this;e=u(e);var i=n.ready().then((function(){var t=n._dbInfo;localStorage.removeItem(t.keyPrefix+e)}));return l(i,t),i},clear:function(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var i=localStorage.key(n);0===qP(i).call(i,e)&&localStorage.removeItem(i)}}));return l(n,e),n},length:function(e){var t=pC(this).call(this).then((function(e){return e.length}));return l(t,e),t},key:function(e,t){var n=this,i=n.ready().then((function(){var t,i=n._dbInfo;try{t=localStorage.key(e)}catch(r){t=null}return t&&(t=t.substring(i.keyPrefix.length)),t}));return l(i,t),i},keys:function(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo,n=localStorage.length,i=[],r=0;r<n;r++){var o=localStorage.key(r);0===qP(o).call(o,e.keyPrefix)&&i.push(o.substring(e.keyPrefix.length))}return i}));return l(n,e),n},dropInstance:function(e,t){if(t=h.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var n=this.config();e.name=e.name||n.name,e.storeName=e.storeName||n.storeName}var i,r=this;return l(i=e.name?new s((function(t){e.storeName?t(z(e,r._defaultConfig)):t(e.name+"/")})).then((function(e){for(var t=localStorage.length-1;t>=0;t--){var n=localStorage.key(t);0===qP(n).call(n,e)&&localStorage.removeItem(n)}})):s.reject("Invalid arguments"),t),i}},B=function(e,t){for(var n,i,r=e.length,o=0;o<r;){if((n=e[o])===(i=t)||"number"==typeof n&&"number"==typeof i&&isNaN(n)&&isNaN(i))return!0;o++}return!1},F=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},H={},j={},G={INDEXEDDB:C,WEBSQL:N,LOCALSTORAGE:U},V=[G.INDEXEDDB._driver,G.WEBSQL._driver,G.LOCALSTORAGE._driver],K=["dropInstance"],W=y_(i=["clear","getItem","iterate","key","keys","length","removeItem","setItem"]).call(i,K),Y={description:"",driver:Sx(V).call(V),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function q(e,t){e[t]=function(){var n=arguments;return e.ready().then((function(){return e[t].apply(e,n)}))}}function X(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var n in t){var i;t.hasOwnProperty(n)&&(F(t[n])?arguments[0][n]=Sx(i=t[n]).call(i):arguments[0][n]=t[n])}}return arguments[0]}var $=new(function(){function e(t){for(var n in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),G)if(G.hasOwnProperty(n)){var i=G[n],r=i._driver;this[n]=r,H[r]||this.defineDriver(i)}this._defaultConfig=X({},Y),this._config=X({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return e.prototype.config=function(e){if("object"===(void 0===e?"undefined":r(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,n){var i=new s((function(t,n){try{var i=e._driver,r=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void n(r);for(var o=y_(W).call(W,"_initStorage"),a=0,c=o.length;a<c;a++){var u=o[a];if((!B(K,u)||e[u])&&"function"!=typeof e[u])return void n(r)}!function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),n=s.reject(t);return l(n,arguments[arguments.length-1]),n}},n=0,i=K.length;n<i;n++){var r=K[n];e[r]||(e[r]=t(r))}}();var h=function(n){H[i]&&console.info("Redefining LocalForage driver: "+i),H[i]=e,j[i]=n,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(h,n):h(!!e._support):h(!0)}catch(d){n(d)}}));return c(i,t,n),i},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,n){var i=H[e]?s.resolve(H[e]):s.reject(new Error("Driver not found."));return c(i,t,n),i},e.prototype.getSerializer=function(e){var t=s.resolve(P);return c(t,e),t},e.prototype.ready=function(e){var t=this,n=t._driverSet.then((function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready}));return c(n,e,e),n},e.prototype.setDriver=function(e,t,n){var i=this;F(e)||(e=[e]);var r=this._getSupportedDrivers(e);function o(){i._config.driver=i.driver()}function a(e){return i._extend(e),o(),i._ready=i._initStorage(i._config),i._ready}var l=null!==this._driverSet?this._driverSet.catch((function(){return s.resolve()})):s.resolve();return this._driverSet=l.then((function(){var e=r[0];return i._dbInfo=null,i._ready=null,i.getDriver(e).then((function(e){var t;i._driver=e._driver,o(),i._wrapLibraryMethodsWithReady(),i._initDriver=(t=r,function(){var e=0;return function n(){for(;e<t.length;){var r=t[e];return e++,i._dbInfo=null,i._ready=null,i.getDriver(r).then(a).catch(n)}o();var l=new Error("No available storage method found.");return i._driverSet=s.reject(l),i._driverSet}()})}))})).catch((function(){o();var e=new Error("No available storage method found.");return i._driverSet=s.reject(e),i._driverSet})),c(this._driverSet,t,n),this._driverSet},e.prototype.supports=function(e){return!!j[e]},e.prototype._extend=function(e){X(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],n=0,i=e.length;n<i;n++){var r=e[n];this.supports(r)&&t.push(r)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=W.length;e<t;e++)q(this,W[e])},e.prototype.createInstance=function(t){return new e(t)},e}());t.exports=$},{3:3}]},{},[4])(4)})),NK=function(){function e(e,t){return this.dbStorage=MK.createInstance({driver:[MK.INDEXEDDB,MK.LOCALSTORAGE],name:e,storeName:t}),this.dbStorage}return e.prototype.getItem=function(e){return GV(this,void 0,void 0,(function(){var t,n;return VV(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.dbStorage.getItem(e)];case 1:t=i.sent(),n=t;try{t&&"string"==typeof t&&(n=JSON.parse(t))}catch(r){}return[2,n||void 0];case 2:return i.sent(),console.warn("db get storage error"),[3,3];case 3:return[2,void 0]}}))}))},e.prototype.setItem=function(e,t){try{this.dbStorage.setItem(e,t)}catch(n){console.warn("db set storage error")}},e.prototype.removeItem=function(e){try{this.dbStorage.removeItem(e)}catch(t){console.warn("db remove storage error")}},e}(),zK=function(){function e(){this.setUrl="/service/2/web_sdk_settings/",this.expireTime=216e5}return e.prototype.apply=function(e,t){if(t.enable_logsetting){this.collect=e,this.config=t;var n=e.adapters.storage;this.setKey="applog_web_logsetting_"+t.app_id,this.uniqueKey="web_logsetting_data",this.cacheStorgae=new n(!1),this.dbStorage=new NK(this.setKey,"LOGSETTING_DATA_STORE"),this.domain=t.logsetting_domain||this.collect.configManager.getDomain(),this.check()}else e.emit(CK.LogSettingReady)},e.prototype.check=function(){return GV(this,void 0,void 0,(function(){var e;return VV(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.getLocalData()];case 1:return(e=t.sent())&&kT(e).length?(null==e?void 0:e.timestamp)<Date.now()-this.expireTime?this.fetchSetting():(this.setSettingData(e.settingConfig),this.collect.emit(CK.LogSettingReady)):this.fetchSetting(),[3,3];case 2:return t.sent(),this.collect.emit(CK.LogSettingReady),this.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Check LogSetting Data Error",logType:"fetch",level:"error",time:Date.now(),infoType:"sdk"}),[3,3];case 3:return[2]}}))}))},e.prototype.fetchSetting=function(e){var t=this;if(e)this.collect.emit(CK.LogSettingReady);else{var n=this.collect.configManager.get("header");n.custom=Hj(n.custom);var i=this.collect.configManager.get("user"),r={event_filter:0,header:jV(jV({aid:this.config.app_id},n),i),options:{params_block_enable:this.config.enable_logsetting_params?1:0,header_custom_allow_enable:this.config.enable_logsetting_header_custom?1:0}};this.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Fetch LogSetting Request",logType:"fetch",level:"info",time:Date.now(),data:r,infoType:"sdk"}),this.collect.requestManager.useRequest({url:""+this.domain+this.setUrl+"?device_platform=web",data:r,timeout:5e3,success:function(e){(null==e?void 0:e.config)?(t.setLocalData(e.config),t.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"LogSetting Request Success",logType:"fetch",level:"info",time:Date.now(),data:e,infoType:"sdk"})):t.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"LogSetting Request Response No Data",logType:"fetch",level:"error",time:Date.now(),infoType:"sdk"}),t.collect.emit(CK.LogSettingReady)},fail:function(){t.collect.emit(CK.LogSettingReady),t.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"LogSetting Request Fail",logType:"fetch",level:"error",time:Date.now(),infoType:"sdk"})}})}},e.prototype.getLocalData=function(){return GV(this,void 0,void 0,(function(){return VV(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.dbStorage.getItem(this.uniqueKey)];case 1:return[2,e.sent()];case 2:return e.sent(),[2,null];case 3:return[2]}}))}))},e.prototype.setLocalData=function(e){try{var t={timestamp:Date.now(),settingConfig:e};this.setSettingData(e),this.dbStorage.setItem(this.uniqueKey,t),this.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Update LogSetting Cache",logType:"info",level:"info",time:Date.now(),infoType:"sdk",data:e})}catch(n){this.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Set LogSetting Data Error",logType:"info",level:"error",time:Date.now(),infoType:"sdk"})}},e.prototype.getSettingData=function(e){return e?this.logSettingConfig[e]:this.logSettingConfig},e.prototype.setSettingData=function(e){this.logSettingConfig=e},e.prototype.getPredefineEventList=function(){return new DS(["predefine_pageview","onload","bav2b_click","bav2b_page","bav2b_beat","bav2b_page_statistics","bav2b_exposure","predefine_page_alive","predefine_page_close","_be_active","__bav_click","__bav_page","__bav_beat","__bav_page_statistics","__bav_page_exposure"])},e.prototype.getPredefineParamsList=function(){return new DS(["event_index"])},e}(),UK=function(){function e(){this.eventLimit=50,this.enable_ttwebid=!1,this.eventCache=[],this.beconEventCache=[]}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.config=t,this.configManager=e.configManager,this.cacheStorgae=new gK(!0),this.localStorage=new gK(!1),this.logSetting=new zK,this.maxReport=t.max_report||10,this.reportTime=t.reportTime||30,this.timeout=t.timeout||1e5,this.enable_ttwebid=t.enable_ttwebid,this.reportUrl=t.report_url||this.configManager.getUrl("event"),this.eventKey="__tea_cache_events_"+this.configManager.get("app_id"),this.beconKey="__tea_cache_events_becon_"+this.configManager.get("app_id"),this.abKey="__tea_sdk_ab_version_"+this.configManager.get("app_id"),this.refer_key="__tea_cache_refer_"+this.configManager.get("app_id"),this.logSetting.apply(e,t),this.collect.on(CK.Ready,(function(){n.reportAll(!1)})),this.collect.on(CK.ConfigDomain,(function(){n.reportUrl=n.configManager.getUrl("event")})),this.collect.on(CK.Event,(function(e){n.event(e)})),this.collect.on(CK.BeconEvent,(function(e){n.beconEvent(e)})),this.collect.on(CK.CleanEvents,(function(){n.reportAll(!1)})),this.linster()},e.prototype.linster=function(){var e=this;window.addEventListener("unload",(function(){e.reportAll(!0)}),!1),eK((function(){e.reportAll(!0)})),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e.reportAll(!0)}),!1)},e.prototype.reportAll=function(e){this.report(e),this.reportBecon()},e.prototype.event=function(e){var t=this;if(!this.collect.destroy&&!this.collect.sdkStop)try{if(this.config.enable_ios_sendbeacon&&JV())return void this.beconEvent(e);var n=WV(e,this.cacheStorgae.getItem(this.eventKey)||[]);if(this.cacheStorgae.setItem(this.eventKey,n),this.reportTimeout&&clearTimeout(this.reportTimeout),n.length>=this.maxReport)this.report(!1);else{var i=this.reportTime;this.reportTimeout=setTimeout((function(){t.report(!1),t.reportTimeout=null}),i)}}catch(r){this.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Something Error",level:"error",time:Date.now(),data:r.message,infoType:"sdk"})}},e.prototype.beconEvent=function(e){if(!this.collect.destroy&&!this.collect.sdkStop){var t=WV(e,this.cacheStorgae.getItem(this.beconKey)||[]);if(this.cacheStorgae.setItem(this.beconKey,t),this.collect.tokenManager.getReady()&&this.collect.sdkReady){this.cacheStorgae.removeItem(this.beconKey);try{var n=JSON.parse(Hj(t));if(this.send(this.split(this.merge(t)),!0),this.config.event_verify_url){var i=this.split(this.merge(n,!0));this.collect.emit(CK.SubmitVerify,i)}}catch(r){this.send(this.split(this.merge(t)),!0)}}}},e.prototype.reportBecon=function(){if(!this.collect.destroy&&!this.collect.sdkStop&&this.collect.tokenManager.getReady()&&this.collect.sdkReady){var e=this.cacheStorgae.getItem(this.beconKey)||[];if(e&&e.length){this.cacheStorgae.removeItem(this.beconKey);try{var t=JSON.parse(Hj(e));if(this.send(this.split(this.merge(e)),!0),this.config.event_verify_url){var n=this.split(this.merge(t,!0));this.collect.emit(CK.SubmitVerify,n)}}catch(i){this.send(this.split(this.merge(e)),!0)}}}},e.prototype.report=function(e){if(!this.collect.destroy&&!this.collect.sdkStop&&this.collect.tokenManager.getReady()&&this.collect.sdkReady){var t=this.cacheStorgae.getItem(this.eventKey)||[];t.length&&(this.cacheStorgae.removeItem(this.eventKey),this.sliceEvent(t,e))}},e.prototype.sliceEvent=function(e,t){if(e.length>this.eventLimit)for(var n=0;n<e.length;n+=this.eventLimit){var i;i=Sx(e).call(e,n,n+this.eventLimit);try{var r=JSON.parse(Hj(i));if(this.send(this.split(this.merge(i)),t),this.config.event_verify_url){var o=this.split(this.merge(r,!0));this.collect.emit(CK.SubmitVerify,o)}}catch(a){this.send(this.split(this.merge(i)),t)}}else try{r=JSON.parse(Hj(e)),this.send(this.split(this.merge(e)),t),this.config.event_verify_url&&(o=this.split(this.merge(r,!0)),this.collect.emit(CK.SubmitVerify,o))}catch(s){this.send(this.split(this.merge(e)),t)}},e.prototype.handleRefer=function(){var e="";try{if(this.config.spa||this.config.autotrack){var t=this.localStorage.getItem(this.refer_key)||{};e=t.routeChange?t.refer_key:this.configManager.get("referrer")}else e=this.configManager.get("referrer")}catch(n){e=document.referrer}return e},e.prototype.merge=function(e,t){var n=this;void 0===t&&(t=!1);var i=this.configManager.get(),r=i.header,o=i.user;r.custom=this.customAllow(r.custom,t);var a=this.configManager.get("evtParams"),s=this.configManager.get("user_unique_id_type"),l=[];try{var c=ib(e).call(e,(function(e){try{kT(a).length&&(e.params=jV(jV({},a),e.params)),s&&(e.params.$user_unique_id_type=s);var i=n.configManager.getAbCache(),r=o[n.config.ab_user_mode]||o.user_unique_id,l=n.configManager.getAbUuidCache(r);if(i&&i.uuid&&i.uuid===r){var c=n.configManager.getAbVersion();if(n.config.enable_ab_uuid){if(l&&l.length){var u=l.join(",");c&&F_(c).call(c,u)&&(e.ab_sdk_version=c)}}else c&&(e.ab_sdk_version=c)}return e.session_id=n.collect.sessionManager.getSessionId(),e.params=n.paramsAllow(e,t),e}catch(cK){return console.warn("filter merge event: "+(e&&e.event)+" error, pls check",cK&&cK.message),n.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Merge Event Something Error",level:"error",time:Date.now(),data:cK.message,infoType:"sdk"}),!1}})),u=JSON.parse(Hj({events:c,user:o,header:r}));u.local_time=Math.floor(Date.now()/1e3),u.user_unique_type=this.config.enable_ttwebid?this.config.user_unique_type:void 0,u.verbose=1,l.push(u)}catch(cK){console.warn("event merge error, pls check",cK&&cK.message)}return l},e.prototype.split=function(e){return W_(e).call(e,(function(e){var t=[];return t.push(e),t}))},e.prototype.blockEvent=function(e){try{var t=this.blockList;if(this.config.enable_logsetting){var n=this.blockList,i=this.logSetting.getSettingData("blocklist_events").block_event;t=y_(n).call(n,ib(i).call(i,(function(e){return-1===qP(n).call(n,e)})))}return!(t&&t.length&&F_(t).call(t,e))}catch(r){return!0}},e.prototype.whiteEvent=function(e){var t;try{var n;return!(null===(t=this.whiteList)||void 0===t?void 0:t.length)||!!F_(n=this.whiteList).call(n,e)}catch(i){return!0}},e.prototype.customAllow=function(e,t){try{if(t)return Hj(e);if(!this.config.enable_logsetting||!this.config.enable_logsetting_header_custom)return Hj(e);var n=this.logSetting.getSettingData().header_custom_allow;if(n){var i={};if(n.length&&kT(e).length){var r=new DS(n);for(var o in e)r.has(o)&&(i[o]=e[o])}return Hj(i)}return Hj(e)}catch(a){return this.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Execute customAllow Something Error",level:"error",time:Date.now(),data:a.message,infoType:"sdk"}),Hj(e)}},e.prototype.paramsAllow=function(e,t){try{if(t)return Hj(e.params);if(!this.config.enable_logsetting||!this.config.enable_logsetting_params)return Hj(e.params);var n=this.logSetting.getSettingData().params_block,i=e.event,r=e.params;if(!n)return Hj(e.params);if(n[i]&&n[i].length){var o={},a=new DS(n[i]);for(var s in r)!this.logSetting.getPredefineParamsList().has(s)&&a.has(s)||(o[s]=r[s]);return Hj(o)}return Hj(e.params)}catch(l){return this.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Execute paramsAllow Something Error",level:"error",time:Date.now(),data:l.message,infoType:"sdk"}),Hj(e.params)}},e.prototype.send=function(e,t){var n=this;e.length&&(this.config.disable_track_event||e.forEach((function(e){try{var i,r=JSON.parse(Hj(e));ib(n.config)&&((r=ib(i=n.config).call(i,r))||console.warn("filter must return data !!")),n.collect.eventFilter&&r&&((r=n.collect.eventFilter(r))||console.warn("filterEvent api must return data !!"));var o=r||e,a=JSON.parse(Hj(o));if(!o.length)return;var s=!0;if(o.forEach((function(e){e.events.length||(s=!1)})),!s)return;n.collect.emit(CK.SubmitBefore,o),n.collect.requestManager.useRequest({url:n.reportUrl,data:o,success:function(e,t){e&&0!==e.e?(n.collect.emit(CK.SubmitError,{type:"f_data",eventData:t,errorCode:e.e,response:e}),n.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_EVENT,info:"Event Report Fail",time:Date.now(),data:a,code:e.e,failType:"event data error",status:"fail"})):(n.collect.emit(CK.SubmitScuess,{eventData:t,res:e}),n.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_EVENT,info:"Event Report Success",time:Date.now(),data:a,code:200,status:"success"}))},fail:function(e,t){n.configManager.get("reportErrorCallback")(e,t),n.collect.emit(CK.SubmitError,{type:"f_net",eventData:e,errorCode:t}),n.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_EVENT,info:"Event Report Network Fail",time:Date.now(),data:a,code:t,failType:"network error",status:"fail"})},timeout:n.timeout,useBeacon:!n.config.disable_sendbeacon&&t,withCredentials:n.enable_ttwebid,zip:!0}),n.collect.emit(CK.SubmitAfter,o)}catch(l){console.warn("something error, "+Hj(l.stack)),n.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Report Event Something Error",level:"error",time:Date.now(),data:l.message})}})))},e}(),BK=function(){var e;return Sx(e=function e(t){return t?(t^16*Math.random()>>t/4).toString(10):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e)}().replace(/-/g,"")).call(e,0,19)},FK=function(){function e(){this.cacheToken={},this.enableCookie=!1,this.enable_ttwebid=!1,this.enableCustomWebid=!1}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.config=t,this.configManager=this.collect.configManager,this.storage=new gK(!1),this.tokenKey="__tea_cache_tokens_"+t.app_id,this.enable_ttwebid=t.enable_ttwebid,this.enableCustomWebid=t.enable_custom_webid,this.collect.on(CK.ConfigUuid,(function(e){n.setUuid(e)})),this.collect.on(CK.ConfigWebId,(function(e){n.setWebId(e)})),this.collect.on(CK.ConfigDiD,(function(e){n.setDeviceId(e)})),this.enableCookie=t.cross_subdomain,this.expiresTime=t.cookie_expire||6048e5,this.cookieDomain=t.cookie_domain||"",this.checkStorage()},e.prototype.checkStorage=function(){var e=this;this.cacheToken=this.storage.getItem(this.tokenKey)||{},this.tokenType=this.cacheToken&&this.cacheToken._type_?this.cacheToken._type_:"default","custom"!==this.tokenType||this.enableCustomWebid?this.enableCustomWebid?this.collect.on(CK.CustomWebId,(function(){e.tokenReady=!0,e.collect.emit(CK.TokenComplete)})):this.checkEnv()||(this.enable_ttwebid?this.completeTtWid(this.cacheToken):this.check()):this.remoteWebid()},e.prototype.check=function(){this.cacheToken&&this.cacheToken.web_id?this.complete(this.cacheToken):this.config.disable_webid?this.complete({web_id:BK(),user_unique_id:this.configManager.get("user_unique_id")||BK()}):this.remoteWebid()},e.prototype.checkEnv=function(){var e=window.navigator.userAgent;if(-1!==qP(e).call(e,"miniProgram")||-1!==qP(e).call(e,"MiniProgram")){var t=iK(window.location.href);return!(!t||!t.Web_ID||(this.complete({web_id:""+t.Web_ID,user_unique_id:this.configManager.get("user_unique_id")||""+t.Web_ID}),0))}return!1},e.prototype.remoteWebid=function(){var e=this,t=this.configManager.getUrl("webid"),n={app_key:this.config.app_key,app_id:this.config.app_id,url:location.href,user_agent:window.navigator.userAgent,referer:document.referrer,user_unique_id:""};this.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Fetch WebID Request",logType:"fetch",level:"info",time:Date.now(),data:n});var i=BK();this.collect.requestManager.useRequest({url:t,data:n,success:function(t){var n;t&&0===t.e?(n=t.web_id,e.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"Fetch WebID Request Success",logType:"fetch",level:"info",time:Date.now(),data:t})):(n=i,e.collect.configManager.set({localWebId:i}),e.collect.emit(CK.TokenError),e.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"Fetch WebID Request Data Error, Use LocalId",logType:"fetch",level:"warn",time:Date.now(),data:t}),e.collect.logger.warn("appid: "+e.config.app_id+" get webid error, use local webid~")),e.complete({web_id:e.configManager.get("web_id")||n,user_unique_id:e.configManager.get("user_unique_id")||n})},fail:function(){e.complete({web_id:e.configManager.get("web_id")||i,user_unique_id:e.configManager.get("user_unique_id")||i}),e.collect.configManager.set({localWebId:i}),e.collect.emit(CK.TokenError),e.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"Fetch WebID Request Network Fail, Use LocalId",logType:"fetch",level:"error",time:Date.now(),data:null}),e.collect.logger.warn("appid: "+e.config.app_id+", get webid error, use local webid~")},timeout:3e5})},e.prototype.complete=function(e){var t=e.web_id,n=e.user_unique_id,i=e.device_id;if(e.timestamp=Date.now(),this.collect.configManager.set({web_id:t,user_unique_id:n}),this.config.enable_device_id){var r=this.configManager.get("device_id")||i||t;this.collect.configManager.set({device_id:r}),e=jV(jV({},e),{device_id:r})}else delete e.device_id;this.setStorage(e),this.tokenReady=!0,this.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK UserInfo Complete",logType:"info",secType:"USER",level:"info",time:Date.now(),data:{web_id:t,user_unique_id:n},infoType:"sdk"}),this.collect.emit(CK.TokenComplete)},e.prototype.completeTtWid=function(e){var t=e.user_unique_id||"",n=this.configManager.get("user_unique_id");(n||t)&&this.configManager.set({user_unique_id:n||t}),this.setStorage(e),this.tokenReady=!0,this.collect.emit(CK.TokenComplete)},e.prototype.setUuid=function(e){var t;if(e&&-1===qP(t=["null","undefined","Null","None"]).call(t,e)){var n=String(e),i=this.configManager.get("user_unique_id"),r=this.cacheToken&&this.cacheToken.user_unique_id;if(n===i&&n===r)return;this.configManager.set({user_unique_id:n}),this.cacheToken||(this.cacheToken={}),this.cacheToken.user_unique_id=n,this.cacheToken.timestamp=Date.now(),this.setStorage(this.cacheToken),this.collect.emit(CK.TokenChange,"uuid"),this.collect.emit(CK.SessionReset)}else this.clearUuid()},e.prototype.clearUuid=function(){this.config.enable_ttwebid||this.configManager.get("web_id")&&(this.configManager.set({user_unique_id:this.configManager.get("web_id")}),this.cacheToken&&this.cacheToken.web_id&&(this.cacheToken.user_unique_id=this.cacheToken.web_id,this.cacheToken.timestamp=Date.now(),this.setStorage(this.cacheToken)),this.collect.emit(CK.TokenReset))},e.prototype.setWebId=function(e){if(e&&!this.config.enable_ttwebid){this.cacheToken&&this.cacheToken.web_id?this.cacheToken.web_id!==e&&(this.cacheToken.user_unique_id=this.cacheToken.web_id===this.cacheToken.user_unique_id?e:this.cacheToken.user_unique_id,this.cacheToken.web_id=e):(this.cacheToken={},this.cacheToken.web_id=e,this.cacheToken.user_unique_id=e),this.cacheToken.timestamp=Date.now();var t=this.configManager.get("web_id"),n=this.configManager.get("user_unique_id");n&&n!==t||(this.configManager.set({user_unique_id:e}),this.collect.emit(CK.TokenChange,"uuid")),t!==e&&(this.configManager.set({web_id:e}),this.collect.emit(CK.TokenChange,"webid")),this.setStorage(this.cacheToken)}},e.prototype.setDeviceId=function(e){this.configManager.set({device_id:e}),this.config.enable_device_id&&this.cacheToken&&(this.cacheToken.device_id=e,this.cacheToken.timestamp=Date.now(),this.setStorage(this.cacheToken))},e.prototype.setStorage=function(e){var t;e._type_=this.enableCustomWebid?"custom":"default",delete e[LV(t="diss".split("")).call(t).join("")],this.storage.setItem(this.tokenKey,e),this.cacheToken=e},e.prototype.getReady=function(){return this.tokenReady},e.prototype.getTobId=function(){var e=this;return new rb((function(t){if("tcpy"!==e.config.channel_type&&"ttp"!==e.config.channel_type){var n={app_id:e.config.app_id,user_unique_id:e.configManager.get("user_unique_id"),web_id:e.configManager.get("web_id"),user_unique_id_type:e.configManager.get("user_unique_id_type")};e.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Fetch GetToken Request",logType:"fetch",level:"info",time:Date.now(),data:n,infoType:"sdk"}),e.collect.requestManager.useRequest({url:e.configManager.getUrl("tobid"),data:n,success:function(n){n&&0===n.e?(t(n.tobid),e.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"Fetch GetToken Request Success",logType:"fetch",level:"info",time:Date.now(),data:n,infoType:"sdk"})):(t(""),e.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"Fetch GetToken Request Fail",logType:"fetch",level:"error",time:Date.now(),data:n,infoType:"sdk"}))},fail:function(){t(""),e.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"Fetch GetToken Request Network Error",logType:"fetch",level:"error",time:Date.now(),infoType:"sdk"})},time:3e4,withCredentials:e.enable_ttwebid})}else t("")}))},e}(),HK=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))},jK=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.storage=new gK(!1,"session"),this.sessionKey="__tea_session_id_"+t.app_id,this.expireTime=t.expireTime||18e5,this.disableSession=t.disable_session,this.disableSessionTimeCheck=t.disable_session_check,this.disableSession||(this.setSessionId(),this.collect.on(CK.SessionReset,(function(e){n.resetSessionId(e)})),this.collect.on(CK.SessionResetTime,(function(){n.updateSessionIdTime()})))},e.prototype.updateSessionIdTime=function(){var e=this.storage.getItem(this.sessionKey);if(e&&e.sessionId){var t=e.timestamp;Date.now()-t>this.expireTime?e={sessionId:HK(),timestamp:Date.now()}:e.timestamp=Date.now(),this.storage.setItem(this.sessionKey,e),this.resetExpTime()}},e.prototype.setSessionId=function(){var e=this,t=this.storage.getItem(this.sessionKey);t&&t.sessionId?t.timestamp=Date.now():t={sessionId:HK(),timestamp:Date.now()},this.storage.setItem(this.sessionKey,t),this.disableSessionTimeCheck||(this.sessionExp=setInterval((function(){e.checkEXp()}),this.expireTime))},e.prototype.getSessionId=function(){var e=this.storage.getItem(this.sessionKey);return this.disableSession?"":e&&e.sessionId?e.sessionId:""},e.prototype.resetExpTime=function(){var e=this;this.sessionExp&&(clearInterval(this.sessionExp),this.sessionExp=setInterval((function(){e.checkEXp()}),this.expireTime))},e.prototype.resetSessionId=function(e){var t={sessionId:e||HK(),timestamp:Date.now()};this.storage.setItem(this.sessionKey,t)},e.prototype.checkEXp=function(){var e=this.storage.getItem(this.sessionKey);e&&e.sessionId&&Date.now()-e.timestamp+30>=this.expireTime&&(e={sessionId:HK(),timestamp:Date.now()},this.storage.setItem(this.sessionKey,e))},e}();function GK(e){for(var t=e.length;--t>=0;)e[t]=0}var VK=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),KK=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),WK=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),YK=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),qK=new Array(576);GK(qK);var XK=new Array(60);GK(XK);var $K=new Array(512);GK($K);var ZK=new Array(256);GK(ZK);var QK=new Array(29);GK(QK);var JK,eW,tW,nW=new Array(30);function iW(e,t,n,i,r){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=i,this.max_length=r,this.has_stree=e&&e.length}function rW(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}GK(nW);var oW=function(e){return e<256?$K[e]:$K[256+(e>>>7)]},aW=function(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},sW=function(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,aW(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},lW=function(e,t,n){sW(e,n[2*t],n[2*t+1])},cW=function(e,t){var n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1},uW=function(e,t,n){var i,r,o=new Array(16),a=0;for(i=1;i<=15;i++)a=a+n[i-1]<<1,o[i]=a;for(r=0;r<=t;r++){var s=e[2*r+1];0!==s&&(e[2*r]=cW(o[s]++,s))}},hW=function(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},dW=function(e){e.bi_valid>8?aW(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},fW=function(e,t,n,i){var r=2*t,o=2*n;return e[r]<e[o]||e[r]===e[o]&&i[t]<=i[n]},pW=function(e,t,n){for(var i=e.heap[n],r=n<<1;r<=e.heap_len&&(r<e.heap_len&&fW(t,e.heap[r+1],e.heap[r],e.depth)&&r++,!fW(t,i,e.heap[r],e.depth));)e.heap[n]=e.heap[r],n=r,r<<=1;e.heap[n]=i},vW=function(e,t,n){var i,r,o,a,s=0;if(0!==e.sym_next)do{i=255&e.pending_buf[e.sym_buf+s++],i+=(255&e.pending_buf[e.sym_buf+s++])<<8,r=e.pending_buf[e.sym_buf+s++],0===i?lW(e,r,t):(o=ZK[r],lW(e,o+256+1,t),0!==(a=VK[o])&&(r-=QK[o],sW(e,r,a)),i--,o=oW(i),lW(e,o,n),0!==(a=KK[o])&&(i-=nW[o],sW(e,i,a)))}while(s<e.sym_next);lW(e,256,t)},gW=function(e,t){var n,i,r,o=t.dyn_tree,a=t.stat_desc.static_tree,s=t.stat_desc.has_stree,l=t.stat_desc.elems,c=-1;for(e.heap_len=0,e.heap_max=573,n=0;n<l;n++)0!==o[2*n]?(e.heap[++e.heap_len]=c=n,e.depth[n]=0):o[2*n+1]=0;for(;e.heap_len<2;)o[2*(r=e.heap[++e.heap_len]=c<2?++c:0)]=1,e.depth[r]=0,e.opt_len--,s&&(e.static_len-=a[2*r+1]);for(t.max_code=c,n=e.heap_len>>1;n>=1;n--)pW(e,o,n);r=l;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],pW(e,o,1),i=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=i,o[2*r]=o[2*n]+o[2*i],e.depth[r]=(e.depth[n]>=e.depth[i]?e.depth[n]:e.depth[i])+1,o[2*n+1]=o[2*i+1]=r,e.heap[1]=r++,pW(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,i,r,o,a,s,l=t.dyn_tree,c=t.max_code,u=t.stat_desc.static_tree,h=t.stat_desc.has_stree,d=t.stat_desc.extra_bits,f=t.stat_desc.extra_base,p=t.stat_desc.max_length,v=0;for(o=0;o<=15;o++)e.bl_count[o]=0;for(l[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(o=l[2*l[2*(i=e.heap[n])+1]+1]+1)>p&&(o=p,v++),l[2*i+1]=o,i>c||(e.bl_count[o]++,a=0,i>=f&&(a=d[i-f]),s=l[2*i],e.opt_len+=s*(o+a),h&&(e.static_len+=s*(u[2*i+1]+a)));if(0!==v){do{for(o=p-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[p]--,v-=2}while(v>0);for(o=p;0!==o;o--)for(i=e.bl_count[o];0!==i;)(r=e.heap[--n])>c||(l[2*r+1]!==o&&(e.opt_len+=(o-l[2*r+1])*l[2*r],l[2*r+1]=o),i--)}}(e,t),uW(o,c,e.bl_count)},yW=function(e,t,n){var i,r,o=-1,a=t[1],s=0,l=7,c=4;for(0===a&&(l=138,c=3),t[2*(n+1)+1]=65535,i=0;i<=n;i++)r=a,a=t[2*(i+1)+1],++s<l&&r===a||(s<c?e.bl_tree[2*r]+=s:0!==r?(r!==o&&e.bl_tree[2*r]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,o=r,0===a?(l=138,c=3):r===a?(l=6,c=3):(l=7,c=4))},mW=function(e,t,n){var i,r,o=-1,a=t[1],s=0,l=7,c=4;for(0===a&&(l=138,c=3),i=0;i<=n;i++)if(r=a,a=t[2*(i+1)+1],!(++s<l&&r===a)){if(s<c)do{lW(e,r,e.bl_tree)}while(0!=--s);else 0!==r?(r!==o&&(lW(e,r,e.bl_tree),s--),lW(e,16,e.bl_tree),sW(e,s-3,2)):s<=10?(lW(e,17,e.bl_tree),sW(e,s-3,3)):(lW(e,18,e.bl_tree),sW(e,s-11,7));s=0,o=r,0===a?(l=138,c=3):r===a?(l=6,c=3):(l=7,c=4)}},_W=!1,bW=function(e,t,n,i){sW(e,0+(i?1:0),3),dW(e),aW(e,n),aW(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},kW=function(e){_W||(function(){var e,t,n,i,r,o=new Array(16);for(n=0,i=0;i<28;i++)for(QK[i]=n,e=0;e<1<<VK[i];e++)ZK[n++]=i;for(ZK[n-1]=i,r=0,i=0;i<16;i++)for(nW[i]=r,e=0;e<1<<KK[i];e++)$K[r++]=i;for(r>>=7;i<30;i++)for(nW[i]=r<<7,e=0;e<1<<KK[i]-7;e++)$K[256+r++]=i;for(t=0;t<=15;t++)o[t]=0;for(e=0;e<=143;)qK[2*e+1]=8,e++,o[8]++;for(;e<=255;)qK[2*e+1]=9,e++,o[9]++;for(;e<=279;)qK[2*e+1]=7,e++,o[7]++;for(;e<=287;)qK[2*e+1]=8,e++,o[8]++;for(uW(qK,287,o),e=0;e<30;e++)XK[2*e+1]=5,XK[2*e]=cW(e,5);JK=new iW(qK,VK,257,286,15),eW=new iW(XK,KK,0,30,15),tW=new iW(new Array(0),WK,0,19,7)}(),_W=!0),e.l_desc=new rW(e.dyn_ltree,JK),e.d_desc=new rW(e.dyn_dtree,eW),e.bl_desc=new rW(e.bl_tree,tW),e.bi_buf=0,e.bi_valid=0,hW(e)},EW=bW,wW=function(e,t,n,i){var r,o,a=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),gW(e,e.l_desc),gW(e,e.d_desc),a=function(e){var t;for(yW(e,e.dyn_ltree,e.l_desc.max_code),yW(e,e.dyn_dtree,e.d_desc.max_code),gW(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*YK[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),r=e.opt_len+3+7>>>3,(o=e.static_len+3+7>>>3)<=r&&(r=o)):r=o=n+5,n+4<=r&&-1!==t?bW(e,t,n,i):4===e.strategy||o===r?(sW(e,2+(i?1:0),3),vW(e,qK,XK)):(sW(e,4+(i?1:0),3),function(e,t,n,i){var r;for(sW(e,t-257,5),sW(e,n-1,5),sW(e,i-4,4),r=0;r<i;r++)sW(e,e.bl_tree[2*YK[r]+1],3);mW(e,e.dyn_ltree,t-1),mW(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),vW(e,e.dyn_ltree,e.dyn_dtree)),hW(e),i&&dW(e)},SW=function(e,t,n){return e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(ZK[n]+256+1)]++,e.dyn_dtree[2*oW(t)]++),e.sym_next===e.sym_end},TW=function(e){var t;sW(e,2,3),lW(e,256,qK),16===(t=e).bi_valid?(aW(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)},CW=function(e,t,n,i){for(var r=65535&e|0,o=e>>>16&65535|0,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{o=o+(r=r+t[i++]|0)|0}while(--a);r%=65521,o%=65521}return r|o<<16|0},xW=new Uint32Array(function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}()),DW=function(e,t,n,i){var r=xW,o=i+n;e^=-1;for(var a=i;a<o;a++)e=e>>>8^r[255&(e^t[a])];return-1^e},IW={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},RW={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},LW=kW,PW=EW,AW=wW,OW=SW,MW=TW,NW=RW.Z_NO_FLUSH,zW=RW.Z_PARTIAL_FLUSH,UW=RW.Z_FULL_FLUSH,BW=RW.Z_FINISH,FW=RW.Z_BLOCK,HW=RW.Z_OK,jW=RW.Z_STREAM_END,GW=RW.Z_STREAM_ERROR,VW=RW.Z_DATA_ERROR,KW=RW.Z_BUF_ERROR,WW=RW.Z_DEFAULT_COMPRESSION,YW=RW.Z_FILTERED,qW=RW.Z_HUFFMAN_ONLY,XW=RW.Z_RLE,$W=RW.Z_FIXED,ZW=RW.Z_DEFAULT_STRATEGY,QW=RW.Z_UNKNOWN,JW=RW.Z_DEFLATED,eY=function(e,t){return e.msg=IW[t],t},tY=function(e){return 2*e-(e>4?9:0)},nY=function(e){for(var t=e.length;--t>=0;)e[t]=0},iY=function(e){var t,n,i,r=e.w_size;i=t=e.hash_size;do{n=e.head[--i],e.head[i]=n>=r?n-r:0}while(--t);i=t=r;do{n=e.prev[--i],e.prev[i]=n>=r?n-r:0}while(--t)},rY=function(e,t,n){return(t<<e.hash_shift^n)&e.hash_mask},oY=function(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))},aY=function(e,t){AW(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,oY(e.strm)},sY=function(e,t){e.pending_buf[e.pending++]=t},lY=function(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},cY=function(e,t,n,i){var r=e.avail_in;return r>i&&(r=i),0===r?0:(e.avail_in-=r,t.set(e.input.subarray(e.next_in,e.next_in+r),n),1===e.state.wrap?e.adler=CW(e.adler,t,r,n):2===e.state.wrap&&(e.adler=DW(e.adler,t,r,n)),e.next_in+=r,e.total_in+=r,r)},uY=function(e,t){var n,i,r=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,c=e.window,u=e.w_mask,h=e.prev,d=e.strstart+258,f=c[o+a-1],p=c[o+a];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do{if(c[(n=t)+a]===p&&c[n+a-1]===f&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&o<d);if(i=258-(d-o),o=d-258,i>a){if(e.match_start=t,a=i,i>=s)break;f=c[o+a-1],p=c[o+a]}}}while((t=h[t&u])>l&&0!=--r);return a<=e.lookahead?a:e.lookahead},hY=function(e){var t,n,i,r=e.w_size;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=r+(r-262)&&(e.window.set(e.window.subarray(r,r+r-n),0),e.match_start-=r,e.strstart-=r,e.block_start-=r,e.insert>e.strstart&&(e.insert=e.strstart),iY(e),n+=r),0===e.strm.avail_in)break;if(t=cY(e.strm,e.window,e.strstart+e.lookahead,n),e.lookahead+=t,e.lookahead+e.insert>=3)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=rY(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=rY(e,e.ins_h,e.window[i+3-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&0!==e.strm.avail_in)},dY=function(e,t){var n,i,r,o=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,a=0,s=e.strm.avail_in;do{if(n=65535,r=e.bi_valid+42>>3,e.strm.avail_out<r)break;if(r=e.strm.avail_out-r,n>(i=e.strstart-e.block_start)+e.strm.avail_in&&(n=i+e.strm.avail_in),n>r&&(n=r),n<o&&(0===n&&t!==BW||t===NW||n!==i+e.strm.avail_in))break;a=t===BW&&n===i+e.strm.avail_in?1:0,PW(e,0,0,a),e.pending_buf[e.pending-4]=n,e.pending_buf[e.pending-3]=n>>8,e.pending_buf[e.pending-2]=~n,e.pending_buf[e.pending-1]=~n>>8,oY(e.strm),i&&(i>n&&(i=n),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,n-=i),n&&(cY(e.strm,e.strm.output,e.strm.next_out,n),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n)}while(0===a);return(s-=e.strm.avail_in)&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),a?4:t!==NW&&t!==BW&&0===e.strm.avail_in&&e.strstart===e.block_start?2:(r=e.window_size-e.strstart,e.strm.avail_in>r&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,r+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),r>e.strm.avail_in&&(r=e.strm.avail_in),r&&(cY(e.strm,e.window,e.strstart,r),e.strstart+=r,e.insert+=r>e.w_size-e.insert?e.w_size-e.insert:r),e.high_water<e.strstart&&(e.high_water=e.strstart),r=e.bi_valid+42>>3,o=(r=e.pending_buf_size-r>65535?65535:e.pending_buf_size-r)>e.w_size?e.w_size:r,((i=e.strstart-e.block_start)>=o||(i||t===BW)&&t!==NW&&0===e.strm.avail_in&&i<=r)&&(n=i>r?r:i,a=t===BW&&0===e.strm.avail_in&&n===i?1:0,PW(e,e.block_start,n,a),e.block_start+=n,oY(e.strm)),a?3:1)},fY=function(e,t){for(var n,i;;){if(e.lookahead<262){if(hY(e),e.lookahead<262&&t===NW)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=rY(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-262&&(e.match_length=uY(e,n)),e.match_length>=3)if(i=OW(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=rY(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=rY(e,e.ins_h,e.window[e.strstart+1]);else i=OW(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(aY(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===BW?(aY(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(aY(e,!1),0===e.strm.avail_out)?1:2},pY=function(e,t){for(var n,i,r;;){if(e.lookahead<262){if(hY(e),e.lookahead<262&&t===NW)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=rY(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-262&&(e.match_length=uY(e,n),e.match_length<=5&&(e.strategy===YW||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){r=e.strstart+e.lookahead-3,i=OW(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=r&&(e.ins_h=rY(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,i&&(aY(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((i=OW(e,0,e.window[e.strstart-1]))&&aY(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=OW(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===BW?(aY(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(aY(e,!1),0===e.strm.avail_out)?1:2};function vY(e,t,n,i,r){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=i,this.func=r}var gY=[new vY(0,0,0,0,dY),new vY(4,4,8,4,fY),new vY(4,5,16,8,fY),new vY(4,6,32,32,fY),new vY(4,4,16,16,pY),new vY(8,16,32,32,pY),new vY(8,16,128,128,pY),new vY(8,32,128,256,pY),new vY(32,128,258,1024,pY),new vY(32,258,258,4096,pY)];function yY(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=JW,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),nY(this.dyn_ltree),nY(this.dyn_dtree),nY(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),nY(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),nY(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var mY=function(e){if(!e)return 1;var t=e.state;return!t||t.strm!==e||42!==t.status&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&113!==t.status&&666!==t.status?1:0},_Y=function(e){if(mY(e))return eY(e,GW);e.total_in=e.total_out=0,e.data_type=QW;var t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=-2,LW(t),HW},bY=function(e){var t,n=_Y(e);return n===HW&&((t=e.state).window_size=2*t.w_size,nY(t.head),t.max_lazy_match=gY[t.level].max_lazy,t.good_match=gY[t.level].good_length,t.nice_match=gY[t.level].nice_length,t.max_chain_length=gY[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),n},kY=function(e,t,n,i,r,o){if(!e)return GW;var a=1;if(t===WW&&(t=6),i<0?(a=0,i=-i):i>15&&(a=2,i-=16),r<1||r>9||n!==JW||i<8||i>15||t<0||t>9||o<0||o>$W||8===i&&1!==a)return eY(e,GW);8===i&&(i=9);var s=new yY;return e.state=s,s.strm=e,s.status=42,s.wrap=a,s.gzhead=null,s.w_bits=i,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=r+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new Uint8Array(2*s.w_size),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<r+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new Uint8Array(s.pending_buf_size),s.sym_buf=s.lit_bufsize,s.sym_end=3*(s.lit_bufsize-1),s.level=t,s.strategy=o,s.method=n,bY(e)},EY={deflateInit:function(e,t){return kY(e,t,JW,15,8,ZW)},deflateInit2:kY,deflateReset:bY,deflateResetKeep:_Y,deflateSetHeader:function(e,t){return mY(e)||2!==e.state.wrap?GW:(e.state.gzhead=t,HW)},deflate:function(e,t){if(mY(e)||t>FW||t<0)return e?eY(e,GW):GW;var n=e.state;if(!e.output||0!==e.avail_in&&!e.input||666===n.status&&t!==BW)return eY(e,0===e.avail_out?KW:GW);var i=n.last_flush;if(n.last_flush=t,0!==n.pending){if(oY(e),0===e.avail_out)return n.last_flush=-1,HW}else if(0===e.avail_in&&tY(t)<=tY(i)&&t!==BW)return eY(e,KW);if(666===n.status&&0!==e.avail_in)return eY(e,KW);if(42===n.status&&0===n.wrap&&(n.status=113),42===n.status){var r=JW+(n.w_bits-8<<4)<<8;if(r|=(n.strategy>=qW||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(r|=32),lY(n,r+=31-r%31),0!==n.strstart&&(lY(n,e.adler>>>16),lY(n,65535&e.adler)),e.adler=1,n.status=113,oY(e),0!==n.pending)return n.last_flush=-1,HW}if(57===n.status)if(e.adler=0,sY(n,31),sY(n,139),sY(n,8),n.gzhead)sY(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),sY(n,255&n.gzhead.time),sY(n,n.gzhead.time>>8&255),sY(n,n.gzhead.time>>16&255),sY(n,n.gzhead.time>>24&255),sY(n,9===n.level?2:n.strategy>=qW||n.level<2?4:0),sY(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(sY(n,255&n.gzhead.extra.length),sY(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=DW(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69;else if(sY(n,0),sY(n,0),sY(n,0),sY(n,0),sY(n,0),sY(n,9===n.level?2:n.strategy>=qW||n.level<2?4:0),sY(n,3),n.status=113,oY(e),0!==n.pending)return n.last_flush=-1,HW;if(69===n.status){if(n.gzhead.extra){for(var o=n.pending,a=(65535&n.gzhead.extra.length)-n.gzindex;n.pending+a>n.pending_buf_size;){var s=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+s),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>o&&(e.adler=DW(e.adler,n.pending_buf,n.pending-o,o)),n.gzindex+=s,oY(e),0!==n.pending)return n.last_flush=-1,HW;o=0,a-=s}var l=new Uint8Array(n.gzhead.extra);n.pending_buf.set(l.subarray(n.gzindex,n.gzindex+a),n.pending),n.pending+=a,n.gzhead.hcrc&&n.pending>o&&(e.adler=DW(e.adler,n.pending_buf,n.pending-o,o)),n.gzindex=0}n.status=73}if(73===n.status){if(n.gzhead.name){var c,u=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>u&&(e.adler=DW(e.adler,n.pending_buf,n.pending-u,u)),oY(e),0!==n.pending)return n.last_flush=-1,HW;u=0}c=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,sY(n,c)}while(0!==c);n.gzhead.hcrc&&n.pending>u&&(e.adler=DW(e.adler,n.pending_buf,n.pending-u,u)),n.gzindex=0}n.status=91}if(91===n.status){if(n.gzhead.comment){var h,d=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>d&&(e.adler=DW(e.adler,n.pending_buf,n.pending-d,d)),oY(e),0!==n.pending)return n.last_flush=-1,HW;d=0}h=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,sY(n,h)}while(0!==h);n.gzhead.hcrc&&n.pending>d&&(e.adler=DW(e.adler,n.pending_buf,n.pending-d,d))}n.status=103}if(103===n.status){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(oY(e),0!==n.pending))return n.last_flush=-1,HW;sY(n,255&e.adler),sY(n,e.adler>>8&255),e.adler=0}if(n.status=113,oY(e),0!==n.pending)return n.last_flush=-1,HW}if(0!==e.avail_in||0!==n.lookahead||t!==NW&&666!==n.status){var f=0===n.level?dY(n,t):n.strategy===qW?function(e,t){for(var n;;){if(0===e.lookahead&&(hY(e),0===e.lookahead)){if(t===NW)return 1;break}if(e.match_length=0,n=OW(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(aY(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===BW?(aY(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(aY(e,!1),0===e.strm.avail_out)?1:2}(n,t):n.strategy===XW?function(e,t){for(var n,i,r,o,a=e.window;;){if(e.lookahead<=258){if(hY(e),e.lookahead<=258&&t===NW)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&((i=a[r=e.strstart-1])===a[++r]&&i===a[++r]&&i===a[++r])){o=e.strstart+258;do{}while(i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&r<o);e.match_length=258-(o-r),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=OW(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=OW(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(aY(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===BW?(aY(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(aY(e,!1),0===e.strm.avail_out)?1:2}(n,t):gY[n.level].func(n,t);if(3!==f&&4!==f||(n.status=666),1===f||3===f)return 0===e.avail_out&&(n.last_flush=-1),HW;if(2===f&&(t===zW?MW(n):t!==FW&&(PW(n,0,0,!1),t===UW&&(nY(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),oY(e),0===e.avail_out))return n.last_flush=-1,HW}return t!==BW?HW:n.wrap<=0?jW:(2===n.wrap?(sY(n,255&e.adler),sY(n,e.adler>>8&255),sY(n,e.adler>>16&255),sY(n,e.adler>>24&255),sY(n,255&e.total_in),sY(n,e.total_in>>8&255),sY(n,e.total_in>>16&255),sY(n,e.total_in>>24&255)):(lY(n,e.adler>>>16),lY(n,65535&e.adler)),oY(e),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?HW:jW)},deflateEnd:function(e){if(mY(e))return GW;var t=e.state.status;return e.state=null,113===t?eY(e,VW):HW},deflateSetDictionary:function(e,t){var n=t.length;if(mY(e))return GW;var i=e.state,r=i.wrap;if(2===r||1===r&&42!==i.status||i.lookahead)return GW;if(1===r&&(e.adler=CW(e.adler,t,n,0)),i.wrap=0,n>=i.w_size){0===r&&(nY(i.head),i.strstart=0,i.block_start=0,i.insert=0);var o=new Uint8Array(i.w_size);o.set(t.subarray(n-i.w_size,n),0),t=o,n=i.w_size}var a=e.avail_in,s=e.next_in,l=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,hY(i);i.lookahead>=3;){var c=i.strstart,u=i.lookahead-2;do{i.ins_h=rY(i,i.ins_h,i.window[c+3-1]),i.prev[c&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=c,c++}while(--u);i.strstart=c,i.lookahead=2,hY(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,e.next_in=s,e.input=l,e.avail_in=a,i.wrap=r,HW},deflateInfo:"pako deflate (from Nodeca project)"},wY=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},SY=function(e){for(var t=Sx(Array.prototype).call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=Du(n))throw new TypeError(n+"must be non-object");for(var i in n)wY(n,i)&&(e[i]=n[i])}}return e},TY=function(e){for(var t=0,n=0,i=e.length;n<i;n++)t+=e[n].length;for(var r=new Uint8Array(t),o=0,a=0,s=e.length;o<s;o++){var l=e[o];r.set(l,a),a+=l.length}return r},CY=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(cK){CY=!1}for(var xY=new Uint8Array(256),DY=0;DY<256;DY++)xY[DY]=DY>=252?6:DY>=248?5:DY>=240?4:DY>=224?3:DY>=192?2:1;xY[254]=xY[254]=1;var IY=function(e){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);var t,n,i,r,o,a=e.length,s=0;for(r=0;r<a;r++)55296==(64512&(n=e.charCodeAt(r)))&&r+1<a&&(56320==(64512&(i=e.charCodeAt(r+1)))&&(n=65536+(n-55296<<10)+(i-56320),r++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),o=0,r=0;o<s;r++)55296==(64512&(n=e.charCodeAt(r)))&&r+1<a&&(56320==(64512&(i=e.charCodeAt(r+1)))&&(n=65536+(n-55296<<10)+(i-56320),r++)),n<128?t[o++]=n:n<2048?(t[o++]=192|n>>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t},RY=function(e,t){var n,i,r=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));var o=new Array(2*r);for(i=0,n=0;n<r;){var a=e[n++];if(a<128)o[i++]=a;else{var s=xY[a];if(s>4)o[i++]=65533,n+=s-1;else{for(a&=2===s?31:3===s?15:7;s>1&&n<r;)a=a<<6|63&e[n++],s--;s>1?o[i++]=65533:a<65536?o[i++]=a:(a-=65536,o[i++]=55296|a>>10&1023,o[i++]=56320|1023&a)}}}return function(e,t){if(t<65534&&e.subarray&&CY)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));for(var n="",i=0;i<t;i++)n+=String.fromCharCode(e[i]);return n}(o,i)},LY=function(e,t){(t=t||e.length)>e.length&&(t=e.length);for(var n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+xY[e[n]]>t?n:t},PY=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},AY=Object.prototype.toString,OY=RW.Z_NO_FLUSH,MY=RW.Z_SYNC_FLUSH,NY=RW.Z_FULL_FLUSH,zY=RW.Z_FINISH,UY=RW.Z_OK,BY=RW.Z_STREAM_END,FY=RW.Z_DEFAULT_COMPRESSION,HY=RW.Z_DEFAULT_STRATEGY,jY=RW.Z_DEFLATED;function GY(e){this.options=SY({level:FY,method:jY,chunkSize:16384,windowBits:15,memLevel:8,strategy:HY},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new PY,this.strm.avail_out=0;var n=EY.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==UY)throw new Error(IW[n]);if(t.header&&EY.deflateSetHeader(this.strm,t.header),t.dictionary){var i;if(i="string"==typeof t.dictionary?IY(t.dictionary):"[object ArrayBuffer]"===AY.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(n=EY.deflateSetDictionary(this.strm,i))!==UY)throw new Error(IW[n]);this._dict_set=!0}}function VY(e,t){var n=new GY(t);if(n.push(e,!0),n.err)throw n.msg||IW[n.err];return n.result}GY.prototype.push=function(e,t){var n,i,r=this.strm,o=this.options.chunkSize;if(this.ended)return!1;for(i=t===~~t?t:!0===t?zY:OY,"string"==typeof e?r.input=IY(e):"[object ArrayBuffer]"===AY.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(o),r.next_out=0,r.avail_out=o),(i===MY||i===NY)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if((n=EY.deflate(r,i))===BY)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),n=EY.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===UY;if(0!==r.avail_out){if(i>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},GY.prototype.onData=function(e){this.chunks.push(e)},GY.prototype.onEnd=function(e){e===UY&&(this.result=TY(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var KY=GY,WY=VY,YY=function(e,t){return(t=t||{}).raw=!0,VY(e,t)},qY=function(e,t){return(t=t||{}).gzip=!0,VY(e,t)},XY=function(e,t){var n,i,r,o,a,s,l,c,u,h,d,f,p,v,g,y,m,_,b,k,E,w,S,T,C=e.state;n=e.next_in,S=e.input,i=n+(e.avail_in-5),r=e.next_out,T=e.output,o=r-(t-e.avail_out),a=r+(e.avail_out-257),s=C.dmax,l=C.wsize,c=C.whave,u=C.wnext,h=C.window,d=C.hold,f=C.bits,p=C.lencode,v=C.distcode,g=(1<<C.lenbits)-1,y=(1<<C.distbits)-1;e:do{f<15&&(d+=S[n++]<<f,f+=8,d+=S[n++]<<f,f+=8),m=p[d&g];t:for(;;){if(d>>>=_=m>>>24,f-=_,0===(_=m>>>16&255))T[r++]=65535&m;else{if(!(16&_)){if(0==(64&_)){m=p[(65535&m)+(d&(1<<_)-1)];continue t}if(32&_){C.mode=16191;break e}e.msg="invalid literal/length code",C.mode=16209;break e}b=65535&m,(_&=15)&&(f<_&&(d+=S[n++]<<f,f+=8),b+=d&(1<<_)-1,d>>>=_,f-=_),f<15&&(d+=S[n++]<<f,f+=8,d+=S[n++]<<f,f+=8),m=v[d&y];n:for(;;){if(d>>>=_=m>>>24,f-=_,!(16&(_=m>>>16&255))){if(0==(64&_)){m=v[(65535&m)+(d&(1<<_)-1)];continue n}e.msg="invalid distance code",C.mode=16209;break e}if(k=65535&m,f<(_&=15)&&(d+=S[n++]<<f,(f+=8)<_&&(d+=S[n++]<<f,f+=8)),(k+=d&(1<<_)-1)>s){e.msg="invalid distance too far back",C.mode=16209;break e}if(d>>>=_,f-=_,k>(_=r-o)){if((_=k-_)>c&&C.sane){e.msg="invalid distance too far back",C.mode=16209;break e}if(E=0,w=h,0===u){if(E+=l-_,_<b){b-=_;do{T[r++]=h[E++]}while(--_);E=r-k,w=T}}else if(u<_){if(E+=l+u-_,(_-=u)<b){b-=_;do{T[r++]=h[E++]}while(--_);if(E=0,u<b){b-=_=u;do{T[r++]=h[E++]}while(--_);E=r-k,w=T}}}else if(E+=u-_,_<b){b-=_;do{T[r++]=h[E++]}while(--_);E=r-k,w=T}for(;b>2;)T[r++]=w[E++],T[r++]=w[E++],T[r++]=w[E++],b-=3;b&&(T[r++]=w[E++],b>1&&(T[r++]=w[E++]))}else{E=r-k;do{T[r++]=T[E++],T[r++]=T[E++],T[r++]=T[E++],b-=3}while(b>2);b&&(T[r++]=T[E++],b>1&&(T[r++]=T[E++]))}break}}break}}while(n<i&&r<a);n-=b=f>>3,d&=(1<<(f-=b<<3))-1,e.next_in=n,e.next_out=r,e.avail_in=n<i?i-n+5:5-(n-i),e.avail_out=r<a?a-r+257:257-(r-a),C.hold=d,C.bits=f},$Y=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),ZY=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),QY=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),JY=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),eq=function(e,t,n,i,r,o,a,s){var l,c,u,h,d,f,p,v,g,y=s.bits,m=0,_=0,b=0,k=0,E=0,w=0,S=0,T=0,C=0,x=0,D=null,I=new Uint16Array(16),R=new Uint16Array(16),L=null;for(m=0;m<=15;m++)I[m]=0;for(_=0;_<i;_++)I[t[n+_]]++;for(E=y,k=15;k>=1&&0===I[k];k--);if(E>k&&(E=k),0===k)return r[o++]=20971520,r[o++]=20971520,s.bits=1,0;for(b=1;b<k&&0===I[b];b++);for(E<b&&(E=b),T=1,m=1;m<=15;m++)if(T<<=1,(T-=I[m])<0)return-1;if(T>0&&(0===e||1!==k))return-1;for(R[1]=0,m=1;m<15;m++)R[m+1]=R[m]+I[m];for(_=0;_<i;_++)0!==t[n+_]&&(a[R[t[n+_]]++]=_);if(0===e?(D=L=a,f=20):1===e?(D=$Y,L=ZY,f=257):(D=QY,L=JY,f=0),x=0,_=0,m=b,d=o,w=E,S=0,u=-1,h=(C=1<<E)-1,1===e&&C>852||2===e&&C>592)return 1;for(;;){p=m-S,a[_]+1<f?(v=0,g=a[_]):a[_]>=f?(v=L[a[_]-f],g=D[a[_]-f]):(v=96,g=0),l=1<<m-S,b=c=1<<w;do{r[d+(x>>S)+(c-=l)]=p<<24|v<<16|g|0}while(0!==c);for(l=1<<m-1;x&l;)l>>=1;if(0!==l?(x&=l-1,x+=l):x=0,_++,0==--I[m]){if(m===k)break;m=t[n+a[_]]}if(m>E&&(x&h)!==u){for(0===S&&(S=E),d+=b,T=1<<(w=m-S);w+S<k&&!((T-=I[w+S])<=0);)w++,T<<=1;if(C+=1<<w,1===e&&C>852||2===e&&C>592)return 1;r[u=x&h]=E<<24|w<<16|d-o|0}}return 0!==x&&(r[d+x]=m-S<<24|64<<16|0),s.bits=E,0},tq=RW.Z_FINISH,nq=RW.Z_BLOCK,iq=RW.Z_TREES,rq=RW.Z_OK,oq=RW.Z_STREAM_END,aq=RW.Z_NEED_DICT,sq=RW.Z_STREAM_ERROR,lq=RW.Z_DATA_ERROR,cq=RW.Z_MEM_ERROR,uq=RW.Z_BUF_ERROR,hq=RW.Z_DEFLATED,dq=function(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)};function fq(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var pq,vq,gq=function(e){if(!e)return 1;var t=e.state;return!t||t.strm!==e||t.mode<16180||t.mode>16211?1:0},yq=function(e){if(gq(e))return sq;var t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=16180,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,rq},mq=function(e){if(gq(e))return sq;var t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,yq(e)},_q=function(e,t){var n;if(gq(e))return sq;var i=e.state;return t<0?(n=0,t=-t):(n=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?sq:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=n,i.wbits=t,mq(e))},bq=function(e,t){if(!e)return sq;var n=new fq;e.state=n,n.strm=e,n.window=null,n.mode=16180;var i=_q(e,t);return i!==rq&&(e.state=null),i},kq=!0,Eq=function(e){if(kq){pq=new Int32Array(512),vq=new Int32Array(32);for(var t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(eq(1,e.lens,0,288,pq,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;eq(2,e.lens,0,32,vq,0,e.work,{bits:5}),kq=!1}e.lencode=pq,e.lenbits=9,e.distcode=vq,e.distbits=5},wq=function(e,t,n,i){var r,o=e.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Uint8Array(o.wsize)),i>=o.wsize?(o.window.set(t.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):((r=o.wsize-o.wnext)>i&&(r=i),o.window.set(t.subarray(n-i,n-i+r),o.wnext),(i-=r)?(o.window.set(t.subarray(n-i,n),0),o.wnext=i,o.whave=o.wsize):(o.wnext+=r,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=r))),0},Sq={inflateReset:mq,inflateReset2:_q,inflateResetKeep:yq,inflateInit:function(e){return bq(e,15)},inflateInit2:bq,inflate:function(e,t){var n,i,r,o,a,s,l,c,u,h,d,f,p,v,g,y,m,_,b,k,E,w,S,T,C=0,x=new Uint8Array(4),D=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(gq(e)||!e.output||!e.input&&0!==e.avail_in)return sq;16191===(n=e.state).mode&&(n.mode=16192),a=e.next_out,r=e.output,l=e.avail_out,o=e.next_in,i=e.input,s=e.avail_in,c=n.hold,u=n.bits,h=s,d=l,w=rq;e:for(;;)switch(n.mode){case 16180:if(0===n.wrap){n.mode=16192;break}for(;u<16;){if(0===s)break e;s--,c+=i[o++]<<u,u+=8}if(2&n.wrap&&35615===c){0===n.wbits&&(n.wbits=15),n.check=0,x[0]=255&c,x[1]=c>>>8&255,n.check=DW(n.check,x,2,0),c=0,u=0,n.mode=16181;break}if(n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&c)<<8)+(c>>8))%31){e.msg="incorrect header check",n.mode=16209;break}if((15&c)!==hq){e.msg="unknown compression method",n.mode=16209;break}if(u-=4,E=8+(15&(c>>>=4)),0===n.wbits&&(n.wbits=E),E>15||E>n.wbits){e.msg="invalid window size",n.mode=16209;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=512&c?16189:16191,c=0,u=0;break;case 16181:for(;u<16;){if(0===s)break e;s--,c+=i[o++]<<u,u+=8}if(n.flags=c,(255&HV(n))!==hq){e.msg="unknown compression method",n.mode=16209;break}if(57344&HV(n)){e.msg="unknown header flags set",n.mode=16209;break}n.head&&(n.head.text=c>>8&1),512&HV(n)&&4&n.wrap&&(x[0]=255&c,x[1]=c>>>8&255,n.check=DW(n.check,x,2,0)),c=0,u=0,n.mode=16182;case 16182:for(;u<32;){if(0===s)break e;s--,c+=i[o++]<<u,u+=8}n.head&&(n.head.time=c),512&HV(n)&&4&n.wrap&&(x[0]=255&c,x[1]=c>>>8&255,x[2]=c>>>16&255,x[3]=c>>>24&255,n.check=DW(n.check,x,4,0)),c=0,u=0,n.mode=16183;case 16183:for(;u<16;){if(0===s)break e;s--,c+=i[o++]<<u,u+=8}n.head&&(n.head.xflags=255&c,n.head.os=c>>8),512&HV(n)&&4&n.wrap&&(x[0]=255&c,x[1]=c>>>8&255,n.check=DW(n.check,x,2,0)),c=0,u=0,n.mode=16184;case 16184:if(1024&HV(n)){for(;u<16;){if(0===s)break e;s--,c+=i[o++]<<u,u+=8}n.length=c,n.head&&(n.head.extra_len=c),512&HV(n)&&4&n.wrap&&(x[0]=255&c,x[1]=c>>>8&255,n.check=DW(n.check,x,2,0)),c=0,u=0}else n.head&&(n.head.extra=null);n.mode=16185;case 16185:if(1024&HV(n)&&((f=n.length)>s&&(f=s),f&&(n.head&&(E=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(i.subarray(o,o+f),E)),512&HV(n)&&4&n.wrap&&(n.check=DW(n.check,i,f,o)),s-=f,o+=f,n.length-=f),n.length))break e;n.length=0,n.mode=16186;case 16186:if(2048&HV(n)){if(0===s)break e;f=0;do{E=i[o+f++],n.head&&E&&n.length<65536&&(n.head.name+=String.fromCharCode(E))}while(E&&f<s);if(512&HV(n)&&4&n.wrap&&(n.check=DW(n.check,i,f,o)),s-=f,o+=f,E)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=16187;case 16187:if(4096&HV(n)){if(0===s)break e;f=0;do{E=i[o+f++],n.head&&E&&n.length<65536&&(n.head.comment+=String.fromCharCode(E))}while(E&&f<s);if(512&HV(n)&&4&n.wrap&&(n.check=DW(n.check,i,f,o)),s-=f,o+=f,E)break e}else n.head&&(n.head.comment=null);n.mode=16188;case 16188:if(512&HV(n)){for(;u<16;){if(0===s)break e;s--,c+=i[o++]<<u,u+=8}if(4&n.wrap&&c!==(65535&n.check)){e.msg="header crc mismatch",n.mode=16209;break}c=0,u=0}n.head&&(n.head.hcrc=HV(n)>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=16191;break;case 16189:for(;u<32;){if(0===s)break e;s--,c+=i[o++]<<u,u+=8}e.adler=n.check=dq(c),c=0,u=0,n.mode=16190;case 16190:if(0===n.havedict)return e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=s,n.hold=c,n.bits=u,aq;e.adler=n.check=1,n.mode=16191;case 16191:if(t===nq||t===iq)break e;case 16192:if(n.last){c>>>=7&u,u-=7&u,n.mode=16206;break}for(;u<3;){if(0===s)break e;s--,c+=i[o++]<<u,u+=8}switch(n.last=1&c,u-=1,3&(c>>>=1)){case 0:n.mode=16193;break;case 1:if(Eq(n),n.mode=16199,t===iq){c>>>=2,u-=2;break e}break;case 2:n.mode=16196;break;case 3:e.msg="invalid block type",n.mode=16209}c>>>=2,u-=2;break;case 16193:for(c>>>=7&u,u-=7&u;u<32;){if(0===s)break e;s--,c+=i[o++]<<u,u+=8}if((65535&c)!=(c>>>16^65535)){e.msg="invalid stored block lengths",n.mode=16209;break}if(n.length=65535&c,c=0,u=0,n.mode=16194,t===iq)break e;case 16194:n.mode=16195;case 16195:if(f=n.length){if(f>s&&(f=s),f>l&&(f=l),0===f)break e;r.set(i.subarray(o,o+f),a),s-=f,o+=f,l-=f,a+=f,n.length-=f;break}n.mode=16191;break;case 16196:for(;u<14;){if(0===s)break e;s--,c+=i[o++]<<u,u+=8}if(n.nlen=257+(31&c),c>>>=5,u-=5,n.ndist=1+(31&c),c>>>=5,u-=5,n.ncode=4+(15&c),c>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=16209;break}n.have=0,n.mode=16197;case 16197:for(;n.have<n.ncode;){for(;u<3;){if(0===s)break e;s--,c+=i[o++]<<u,u+=8}n.lens[D[n.have++]]=7&c,c>>>=3,u-=3}for(;n.have<19;)n.lens[D[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,S={bits:n.lenbits},w=eq(0,n.lens,0,19,n.lencode,0,n.work,S),n.lenbits=S.bits,w){e.msg="invalid code lengths set",n.mode=16209;break}n.have=0,n.mode=16198;case 16198:for(;n.have<n.nlen+n.ndist;){for(;y=(C=n.lencode[c&(1<<n.lenbits)-1])>>>16&255,m=65535&C,!((g=C>>>24)<=u);){if(0===s)break e;s--,c+=i[o++]<<u,u+=8}if(m<16)c>>>=g,u-=g,n.lens[n.have++]=m;else{if(16===m){for(T=g+2;u<T;){if(0===s)break e;s--,c+=i[o++]<<u,u+=8}if(c>>>=g,u-=g,0===n.have){e.msg="invalid bit length repeat",n.mode=16209;break}E=n.lens[n.have-1],f=3+(3&c),c>>>=2,u-=2}else if(17===m){for(T=g+3;u<T;){if(0===s)break e;s--,c+=i[o++]<<u,u+=8}u-=g,E=0,f=3+(7&(c>>>=g)),c>>>=3,u-=3}else{for(T=g+7;u<T;){if(0===s)break e;s--,c+=i[o++]<<u,u+=8}u-=g,E=0,f=11+(127&(c>>>=g)),c>>>=7,u-=7}if(n.have+f>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=16209;break}for(;f--;)n.lens[n.have++]=E}}if(16209===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=16209;break}if(n.lenbits=9,S={bits:n.lenbits},w=eq(1,n.lens,0,n.nlen,n.lencode,0,n.work,S),n.lenbits=S.bits,w){e.msg="invalid literal/lengths set",n.mode=16209;break}if(n.distbits=6,n.distcode=n.distdyn,S={bits:n.distbits},w=eq(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,S),n.distbits=S.bits,w){e.msg="invalid distances set",n.mode=16209;break}if(n.mode=16199,t===iq)break e;case 16199:n.mode=16200;case 16200:if(s>=6&&l>=258){e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=s,n.hold=c,n.bits=u,XY(e,d),a=e.next_out,r=e.output,l=e.avail_out,o=e.next_in,i=e.input,s=e.avail_in,c=n.hold,u=n.bits,16191===n.mode&&(n.back=-1);break}for(n.back=0;y=(C=n.lencode[c&(1<<n.lenbits)-1])>>>16&255,m=65535&C,!((g=C>>>24)<=u);){if(0===s)break e;s--,c+=i[o++]<<u,u+=8}if(y&&0==(240&y)){for(_=g,b=y,k=m;y=(C=n.lencode[k+((c&(1<<_+b)-1)>>_)])>>>16&255,m=65535&C,!(_+(g=C>>>24)<=u);){if(0===s)break e;s--,c+=i[o++]<<u,u+=8}c>>>=_,u-=_,n.back+=_}if(c>>>=g,u-=g,n.back+=g,n.length=m,0===y){n.mode=16205;break}if(32&y){n.back=-1,n.mode=16191;break}if(64&y){e.msg="invalid literal/length code",n.mode=16209;break}n.extra=15&y,n.mode=16201;case 16201:if(n.extra){for(T=n.extra;u<T;){if(0===s)break e;s--,c+=i[o++]<<u,u+=8}n.length+=c&(1<<n.extra)-1,c>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=16202;case 16202:for(;y=(C=n.distcode[c&(1<<n.distbits)-1])>>>16&255,m=65535&C,!((g=C>>>24)<=u);){if(0===s)break e;s--,c+=i[o++]<<u,u+=8}if(0==(240&y)){for(_=g,b=y,k=m;y=(C=n.distcode[k+((c&(1<<_+b)-1)>>_)])>>>16&255,m=65535&C,!(_+(g=C>>>24)<=u);){if(0===s)break e;s--,c+=i[o++]<<u,u+=8}c>>>=_,u-=_,n.back+=_}if(c>>>=g,u-=g,n.back+=g,64&y){e.msg="invalid distance code",n.mode=16209;break}n.offset=m,n.extra=15&y,n.mode=16203;case 16203:if(n.extra){for(T=n.extra;u<T;){if(0===s)break e;s--,c+=i[o++]<<u,u+=8}n.offset+=c&(1<<n.extra)-1,c>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=16209;break}n.mode=16204;case 16204:if(0===l)break e;if(f=d-l,n.offset>f){if((f=n.offset-f)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=16209;break}f>n.wnext?(f-=n.wnext,p=n.wsize-f):p=n.wnext-f,f>n.length&&(f=n.length),v=n.window}else v=r,p=a-n.offset,f=n.length;f>l&&(f=l),l-=f,n.length-=f;do{r[a++]=v[p++]}while(--f);0===n.length&&(n.mode=16200);break;case 16205:if(0===l)break e;r[a++]=n.length,l--,n.mode=16200;break;case 16206:if(n.wrap){for(;u<32;){if(0===s)break e;s--,c|=i[o++]<<u,u+=8}if(d-=l,e.total_out+=d,n.total+=d,4&n.wrap&&d&&(e.adler=n.check=HV(n)?DW(n.check,r,d,a-d):CW(n.check,r,d,a-d)),d=l,4&n.wrap&&(HV(n)?c:dq(c))!==n.check){e.msg="incorrect data check",n.mode=16209;break}c=0,u=0}n.mode=16207;case 16207:if(n.wrap&&HV(n)){for(;u<32;){if(0===s)break e;s--,c+=i[o++]<<u,u+=8}if(4&n.wrap&&c!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=16209;break}c=0,u=0}n.mode=16208;case 16208:w=oq;break e;case 16209:w=lq;break e;case 16210:return cq;default:return sq}return e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=s,n.hold=c,n.bits=u,(n.wsize||d!==e.avail_out&&n.mode<16209&&(n.mode<16206||t!==tq))&&wq(e,e.output,e.next_out,d-e.avail_out),h-=e.avail_in,d-=e.avail_out,e.total_in+=h,e.total_out+=d,n.total+=d,4&n.wrap&&d&&(e.adler=n.check=HV(n)?DW(n.check,r,d,e.next_out-d):CW(n.check,r,d,e.next_out-d)),e.data_type=n.bits+(n.last?64:0)+(16191===n.mode?128:0)+(16199===n.mode||16194===n.mode?256:0),(0===h&&0===d||t===tq)&&w===rq&&(w=uq),w},inflateEnd:function(e){if(gq(e))return sq;var t=e.state;return t.window&&(t.window=null),e.state=null,rq},inflateGetHeader:function(e,t){if(gq(e))return sq;var n=e.state;return 0==(2&n.wrap)?sq:(n.head=t,t.done=!1,rq)},inflateSetDictionary:function(e,t){var n,i=t.length;return gq(e)?sq:0!==(n=e.state).wrap&&16190!==n.mode?sq:16190===n.mode&&CW(1,t,i,0)!==n.check?lq:wq(e,t,i,i)?(n.mode=16210,cq):(n.havedict=1,rq)},inflateInfo:"pako inflate (from Nodeca project)"},Tq=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1},Cq=Object.prototype.toString,xq=RW.Z_NO_FLUSH,Dq=RW.Z_FINISH,Iq=RW.Z_OK,Rq=RW.Z_STREAM_END,Lq=RW.Z_NEED_DICT,Pq=RW.Z_STREAM_ERROR,Aq=RW.Z_DATA_ERROR,Oq=RW.Z_MEM_ERROR;function Mq(e){this.options=SY({chunkSize:65536,windowBits:15,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new PY,this.strm.avail_out=0;var n=Sq.inflateInit2(this.strm,t.windowBits);if(n!==Iq)throw new Error(IW[n]);if(this.header=new Tq,Sq.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=IY(t.dictionary):"[object ArrayBuffer]"===Cq.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=Sq.inflateSetDictionary(this.strm,t.dictionary))!==Iq))throw new Error(IW[n])}function Nq(e,t){var n=new Mq(t);if(n.push(e),n.err)throw n.msg||IW[n.err];return n.result}Mq.prototype.push=function(e,t){var n,i,r,o=this.strm,a=this.options.chunkSize,s=this.options.dictionary;if(this.ended)return!1;for(i=t===~~t?t:!0===t?Dq:xq,"[object ArrayBuffer]"===Cq.call(e)?o.input=new Uint8Array(e):o.input=e,o.next_in=0,o.avail_in=o.input.length;;){for(0===o.avail_out&&(o.output=new Uint8Array(a),o.next_out=0,o.avail_out=a),(n=Sq.inflate(o,i))===Lq&&s&&((n=Sq.inflateSetDictionary(o,s))===Iq?n=Sq.inflate(o,i):n===Aq&&(n=Lq));o.avail_in>0&&n===Rq&&o.state.wrap>0&&0!==e[o.next_in];)Sq.inflateReset(o),n=Sq.inflate(o,i);switch(n){case Pq:case Aq:case Lq:case Oq:return this.onEnd(n),this.ended=!0,!1}if(r=o.avail_out,o.next_out&&(0===o.avail_out||n===Rq))if("string"===this.options.to){var l=LY(o.output,o.next_out),c=o.next_out-l,u=RY(o.output,l);o.next_out=c,o.avail_out=a-c,c&&o.output.set(o.output.subarray(l,l+c),0),this.onData(u)}else this.onData(o.output.length===o.next_out?o.output:o.output.subarray(0,o.next_out));if(n!==Iq||0!==r){if(n===Rq)return n=Sq.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,!0;if(0===o.avail_in)break}}return!0},Mq.prototype.onData=function(e){this.chunks.push(e)},Mq.prototype.onEnd=function(e){e===Iq&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=TY(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var zq=function(e,t){return(t=t||{}).raw=!0,Nq(e,t)},Uq={Deflate:KY,deflate:WY,deflateRaw:YY,gzip:qY,Inflate:Mq,inflate:Nq,inflateRaw:zq,ungzip:Nq,constants:RW},Bq=function(){function e(e,t){this.collector=e,this.config=t,this.requestType=t.request_type,this.supportBeacon=!(!window.navigator||!window.navigator.sendBeacon),this.errorCode={NO_URL:4001,IMG_ON:4e3,IMG_CATCH:4002,BEACON_FALSE:4003,XHR_ON:500,RESPONSE:5001,TIMEOUT:5005},this.customHeader=t.custom_request_header||{}}return e.prototype.useFetch=function(e){var t=e.url,n=e.data,i=e.method,r=e.success,o=e.fail,a={"Content-Type":"application/json; charset=utf-8"};if(kT(this.customHeader).length)for(var s in this.customHeader)a[s]=this.customHeader[s];window.fetch?fetch(t,{method:i||"POST",headers:a,body:Hj(n)}).then((function(e){return e.json()})).then((function(e){r&&r(e)})).catch((function(e){o&&o(n,e)})):(this.requestType="xhr",console.log("your brwoser not support fetch, use xhr"),this.useRequest({url:t,data:n,method:i,success:r,fail:o}))},e.prototype.useBeacon=function(e){var t=e.url,n=e.data,i=e.success,r=e.fail;"xhr"!==this.requestType?window.navigator.sendBeacon(t,Hj(n))?i&&i():r&&r(n,this.errorCode.BEACON_FALSE):this.useXhr(e)},e.prototype.useXhr=function(e){var t=this,n=e.url,i=e.data,r=e.method,o=e.success,a=e.fail,s=e.timeout,l=e.withCredentials,c=e.app_key,u=e.zip;try{var h=new XMLHttpRequest,d=r||"POST";if(h.open(d,""+n,!0),h.setRequestHeader("Content-Type","application/json; charset=utf-8"),c&&h.setRequestHeader("X-MCS-AppKey",""+c),kT(this.customHeader).length)for(var f in this.customHeader)h.setRequestHeader(f,this.customHeader[f]);l&&(h.withCredentials=!0),s&&(h.timeout=s,h.ontimeout=function(){a&&a(i,t.errorCode.TIMEOUT)}),h.onload=function(){if(o){var e=null;if(h.responseText){try{e=JSON.parse(h.responseText)}catch(t){e={}}o(e,i)}}},h.onerror=function(){h.abort(),a&&a(i,t.errorCode.XHR_ON)};try{var p=Hj(i);if(this.config.need_zip&&u){var v=(new TextEncoder).encode(p),g=Uq.gzip(v);h.setRequestHeader("Content-Encoding","gzip"),h.send(g)}else h.send(p)}catch(y){this.collector.emit("sdk-inner-error",{type:"sdk_error_send",eventData:i,errorCode:1e3,msg:y.message||y.stack||"sdk_error_send"})}}catch(y){this.collector.emit("sdk-inner-error",{type:"sdk_error_request",eventData:i,errorCode:1001,msg:y.message||y.stack||"sdk_error_request"})}},e.prototype.useRequest=function(e){var t=e.useBeacon,n=e.forceXhr;if("xhr"===this.requestType)this.useXhr(e);else{if(t&&this.supportBeacon)return void this.useBeacon(e);if("fetch"===this.requestType&&!n)return void this.useFetch(e);this.useXhr(e)}},e}(),Fq=function(){function e(e,t){if(this.devToolReady=!1,this.sendAlready=!1,t.enable_debug&&"Microsoft Internet Explorer"!==e.configManager.get("browser")){this.collect=e,this.config=t,this.app_id=t.app_id;var n=e.adapters.storage;this.cacheStorgae=new n(!1),this.devToolOrigin=window.location.origin,this.loadUrl=t.devtool_url||"https://sf16-website-login.neutral.ttwstatic.com/obj/tiktok_web_login_static/log-sdk/collect/devtool/debug-web.v2.0.0.js",this.filterEvent=new DS(["__bav_page","__bav_beat","__bav_page_statistics","__bav_click","__bav_page_exposure","bav2b_page","bav2b_beat","bav2b_page_statistics","bav2b_click","bav2b_page_exposure","_be_active","predefine_pageview","__profile_set","__profile_set_once","__profile_increment","__profile_unset","__profile_append","predefine_page_alive","predefine_page_close","abtest_exposure"]),this.load()}}return e.prototype.loadScript=function(e){try{var t=document.createElement("script");t.src=e,t.onerror=function(){console.log("load DevTool render fail")},t.onload=function(){console.log("load DevTool render success")},document.getElementsByTagName("body")[0].appendChild(t)}catch(n){console.log("devTool load fail, "+n.message)}},e.prototype.parseUrl=function(){var e={};try{var t=window.location.href.split("?")[1].split("&");t.length&&t.forEach((function(t){var n=t.split("=");e[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}))}catch(n){}return e},e.prototype.load=function(){try{var e=this.parseUrl();if(e.open_devtool_web&&e.app_id){if(parseInt(e.app_id)!==this.app_id)return}else if(!this.getStorage())return;this.loadBaseInfo(),this.loadHook(),this.setStorage(),this.addLintener(),this.loadDebuggerModule(),this.loadDevTool()}catch(t){console.log("debug fail, "+t.message)}},e.prototype.getStorage=function(){var e=this.cacheStorgae.getItem("__applog_open_devtool_web");return e&&parseInt(e)===this.app_id},e.prototype.setStorage=function(){this.cacheStorgae.setItem("__applog_open_devtool_web",this.app_id)},e.prototype.loadDevTool=function(){this.loadScript(this.loadUrl)},e.prototype.loadBaseInfo=function(){if(this.log=[],this.event=[],this.info=[{title:"BaseInfo",key:"base",type:1,content:[{name:"app_id",desc:"APPID",value:this.config.app_id},{name:"channel",desc:"CHANNEL",value:this.config.channel},{name:"domain",desc:"Domain",value:this.collect.configManager.getDomain()},{name:"sdk_version",desc:"SDK Version",value:"5.3.8_oversea"},{name:"sdk_type",desc:"SDK Import Type",value:"npm"}]},{title:"UserInfo",key:"user",type:2,content:[{name:"uuid",desc:"UserUniqueId",value:this.collect.configManager.get("user").user_unique_id||""},{name:"web_id",desc:"WEB_ID",value:this.collect.configManager.get("user").web_id||""}]},{title:"CommonInfo",type:2,key:"common",content:[{name:"browser",desc:"Browser",value:this.collect.configManager.get("browser")},{name:"browser_version",desc:"Browser Version",value:this.collect.configManager.get("browser_version")},{name:"platform",desc:"Platform",value:this.collect.configManager.get("platform")},{name:"device_model",desc:"Devide Model",value:this.collect.configManager.get("device_model")},{name:"os_name",desc:"Os Name",value:this.collect.configManager.get("os_name")},{name:"os_version",desc:"Os Version",value:this.collect.configManager.get("os_version")},{name:"resolution",desc:"Screen Resolution",value:this.collect.configManager.get("resolution")},{name:"referrer",desc:"Referrer",value:this.collect.configManager.get("referrer")},{name:"custom",desc:"Custom Info",value:Hj(this.collect.configManager.get("custom"))}]},{title:"Config Info",key:"config",type:3,content:[{name:"autotrack",desc:"AutoTrackEvent",value:!!this.config.autotrack},{name:"stay",desc:"StayDuration",value:!!this.config.enable_stay_duration}]},{title:"A/B Config Info",key:"ab",type:4,content:[{name:"ab",desc:"A/BTester",value:!!this.config.enable_ab_test}]}],this.config.enable_ab_test){var e=this.getInfo("ab"),t=[{name:"ab",desc:"A/BTester",value:!!this.config.enable_ab_test},{name:"vid",desc:"A/B VID",value:this.collect.configManager.getAbVersion()},{name:"ab_domain",desc:"Domain",value:this.config.ab_channel_domain||QV(EK[this.config.channel])},{name:"all_values",desc:"A/B ALL Values",value:this.collect.configManager.getAbCache()}];e.content=t,this.setInfo("ab",e)}},e.prototype.getInfo=function(e){var t=null;return this.info.forEach((function(n){n.key===e&&(t=n)})),t},e.prototype.setInfo=function(e,t){var n=!1;this.info.forEach((function(i){i.key===e&&(n=!0,i=t)})),n||this.info.push(t)},e.prototype.getSecondInfo=function(e,t){var n=this.getInfo(e),i=null;return n.content.forEach((function(e){e.name===t&&(i=e)})),i},e.prototype.setSecondInfo=function(e,t,n){var i=this.getInfo(e),r=!1;if(i.content.forEach((function(e){e.name===t&&(e.value=n,r=!0)})),!r){var o={name:t,value:n,desc:t.toLocaleUpperCase()};i.content.push(o)}this.setInfo(e,i)},e.prototype.loadHook=function(){var e=this;this.collect.on(lK.DEBUGGER_MESSAGE,(function(t){switch(t.type){case lK.DEBUGGER_MESSAGE_SDK:var n={time:t.time,type:t.logType||"sdk",infoType:t.infoType||"sdk",level:t.level,name:t.info,show:!0,levelShow:!0,needDesc:!!t.data};if(t.data&&(n.desc={content:Hj(t.data)}),e.updateLog(n),t.secType&&"AB"===t.secType)e.setSecondInfo("ab","vid",e.collect.configManager.getAbVersion()),e.setSecondInfo("ab","all_values",e.collect.configManager.getAbCache());else if("USER"===t.secType)e.setSecondInfo("user","user_unique_id"===t.common?"uuid":t.common,e.collect.configManager.get(t.common));else if("HEADER"===t.secType){var i=e.collect.configManager.get(t.common);e.setSecondInfo("common",t.common,"custom"===t.common?Hj(i):i)}return void e.updateInfo();case lK.DEBUGGER_MESSAGE_EVENT:if(t.data&&t.data.length){var r=t.data[0],o=r.events;if(!o.length)return;o.forEach((function(n){n.checkShow=!0,n.searchShow=!0,n.focusShow=!0,n.status=t.status,n.type=e.filterEvent.has(n.event)?"sdk":"cus",n.verifyType=t.verifyType?"verify":"no",n.info="","fail"===t.status&&(n.info={message:"code: "+t.code+", msg: "+(t.msg||t.failType)})})),e.updateEvent(r)}return}}))},e.prototype.addLintener=function(){var e=this;window.addEventListener("message",(function(t){if(e.devToolOrigin===t.origin){if(t&&t.data&&"devtool:web:ready"===t.data.type){if(e.devToolOrigin=t.origin,e.devToolReady=!0,e.sendAlready)return;e.sendData("devtool:web:init",{info:e.info,log:e.log,event:e.event,sdk_type:F_("5.3.8_oversea").call("5.3.8_oversea","tob")?"tob":"inner",appId:e.app_id}),e.sendAlready=!0}t&&t.data&&"devtool:web:ssid"===t.data.type&&e.collect.getToken((function(t){e.setSecondInfo("user","sid",t.tobid),e.updateInfo()}))}}))},e.prototype.sendData=function(e,t){try{var n={type:e,payload:t};window&&window.postMessage(n,this.devToolOrigin)}catch(i){}},e.prototype.updateInfo=function(){this.devToolReady&&this.sendData("devtool:web:info",this.info)},e.prototype.updateLog=function(e){this.devToolReady?this.sendData("devtool:web:log",e):this.log.push(e)},e.prototype.updateEvent=function(e){this.devToolReady?this.sendData("devtool:web:event",e):this.event.push(e)},e.prototype.loadDebuggerModule=function(){var e="#debugger-applog-web {\n position: fixed;\n width: 45px;\n height: 45px;\n background-image: url("+QV("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z1az1bz1lz49z22z1mz21z4az19z27z22z1cz21z1az1kz4az1az1mz1kz4bz1mz19z1hz4bz21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz1bz1cz24z22z1mz1mz1jz4bz18z1nz1nz1jz1mz1ez4az1nz1lz1e")+");\n bottom: 5%;\n right: 10%;\n cursor: pointer;\n z-index:100;\n background-size: 45px;\n }",t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.appendChild(document.createTextNode(e)),t.appendChild(n);var i=document.createElement("div");i.innerHTML='<div id="debugger-applog-web" class="debugger-applog-web"></div>';var r=document.createElement("div");r.innerHTML='<div id="debugger-container" class="debugger-container"></div>',document.getElementsByTagName("body")[0].appendChild(i),document.getElementsByTagName("body")[0].appendChild(r);var o=document.getElementById("debugger-applog-web");o&&o.addEventListener("click",(function(){window&&window.postMessage({type:"devtool:web:open-draw"},location.origin)}))},e}(),Hq={autotrack:{src:{sg:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/autotrack.js",va:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/autotrack.js"},object:"LogAutoTrack"},ab:{src:{sg:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/ab.js",va:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/ab.js"},object:"LogAb"},stay:{src:{sg:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/stay.js",va:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/stay.js"},object:"LogStay"},route:{src:{sg:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/route.js",va:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/route.js"},object:"LogRoute"},tracer:{src:{sg:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/tracer.js",va:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/tracer.js"},object:"LogTracer"},retry:{src:{sg:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/retry.js",va:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/retry.js"},object:"LogRetry"},visual:{src:{sg:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/visual.js",va:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/visual.js"},object:"LogVisual"}},jq=["ab","autotrack","Stay","store","et","profile","cep","heartbeat","monitor","route","tracer"],Gq=function(){function e(e){this.disableAutoPageView=!1,this.bridgeReport=!1,this.staging=!1,this.pluginInstances=[],this.sended=!1,this.started=!1,this.destroy=!1,this.sdkReady=!1,this.adapters={},this.loadType="base",this.sdkStop=!1,this.name=e,this.hook=new qV,this.remotePlugin=new hP,this.Types=CK,this.adapters.storage=gK,this.loadType="full"}return e.usePlugin=function(t,n,i){if(n){for(var r=!1,o=0,a=e.plugins.length;o<a;o++)if(e.plugins[o].name===n){e.plugins[o].plugin=t,e.plugins[o].options=i||{},r=!0;break}r||e.plugins.push({name:n,plugin:t,options:i})}else e.plugins.push({plugin:t})},e.prototype.usePlugin=function(e,t,n){e&&("full"===this.loadType&&F_(jq).call(jq,e)?console.info("your sdk version has "+e+" already ~"):t?"string"==typeof t?this.remotePlugin.get(e)||this.remotePlugin.set(e,{src:t,call:n}):this.remotePlugin.get(e)||this.remotePlugin.set(e,{instance:t}):this.remotePlugin.get(e)||this.remotePlugin.set(e,"sdk"))},e.prototype.init=function(t){var n,i,r=this;try{n=JSON.parse(Hj(t))}catch(a){n=t}if(this.logger=new PK(this.name,n.log),this.inited)this.logger.warn("[instance: "+this.name+"], every instance's api: init, can be call only one time!");else if(n&&XV(n))if(n.app_id&&"number"==typeof(i=n.app_id)&&!isNaN(i))if(n.app_key&&"string"!=typeof n.app_key)this.logger.warn("app_key param is error, must be string, please check!");else{if(!n.channel_domain){var o;if("eu_ttp_ie"===n.report_channel||"ie"===n.channel)return void this.logger.error("ie dc will be deprecated in the future, please use other dc instead");n.report_channel&&!_K().has(n.report_channel)?(this.logger.warn("your report_channel: "+n.channel+" is not exist. report_channel must be one of "+bK().join(",")+", use default report_channel: us_east instead, please check!!!"),n.report_channel="us_east"):n.report_channel||-1!==qP(o=["sg","va","in","my","ie","ie2"]).call(o,n.channel)||(this.logger.warn("your channel: "+n.channel+" is not exist. use report_channel instead and report_channel must be one of "+bK().join(",")+", use default report_channel: us_east instead, please check!!!"),n.report_channel="us_east"),this.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK set channel warning",level:"error",time:Date.now(),data:"your report_channel: "+n.channel+" is not exist. report_channel must be one of "+bK().join(",")+", use us_east instead, please check!!!",infoType:"sdk"})}if(this.spider=new AK,this.spider.checkSpider(n))return this.logger.warn("The current environment may be a spider, can not report!"),void this.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK hit spider",level:"error",time:Date.now(),data:"The current environment may be a spider, can not report!",infoType:"sdk"});this.appBridge=new OK(this,n.enable_native),this.requestManager=new Bq(this,n),this.bridgeReport=this.appBridge.bridgeInject(),this.configManager=new LK(this,n),this.debugger=new Fq(this,n),this.initConfig=n,this.emit(CK.Init),this.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Execute Init",data:n,level:"info",time:Date.now(),infoType:"cus"}),n.disable_auto_pv&&(this.disableAutoPageView=!0),this.bridgeReport||(this.configManager.setAppid(n.app_id),this.eventManager=new UK,this.tokenManager=new FK,this.sessionManager=new jK,rb.all([new rb((function(e){r.once(CK.TokenComplete,(function(){e(!0)}))})),new rb((function(e){r.once(CK.Start,(function(){e(!0)}))})),new rb((function(e){r.once(CK.LogSettingReady,(function(){e(!0)}))}))]).then((function(){try{var t;AT(t=e.plugins).call(t,(function(e,t){var n=t.plugin,i=t.options,o=VS(r.initConfig,i);r.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Load "+t.name+" Plugin",level:"info",time:Date.now(),infoType:"sdk"});var a=new n;return a.apply(r,o),e.push(a),e}),r.pluginInstances)}catch(i){console.warn("load plugin error, "+i.message),r.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Load Plugin Error",level:"error",time:Date.now(),data:i.message,infoType:"sdk"})}r.sdkReady=!0,r.emit(CK.Ready),r.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK UserInfo Init Completed",time:Date.now(),secType:"USER",level:"info",data:r.configManager.get("user"),infoType:"sdk"}),r.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Initialization Completed",time:Date.now(),level:"info",data:r.configManager.get("user"),infoType:"sdk"}),r.logger.info("appid: "+n.app_id+", userInfo:"+Hj(r.configManager.get("user"))),r.logger.info("appid: "+n.app_id+", sdk is ready, version is 5.3.8_oversea, you can report now !!!"),n.disable_auto_pv&&(r.disableAutoPageView=!0);try{("full"===r.loadType&&n.enable_ab_test||n.autotrack)&&(window.opener||window.parent).postMessage("[tea-sdk]ready","*")}catch(i){r.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"Something Error",level:"error",time:Date.now(),data:i.message,infoType:"sdk"})}r.pageView(),r.on(CK.TokenChange,(function(e){"webid"===e&&r.pageView(),r.logger.info("appid: "+n.app_id+" token change, new userInfo:"+Hj(r.configManager.get("user"))),r.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Set UserInfo",time:Date.now(),secType:"USER",level:"info",data:r.configManager.get("user"),infoType:"sdk"})})),r.on(CK.TokenReset,(function(){r.logger.info("appid: "+n.app_id+" token reset, new userInfo:"+Hj(r.configManager.get("user"))),r.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Reset UserInfo",time:Date.now(),secType:"USER",level:"info",data:r.configManager.get("user"),infoType:"sdk"})})),r.on(CK.RouteChange,(function(e){e.init||n.disable_route_report||r.pageView()}))})),this.tokenManager.apply(this,n),this.eventManager.apply(this,n),this.sessionManager.apply(this,n)),this.inited=!0}else this.logger.warn("app_id param is error, must be number, please check!");else this.logger.warn("init params error,please check")},e.prototype.config=function(e){if(!this.inited)return console.warn("config must be use after function init"),void this.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Config Error",level:"error",time:Date.now(),data:"config must be use after function init",infoType:"sdk"});if(!e||!XV(e))return console.warn("config params is error, please check"),void this.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Config Error",level:"error",time:Date.now(),data:"config params is error, please check",infoType:"sdk"});var t;try{t=JSON.parse(Hj(t))}catch(cK){t=e}if(this.bridgeReport)this.appBridge.setConfig(t);else{t._staging_flag&&1===t._staging_flag&&(this.staging=!0),t.disable_auto_pv&&(this.disableAutoPageView=!0,delete t.disable_auto_pv);var n=jV({},t);if(this.initConfig&&this.initConfig.configPersist){var i=this.configManager.getStore();i&&(n=VS(i,t)),this.configManager.setStore(t)}n.web_id,n.user_unique_id,n.device_id;var r=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&qP(t).call(t,i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Lx){var r=0;for(i=Lx(e);r<i.length;r++)qP(t).call(t,i[r])<0&&(n[i[r]]=e[i[r]])}return n}(n,["web_id","user_unique_id","device_id"]);n.hasOwnProperty("web_id")&&this.emit(CK.ConfigWebId,n.web_id),n.hasOwnProperty("user_unique_id")&&this.emit(CK.ConfigUuid,n.user_unique_id),n.hasOwnProperty("device_id")&&this.emit(CK.ConfigDiD,n.device_id),this.configManager.set(r),this.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Execute Config",level:"info",time:Date.now(),data:n,infoType:"cus"})}},e.prototype.setDomain=function(e){this.configManager&&this.configManager.setDomain(e),this.emit(CK.ConfigDomain)},e.prototype.getConfig=function(e){return this.configManager.get(e)},e.prototype.send=function(){this.start()},e.prototype.start=function(){this.inited&&!this.sended&&(this.sended=!0,this.emit(CK.Start),this.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Execute Start",level:"info",time:Date.now(),infoType:"cus"}),this.bridgeReport&&(this.pageView(),this.emit(CK.Ready)))},e.prototype.event=function(e,t){var n=this;try{var i=[];if(Array.isArray(e))e.forEach((function(e){var t=n.processEvent(e[0],e[1]||{});t&&i.push(t)}));else{var r=this.processEvent(e,t);if(!r)return;i.push(r)}this.bridgeReport?i.forEach((function(e){var t=e.event,i=e.params;n.appBridge.onEventV3(t,Hj(i))})):i.length&&(this.emit(CK.Event,i),this.emit(CK.SessionResetTime)),this.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Execute Event",level:"info",time:Date.now(),data:e,infoType:"cus"})}catch(o){this.logger.warn("something error, please check"),this.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Execute Event Something Error",level:"error",time:Date.now(),data:o.message,infoType:"sdk"})}},e.prototype.beconEvent=function(e,t){if(Array.isArray(e))return this.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK BeconEvent Error",level:"error",time:Date.now(),data:"beconEvent not support batch report, please check",infoType:"sdk"}),void this.logger.warn("beconEvent not support batch report, please check");var n=[],i=this.processEvent(e,t||{});i&&(n.push(i),n.length&&(this.emit(CK.BeconEvent,n),this.emit(CK.SessionResetTime)),this.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Execute Beacon Event",level:"info",time:Date.now(),data:e,infoType:"sdk"}))},e.prototype.beaconEvent=function(e,t){this.beconEvent(e,t)},e.prototype.processEvent=function(e,t){void 0===t&&(t={});try{if(!e)return console.warn("eventName is null, please check"),null;var n=e;/^event\./.test(e)&&(n=Sx(e).call(e,6));var i=t;"object"!=Du(i)&&(i={}),i.profile?delete i.profile:i.event_index=ZV();var r=void 0;return i.local_ms?(r=i.local_ms,delete i.local_ms):r=+new Date,{event:n,params:i,local_time_ms:r,is_bav:this.initConfig&&this.initConfig.autotrack?1:0}}catch(o){return this.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Something Error",level:"error",time:Date.now(),data:o.message,infoType:"sdk"}),{event:e,params:t}}},e.prototype.filterEvent=function(e){this.eventFilter=e},e.prototype.on=function(e,t){this.hook.on(e,t)},e.prototype.once=function(e,t){this.hook.once(e,t)},e.prototype.off=function(e,t){this.hook.off(e,t)},e.prototype.emit=function(e,t,n){this.hook.emit(e,t,n)},e.prototype.set=function(e){this.hook.set(e)},e.prototype.stop=function(){this.sdkStop=!0},e.prototype.reStart=function(){this.sdkStop=!1},e.prototype.pageView=function(){this.disableAutoPageView||this.predefinePageView()},e.prototype.predefinePageView=function(e){if(void 0===e&&(e={}),this.inited){var t={title:document.title||location.pathname,url:location.href,url_path:location.pathname,time:Date.now(),referrer:window.document.referrer,$is_first_time:""+(this.configManager&&this.configManager.is_first_time||!1)},n=jV(jV({},t),e);this.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Report PV",level:"info",time:Date.now(),infoType:"sdk"}),this.event("predefine_pageview",n)}else console.warn("predefinePageView should call after init")},e.prototype.clearEventCache=function(){this.emit(CK.CleanEvents)},e.prototype.setWebId=function(e){this.config({web_id:""+e})},e.prototype.setNativeAppId=function(e){this.bridgeReport&&this.appBridge.setNativeAppId(e)},e.prototype.getSessionId=function(){return HK()},e.prototype.setSessionId=function(e){this.emit(CK.SessionReset,e)},e.prototype.resetStayDuration=function(e,t,n){this.emit(CK.ResetStay,{url_path:e,title:t,url:n},CK.Stay)},e.prototype.resetStayParams=function(e,t,n){void 0===e&&(e=""),void 0===t&&(t=""),void 0===n&&(n=""),this.emit(CK.SetStay,{url_path:e,title:t,url:n},CK.Stay)},e.prototype.getToken=function(e,t){var n=this;if(this.inited){var i=!1,r=function(t){if(!i){var r;i=!0;var o=n.configManager.get().user;return t&&(o.tobid=t,o[LV(r="diss".split("")).call(r).join("")]=t),e(jV({},o))}},o=function(){n.tokenManager.getTobId().then((function(e){r(e)}))};this.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Execute GetToken",level:"info",time:Date.now(),infoType:"cus"}),this.sdkReady?o():(t&&setTimeout((function(){r()}),t),this.on(CK.Ready,(function(){o()})))}else console.warn("predefinePageView should call after init")},e.prototype.startTrackEvent=function(e){e&&this.emit(CK.TrackEventDurationStart,e,CK.TrackEventDuration)},e.prototype.endTrackEvent=function(e,t){void 0===t&&(t={}),e&&this.emit(CK.TrackEventDurationEnd,{eventName:e,params:t},CK.TrackEventDuration)},e.prototype.pauseTrackEvent=function(e){e&&this.emit(CK.TrackEventDurationPause,e,CK.TrackEventDuration)},e.prototype.resumeTrackEvent=function(e){e&&this.emit(CK.TrackEventDurationResume,e,CK.TrackEventDuration)},e.prototype.profileSet=function(e){this.bridgeReport?this.appBridge.profileSet(Hj(e)):this.emit(CK.ProfileSet,e,CK.Profile),this.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Execute profileSet",level:"info",time:Date.now(),data:e})},e.prototype.profileSetOnce=function(e){this.bridgeReport?this.appBridge.profileSetOnce(Hj(e)):this.emit(CK.ProfileSetOnce,e,CK.Profile),this.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Execute profileSetOnce",level:"info",time:Date.now(),data:e})},e.prototype.profileIncrement=function(e){this.bridgeReport?this.appBridge.profileIncrement(Hj(e)):this.emit(CK.ProfileIncrement,e,CK.Profile),this.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Execute profileIncrement",level:"info",time:Date.now(),data:e})},e.prototype.profileUnset=function(e){this.bridgeReport?this.appBridge.profileUnset(e):this.emit(CK.ProfileUnset,e,CK.Profile),this.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Execute profileUnset",level:"info",time:Date.now(),data:e})},e.prototype.profileAppend=function(e){this.bridgeReport?this.appBridge.profileAppend(Hj(e)):this.emit(CK.ProfileAppend,e,CK.Profile),this.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Execute profileAppend",level:"info",time:Date.now(),data:e})},e.prototype.setExternalAbVersion=function(e){var t;this.emit(CK.AbExternalVersion,"string"==typeof e&&e?nO(t=""+e).call(t):null,CK.Ab)},e.prototype.getVar=function(e,t,n,i){this.emit(CK.AbVar,{name:e,defaultValue:t,callback:n,uuid:i},CK.Ab)},e.prototype.getABconfig=function(e,t){this.emit(CK.AbConfig,{params:e,callback:t},CK.Ab)},e.prototype.getABConfig=function(e,t){this.emit(CK.AbConfig,{params:e,callback:t},CK.Ab)},e.prototype.getAbSdkVersion=function(){return this.configManager.getAbVersion()},e.prototype.onAbSdkVersionChange=function(e){var t=this;return this.emit(CK.AbVersionChangeOn,e,CK.Ab),function(){t.emit(CK.AbVersionChangeOff,e,CK.Ab)}},e.prototype.offAbSdkVersionChange=function(e){this.emit(CK.AbVersionChangeOff,e,CK.Ab)},e.prototype.openOverlayer=function(){this.emit(CK.AbOpenLayer,"",CK.Ab)},e.prototype.closeOverlayer=function(){this.emit(CK.AbCloseLayer,"",CK.Ab)},e.prototype.getAllVars=function(e,t){this.emit(CK.AbAllVars,{callback:e,timeout:t},CK.Ab)},e.prototype.destoryInstace=function(){this.destroy||(this.destroy=!0,this.off(CK.TokenComplete),this.emit(CK.DestoryInstance))},e.prototype.destroyInstance=function(){this.destroy||(this.destroy=!0,this.off(CK.TokenComplete),this.emit(CK.DestoryInstance))},e.plugins=[],e}(),Vq={},Kq=[];function Wq(e,t,n,i){var r=e&&e.source||window.opener||window.parent,o=e&&e.origin||i||window.location.origin,a={type:t,payload:n};r.postMessage(Hj(a),o)}function Yq(e){if(Kq.some((function(e){return"*"===e}))||Kq.some((function(t){var n;return qP(n=e.origin).call(n,t)>-1}))){var t=e.data;if("string"==typeof e.data)try{t=JSON.parse(e.data)}catch(r){t=void 0}if(!t)return;var n=t.type,i=t.payload;Vq[n]&&Vq[n].forEach((function(t){"function"==typeof t&&t(e,i)}))}}var qq,Xq="__rangers_ab_style__";!function(e){e[e.Var=0]="Var",e[e.All=1]="All"}(qq||(qq={}));var $q=function(){function e(){this.fetchStatus="no",this.refreshFetchStatus="no",this.versions=[],this.extVersions=[],this.mulilinkVersions=[],this.enable_multilink=!1,this.enable_ab_visual=!1,this.editMode=!1,this.callbacks=[],this.data={},this.changeListener=new hP,this.readyStatus=!1,this.exposureCache=[],this.fetchQueueMap=new hP}return e.prototype.apply=function(e,t){var n=this;if(this.collect=e,this.config=t,this.config.enable_ab_test){var i=t.enable_multilink,r=t.ab_channel_domain,o=t.enable_ab_visual,a=t.ab_cross,s=t.ab_cookie_domain,l=t.ab_timeout,c=t.disable_auto_ab,u=EK[t.channel||"sg"]||EK.sg,h=r||QV(u),d=e.adapters.storage;this.cacheStorgae=new d(!1),this.timeout=l||3e3,this.enable_multilink=i,this.enable_ab_visual=o,this.abKey="__tea_sdk_ab_version_"+t.app_id,this.ab_cross=a,this.ab_cookie_domain=s||"",this.fetchUrl=h+"/service/2/abtest_config/",this.reportUrl=this.collect.configManager.getUrl("event"),this.exposureLimit=t.exposure_limit||20,this.ab_batch_time=t.ab_batch_time||500,this.ab_user_mode=t.ab_user_mode||"user_unique_id",this.callbackMap=new hP,this.fetchQueueMap=new hP;var f=this.collect.Types;this.types=f,this.collect.on(f.TokenChange,(function(e){"uuid"===e&&n.readyStatus&&(n.clearCache(),n.fetchAB())})),this.collect.on(f.AbVar,(function(e){var t=e.name,i=e.defaultValue,r=e.callback;n.getVar(t,i,r)})),this.collect.on(f.AbAllVars,(function(e){var t=e.callback,i=e.timeout;n.getAllVars(t,i)})),this.collect.on(f.AbConfig,(function(e){var t=e.params,i=e.callback;n.getABconfig(t,i)})),this.collect.on(f.AbExternalVersion,(function(e){n.setExternalAbVersion(e)})),this.collect.on(f.AbOpenLayer,(function(){n.openOverlayer()})),this.collect.on(f.AbCloseLayer,(function(){n.closeOverlayer()})),this.collect.on(f.AbVersionChangeOn,(function(e){n.changeListener.set(e,e)})),this.collect.on(f.AbVersionChangeOff,(function(e){n.changeListener.get(e)&&n.changeListener.delete(e)})),this.loadMode(),(this.enable_ab_visual||this.enable_multilink)&&this.openOverlayer(this.config.multilink_timeout_ms||500),this.checkLocal(),this.ready("ab"),this.readyStatus||(!c&&this.fetchAB(),this.readyStatus=!0),this.collect.emit(f.AbReady)}},e.prototype.ready=function(e){var t=this;if(this.collect.set(e),this.collect.hook._hooksCache.hasOwnProperty(e)){var n=this.collect.hook._hooksCache[e];if(!kT(n).length)return;var i=function(e){n[e].length&&n[e].forEach((function(n){t.collect.hook.emit(e,n)}))};for(var r in n)i(r)}},e.prototype.loadMode=function(){var e=function(){try{return JSON.parse(atob(window.name))||void 0}catch(e){return}}(),t="";if(e){var n=e.scenario,i=e.href;n?(this.editMode=!0,t=n):!i||-1===qP(i).call(i,"datatester")&&-1===qP(i).call(i,"visual-editor")||(this.editMode=!0,t="visual-editor")}this.enable_ab_visual&&"visual-editor"===t&&this.collect.destoryInstace()},e.prototype.checkLocal=function(){var e,t=this.getABCache(),n=t.ab_version,i=t.ab_ext_version,r=t.ab_version_multilink,o=(t.data,this.checkFromUrl());o?this.mulilinkVersions.push(o):this.mulilinkVersions=r||[],this.extVersions=i||[],this.versions=n||[];var a=y_(e=this.versions).call(e,this.extVersions);this.enable_multilink&&(a=y_(a).call(a,this.mulilinkVersions))},e.prototype.checkFromUrl=function(){var e=iK(window.location.href);return e&&e.vid?e.vid:""},e.prototype.updateVersions=function(){var e,t=this.extVersions.length?y_(e=this.versions).call(e,this.extVersions):this.versions;this.enable_multilink&&(t=y_(t).call(t,this.mulilinkVersions)),this.configVersions(t.join(",")),this.updateABCache(),this.changeListener.size>0&&this.changeListener.forEach((function(e){"function"==typeof e&&e(t)}))},e.prototype.configVersions=function(e){this.collect.configManager.setAbVersion(e)},e.prototype.getVar=function(e,t,n,i){if(!e)throw new Error("variable must not be empty");if(void 0===t)throw new Error("variable no default value");if("function"!=typeof n)throw new Error("callback must be a function");var r={name:e,defaultValue:t,callback:n,type:qq.Var};this.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Execute GetVar",level:"info",time:Date.now(),data:e,infoType:"cus"}),"complete"===this.fetchStatus&&"complete"===this.refreshFetchStatus?this.getRealVar(r,e,i):this.callbackMap.set(e,r)},e.prototype.setAbUuid=function(e,t){this.collect.configManager.setAbUuidCache(e,t)},e.prototype.getRealVar=function(e,t,n){var i=e.name,r=e.defaultValue,o=e.callback,a=this.data;if(a){var s=a[i];if(s&&XV(s)){var l,c,u=s.vid;return"$ab_url"===t?F_(l=this.mulilinkVersions).call(l,u)||this.mulilinkVersions.push(u):F_(c=this.versions).call(c,u)||this.versions.push(u),this.setAbUuid(u,n),this.updateVersions(),this.fechEvent(u,t||i,r,o,s.val),void this.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Execute GetVar, Exposure Experiment "+i,level:"info",time:Date.now(),data:a[i],infoType:"sdk"})}this.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Execute GerVar Default Callback",level:"info",time:Date.now(),data:this.data,infoType:"sdk"}),o(r)}else o(r)},e.prototype.getAllVars=function(e,t){var n=this;if("function"!=typeof e)throw new Error("callback must be a function");var i=null,r={callback:e,type:qq.All,timer:i};this.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Execute GetAllVars",level:"info",time:Date.now(),infoType:"cus"}),t&&(i=setTimeout((function(){r.timer=null,n.getRealAllVars(r),clearTimeout(i)}),t),r.timer=i),"complete"===this.fetchStatus&&"complete"===this.refreshFetchStatus?(r.timer=null,this.getRealAllVars(r),i&&clearTimeout(i)):this.callbackMap.set("allVars",r)},e.prototype.getRealAllVars=function(e,t){var n=e.callback,i=e.timer;i&&(clearTimeout(i),e.timer=null);var r=(null!=t?t:this.data)||{};try{n(JSON.parse(Hj(r)))}catch(o){n(r)}this.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Execute GetAllVars Callback",level:"info",time:Date.now(),data:this.data,infoType:"sdk"})},e.prototype.fechEvent=function(e,t,n,i,r){try{if(this.config.disable_track_event)return;if(!e)return;var o=this.collect.configManager.get(),a=o.header,s=o.user,l=this.getABCache(),c=s[this.ab_user_mode]||s.user_unique_id;if(l&&l.uuid&&l.uuid!==c)return;var u={event:"abtest_exposure",ab_sdk_version:""+e,params:Hj({app_id:this.config.appId,ab_url:"$ab_url"===t?n:window.location.href,data:this.data}),local_time_ms:Date.now()};a.custom=Hj(a.custom);var h={events:[u],user:s,header:a};this.reportExposure(h,t),i&&i(r)}catch(d){this.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Something Error",level:"error",time:Date.now(),data:d.message,infoType:"sdk"})}},e.prototype.reportExposure=function(e,t){var n=this;this.exposureCache.push(e),this.reportTimeout&&clearTimeout(this.reportTimeout),this.exposureCache.length>=this.exposureLimit?this.report(t):this.reportTimeout=setTimeout((function(){n.report(t),clearTimeout(n.reportTimeout)}),this.ab_batch_time)},e.prototype.report=function(e){var t=this;this.collect.requestManager.useRequest({url:this.reportUrl,data:this.exposureCache,timeout:2e4,useBeacon:"$ab_url"===e,zip:!0}),this.exposureCache.forEach((function(e){t.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_EVENT,info:"SDK Report Exposure Event Success",time:Date.now(),data:[e],code:200,status:"success",infoType:"sdk"})})),this.exposureCache=[]},e.prototype.setExternalAbVersion=function(e){this.extVersions=[e],this.updateVersions()},e.prototype.getABconfig=function(e,t){var n=kT(e);n&&n.length&&this.collect.configManager.set(e),this.fetchAB(t)},e.prototype.get=function(e){return this.cacheStorgae.getItem(e)},e.prototype.set=function(e,t){this.cacheStorgae.setItem(e,t),this.collect.configManager.setAbCache(t)},e.prototype.getABCache=function(e){var t={ab_version:[],ab_ext_version:[],ab_version_multilink:[],data:null,timestamp:+new Date,uuid:""};return t=this.get(this.abKey)||t,e?t[e]:t},e.prototype.updateABCache=function(){var e=this.getABCache();e.ab_version_multilink=this.mulilinkVersions,e.ab_ext_version=this.extVersions,e.ab_version=this.versions,e.timestamp=Date.now(),this.set(this.abKey,e)},e.prototype.setAbCache=function(e){var t=this.getABCache();t.data=this.data,t.uuid=e,t.timestamp=Date.now(),this.set(this.abKey,t)},e.prototype.clearCache=function(){this.refreshFetchStatus="ing",this.data={},this.extVersions=[],this.mulilinkVersions=[],this.versions=[],this.collect.configManager.clearAbCache()},e.prototype.openOverlayer=function(e){var t=this;if(function(){if(!document.getElementById(Xq)){var e="body { opacity: 0 !important; }",t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.id=Xq,n.type="text/css",n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)),t.appendChild(n)}}(),e)var n=setTimeout((function(){t.closeOverlayer(),clearTimeout(n)}),e)},e.prototype.closeOverlayer=function(){var e;(e=document.getElementById(Xq))&&e.parentElement.removeChild(e)},e.prototype.fetchComplete=function(e,t){var n=this;this.changeFetchQueueStatus(t);try{if(e&&"[object Object]"==Object.prototype.toString.call(e)){var i,r=this.collect.configManager.get().user;if(t&&t!==r.user_unique_id)return;this.data=e,this.setAbCache(t);var o=[];kT(e).forEach((function(t){var n=e[t].vid;n&&o.push(n)})),this.versions=ib(i=this.versions).call(i,(function(e){return F_(o).call(o,e)}));var a=e.$ab_url,s=e.$ab_modification;if(s&&s.val&&this.enable_ab_visual){if(this.collect.destroy)return}else if(a&&this.enable_multilink){var l;this.mulilinkVersions=ib(l=this.mulilinkVersions).call(l,(function(e){return F_(o).call(o,e)}));var c=a.val,u=a.vid;c&&u&&this.getVar("$ab_url",c,(function(){n.editMode||(c!==window.location.href?setTimeout((function(){if(!n.collect.destroy){var e=""+c;e=-1===qP(e).call(e,"http")?"https://"+e:e,nK(e).host!==location.host?e=e+"&vid="+u:window.history.replaceState("","",e),window.location.href=e}}),100):n.closeOverlayer())}))}this.updateVersions()}else this.closeOverlayer();this.callbackMap.forEach((function(t){t.type===qq.Var?n.getRealVar(t,""):n.getRealAllVars(t,e)}))}catch(h){}},e.prototype.pushFetchToQueue=function(e){var t=e,n=this.fetchQueueMap.get(t);n?n.fetchStatus="ing":n={current_user_id:t,fetchStatus:"ing"},this.fetchQueueMap.set(t,n)},e.prototype.changeFetchQueueStatus=function(e){var t=this.fetchQueueMap.get(e);t&&(t.fetchStatus="complete",this.fetchQueueMap.set(e,t))},e.prototype.checkFetchQueueStatus=function(){if(0===this.fetchQueueMap.size)return!1;var e=!0;return this.fetchQueueMap.forEach((function(t){"complete"!==t.fetchStatus&&(e=!1)})),e},e.prototype.clearFetchQueue=function(e){this.fetchQueueMap.delete(e)},e.prototype.fetchAB=function(e){var t=this,n=this.collect.configManager.get(),i={header:jV(jV(jV({aid:this.config.app_id},n.user||{}),n.header||{}),{ab_sdk_version:this.collect.configManager.getAbVersion(),ab_url:window.location.href})};this.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Fetch AB Request",level:"info",logType:"fetch",time:Date.now(),data:i,infoType:"sdk"});var r=n.user[this.ab_user_mode]||n.user.user_unique_id;this.pushFetchToQueue(r),this.collect.requestManager.useRequest({url:this.fetchUrl,data:i,success:function(n){t.fetchStatus="complete",t.refreshFetchStatus="complete";var i=n.data;"success"===n.message?(t.fetchComplete(i,r),e&&e(i)):(t.fetchComplete(null,r),e&&e(null)),t.collect.emit(t.types.AbComplete,i),t.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Fetch AB Request Success",level:"info",logType:"fetch",time:Date.now(),data:i,infoType:"sdk"})},fail:function(){t.fetchStatus="complete",t.refreshFetchStatus="complete",t.fetchComplete(null,r),t.collect.emit(t.types.AbTimeout),e&&e(null),t.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Fetch AB Request Network Error",level:"error",logType:"fetch",time:Date.now(),infoType:"sdk"})},timeout:this.timeout})},e.prototype.filterUrl=function(e){try{var t="";-1!==qP(e).call(e,"&multilink=true")?t="&multilink=true[\0-ÿ]*":-1!==qP(e).call(e,"?multilink=true")&&(t="\\?multilink=true[\0-ÿ]*");var n=new RegExp(t,"g");e=e.replace(n,"")}catch(i){}return e},e}(),Zq=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;if(t.event_verify_url)if("string"==typeof t.event_verify_url){if(this.url=t.event_verify_url+"/v1/list_test",this.url){var i=e.Types;e.on(i.SubmitVerify,(function(i){i.forEach((function(i){try{var r=JSON.parse(Hj(i));ib(t)&&((r=ib(t).call(t,r))||console.warn("filter must return data !!")),e.eventFilter&&r&&((r=e.eventFilter(r))||console.warn("filterEvent api must return data !!"));var o=r||i,a=JSON.parse(Hj(o));if(!o.length)return;var s=!0;if(o.forEach((function(e){e.events.length||(s=!1)})),!s)return;e.requestManager.useBeacon({url:n.url,data:o}),e.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_EVENT,info:"SDK Report ByteIo Verify Request",time:Date.now(),data:a,code:200,status:"success",verifyType:!0})}catch(l){console.warn("something error, "+Hj(l.stack)),n.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Report ByteIo Verify Request Error",level:"error",time:Date.now(),data:l.message})}}))}))}}else console.log("please use correct et_test url")},e}(),Qq=function(){function e(e,t){this.maxDuration=432e5,this.aliveDTime=6e4,this.options={aliveName:"predefine_page_alive",params:{}},this.focusState=!0,this.collect=e,this.config=t,this.pageStartTime=Date.now(),this.sessionStartTime=this.pageStartTime,this.timerHandler=null,XV(t.enable_stay_duration)&&(this.options=VS(this.options,t.enable_stay_duration)),this.hard=this.options.mode&&"hard"===this.options.mode,this.focusState=document.hasFocus()}return e.prototype.setParams=function(e,t,n){this.set_path=e,this.set_url=n,this.set_title=t},e.prototype.enable=function(e,t,n){this.url_path=e,this.url=n,this.title=t,this.disableCallback=this.enablePageAlive(),this.hard&&(this.removeMode=this.hardMode())},e.prototype.disable=function(){this.disableCallback(),this.pageStartTime=Date.now()},e.prototype.sendEvent=function(e,t){void 0===t&&(t=!1);var n=t?this.aliveDTime:Date.now()-this.sessionStartTime;n<0||n>this.aliveDTime||Date.now()-this.pageStartTime>this.maxDuration||t&&"hidden"===document.visibilityState||this.hard&&!this.focusState||(this.collect.beconEvent(this.options.aliveName,jV({url_path:this.getParams("url_path"),title:this.getParams("title"),url:this.getParams("url"),duration:n,is_support_visibility_change:tK(),startTime:this.sessionStartTime,hidden:document.visibilityState,leave:e,mode:this.hard?"hard":"normal",focusState:this.focusState},this.options.params)),this.sessionStartTime=Date.now())},e.prototype.getParams=function(e){switch(e){case"url_path":return this.set_path||this.url_path||location.pathname;case"title":return this.set_title||this.title||document.title||location.pathname;case"url":return this.set_url||this.url||location.href}},e.prototype.setUpTimer=function(){var e=this;return this.timerHandler&&clearInterval(this.timerHandler),setInterval((function(){Date.now()-e.sessionStartTime>e.aliveDTime&&e.sendEvent(!1,!0)}),1e3)},e.prototype.visibilitychange=function(){"hidden"===document.visibilityState?this.timerHandler&&(clearInterval(this.timerHandler),this.sendEvent(!1)):"visible"===document.visibilityState&&(this.sessionStartTime=Date.now(),this.timerHandler=this.setUpTimer())},e.prototype.beforeunload=function(){document.hidden||this.sendEvent(!0)},e.prototype.enablePageAlive=function(){var e=this;this.timerHandler=this.setUpTimer();var t=this.visibilitychange.bind(this),n=this.beforeunload.bind(this);return document.addEventListener("visibilitychange",t),eK(n),function(){e.beforeunload(),document.removeEventListener("visibilitychange",t),window.removeEventListener("beforeunload",n),window.removeEventListener("pagehide",n)}},e.prototype.hardMode=function(){var e=this,t=function(){e.timerHandler&&(clearInterval(e.timerHandler),e.sendEvent(!1)),e.focusState=!1},n=function(){e.focusState=!0,e.sessionStartTime=Date.now(),e.timerHandler=e.setUpTimer()};return window.addEventListener("blur",t),window.addEventListener("focus",n),function(){window.removeEventListener("blur",t),window.removeEventListener("focus",n)}},e}(),Jq=function(){function e(e,t){var n=this;this.maxDuration=432e5,this.aliveDTime=6e4,this.options={closeName:"predefine_page_close",params:{}},this.focusState=!0,this.visibilitychange=function(){"hidden"===document.visibilityState?n.activeEndTime=Date.now():"visible"===document.visibilityState&&(n.activeEndTime&&(n.totalTime+=n.activeEndTime-n.activeStartTime,n.activeTimes+=1),n.activeEndTime=void 0,n.activeStartTime=Date.now())},this.beforeunload=function(){if(n.totalTime+=(n.activeEndTime||Date.now())-n.activeStartTime,n.config.autotrack)try{window.sessionStorage.setItem("_tea_cache_duration",Hj({duration:n.totalTime,page_title:document.title||location.pathname}))}catch(e){}n.sendEventPageClose()},this.collect=e,this.config=t,this.maxDuration=t.maxDuration||864e5,this.pageStartTime=Date.now(),XV(t.enable_stay_duration)&&(this.options=VS(this.options,t.enable_stay_duration)),this.hard=this.options.mode&&"hard"===this.options.mode,this.focusState=document.hasFocus(),this.resetData()}return e.prototype.setParams=function(e,t,n){this.set_path=e,this.set_url=n,this.set_title=t},e.prototype.resetParams=function(e,t,n){this.url_path=e,this.url=n,this.title=t},e.prototype.enable=function(e,t,n){this.url_path=e,this.url=n,this.title=t,this.disableCallback=this.enablePageClose(),this.hard&&(this.removeMode=this.hardMode())},e.prototype.disable=function(){this.disableCallback()},e.prototype.resetData=function(){this.activeStartTime=void 0===this.activeStartTime?this.pageStartTime:Date.now(),this.activeEndTime=void 0,this.activeTimes=1,this.totalTime=0,this.resetParams(location.pathname,document.title,location.href)},e.prototype.sendEventPageClose=function(){var e=Date.now()-this.pageStartTime;this.totalTime<0||e<0||this.totalTime>=this.maxDuration||this.hard&&!this.focusState||(this.collect.beconEvent(this.options.closeName,jV({url_path:this.getParams("url_path"),title:this.getParams("title"),url:this.getParams("url"),active_times:this.activeTimes,duration:this.totalTime,total_duration:e,is_support_visibility_change:tK(),mode:this.hard?"hard":"normal",focusState:this.focusState},this.options.params)),this.pageStartTime=Date.now(),this.resetData())},e.prototype.getParams=function(e){switch(e){case"url_path":return this.set_path||this.url_path||location.pathname;case"title":return this.set_title||this.title||document.title||location.pathname;case"url":return this.set_url||this.url||location.href}},e.prototype.enablePageClose=function(){var e=this,t=this.visibilitychange.bind(this),n=this.beforeunload.bind(this);return document.addEventListener("visibilitychange",t),eK(n),function(){e.beforeunload(),document.removeEventListener("visibilitychange",t),window.removeEventListener("beforeunload",n),window.removeEventListener("pagehide",n)}},e.prototype.hardMode=function(){var e=this,t=function(){e.focusState=!1},n=function(){e.focusState=!0};return window.addEventListener("blur",t),window.addEventListener("focus",n),function(){window.removeEventListener("blur",t),window.removeEventListener("focus",n)}},e}(),eX=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;if(this.collect=e,this.config=t,this.config.enable_stay_duration){this.title=document.title||location.pathname,this.url=location.href,this.url_path=location.pathname,this.pageAlive=new Qq(e,t),this.pageClose=new Jq(e,t);var i=this.collect.Types;this.collect.on(i.ResetStay,(function(e){var t=e.url_path,i=e.title,r=e.url;n.resetStayDuration(t,i,r)})),this.collect.on(i.RouteChange,(function(e){e.init||t.disable_route_report||n.resetStayDuration()})),this.collect.on(i.SetStay,(function(e){var t=e.url_path,i=e.title,r=e.url;n.setStayParmas(t,i,r)})),this.enable(this.url_path,this.title,this.url),this.ready(i.Stay),this.collect.emit(i.StayReady)}},e.prototype.ready=function(e){var t=this;if(this.collect.set(e),this.collect.hook._hooksCache.hasOwnProperty(e)){var n=this.collect.hook._hooksCache[e];if(!kT(n).length)return;var i=function(e){n[e].length&&n[e].forEach((function(n){t.collect.hook.emit(e,n)}))};for(var r in n)i(r)}},e.prototype.enable=function(e,t,n){this.pageAlive.enable(e,t,n),this.pageClose.enable(e,t,n)},e.prototype.disable=function(){this.pageAlive.disable(),this.pageClose.disable()},e.prototype.setStayParmas=function(e,t,n){void 0===e&&(e=""),void 0===t&&(t=""),void 0===n&&(n=""),this.pageAlive.setParams(e,t,n),this.pageClose.setParams(e,t,n),this.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Execute resetStayParams",level:"info",time:Date.now(),data:{url_path:e,title:t,url:n}})},e.prototype.reset=function(e,t,n){this.disable(),this.enable(e,t,n)},e.prototype.resetStayDuration=function(e,t,n){this.reset(e,t,n),this.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"SDK Execute resetStayDuration",level:"info",time:Date.now(),data:{url_path:e,title:t,url:n}})},e}(),tX=function(){function e(){var e=this;this.setInterval=function(){e.clearIntervalFunc=function(e,t){void 0===e&&(e=function(){}),void 0===t&&(t=1e3);var n,i=Date.now()+t;return n=window.setTimeout((function r(){var o=Date.now()-i;e(),i+=t,n=window.setTimeout(r,Math.max(0,t-o))}),t),function(){window.clearTimeout(n)}}((function(){e.isSessionhasEvent&&e.endCurrentSession()}),e.sessionInterval)},this.clearInterval=function(){e.clearIntervalFunc&&e.clearIntervalFunc()}}return e.prototype.apply=function(e,t){var n=this;if(this.collect=e,!t.disable_heartbeat){this.sessionInterval=6e4,this.startTime=0,this.lastTime=0,this.setInterval();var i=this.collect.Types;this.collect.on(i.SessionReset,(function(){n.process()}))}},e.prototype.endCurrentSession=function(){this.collect.event("_be_active",{start_time:this.startTime,end_time:this.lastTime,url:window.location.href,referrer:window.document.referrer,title:document.title||location.pathname}),this.isSessionhasEvent=!1,this.startTime=0},e.prototype.process=function(){this.isSessionhasEvent||(this.isSessionhasEvent=!0,this.startTime=+new Date);var e=this.lastTime||+new Date;this.lastTime=+new Date,this.lastTime-e>this.sessionInterval&&(this.clearInterval(),this.endCurrentSession(),this.setInterval())},e}(),nX=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;if(this.collect=e,this.config=t,!this.config.channel_domain&&!t.disable_track_event&&!t.disable_sdk_monitor){this.url=e.configManager.getUrl("event");var i=this.collect.Types;this.collect.on(i.Ready,(function(){n.sdkOnload()})),this.collect.on(i.SubmitError,(function(e){var t=e.type,i=e.eventData,r=e.errorCode,o=e.response;"f_data"===t&&n.sdkError(i,r,o)})),this.collect.on(e.Types.SDKInnerError,(function(e){var t=e.type,i=e.eventData,r=e.errorCode,o=e.msg;n.sdkInnerError(t,i,r,o)}))}},e.prototype.sdkOnload=function(){var e=this;try{var t=this.collect.configManager.get(),n=t.header,i=t.user,r=n.app_id,o=n.app_name,a=n.sdk_version,s=(i.web_id,{events:[{event:"onload",params:Hj({app_id:r,app_name:o||"",sdk_version:a,sdk_type:"npm",sdk_config:this.config,sdk_desc:"TOC_OVERSEA",url:location.href,is_setting:this.config.enable_logsetting||!1,enable_logsetting_params:this.config.enable_logsetting_params||!1,enable_logsetting_header_custom:this.config.enable_logsetting_header_custom||!1}),local_time_ms:Date.now()}],user:{user_unique_id:i.user_unique_id},header:{app_id:6656}});setTimeout((function(){e.collect.requestManager.useRequest({url:e.url,data:[s],timeout:3e4,forceXhr:!0})}),16)}catch(l){}},e.prototype.sdkError=function(e,t,n){var i=this;try{var r=e[0],o=r.user,a=r.header,s=[];e.forEach((function(e){e.events.forEach((function(e){s.push(e)}))}));var l={events:W_(s).call(s,(function(e){return{event:"on_error",params:Hj({type:"sdk_event_error",error_code:t,app_id:a.app_id,app_name:a.app_name||"",error_event:e.event,sdk_version:a.sdk_version,local_time_ms:e.local_time_ms,tea_event_index:Date.now(),params:e.params,header:a,user:o,err_msg:n.m||""}),local_time_ms:Date.now()}})),user:{user_unique_id:o.user_unique_id},header:{app_id:6656}};setTimeout((function(){i.collect.requestManager.useRequest({url:i.url,data:[l],timeout:3e4,forceXhr:!0})}),16)}catch(c){}},e.prototype.sdkInnerError=function(e,t,n,i){var r=this;try{var o=t[0],a=o.user,s=o.header,l=[];t.forEach((function(e){e.events.forEach((function(e){l.push(e)}))}));var c={events:W_(l).call(l,(function(t){return{event:"on_error",params:Hj({type:e,error_code:n,app_id:s.app_id,app_name:s.app_name||"",error_event:t.event,sdk_version:s.sdk_version,local_time_ms:t.local_time_ms,tea_event_index:Date.now(),params:t.params,header:s,user:a,ua:window.navigator.userAgent,err_msg:i}),local_time_ms:Date.now()}})),user:a,header:{}};setTimeout((function(){r.collect.requestManager.useRequest({url:r.url,data:[c],timeout:3e4,app_key:"566f58151b0ed37e",forceXhr:!0})}),16)}catch(u){}},e}();function iX(e,t){if(void 0===t&&(t="list"),!e)return!1;if(t&&"list"===t){var n;if(F_(n=["LI","TR","DL"]).call(n,e.nodeName))return!0;if(e.dataset&&e.dataset.hasOwnProperty("teaIdx"))return!0;if(e.hasAttribute&&e.hasAttribute("data-tea-idx"))return!0}else{var i;if(F_(i=["A","BUTTON"]).call(i,e.nodeName))return!0;if(e.dataset&&e.dataset.hasOwnProperty("teaContainer"))return!0;if(e.hasAttribute&&e.hasAttribute("data-tea-container"))return!0}return!1}function rX(e){for(var t=e;t&&!iX(t,"container");){if("HTML"===t.nodeName||"BODY"===t.nodeName)return e;t=t.parentElement}return t||e}function oX(e){var t,n,i="";return 3===e.nodeType?i=nO(t=e.textContent).call(t):e.dataset&&e.dataset.hasOwnProperty("teaTitle")||e.hasAttribute("ata-tea-title")?i=e.getAttribute("data-tea-title"):e.hasAttribute("title")?i=e.getAttribute("title"):"INPUT"===e.nodeName&&F_(n=["button","submit"]).call(n,e.getAttribute("type"))?i=e.getAttribute("value"):"IMG"===e.nodeName&&e.getAttribute("alt")&&(i=e.getAttribute("alt")),Sx(i).call(i,0,200)}function aX(e){for(var t=e;t&&t.parentNode;){if(t.hasAttribute("data-tea-ignore"))return!0;if("HTML"===t.nodeName||"body"===t.nodeName)return!1;t=t.parentNode}return!1}var sX=function(e,t){return e.hasAttribute?e.hasAttribute(t):e.attributes?!(!e.attributes[t]||!e.attributes[t].specified):void 0},lX=function(){function e(e,t,n){var i=this;this.statistics=!1,this.pageView=!1,this.clickEvent=function(e){(function(e,t,n){if(1!==e.nodeType)return!1;if(!t.svg&&function(e){if("svg"===e.tagName.toLowerCase())return!0;for(var t=e.parentElement,n=!1;t;)"svg"===t.tagName.toLowerCase()?(t=null,n=!0):t=t.parentElement;return n}(e))return!1;if(F_(n=["HTML","BODY"]).call(n,e.tagName.toUpperCase()))return!1;var i=e;return!("none"===i.style.display||!iX(i,"container")&&!function(e){if(e.children.length){var t=e.children;return!Sx([]).call(t).some((function(e){return e.children.length>0}))}return!0}(i)&&!t.svg)})(e.target,i.options)&&i.eventHandel({eventType:"dom",eventName:"click"},e)},this.changeEvent=function(e){i.eventHandel({eventType:"dom",eventName:"change"},e)},this.submitEvent=function(e){i.eventHandel({eventType:"dom",eventName:"submit"},e)},this.getPageViewEvent=function(e,t){t&&"pushState"===t&&i.eventHandel({eventType:"dom",eventName:"beat"},jV({beat_type:0},e)),i.eventHandel({eventType:"dom",eventName:"page_view"},e)},this.getPageLoadEvent=function(e){i.eventHandel({eventType:"dom",eventName:"page_statistics"},{lcp:e})},this.config=n.getConfig().eventConfig,this.collect=t,this.options=e,this.beatTime=e.beat}return e.prototype.init=function(e){this.eventHandel=e;var t=this.config.mode;this.addListener(t)},e.prototype.addListener=function(e){var t=this;if("proxy-capturing"===e){if(this.config.click&&window.document.addEventListener("click",this.clickEvent,!0),this.config.change&&window.document.addEventListener("change",this.changeEvent,!0),this.config.submit&&window.document.addEventListener("submit",this.submitEvent,!0),this.config.pv){this.collect.on("route-change",(function(e){var n=e.config,i=e.name;t.getPageViewEvent(n,i),t.pageView=!0}));var n=setTimeout((function(){t.pageView||(t.getPageViewEvent(t.getDefaultConfig()),t.pageView=!0,clearTimeout(n))}),2e3)}if(this.config.beat){try{"complete"===document.readyState?this.beatEvent(this.beatTime):window.addEventListener("load",(function(){t.beatEvent(t.beatTime)}));var i=0,r=null;window.addEventListener("scroll",(function(){clearTimeout(r),r=setTimeout(o,500),i=document.documentElement.scrollTop||document.body.scrollTop}));var o=function(){(document.documentElement.scrollTop||document.body.scrollTop)==i&&t.eventHandel({eventType:"dom",eventName:"beat"},{beat_type:1})}}catch(s){}try{var a=window.performance&&window.performance.getEntriesByType("paint");a&&a.length?(new PerformanceObserver((function(e){var n=e.getEntries(),i=n[n.length-1],r=i.renderTime||i.loadTime;t.statistics||(t.getPageLoadEvent(r),t.statistics=!0)})).observe({entryTypes:["largest-contentful-paint"]}),setTimeout((function(){t.statistics||(t.getPageLoadEvent(a[0].startTime||0),t.statistics=!0)}),2e3)):this.getPageLoadEvent(0)}catch(s){this.getPageLoadEvent(0)}}}},e.prototype.removeListener=function(){window.document.removeEventListener("click",this.clickEvent,!0),window.document.removeEventListener("change",this.changeEvent,!0),window.document.removeEventListener("submit",this.submitEvent,!0)},e.prototype.beatEvent=function(e){var t=this;try{var n;this.eventHandel({eventType:"dom",eventName:"beat"},{beat_type:3}),this.beatTime&&(n=setInterval((function(){t.eventHandel({eventType:"dom",eventName:"beat"},{beat_type:2})}),e)),eK((function(){t.eventHandel({eventType:"dom",eventName:"beat",eventSend:"becon"},{beat_type:0}),t.beatTime&&clearInterval(n)}))}catch(i){}},e.prototype.getDefaultConfig=function(){return{is_html:1,url:location.href,referrer:document.referrer,page_key:location.href,refer_page_key:document.referrer,page_title:document.title||location.pathname,page_manual_key:"",refer_page_manual_key:"",refer_page_title:"",page_path:location.pathname,page_host:location.host}},e}(),cX={eventConfig:{mode:"proxy-capturing",submit:!1,click:!0,change:!1,pv:!0,beat:!0,hashTag:!1,impr:!1},scoutConfig:{mode:"xpath"}},uX=function(){function e(e,t){this.config=e,this.config.eventConfig=VS(this.config.eventConfig,t)}return e.prototype.getConfig=function(){return this.config},e.prototype.setConfig=function(e){return this.config=e},e}();function hX(e,t,n,i){var r,o,a={},s=function(e){if(e){var t=e.getBoundingClientRect(),n=t.width,i=t.height;return{left:t.left,top:t.top,element_width:n,element_height:i}}}(t),l=function(e,t){void 0===e&&(e={}),void 0===t&&(t={});var n=e.clientX,i=e.clientY,r=t.left,o=t.top,a=n-r>=0?n-r:0,s=i-o>=0?i-o:0;return{touch_x:Math.floor(a),touch_y:Math.floor(s)}}(e,s),c=s.element_width,u=s.element_height,h=l.touch_x,d=l.touch_y,f=function(e){for(var t=[];null!==e.parentElement;)t.push(e),e=e.parentElement;var n=[],i=[];return t.forEach((function(e){var t=function(e){if(null===e)return{str:"",index:0};var t=0,n=e.parentElement;if(n)for(var i=n.children,r=0;r<i.length&&i[r]!==e;r++)i[r].nodeName===e.nodeName&&t++;return{str:[e.nodeName.toLowerCase(),iX(e,"list")?"[]":""].join(""),index:t}}(e),r=t.str,o=t.index;n.unshift(r),i.unshift(o)})),{element_path:"/"+n.join("/"),positions:i}}(t),p=f.element_path,v=f.positions,g=(r=rX(t),o=[],function e(t){var n=oX(t);if(n&&-1===qP(o).call(o,n)&&o.push(n),t.childNodes.length>0)for(var i=t.childNodes,r=0;r<i.length;r++)8!==i[r].nodeType&&e(i[r])}(r),o),y=window.performance.timing.navigationStart,m=Date.now()-y,_=W_(v).call(v,(function(e){return""+e})),b=null;if(window.TEAVisualEditor&&window.TEAVisualEditor.getOriginXpath&&(b=window.TEAVisualEditor.getOriginXpath({xpath:p,positions:_})),a.element_path=b&&b.xpath||p,a.positions=b&&b.positions||_,i&&!i.text&&(a.texts=g,a.element_title=function(e){var t=rX(e),n="";return function e(t){var i=oX(t);if(i&&(n+=i),t.childNodes.length>0)for(var r=t.childNodes,o=0;o<r.length;o++)3===r[o].nodeType&&e(r[o])}(t),n}(t)),a.element_id=t.getAttribute("id")||"",a.element_class_name=t.getAttribute("class")||"",a.element_type=t.nodeType,a.element_width=Math.floor(c),a.element_height=Math.floor(u),a.touch_x=h,a.touch_y=d,a.page_manual_key="",a.elememt_manual_key="",a.since_page_start_ms=m,a.page_start_ms=y,a.page_path=location.pathname,a.page_host=location.host,n.track_attr&&function(e,t){return!!function(e,t){if("string"==typeof t)return sX(e,t);if($V(t)){for(var n=!1,i=0;i<t.length;i++)if(sX(e,t[i])){n=!0;break}return n}}(e,t)}(t,n.track_attr)){var k=function(e,t){var n={};if("string"==typeof t)sX(e,t)&&(n.attrs=e.getAttribute(t));else if($V(t))for(var i=0;i<t.length;i++)sX(e,t[i])&&(n[t[i]]=e.getAttribute(t[i]));return n}(t,n.track_attr);for(var E in k)a[E]=k[E]}var w=rX(t);return"A"===w.tagName&&(a.href=w.getAttribute("href")),"IMG"===t.tagName&&(a.src=t.getAttribute("src")),a}var dX=function(e,t,n,i,r){return jV(jV({event:e},hX(t,n,i,r)),{is_html:1,page_key:window.location.href,page_title:document.title})},fX=function(){function e(e,t){this.ignore={text:!0},this.initConfig=e,this.options=t,this.eventName=t&&"tea"===t.custom?{click:"__bav_click",page:"__bav_page",beat:"__bav_beat",static:"__bav_page_statistics",exposure:"__bav_page_exposure"}:{click:"bav2b_click",page:"bav2b_page",beat:"bav2b_beat",static:"bav2b_page_statistics",exposure:"bav2b_exposure"},t&&!0===t.text&&(this.ignore.text=!1),t&&t.exposure&&t.exposure.eventName&&(this.eventName.exposure=t.exposure.eventName)}return e.prototype.handleEvent=function(e,t){try{if(aX(e.target))return null;var n="bav2b_click";switch(t){case"click":return n=e.target.getAttribute("data-applog-click-event")||this.eventName.click,dX(n,e,e.target,this.options,this.ignore);case"change":return jV(jV({},dX(n="bav2b_change",e,e.target,this.options)),function(e,t){try{if("bav2b_change"===e)return t.hasAttribute("data-tea-track")?{value:t.value}:{}}catch(n){return{}}}(n,e.target));case"submit":return dX(n="bav2b_submit",e,e.target,this.options)}}catch(cK){return console.error(cK),null}},e.prototype.handleViewEvent=function(e){e.event=this.eventName.page,e.page_title=document.title,e.page_total_width=window.innerWidth,e.page_total_height=window.innerHeight;try{var t=window.sessionStorage.getItem("_tea_cache_duration");if(t){var n=JSON.parse(t);e.refer_page_duration_ms=n?n.duration:""}e.scroll_width=document.documentElement.scrollLeft?document.documentElement.scrollLeft+window.innerWidth:window.innerWidth,e.scroll_height=document.documentElement.scrollTop?document.documentElement.scrollTop+window.innerHeight:window.innerHeight,e.page_start_ms=window.performance.timing.navigationStart}catch(i){console.log("page event error "+Hj(i))}return e},e.prototype.handleStatisticsEvent=function(e){var t={};t.event=this.eventName.static,t.is_html=1,t.page_key=location.href,t.refer_page_key=document.referrer||"",t.page_title=document.title,t.page_manual_key=this.initConfig.autotrack.page_manual_key||"",t.refer_page_manual_key="";try{var n=e.lcp,i=window.performance.timing,r=i.loadEventEnd-i.navigationStart;t.page_init_cost_ms=parseInt(n||(r>0?r:0)),t.page_start_ms=i.navigationStart}catch(o){console.log("page_statistics event error "+Hj(o))}return t},e.prototype.handleBeadtEvent=function(e){e.event=this.eventName.beat,e.page_key=window.location.href,e.is_html=1,e.page_title=document.title,e.page_manual_key=this.initConfig.autotrack.page_manual_key||"";try{e.page_viewport_width=window.innerWidth,e.page_viewport_height=window.innerHeight,e.page_total_width=document.documentElement.scrollWidth,e.page_total_height=document.documentElement.scrollHeight,e.scroll_width=document.documentElement.scrollLeft+window.innerWidth,e.scroll_height=document.documentElement.scrollTop+window.innerHeight,e.since_page_start_ms=Date.now()-window.performance.timing.navigationStart,e.page_start_ms=window.performance.timing.navigationStart}catch(t){console.log("beat event error "+Hj(t))}return e},e.prototype.handleExposureEvent=function(e,t){if(aX(t.target))return null;var n=dX(e.event||this.eventName.exposure,t,t.target||t,this.options,this.ignore);if(n.$exposure_type=e.exposureType,this.options.exposure.callback){var i=this.options.exposure.callback(n);return i||kT(i).length?i:(console.warn("exposure callback must return data!"),n)}return n},e.prototype.handleScrollEvent=function(e,t){var n=dX(e.event||this.eventName.scroll,t,t.target||t,this.options,this.ignore);if(n=VS(n,e.params),!this.options.scroll.callback||(n=this.options.scroll.callback(n))||kT(n).length)return n;console.warn("scroll callback must return data!")},e}(),pX=function(){function e(e){this.collect=e,this.eventNameList=["report_click_event","report_change_event","report_submit_event","report_exposure_event","report_page_view_event","report_page_statistics_event","report_beat_event"]}return e.prototype.send=function(e,t){var n=e.eventSend,i=t.event;delete t.event,n&&"becon"===n?this.collect.beconEvent(i,t):this.collect.event(i,t)},e.prototype.get=function(e,t){var n=VS({headers:{"content-type":"application/json"},method:"GET"},t);fetch(e,n)},e.prototype.post=function(e,t){var n=VS({headers:{"content-type":"application/json"},method:"POST"},t);fetch(e,n)},e}(),vX=!1;function gX(e,t){window.TEAVisualEditor=window.TEAVisualEditor||{},window.TEAVisualEditor.appId=t.app_id;var n,i,r,o=t.channel_domain,a="";if((n=TK).length&&n.forEach((function(e){Kq.push(e)})),o){var s=void 0,l="";try{var c=window.performance.getEntriesByType("resource");if(c&&c.length&&(c.forEach((function(e){var t;"script"===e.initiatorType&&e.name&&-1!==qP(t=e.name).call(t,"collect")&&(l=e.name)})),l&&(s=l.split("/"))&&s.length)){a="https:/";for(var u=2;u<s.length&&u!==s.length-1;u++)a=a+"/"+s[u];if(a&&qP(a).call(a,"/5.0")){var h=a.split("/5.0");a=h[0]||a}}}catch(d){}}window.addEventListener("message",Yq,!1);try{r=function(n){var i=n.data.app_id;i&&i!==t.app_id||function(e){var t,n,i,r,o=e.event,a=e.editorUrl,s=e.autoTrackInstance;vX||(vX=!0,t=a,n=function(){Wq(o,"editorScriptloadSuccess"),s.destroy()},i=function(){o&&Wq(o,"editorScriptloadError"),vX=!1},(r=document.createElement("script")).src=t,r.onerror=function(){i()},r.onload=function(){n()},document.getElementsByTagName("head")[0].appendChild(r))}({event:n,editorUrl:"https://sf16-website-login.neutral.ttwstatic.com/obj/tiktok_web_login_static/log-sdk/collect/heatmap-core.js?query="+Date.now(),autoTrackInstance:e})},Vq[i="tea:openHeatMapCore"]=Vq[i]||[],Vq[i].push(r)}catch(d){console.log("openHeatMapCore error")}}var yX,mX=function(){function e(e,t){this._instance=null,this._intersection=e,this.config=t,this._intersection&&this.init()}return e.prototype.init=function(){var e=this;if(window.MutationObserver)try{if(this._instance=new MutationObserver((function(t){t.forEach((function(t){"attributes"===t.type&&e.attributeChangeObserve(t),"childList"===t.type&&e.modifyNodeObserve(t)}))})),!document||!document.body)return void console.warn("please use sdk api init after body element");var t=!1!==this.config.autotrack.exposure.attributes;this._instance.observe(document.body,{childList:!0,attributes:t,subtree:!0,attributeOldValue:!1})}catch(n){console.log("your browser cannot support MutationObserver,so cannot report exposure event, please update")}else console.log("your browser cannot support MutationObserver,so cannot report exposure event, please update")},e.prototype.attributeChangeObserve=function(e){e.target.hasAttribute("data-exposure")?this.exposureAdd(e,"mutation"):this.exposureRemove(e)},e.prototype.modifyNodeObserve=function(e){var t=this;Array.prototype.forEach.call(e.addedNodes,(function(e){1===e.nodeType&&e.hasAttribute("data-exposure")&&t.exposureAdd(e,"intersect"),t.mapChild(e,t.exposureAdd.bind(t))})),Array.prototype.forEach.call(e.removedNodes,(function(e){1===e.nodeType&&e.hasAttribute("data-exposure")&&t.exposureRemove(e),t.mapChild(e,t.exposureRemove.bind(t))}))},e.prototype.mapChild=function(e,t){var n=this;1===e.nodeType&&e.children.length&&Array.prototype.forEach.call(e.children,(function(e){1===e.nodeType&&e.hasAttribute("data-exposure")&&t(e),n.mapChild(e,t)}))},e.prototype.exposureAdd=function(e,t){try{this._intersection&&this._intersection.exposureAdd(e,t)}catch(n){console.log("intersection error",Hj(n.message))}},e.prototype.exposureRemove=function(e){try{this._intersection&&this._intersection.exposureRemove(e)}catch(t){console.log("intersection error",Hj(t.message))}},e._exposure_observer=null,e}();!function(e){e[e.EXPOSURE_ONCE=0]="EXPOSURE_ONCE",e[e.LIFECYCLE_SHOW_NEW=3]="LIFECYCLE_SHOW_NEW",e[e.RESUME_FORM_PAGE=6]="RESUME_FORM_PAGE",e[e.RESUME_FORM_BACK=7]="RESUME_FORM_BACK",e[e.NOT_EXPOSURE=-1]="NOT_EXPOSURE"}(yX||(yX={}));var _X,bX=function(){function e(t,n,i){var r=this;this.backStatus=!1,this.instance=this.buildObserver(),this.collect=t,this.observeMap=e._observer_map,n.autotrack.exposure.ratio?this.ratio=n.autotrack.exposure.ratio:0===n.autotrack.exposure.ratio?this.ratio=0:this.ratio=.5,this.timeLimit=n.autotrack.exposure.stay||0,this.exposureType=yX.NOT_EXPOSURE,this.eventHandle=i,this.hashMap=new hP,this.backStatus=!1,this.lastState=null,this.collect.on("re-start-sdk",(function(){r.visibilitychange()})),this.addListen()}return e.prototype.buildObserver=function(){var t=this;if(e._observer_instance)return console.log("your browser cannot support IntersectionObserver, so cannot report exposure event, please update"),null;if(window.IntersectionObserver){for(var n=[],i=0;i<=1;i+=.01)n.push(i);n.push(1);try{e._observer_instance=new IntersectionObserver((function(e){e.forEach((function(e){var n=e.target.observeId,i=t.observeMap.get(n),r=(e.target,e.isIntersecting,e.intersectionRatio);if(i.intersectionRatio=r,r<=.1&&(e.target.backStatus=!1),t.observeMap.set(n,i),r<t.ratio)return i.isIntersecting=!1,i.added=!1,i.exposured=!1,i.startTime=Date.now(),void t.observeMap.set(n,i);if(!i.added){if(i.startTime=Date.now(),i.added=!0,i.isIntersecting=!0,t.timeLimit){var o=setTimeout((function(){try{if(i.isIntersecting&&!i.exposured&&t.observeMap.get(n)){var r=t.observeMap.get(n).intersectionRatio;t.exposureEvent(e,r,n,i)}}catch(o){console.log("IntersectionObserver setTimeout error,msg: "+Hj(o))}}),t.timeLimit);i.wait=o}t.observeMap.set(n,i)}Date.now()-i.startTime>=t.timeLimit&&!i.exposured&&t.exposureEvent(e,r,n,i)}))}),{threshold:n})}catch(r){console.log("IntersectionObserver error,msg: "+Hj(r))}return e._observer_instance}return console.log("your browser cannot support IntersectionObserver, so cannot report exposure event, please update"),null},e.prototype.exposureAdd=function(e,t){var n="mutation"===t?e.target:e,i=n.observeId,r=BK();if(i||this.observeMap.has(i)){var o=this.observeMap.get(i);if(o&&n!==o.instance)this.unobserve(n),this.observeMap.delete(i),n.observeId=r,n.visible=!1,this.observeMap.set(r,{instance:n.cloneNode(!0),isIntersecting:!1}),this.observe(n);else{if(!0===n.visible)return;this.handleBoundingExposure(n)}}else n.observeId=r,n.visible=!1,this.observeMap.set(r,{instance:n.cloneNode(!0),isIntersecting:!1}),this.observe(n)},e.prototype.exposureRemove=function(e){this.observeMap.has(e.observeId)&&(this.observeMap.delete(e.observeId),this.unobserve(e),e.observeId="",e.visible=!1)},e.prototype.exposureEvent=function(e,t,n,i){if(t>=this.ratio){if("0"===e.target.style.opacity||"hidden"===e.target.style.visibility)return;if(!0===i.exposured)return;i.startWait&&clearTimeout(i.startWait);var r=e.target.getAttribute("data-applog-exposure-event");this.eventHandle({eventType:"dom",eventName:"exposure",event:r,exposureType:this.getExposureType(e.target)},e),e.target.visible=!0,e.target.hasExposure=!0,i.startTime=Date.now(),i.exposured=!0}else i.startTime=Date.now(),i.exposured=!1;this.observeMap.set(n,i)},e.prototype.observe=function(e){this.instance&&this.instance.observe(e)},e.prototype.unobserve=function(e){this.instance&&this.instance.unobserve(e)},e.prototype.getExposureDomToExposure=function(){var e=this;Array.prototype.forEach.call(document.querySelectorAll("[data-exposure]"),(function(t){e.handleBoundingExposure(t)}))},e.prototype.visibilitychange=function(){var e=this,t=null;"visible"===document.visibilityState?this.timeLimit?t=setTimeout((function(){e.getExposureDomToExposure()}),this.timeLimit):this.getExposureDomToExposure():(clearTimeout(t),this.customType=void 0)},e.prototype.handleBoundingExposure=function(e){if(this.getBoundingRatio(e)>=this.ratio){e.visible=!0;var t=e.getAttribute&&e.getAttribute("data-exposure-event");this.eventHandle({eventType:"dom",eventName:"exposure",event:t,exposureType:this.customType||yX.RESUME_FORM_BACK},e)}},e.prototype.getBoundingRatio=function(e){var t=e.getBoundingClientRect(),n=t.top,i=t.left,r=t.width,o=t.height,a=window.innerWidth||document.documentElement.clientWidth,s=window.innerHeight||document.documentElement.clientHeight;return n>=0&&i>=0&&n<=s&&i<=a?(r>a?a:r)*(s-n)/(r*o):0},e.prototype.getExposureType=function(e){return e.visible?!1!==e.backStatus&&(this.backStatus||this.customType||2===window.performance.navigation.type)?this.exposureType=yX.RESUME_FORM_PAGE:this.exposureType=yX.LIFECYCLE_SHOW_NEW:(e.hasExposure,!1!==e.backStatus&&(this.backStatus||this.customType||2===window.performance.navigation.type)?this.exposureType=yX.RESUME_FORM_PAGE:this.exposureType=yX.EXPOSURE_ONCE),this.exposureType},e.prototype.addListen=function(){var e=this;this.collect.on("set-exposure-type",(function(t){e.customType=t}));var t,n,i,r=this.visibilitychange.bind(this);return t=document,n="visibilitychange",i=r,!1,t.addEventListener?t.addEventListener(n,i,false):t.attachEven?t.attachEven("on"+n,i):t["on"+n]=i,window.addEventListener("hashchange",(function(t){var n=e.hashMap.get(t.oldURL);n&&location.href===n.prev?(e.backStatus=!0,e.exposureType=yX.RESUME_FORM_PAGE):(e.backStatus=!1,e.hashMap.set(location.href,{current:t.newURL,prev:t.oldURL}))})),this.collect.on("STATE_CHANGE",(function(t){e.lastState=t})),window.addEventListener("popstate",(function(t){var n=t.state;n&&n.current&&e.lastState&&e.lastState.back&&n.current===e.lastState.back?(e.backStatus=!0,e.exposureType=yX.RESUME_FORM_PAGE):e.backStatus=!1})),function(){var e,t,n;e=document,t="visibilitychange",n=r,e.addEventListener?e.removeEventListener(t,n,!1):e.attachEven&&e.detachEven("on"+t,n)}},e._observer_instance=null,e._observer_map=new hP,e}(),kX=function(){function e(e,t,n){t.autotrack&&t.autotrack.exposure&&(this._intersection=new bX(e,t,n),this._observer=new mX(this._intersection,t),this._intersection&&this._observer?this.initObserver():console.log("your browser version cannot support exposure event, please update~"))}return e.prototype.initObserver=function(){var e=this;Array.prototype.forEach.call(document.querySelectorAll("[data-exposure]"),(function(t){e._intersection.exposureAdd(t,"intersect")}))},e}();!function(e){e[e.SCROLL_UP=1]="SCROLL_UP",e[e.SCROLL_DOWN=2]="SCROLL_DOWN",e[e.SCROLL_LEFT=3]="SCROLL_LEFT",e[e.SCROLL_RIGHT=4]="SCROLL_RIGHT",e[e.NOT_SCROLL=-1]="NOT_SCROLL"}(_X||(_X={}));var EX,wX=function(){function e(e,t){this.distance=30,e.autotrack&&e.autotrack.scroll&&(e.autotrack.scroll.distance&&(this.distance=e.autotrack.scroll.distance),this.eventHandle=t,this.addLinstenr(),this.mutation())}return e.prototype.addLinstenr=function(){var e=this;Array.prototype.forEach.call(document.querySelectorAll("[data-scroll]"),(function(t){e.scrollHandle(t)}))},e.prototype.mutation=function(){var e=this;if(window.MutationObserver)try{var t=new MutationObserver((function(t){t.forEach((function(t){"childList"===t.type&&e.modifyNodeObserve(t)}))}));if(!document||!document.body)return void console.warn("please use sdk api init after body element");t.observe(document.body,{childList:!0,attributes:!0,subtree:!0,attributeOldValue:!1})}catch(n){console.log("your browser cannot support MutationObserver")}else console.log("your browser cannot support MutationObserver")},e.prototype.modifyNodeObserve=function(e){var t=this;Array.prototype.forEach.call(e.addedNodes,(function(e){1===e.nodeType&&e.hasAttribute("data-scroll")&&t.scrollHandle(e),t.mapChild(e,t.scrollHandle.bind(t))})),Array.prototype.forEach.call(e.removedNodes,(function(e){1===e.nodeType&&e.hasAttribute("data-scroll")&&t.scrollHandle(e,"remove"),t.mapChild(e,t.scrollHandle.bind(t))}))},e.prototype.mapChild=function(e,t){var n=this;1===e.nodeType&&e.children.length&&Array.prototype.forEach.call(e.children,(function(e){1===e.nodeType&&e.hasAttribute("data-scroll")&&t(e),n.mapChild(e,t)}))},e.prototype.scrollHandle=function(e,t){var n=this;try{var i=e.scrollTop,r=e.scrollLeft,o=null,a=0,s=0,l=function(t){clearTimeout(o),o=setTimeout((function(){var o=e.scrollTop,h=e.scrollLeft,d=t.target&&t.target.getAttribute("data-scroll-event")||"";1===u||2===u?o===l&&(s=l-i,Math.abs(s)>=n.distance&&n.distance&&n.eventHandle({eventType:"dom",eventName:"scroll",event:d,params:{$direction:u,$offsetY:s,$offsetX:a}},t)):3!==u&&4!==u||h===c&&(a=c-r,Math.abs(a)>=n.distance&&n.distance&&n.eventHandle({eventType:"dom",eventName:"scroll",event:d,params:{$direction:u,$offsetY:s,$offsetX:a}},t)),i=l,r=c}),100);var l=e.scrollTop,c=e.scrollLeft,u=_X.NOT_SCROLL;l>i?u=_X.SCROLL_DOWN:l<i?u=_X.SCROLL_UP:c>r?u=_X.SCROLL_LEFT:c<r&&(u=_X.SCROLL_RIGHT)};return"remove"===t?e.removeEventListener("scroll",l,!1):e.addEventListener("scroll",l,!1),function(){e.removeEventListener("scroll",l,!1)}}catch(c){console.warn("scroll event error",Hj(c))}},e}(),SX={hashTag:!1,impr:!1},TX=function(){function e(){}return e.prototype.apply=function(e,t){if(this.autoTrackStart=!1,this.collect=e,this.config=t,t.autotrack){var n=e.Types;this.ready(n.Autotrack),this.collect.emit(n.AutotrackReady)}},e.prototype.ready=function(e){this.collect.set(e);var t=this.config.autotrack;t="object"==Du(t)?t:{},t=VS(SX,t),this.destroyed=!1,this.options=t,this.Config=new uX(cX,this.options),this.Exposure=new kX(this.collect,this.config,this.handle.bind(this)),this.Scroll=new wX(this.config,this.handle.bind(this)),this.Listener=new lX(t,this.collect,this.Config),this.EventHandle=new fX(this.config,t),this.Request=new pX(this.collect),this.autoTrackStart=!0,this.init(),gX(this,this.config)},e.prototype.init=function(){this.Listener.init(this.handle.bind(this)),"base"===this.collect.loadType&&(window.opener||window.parent).postMessage("[tea-sdk]ready","*")},e.prototype.handle=function(e,t){try{if(this.config.autotrack.collect_url&&!this.config.autotrack.collect_url())return}catch(n){}"dom"===e.eventType&&this.handleDom(e,t)},e.prototype.handleDom=function(e,t){try{var n=e.eventName;if("click"===n||"change"===n||"submit"===n)(a=this.EventHandle.handleEvent(t,n))&&this.Request.send({eventType:"custom"},a);else if("page_view"===n||"page_statistics"===n){var i;(i="page_view"===n?this.EventHandle.handleViewEvent(t):this.EventHandle.handleStatisticsEvent(t))&&this.Request.send({eventType:"custom"},i)}else if("beat"===n){var r=this.EventHandle.handleBeadtEvent(t),o=e.eventSend;r&&this.Request.send({eventType:"custom",eventSend:o},r)}else if("exposure"===n)(a=this.EventHandle.handleExposureEvent(e,t))&&this.Request.send({eventType:"custom"},a);else if("scroll"===n){var a;(a=this.EventHandle.handleScrollEvent(e,t))&&this.Request.send({eventType:"custom"},a)}}catch(s){console.log("handel dom event error "+Hj(s))}},e.prototype.destroy=function(){if(!this.autoTrackStart)return console.warn("engine is undefined, make sure you have called autoTrack.start()");this.autoTrackStart=!1,this.Listener.removeListener()},e}();!function(e){e.Net="net",e.FailNet="f_net",e.FailData="f_data"}(EX||(EX={}));var CX={pv:["predefine_pageview"],sdk:["_be_active","predefine_page_alive","predefine_page_close","__profile_set","__profile_set_once","__profile_increment","__profile_unset","__profile_append"],autotrack:["bav2b_click","bav2b_page","bav2b_beat","bav2b_page_statistics","__bav_click","__bav_page","__bav_beat","__bav_page_statistics"]},xX=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;if(this.ready=t.app_id&&t.enable_tracer&&!t.disable_track_event,this.ready){this.limit={pv:1,sdk:3,autotrack:3,log:3},this.errorCode={f_net:0,f_data:0},this.tracerCache=new hP,this.collect=e,this.appid=t.app_id,this.reportUrl=e.configManager.getUrl("event");var i=this.collect.Types;e.adapters.fetch,this.collect.on(i.Event,(function(e){$V(e)?e.forEach((function(e){n.addCount("log")})):n.addCount("log")})),this.collect.on(i.SubmitError,(function(e){var t=e.type,i=e.eventDate,r=e.errorCode,o=e.response;n.addErrorCount(i,t,r,o)})),this.listener(),this.collect.emit(i.TracerReady)}},e.prototype.addCount=function(e,t,n){void 0===t&&(t="net"),void 0===n&&(n=1);try{this.tracerCache||(this.tracerCache=new hP);var i=void 0;if(this.tracerCache.has(e))(r=this.tracerCache.get(e)).has(t)?(i=r.get(t).params.count,i++,r.set(t,this.processTracer(i,e,t))):(i=n,r.set(t,this.processTracer(n,e,t)));else{var r=new hP;i=n,r.set(t,this.processTracer(n,e,t)),this.tracerCache.set(e,r)}"net"===t&&i>=this.limit[e]&&this.report(!1)}catch(o){console.log(o)}},e.prototype.addErrorCount=function(e,t,n,i){var r=this;try{if(e&&e.length){var o=e[0].events;o&&o.length&&("f_data"===t?(i&&i.hasOwnProperty("sc")?this.addCount("log",t,o.length-i.sc):this.addCount("log",t,o.length),this.errorCode[t]=n):o.forEach((function(e){var i="log";for(var o in CX){var a;if(-1!==qP(a=CX[o]).call(a,e.event)){i=o;break}}r.addCount(i,t,1),r.errorCode[t]=n})))}}catch(a){}},e.prototype.report=function(e){if(this.tracerCache){var t=[];this.tracerCache.forEach((function(e){console.log(e),e.forEach((function(e){t.push(e)}))})),t&&t.length&&this.sendTracer(t,e)}},e.prototype.sendTracer=function(e,t){try{var n=this.collect.eventManager.merge(e);this.collect.requestManager.useRequest({url:this.reportUrl,data:n,useBeacon:t}),this.tracerCache=null}catch(i){}},e.prototype.processTracer=function(e,t,n){try{var i={count:e,state:n,key:t,params_for_special:"applog_trace",aid:this.appid,platform:"web",_staging_flag:1,sdk_version:"5.3.8_oversea"};"f_net"!==n&&"f_data"!==n||(i.errorCode=this.errorCode[n]);var r=this.collect.processEvent("applog_trace",i);if(r&&r.event)return delete r.is_bav,r}catch(o){console.warn("something error")}},e.prototype.listener=function(){var e=this;document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e.leavePage()})),eK((function(){e.leavePage()}))},e.prototype.leavePage=function(){this.report(!0)},e}(),DX=function(){function e(){this.retryWaitTime=3e3,this.retryStatus=!1,this.retryCacheStatus=!1}return e.prototype.apply=function(e,t){var n=this;if(t.enable_storage&&!t.disable_storage&&(this.collect=e,this.config=t,!this.collect.destroy)){var i=e.Types,r=e.adapters.storage;this.storage=new r(!1),this.eventUrl=this.collect.configManager.getUrl("event"),this.eventKey="__tea_cache_events_"+t.app_id,this.storageNum=t.storage_num||50,this.retryNum=t.retry_num||3,this.retryInterval=1e3,e.on(i.SubmitError,(function(e){"f_data"!==e.type&&n.storeData(e)})),e.on(i.Ready,(function(){n.checkStorage()}))}},e.prototype.retryRightNow=function(e){var t=this;if(this.retryStatus)this.errorCache.push(e);else{var n=0;this.retryStatus=!0;var i=setInterval((function(){if(3===n)return t.storeData(t.errorCache),t.retryStatus=!1,void clearInterval(i);var r=e.eventData;t.fetchData(r,(function(){var e;t.retryStatus=!1,clearInterval(i),t.retryCacheStatus&&bT(e=t.errorCache).call(e,0,1),t.errorCache.length&&(t.retryCacheStatus=!0,t.retryRightNow(t.errorCache[0]))}),(function(){n++}))}),this.retryInterval)}},e.prototype.storeData=function(e){var t=this.storage.getItem(this.eventKey),n=e.eventData;kT(t).length!==this.storageNum&&(t[Date.now()]=n,this.storage.setItem(this.eventKey,t))},e.prototype.checkStorage=function(){var e=this;try{if(!window.navigator.onLine)return;var t=this.storage.getItem(this.eventKey);if(!t||!kT(t).length)return;var n={events:[{event:"ontest",params:{app_id:this.config.app_id},local_time_ms:Date.now()}],user:{user_unique_id:this.collect.configManager.get("web_id")},header:{}};this.fetchData([n],(function(){var n=JSON.parse(Hj(t)),i=function(i){e.fetchData(t[i],(function(){delete n[i],e.storage.setItem(e.eventKey,n)}),(function(){}),!1)};for(var r in t)i(r)}),(function(){}),!0)}catch(i){console.warn("error check storage")}},e.prototype.fetchData=function(e,t,n,i){this.collect.requestManager.useRequest({url:this.eventUrl,data:e,timeout:3e4,success:t,fail:n,app_key:i?"566f58151b0ed37e":""})},e}(),IX="undefined"!=typeof window?(window.LogPluginObject||(window.LogPluginObject={}),window.LogPluginObject):null,RX=function(){function e(){}return e.prototype.apply=function(e,t){this._plugin={},this.config=t,this.collect=e,this.channel=t.channel||"cn",this.loadExtend()},e.prototype.loadExtend=function(){var e=this;try{this.collect.remotePlugin.forEach((function(t,n){if("sdk"===t)if(Hq.hasOwnProperty(n)){var i=Hq[n].object,r=""+Hq[n].src[e.channel];e.exist(n,i,r)}else console.warn("your "+n+" is not exist,please check plugin name");else"object"==Du(t)&&(t.src?e.exist(n,t.call,t.src):e.process(n,t.instance,"INSTANCE"))}))}catch(t){this.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"LoadExtend Fail",level:"error",time:Date.now(),data:t.message}),console.log("load extend error")}},e.prototype.exist=function(e,t,n){var i=this;IX[t]?(this.process(e,IX[t]),console.log("already has "+e+" plugin~")):this.loadPlugin(e,n,(function(){i.process(e,IX[t]),console.log(" %c %s %s %s","color: yellow; background-color: black;","–","load plugin:"+e+" success","-")}),(function(){console.log(" %c %s %s %s","color: red; background-color: yellow;","–","load plugin:"+e+" error","-")}))},e.prototype.process=function(e,t,n){try{if(n){var i=new t;i.apply&&i.apply(this.collect,this.config),console.log("excude "+e+" success")}else t&&t(this.collect,this.config)}catch(r){this.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"Extend Process Fail",level:"error",time:Date.now(),data:r.message}),console.log("excude "+e+" error, message:"+r.message)}},e.prototype.loadPlugin=function(e,t,n,i){var r=this;try{var o=document.createElement("script");o.src=t,this._plugin[e]||(this._plugin[e]=[]),this._plugin[e].push(n),o.onerror=function(){i(t)},o.onload=function(){r._plugin[e].forEach((function(e){e()}))},document.getElementsByTagName("head")[0].appendChild(o)}catch(a){this.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"Extend LoadPlugin Fail",level:"error",time:Date.now(),data:a.message})}},e}(),LX=function(){function e(){this.autotrack=!1,this.spa=!1,this.cache={},this.allowHash=!1}return e.prototype.apply=function(e,t){if(t.spa||t.autotrack){var n=e.Types;this.collect=e,this.config=t,this.appid=t.app_id,this.allowHash=t.allow_hash,this.fncArray=new hP,this.setKey(),this.setLocation(),this.hack(),this.init(),this.listener(),e.emit(n.RouteReady)}},e.prototype.setKey=function(){var e=this.collect.adapters.storage;this.storage=new e(!1),this.cache_key="__tea_cache_refer_"+this.appid,this.cache={refer_key:"",refer_title:document.title||location.pathname,refer_manual_key:"",routeChange:!1},this.config.autotrack&&"object"==Du(this.config.autotrack)&&this.config.autotrack.page_manual_key&&(this.cache.refer_manual_key=this.config.autotrack.page_manual_key),this.storage.setItem(this.cache_key,this.cache)},e.prototype.hack=function(){var e=this,t=window.history.pushState;history.pushState=function(n){for(var i=[],r=1;r<arguments.length;r++)i[r-1]=arguments[r];"function"==typeof history.onpushstate&&history.onpushstate({state:n});var o=t.call.apply(t,WV([history,n],i));if(e.collect.sdkStop||e.collect.destroy)return o;if(!(e.lastLocation===location.href||e.config.disable_spa_query&&e.pathEquel())){e.setReferCache(e.lastLocation);var a=e.getPopStateChangeEventData();return e.lastLocation=location.href,e.sendPv(a,"pushState"),o}};var n=history.replaceState;history.replaceState=function(t){for(var i=[],r=1;r<arguments.length;r++)i[r-1]=arguments[r];"function"==typeof history.onreplacestate&&history.onreplacestate({state:t});var o=n.call.apply(n,WV([history,t],i));if(e.collect.sdkStop||e.collect.destroy)return o;if(!(e.lastLocation===location.href||e.config.disable_spa_query&&e.pathEquel())){e.setReferCache(e.lastLocation);var a=e.getPopStateChangeEventData();return e.lastLocation=location.href,e.sendPv(a),o}}},e.prototype.setLocation=function(){"undefined"!=typeof window&&(this.lastLocation=window.location.href)},e.prototype.getLocation=function(){return this.lastLocation},e.prototype.pathEquel=function(){try{return new ij(this.lastLocation).origin+new ij(this.lastLocation).pathname===new ij(location.href).origin+new ij(location.href).pathname}catch(e){return!1}},e.prototype.init=function(){var e=this.getPopStateChangeEventData();this.collect.emit("route-change",{config:e,init:!0})},e.prototype.listener=function(){var e=this;window.addEventListener("hashchange",(function(t){if(!e.collect.sdkStop&&!e.collect.destroy&&e.lastLocation!==window.location.href&&(!e.config.disable_spa_query||!e.pathEquel())&&e.allowHash){e.setReferCache(e.lastLocation),e.lastLocation=window.location.href;var n=e.getPopStateChangeEventData();e.sendPv(n)}})),window.addEventListener("popstate",(function(t){if(!e.collect.sdkStop&&!e.collect.destroy&&!(e.lastLocation===window.location.href||e.config.disable_spa_query&&e.pathEquel())){e.setReferCache(e.lastLocation),e.lastLocation=window.location.href;var n=e.getPopStateChangeEventData();e.sendPv(n)}}))},e.prototype.getPopStateChangeEventData=function(){var e=this.pageConfig();return e.is_back=0,e},e.prototype.pageConfig=function(){try{var e,t=this.storage.getItem(this.cache_key)||{},n=this.storage.getItem("__tea_cache_first_"+this.appid);return e=!n||1!=n,{is_html:1,url:location.href,referrer:this.handleRefer(),page_key:location.href,refer_page_key:this.handleRefer(),page_title:document.title||location.pathname,page_manual_key:this.config.autotrack&&this.config.autotrack.page_manual_key||"",refer_page_manual_key:t&&t.refer_manual_key||"",refer_page_title:t&&t.refer_title||"",page_path:location.pathname,page_host:location.host,is_first_time:""+e}}catch(i){return this.collect.emit(lK.DEBUGGER_MESSAGE,{type:lK.DEBUGGER_MESSAGE_SDK,info:"something error",level:"error",time:Date.now(),data:i.message}),{}}},e.prototype.sendPv=function(e,t){this.collect.emit("route-change",{config:e,init:!1})},e.prototype.handleRefer=function(){var e="";try{var t=this.storage.getItem(this.cache_key)||{};e=t.routeChange?t.refer_key:this.collect.configManager.get("referrer")}catch(n){e=document.referrer}return e},e.prototype.setReferCache=function(e){var t=this.storage.getItem(this.cache_key)||{};t.refer_key=e,t.routeChange=!0,this.storage.setItem(this.cache_key,t)},e}(),PX=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.config=t;var i=e.Types;e.on(i.TrackDurationStart,(function(e){n.trackEventStart(e)})),e.on(i.TrackDurationEnd,(function(e){n.trackEventEnd(e)})),e.on(i.TrackDurationPause,(function(e){n.trackEventPause(e)})),e.on(i.TrackDurationResume,(function(e){n.trackEventResume(e)})),this.Types=i,this.TrackEventMap=new hP,this.ready(i.TrackDuration)},e.prototype.ready=function(e){var t=this;if(this.collect.set(e),this.collect.hook._hooksCache.hasOwnProperty(e)){var n=this.collect.hook._hooksCache[e];if(!kT(n).length)return;var i=function(e){n[e].length&&n[e].forEach((function(n){t.collect.hook.emit(e,n)}))};for(var r in n)i(r)}},e.prototype.trackEventStart=function(e){this.TrackEventMap.set(e,{startTime:Date.now(),isPause:!1,pauseTime:0,resumeTime:0})},e.prototype.trackEventEnd=function(e){var t=e.eventName,n=e.params;if(this.TrackEventMap.has(t)){var i,r=this.TrackEventMap.get(t);i=r.isPause?r.pauseTime-r.startTime:r.resumeTime?r.pauseTime-r.startTime+(Date.now()-r.resumeTime):Date.now()-r.startTime;var o=VS(n,{event_duration:i});this.collect.event(t,o),this.cleanEventTrack(t)}},e.prototype.trackEventPause=function(e){if(this.TrackEventMap.has(e)){var t=this.TrackEventMap.get(e);t.isPause||(t.isPause=!0,t.pauseTime=Date.now(),this.TrackEventMap.set(e,t))}},e.prototype.trackEventResume=function(e){if(this.TrackEventMap.has(e)){var t=this.TrackEventMap.get(e);t.isPause&&(t.isPause=!1,t.resumeTime=Date.now(),this.TrackEventMap.set(e,t))}},e.prototype.cleanEventTrack=function(e){this.TrackEventMap.delete(e)},e}();Gq.usePlugin(RX,"extend"),Gq.usePlugin(DX,"retry"),Gq.usePlugin($q,"ab"),Gq.usePlugin(eX,"stay"),Gq.usePlugin(TX,"autotrack"),Gq.usePlugin(PX,"trackeventduration"),Gq.usePlugin(Zq,"et"),Gq.usePlugin(tX,"heartbeat"),Gq.usePlugin(nX,"monitor"),Gq.usePlugin(LX,"route"),Gq.usePlugin(xX,"tracer"),new Gq("default");var AX=Gq,OX=Xe,MX=Wn,NX=Hn;In({target:"Array",proto:!0},{at:function(e){var t=OX(this),n=MX(t),i=NX(e),r=i>=0?i:n+i;return r<0||r>=n?void 0:t[r]}});var zX=Zu("Array").at,UX=yu.charAt,BX=q,FX=Hn,HX=Ji;In({target:"String",proto:!0,forced:!0},{at:function(e){var t=HX(BX(this)),n=t.length,i=FX(e),r=i>=0?i:n+i;return r<0||r>=n?void 0:UX(t,r)}});var jX=Zu("String").at,GX=se,VX=zX,KX=jX,WX=Array.prototype,YX=String.prototype,qX=t((function(e){var t=e.at;return e===WX||GX(WX,e)&&t===WX.at?VX:"string"==typeof e||e===YX||GX(YX,e)&&t===YX.at?KX:t}));function XX(e,t){var n=kT(e);if(Lx){var i=Lx(e);t&&(i=ib(i).call(i,(function(t){return zP(e,t).enumerable}))),n.push.apply(n,i)}return n}function $X(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?XX(Object(n),!0).forEach((function(t){t$(e,t,n[t])})):$P?Object.defineProperties(e,$P(n)):XX(Object(n)).forEach((function(t){Object.defineProperty(e,t,zP(n,t))}))}return e}function ZX(e){return(ZX="function"==typeof ZP&&"symbol"==typeof QP?function(e){return typeof e}:function(e){return e&&"function"==typeof ZP&&e.constructor===ZP&&e!==ZP.prototype?"symbol":typeof e})(e)}function QX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function JX(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),Object.defineProperty(e,i$(i.key),i)}}function e$(e,t,n){return t&&JX(e.prototype,t),n&&JX(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function t$(e,t,n){return(t=i$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n$(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},o=kT(e);for(i=0;i<o.length;i++)n=o[i],qP(t).call(t,n)>=0||(r[n]=e[n]);return r}(e,t);if(Lx){var o=Lx(e);for(i=0;i<o.length;i++)n=o[i],qP(t).call(t,n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function i$(e){var t=function(e,t){if("object"!==Du(e)||null===e)return e;var n=e[nA];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==Du(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Du(t)?t:String(t)}var r$=function(e){return e&&e.Math==Math&&e},o$=r$("object"==typeof globalThis&&globalThis)||r$("object"==typeof window&&window)||r$("object"==typeof self&&self)||r$("object"==typeof e&&e)||function(){return this}()||Function("return this")(),a$={},s$=function(e){try{return!!e()}catch(tSe){return!0}},l$=!s$((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),c$=!s$((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),u$=c$,h$=Function.prototype.call,d$=u$?h$.bind(h$):function(){return h$.apply(h$,arguments)},f$={},p$={}.propertyIsEnumerable,v$=Object.getOwnPropertyDescriptor,g$=v$&&!p$.call({1:2},1);f$.f=g$?function(e){var t=v$(this,e);return!!t&&t.enumerable}:p$;var y$,m$,_$=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},b$=c$,k$=Function.prototype,E$=k$.call,w$=b$&&k$.bind.bind(E$,E$),S$=b$?w$:function(e){return function(){return E$.apply(e,arguments)}},T$=S$,C$=T$({}.toString),x$=T$("".slice),D$=function(e){return x$(C$(e),8,-1)},I$=s$,R$=D$,L$=Object,P$=S$("".split),A$=I$((function(){return!L$("z").propertyIsEnumerable(0)}))?function(e){return"String"==R$(e)?P$(e,""):L$(e)}:L$,O$=function(e){return null==e},M$=O$,N$=TypeError,z$=function(e){if(M$(e))throw N$("Can't call method on "+e);return e},U$=A$,B$=z$,F$=function(e){return U$(B$(e))},H$="object"==typeof document&&document.all,j$={all:H$,IS_HTMLDDA:void 0===H$&&void 0!==H$},G$=j$.all,V$=j$.IS_HTMLDDA?function(e){return"function"==typeof e||e===G$}:function(e){return"function"==typeof e},K$=V$,W$=j$.all,Y$=j$.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:K$(e)||e===W$}:function(e){return"object"==typeof e?null!==e:K$(e)},q$=o$,X$=V$,$$=function(e,t){return arguments.length<2?(n=q$[e],X$(n)?n:void 0):q$[e]&&q$[e][t];var n},Z$=S$({}.isPrototypeOf),Q$=$$("navigator","userAgent")||"",J$=o$,eZ=Q$,tZ=J$.process,nZ=J$.Deno,iZ=tZ&&tZ.versions||nZ&&nZ.version,rZ=iZ&&iZ.v8;rZ&&(m$=(y$=rZ.split("."))[0]>0&&y$[0]<4?1:+(y$[0]+y$[1])),!m$&&eZ&&(!(y$=eZ.match(/Edge\/(\d+)/))||y$[1]>=74)&&(y$=eZ.match(/Chrome\/(\d+)/))&&(m$=+y$[1]);var oZ=m$,aZ=oZ,sZ=s$,lZ=!!Object.getOwnPropertySymbols&&!sZ((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&aZ&&aZ<41})),cZ=lZ&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,uZ=$$,hZ=V$,dZ=Z$,fZ=Object,pZ=cZ?function(e){return"symbol"==typeof e}:function(e){var t=uZ("Symbol");return hZ(t)&&dZ(t.prototype,fZ(e))},vZ=String,gZ=function(e){try{return vZ(e)}catch(tSe){return"Object"}},yZ=V$,mZ=gZ,_Z=TypeError,bZ=function(e){if(yZ(e))return e;throw _Z(mZ(e)+" is not a function")},kZ=bZ,EZ=O$,wZ=function(e,t){var n=e[t];return EZ(n)?void 0:kZ(n)},SZ=d$,TZ=V$,CZ=Y$,xZ=TypeError,DZ={exports:{}},IZ=o$,RZ=Object.defineProperty,LZ=function(e,t){try{RZ(IZ,e,{value:t,configurable:!0,writable:!0})}catch(tSe){IZ[e]=t}return t},PZ=LZ,AZ="__core-js_shared__",OZ=o$[AZ]||PZ(AZ,{}),MZ=OZ;(DZ.exports=function(e,t){return MZ[e]||(MZ[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.26.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE",source:"https://github.com/zloirock/core-js"});var NZ=DZ.exports,zZ=z$,UZ=Object,BZ=function(e){return UZ(zZ(e))},FZ=BZ,HZ=S$({}.hasOwnProperty),jZ=Object.hasOwn||function(e,t){return HZ(FZ(e),t)},GZ=S$,VZ=0,KZ=Math.random(),WZ=GZ(1..toString),YZ=function(e){return"Symbol("+(void 0===e?"":e)+")_"+WZ(++VZ+KZ,36)},qZ=o$,XZ=jZ,$Z=YZ,ZZ=lZ,QZ=cZ,JZ=NZ("wks"),eQ=qZ.Symbol,tQ=eQ&&eQ.for,nQ=QZ?eQ:eQ&&eQ.withoutSetter||$Z,iQ=function(e){if(!XZ(JZ,e)||!ZZ&&"string"!=typeof JZ[e]){var t="Symbol."+e;ZZ&&XZ(eQ,e)?JZ[e]=eQ[e]:JZ[e]=QZ&&tQ?tQ(t):nQ(t)}return JZ[e]},rQ=d$,oQ=Y$,aQ=pZ,sQ=wZ,lQ=function(e,t){var n,i;if("string"===t&&TZ(n=e.toString)&&!CZ(i=SZ(n,e)))return i;if(TZ(n=e.valueOf)&&!CZ(i=SZ(n,e)))return i;if("string"!==t&&TZ(n=e.toString)&&!CZ(i=SZ(n,e)))return i;throw xZ("Can't convert object to primitive value")},cQ=TypeError,uQ=iQ("toPrimitive"),hQ=function(e,t){if(!oQ(e)||aQ(e))return e;var n,i=sQ(e,uQ);if(i){if(void 0===t&&(t="default"),n=rQ(i,e,t),!oQ(n)||aQ(n))return n;throw cQ("Can't convert object to primitive value")}return void 0===t&&(t="number"),lQ(e,t)},dQ=hQ,fQ=pZ,pQ=function(e){var t=dQ(e,"string");return fQ(t)?t:t+""},vQ=Y$,gQ=o$.document,yQ=vQ(gQ)&&vQ(gQ.createElement),mQ=function(e){return yQ?gQ.createElement(e):{}},_Q=mQ,bQ=!l$&&!s$((function(){return 7!=Object.defineProperty(_Q("div"),"a",{get:function(){return 7}}).a})),kQ=l$,EQ=d$,wQ=f$,SQ=_$,TQ=F$,CQ=pQ,xQ=jZ,DQ=bQ,IQ=Object.getOwnPropertyDescriptor;a$.f=kQ?IQ:function(e,t){if(e=TQ(e),t=CQ(t),DQ)try{return IQ(e,t)}catch(tSe){}if(xQ(e,t))return SQ(!EQ(wQ.f,e,t),e[t])};var RQ={},LQ=l$&&s$((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),PQ=Y$,AQ=String,OQ=TypeError,MQ=function(e){if(PQ(e))return e;throw OQ(AQ(e)+" is not an object")},NQ=l$,zQ=bQ,UQ=LQ,BQ=MQ,FQ=pQ,HQ=TypeError,jQ=Object.defineProperty,GQ=Object.getOwnPropertyDescriptor,VQ="enumerable",KQ="configurable",WQ="writable";RQ.f=NQ?UQ?function(e,t,n){if(BQ(e),t=FQ(t),BQ(n),"function"==typeof e&&"prototype"===t&&"value"in n&&WQ in n&&!n[WQ]){var i=GQ(e,t);i&&i[WQ]&&(e[t]=n.value,n={configurable:KQ in n?n[KQ]:i[KQ],enumerable:VQ in n?n[VQ]:i[VQ],writable:!1})}return jQ(e,t,n)}:jQ:function(e,t,n){if(BQ(e),t=FQ(t),BQ(n),zQ)try{return jQ(e,t,n)}catch(tSe){}if("get"in n||"set"in n)throw HQ("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var YQ=RQ,qQ=_$,XQ=l$?function(e,t,n){return YQ.f(e,t,qQ(1,n))}:function(e,t,n){return e[t]=n,e},$Q={exports:{}},ZQ=l$,QQ=jZ,JQ=Function.prototype,eJ=ZQ&&Object.getOwnPropertyDescriptor,tJ=QQ(JQ,"name"),nJ={EXISTS:tJ,PROPER:tJ&&"something"===function(){}.name,CONFIGURABLE:tJ&&(!ZQ||ZQ&&eJ(JQ,"name").configurable)},iJ=V$,rJ=OZ,oJ=S$(Function.toString);iJ(rJ.inspectSource)||(rJ.inspectSource=function(e){return oJ(e)});var aJ,sJ,lJ,cJ=rJ.inspectSource,uJ=V$,hJ=o$.WeakMap,dJ=uJ(hJ)&&/native code/.test(String(hJ)),fJ=YZ,pJ=NZ("keys"),vJ=function(e){return pJ[e]||(pJ[e]=fJ(e))},gJ={},yJ=dJ,mJ=o$,_J=Y$,bJ=XQ,kJ=jZ,EJ=OZ,wJ=vJ,SJ=gJ,TJ="Object already initialized",CJ=mJ.TypeError,xJ=mJ.WeakMap;if(yJ||EJ.state){var DJ=EJ.state||(EJ.state=new xJ);DJ.get=DJ.get,DJ.has=DJ.has,DJ.set=DJ.set,aJ=function(e,t){if(DJ.has(e))throw CJ(TJ);return t.facade=e,DJ.set(e,t),t},sJ=function(e){return DJ.get(e)||{}},lJ=function(e){return DJ.has(e)}}else{var IJ=wJ("state");SJ[IJ]=!0,aJ=function(e,t){if(kJ(e,IJ))throw CJ(TJ);return t.facade=e,bJ(e,IJ,t),t},sJ=function(e){return kJ(e,IJ)?e[IJ]:{}},lJ=function(e){return kJ(e,IJ)}}var RJ={set:aJ,get:sJ,has:lJ,enforce:function(e){return lJ(e)?sJ(e):aJ(e,{})},getterFor:function(e){return function(t){var n;if(!_J(t)||(n=sJ(t)).type!==e)throw CJ("Incompatible receiver, "+e+" required");return n}}},LJ=s$,PJ=V$,AJ=jZ,OJ=l$,MJ=nJ.CONFIGURABLE,NJ=cJ,zJ=RJ.enforce,UJ=RJ.get,BJ=Object.defineProperty,FJ=OJ&&!LJ((function(){return 8!==BJ((function(){}),"length",{value:8}).length})),HJ=String(String).split("String"),jJ=$Q.exports=function(e,t,n){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!AJ(e,"name")||MJ&&e.name!==t)&&(OJ?BJ(e,"name",{value:t,configurable:!0}):e.name=t),FJ&&n&&AJ(n,"arity")&&e.length!==n.arity&&BJ(e,"length",{value:n.arity});try{n&&AJ(n,"constructor")&&n.constructor?OJ&&BJ(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(tSe){}var i=zJ(e);return AJ(i,"source")||(i.source=HJ.join("string"==typeof t?t:"")),e};Function.prototype.toString=jJ((function(){return PJ(this)&&UJ(this).source||NJ(this)}),"toString");var GJ=$Q.exports,VJ=V$,KJ=RQ,WJ=GJ,YJ=LZ,qJ=function(e,t,n,i){i||(i={});var r=i.enumerable,o=void 0!==i.name?i.name:t;if(VJ(n)&&WJ(n,o,i),i.global)r?e[t]=n:YJ(t,n);else{try{i.unsafe?e[t]&&(r=!0):delete e[t]}catch(tSe){}r?e[t]=n:KJ.f(e,t,{value:n,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.nonWritable})}return e},XJ={},$J=Math.ceil,ZJ=Math.floor,QJ=Math.trunc||function(e){var t=+e;return(t>0?ZJ:$J)(t)},JJ=function(e){var t=+e;return t!=t||0===t?0:QJ(t)},e0=JJ,t0=Math.max,n0=Math.min,i0=function(e,t){var n=e0(e);return n<0?t0(n+t,0):n0(n,t)},r0=JJ,o0=Math.min,a0=function(e){return e>0?o0(r0(e),9007199254740991):0},s0=a0,l0=function(e){return s0(e.length)},c0=F$,u0=i0,h0=l0,d0=function(e){return function(t,n,i){var r,o=c0(t),a=h0(o),s=u0(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}},f0={includes:d0(!0),indexOf:d0(!1)},p0=jZ,v0=F$,g0=f0.indexOf,y0=gJ,m0=S$([].push),_0=function(e,t){var n,i=v0(e),r=0,o=[];for(n in i)!p0(y0,n)&&p0(i,n)&&m0(o,n);for(;t.length>r;)p0(i,n=t[r++])&&(~g0(o,n)||m0(o,n));return o},b0=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],k0=_0,E0=b0.concat("length","prototype");XJ.f=Object.getOwnPropertyNames||function(e){return k0(e,E0)};var w0={};w0.f=Object.getOwnPropertySymbols;var S0=$$,T0=XJ,C0=w0,x0=MQ,D0=S$([].concat),I0=S0("Reflect","ownKeys")||function(e){var t=T0.f(x0(e)),n=C0.f;return n?D0(t,n(e)):t},R0=jZ,L0=I0,P0=a$,A0=RQ,O0=function(e,t,n){for(var i=L0(t),r=A0.f,o=P0.f,a=0;a<i.length;a++){var s=i[a];R0(e,s)||n&&R0(n,s)||r(e,s,o(t,s))}},M0=s$,N0=V$,z0=/#|\.prototype\./,U0=function(e,t){var n=F0[B0(e)];return n==j0||n!=H0&&(N0(t)?M0(t):!!t)},B0=U0.normalize=function(e){return String(e).replace(z0,".").toLowerCase()},F0=U0.data={},H0=U0.NATIVE="N",j0=U0.POLYFILL="P",G0=U0,V0=o$,K0=a$.f,W0=XQ,Y0=qJ,q0=LZ,X0=O0,$0=G0,Z0=function(e,t){var n,i,r,o,a,s=e.target,l=e.global,c=e.stat;if(n=l?V0:c?V0[s]||q0(s,{}):(V0[s]||{}).prototype)for(i in t){if(o=t[i],r=e.dontCallGetSet?(a=K0(n,i))&&a.value:n[i],!$0(l?i:s+(c?".":"#")+i,e.forced)&&void 0!==r){if(typeof o==typeof r)continue;X0(o,r)}(e.sham||r&&r.sham)&&W0(o,"sham",!0),Y0(n,i,o,e)}},Q0=D$,J0=Array.isArray||function(e){return"Array"==Q0(e)},e1=TypeError,t1=function(e){if(e>9007199254740991)throw e1("Maximum allowed index exceeded");return e},n1=pQ,i1=RQ,r1=_$,o1=function(e,t,n){var i=n1(t);i in e?i1.f(e,i,r1(0,n)):e[i]=n},a1={};a1[iQ("toStringTag")]="z";var s1="[object z]"===String(a1),l1=s1,c1=V$,u1=D$,h1=iQ("toStringTag"),d1=Object,f1="Arguments"==u1(function(){return arguments}()),p1=l1?u1: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(tSe){}}(t=d1(e),h1))?n:f1?u1(t):"Object"==(i=u1(t))&&c1(t.callee)?"Arguments":i},v1=S$,g1=s$,y1=V$,m1=p1,_1=cJ,b1=function(){},k1=[],E1=$$("Reflect","construct"),w1=/^\s*(?:class|function)\b/,S1=v1(w1.exec),T1=!w1.exec(b1),C1=function(e){if(!y1(e))return!1;try{return E1(b1,k1,e),!0}catch(tSe){return!1}},x1=function(e){if(!y1(e))return!1;switch(m1(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return T1||!!S1(w1,_1(e))}catch(tSe){return!0}};x1.sham=!0;var D1=!E1||g1((function(){var e;return C1(C1.call)||!C1(Object)||!C1((function(){e=!0}))||e}))?x1:C1,I1=J0,R1=D1,L1=Y$,P1=iQ("species"),A1=Array,O1=function(e){var t;return I1(e)&&(t=e.constructor,(R1(t)&&(t===A1||I1(t.prototype))||L1(t)&&null===(t=t[P1]))&&(t=void 0)),void 0===t?A1:t},M1=function(e,t){return new(O1(e))(0===t?0:t)},N1=s$,z1=oZ,U1=iQ("species"),B1=function(e){return z1>=51||!N1((function(){var t=[];return(t.constructor={})[U1]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},F1=Z0,H1=s$,j1=J0,G1=Y$,V1=BZ,K1=l0,W1=t1,Y1=o1,q1=M1,X1=B1,$1=oZ,Z1=iQ("isConcatSpreadable"),Q1=$1>=51||!H1((function(){var e=[];return e[Z1]=!1,e.concat()[0]!==e})),J1=X1("concat"),e2=function(e){if(!G1(e))return!1;var t=e[Z1];return void 0!==t?!!t:j1(e)};F1({target:"Array",proto:!0,arity:1,forced:!Q1||!J1},{concat:function(e){var t,n,i,r,o,a=V1(this),s=q1(a,0),l=0;for(t=-1,i=arguments.length;t<i;t++)if(e2(o=-1===t?a:arguments[t]))for(r=K1(o),W1(l+r),n=0;n<r;n++,l++)n in o&&Y1(s,l,o[n]);else W1(l+1),Y1(s,l++,o);return s.length=l,s}});var t2=D$,n2=S$,i2=function(e){if("Function"===t2(e))return n2(e)},r2=bZ,o2=c$,a2=i2(i2.bind),s2=function(e,t){return r2(e),void 0===t?e:o2?a2(e,t):function(){return e.apply(t,arguments)}},l2=s2,c2=A$,u2=BZ,h2=l0,d2=M1,f2=S$([].push),p2=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,c,u,h){for(var d,f,p=u2(l),v=c2(p),g=l2(c,u),y=h2(v),m=0,_=h||d2,b=t?_(l,y):n||a?_(l,0):void 0;y>m;m++)if((s||m in v)&&(f=g(d=v[m],m,p),e))if(t)b[m]=f;else if(f)switch(e){case 3:return!0;case 5:return d;case 6:return m;case 2:f2(b,d)}else switch(e){case 4:return!1;case 7:f2(b,d)}return o?-1:i||r?r:b}},v2={forEach:p2(0),map:p2(1),filter:p2(2),some:p2(3),every:p2(4),find:p2(5),findIndex:p2(6),filterReject:p2(7)},g2=v2.map;Z0({target:"Array",proto:!0,forced:!B1("map")},{map:function(e){return g2(this,e,arguments.length>1?arguments[1]:void 0)}});var y2=_0,m2=b0,_2=Object.keys||function(e){return y2(e,m2)},b2=BZ,k2=_2;Z0({target:"Object",stat:!0,forced:s$((function(){k2(1)}))},{keys:function(e){return k2(b2(e))}});var E2=p1,w2=String,S2=function(e){if("Symbol"===E2(e))throw TypeError("Cannot convert a Symbol value to a string");return w2(e)},T2=S$,C2=JJ,x2=S2,D2=z$,I2=T2("".charAt),R2=T2("".charCodeAt),L2=T2("".slice),P2=function(e){return function(t,n){var i,r,o=x2(D2(t)),a=C2(n),s=o.length;return a<0||a>=s?e?"":void 0:(i=R2(o,a))<55296||i>56319||a+1===s||(r=R2(o,a+1))<56320||r>57343?e?I2(o,a):i:e?L2(o,a,a+2):r-56320+(i-55296<<10)+65536}},A2={codeAt:P2(!1),charAt:P2(!0)},O2=A2.charAt,M2=z$,N2=JJ,z2=S2;Z0({target:"String",proto:!0,forced:!0},{at:function(e){var t=z2(M2(this)),n=t.length,i=N2(e),r=i>=0?i:n+i;return r<0||r>=n?void 0:O2(t,r)}});var U2=p1,B2=s1?{}.toString:function(){return"[object "+U2(this)+"]"};s1||qJ(Object.prototype,"toString",B2,{unsafe:!0});var F2=MQ,H2=function(){var e=F2(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},j2=d$,G2=jZ,V2=Z$,K2=H2,W2=RegExp.prototype,Y2=function(e){var t=e.flags;return void 0!==t||"flags"in W2||G2(e,"flags")||!V2(W2,e)?t:j2(K2,e)},q2=nJ.PROPER,X2=qJ,$2=MQ,Z2=S2,Q2=s$,J2=Y2,e3="toString",t3=RegExp.prototype[e3],n3=Q2((function(){return"/a/b"!=t3.call({source:"a",flags:"b"})})),i3=q2&&t3.name!=e3;(n3||i3)&&X2(RegExp.prototype,e3,(function(){var e=$2(this);return"/"+Z2(e.source)+"/"+Z2(J2(e))}),{unsafe:!0});var r3=mQ("span").classList,o3=r3&&r3.constructor&&r3.constructor.prototype,a3=o3===Object.prototype?void 0:o3,s3=s$,l3=function(e,t){var n=[][e];return!!n&&s3((function(){n.call(null,t||function(){return 1},1)}))},c3=v2.forEach,u3=l3("forEach")?[].forEach:function(e){return c3(this,e,arguments.length>1?arguments[1]:void 0)},h3=o$,d3={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},f3=a3,p3=u3,v3=XQ,g3=function(e){if(e&&e.forEach!==p3)try{v3(e,"forEach",p3)}catch(tSe){e.forEach=p3}};for(var y3 in d3)d3[y3]&&g3(h3[y3]&&h3[y3].prototype);g3(f3);var m3=V$,_3=String,b3=TypeError,k3=S$,E3=MQ,w3=function(e){if("object"==typeof e||m3(e))return e;throw b3("Can't set "+_3(e)+" as a prototype")},S3=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=k3(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(tSe){}return function(n,i){return E3(n),w3(i),t?e(n,i):n.__proto__=i,n}}():void 0),T3=V$,C3=Y$,x3=S3,D3=function(e,t,n){var i,r;return x3&&T3(i=t.constructor)&&i!==n&&C3(r=i.prototype)&&r!==n.prototype&&x3(e,r),e},I3=S$(1..valueOf),R3="\t\n\v\f\r                 \u2028\u2029\ufeff",L3=z$,P3=S2,A3=R3,O3=S$("".replace),M3="["+A3+"]",N3=RegExp("^"+M3+M3+"*"),z3=RegExp(M3+M3+"*$"),U3=function(e){return function(t){var n=P3(L3(t));return 1&e&&(n=O3(n,N3,"")),2&e&&(n=O3(n,z3,"")),n}},B3={start:U3(1),end:U3(2),trim:U3(3)},F3=l$,H3=o$,j3=S$,G3=G0,V3=qJ,K3=jZ,W3=D3,Y3=Z$,q3=pZ,X3=hQ,$3=s$,Z3=XJ.f,Q3=a$.f,J3=RQ.f,e5=I3,t5=B3.trim,n5="Number",i5=H3[n5],r5=i5.prototype,o5=H3.TypeError,a5=j3("".slice),s5=j3("".charCodeAt),l5=function(e){var t,n,i,r,o,a,s,l,c=X3(e,"number");if(q3(c))throw o5("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=t5(c),43===(t=s5(c,0))||45===t){if(88===(n=s5(c,2))||120===n)return NaN}else if(48===t){switch(s5(c,1)){case 66:case 98:i=2,r=49;break;case 79:case 111:i=8,r=55;break;default:return+c}for(a=(o=a5(c,2)).length,s=0;s<a;s++)if((l=s5(o,s))<48||l>r)return NaN;return parseInt(o,i)}return+c};if(G3(n5,!i5(" 0o1")||!i5("0b1")||i5("+0x1"))){for(var c5,u5=function(e){var t=arguments.length<1?0:i5(function(e){var t=X3(e,"number");return"bigint"==typeof t?t:l5(t)}(e)),n=this;return Y3(r5,n)&&$3((function(){e5(n)}))?W3(Object(t),n,u5):t},h5=F3?Z3(i5):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),d5=0;h5.length>d5;d5++)K3(i5,c5=h5[d5])&&!K3(u5,c5)&&J3(u5,c5,Q3(i5,c5));u5.prototype=r5,r5.constructor=u5,V3(H3,n5,u5,{constructor:!0})}var f5=l$,p5=nJ.EXISTS,v5=S$,g5=RQ.f,y5=Function.prototype,m5=v5(y5.toString),_5=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,b5=v5(_5.exec);f5&&!p5&&g5(y5,"name",{configurable:!0,get:function(){try{return b5(_5,m5(this))[1]}catch(tSe){return""}}});var k5=Z0,E5=A$,w5=F$,S5=l3,T5=S$([].join),C5=E5!=Object,x5=S5("join",",");k5({target:"Array",proto:!0,forced:C5||!x5},{join:function(e){return T5(w5(this),void 0===e?",":e)}});var D5,I5,R5,L5,P5="process"==D$(o$.process),A5=RQ.f,O5=jZ,M5=iQ("toStringTag"),N5=function(e,t,n){e&&!n&&(e=e.prototype),e&&!O5(e,M5)&&A5(e,M5,{configurable:!0,value:t})},z5=$$,U5=RQ,B5=l$,F5=iQ("species"),H5=function(e){var t=z5(e),n=U5.f;B5&&t&&!t[F5]&&n(t,F5,{configurable:!0,get:function(){return this}})},j5=Z$,G5=TypeError,V5=D1,K5=gZ,W5=TypeError,Y5=MQ,q5=function(e){if(V5(e))return e;throw W5(K5(e)+" is not a constructor")},X5=O$,$5=iQ("species"),Z5=function(e,t){var n,i=Y5(e).constructor;return void 0===i||X5(n=Y5(i)[$5])?t:q5(n)},Q5=c$,J5=Function.prototype,e4=J5.apply,t4=J5.call,n4="object"==typeof Reflect&&Reflect.apply||(Q5?t4.bind(e4):function(){return t4.apply(e4,arguments)}),i4=$$("document","documentElement"),r4=S$([].slice),o4=TypeError,a4=/(?:ipad|iphone|ipod).*applewebkit/i.test(Q$),s4=o$,l4=n4,c4=s2,u4=V$,h4=jZ,d4=s$,f4=i4,p4=r4,v4=mQ,g4=function(e,t){if(e<t)throw o4("Not enough arguments");return e},y4=a4,m4=P5,_4=s4.setImmediate,b4=s4.clearImmediate,k4=s4.process,E4=s4.Dispatch,w4=s4.Function,S4=s4.MessageChannel,T4=s4.String,C4=0,x4={},D4="onreadystatechange";try{D5=s4.location}catch(tSe){}var I4=function(e){if(h4(x4,e)){var t=x4[e];delete x4[e],t()}},R4=function(e){return function(){I4(e)}},L4=function(e){I4(e.data)},P4=function(e){s4.postMessage(T4(e),D5.protocol+"//"+D5.host)};_4&&b4||(_4=function(e){g4(arguments.length,1);var t=u4(e)?e:w4(e),n=p4(arguments,1);return x4[++C4]=function(){l4(t,void 0,n)},I5(C4),C4},b4=function(e){delete x4[e]},m4?I5=function(e){k4.nextTick(R4(e))}:E4&&E4.now?I5=function(e){E4.now(R4(e))}:S4&&!y4?(L5=(R5=new S4).port2,R5.port1.onmessage=L4,I5=c4(L5.postMessage,L5)):s4.addEventListener&&u4(s4.postMessage)&&!s4.importScripts&&D5&&"file:"!==D5.protocol&&!d4(P4)?(I5=P4,s4.addEventListener("message",L4,!1)):I5=D4 in v4("script")?function(e){f4.appendChild(v4("script"))[D4]=function(){f4.removeChild(this),I4(e)}}:function(e){setTimeout(R4(e),0)});var A4,O4,M4,N4,z4,U4,B4,F4,H4={set:_4,clear:b4},j4=o$,G4=/ipad|iphone|ipod/i.test(Q$)&&void 0!==j4.Pebble,V4=/web0s(?!.*chrome)/i.test(Q$),K4=o$,W4=s2,Y4=a$.f,q4=H4.set,X4=a4,$4=G4,Z4=V4,Q4=P5,J4=K4.MutationObserver||K4.WebKitMutationObserver,e6=K4.document,t6=K4.process,n6=K4.Promise,i6=Y4(K4,"queueMicrotask"),r6=i6&&i6.value;r6||(A4=function(){var e,t;for(Q4&&(e=t6.domain)&&e.exit();O4;){t=O4.fn,O4=O4.next;try{t()}catch(tSe){throw O4?N4():M4=void 0,tSe}}M4=void 0,e&&e.enter()},X4||Q4||Z4||!J4||!e6?!$4&&n6&&n6.resolve?((B4=n6.resolve(void 0)).constructor=n6,F4=W4(B4.then,B4),N4=function(){F4(A4)}):Q4?N4=function(){t6.nextTick(A4)}:(q4=W4(q4,K4),N4=function(){q4(A4)}):(z4=!0,U4=e6.createTextNode(""),new J4(A4).observe(U4,{characterData:!0}),N4=function(){U4.data=z4=!z4}));var o6=r6||function(e){var t={fn:e,next:void 0};M4&&(M4.next=t),O4||(O4=t,N4()),M4=t},a6=o$,s6=function(e){try{return{error:!1,value:e()}}catch(tSe){return{error:!0,value:tSe}}},l6=function(){this.head=null,this.tail=null};l6.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}};var c6=l6,u6=o$.Promise,h6="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,d6=!h6&&!P5&&"object"==typeof window&&"object"==typeof document,f6=o$,p6=u6,v6=V$,g6=G0,y6=cJ,m6=iQ,_6=d6,b6=h6,k6=oZ;p6&&p6.prototype;var E6=m6("species"),w6=!1,S6=v6(f6.PromiseRejectionEvent),T6={CONSTRUCTOR:g6("Promise",(function(){var e=y6(p6),t=e!==String(p6);if(!t&&66===k6)return!0;if(!k6||k6<51||!/native code/.test(e)){var n=new p6((function(e){e(1)})),i=function(e){e((function(){}),(function(){}))};if((n.constructor={})[E6]=i,!(w6=n.then((function(){}))instanceof i))return!0}return!t&&(_6||b6)&&!S6})),REJECTION_EVENT:S6,SUBCLASSING:w6},C6={},x6=bZ,D6=TypeError,I6=function(e){var t,n;this.promise=new e((function(e,i){if(void 0!==t||void 0!==n)throw D6("Bad Promise constructor");t=e,n=i})),this.resolve=x6(t),this.reject=x6(n)};C6.f=function(e){return new I6(e)};var R6,L6,P6,A6=Z0,O6=P5,M6=o$,N6=d$,z6=qJ,U6=S3,B6=N5,F6=H5,H6=bZ,j6=V$,G6=Y$,V6=function(e,t){if(j5(t,e))return e;throw G5("Incorrect invocation")},K6=Z5,W6=H4.set,Y6=o6,q6=function(e,t){var n=a6.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))},X6=s6,$6=c6,Z6=RJ,Q6=u6,J6=C6,e7="Promise",t7=T6.CONSTRUCTOR,n7=T6.REJECTION_EVENT,i7=T6.SUBCLASSING,r7=Z6.getterFor(e7),o7=Z6.set,a7=Q6&&Q6.prototype,s7=Q6,l7=a7,c7=M6.TypeError,u7=M6.document,h7=M6.process,d7=J6.f,f7=d7,p7=!!(u7&&u7.createEvent&&M6.dispatchEvent),v7="unhandledrejection",g7=function(e){var t;return!(!G6(e)||!j6(t=e.then))&&t},y7=function(e,t){var n,i,r,o=t.value,a=1==t.state,s=a?e.ok:e.fail,l=e.resolve,c=e.reject,u=e.domain;try{s?(a||(2===t.rejection&&E7(t),t.rejection=1),!0===s?n=o:(u&&u.enter(),n=s(o),u&&(u.exit(),r=!0)),n===e.promise?c(c7("Promise-chain cycle")):(i=g7(n))?N6(i,n,l,c):l(n)):c(o)}catch(tSe){u&&!r&&u.exit(),c(tSe)}},m7=function(e,t){e.notified||(e.notified=!0,Y6((function(){for(var n,i=e.reactions;n=i.get();)y7(n,e);e.notified=!1,t&&!e.rejection&&b7(e)})))},_7=function(e,t,n){var i,r;p7?((i=u7.createEvent("Event")).promise=t,i.reason=n,i.initEvent(e,!1,!0),M6.dispatchEvent(i)):i={promise:t,reason:n},!n7&&(r=M6["on"+e])?r(i):e===v7&&q6("Unhandled promise rejection",n)},b7=function(e){N6(W6,M6,(function(){var t,n=e.facade,i=e.value;if(k7(e)&&(t=X6((function(){O6?h7.emit("unhandledRejection",i,n):_7(v7,n,i)})),e.rejection=O6||k7(e)?2:1,t.error))throw t.value}))},k7=function(e){return 1!==e.rejection&&!e.parent},E7=function(e){N6(W6,M6,(function(){var t=e.facade;O6?h7.emit("rejectionHandled",t):_7("rejectionhandled",t,e.value)}))},w7=function(e,t,n){return function(i){e(t,i,n)}},S7=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,m7(e,!0))},T7=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw c7("Promise can't be resolved itself");var i=g7(t);i?Y6((function(){var n={done:!1};try{N6(i,t,w7(T7,n,e),w7(S7,n,e))}catch(tSe){S7(n,tSe,e)}})):(e.value=t,e.state=1,m7(e,!1))}catch(tSe){S7({done:!1},tSe,e)}}};if(t7&&(l7=(s7=function(e){V6(this,l7),H6(e),N6(R6,this);var t=r7(this);try{e(w7(T7,t),w7(S7,t))}catch(tSe){S7(t,tSe)}}).prototype,(R6=function(e){o7(this,{type:e7,done:!1,notified:!1,parent:!1,reactions:new $6,rejection:!1,state:0,value:void 0})}).prototype=z6(l7,"then",(function(e,t){var n=r7(this),i=d7(K6(this,s7));return n.parent=!0,i.ok=!j6(e)||e,i.fail=j6(t)&&t,i.domain=O6?h7.domain:void 0,0==n.state?n.reactions.add(i):Y6((function(){y7(i,n)})),i.promise})),L6=function(){var e=new R6,t=r7(e);this.promise=e,this.resolve=w7(T7,t),this.reject=w7(S7,t)},J6.f=d7=function(e){return e===s7||undefined===e?new L6(e):f7(e)},j6(Q6)&&a7!==Object.prototype)){P6=a7.then,i7||z6(a7,"then",(function(e,t){var n=this;return new s7((function(e,t){N6(P6,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete a7.constructor}catch(tSe){}U6&&U6(a7,l7)}A6({global:!0,constructor:!0,wrap:!0,forced:t7},{Promise:s7}),B6(s7,e7,!1),F6(e7);var C7={},x7=C7,D7=iQ("iterator"),I7=Array.prototype,R7=p1,L7=wZ,P7=O$,A7=C7,O7=iQ("iterator"),M7=function(e){if(!P7(e))return L7(e,O7)||L7(e,"@@iterator")||A7[R7(e)]},N7=d$,z7=bZ,U7=MQ,B7=gZ,F7=M7,H7=TypeError,j7=d$,G7=MQ,V7=wZ,K7=s2,W7=d$,Y7=MQ,q7=gZ,X7=function(e){return void 0!==e&&(x7.Array===e||I7[D7]===e)},$7=l0,Z7=Z$,Q7=function(e,t){var n=arguments.length<2?F7(e):t;if(z7(n))return U7(N7(n,e));throw H7(B7(e)+" is not iterable")},J7=M7,e9=function(e,t,n){var i,r;G7(e);try{if(!(i=V7(e,"return"))){if("throw"===t)throw n;return n}i=j7(i,e)}catch(tSe){r=!0,i=tSe}if("throw"===t)throw n;if(r)throw i;return G7(i),n},t9=TypeError,n9=function(e,t){this.stopped=e,this.result=t},i9=n9.prototype,r9=function(e,t,n){var i,r,o,a,s,l,c,u=n&&n.that,h=!(!n||!n.AS_ENTRIES),d=!(!n||!n.IS_RECORD),f=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),v=K7(t,u),g=function(e){return i&&e9(i,"normal",e),new n9(!0,e)},y=function(e){return h?(Y7(e),p?v(e[0],e[1],g):v(e[0],e[1])):p?v(e,g):v(e)};if(d)i=e.iterator;else if(f)i=e;else{if(!(r=J7(e)))throw t9(q7(e)+" is not iterable");if(X7(r)){for(o=0,a=$7(e);a>o;o++)if((s=y(e[o]))&&Z7(i9,s))return s;return new n9(!1)}i=Q7(e,r)}for(l=d?e.next:i.next;!(c=W7(l,i)).done;){try{s=y(c.value)}catch(tSe){e9(i,"throw",tSe)}if("object"==typeof s&&s&&Z7(i9,s))return s}return new n9(!1)},o9=iQ("iterator"),a9=!1;try{var s9=0,l9={next:function(){return{done:!!s9++}},return:function(){a9=!0}};l9[o9]=function(){return this},Array.from(l9,(function(){throw 2}))}catch(tSe){}var c9=u6,u9=T6.CONSTRUCTOR||!function(e,t){if(!t&&!a9)return!1;var n=!1;try{var i={};i[o9]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(tSe){}return n}((function(e){c9.all(e).then(void 0,(function(){}))})),h9=d$,d9=bZ,f9=C6,p9=s6,v9=r9;Z0({target:"Promise",stat:!0,forced:u9},{all:function(e){var t=this,n=f9.f(t),i=n.resolve,r=n.reject,o=p9((function(){var n=d9(t.resolve),o=[],a=0,s=1;v9(e,(function(e){var l=a++,c=!1;s++,h9(n,t,e).then((function(e){c||(c=!0,o[l]=e,--s||i(o))}),r)})),--s||i(o)}));return o.error&&r(o.value),n.promise}});var g9=Z0,y9=T6.CONSTRUCTOR,m9=u6,_9=$$,b9=V$,k9=qJ,E9=m9&&m9.prototype;if(g9({target:"Promise",proto:!0,forced:y9,real:!0},{catch:function(e){return this.then(void 0,e)}}),b9(m9)){var w9=_9("Promise").prototype.catch;E9.catch!==w9&&k9(E9,"catch",w9,{unsafe:!0})}var S9=d$,T9=bZ,C9=C6,x9=s6,D9=r9;Z0({target:"Promise",stat:!0,forced:u9},{race:function(e){var t=this,n=C9.f(t),i=n.reject,r=x9((function(){var r=T9(t.resolve);D9(e,(function(e){S9(r,t,e).then(n.resolve,i)}))}));return r.error&&i(r.value),n.promise}});var I9=d$,R9=C6;Z0({target:"Promise",stat:!0,forced:T6.CONSTRUCTOR},{reject:function(e){var t=R9.f(this);return I9(t.reject,void 0,e),t.promise}});var L9=MQ,P9=Y$,A9=C6,O9=function(e,t){if(L9(e),P9(t)&&t.constructor===e)return t;var n=A9.f(e);return(0,n.resolve)(t),n.promise},M9=Z0,N9=T6.CONSTRUCTOR,z9=O9;$$("Promise"),M9({target:"Promise",stat:!0,forced:N9},{resolve:function(e){return z9(this,e)}});var U9=Z0,B9=u6,F9=s$,H9=$$,j9=V$,G9=Z5,V9=O9,K9=qJ,W9=B9&&B9.prototype;if(U9({target:"Promise",proto:!0,real:!0,forced:!!B9&&F9((function(){W9.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=G9(this,H9("Promise")),n=j9(e);return this.then(n?function(n){return V9(t,e()).then((function(){return n}))}:e,n?function(n){return V9(t,e()).then((function(){throw n}))}:e)}}),j9(B9)){var Y9=H9("Promise").prototype.finally;W9.finally!==Y9&&K9(W9,"finally",Y9,{unsafe:!0})}var q9=l$,X9=J0,$9=TypeError,Z9=Object.getOwnPropertyDescriptor,Q9=q9&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(tSe){return tSe instanceof TypeError}}(),J9=gZ,e8=TypeError,t8=Z0,n8=BZ,i8=i0,r8=JJ,o8=l0,a8=Q9?function(e,t){if(X9(e)&&!Z9(e,"length").writable)throw $9("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},s8=t1,l8=M1,c8=o1,u8=function(e,t){if(!delete e[t])throw e8("Cannot delete property "+J9(t)+" of "+J9(e))},h8=B1("splice"),d8=Math.max,f8=Math.min;t8({target:"Array",proto:!0,forced:!h8},{splice:function(e,t){var n,i,r,o,a,s,l=n8(this),c=o8(l),u=i8(e,c),h=arguments.length;for(0===h?n=i=0:1===h?(n=0,i=c-u):(n=h-2,i=f8(d8(r8(t),0),c-u)),s8(c+n-i),r=l8(l,i),o=0;o<i;o++)(a=u+o)in l&&c8(r,o,l[a]);if(r.length=i,n<i){for(o=u;o<c-i;o++)s=o+n,(a=o+i)in l?l[s]=l[a]:u8(l,s);for(o=c;o>c-i+n;o--)u8(l,o-1)}else if(n>i)for(o=c-i;o>u;o--)s=o+n-1,(a=o+i-1)in l?l[s]=l[a]:u8(l,s);for(o=0;o<n;o++)l[o+u]=arguments[o+2];return a8(l,c-i+n),r}});var p8=JJ,v8=S2,g8=z$,y8=RangeError,m8=Z0,_8=S$,b8=JJ,k8=I3,E8=function(e){var t=v8(g8(this)),n="",i=p8(e);if(i<0||i==1/0)throw y8("Wrong number of repetitions");for(;i>0;(i>>>=1)&&(t+=t))1&i&&(n+=t);return n},w8=s$,S8=RangeError,T8=String,C8=Math.floor,x8=_8(E8),D8=_8("".slice),I8=_8(1..toFixed),R8=function(e,t,n){return 0===t?n:t%2==1?R8(e,t-1,n*e):R8(e*e,t/2,n)},L8=function(e,t,n){for(var i=-1,r=n;++i<6;)r+=t*e[i],e[i]=r%1e7,r=C8(r/1e7)},P8=function(e,t){for(var n=6,i=0;--n>=0;)i+=e[n],e[n]=C8(i/t),i=i%t*1e7},A8=function(e){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==e[t]){var i=T8(e[t]);n=""===n?i:n+x8("0",7-i.length)+i}return n};m8({target:"Number",proto:!0,forced:w8((function(){return"0.000"!==I8(8e-5,3)||"1"!==I8(.9,0)||"1.25"!==I8(1.255,2)||"1000000000000000128"!==I8(0xde0b6b3a7640080,0)}))||!w8((function(){I8({})}))},{toFixed:function(e){var t,n,i,r,o=k8(this),a=b8(e),s=[0,0,0,0,0,0],l="",c="0";if(a<0||a>20)throw S8("Incorrect fraction digits");if(o!=o)return"NaN";if(o<=-1e21||o>=1e21)return T8(o);if(o<0&&(l="-",o=-o),o>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(o*R8(2,69,1))-69)<0?o*R8(2,-t,1):o/R8(2,t,1),n*=4503599627370496,(t=52-t)>0){for(L8(s,0,n),i=a;i>=7;)L8(s,1e7,0),i-=7;for(L8(s,R8(10,i,1),0),i=t-1;i>=23;)P8(s,1<<23),i-=23;P8(s,1<<i),L8(s,1,1),P8(s,2),c=A8(s)}else L8(s,0,n),L8(s,1<<-t,0),c=A8(s)+x8("0",a);return c=a>0?l+((r=c.length)<=a?"0."+x8("0",a-r)+c:D8(c,0,r-a)+"."+D8(c,r-a)):l+c}}),Z0({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var O8=s$,M8=o$.RegExp,N8=O8((function(){var e=M8("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),z8=N8||O8((function(){return!M8("a","y").sticky})),U8={BROKEN_CARET:N8||O8((function(){var e=M8("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:z8,UNSUPPORTED_Y:N8},B8={},F8=l$,H8=LQ,j8=RQ,G8=MQ,V8=F$,K8=_2;B8.f=F8&&!H8?Object.defineProperties:function(e,t){G8(e);for(var n,i=V8(t),r=K8(t),o=r.length,a=0;o>a;)j8.f(e,n=r[a++],i[n]);return e};var W8,Y8=MQ,q8=B8,X8=b0,$8=gJ,Z8=i4,Q8=mQ,J8="prototype",eee="script",tee=vJ("IE_PROTO"),nee=function(){},iee=function(e){return"<"+eee+">"+e+"</"+eee+">"},ree=function(e){e.write(iee("")),e.close();var t=e.parentWindow.Object;return e=null,t},oee=function(){try{W8=new ActiveXObject("htmlfile")}catch(tSe){}var e,t,n;oee="undefined"!=typeof document?document.domain&&W8?ree(W8):(t=Q8("iframe"),n="java"+eee+":",t.style.display="none",Z8.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(iee("document.F=Object")),e.close(),e.F):ree(W8);for(var i=X8.length;i--;)delete oee[J8][X8[i]];return oee()};$8[tee]=!0;var aee,see,lee=Object.create||function(e,t){var n;return null!==e?(nee[J8]=Y8(e),n=new nee,nee[J8]=null,n[tee]=e):n=oee(),void 0===t?n:q8.f(n,t)},cee=s$,uee=o$.RegExp,hee=cee((function(){var e=uee(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),dee=s$,fee=o$.RegExp,pee=dee((function(){var e=fee("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),vee=d$,gee=S$,yee=S2,mee=H2,_ee=U8,bee=lee,kee=RJ.get,Eee=hee,wee=pee,See=NZ("native-string-replace",String.prototype.replace),Tee=RegExp.prototype.exec,Cee=Tee,xee=gee("".charAt),Dee=gee("".indexOf),Iee=gee("".replace),Ree=gee("".slice),Lee=(see=/b*/g,vee(Tee,aee=/a/,"a"),vee(Tee,see,"a"),0!==aee.lastIndex||0!==see.lastIndex),Pee=_ee.BROKEN_CARET,Aee=void 0!==/()??/.exec("")[1];(Lee||Aee||Pee||Eee||wee)&&(Cee=function(e){var t,n,i,r,o,a,s,l=this,c=kee(l),u=yee(e),h=c.raw;if(h)return h.lastIndex=l.lastIndex,t=vee(Cee,h,u),l.lastIndex=h.lastIndex,t;var d=c.groups,f=Pee&&l.sticky,p=vee(mee,l),v=l.source,g=0,y=u;if(f&&(p=Iee(p,"y",""),-1===Dee(p,"g")&&(p+="g"),y=Ree(u,l.lastIndex),l.lastIndex>0&&(!l.multiline||l.multiline&&"\n"!==xee(u,l.lastIndex-1))&&(v="(?: "+v+")",y=" "+y,g++),n=new RegExp("^(?:"+v+")",p)),Aee&&(n=new RegExp("^"+v+"$(?!\\s)",p)),Lee&&(i=l.lastIndex),r=vee(Tee,f?n:l,y),f?r?(r.input=Ree(r.input,g),r[0]=Ree(r[0],g),r.index=l.lastIndex,l.lastIndex+=r[0].length):l.lastIndex=0:Lee&&r&&(l.lastIndex=l.global?r.index+r[0].length:i),Aee&&r&&r.length>1&&vee(See,r[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)})),r&&d)for(r.groups=a=bee(null),o=0;o<d.length;o++)a[(s=d[o])[0]]=r[s[1]];return r});var Oee=Cee;Z0({target:"RegExp",proto:!0,forced:/./.exec!==Oee},{exec:Oee});var Mee=i2,Nee=qJ,zee=Oee,Uee=s$,Bee=iQ,Fee=XQ,Hee=Bee("species"),jee=RegExp.prototype,Gee=function(e,t,n,i){var r=Bee(e),o=!Uee((function(){var t={};return t[r]=function(){return 7},7!=""[e](t)})),a=o&&!Uee((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[Hee]=function(){return n},n.flags="",n[r]=/./[r]),n.exec=function(){return t=!0,null},n[r](""),!t}));if(!o||!a||n){var s=Mee(/./[r]),l=t(r,""[e],(function(e,t,n,i,r){var a=Mee(e),l=t.exec;return l===zee||l===jee.exec?o&&!r?{done:!0,value:s(t,n,i)}:{done:!0,value:a(n,t,i)}:{done:!1}}));Nee(String.prototype,e,l[0]),Nee(jee,r,l[1])}i&&Fee(jee[r],"sham",!0)},Vee=A2.charAt,Kee=function(e,t,n){return t+(n?Vee(e,t).length:1)},Wee=S$,Yee=BZ,qee=Math.floor,Xee=Wee("".charAt),$ee=Wee("".replace),Zee=Wee("".slice),Qee=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Jee=/\$([$&'`]|\d{1,2})/g,ete=d$,tte=MQ,nte=V$,ite=D$,rte=Oee,ote=TypeError,ate=function(e,t){var n=e.exec;if(nte(n)){var i=ete(n,e,t);return null!==i&&tte(i),i}if("RegExp"===ite(e))return ete(rte,e,t);throw ote("RegExp#exec called on incompatible receiver")},ste=n4,lte=d$,cte=S$,ute=Gee,hte=s$,dte=MQ,fte=V$,pte=O$,vte=JJ,gte=a0,yte=S2,mte=z$,_te=Kee,bte=wZ,kte=function(e,t,n,i,r,o){var a=n+e.length,s=i.length,l=Jee;return void 0!==r&&(r=Yee(r),l=Qee),$ee(o,l,(function(o,l){var c;switch(Xee(l,0)){case"$":return"$";case"&":return e;case"`":return Zee(t,0,n);case"'":return Zee(t,a);case"<":c=r[Zee(l,1,-1)];break;default:var u=+l;if(0===u)return o;if(u>s){var h=qee(u/10);return 0===h?o:h<=s?void 0===i[h-1]?Xee(l,1):i[h-1]+Xee(l,1):o}c=i[u-1]}return void 0===c?"":c}))},Ete=ate,wte=iQ("replace"),Ste=Math.max,Tte=Math.min,Cte=cte([].concat),xte=cte([].push),Dte=cte("".indexOf),Ite=cte("".slice),Rte="$0"==="a".replace(/./,"$0"),Lte=!!/./[wte]&&""===/./[wte]("a","$0");ute("replace",(function(e,t,n){var i=Lte?"$":"$0";return[function(e,n){var i=mte(this),r=pte(e)?void 0:bte(e,wte);return r?lte(r,e,i,n):lte(t,yte(i),e,n)},function(e,r){var o=dte(this),a=yte(e);if("string"==typeof r&&-1===Dte(r,i)&&-1===Dte(r,"$<")){var s=n(t,o,a,r);if(s.done)return s.value}var l=fte(r);l||(r=yte(r));var c=o.global;if(c){var u=o.unicode;o.lastIndex=0}for(var h=[];;){var d=Ete(o,a);if(null===d)break;if(xte(h,d),!c)break;""===yte(d[0])&&(o.lastIndex=_te(a,gte(o.lastIndex),u))}for(var f,p="",v=0,g=0;g<h.length;g++){for(var y=yte((d=h[g])[0]),m=Ste(Tte(vte(d.index),a.length),0),_=[],b=1;b<d.length;b++)xte(_,void 0===(f=d[b])?f:String(f));var k=d.groups;if(l){var E=Cte([y],_,m,a);void 0!==k&&xte(E,k);var w=yte(ste(r,void 0,E))}else w=kte(y,a,m,_,k,r);m>=v&&(p+=Ite(a,v,m)+w,v=m+y.length)}return p+Ite(a,v)}]}),!!hte((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Rte||Lte);var Pte=Y$,Ate=D$,Ote=iQ("match"),Mte=function(e){var t;return Pte(e)&&(void 0!==(t=e[Ote])?!!t:"RegExp"==Ate(e))},Nte=i0,zte=l0,Ute=o1,Bte=Array,Fte=Math.max,Hte=function(e,t,n){for(var i=zte(e),r=Nte(t,i),o=Nte(void 0===n?i:n,i),a=Bte(Fte(o-r,0)),s=0;r<o;r++,s++)Ute(a,s,e[r]);return a.length=s,a},jte=n4,Gte=d$,Vte=S$,Kte=Gee,Wte=MQ,Yte=O$,qte=Mte,Xte=z$,$te=Z5,Zte=Kee,Qte=a0,Jte=S2,ene=wZ,tne=Hte,nne=ate,ine=Oee,rne=s$,one=U8.UNSUPPORTED_Y,ane=4294967295,sne=Math.min,lne=[].push,cne=Vte(/./.exec),une=Vte(lne),hne=Vte("".slice),dne=!rne((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));Kte("split",(function(e,t,n){var i;return i="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var i=Jte(Xte(this)),r=void 0===n?ane:n>>>0;if(0===r)return[];if(void 0===e)return[i];if(!qte(e))return Gte(t,i,e,r);for(var o,a,s,l=[],c=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),u=0,h=new RegExp(e.source,c+"g");(o=Gte(ine,h,i))&&!((a=h.lastIndex)>u&&(une(l,hne(i,u,o.index)),o.length>1&&o.index<i.length&&jte(lne,l,tne(o,1)),s=o[0].length,u=a,l.length>=r));)h.lastIndex===o.index&&h.lastIndex++;return u===i.length?!s&&cne(h,"")||une(l,""):une(l,hne(i,u)),l.length>r?tne(l,0,r):l}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:Gte(t,this,e,n)}:t,[function(t,n){var r=Xte(this),o=Yte(t)?void 0:ene(t,e);return o?Gte(o,t,r,n):Gte(i,Jte(r),t,n)},function(e,r){var o=Wte(this),a=Jte(e),s=n(i,o,a,r,i!==t);if(s.done)return s.value;var l=$te(o,RegExp),c=o.unicode,u=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(one?"g":"y"),h=new l(one?"^(?:"+o.source+")":o,u),d=void 0===r?ane:r>>>0;if(0===d)return[];if(0===a.length)return null===nne(h,a)?[a]:[];for(var f=0,p=0,v=[];p<a.length;){h.lastIndex=one?0:p;var g,y=nne(h,one?hne(a,p):a);if(null===y||(g=sne(Qte(h.lastIndex+(one?p:0)),a.length))===f)p=Zte(a,p,c);else{if(une(v,hne(a,f,p)),v.length===d)return v;for(var m=1;m<=y.length-1;m++)if(une(v,y[m]),v.length===d)return v;p=f=g}}return une(v,hne(a,f)),v}]}),!dne,one);var fne=nJ.PROPER,pne=s$,vne=R3,gne=B3.trim;Z0({target:"String",proto:!0,forced:function(e){return pne((function(){return!!vne[e]()||"​…᠎"!=="​…᠎"[e]()||fne&&vne[e].name!==e}))}("trim")},{trim:function(){return gne(this)}});var yne=v2.filter;Z0({target:"Array",proto:!0,forced:!B1("filter")},{filter:function(e){return yne(this,e,arguments.length>1?arguments[1]:void 0)}});var mne=d$,_ne=MQ,bne=O$,kne=a0,Ene=S2,wne=z$,Sne=wZ,Tne=Kee,Cne=ate;Gee("match",(function(e,t,n){return[function(t){var n=wne(this),i=bne(t)?void 0:Sne(t,e);return i?mne(i,t,n):new RegExp(t)[e](Ene(n))},function(e){var i=_ne(this),r=Ene(e),o=n(t,i,r);if(o.done)return o.value;if(!i.global)return Cne(i,r);var a=i.unicode;i.lastIndex=0;for(var s,l=[],c=0;null!==(s=Cne(i,r));){var u=Ene(s[0]);l[c]=u,""===u&&(i.lastIndex=Tne(r,kne(i.lastIndex),a)),c++}return 0===c?null:l}]}));var xne,Dne=RQ.f,Ine=l$,Rne=o$,Lne=S$,Pne=G0,Ane=D3,One=XQ,Mne=XJ.f,Nne=Z$,zne=Mte,Une=S2,Bne=Y2,Fne=U8,Hne=function(e,t,n){n in e||Dne(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},jne=qJ,Gne=s$,Vne=jZ,Kne=RJ.enforce,Wne=H5,Yne=hee,qne=pee,Xne=iQ("match"),$ne=Rne.RegExp,Zne=$ne.prototype,Qne=Rne.SyntaxError,Jne=Lne(Zne.exec),eie=Lne("".charAt),tie=Lne("".replace),nie=Lne("".indexOf),iie=Lne("".slice),rie=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,oie=/a/g,aie=/a/g,sie=new $ne(oie)!==oie,lie=Fne.MISSED_STICKY,cie=Fne.UNSUPPORTED_Y,uie=Ine&&(!sie||lie||Yne||qne||Gne((function(){return aie[Xne]=!1,$ne(oie)!=oie||$ne(aie)==aie||"/a/i"!=$ne(oie,"i")})));if(Pne("RegExp",uie)){for(var hie=function(e,t){var n,i,r,o,a,s,l=Nne(Zne,this),c=zne(e),u=void 0===t,h=[],d=e;if(!l&&c&&u&&e.constructor===hie)return e;if((c||Nne(Zne,e))&&(e=e.source,u&&(t=Bne(d))),e=void 0===e?"":Une(e),t=void 0===t?"":Une(t),d=e,Yne&&"dotAll"in oie&&(i=!!t&&nie(t,"s")>-1)&&(t=tie(t,/s/g,"")),n=t,lie&&"sticky"in oie&&(r=!!t&&nie(t,"y")>-1)&&cie&&(t=tie(t,/y/g,"")),qne&&(o=function(e){for(var t,n=e.length,i=0,r="",o=[],a={},s=!1,l=!1,c=0,u="";i<=n;i++){if("\\"===(t=eie(e,i)))t+=eie(e,++i);else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:Jne(rie,iie(e,i+1))&&(i+=2,l=!0),r+=t,c++;continue;case">"===t&&l:if(""===u||Vne(a,u))throw new Qne("Invalid capture group name");a[u]=!0,o[o.length]=[u,c],l=!1,u="";continue}l?u+=t:r+=t}return[r,o]}(e),e=o[0],h=o[1]),a=Ane($ne(e,t),l?this:Zne,hie),(i||r||h.length)&&(s=Kne(a),i&&(s.dotAll=!0,s.raw=hie(function(e){for(var t,n=e.length,i=0,r="",o=!1;i<=n;i++)"\\"!==(t=eie(e,i))?o||"."!==t?("["===t?o=!0:"]"===t&&(o=!1),r+=t):r+="[\\s\\S]":r+=t+eie(e,++i);return r}(e),n)),r&&(s.sticky=!0),h.length&&(s.groups=h)),e!==d)try{One(a,"source",""===d?"(?:)":d)}catch(tSe){}return a},die=Mne($ne),fie=0;die.length>fie;)Hne(hie,$ne,die[fie++]);Zne.constructor=hie,hie.prototype=Zne,jne(Rne,"RegExp",hie,{constructor:!0})}Wne("RegExp");var pie="undefined"!=typeof window&&qP(xne=window.location.href).call(xne,"loggerdebug")>-1;function vie(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=0,n=0;n<e.length;n++){var i=e[n].end,r=e[n].begin;XP(Number(i))||XP(Number(r))||r<0||i<0||i<r||(t+=e[n].end-e[n].begin)}return t=parseInt(1e3*t,10)}function gie(e){if(null==e||""===e||"string"!=typeof e)return"";var t=e.split("/"),n="";return t.length>3&&t[2]&&(n=t[2]),n}function yie(e){var t={};if(e instanceof window.XMLHttpRequest)try{var n=e.getAllResponseHeaders();nO(n).call(n).split(/[\r\n]+/).forEach((function(e){var n=e.split(": "),i=n.shift(),r=n.join(": ");t[i]=r}))}catch(tSe){return t}return t}function mie(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];pie&&(n=console).log.apply(n,y_(t=["[logger]",e]).call(t,r))}function _ie(){try{return Math.round(window.performance.now())}catch(tSe){return(new Date).getTime()}}function bie(){return(new Date).getTime()}function kie(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new rb((function(n,i){try{e||i(new Error("url is undefined"));var r=_ie(),o=r,a={},s=new window.XMLHttpRequest;s.open("get",e),s.onreadystatechange=function(){2===s.readyState&&(a.headers=yie(s),a.connectTime=_ie()-o,a.status=s.status,a.statusText=s.statusText,r=_ie())},s.onload=function(){n(a)},s.onprogress=function(e){var t,n=_ie()-r;t=parseInt(e.loaded/1e3/(n/1e3),10),a.speed=0|t,a.costTime=n},s.onerror=function(){a.status||(a.status=-1,a.costTime=_ie()-r),i(a)},s.ontimeout=function(){a.status||(a.status=-2,a.costTime=_ie()-r),n(a)},s.onabort=function(){n(a)},s.responseType="arraybuffer",s.timeout=t.timeout||1e4,s.setRequestHeader("Range","bytes=".concat(t.range||"0-1048576")),s.send()}catch(cK){i(cK)}}))}function Eie(e){var t;return!e||qP(t=window.location.href).call(t,e)>-1}function wie(e){return!!e&&/^blob:/.test(e)}var Sie={x_response_sinfo:"x-response-sinfo",x_response_cache:"x-response-cache",x_response_cinfo:"x-response-cinfo"};function Tie(e){var t;if(!e)return{};var n={};return W_(t=kT(Sie)).call(t,(function(t){if(e[t]||"string"!=typeof Sie[t]){if(!e[t]&&Sie[t]instanceof Array){var i,r=ib(i=Sie[t]).call(i,(function(t){return void 0!==e[t]}));r.length>0?n[t]=e[r[0]]:n[t]=""}}else n[t]=e[Sie[t]]||""})),n}function Cie(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]}function xie(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return W_(e=kT(n)).call(e,(function(e){var r,o,a;t[e]="append"===i?(r=t[e],o=n[e],!r||"string"!=typeof o&&"number"!=typeof o?o:y_(a="".concat(r," ")).call(a,o)):n[e]})),t}function Die(e,t){if(!e||!t)return!1;try{return Array.prototype.some.call(e.classList,(function(e){return e===t}))}catch(cK){var n=e.className&&"object"===ZX(e.className)?e.getAttribute("class"):e.className;return n&&!!n.match(new RegExp("(\\s|^)".concat(t,"(\\s|$)")))}}function Iie(e){return"String"===Cie(e)?e.replace("P","p"):e?"Number"===Cie(e)?"".concat(e):void 0:""}function Rie(e){try{return Hj(e)}catch(cK){return""}}var Lie=0,Pie=1,Aie=2;function Oie(e,t){return Math.round(t/e*1e3*100)}var Mie=[];"undefined"!=typeof window&&function(){try{new window.PerformanceObserver((function(e){var t=e.getEntriesByType("resource");Mie.length>30&&bT(Mie).call(Mie,0,Mie.length-30);for(var n=0;n<t.length;n++)Mie.push(t[n])})).observe({entryTypes:["resource"]})}catch(cK){console.warn("PerformanceObserver not support",cK)}}();var Nie="videoplayer_oneplay",zie="videoplayer_oneopera",Uie="videoplayer_oneerror",Bie="videoplayer_oneevent",Fie="videoplayer_onetemp",Hie={data:1e3,runtime:1002,parse:1004,network:1003,no_error_handler:9997,custom_error:9998,other:9999,notSupport:1005},jie={1:-499991,2:-499992,3:-499993,4:-499994,5:-499995},Gie=0,Vie=1,Kie=2,Wie=3,Yie=4,qie=0,Xie=1,$ie=2,Zie=3,Qie=1,Jie=2,ere=3,tre=4,nre=5,ire=6,rre=7,ore="error_retry",are="oneerror",sre="oneevent",lre="onetemp",cre=0,ure=1,hre=864e5,dre=36e5,fre=["tag","subtag","device_type"],pre={NO_FULLSCREEN:0,FULLSCREEN:1,CSS:2};var vre=function(){try{return"undefined"!=typeof localStorage&&"setItem"in window.localStorage&&!!window.localStorage.setItem}catch(cK){return!1}}()&&!function(){var e="_localstorage_support_test";try{return window.localStorage.setItem(e,!0),window.localStorage.removeItem(e),!1}catch(cK){return!0}}()?window.localStorage:{},gre="__xgplayerlogkey",yre={set:function(e){try{var t=this.get();t.push(e),vre.setItem(gre,Hj(t))}catch(tSe){}},get:function(){try{var e=vre.getItem(gre);return e=e?JSON.parse(e):[]}catch(tSe){return[]}},remove:function(){try{vre.removeItem(gre)}catch(tSe){}},clear:function(){try{vre.clear()}catch(tSe){}}},mre={},_re=D$,bre=F$,kre=XJ.f,Ere=Hte,wre="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];mre.f=function(e){return wre&&"Window"==_re(e)?function(e){try{return kre(e)}catch(tSe){return Ere(wre)}}(e):kre(bre(e))};var Sre={},Tre=iQ;Sre.f=Tre;var Cre=o$,xre=jZ,Dre=Sre,Ire=RQ.f,Rre=d$,Lre=$$,Pre=iQ,Are=qJ,Ore=Z0,Mre=o$,Nre=d$,zre=S$,Ure=l$,Bre=lZ,Fre=s$,Hre=jZ,jre=Z$,Gre=MQ,Vre=F$,Kre=pQ,Wre=S2,Yre=_$,qre=lee,Xre=_2,$re=XJ,Zre=mre,Qre=w0,Jre=a$,eoe=RQ,toe=B8,noe=f$,ioe=qJ,roe=NZ,ooe=gJ,aoe=YZ,soe=iQ,loe=Sre,coe=function(e){var t=Cre.Symbol||(Cre.Symbol={});xre(t,e)||Ire(t,e,{value:Dre.f(e)})},uoe=function(){var e=Lre("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,i=Pre("toPrimitive");t&&!t[i]&&Are(t,i,(function(e){return Rre(n,this)}),{arity:1})},hoe=N5,doe=RJ,foe=v2.forEach,poe=vJ("hidden"),voe="Symbol",goe="prototype",yoe=doe.set,moe=doe.getterFor(voe),_oe=Object[goe],boe=Mre.Symbol,koe=boe&&boe[goe],Eoe=Mre.TypeError,woe=Mre.QObject,Soe=Jre.f,Toe=eoe.f,Coe=Zre.f,xoe=noe.f,Doe=zre([].push),Ioe=roe("symbols"),Roe=roe("op-symbols"),Loe=roe("wks"),Poe=!woe||!woe[goe]||!woe[goe].findChild,Aoe=Ure&&Fre((function(){return 7!=qre(Toe({},"a",{get:function(){return Toe(this,"a",{value:7}).a}})).a}))?function(e,t,n){var i=Soe(_oe,t);i&&delete _oe[t],Toe(e,t,n),i&&e!==_oe&&Toe(_oe,t,i)}:Toe,Ooe=function(e,t){var n=Ioe[e]=qre(koe);return yoe(n,{type:voe,tag:e,description:t}),Ure||(n.description=t),n},Moe=function(e,t,n){e===_oe&&Moe(Roe,t,n),Gre(e);var i=Kre(t);return Gre(n),Hre(Ioe,i)?(n.enumerable?(Hre(e,poe)&&e[poe][i]&&(e[poe][i]=!1),n=qre(n,{enumerable:Yre(0,!1)})):(Hre(e,poe)||Toe(e,poe,Yre(1,{})),e[poe][i]=!0),Aoe(e,i,n)):Toe(e,i,n)},Noe=function(e,t){Gre(e);var n=Vre(t),i=Xre(n).concat(Foe(n));return foe(i,(function(t){Ure&&!Nre(zoe,n,t)||Moe(e,t,n[t])})),e},zoe=function(e){var t=Kre(e),n=Nre(xoe,this,t);return!(this===_oe&&Hre(Ioe,t)&&!Hre(Roe,t))&&(!(n||!Hre(this,t)||!Hre(Ioe,t)||Hre(this,poe)&&this[poe][t])||n)},Uoe=function(e,t){var n=Vre(e),i=Kre(t);if(n!==_oe||!Hre(Ioe,i)||Hre(Roe,i)){var r=Soe(n,i);return!r||!Hre(Ioe,i)||Hre(n,poe)&&n[poe][i]||(r.enumerable=!0),r}},Boe=function(e){var t=Coe(Vre(e)),n=[];return foe(t,(function(e){Hre(Ioe,e)||Hre(ooe,e)||Doe(n,e)})),n},Foe=function(e){var t=e===_oe,n=Coe(t?Roe:Vre(e)),i=[];return foe(n,(function(e){!Hre(Ioe,e)||t&&!Hre(_oe,e)||Doe(i,Ioe[e])})),i};Bre||(boe=function(){if(jre(koe,this))throw Eoe("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Wre(arguments[0]):void 0,t=aoe(e),n=function(e){this===_oe&&Nre(n,Roe,e),Hre(this,poe)&&Hre(this[poe],t)&&(this[poe][t]=!1),Aoe(this,t,Yre(1,e))};return Ure&&Poe&&Aoe(_oe,t,{configurable:!0,set:n}),Ooe(t,e)},ioe(koe=boe[goe],"toString",(function(){return moe(this).tag})),ioe(boe,"withoutSetter",(function(e){return Ooe(aoe(e),e)})),noe.f=zoe,eoe.f=Moe,toe.f=Noe,Jre.f=Uoe,$re.f=Zre.f=Boe,Qre.f=Foe,loe.f=function(e){return Ooe(soe(e),e)},Ure&&(Toe(koe,"description",{configurable:!0,get:function(){return moe(this).description}}),ioe(_oe,"propertyIsEnumerable",zoe,{unsafe:!0}))),Ore({global:!0,constructor:!0,wrap:!0,forced:!Bre,sham:!Bre},{Symbol:boe}),foe(Xre(Loe),(function(e){coe(e)})),Ore({target:voe,stat:!0,forced:!Bre},{useSetter:function(){Poe=!0},useSimple:function(){Poe=!1}}),Ore({target:"Object",stat:!0,forced:!Bre,sham:!Ure},{create:function(e,t){return void 0===t?qre(e):Noe(qre(e),t)},defineProperty:Moe,defineProperties:Noe,getOwnPropertyDescriptor:Uoe}),Ore({target:"Object",stat:!0,forced:!Bre},{getOwnPropertyNames:Boe}),uoe(),hoe(boe,voe),ooe[poe]=!0;var Hoe=lZ&&!!Symbol.for&&!!Symbol.keyFor,joe=Z0,Goe=$$,Voe=jZ,Koe=S2,Woe=NZ,Yoe=Hoe,qoe=Woe("string-to-symbol-registry"),Xoe=Woe("symbol-to-string-registry");joe({target:"Symbol",stat:!0,forced:!Yoe},{for:function(e){var t=Koe(e);if(Voe(qoe,t))return qoe[t];var n=Goe("Symbol")(t);return qoe[t]=n,Xoe[n]=t,n}});var $oe=Z0,Zoe=jZ,Qoe=pZ,Joe=gZ,eae=Hoe,tae=NZ("symbol-to-string-registry");$oe({target:"Symbol",stat:!0,forced:!eae},{keyFor:function(e){if(!Qoe(e))throw TypeError(Joe(e)+" is not a symbol");if(Zoe(tae,e))return tae[e]}});var nae=Z0,iae=$$,rae=n4,oae=d$,aae=S$,sae=s$,lae=J0,cae=V$,uae=Y$,hae=pZ,dae=r4,fae=lZ,pae=iae("JSON","stringify"),vae=aae(/./.exec),gae=aae("".charAt),yae=aae("".charCodeAt),mae=aae("".replace),_ae=aae(1..toString),bae=/[\uD800-\uDFFF]/g,kae=/^[\uD800-\uDBFF]$/,Eae=/^[\uDC00-\uDFFF]$/,wae=!fae||sae((function(){var e=iae("Symbol")();return"[null]"!=pae([e])||"{}"!=pae({a:e})||"{}"!=pae(Object(e))})),Sae=sae((function(){return'"\\udf06\\ud834"'!==pae("\udf06\ud834")||'"\\udead"'!==pae("\udead")})),Tae=function(e,t){var n=dae(arguments),i=t;if((uae(t)||void 0!==e)&&!hae(e))return lae(t)||(t=function(e,t){if(cae(i)&&(t=oae(i,this,e,t)),!hae(t))return t}),n[1]=t,rae(pae,null,n)},Cae=function(e,t,n){var i=gae(n,t-1),r=gae(n,t+1);return vae(kae,e)&&!vae(Eae,r)||vae(Eae,e)&&!vae(kae,i)?"\\u"+_ae(yae(e,0),16):e};pae&&nae({target:"JSON",stat:!0,arity:3,forced:wae||Sae},{stringify:function(e,t,n){var i=dae(arguments),r=rae(wae?Tae:pae,null,i);return Sae&&"string"==typeof r?mae(r,bae,Cae):r}});var xae=w0,Dae=BZ;Z0({target:"Object",stat:!0,forced:!lZ||s$((function(){xae.f(1)}))},{getOwnPropertySymbols:function(e){var t=xae.f;return t?t(Dae(e)):[]}});var Iae=Z0,Rae=l$,Lae=o$,Pae=S$,Aae=jZ,Oae=V$,Mae=Z$,Nae=S2,zae=RQ.f,Uae=O0,Bae=Lae.Symbol,Fae=Bae&&Bae.prototype;if(Rae&&Oae(Bae)&&(!("description"in Fae)||void 0!==Bae().description)){var Hae={},jae=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:Nae(arguments[0]),t=Mae(Fae,this)?new Bae(e):void 0===e?Bae():Bae(e);return""===e&&(Hae[t]=!0),t};Uae(jae,Bae),jae.prototype=Fae,Fae.constructor=jae;var Gae="Symbol(test)"==String(Bae("test")),Vae=Pae(Fae.valueOf),Kae=Pae(Fae.toString),Wae=/^Symbol\((.*)\)[^)]+$/,Yae=Pae("".replace),qae=Pae("".slice);zae(Fae,"description",{configurable:!0,get:function(){var e=Vae(this);if(Aae(Hae,e))return"";var t=Kae(e),n=Gae?qae(t,7,-1):Yae(t,Wae,"$1");return""===n?void 0:n}}),Iae({global:!0,constructor:!0,forced:!0},{Symbol:jae})}var Xae=[{key:"QQBrowser",reg:/(qqbrowser)\/([\d.]+)/},{key:"QIHU360EE",reg:/qihu 360ee/},{key:"QIHU360SE",reg:/qihu 360se/},{key:"2345Explorer",reg:/(2345explorer)\/([\d.]+)/},{key:"Sogou",reg:/(metasr)/},{key:"Wexin",reg:/(micromessenger)\/([\d.]+)/},{key:"Openlanguage",reg:/(openlanguage)\/([\d.]+)/},{key:"NewsArticle",reg:/(newsarticle)\/([\d.]+)/},{key:"VideoArticle",reg:/(videoarticle)\/([\d.]+)/},{key:"Hotsoon",reg:/(live_stream)_([\d.]+)/},{key:"Aweme",reg:/(aweme)_([\d.]+)/},{key:"Lark",reg:/(lark)\/([\d.]+)/},{key:"PlayStation",reg:/(playstation)/},{key:"BingPreview",reg:/(bingpreview)\/([\d.]+)/},{key:"Baiduspider",reg:/(baiduspider-render)\/([\d.]+)/},{key:"YandexBot",reg:/(yandexbot)\/([\d.]+)/},{key:"Chrome",reg:/(chrome)\/([\d.]+)/},{key:"Safari",reg:/(version)\/([\d.]+)\s*(safari)/}],$ae=[{key:"Trident",reg:/(rv:)([\d.]+)/},{key:"Trident",reg:/(msie)\s*([\d.]+)/}],Zae=["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","avc1.42E01E, mp4a.40.2","avc1.58A01E, mp4a.40.2","avc1.4D401E, mp4a.40.2","avc1.64001E, mp4a.40.2","mp4v.20.8, mp4a.40.2","mp4v.20.240, mp4a.40.2"];var Qae=["Baiduspider","YandexBot"],Jae=["Baiduspider","googlebot","360Spider","haosouspider","YoudaoBot","Sogou News Spider","Yisouspider","Googlebot","Headless","Applebot","Bingbot","PetalBot"];var ese="undefined"!=typeof navigator&&function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";e=e.toLocaleLowerCase();var t=/(iphone)/.test(e)||/(ipad)/.test(e),n=/(android)/.test(e),i=/(windows phone)/.test(e),r=t||n||i,o={isIOS:t,isAndroid:n,isMobile:r,isPC:!r,isPad:/(ipad)/.test(e)},a=function(){var e={isSupport:!1,mime:""};if("undefined"==typeof document)return e;var t=document.createElement("video");return"function"==typeof t.canPlayType?(W_(Zae).call(Zae,(function(n){"probably"===t.canPlayType('video/mp4; codecs="'.concat(n,'"'))&&(e.isSupport=!0,e.mime+="||".concat(n))})),e):(t=null,e)}();o.isSupportMP4=a.isSupport,o.mime=a.mime;var s="",l=0,c=[],u=Xae;/trident/.test(e)&&(u=$ae);for(var h=0;h<u.length;h++)if(c=u[h].reg.exec(e)){s=u[h].key,l=c.length>2?c[2]:"";break}if(s)o["is".concat(s)]=!0,o.name=s,o.appVersion=l;else{var d=function(){var e=navigator.mimeTypes;if(e){for(var t=0;t<e.length;t++){var n,i,r;if(e[t].type&&qP(n=e[t].type).call(n,"360")>-1)return!0;if(e[t].type&&qP(i=e[t].type).call(i,"application/vnd.chromium.remoting-viewer")>-1)return!0;if(e[t].description&&qP(r=e[t].description).call(r,"360")>-1)return!0}return!1}}();d&&(o.name="360EE")}return o.name&&"Trident"!==o.name&&/(trident)/.exec(e)&&(o.name=o.name?"".concat(o.name,"_Trident"):"Trident"),o.isSpider=function(e,t){var n=!1;W_(Qae).call(Qae,(function(t){t===e&&(n=!0)}));for(var i=0;i<Jae.length;i++){var r=Jae[i];if(-1!==qP(t).call(t,r)){n=!0;break}}return n}(o.name,e),o}(navigator.userAgent);function tse(){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"'))}var nse=[1,1,1,1,1];function ise(){return parseInt(nse.join(""),10)}nse[0]=ese.isSupportMP4?nse[1]+1:nse[1],nse[1]=tse()?nse[1]+1:nse[1],function(e){var t={supported:!1,smooth:!1,powerEfficient:!1};if(!e||"undefined"==typeof navigator)return rb.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 rb.resolve({supported:r&&o,smooth:!1,powerEfficient:!1})}catch(cK){return rb.resolve(t)}}({type:"file",video:{contentType:'video/mp4;codecs="hev1.1.6.L120.90"',width:1920,height:1080,bitrate:1e4,framerate:30}}).then((function(e){e&&e.supported?nse[2]=nse[2]+1:nse[2]=1})).catch((function(){nse[2]=nse[2]-1}));var rse={range:"0-1048576",timer:6e4,timeout:15e3},ose=function(){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};QX(this,e),W_(t=kT(rse)).call(t,(function(e){void 0!==n[e]&&null!==n[e]||(n[e]=rse[e])})),this.options=n,this._headers={},this.intervalId=null,this.ishangUp=!1,this._data={contentLength:0,statusText:"",status:-1,speed:0,costTime:0,connectTime:0,contentType:""},this.url=[]}return e$(e,[{key:"setData",value:function(e){var t,n=this;if(W_(t=kT(e)).call(t,(function(t){"headers"!==t&&(n._data[t]=e[t])})),e.headers&&kT(e.headers).length>0){this._headers=Tie(e.headers),e.headers["content-type"]&&(this._data.contentType=e.headers["content-type"]);var i=(e.headers["content-range"]||"").split("/");i&&i.length>1&&(this._data.contentLength=parseInt(i[1]))}}},{key:"contentLength",get:function(){return this._data.length||0}},{key:"trigger",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"start",i=this.options;this.url=e,!this.url||"start"!==n&&(this.ishangUp||this.intervalId)?mie("task>>cant`t trigger url",this.ishangUp,this.intervalId):(mie("task>>trigger url ",e),this.ishangUp=!0,this.intervalId&&this.clear(),this.intervalId=setTimeout((function(){t.clear()}),"start"===n?500:i.timer),kie(this.url,{range:"start"===n?"0-1024":i.range,timeout:i.timeout}).then((function(e){mie("getXhr>>check result ",e),t.setData(e||{}),t.ishangUp=!1})).catch((function(e){mie("getXhr>>error ",e),t.ishangUp=!1,t._data.status=-1})))}},{key:"url",get:function(){return this.options.url},set:function(e){e&&(this.options.url=e)}},{key:"serverIp",get:function(){return this._headers.x_response_sinfo||""}},{key:"headers",get:function(){return this._headers||{}}},{key:"status",get:function(){return this._data.status||-1}},{key:"speed",get:function(){return this._data.speed}},{key:"clear",value:function(){clearTimeout(this.intervalId),this.intervalId=null}}]),e}(),ase="ProgressInfo";var sse=function(){function e(){QX(this,e),this._init()}return e$(e,[{key:"_init",value:function(){this.played=[],this.playedSize=0,this.cachedSize=0,this.pcdnCached=0,this.cachedVideoSize=0,this.pcdnVideoCached=0,this.file={audio:0,video:0},this.lastBitrate=null,this.curBitrate={vBitrate:0,aBitrate:0,cdnSize:0,pcdnSize:0,definition:"",fileid:""},this.nextBitrate={start:-1},this.currentTime=0,this.buffered=[],this.cachedTime=0,this.duration=0}},{key:"reset",value:function(){this._init()}},{key:"getFileSize",value:function(e){var t=this.curBitrate,n=t.vBitrate,i=t.aBitrate;return{audio:Math.round(e*i/8),video:Math.round(e*n/8),total:Math.round(e*(n+i)/8)}}},{key:"updatePlayed",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.played,i=n.length;if(0===t||i<1){var r=i>0?n[i-1]:null,o=this.curBitrate,a=o.vBitrate,s=o.aBitrate;r&&(r.end<0||r.end-r.start<1)?(r.end<0?r.start=e:r.end=e,r.vBitrate=a,r.aBitrate=s):n.push({start:e,end:-1,vBitrate:a,aBitrate:s})}else n[i-1].end=e}},{key:"calculatePlaySize",value:function(){var e,t=this.played,n=this.curBitrate,i=function(e){for(var t=0,n=0;n<e.length;n++){var i=e[n];i.end<0||(t+=i.end-i.start)}return t}(t),r=Math.round((n.aBitrate+n.vBitrate)*i/8);return this.playedSize+=r,mie(ase,"calculatePlaySize",y_(e="duration: ".concat(i," playedSize:")).call(e,this.playedSize),this.played),this.played=[],this.playedSize}},{key:"copyBitrateInfo",value:function(e,t){return["aBitrate","vBitrate","definition","fileid","cdnSize","pcdnSize"].forEach((function(n){e[n]&&(t[n]=e[n])})),t.cdnSize=e.cdnSize,t.pcdnSize=e.pcdnSize,t}},{key:"checkNextBitrate",value:function(e){var t=this.nextBitrate;if(t.start>-1&&e>=t.start){var n=this.curBitrate;this.calculatePlaySize(),mie(ase,"checkNextBitrate",e,t.start,this.cachedSize),this.copyBitrateInfo(t,n),this.updatePlayed(e,0),t.start=-1,t.fileid="",["vBitrate","aBitrate","cdnSize","pcdnSize"].forEach((function(e){t[e]=0}))}}},{key:"updateLastDefInfo",value:function(){var e=this.curBitrate;if(e.vBitrate>0){var t={};this.copyBitrateInfo(e,t),this.lastBitrate=t}}},{key:"updateDefInfo",value:function(e,t){mie(ase,"updateDefInfo",t,this.curBitrate.vBitrate,e);var n=e.mediaType,i=e.start,r=e.bitrate,o=e.definition,a=e.fileid,s={cdnSize:0,pcdnSize:0};"audio"===n?s.aBitrate=r:(s.vBitrate=r,s.definition=o,s.fileid=a,this.updateLastDefInfo()),s.start=i,this.nextBitrate=s,this.checkNextBitrate(t)}},{key:"upDateDownload",value:function(e){var t=e.cdn_size,n=e.pcdn_size,i=e.mediaType,r=this.curBitrate,o=this.nextBitrate,a=0,s=0;n?(a=1,s=n):t&&(s=t),this.cachedSize+=s,"video"===i&&(this.cachedVideoSize+=s,a>0&&(this.pcdnVideoCached+=s)),a>0&&(this.pcdnCached+=s);var l=o.start>=0?o:r;l.cdnSize+=s,a>0&&(l.pcdnSize+=s)}},{key:"updateBuffered",value:function(e){var t=function(e){var t=[];if(!e||e.length<1)return t;for(var n=0;n<e.length;n++){var i=parseInt(1e3*e.start(n),10)/1e3,r=parseInt(1e3*e.end(n),10)/1e3;t.push({start:i,end:r})}return t}(e),n=0;t.forEach((function(e){var t,i;n+=(t=e.end,i=e.start,parseInt(1e3*t-1e3*i,10)/1e3)})),this.buffered=t,this.cachedTime=n}},{key:"isDefInfoFirstChange",value:function(){return!(this.curBitrate&&this.curBitrate.vBitrate>0)}}]),e}(),lse="0.12.10",cse=["try_req_num","req_node_succ","conn_req_num","has_ret_node","conn_fail_num","conn_jump_num"];mie("xgVodLogger version is ".concat(lse));var use,hse,dse=(use="Object",function(e){return Object.prototype.toString.call(e)==="[object ".concat(use,"]")}),fse=1300,pse="__tea_cache_tokens_".concat(fse),vse="",gse=null,yse=function(){function e(t,n){var i=this;if(QX(this,e),t$(this,"initializeUrlLog",(function(e){var t=e&&e.url?e.url:"String"===Cie(e)?e:"";"String"!==Cie(t)&&(t=""),i.urlLog={initial_url:t,initial_host:gie(t),initial_ip:""}})),t$(this,"onXgLogCache",(function(){var e,t=i._getLogCache();t&&(i._templog={vtype:null===(e=i.player)||void 0===e?void 0:e.vtype,log:t},i.onOneTemp())})),t$(this,"onPrfDataSize",(function(e){i._progressInfo.upDateDownload(e)})),t$(this,"onDegrade",(function(e){e&&(e.local_time=(new Date).getTime(),i.onOneEvent({end_type:"degrade"},e))})),t$(this,"onMediaFormatError",(function(e){i.onOneEvent({end_type:"".concat(e.error_type||"","Error")})})),t$(this,"onReplayBtnClick",(function(){i.resetLoggerParams()})),t$(this,"onBeforeDefinitionChange",(function(){i.resLogs.ldst=_ie(),i._endType="switch"})),t$(this,"onDefinitionChangeDetail",(function(e){var t=i._progressInfo;t.updateDefInfo(e,i.player.currentTime),t.lastBitrate&&"video"===e.mediaType&&i.sendSwitchOpera("changedetail")})),t$(this,"onDefinitionChange",(function(e){var t,n=e.from,r=e.to;i.changeResolution({from:n,to:r,startTime:i.resLogs.ldst,operaType:"switch"}),mie(y_(t="onDefinitionChange from:".concat(n,", to:")).call(t,r))})),t$(this,"onDefiChangeSuccess",(function(){mie("onDefinitionChangeSuccess"),i.updateVideoSize(),i.triggerTask("start")})),t$(this,"onAbrChange",(function(e){var t=e.prev,n=e.cur,r=e.abrInfo;if(i.player.abrInstance){var o=i.player.abrInstance.eventInfo;mie("abrChange",o),o.last_definition=t,o.now_definition=n,i.abrInfo.abr_event_info.video_switch.push(o),i.changeResolution({from:t,to:n,startTime:_ie(),operaType:"abr_switch",abrInfo:r})}})),t$(this,"onTimeUpdate",(function(){var e,t,n,r=i.playlogs,o=i.resLogs,a=i.player;(i.errorLog.try_err_c=0,r.vt||1!==i.startStep)||(r.vt=bie(),mie("onTimeUpdate: first frame inited",y_(e=y_(t=y_(n="currentTime11:".concat(a.currentTime," vt-pt:")).call(n,r.vt-r.pt," vt-nt:")).call(t,r.vt-r.nt," vt-rt:")).call(e,r.vt-r.rt)),i.startStep=2);if(!o.initial_resolution){var s=a.currentDefitionFromPlayer&&a.currentDefitionFromPlayer.definition?a.currentDefitionFromPlayer.definition:a.config.defaultDefinition||"".concat(a.video.videoHeight,"p")||"";s=Iie(s),o.initial_resolution=s}o.final_resolution||(o.final_resolution=o.initial_resolution);var l=r.played.length;l<1?r.played.push({begin:a.currentTime,end:-1}):r.played[l-1].end=a.currentTime,i._progressInfo.updatePlayed(a.currentTime),i._progressInfo.checkNextBitrate(a.currentTime);var c=o.played.length;c<1?o.played.push({begin:a.currentTime,end:-1}):o.played[c-1].end=a.currentTime,i.lastVideoTime=a.currentTime||0})),t$(this,"onVideoProgress",(function(){i.updateBuffers(),i._progressInfo.updateBuffered(i.player.buffered)})),t$(this,"onCanplay",(function(){var e;mie("onCanplay",y_(e="this.startStep:".concat(i.startStep," ")).call(e,bie())),i.setVt()})),t$(this,"onLoadeddata",(function(){var e;mie("onLoadeddata",y_(e="this.startStep:".concat(i.startStep," ")).call(e,bie())),i.setVt(),i.updateVideoSize()})),t$(this,"onLoadStart",(function(){var e,t,n;i.commonParams.web_url=location.href;var r=Eie(i.player.currentSrc);i.triggerTask("start"),mie("onLoadStart",y_(e=y_(t=y_(n="this.startStep:".concat(i.startStep," ")).call(n,bie()," isSrcEmpty:")).call(t,r," player.src:")).call(e,i.player.src)),0!==i.startStep||r||"visible"!==document.visibilityState||i.setPt()})),t$(this,"onBufferedChange",(function(){var e=i.player.video&&i.player.video.buffered;if(e){var t=e.length;t>0&&e.end(t-1)+1>i.player.duration&&(i.bft=bie())}})),t$(this,"onPlayerInited",(function(){mie("player init"),i._playerCreatedTime=bie(),i.playlogs.rt=bie()})),t$(this,"onNotAutoPlay",(function(){mie("onNotAutoPlay","autoplay:".concat(i.isAutoplay)),0===i.isAutoplay?i.isAutoplay=2:1===i.isAutoplay&&(i.isAutoplay=3)})),t$(this,"onPlayerError",(function(e){var t,n,r;e=e||{};var o=i.errorLog,a=i.player;if(mie("onPlayerError",y_(t=y_(n=y_(r="this.player.type:".concat(i.player.type," this.player.replayRunning:")).call(r,i.player.replayRunning," isSupportMP4:")).call(n,ese.isSupportMP4," isPC:")).call(t,ese.isPC)),mie("onPlayerError",e),i.load_state=Zie,i._endType="error",i.suspendWaitingStatus("onPlayerError"),i._progressInfo.calculatePlaySize(),"dash"!==a.type||!a.replayRunning){if(e.url||(e.url=i.player.currentSrc),ese.isPC&&!ese.isSupportMP4||ese.isSpider)return o.errc=jie[5],o.errt=Hie.notSupport,i.onOneError({errorType:o.errt,code:o.errc,url:e.url,headers:e.headers||{},message:e.message||""},0),void(i._isOnePlayReport=!0);o.errt=e.errorTypeCode||(e.errorType&&Hie[e.errorType]?Hie[e.errorType]:9999),o.message=e.message||"",e.errorCode?o.errc=e.errorCode>0&&jie[e.errorCode]?jie[e.errorCode]:e.errorCode:e.code&&(o.errc=e.code>0&&jie[e.code]?jie[e.code]:e.code),o.last_errors.push(o.errc),0===o.fir_errc&&(o.fir_errc=o.errc),i.sendSwitchOpera(Qie),i.onOnePlay(Qie),i.onOneTemp(Qie),i.sendDegradeLog("playCatch_end",i.playlogs.degrade);var s=!1,l=e.mediaError;l&&i._options.needXhrCheck&&(4===l.code||2===l)&&(s=!0),i.onOneError({endState:rre,errorType:o.errt,code:o.errc,url:e.url,headers:e.headers||{},message:e.message||""},0,s),i.sendEventsQueue()}})),t$(this,"onPlayInterfaceInfo",(function(e){mie("onPlayInterfaceInfo",e);var t,n=i.errorLog,r=i.apiLog,o=i.playlogs;e&&W_(t=kT(e)).call(t,(function(t){"code"===t?r.vsc=e[t]:"message"===t?r.vsc_message=e.message||"success,视频可正常播放":r[t]=e[t]}));if(o.at=e.timestamep||(new Date).getTime(),(!e.error||-9988!==e.error.errc)&&(r.vsc=e.code||10,r.vsc_message=e.message||"success,视频可正常播放",e.error)){var a=e.error;n.errt=1e3,n.errc=a.errc||-9998,n.last_errors.push(a.errc||-9998),0===n.fir_errc&&(n.fir_errc=a.errc||-9998),n.accu_errc++,1===n.accu_errc&&(n.fir_errt=_ie()),i.onOneError({errorType:1e3,code:a.errc||-9998,url:"",headers:{}})}})),t$(this,"onProgressEvent",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=i.netLog;if(e.speed){var n=e.speed>1e6?Math.floor(e.speed/1e3):e.speed;t.downloadSpeed=n,t.totalSpeed+=n,t.rqCount++}"oversize"!==e.type&&t.requestCount++,e.connectTime&&(t.connectCost=e.connectTime);var r=t.rqCount<7?100:e.costTime>=5e3?20:10;if(!("success"===e.type&&parseInt(100*Math.random(),10)<=r)){var o=function(e){var t={};try{e=e.replace(/^http:|^https:/,"");for(var n=Mie||[],i=function(i){var r;if(n[i].name.replace(/^http:|^https:/,"")===e)return W_(r=["domainLookupEnd","domainLookupStart","startTime","requestStart","responseEnd","responseStart","connectStart","connectEnd","fetchStart"]).call(r,(function(e){t[e]=Math.round(n[i][e])})),t.url=n[i].name,t.duration=Math.round(n[i].duration),t.domainDuration=t.domainLookupEnd-t.domainLookupStart,t.connectDuration=t.connectEnd-t.connectStart,"break"},r=n.length-1;r>=0&&"break"!==i(r);r--);return t}catch(cK){return t}}(e.cdnUrl),a=e.xhr||{},s=e.type?"progress_".concat(e.type):"progress",l=e.headers;l||(l=yie(a));var c=$X($X({},l=Tie(l)),{},{download_speed:t.downloadSpeed,connect_cost:t.connectCost,c_dur:o.connectDuration||0,d_dur:o.domainDuration||0,r_dur:o.duration||0,rqtt:(new Date).getTime(),x_cache:l.x_response_cache||"",server_ip:l.x_response_sinfo});e.status?t.status=e.status:a&&a instanceof window.XMLHttpRequest&&(t.status=a.status||0),c.status=t.status;var u=e.cdnUrl||e.url;"error"===e.type&&i.merror.cdn.push($X($X({costTime:e.costTime,cur_play_pos:e.pos,cdn_url:u,cdn_host:gie(u)},c),l)),i.onOneEvent({costTime:e.costTime,vid:e.vid,end_type:s,cur_play_pos:e.pos,cdn_url:u,cdn_host:gie(u)},c,"error"===e.type?0:2)}})),t$(this,"onNext",(function(){if(mie("onNext:startStep:",i.startStep),i.startStep>0){if(i._reportInvalidVV(Jie))return;i.sendSwitchOpera(Jie),i.onOnePlay(Jie),i.onOneTemp(Jie),i.sendEventsQueue()}i.vtype=null,i.playlogs.lc=0,i.resetLoggerParams()})),t$(this,"onNextEnded",(function(){var e=i.player,t=i.resLogs,n=Iie(e.config.defaultDefinition||"");t.initial_resolution=n,t.final_resolution=n})),t$(this,"onXgLogWaiting",(function(e){var t=i.playlogs,n=i.resLogs,r=i.stall;if(i._options.checkByInnerLog&&0===e.type){mie("onXgLogWaiting",e);var o=e.endType,a=e.costTime,s=e.start,l={download_speed:i.realSpeed,avg_speed:i.avgSpeed,mse_op:i.mp4MseOpLength,mp4_load_range:i.mp4LoadSegmentTimeRange,bitrate:i.curBitrate};if("waitingStart"===e.eventType)return i.onOneEvent({costTime:a,end_type:"waitstart"},l,2),void i.appendStallInfo("start",s);if("waitingEnd"===e.eventType){var c,u,h=_ie();mie(y_(c=y_(u="onXgLogWaiting>>".concat(o,"|costTime:")).call(u,a," vt:")).call(c,t.vt)),i.appendStallInfo("end",h,o),t.bc++,i.checkInBuffer(i.player.currentTime)?(t.de_bu_acu_t+=a,t.dbc++):(t.nbc++,t.n_bu_acu_t+=a),n.bc++,t.bu_acu_t+=a,n.bu_acu_t+=a,r.end=i.cur_play_pos,r.cost=a,r.acc+=r.cost,1===r.sc&&(r.endf=i.cur_play_pos),i.onOneEvent({costTime:a,end_type:"waitend"},l,2)}}})),t$(this,"onSeeking",(function(){if(!Eie(i.player.src)){var e=i.resLogs,t=i.playlogs,n=i.player,r=i.seekLog;mie("onSeeking","currentTime:".concat(n.currentTime)),0===i.startStep&&i.setPt(),i.suspendWaitingStatus("seek"),i.isSeeking&&i.suspendSeekStatus("seek",!1),i.isSeeking=!0,t.played.push({begin:n.currentTime,end:-1}),e.played.push({begin:n.currentTime,end:-1}),i._progressInfo.updatePlayed(n.currentTime,0),r.lastSeekStartTime=_ie(),r.seekBefore=i.lastVideoTime.toString(),r.buf_include=i.checkInBuffer(i.player.currentTime)?1:0,r.intervalId=setTimeout((function(){i.isSeeking&&i.suspendSeekStatus("seekTimeout",!0)}),6e4)}})),t$(this,"onSeeked",(function(){Eie(i.player.src)||i.isSeeking&&i.suspendSeekStatus("seeked",!0)})),t$(this,"onPlaying",(function(){i.suspendWaitingStatus("play"),i.load_state=Xie;var e=_ie();i.pauseLog.isPausing&&(i.pauseLog.isPausing=!1,i.pauseLog.pause_acu_t+=e-i.pauseLog.pause_start)})),t$(this,"onPlayCatch",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{errorType:"",errorTypeCode:0,errorCode:0,url:"",headers:{},status:0};if(mie("onPlayCatch",e,t),e){switch(e){case"mp42dash":i.vtype="DASH_2";break;case"dash2mp4":i.vtype="MP4_2";break;case"dash1mp4":i.vtype="MP4_1";break;default:i.vtype=e}var n=i.errorLog,r=i.playlogs;i.merror.playCatch.push($X({errc:t.errorCode,errt:t.errorType},t.headers)),i.setBr("playcatch"),n.accu_errc++,n.try_err_c++,n.fir_errc=t.errorCode,t.errorCode&&n.last_errors.push(t.errorCode),i.suspendWaitingStatus("playcatch"),i.suspendSeekStatus("playcatch"),i.sendDegradeLog("playCatch",r.degrade,{cdn_url:t.url}),r.degrade=e,i.onOneError({errorType:t.errorTypeCode,code:t.errorCode,url:t.url||"",status:t.httpCode||t.status,headers:t.headers||{},vid:t.vid||i.vid,preload_hit:t.preloadHit||0,preload_cached:t.preloadCached||0,endState:ire,costTime:t.costTime,message:t.errorMessage||t.message,interval_time:t.timerStep||0},0)}})),t$(this,"onMediaExpied",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{errorType:"",errorTypeCode:0,errorCode:0,url:"",headers:{},status:0},t=i.errorLog,n=i.playlogs;mie("onMediaExpied",e),i.suspendWaitingStatus("expied"),i.setBr("expied"),t.accu_errc++,t.try_err_c++,t.last_errors.push(e.errorCode),n.at=(new Date).getTime(),i.merror.expied.push($X({errorType:e.errorTypeCode||e.errorType,code:e.errorCode,url:e.url||"",status:e.status},Tie(e.headers||{}))),i.onOneError({errorType:e.errorTypeCode||e.errorType,code:e.errorCode,url:e.url||"",status:e.status,headers:e.headers||{}},0)})),t$(this,"onLog",(function(e){mie("onLog",e);var t=e.type;if(delete e.type,t)switch(t){case ore:break;case lre:i._templog||(i._templog={}),i._templog=xie(i._templog,e.data,e.action),i._templog.preload_hit&&(i._cacheFile=ure);break;case are:var n=i.errorLog;n.accu_errc++,n.try_err_c++,i.setBr("mp4error"),n.last_errors.push(e.code),i.onOneError(e,0);break;case sre:var r,o=function(e,t){var n,i={ext:e.ext||{},data:{}};return W_(n=kT(e)).call(n,(function(n){t[n]?i.data[t[n]]=e[n]:"ext"!==n&&(i.ext[n]=e[n])})),i}(e,{costTime:"costTime",vid:"vid",end_type:"end_type",pos:"cur_play_pos",cdnUrl:"cdn_url"});if(o.ext)W_(r=["start","end"]).call(r,(function(e){o.ext[e]&&(o.ext["ext_".concat(e)]=o.ext[e],delete o.ext[e])}));i.onOneEvent(o.data,o.ext,2)}})),t$(this,"onPlay",(function(){var e;mie("onPlay",y_(e="this.startStep :".concat(i.startStep," this.isEnded:")).call(e,i.isEnded)),i.isEnded&&(i.resetLoggerParams(),i.setPt())})),t$(this,"onPause",(function(){mie("onPause");var e=i.pauseLog;e.isPausing=!0,e.pause_start=_ie()})),t$(this,"onWaiting",(function(){var e,t,n=i._options;i.updateCurBuffer("onWaiting"),n.checkByInnerLog||(mie("onWaiting>",y_(e=y_(t="isSeeking:".concat(i.isSeeking," startStep:")).call(t,i.startStep," intervalId:")).call(e,i.stallIntervalId)),i.wait_buf_include=i.checkInBuffer(i.player.currentTime,-1e3)?1:0,i.isSeeking||0===i.playlogs.vt||i.inWaitingStart>0||(i.stallIntervalId&&(window.clearTimeout(i.stallIntervalId),i.stallIntervalId=null),i.inWaitingStart=_ie(),i.waitStartTime=i.cur_play_pos,i.stallIntervalId=window.setTimeout((function(){var e,t,n=i.stall;mie(y_(e="this.stallIntervalId>>".concat(i.stallIntervalId," cost: ")).call(e,_ie()-i.inWaitingStart)),i._endType="wait",i.load_state=$ie,qP(t=i.vtype).call(t,"MP4")>-1&&i.player.currentTime>10&&i.task&&(i.triggerTask("waiting",i.initial_url),i.requestCount++),n.start=i.waitStartTime,n.bc++,1===n.bc&&(n.startf=i.waitStartTime),window.clearTimeout(i.stallIntervalId),i.stallIntervalId=null,i.startWaitingStatus(i.inWaitingStart,_ie()-i.inWaitingStart),i.stallIntervalId=setTimeout((function(){i.inWaitingStart>0&&i.suspendWaitingStatus("timeout")}),6e4)}),200)))})),t$(this,"onEnded",(function(){var e,t;if(i.initial_url){mie("onEnded",y_(e=y_(t="watchDur:".concat(i.watchDur," vt:")).call(t,i.vt," pt:")).call(e,i.pt)),i.isEnded=!0;var n=i.resLogs.df,r=i._progressInfo;r.calculatePlaySize(),r.cachedSize<1?i.changeResolution({from:n,to:n,startTime:_ie(),operaType:"leave_switch",endType:"ended"}):i.sendSwitchOpera(ere),i.onOnePlay(ere),i.sendDegradeLog("playCatch_end",i.playlogs.degrade),i.onOneTemp(ere),i.sendEventsQueue(),i.playlogs.lc++}})),t$(this,"onUnload",(function(){0!==i.startStep&&i.initial_url&&(i.onOneTemp(tre),i.sendDegradeLog("playCatch_end",i.playlogs.degrade),i._reportInvalidVV(tre)||(i.sendSwitchOpera(tre),i.onOnePlay(tre,!0)))})),t$(this,"onVisibilitychange",(function(){var e=i.playlogs.vt;"visible"===document.visibilityState&&(e||i.setPt())})),t$(this,"onDestroy",(function(){var e,t;mie(y_(e=y_(t="onDestroy:this.startStep:".concat(i.startStep," initial_url:")).call(t,i.initial_url," ")).call(e,!!i.initial_url)),i.onOnePlay(nre),i.startStep>0&&i.initial_url&&(i.onOneTemp(nre),i.sendDegradeLog("playCatch_end",i.playlogs.degrade));var n=i.resLogs.df;i._progressInfo.cachedSize<1?i.changeResolution({from:n,to:n,startTime:_ie(),operaType:"leave_switch",endType:"destroy"}):i.sendSwitchOpera(ere),i.sendEventsQueue(),ese.isPC?window.removeEventListener("beforeunload",i.onUnload):(ese.isMobile||ese.isPad)&&window.removeEventListener("pagehide",i.onUnload),document.removeEventListener("visibilitychange",i.onVisibilitychange),i.listeners.forEach((function(e){i.player.off(e.evt,e.handler)})),i.clearTimers(),i.player.off("destroy",i.onDestroy),i.task&&i.task.clear()})),t$(this,"onOnePlay",(function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(mie(y_(e=y_(t="onOnePlay _isOnePlayReport:".concat(i._isOnePlayReport," isLeave: ")).call(t,r," endState:")).call(e,n)),!i._isOnePlayReport){var o=i.errorLog,a=i.playlogs,s=i.abrInfo,l=i.resLogs,c=i.player,u=i.apiLog,h=i.pauseLog,d=i.stall,f=i.netLog,p=i.watchDur;i._isOnePlayReport=!0;var v=bie();i.getBufferTime(c);var g=i.getFrameInfo(),y=i.getPerformance(),m=o.errc,_=i._progressInfo,b=_.playedSize,k=_.cachedSize,E=_.pcdnCached,w=_.cachedVideoSize,S=_.pcdnVideoCached,T=i._progressInfo.getFileSize(c.duration),C=i.seekLog,x=C.sc,D=C.sat,I={bc:Oie(p,i.bc),bu_acu_t:Oie(p,i.bu_acu_t),sc:Oie(p,x),sat:Oie(p,D)};i.setExt();var R=i._getCompatibilityInfo();i.setNovv(null,n);var L=$X($X($X($X({local_time:(new Date).getTime(),log_type:"video_playq",plugin_exception:0,player_create_exception:"",v:i.vid,initial_url:i.initial_url,initial_host:i.initial_host,initial_ip:i.curHeaders.x_response_sinfo||0,initial_type:i.initial_type},i.curHeaders),{},{initial_resolution:l.initial_resolution,final_resolution:l.final_resolution,pt:i.pt,prepare_start_time:a.nt,prepare_end_time:a.rt||bie(),vt:i.vt,lt:i.lt,lpt:i.lpt,fvt:i.fvt,nvt:i.nvt,bft:i.bft,sc:x,sat:D,bc:i.bc,dbc:a.dbc||0,nbc:a.nbc||0,video_net_s:i.videoNetworkState,status:i.curStatus,first_buf_startt:d.startf,first_buf_endt:d.endf,lc:a.lc,bu_acu_t:i.bu_acu_t,de_bu_acu_t:a.de_bu_acu_t||0,n_bu_acu_t:a.n_bu_acu_t||0,pause_acu_t:h.pause_acu_t,cur_play_pos:i.cur_play_pos,load_state:i.load_state,play_speed:i.playbackRate,playback_state:i.playback_state,end_state:n,watch_dur:p,switch_resolution_c:i.switchResolutionCount,is_start_play_automatically:i.isAutoplay,start_time:i.start_time,finish:i.finish,errt:o.errt,errc:m,vsc:u.vsc,vsc_message:o.message||u.vsc_message,api_str:u.api_str,auth:u.auth||u.logid,width:i.videoWidth,height:i.videoHeight,vd:i.vd,video_length:T.video,audio_length:T.audio,df:i.resolution,lf:l.lf,play_c:0,player_created_t:i.player_created_t,fir_errt:o.fir_errt,fir_errc:o.fir_errc,lv_method:0,ldst:l.ldst,ldet:l.ldet,is_disable_short_seek:0,mute:i.mute,volume:i.volume,download_speed:i.realSpeed?i.realSpeed:i.task&&i.task.speed?i.task.speed:f.downloadSpeed,avg_speed:i.avgSpeed?i.avgSpeed:f.rqCount>0?parseInt(f.totalSpeed/f.rqCount,10):0,bitrate:i.curBitrate,preload_state:i.preloadState,preload_hit:i.preLoadData.hit||0,preload_cached:i.preLoadData.duration||i.preLoadData.byteLength||0,mdl_req_num:f.requestCount,watingcost:i.watingCost,br:a.br,fbrt:a.fbrt,try_err_c:o.try_err_c,accu_errc:o.accu_errc,merror:Rie(i.merror),ex:Rie(i.exInfo),perf:Rie(y),bufs:Rie(i.buffers.allBuffer),vds:k,pvds:E,vps:b,vvds:w,pvvds:S,pcdn:Rie(i.getPCDNStat())},i.buffers.curBuffer),{},{degrade:a.degrade,cache_file:i._cacheFile},g),{},{fullScreen:i._getFullScreenType(),encryptedInfo:Rie(i.encryptedInfo),per100_info:Rie(I)},R);0!==i.vt&&(L.et=v);var P=i._logstrcache||i._getLogCache();0===L.fvt&&P&&(L.log=P,i._logstrcache=null),null!=c&&c.softDecoder&&(L.soft_decoder=c.softDecoder),c&&c.dashState&&(L.dash_state=c.dashState),null!=c&&c.softDecoder&&(L.soft_decoder=c.softDecoder),s.abr_init_opts=c.config.autoBitrateOpts||{},L.abr_info=Rie(i.abrInfo);var A=R.is_support_mp4&&R.is_support_mse_mp4;if(R.is_spider||ese.isPC&&!A&&0===i.fvt)mie("is_spider",R.is_spider,"is_support_mp4",R.is_support_mp4);else if(r){var O=!i._options.disableLocalCache;i.reportLog(Nie,L,O?1:0)}else i.reportLog(Nie,L)}})),t$(this,"onOneEvent",(function(e){var t=e.costTime,n=e.vid,r=e.end_type,o=e.cur_play_pos,a=e.cdn_url,s=e.cdn_host,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=arguments.length>2?arguments[2]:void 0;mie("onOneEvent",r);var u=i.buffers,h=u.curBuffer,d=u.allBuffer,f=i.getFrameInfo(),p=$X($X({local_time:(new Date).getTime(),v:n||i.vid,cost_time:t,end_type:r||i.end_type,cdn_url:a||i.url,cdn_host:s||"",initial_type:i.initial_type,resolution:i.resolution,play_speed:i.playbackRate,first_frame_interval:_ie()-i.pt,last_switch_interval:i.getLastInterval("lastSwitchStartTime",i.resLogs,!1),last_seek_interval:i.updateSeekPt(!1),last_event_interval:i.getLastInterval("lastEventTime"),cur_play_pos:o||i.cur_play_pos,video_ready_s:i.videoReadyState,video_seeking:i.videoSeeking,video_paused:i.videoPaused,bufs:Rie(d),retry_count:i._retryCount,at:qX(i.playlogs),bc:i.stall.bc,stay_seconds:parseInt(((new Date).getTime()-qX(i.playlogs))/1e3,10),preload_state:i.preloadState,preload_hit:i.preLoadData.hit,preload_cached:i.preLoadData.duration||i.preLoadData.byteLength},h),f);qP(r).call(r,"waitend")>=0&&t>3e3&&(p.log=i._getLogCache());var v=i.player,g=v.currentTime,y=v.duration-g;if(qP(r).call(r,"waitstart")>=0&&y<=1){var m=p.local_time,_=p.v,b=p.cost_time,k=p.cdn_url,E=p.first_frame_interval,w=p.cur_play_pos,S=p.video_ready_s,T=p.video_seeking,C=p.video_paused,x=p.bufs,D=p.bc,I=p.preload_hit;i.reportLog(Bie,$X({end_type:"longwait",local_time:m,v:_,cost_time:b,cdn_url:k,first_frame_interval:E,cur_play_pos:w,video_ready_s:S,video_seeking:T,video_paused:C,bufs:x,bc:D,preload_hit:I},h),c)}if("waitstart"===r&&"function"==typeof i._options.getPageFPS){var R=i._options.getPageFPS();p.cur_fps=R.curFPS||0,p.avg_fps=R.avgFPS||0}qP(r).call(r,"wait")>-1&&(p.buf_include=i.wait_buf_include),qP(r).call(r,"timeout")>-1&&p.cost_time>dre&&(p.cost_time=dre);var L=i.player;L&&L.dashState&&(p.dash_state=i.player.dashState),kT(l).forEach((function(e){p[e]=l[e]})),p.ex=Rie(i.getPlayerExt()),i.addIfExist("drm_type",i._options,p),i.reportLog(Bie,p,c)})),t$(this,"onOneTemp",(function(){if(mie("onOneTemp>>",!i._templog),i._templog){var e=i.player,t=i.playlogs,n=i.pauseLog,r=i.errorLog,o=i.resLogs,a=i.watchDur,s=$X($X($X({local_time:(new Date).getTime()},i._templog),{},{v:i.vid,initial_type:i.initial_type,pt:i.pt,vt:i.vt,lt:i.lt,fvt:i.fvt,bc:i.bc,bu_acu_t:i.bu_acu_t>hre?0:i.bu_acu_t,pause_acu_t:n.pause_acu_t,cur_play_pos:i.cur_play_pos,watch_dur:a>hre?0:a,finish:i.finish,errt:r.errt,errc:r.errc,vd:i.vd,df:i.resolution,lf:o.lf,br:t.br,fbrt:t.fbrt,try_err_c:r.try_err_c,accu_errc:r.accu_errc,dash_break:2===e.dashBufferBreak?1:0,bufs:Rie(i.buffers.allBuffer),vs:o.vs,vds:o.vds,vps:o.vps},i.buffers.curBuffer),{},{degrade:t.degrade});0!==i.vt&&(s.et=bie()),["drm_type","dynamic_type"].forEach((function(e){i.addIfExist(e,i._options,s)})),i.reportLog(Fie,s,0),i._templog=null}})),this.player=t,void 0===this.player||null===this.player)throw new Error("player is ".concat(this.player));if(n&&n.line_app_id){n.isTask&&(this.task=new ose),this.eventQueue=[],this._instanceCreateTime=(new Date).getTime(),n.codec_type=n.codec_type||"h264",this._envInfo=n.envInfo||{},this._options=n,!this._options.maxQueueCount&&(this._options.maxQueueCount=5),this.line_app_id=parseInt(n.line_app_id,10)||0,this.line_user_id=(n.line_user_id||"").toString(),this.playerCoreVersion=t.version,this.playerVersion=n.playerVersion,this.closeSeekLog=n.closeSeekLog||!1,this.start_time=1e3*(n.start_time||0),this._initial_resolution="",this.__vtype=null,this.__dt="",this._progressInfo=new sse,this.resetLoggerParams();try{this.initializeTracker(),this.sendLocalLog(),this.bindEvt(),mie("logger constructor:".concat(this.player.video))}catch(cK){console.error(cK)}}else console.warn("player.config.vodLogOpts.line_app_id is necessary for plugin xgVodLogger")}return e$(e,[{key:"resetLoggerParams",value:function(){mie("resetLoggerParams");var e=this.playlogs?this.playlogs.lc:0;this.playlogs={nt:bie(),vt:0,rt:this.isEnded?bie():0,at:0,pt:0,bu_acu_t:0,bc:0,br:0,fbrt:"",dbc:0,de_bu_acu_t:0,nbc:0,n_bu_acu_t:0,played:[{begin:0,end:-1}],degrade:"none",lc:e},this.degradeLog={bu_acu_t:0,bc:0,watch_dur:0,hasSendEnd:!1},this.buffers={allBuffer:[],curBuffer:{buf_diff:0,buf_s_pos:0,buf_e_pos:0,buf_include:0}},this.netLog={downloadSpeed:0,requestCount:0,connectCost:0,totalSpeed:0,rqCount:0,status:0},this.merror={cdn:[],player:[],playCatch:[],expied:[]},this.exInfo={stall:[]},this._templog=null,this._isOnePlayReport=!1,this.startStep=0,this.bft=0,this._progressInfo.reset(),this._novv={log_pt:bie()},this.initializeLogDatas(),this.initializeUrlLog()}},{key:"setNovv",value:function(e,t){!this._novv||this.fvt>0||(e&&(this._novv.errc=e.code,this._novv.errt=e.errorType,this._novv.errorMessage=e.message),this._novv.end_state=t,this._novv.novv_pt||(this._novv.novv_pt=bie(),this._novv.novv_lpt=bie()-this._novv.log_pt),this.player&&(this._novv.vtype=this.player.vtype,this.player.novv=this._novv))}},{key:"initializeLogDatas",value:function(){this.startStep=0,this.inWaitingStart=0,this.waitStartTime=0,this.lastVideoTime=0,this._endType="",this._retryCount=0,this.lastOperaTime=-1,this.lastEventTime=-1,this.stallIntervalId=null,this.seekLog={intervalId:0,lastSeekStartTime:_ie(),seekBefore:0,sat:0,sc:0,buf_include:0},this.resLogs={lastSwitchStartTime:-1,switch_count:0,abr_switch_count:0,initial_resolution:"",final_resolution:"",ldst:0,ldet:0,df:"",lf:"",played:[],bc:0,bu_acu_t:0,sc:0,sat:0,buf:0,lbuf:0,lplayed:0,vs:0,vds:0,vps:0,vis:0,bitrate:0},this.apiLog={code:0,message:"",logid:"",api:"",auth:"",error:{}},this.errorLog={accu_errc:0,try_err_c:0,errt:0,errc:0,fir_errt:0,fir_errc:ese.isSupportMP4?0:1005,last_errors:[],message:""},this.pauseLog={pause_acu_t:0,isPausing:!1,pause_start:0},this.stall={sc:0,startf:0,endf:0,start:0,end:0,cost:0,acc:0},this._playerCreatedTime=0,this.load_state=qie,this.lv_method=6,this.isSeeking=!1,this.isEnded=!1,this.startStep=0,this.isAutoplay=this.player.config&&this.player.config.autoplay?1:0,this.abrInfo={abr_general_info:{},abr_event_info:{video_switch:[],video_stall:[],video_exit:{}},abr_play_info:{start_play_time_ms:0,is_hint:0,playback_info:{internet_speed_record:[],play_bitrate_record:[],buffer_length_record:[],play_speed_record:[]}},abr_user_info:{cancel_abr:0},abr_init_opts:this.player.config.autoBitrateOpts||{}},this._cacheFile=cre}},{key:"initSessionId",value:function(){var e="0";try{e=window.localStorage.getItem(pse).web_id||"0"}catch(tSe){e="0"}this._sessionId=function(e){var t=(new Date).getTime();try{e=parseInt(e)}catch(cK){e=0}return t+=e,window.performance&&"function"==typeof window.performance.now&&(t+=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)}))}(e),mie("sessionId ".concat(this._sessionId))}},{key:"initializeTracker",value:function(){var e=this,t=this._options;if(window.__xgplayer_vod_log__)this.tracker=window.__xgplayer_vod_log__;else{this.tracker=window.__xgplayer_vod_log__=new gse("tracker");var n=t.channel||"cn",i={app_id:"cn"===(n="va"===n||"sg"===n?n:"cn")?fse:1300===fse?323254:fse,channel:n,log:!1,disable_sdk_monitor:!0,disable_heartbeat:!0};t.channelDomain&&(i.channel_domain=t.channelDomain),i.enable_ab_test=!!t.enableAbTest,this.tracker.init(i)}this.initSessionId();var r=navigator?navigator.hardwareConcurrency:0,o=navigator?navigator.deviceMemory:0;this.commonParams={play_type:0,source_type:"vid",sdk_version:lse,pc:this.playerCoreVersion,pv:this.playerVersion,line_app_id:this.line_app_id,line_user_id:this.line_user_id,app_version:t.appVersion||"",platform:ese.isPad?"pad":ese.isMobile?"mobile":"pc",cpu_core:Number(r)||0,memory_size:Number(o)||0,support:ise(),webdriver:navigator&&navigator.webdriver?1:0,player_sessionid:this.sessionId,web_url:window.location.href,user_agent:navigator.userAgent};var a=t.trackerConfig||{};mie("commonParams ",this.commonParams,a);var s,l=$X({evtParams:this.commonParams,disable_auto_pv:!0},a);(!ese.name||ese.isChrome||ese.isSafari||(l.browser=ese.name,ese.appVersion&&(l.browser_version=ese.appVersion)),this.line_user_id&&(l.user_unique_id=this.line_user_id,!t.enableTeaWebId&&(l.web_id=this.line_user_id)),t.referrer&&(l.referrer=t.referrer,l.referrer_host=gie(t.referrer)),t.ext)&&W_(s=kT(t.ext)).call(s,(function(n){e.exInfo[n]=t.ext[n]}));mie("trackConfig",l),this.tracker.config(l),this.tracker.start()}},{key:"resetDefiInfo",value:function(){var e=this.resLogs;e.played=[],e.bc=0,e.bu_acu_t=0,e.sc=0,e.sat=0}},{key:"sendLocalLog",value:function(){var e=this,t=yre.get();yre.remove(),W_(t).call(t,(function(t){var n;W_(n=kT(t)).call(n,(function(n){if(mie("sendLocalLog",n,t[n]),e.player){e.player.emit("abLog",n,t[n]);var i=e._options.sendLocalCallback;i&&"function"==typeof i&&i(n,t[n])}e._track(n,t[n])}))}))}},{key:"_track",value:function(e,t){"function"==typeof this.tracker?this.tracker(e,t):this._options.enableBeacon&&e===Nie?this.tracker.beaconEvent(e,t):this.tracker.event(e,t)}},{key:"bindEvt",value:function(){var e=this;this.listeners=[{evt:"play",handler:this.onPlay},{evt:"playing",handler:this.onPlaying},{evt:"pause",handler:this.onPause},{evt:"waiting",handler:this.onWaiting},{evt:"playInterfaceInfo",handler:this.onPlayInterfaceInfo},{evt:"ended",handler:this.onEnded},{evt:"loadeddata",handler:this.onLoadeddata},{evt:"loadstart",handler:this.onLoadStart},{evt:"canplay",handler:this.onCanplay},{evt:"progress",handler:this.onVideoProgress},{evt:"autoplay_was_prevented",handler:this.onNotAutoPlay},{evt:"seeking",handler:this.onSeeking},{evt:"seeked",handler:this.onSeeked},{evt:"complete",handler:this.onPlayerInited},{evt:"timeupdate",handler:this.onTimeUpdate},{evt:"bufferedChange",handler:this.onBufferedChange},{evt:"beforeDefinitionChange",handler:this.onBeforeDefinitionChange},{evt:"definitionChange",handler:this.onDefinitionChange},{evt:"definitionChangeSuccess",handler:this.onDefiChangeSuccess},{evt:"replayBtnClick",handler:this.onReplayBtnClick},{evt:"initialUrl",handler:this.initializeUrlLog},{evt:"ABR_CHANGE",handler:this.onAbrChange},{evt:"playCatch",handler:this.onPlayCatch},{evt:"log",handler:this.onLog},{evt:"progress_event",handler:this.onProgressEvent},{evt:"logger_next",handler:this.onNext},{evt:"playnext",handler:this.onNext},{evt:"nextEnded",handler:this.onNextEnded},{evt:"media_format_error",handler:this.onMediaFormatError},{evt:"xglog",handler:this.onXgLogWaiting},{evt:"xglog_cache",handler:this.onXgLogCache},{evt:"degrade",handler:this.onDegrade},{evt:"definitionChangeDetail",handler:this.onDefinitionChangeDetail},{evt:"prf_data_size",handler:this.onPrfDataSize}];var t=this.player.config.errorKey;mie(">>>errorKey",t);var n={evt:"error",handler:this.onPlayerError};t&&(n.evt=t),this.listeners.push(n),this.listeners.forEach((function(t){e.player.on(t.evt,t.handler)})),this.bindUnload()}},{key:"_getLogCache",value:function(){var e,t;return(null===(e=this.player)||void 0===e?void 0:e.logCache)||(null===(t=this.player)||void 0===t?void 0:t.getLogCache)}},{key:"addIfExist",value:function(e,t,n){if(dse(t)){var i=t[e];!(null==i)&&(n[e]=i)}}},{key:"sendSwitchOpera",value:function(e){var t=this._progressInfo,n=t.lastBitrate,i=t.curBitrate,r=t.nextBitrate,o={costTime:0,operaType:"detail_switch",stateBefore:"",stateAfter:"",endType:e},a=null;if("changedetail"===e){if(!n)return;a=n,o.stateBefore=n.definition,o.stateAfter=r.definition}else a=i,o.stateBefore=i.definition,o.stateAfter="";var s={vds:a.cdnSize,pvds:a.pcdnSize,fileid:a.fileid};this.onOneOperator(o,s)}},{key:"changeResolution",value:function(e){var t=e.from,n=e.to,i=e.startTime,r=e.operaType,o=e.abrInfo,a=e.endType,s=void 0===a?"":a,l=this.resLogs;t=Iie(t),n=Iie(n),l.ldet=_ie(),l.df=n,l.lf=t,l.final_resolution=n,l.switch_count++;var c=l.ldet-i,u={bc:l.bc,bu_acu_t:l.bu_acu_t,sc:l.sc,sat:l.sat,watch_dur:vie(l.played)};o&&(u.abrInfo=o),this.updateVds(),this.resetDefiInfo(),this._options.closeResolutionLog||this.onOneOperator({costTime:c,operaType:r,endType:s,stateBefore:t,stateAfter:n},u,0)}},{key:"getLastInterval",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=t[e],r=_ie(),o=-1===i?-1:r-i;return n&&(t[e]=r),o}},{key:"updateSeekPt",value:function(e){return this.getLastInterval("lastSeekStartTime",this.seekLog,e)}},{key:"_reportInvalidVV",value:function(e){return!!this._isInvaidVV()&&(this.onOneError({endState:e,errorType:9998,code:-1,url:this.player.currentSrc,headers:{}},0),this._isOnePlayReport=!0,!0)}},{key:"_isInvaidVV",value:function(){return 0===this.vt&&-1===this.curStatus}},{key:"bindUnload",value:function(){ese.isPC?window.addEventListener("beforeunload",this.onUnload):(ese.isMobile||ese.isPad)&&window.addEventListener("pagehide",this.onUnload),document.addEventListener("visibilitychange",this.onVisibilitychange),this.player.once("destroy",this.onDestroy)}},{key:"clearTimers",value:function(){var e=this.seekLog;e.intervalId&&window.clearTimeout(e.intervalId),this.stallIntervalId&&window.clearTimeout(this.stallIntervalId)}},{key:"sendDegradeLog",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"playCatch",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};mie("sendDegradeLog",e,t,n);var i=this.degradeLog;if(!(i.hasSendEnd||"playCatch_end"===e&&"none"===t)){"playCatch_end"===e&&(i.hasSendEnd=!0);var r=this.bu_acu_t-i.bu_acu_t;this.onOneEvent({costTime:this.vd,vid:this.vid,end_type:e,cur_play_pos:this.player.currentTime,cdn_url:n.url},$X({degrade:t,vt:this.vt,pt:this.pt,fvt:this.fvt,bc:this.bc-i.bc,bu_acu_t:r>hre?0:r,watch_dur:this.watchDur-i.watch_dur},n),0)}}},{key:"_getFullScreenType",value:function(){return this.player.isFullscreen?pre.FULLSCREEN_TYPE:this.player.isCssfullScreen?pre.CSS:pre.NO_FULLSCREEN}},{key:"getBufferTime",value:function(e){var t=0,n=0,i=e.video&&e.video.buffered;if(i){for(var r=i.length,o=0,a=0;a<r;a++)o+=i.end(a)-i.start(a);t=n=1e3*o}return{video:t,audio:n}}},{key:"updateAbrInfo",value:function(e,t,n){e.abr_general_info=t.generalInfo,e.abr_event_info.video_exit={local_time_ms:(new Date).getTime(),buffer_length:t.bufferLength,internet_speed:t.downloadSpeed,now_bitrate:t.nowBitrate,play_speed:n},t.getAbrPlayInfo&&(e.abr_play_info=t.getAbrPlayInfo())}},{key:"getPerformance",value:function(){return this.player.performance||{}}},{key:"setExt",value:function(){var e,t=this,n=this.player.ext||{};n.performance&&delete n.performance,W_(e=kT(n)).call(e,(function(e){"performance"!==e&&(t.exInfo[e]=n[e])}))}},{key:"onOneOperator",value:function(e){var t=e.costTime,n=e.operaType,i=e.stateBefore,r=e.stateAfter,o=e.endType,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,l=this.getLastInterval("lastOperaTime"),c={local_time:(new Date).getTime(),v:this.vid,opera_type:n,state_before:i,state_after:r,cost_time:t,end_type:o||this.end_type,cdn_url:this.url,resolution:this.resolution,last_interval:l,bufs:Rie(this.buffers.allBuffer),cur_play_pos:this.cur_play_pos,retry_count:this._retryCount};"seek"===n&&(c.buf_include=this.seekLog.buf_include,this.seekLog.buf_include=0);var u=this.player;u&&u.dashState&&(c.dash_state=this.player.dashState),kT(a).forEach((function(e){c[e]=a[e]})),this.addIfExist("drm_type",this._options,c),this.reportLog(zie,c,s)}},{key:"onOneError",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{errorType:0,code:0,url:"",headers:{},costTime:0,vid:"",message:"",preload_hit:0,preload_cached:0,interval_time:0},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];mie("onOneError",t);var r=this.errorLog,o=this.apiLog,a=this.resLogs,s=this.player,l=this.playlogs,c=Tie(t.headers||{}),u=this.getPerformance(),h=t.code>0?0-t.code:t.code;this.setExt();var d=this._getCompatibilityInfo();this.setNovv(t,t.endState||Qie);var f=$X($X($X({v:t.vid||this.vid,video_pos:this.cur_play_pos,local_time:(new Date).getTime(),cost_time:t&&t.costTime?t.costTime:0,errt:t.errorType,errc:h,es:this.es,cdn_url:t.url||this.url,bufs:Rie(this.buffers.allBuffer),resolution:a.final_resolution,last_errors:r.last_errors.join(";"),vsc:o.vsc,vsc_message:t.message||o.vsc_message,server_ip:c.x_response_sinfo||0,initial_url:this.initial_url,initial_host:this.initial_host},c),{},{cur_play_pos:this.cur_play_pos},this.buffers.curBuffer),{},{degrade:l.degrade,end_state:t.endState||Qie,preload_hit:t.preload_hit||0,preload_cached:t.preload_cached||0,ex:Rie(this.exInfo),pref:Rie(u),video_ready_s:this.videoReadyState,interval_time:t.interval_time||0},d);s&&s.dashState&&(f.dash_state=s.dashState);var p=this.player.currentSrc,v=wie(p)?wie(t.url)?this.initial_url:t.url:p,g={connectTime:0,status:0,statusText:"",isexpired:0,isBlob:wie(p)?1:0};if(i&&"String"===Cie(v)){var y={};kie(v,{range:"0-8",timeout:2e3}).then((function(e){mie("getXhr>>check result ",e);var t=Tie(e.headers||{});f.server_ip=t.x_response_sinfo,y=$X($X({},g),{},{statusText:e.statusText||"",status:e.status||0,connectTime:0|e.connectTime,sinfo:t.x_response_sinfo||"",cinfo:t.x_response_cinfo||""})})).catch((function(e){y=$X($X({},g),{},{statusText:-2===e.status?"timeout":"error",status:e.status})})).finally((function(){var t=function(e){if(!e||"String"!==Cie(e))return 0;var t=0;try{var n=new RegExp("(\\?|&)x-tos-expires=([^&]*)(&|$)"),i=e.match(n);if(null!==i)t=parseInt(i[2],10);else{var r=e.split("/");r.length>5&&8===r[4].length&&(t=parseInt(r[4],16))}return t>0?t<parseInt((new Date).getTime()/1e3,10)?Pie:Aie:Lie}catch(cK){return Lie}}(v);y.isexpired=t,f.net=Rie(y),e.reportLog(Uie,f,n)}))}else f.net=Rie(g),this.reportLog(Uie,f,n)}},{key:"_getCompatibilityInfo",value:function(){var e=function(){if("undefined"==typeof MediaSource||!MediaSource.isTypeSupported)return{support:!1,message:"MediaSource API not support"};for(var e=!1,t="",n=0;n<Zae.length;n++){var i,r='video/mp4; codecs="'.concat(Zae[n],'"'),o=MediaSource.isTypeSupported(r);t+=y_(i="".concat(r," is ")).call(i,o," "),o&&(e=!0)}return{support:e,message:t}}();return{is_spider:ese.isSpider?1:0,is_support_mp4:ese.isSupportMP4?1:0,is_support_hevc:tse()?1:0,is_support_mse_mp4:e.support?1:0,support_mse_mp4:e.message}}},{key:"reportLog",value:function(t,n,i){var r=this,o=this._options,a=this.player.ABTestTag,s=this.commonParams;n.dynamic_type=this.dynamicType;var l="Array"===Cie(o.absdkVersion)?o.absdkVersion.join(","):o.absdkVersion;n.absdkVersion=l||e.AB_SDK_VERSION,null!=a&&(n.abtest_tag=a);var c=this._options;n.codec_type=this.codecType,dse(c)&&(fre.forEach((function(e){r.addIfExist(e,c,n)})),kT(s).forEach((function(e){r.addIfExist(e,s,n)})),n.vtype=this.vtype),n.env_info=Rie(this._envInfo||{}),n.support=ise(),n.visible="undefined"==typeof document?0:"visible"===document.visibilityState?1:0;var u=function(){if(1===i){var e={};return e[t]=n,void yre.set(e)}2!==i?(r.player&&r.player.emit("abLog",t,n),r._track(t,n)):r.addEventsQueue(t,n)};if("function"==typeof o.onReportLog){var h=o.onReportLog(t,n);null!=h&&h.then?h.finally((function(){return u()})):u()}else u()}},{key:"addEventsQueue",value:function(e,t){this.eventQueue.push({event:e,params:t}),this.eventQueue.length>=this._options.maxQueueCount&&this.sendEventsQueue()}},{key:"sendEventsQueue",value:function(){for(;this.eventQueue.length>0;){var e=this.eventQueue.pop();this._track(e.event,e.params)}}},{key:"startWaitingStatus",value:function(e,t){this.appendStallInfo("start",e),this.updateCurBuffer("startWaitingStatus"),this.onOneEvent({costTime:t,end_type:"waitstart"},{},2)}},{key:"triggerTask",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"start",n=arguments.length>1?arguments[1]:void 0;mie("triggerTask>>",t),!Eie(n=n||this.player.src)&&qP(e=this.vtype).call(e,"MP4")>-1&&this.task&&this.task.trigger(n,t)}},{key:"appendStallInfo",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"start",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;this.exInfo.stall||(this.exInfo.stall=[]);var i=this.exInfo.stall;if("start"===e){i.length>6&&bT(i).call(i,0,i.length-6);var r=this.buffers.curBuffer;i.push({start:t,end:-1,endType:"waitstart",cost:0,cur:this.cur_play_pos,buf_s:r.buf_s_pos,buf_e:r.buf_e_pos,buf_i:r.buf_include})}else if("end"===e){var o=i.length-1;if(o<0)return;i[o].end<0&&(i[o].end=t,i[o].endType=n,i[o].cost=t-i[o].start)}mie("appendStallInfo",i)}},{key:"suspendWaitingStatus",value:function(e){var t,n,i=_ie(),r=this.playlogs,o=this.resLogs,a=this.stall,s=this.inWaitingStart;if(!(s<=0||this.isSeeking||r.vt<=0)){if(mie(y_(t=y_(n="suspendWaitingStatus>>".concat(e,"|costTime:")).call(n,i-s," isSeeking:")).call(t,this.isSeeking)),this.appendStallInfo("end",i,e),i-s>200){var l=i-this.inWaitingStart;if(r.bc++,this.checkInBuffer(this.player.currentTime)?(r.de_bu_acu_t+=l,r.dbc++):(r.nbc++,r.n_bu_acu_t+=l),o.bc++,r.bu_acu_t+=l,o.bu_acu_t+=l,a.end=this.cur_play_pos,a.cost=l,a.acc+=a.cost,1===a.sc&&(a.endf=this.cur_play_pos),this.player.abrInstance&&!this.isSeeking&&this.playlogs.vt){var c=this.player.abrInstance;this.abrInfo.abr_event_info.video_stall.push({local_time_ms:(new Date).getTime(),stall_duration:parseFloat((l/1e3).toFixed(2)),buffer_length:c.bufferLength,internet_speed:c.downloadSpeed,now_bitrate:c.nowBitrate,play_speed:this.player.playbackRate,is_abr:c.isCurrentInAbr?1:0})}this.onOneEvent({costTime:l,end_type:"waitend_".concat(e)||"waitend"},{},2)}this._endType="",this.load_state=Xie,this.inWaitingStart=0,this.waitStartTime=0,window.clearTimeout(this.stallIntervalId),this.stallIntervalId=null}}},{key:"suspendSeekStatus",value:function(e){var t,n,i,r,o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.isSeeking){var a=this.seekLog,s=this.resLogs,l=this.player,c=_ie()-a.lastSeekStartTime;mie("suspendSeekStatus>>",y_(t=y_(n=y_(i=y_(r="".concat(e," currentTime:")).call(r,l.currentTime," costTime:")).call(i,c," sat:")).call(n,a.sat," resLogs.sat:")).call(t,s.sat)),a.intervalId&&window.clearTimeout(a.intervalId),a.intervalId=null,this.isSeeking=!1;var u=this._endType="seek",h=a.seekBefore,d=(l.currentTime||0).toString();a.sc++,a.sat+=c>dre?0:c,s.sc++,s.sat+=c>dre?0:c,c>dre&&(c=dre),this.updateSeekPt(!0),!this.closeSeekLog&&o&&this.onOneOperator({costTime:c,operaType:u,stateBefore:h,stateAfter:d,endType:e})}}},{key:"setPt",value:function(){var e,t=this.playlogs;(this.startStep=1,!t.pt&&this.player.currentTime&&(this.isSeeking=!0),t.pt)||(t.pt=bie(),mie("setPt",y_(e="init pt :".concat(t.pt,", document.visibilityState:")).call(e,document.visibilityState)))}},{key:"setVt",value:function(){var e=this.playlogs;if(1===this.startStep){var t;if(!e.vt)e.vt=bie(),mie("setVt: first frame inited",y_(t="vt-pt:".concat(e.vt-e.pt," vt-nt:")).call(t,e.vt-e.nt));this.startStep=2}}},{key:"setBr",value:function(e){var t=this.playlogs;t.vt>0&&(0===t.br&&(t.fbrt=e||""),t.br++)}},{key:"codecType",get:function(){var e=this.player;return e&&e.config&&e.config.codecType?e.config.codecType:this._options.codec_type||"h264"}},{key:"url",get:function(){var e=this.player;return e&&e.config?e.config.url:""}},{key:"vid",get:function(){var e=this.player;return e&&e.config?e.config.vid:""}},{key:"bc",get:function(){return this.playlogs.bc}},{key:"bu_acu_t",get:function(){var e=this.playlogs.bu_acu_t;return e>hre?0:e}},{key:"pt",get:function(){return this.playlogs.pt||bie()}},{key:"vt",get:function(){var e=this.playlogs,t=e.vt;return e.pt>0?t:0}},{key:"fvt",get:function(){var e=this.playlogs,t=e.vt,n=e.pt,i=0;return t>0&&n>0&&(i=parseInt(t-n,10)),i>6e4?6e4:i}},{key:"nvt",get:function(){var e=this.playlogs,t=e.vt,n=e.nt;return t>0&&n>0?parseInt(t-n,10):0}},{key:"getFrameInfo",value:function(){if(this.player&&this.player.videoFrameInfo){var e=this.player.videoFrameInfo,t=e.dropped,n=e.corrupted,i=e.droppedRate;return{f_total:e.total,drop_count:t,drop_rate:i,corrupted:n}}return{f_total:0,drop_count:0,drop_rate:0,corrupted:0}}},{key:"vd",get:function(){var e=this.player;return e.duration&&"number"==typeof e.duration&&e.duration>0?parseInt(1e3*e.duration,10):e.config.duration&&"number"==typeof e.config.duration?parseInt(1e3*e.config.duration,10):0}},{key:"cur_play_pos",get:function(){return parseInt(1e3*this.player.currentTime,10)}},{key:"volume",get:function(){return this.player.volume}},{key:"buffer_time",get:function(){var e=0;try{var t=this.player.getBufferedRange();e=t[1]-t[0]}catch(cK){e=0}return e}},{key:"player_created_t",get:function(){return this._playerCreatedTime}},{key:"playbackRate",get:function(){return this.player.playbackRate}},{key:"mute",get:function(){return this.player.muted?0:1}},{key:"videoWidth",get:function(){var e=this.player;return e&&e.video?e.video.videoWidth:0}},{key:"videoHeight",get:function(){var e=this.player;return e&&e.video?e.video.videoHeight:0}},{key:"preload",get:function(){var e=this.player;return!(!e||!e.video)&&e.video.preload}},{key:"initial_url",get:function(){var e=this.player.currentSrc;return qP(e).call(e,"blob:")>-1&&this.urlLog.initial_url?this.urlLog.initial_url:Eie(e)?"":e}},{key:"initial_host",get:function(){var e=this.player.currentSrc;return qP(e).call(e,"blob:")>-1&&this.urlLog.initial_host?this.urlLog.initial_host:gie(Eie(e)?"":e)}},{key:"curHeaders",get:function(){var e=this.player,t=this.task;return e&&e.__dash__&&e.__dash__.curReqVideoSegInfo?Tie(e.__dash__.curReqVideoSegInfo.headers||{}):t?t.headers:{}}},{key:"curStatus",get:function(){var e=this.task,t=this.vtype,n=this.netLog;return qP(t).call(t,"MP4")>-1?e?e.status:0:n.status}},{key:"play_type",get:function(){return 0}},{key:"resolution",get:function(){var e=this.player.curDefinition;return e?"".concat(e.definition):this.resLogs.df}},{key:"sessionId",get:function(){return this._sessionId}},{key:"finish",get:function(){return this.isEnded?1:0}},{key:"end_type",get:function(){return this._endType}},{key:"avgSpeed",get:function(){return this.player&&this.player.avgSpeed?this.player.avgSpeed:0}},{key:"realSpeed",get:function(){return this.player&&this.player.realTimeSpeed?this.player.realTimeSpeed:0}},{key:"mp4MseOpLength",get:function(){if(!this.player||!this.player.plugins)return-1;var e=this.player.plugins.mp4encryptplayer;return e?e.opQueueLen||0:-1}},{key:"mp4LoadSegmentTimeRange",get:function(){if(!this.player||!this.player.plugins)return"";var e=this.player.plugins.mp4encryptplayer;return e?e.loadSegmentTimeRange.join(","):""}},{key:"preLoadData",get:function(){if(!this.player||!this.player.plugins)return[];var e=this.player.plugins.mp4encryptplayer;if(e&&e.preLoadData)return{hit:1,duration:e.preLoadData.duration,length:e.preLoadData.byteLength};var t=this.player.stat||{};if(t.preLoadData){var n=t.preLoadData.length;return{hit:n>0,length:n}}return{hit:0,duration:0,length:0}}},{key:"preloadState",get:function(){if(!this.player||!this.player.plugins)return 0;if(void 0!==this.player.preloadState)return this.player.preloadState||0;var e=this.player.plugins.mp4encryptplayer;return e&&e.preloadState?e.preloadState:0}},{key:"curBitrate",get:function(){var e=this.player,t=e.config,n=e.curDefinition;return n&&n.bitrate?n.bitrate:t.defaultBitrate?t.defaultBitrate:0}},{key:"videoReadyState",get:function(){var e=this.player;return e&&e.video?e.video.readyState:-1}},{key:"videoSeeking",get:function(){var e=this.player;return e&&e.video&&e.video.seeking?1:0}},{key:"videoPaused",get:function(){var e=this.player;return e&&e.video&&e.video.paused?1:0}},{key:"switchResolutionCount",get:function(){return this.resLogs.switch_count}},{key:"isError",get:function(){return this.player._isError||this.player.video.error}},{key:"isPlaying",get:function(){return Die(this.player.root,"xgplayer-playing")}},{key:"isStop",get:function(){return Die(this.player.root,"xgplayer-ended")||Die(this.player.root,"xgplayer-nostart")}},{key:"isPause",get:function(){return Die(this.player.root,"xgplayer-pause")}},{key:"isLoading",get:function(){return Die(this.player.root,"xgplayer-isloading")}},{key:"es",get:function(){return this.isPlaying?"playing":"beforePlay"}},{key:"lt",get:function(){var e=0;return 0===this.vt&&(mie("lt init",this.playlogs.lt),e=bie()),e}},{key:"lpt",get:function(){return this.lt?this.lt-this.pt:0}},{key:"playback_state",get:function(){return this.isError?Wie:this.isStop?Gie:this.isPause?Kie:this.isLoading?Yie:Vie}},{key:"is_start_play_automatically",get:function(){return"".concat(this.isAutoplay)}},{key:"watchDur",get:function(){var e=this.player,t=this.playlogs,n=e.cumulateTime?e.cumulateTime:vie(t.played);return n>=0?n>hre?hre:n:0}},{key:"vtype",get:function(){if(this.__vtype)return this.__vtype;var e=this.player?this.player.vtype||this.player.config.vtype:"";return e||(this.player.dash?"DASH":this._options.vtype||"MP4")},set:function(e){this.__vtype=e}},{key:"envInfo",get:function(){return this._envInfo},set:function(e){e&&(this._envInfo=e)}},{key:"getPlayerExt",value:function(){var e=this.player.ext;if(e)return e}},{key:"watingCost",get:function(){if(this.inWaitingStart>0){var e=_ie()-this.inWaitingStart;return e>dre?0:e}return 0}},{key:"videoNetworkState",get:function(){var e=this.player;return e&&e.video?e.video.networkState:-1}},{key:"eagleid",get:function(){var e=this.player;return e&&e.__dash__&&e.__dash__.curReqVideoSegInfo?(e.__dash__.curReqVideoSegInfo.headers||{}).eagleid:""}},{key:"initial_type",get:function(){var e=this.player.config||{};return e&&e.vodLogOpts&&void 0!==e.vodLogOpts.currentDashType?parseInt(e.vodLogOpts.currentDashType,10):-1}},{key:"dynamicType",get:function(){var e=this.player;return this.__dt?this.__dt:e&&e.__dash__&&e.__dash__.dash&&e.__dash__.dash.mpd?(this.__dt=e.__dash__.dash.mpd.dashType,this.__dt):""}},{key:"updateBuffers",value:function(){var e=this.player.buffered,t=[];if(!e||e.length<1)this.buffers.allBuffer=[];else{for(var n=0;n<e.length;n++){var i=parseInt(1e3*e.start(n),10),r=parseInt(1e3*e.end(n),10);t.push({s:i,e:r})}this.buffers.allBuffer=t}}},{key:"updateCurBuffer",value:function(e){var t=this.player,n=t.buffered,i=t.currentTime,r={buf_s_pos:0,buf_e_pos:0,buf_include:0,buf_diff:0};if(!n||n.length<1)return r;for(var o=-1,a=-1,s=parseInt(1e3*i,10),l=n.length-1;l>-1;l--){var c=parseInt(1e3*n.start(l),10),u=parseInt(1e3*n.end(l),10);if(s>=c&&s<=u){r.buf_include=1,r.buf_s_pos=c,r.buf_e_pos=u,r.buf_diff=u-s;break}s<c&&(o<0||c-s<o)?(o=c-s,a=l):s>u&&(o<0||s-u<o)&&(o=s-u,a=l)}1!==r.buf_include&&(a<0&&(a=n.length-1),r.buf_s_pos=parseInt(1e3*n.start(a),10),r.buf_e_pos=parseInt(1e3*n.end(a),10)),this.buffers.curBuffer=r}},{key:"checkInBuffer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.player.buffered;if(!n)return!1;e=parseInt(1e3*e,10);for(var i=0;i<n.length;i++){var r=parseInt(1e3*n.start(i),10),o=parseInt(1e3*n.end(i),10)+t;if(e>r&&e<o)return!0}return!1}},{key:"getPCDNStat",value:function(){if(this.player&&this.player.pcdnVVStat){var e=this.player.pcdnVVStat,t=e.try_req_num,n=e.req_node_succ,i=e.conn_req_num;return $X({try_req:t,req_succ:n,has_ret:e.has_ret_node,conn_req:i,conn_fail:e.conn_fail_num,conn_jump:e.conn_jump_num},n$(e,cse))}return{}}},{key:"updateVideoSize",value:function(){var e,t=this._options,n=this.player,i=this.resLogs,r=0,o=0;if(n.__dash__&&n.__dash__.dash&&n.__dash__.dash.mpd.mediaList){var a=n.__dash__.dash.mpd.mediaList.video,s=a[a.selectedIdx];mie("updateVideoSize》》videoItem",s),o=s?s.bitrate||s.bandwidth:0,r=s?s.size:0}else{var l=this.player.curDefinition;l?(o=l.bitrate||n.config.bitrate||0,r=parseInt(l.bitrate*n.duration/8,10)):(r=t.videoSize||n.config.videoSize||0,o=t.bitrate||n.config.bitrate||0)}mie("updateVideoSize",y_(e="bitrate:".concat(o,", vs:")).call(e,r)),r&&(i.vs=r,i.vis=parseInt(r/n.duration,10),i.bitrate=o||i.vis)}},{key:"updateVds",value:function(){var e,t,n,i,r,o,a=this.resLogs,s=this.playlogs,l=this.player;if(0!==a.vis){for(var c=parseInt(vie(s.played)/1e3,10),u=l.buffered,h=0,d=0;d<u.length;d++)h+=parseInt(u.end(d)-u.start(d),10);mie("updateVds",y_(e=y_(t=y_(n=y_(i=y_(r=y_(o="pdur:".concat(c," bdur:")).call(o,h," \n lbuf:")).call(r,a.lbuf," lplayed:")).call(i,a.lplayed," bitrate: ")).call(n,a.bitrate," vis:")).call(t,a.vis," vs:")).call(e,a.vs)),a.lplayed=c,a.lbuf=h}else mie("updateVds","vis:".concat(a.vis))}},{key:"encryptedInfo",get:function(){return this.player.encryptedInfo||{encryptedType:0}}}],[{key:"TEA_ID",get:function(){return fse},set:function(e){pse="__tea_cache_tokens_".concat(fse=e)}},{key:"AB_SDK_VERSION",get:function(){return vse},set:function(e){vse="Array"===Cie(e)?e.join(","):e}},{key:"Collector",set:function(e){gse=e}},{key:"defaultConfig",value:function(){return{line_app_id:"",line_user_id:"",isTask:!1,codec_type:"",playerCoreVersion:"",playerVersion:"",start_time:0,maxQueueCount:5,channel:"cn",channelDomain:"",absdkVersion:"",checkByInnerLog:!0,drm_type:0,vtype:"MP4",tag:"普通视频",subtag:"",dynamic_type:"",sendLocalCallback:function(){},disableLocalCache:!1,closeResolutionLog:!1,closeSeekLog:!1,needXhrCheck:!1,trackerConfig:{},envInfo:{},enableTeaWebId:!1,enableBeacon:!1}}}]),e}(),mse=null===(hse=kV())||void 0===hse?void 0:hse.__LOG_TEA_ID__;yse.TEA_ID=mse,yse.Collector=AX;var _se=function(e){if(e&&e.player){var t=function(){var t=d_(u_().mark((function t(n,i){var r,o;return u_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=e.player,LG.log("onReportLog",n,dp({},i)),i.player_sum_num=rV(r),i.is_mse=iV(r),i.drm_encrypt_type=CV(r)||"",i.initial_url=qO.isBlob(i.initial_url)&&r.config.url||i.initial_url,n!==Nie&&n!==Uie||(o=null==r?void 0:r.veError,0!==i.errc&&o?(i.ve_error_code=(null==o?void 0:o.veErrorCode)||0,i.ve_error_type=(null==o?void 0:o.veErrorType)||"",i.ve_error_message=(null==o?void 0:o.veErrorMessage)||"",i.ve_error_ext=Hj((null==o?void 0:o.ext)||"")):(i.ve_error_code=0,i.ve_error_type="",i.ve_error_message="",i.ve_error_ext="")),LG.log("onReportLog after change",n,dp({},i));case 8:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),n=VS({onReportLog:t},e.player.config.vodLogOpts||{});e.player.vodLogger=new yse(e.player,n),e.player.plugins.xgVodLogger=e.player.vodLogger}else this.vodLogger=new yse(this,this.config.vodLogOpts||{})};_se.pluginName="__xgVodLogger",_se.playerConfig={},_se.Collector=AX,_se.setABSdkVersion=function(e){yse.AB_SDK_VERSION=e};var bse=mI((function(e,t,n){aI(e,t,n)})),kse=Au((function e(t){Ou(this,e),this.isLive=t.configs.isLive,this.playerData=t.playerData,this.streamType=t.streamType}));var Ese,wse={name:"@byted-vcloud/veplayer",version:"1.10.0",main:"index.min.js",module:"index.min.js",types:"index.d.ts",sideEffects:["*.css","*.less"],unpkg:!0,unpkgFiles:["*"],scripts:{"test:e2e":"echo 'test'",lint:"npx lint-staged",dev:"NODE_ENV=development libd dev fixtures","dev:vod":"NODE_ENV=development libd dev demo/vod --force","devs:vod":"NODE_ENV=development MODE=https libd dev demo/vod","dev:vod-row":"LUX_REGION=ROW libd dev demo/vod","dev:vod-b":"LUX_REGION=BYTEPLUS NODE_ENV=development libd dev demo/vod","devs:vod-b":"LUX_REGION=BYTEPLUS NODE_ENV=development MODE=https libd dev demo/vod","dev:hth":"NODE_ENV=development libd dev fixtures/hth",build:"libd build",postbuild:"lux release commit","build-b":"LUX_REGION=BYTEPLUS libd build",release:"libd release","release-b":"LUX_REGION=BYTEPLUS libd release",doc:"docg","doc-b":"LUX_REGION=BYTEPLUS docg",changelog:"libd changelog -s","version:rc":"lux version --preid rc"},author:"",license:"BSD-3-Clause",devDependencies:{"@byted/docg":"0.5.10-alpha.37","@byted/docg-plugin-sdkhub":"0.3.1","@byted/libd":"1.3.3","@byted/lux-cli":"1.2.3","@byted/lux-core":"1.2.0","@changesets/cli":"2.26.2","@commitlint/cli":"16.2.1","@commitlint/config-conventional":"16.2.1","@types/lodash":"4.14.178","@types/lodash-es":"4.17.7","@typescript-eslint/eslint-plugin":"5.12.0","@typescript-eslint/parser":"5.12.0","cross-env":"7.0.3","dts-bundle-generator":"^8.0.1",eslint:"8.9.0","eslint-config-prettier":"6.7.0","eslint-plugin-jest":"23.20.0","eslint-plugin-prettier":"3.1.0","fs-extra":"11.1.1","git-cz":"4.7.6",husky:"8.0.1",less:"4.1.2","lint-staged":"11.1.2","node-fetch":"2.6.7","postcss-less":"6.0.0",prettier:"2.2.1","rollup-plugin-visualizer":"5.9.0",shelljs:"0.8.5",stylelint:"14.5.2","stylelint-config-standard":"24.0.0","stylelint-prettier":"2.0.0",typescript:"4.5.5","vite-plugin-mkcert":"^1.17.4"},dependencies:{"@babel/runtime-corejs3":"^7.22.6","@byted/danmu-mask":"0.3.6","@byted/drm":"0.0.0-alpha.12","@byted/streamprobe":"1.0.2","@byted/volcengine-vestrategy":"1.1.0-rc.0","@byted/volcengine-vestrategy-adapt-range":"1.1.0-rc.0","@byted/volcengine-vestrategy-h265":"1.1.0-rc.0","@byted/volcengine-vestrategy-preload":"1.1.0-rc.0","@byted/xgplayer-app-logger":"0.12.10","@byted/xgplayer-encrypt":"3.5.27-alpha.30","@byted/xgplayer-encrypt-hls":"4.1.12-rc.1","@byted/xgplayer-encrypt-mp4":"3.0.16-rc-volc.1","@byted/xgplayer-live-logger":"1.1.0-alpha.8","@byted/xgplayer-rts":"0.2.0-alpha.6","@byted/xgplayer-vod-abralgo":"1.0.5","@byted/xgplayer-vod-menu":"3.0.9","@byted/xgplayer-vod-preload":"1.0.4","@byted/xgplayer-xgvideo":"0.1.16","@datarangers/sdk-javascript":"0.0.3-lite","@dp/byted-tea-sdk-oversea":"^5.1.5","byted-tea-sdk":"^5.1.3","danmu.js":"1.1.13",dayjs:"^1.11.6","dom-helpers":"^5.2.1",eventemitter3:"^4.0.7","globalthis-polyfill":"^1.0.0","js-base64":"^3.7.2","js-cookie":"^3.0.1","lodash-es":"^4.17.21","proxy-polyfill":"^0.3.2",xgplayer:"3.0.20-rc.7","xgplayer-flv":"3.0.10-alpha.4","xgplayer-hls":"3.0.21-rc.9","xgplayer-service":"^0.5.0","xgplayer-subtitles":"3.0.10-alpha.4","xss-filters":"^1.2.7"},"lint-staged":{"*.less":'stylelint --fix "src/**/*.less" --custom-syntax postcss-less',"*.{js,jsx,ts,tsx}":["eslint --fix"]},publishConfig:{directory:"dist"},browserslist:["iOS >= 10","android >= 5","Chrome > 40","ChromeAndroid >= 39","IE 11"]},Sse=function(e){return e.HLS="hls",e.FLV="flv",e.XGVideo="XGVideo",e.HLSEncrypt="hlsEncrypt",e.DASH="dash",e.MP4Encrypt="mp4Encrypt",e.DanmuJS="danmujs",e.DanmuMask="danmuMask",e.StreamProbe="streamprobe",e.VeStrategy="vestrategy",e.VeStrategyH265="vestrategy_h265",e.VeStrategyPreload="vestrategy_preload",e.VeStrategyAdaptRange="vestrategy_adapt_range",e.DashAbralgo="DashAbralgo",e.Preloader="preloader",e}(Sse||{}),Tse=wse.dependencies||{},Cse=(up(Ese={},"hls",{name:"HlsPlayer",pluginName:"hls",packageName:"xgplayer-hls",devPath:"xgplayer-hls@".concat(Tse["xgplayer-hls"],"/dist/index.min.js")}),up(Ese,"flv",{name:"FlvPlayer",pluginName:"flv",packageName:"xgplayer-flv",devPath:"xgplayer-flv@".concat(Tse["xgplayer-flv"],"/dist/index.min.js")}),up(Ese,"XGVideo",{name:"XGVideo",packageName:"@byted/xgplayer-xgvideo",devPath:"@byted/xgplayer-xgvideo@".concat(Tse["@byted/xgplayer-xgvideo"],"/dist/index.min.js")}),up(Ese,"hlsEncrypt",{name:"EncryptHlsPlugin",pluginName:"EncryptHlsPlugin",packageName:"@byted/xgplayer-encrypt-hls",devPath:"@byted/xgplayer-encrypt-hls@".concat(Tse["@byted/xgplayer-encrypt-hls"],"/dist/index.min.js")}),up(Ese,"dash",{name:"DashPlugin",pluginName:"DASHPlugin",packageName:"@byted/xgplayer-encrypt",devPath:"@byted/xgplayer-encrypt@".concat(Tse["@byted/xgplayer-encrypt"],"/dist/index.min.js")}),up(Ese,"mp4Encrypt",{name:"Mp4EncryptPlayer",pluginName:"Mp4EncryptPlayer",packageName:"@byted/xgplayer-encrypt-mp4",devPath:"@byted/xgplayer-encrypt-mp4@".concat(Tse["@byted/xgplayer-encrypt-mp4"],"/dist/index.min.js")}),up(Ese,"danmujs",{name:"danmu.js",packageName:"danmu.js",devPath:"danmu.js@".concat(Tse["danmu.js"],"/dist/index.js")}),up(Ese,"danmuMask",{name:"DanmuMask",packageName:"@byted/danmu-mask",devPath:"@byted/danmu-mask@".concat(Tse["@byted/danmu-mask"],"/browser/index.js")}),up(Ese,"streamprobe",{name:"StreamProbe",pluginName:"streamprobe",packageName:"@byted/streamprobe",devPath:"@byted/streamprobe@".concat(Tse["@byted/streamprobe"],"/dist/index.min.js")}),up(Ese,"DashAbralgo",{name:"DashAbralgo",packageName:"@byted/xgplayer-vod-abralgo",devPath:"@byted/xgplayer-vod-abralgo@".concat(Tse["@byted/xgplayer-vod-abralgo"],"/dist/index.min.js")}),up(Ese,"vestrategy",{name:"VeStrategy",packageName:"@byted/volcengine-vestrategy",devPath:"@byted/volcengine-vestrategy@".concat(Tse["@byted/volcengine-vestrategy"],"/umd/vestrategy.production.js")}),up(Ese,"vestrategy_h265",{name:"__VESTRATEGY_STRATEGY_H265__",packageName:"@byted/volcengine-vestrategy-h265",devPath:"@byted/volcengine-vestrategy-h265@".concat(Tse["@byted/volcengine-vestrategy-h265"],"/umd/vestrategy.strategy.h265.production.js")}),up(Ese,"vestrategy_preload",{name:"__VESTRATEGY_STRATEGY_PRELOAD__",packageName:"@byted/volcengine-vestrategy-preload",devPath:"@byted/volcengine-vestrategy-preload@".concat(Tse["@byted/volcengine-vestrategy-preload"],"/umd/vestrategy.strategy.preload.production.js")}),up(Ese,"vestrategy_adapt_range",{name:"__VESTRATEGY_STRATEGY_ADAPT_RANGE__",packageName:"@byted/volcengine-vestrategy-adapt-range",devPath:"@byted/volcengine-vestrategy-adapt-range@".concat(Tse["@byted/volcengine-vestrategy-adapt-range"],"/umd/vestrategy.strategy.adapt-range.production.js")}),up(Ese,"preloader",{name:"XGPlayerPreload",packageName:"@byted/xgplayer-vod-preload",devPath:"@byted/xgplayer-vod-preload@".concat(Tse["@byted/xgplayer-vod-preload"],"/dist/index.min.js")}),Ese),xse=!1,Dse=function(e){rh(i,e);var t,n=Ah(i);function i(e){return Ou(this,i),n.call(this,e)}return Au(i,[{key:"applyAbrPluginConfig",value:function(e,t){e.Mp4EncryptPlayer=dp(dp({},e.Mp4EncryptPlayer),{},{autoBitrateOpts:t})}},{key:"prepareAbrModule",value:(t=d_(u_().mark((function e(t,n){var i,r;return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=null===(i=t.configs)||void 0===i?void 0:i.autoBitrateOpts,!t.isOpenABR()||null!=r&&r.module){e.next=13;break}return e.t0=t,e.t1=dp,e.t2=dp({},r),e.t3={},e.next=8,n.loadPlugins(Sse.DashAbralgo);case 8:e.t4=e.sent,e.t5={module:e.t4},e.t6=(0,e.t1)(e.t2,e.t3,e.t5),e.t7={autoBitrateOpts:e.t6},e.t0.updateConfigs.call(e.t0,e.t7);case 13:case"end":return e.stop()}}),e)}))),function(e,n){return t.apply(this,arguments)})},{key:"needAbrAutoDefinition",value:function(){return!1}},{key:"setAbrDefaultDefiWithAuto",value:function(){return!1}},{key:"generatePlaylistFromServer",value:function(e){xse=!0;var t=(e||{}).playList;return qd((void 0===t?[]:t)||[])}},{key:"canOpenAbr",value:function(e){var t;if(this.playerData.isVidPlay()&&e){var n=e.playList;if(!((void 0===n?[]:n).length>1))return xse&&LG.warn("The obtained video information does not meet the ABR requirements. Please check whether the parameters for generating playAuthToken are correct and whether there are more than 1 video."),xse=!1,!1}return!(null!==(t=eM.os)&&void 0!==t&&t.isIos)}},{key:"canAdaptRangeEnable",value:function(){var e;return!(null!==(e=eM.os)&&void 0!==e&&e.isIos)}},{key:"adaptRangeDefaultOptions",value:function(){return{maxTargetCacheDur:30,minTargetCacheDur:12,rangeMaxDuration:15,rangeMinDuration:5,cacheSafeFactor:2,estPTcontrol:!0,estPlayTime:12,minBandwidth:1e6,minDangerThreshold:3,rangeControl:!0,rangeMinSize:409600,safeFactor:.1,targetCacheControl:!0}}},{key:"applyAdaptRangePluginConfig",value:function(e,t){e.Mp4EncryptPlayer=dp(dp({},e.Mp4EncryptPlayer),{},{adaptRange:t})}},{key:"applyAdaptRangeStrategy",value:function(e,t){var n,i;e.Mp4EncryptPlayer=dp(dp({},e.Mp4EncryptPlayer),{},{adaptRange:dp(dp(dp({},this.adaptRangeDefaultOptions()),null!==(n=null===(i=e.Mp4EncryptPlayer)||void 0===i?void 0:i.adaptRange)&&void 0!==n?n:{}),t)})}}]),i}(kse),Ise=!1,Rse=function(e){rh(i,e);var t,n=Ah(i);function i(){return Ou(this,i),n.apply(this,arguments)}return Au(i,[{key:"applyAbrPluginConfig",value:function(e,t){e.DASHPlugin=dp(dp({},e.DASHPlugin),{},{autoBitrateOpts:t})}},{key:"prepareAbrModule",value:(t=d_(u_().mark((function e(t,n){var i,r;return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=null===(i=t.configs)||void 0===i?void 0:i.autoBitrateOpts,!t.isOpenABR()||null!=r&&r.module){e.next=13;break}return e.t0=t,e.t1=dp,e.t2=dp({},r),e.t3={},e.next=8,n.loadPlugins(Sse.DashAbralgo);case 8:e.t4=e.sent,e.t5={module:e.t4},e.t6=(0,e.t1)(e.t2,e.t3,e.t5),e.t7={autoBitrateOpts:e.t6},e.t0.updateConfigs.call(e.t0,e.t7);case 13:case"end":return e.stop()}}),e)}))),function(e,n){return t.apply(this,arguments)})},{key:"needAbrAutoDefinition",value:function(){return!1}},{key:"setAbrDefaultDefiWithAuto",value:function(){return!1}},{key:"useNativeAbr",value:function(){return!1}},{key:"canOpenAbr",value:function(e){if(this.playerData.isVidPlay()&&e){var t=e.enableAdaptive,n=e.adaptiveBitrateStreamingInfo,i=e.playList;if(!((void 0===i?[]:i).length>2&&t&&n))return Ise&&LG.warn("The obtained video information does not meet the ABR requirements. Please check whether the parameters for generating playAuthToken are correct and whether the video contains ABR transcoding products."),Ise=!1,!1}return!0}},{key:"canAdaptRangeEnable",value:function(){var e;return!(null!==(e=eM.os)&&void 0!==e&&e.isIos)}},{key:"generatePlaylistFromServer",value:function(e){Ise=!0;var t=(e||{}).playList,n=void 0===t?[]:t;return ib(n).call(n,(function(e){return e.FileType===FG.VIDEO}))}},{key:"adaptRangeDefaultOptions",value:function(){return{maxTargetCacheDur:60,minTargetCacheDur:50,rangeMaxDuration:15,rangeMinDuration:5,cacheSafeFactor:2,estPTcontrol:!0,estPlayTime:12,minBandwidth:1e6,minDangerThreshold:3,rangeControl:!0,rangeMinSize:409600,safeFactor:.1,targetCacheControl:!0}}},{key:"applyAdaptRangePluginConfig",value:function(e,t){var n;e.DASHPlugin=dp(dp({},null!==(n=e.DASHPlugin)&&void 0!==n?n:{}),{},{adaptRange:t})}},{key:"applyAdaptRangeStrategy",value:function(e,t){var n,i;e.DASHPlugin=dp(dp({},e.DASHPlugin),{},{adaptRange:dp(dp(dp({},this.adaptRangeDefaultOptions()),null!==(n=null===(i=e.DASHPlugin)||void 0===i?void 0:i.adaptRange)&&void 0!==n?n:{}),t)})}}]),i}(kse),Lse=!1,Pse=function(e){rh(i,e);var t,n=Ah(i);function i(e){return Ou(this,i),n.call(this,e)}return Au(i,[{key:"applyAbrPluginConfig",value:function(e,t){var n;e.EncryptHlsPlugin=dp(dp({},e.EncryptHlsPlugin),{},{autoBitrateOpts:t,maxBufferLength:(null===(n=e.EncryptHlsPlugin)||void 0===n?void 0:n.maxBufferLength)||40})}},{key:"prepareAbrModule",value:(t=d_(u_().mark((function e(t,n){var i,r;return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=null===(i=t.configs)||void 0===i?void 0:i.autoBitrateOpts,!t.isOpenABR()||null!=r&&r.module||this.useNativeAbr()){e.next=13;break}return e.t0=t,e.t1=dp,e.t2=dp({},r),e.t3={},e.next=8,n.loadPlugins(Sse.DashAbralgo);case 8:e.t4=e.sent,e.t5={module:e.t4},e.t6=(0,e.t1)(e.t2,e.t3,e.t5),e.t7={autoBitrateOpts:e.t6},e.t0.updateConfigs.call(e.t0,e.t7);case 13:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})},{key:"needAbrAutoDefinition",value:function(){return!0}},{key:"setAbrDefaultDefiWithAuto",value:function(){return!this.useNativeAbr()}},{key:"generatePlaylistFromServer",value:function(e){var t;Lse=!0;var n=e||{},i=n.vid,r=n.playList,o=void 0===r?[]:r,a=n.enableAdaptive,s=n.adaptiveBitrateStreamingInfo,l=qd(o||[]);if(this.useNativeAbr()&&null!==(t=this.playerData)&&void 0!==t&&null!==(t=t.configs)&&void 0!==t&&null!==(t=t.autoBitrateOpts)&&void 0!==t&&t.enable&&a&&s&&l.length){var c={url:s.MainPlayUrl,definition:"auto",streamType:"hls",format:"hls",backupUrl:s.BackupPlayUrl,backUrlList:[s.BackupPlayUrl],vid:i};l.push(c)}return l}},{key:"useNativeAbr",value:function(){return eM.os.isIos||"safari"===eM.browser&&this.playerData.isBusinessDrm}},{key:"canOpenAbr",value:function(e){if(this.playerData.isVidPlay()&&e){var t=e.enableAdaptive,n=e.adaptiveBitrateStreamingInfo,i=e.playList;if(!((void 0===i?[]:i).length>1&&t&&n))return Lse&&LG.warn("The obtained video information does not meet the ABR requirements. Please check whether the parameters for generating playAuthToken are correct and whether the video contains ABR transcoding products."),Lse=!1,!1}return!0}},{key:"canAdaptRangeEnable",value:function(){return!1}},{key:"adaptRangeDefaultOptions",value:function(){}},{key:"applyAdaptRangePluginConfig",value:function(e,t){}},{key:"applyAdaptRangeStrategy",value:function(e,t){}}]),i}(kse),Ase=function(e){rh(n,e);var t=Ah(n);function n(){return Ou(this,n),t.apply(this,arguments)}return Au(n,[{key:"applyAbrPluginConfig",value:function(e,t){}},{key:"needAbrAutoDefinition",value:function(){return!1}},{key:"prepareAbrModule",value:function(e,t){}},{key:"setAbrDefaultDefiWithAuto",value:function(){return!1}},{key:"generatePlaylistFromServer",value:function(e){var t=(e||{}).playList;return qd((void 0===t?[]:t)||[])}},{key:"useNativeAbr",value:function(){return!1}},{key:"canOpenAbr",value:function(){return!1}},{key:"canAdaptRangeEnable",value:function(){return!1}},{key:"adaptRangeDefaultOptions",value:function(){}},{key:"applyAdaptRangePluginConfig",value:function(e,t){}},{key:"applyAdaptRangeStrategy",value:function(e,t){}}]),n}(kse);var Ose,Mse=["options","type","isLive","id","root","plugins","defaultConfig","languages","codec","isMobile","useSoftDecoding","enableH265Degrade","onMediaExpired","onTokenExpired","unionId","isMusic","sdkPlugins","useHlsPluginForSafari","enableMenu","region","debug"],Nse=function(){function e(t,n){var i;Ou(this,e),this.id="",this.type="",this.isLive=!1,this.options=null,this.isMobile=!1,this.playList=[],this.plugins=[],this.openSoftDecoding=!1,this.current={lineId:0,language:"",definition:"",streamType:"",codec:zR.UNKNOWN,kid:"",drmType:void 0},this.strategiesPlugins=[],this.strategiesPluginConfigs={},this.urlCheckData={enableUrlExpireCheck:!1,urlExpireTimestamp:EG,urlExpireDiff:60,urlCheckExpireInterval:400},this.isAutoBitrateEnable=!1,this.isBusinessDrm=!1,this.isEncrypt=!1;var r,o,a=t.options,s=t.type,l=t.isLive,c=t.id,u=t.root,h=t.plugins,d=void 0===h?[]:h,f=t.defaultConfig,p=t.languages,v=t.codec,g=t.isMobile,y=void 0!==g&&g,m=t.useSoftDecoding,_=void 0!==m&&m,b=t.enableH265Degrade,k=void 0!==b&&b,E=t.onMediaExpired,w=t.onTokenExpired,S=t.unionId,T=t.isMusic,C=void 0!==T&&T,x=t.sdkPlugins,D=void 0===x?[]:x,I=t.useHlsPluginForSafari,R=void 0===I||I,L=t.enableMenu,P=void 0!==L&&L,A=t.region,O=void 0===A?"sg":A,M=t.debug,N=void 0!==M&&M,z=Sp(t,Mse);this.configs=t,this.sdk=n,N&&(LG.config.debug=3),this.options=VS({},a,z),this.options.poster="string"==typeof this.options.poster?function(e){var t,n=""+e,i=DV.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}(this.options.poster):this.options.poster,this.options.icons=(r=this.options.icons,o={},r&&MT(r).forEach((function(e){var t=IS(e,2),n=t[0],i=t[1];i&&"string"!=typeof i&&(o[n]=i)})),o),this.id=c,this.root=u,this.type=s,this.isLive=!!(null!=l?l:"live"===s),this.defaultConfig=f,this.languageData=this.initI18nData(p),this.isMobile=y||"mobile"===eM.device,this.openSoftDecoding=_,this.enableH265Degrade=k,this.codec=v||zR.UNKNOWN,this.onMediaExpired=E,this.onTokenExpired=w,null===(i=this.setVodPlayListConfig)||void 0===i||i.call(this,t),this.current=YP.observe(this.current),this.plugins=qd(d),this.isMusic=C,this.unionId=S,this.sdkPlugins=D,this.useHlsPluginForSafari=R,this.enableMenu=P,P&&(this.options.enableContextmenu=!0,this.options.closeVideoStopPropagation=!0),this.region=O,this.setVodTeaId(),this.playDomainDegrade=!1,this.dashOpts=null,this.isLive||t.getVideoByToken||this.codec!==zR.UNKNOWN||LG.warn("The codec of media is not provided"),this.initPlayData(t),YP.subscribeProperty(this.current,"definition",this.updateCheckExpireData.bind(this))}return Au(e,[{key:"initPlayData",value:function(e){var t=this.initPlaylistAndGetCurrent(e);this.initCurrent(t)}},{key:"initPlaylistAndGetCurrent",value:function(e){var t,n,i=e.url,r=e.playList,o=void 0===r?[]:r,a=e.streamType,s=void 0===a?"":a,l=e.definitionText,c=e.definitionTextKey,u=e.urlExpireTimestamp,h=e.defaultDefinition||this.configs.defaultDefinition,d=e.codec||zR.UNKNOWN;null!=e&&e.autoBitrateOpts&&this.updateConfigs({autoBitrateOpts:dp(dp({},null!==(n=this.configs.autoBitrateOpts)&&void 0!==n?n:{}),e.autoBitrateOpts)});var f=null,p=qD(ib(t=qd(o)).call(t,(function(e){return e.url})));if(i)if(0===p.length){var v=dp(dp({},this.current),{},{url:i,streamType:s,definitionTextKey:c,codec:d,urlExpireTimestamp:u},c||l?{definition:l}:{definition:"HD"});this.playList=[v],this.defaultDefinition=v.definition}else{this.playList=p;var g=this.getUrlList({url:i});g.length>0?f=g[0]:LG.warn("default url is not match Playlist")}else this.playList=p;this.isBusinessDrm=this.playList.some((function(e){return e.DrmType===NR.DRM_ENCRYPT}));var y,m,_=this.getCurrentByDefaultConfig();_?this.defaultDefinition=_.definition:(_=f||(h&&(null===(y=this.getUrlList({definition:h}))||void 0===y?void 0:y[0])||this.playList[0]),this.defaultDefinition=null===(m=_)||void 0===m?void 0:m.definition);var b=this.getTargetStreamType(_);if(this.adapter=function(e,t){var n=dp(dp({},t),{},{streamType:e});switch(null==e?void 0:e.toLowerCase()){case"mp4":return new Dse(n);case"dash":return new Rse(n);case"hls":return new Pse(n);default:return LG.log("".concat(e," match failed, use OthersAdapter by default")),new Ase(n)}}(b,{configs:this.configs,playerData:this}),this.isAutoBitrateEnable=this.checkAutoBitratePlayList(),this.isOpenABR()){var k=this.getABRStreamInfo(b,_);_=k.defaultStream,this.playList=k.playList,this.defaultDefinition=k.defaultDefinition}return this.playList.forEach((function(e){(null==e?void 0:e.streamType)&&(e.vtype=e.streamType.toUpperCase()),(null==e?void 0:e.codec)&&(e.codecType=e.codec)})),_}},{key:"checkAutoBitratePlayList",value:function(){var e,t=this;return!(eM.os.isIos&&this.adapter.needAbrAutoDefinition()&&(null===(e=this.playList)||void 0===e||null===(e=fb(e).call(e,(function(e){return t.isAutoDefinition(null==e?void 0:e.definition)})))||void 0===e||!e.url))}},{key:"getABRStreamInfo",value:function(e,t){var n,i,r,o,a,s,l=this,c=this.defaultDefinition,u=(null===(n=this.playList)||void 0===n||null===(i=y_(n))||void 0===i?void 0:i.call(n))||[],h=t,d=JS(u).call(u,(function(e){return l.isAutoDefinition(null==e?void 0:e.definition)})),f=-1!==d?bT(u).call(u,d,1)[0]:void 0,p={definition:null!==(r=null==f?void 0:f.definition)&&void 0!==r?r:"auto",bitrate:void 0,definitionTextKey:(null==f?void 0:f.definitionTextKey)||(null===(o=this.configs)||void 0===o||null===(o=o.autoBitrateOpts)||void 0===o?void 0:o.definitionTextKey)||"DEFINITION_AUTO",url:(null==f?void 0:f.url)||"__auto__",name:"auto",streamType:e||this.configs.streamType};this.isAutoDefinition(this.configs.defaultDefinition)||(p.bitrate=null===(a=h)||void 0===a?void 0:a.bitrate,c=null===(s=h)||void 0===s?void 0:s.definition);return this.isPlayAutoDefinition()&&(h=p,this.adapter.setAbrDefaultDefiWithAuto()&&(c=p.definition)),u.push(p),{defaultDefinition:c,defaultStream:h,playList:u}}},{key:"isCurrentH265",value:function(){return!!this.codec&&this.codec.replace(".","").toLowerCase()===zR.H265}},{key:"getCurrentByDefaultConfig",value:function(){if(this.defaultConfig){var e=this.defaultConfig,t=e.type,n=e.isLive,i=e.lineId,r=void 0===i?"":i,o=e.definition,a=void 0===o?"":o;if((null!=n?n:"live"===t)===this.isLive){if(!r&&!a)return LG.warn("默认配置未设置默认线路或默认清晰度"),void(this.isHitDefault=!1);var s=this.getUrlList({lineId:r,definition:a});return s.length>0?(this.isHitDefault=!0,s[0]):(LG.warn("playlist中没有满足默认配置的流"),void(this.isHitDefault=!1))}}}},{key:"initCurrent",value:function(e){var t,n,i=this;kT(this.current).forEach((function(t){i.current[t]=null==e?void 0:e[t]}));var r,o=null==e?void 0:e.codec;o?this.codec=F_(r=wb(zR)).call(r,o)?o:zR.UNKNOWN:this.codec=zR.UNKNOWN;this.isBusinessDrm=(null===(t=this.current)||void 0===t?void 0:t.drmType)===NR.DRM_ENCRYPT,this.isEncrypt=!(null===(n=this.current)||void 0===n||!n.kid),this.initCheckExpireData()}},{key:"initCheckExpireData",value:function(){var e=this.configs,t=e.enableUrlExpireCheck,n=e.urlExpireDiff,i=e.urlCheckExpireInterval;bse(this.urlCheckData,{enableUrlExpireCheck:t,urlExpireDiff:n,urlCheckExpireInterval:i}),this.updateCheckExpireData()}},{key:"updateCheckExpireData",value:function(){var e,t=null===(e=this.getCurrentStreams())||void 0===e?void 0:e[0];if(t){var n=t.url,i=t.urlExpireTimestamp;if(!n)return;var r=SV(""+(i||this.configs.urlExpireTimestamp));r?this.urlCheckData.urlExpireTimestamp=r:this.urlCheckData.enableUrlExpireCheck&&(this.urlCheckData.urlExpireTimestamp=EG,LG.warn("not provide urlExpireTimestamp, url expire check will not work")),LG.log("update urlCheckData to:",this.urlCheckData)}}},{key:"initI18nData",value:function(e){var t,n=[eG,Jj],i=e&&AT(t=MT(e)).call(t,(function(e,t){var i=IS(t,2),r=i[0],o=i[1];return F_(_G).call(_G,r)?e.push({LANG:"zh"===r?"zh-cn":r,TEXT:o}):n.push({LANG:r,TEXT:o}),e}),[]);return{extraLangList:n,extendLangList:i}}},{key:"getCurrentUrl",value:function(){var e;return null===(e=this.getCurrentStreams()[0])||void 0===e?void 0:e.url}},{key:"getTargetStreamType",value:function(e){var t;return e?e.streamType||this.configs.streamType||hV(e.url):this.configs.streamType||KG(null===(t=this.configs)||void 0===t?void 0:t.getVideoByToken)}},{key:"getCurrentStreamType",value:function(){var e=this.getCurrentStreams();if(e.length){var t=e[0],n=t.url;return t.streamType||this.configs.streamType||hV(n)||"mp4"}return this.configs.streamType||"mp4"}},{key:"getStreamType",value:function(){var e;return this.getCurrentStreamType()||KG(null===(e=this.configs)||void 0===e?void 0:e.getVideoByToken)}},{key:"isOpenABR",value:function(){var e;if(!this.isAutoBitrateEnable||null===(e=this.configs)||void 0===e||null===(e=e.autoBitrateOpts)||void 0===e||!e.enable)return!1;var t=this.sdk.getSdkPlugin("AuthToken");return this.adapter.canOpenAbr(null==t?void 0:t.playInfo)}},{key:"showRealDefinition",value:function(){var e;return!(null===(e=this.configs)||void 0===e||null===(e=e.autoBitrateOpts)||void 0===e||!e.showRealDefinition)}},{key:"isAutoDefinition",value:function(e){var t;return F_(t=["auto","自动"]).call(t,e)}},{key:"isPlayAutoDefinition",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.isAutoDefinition(t||this.defaultDefinition)||(null===(e=this.configs.autoBitrateOpts)||void 0===e?void 0:e.startWithAuto)}},{key:"isDefinitionMatch",value:function(e,t){return!(!this.isAutoDefinition(e)||!this.isAutoDefinition(t))||e===t}},{key:"getCurrentStreams",value:function(){var e=this.current;return this.getUrlList(e)}},{key:"getLineList",value:function(){return qD(OR(this.playList,"lineId"))}},{key:"getLineListByLineId",value:function(e){var t;return ib(t=this.playList).call(t,(function(t){var n;return(null==e?void 0:e.toString())===(null===(n=t.lineId)||void 0===n?void 0:n.toString())}))}},{key:"getDefinitionListByLineId",value:function(e){return qD(OR(this.getLineListByLineId(e),"definition"))}},{key:"getUrlList",value:function(e){var t;return ib(t=this.playList).call(t,(function(t){return kT(e).every((function(n){if("url"===n){var i=null==e?void 0:e.url,r=null==t?void 0:t.url;return"string"==typeof i?i===(null==r?void 0:r.toString()):!(!Array.isArray(i)||!Array.isArray(r))&&W_(i).call(i,(function(e){return e.src})).join("")===W_(r).call(r,(function(e){return e.src})).join("")}var o,a,s=(null===(o=e[n])||void 0===o?void 0:o.toString())===(null===(a=t[n])||void 0===a?void 0:a.toString()),l=!e[n];return s||l}))}))}},{key:"getNextDefinition",value:function(){var e,t,n=arguments.length>1?arguments[1]:void 0,i=!(arguments.length>0&&void 0!==arguments[0])||arguments[0]?"next":"prev",r=this.current,o=r.definition,a=r.lineId;if(o){var s=null===(e=this.getCurrentStreams())||void 0===e?void 0:e[0],l="auto"===o?s.mapDefinition:o,c=function(e){return(null==e?void 0:e.length)&&AT(e).call(e,(function(t,n,i){return t[n]={next:i+1>=e.length?null:e[i+1],pre:0===i?null:e[i-1]},t}),{})}(n)||mG,u=kT(c);if(F_(u).call(u,l)){for(var h=null===(t=c[l])||void 0===t?void 0:t[i],d=this.getDefinitionListByLineId(a);0===ib(d).call(d,(function(e){return e.definition===h})).length&&h;){var f;h=null===(f=c[h])||void 0===f?void 0:f[i]}if(h)return"auto"===o&&h&&(s.mapDefinition=h),this.getUrlList({lineId:a,definition:h});LG.log("已经降至最低级")}}}},{key:"apiMap",get:function(){var e={sg:{__PLAY_DOMAIN__:"https://vod.byteplusapi.com",__BACKUP_PLAY_DOMAIN__:"https://open.byteplusapi.com",__LOG_TEA_ID__:323254,__LOG_CHANNEL__:"sg",__UMD_PRE_PATH__:"https://sf-unpkg.bytepluscdn.com/obj/byteplusfe-sg/sdk/@byteplus/veplayer/1.10.0/plugin"}},t=e[this.region]||e.sg;return{playDomain:t.__PLAY_DOMAIN__,backupPlayDomain:t.__BACKUP_PLAY_DOMAIN__}}},{key:"playDomain",get:function(){var e;return this.playDomainDegrade&&null!==(e=this.apiMap.backupPlayDomain)&&void 0!==e?e:this.apiMap.playDomain}},{key:"setVodTeaId",value:function(){!function(e){yse.TEA_ID=e}(kV(this.region).__LOG_TEA_ID__||4951)}},{key:"updateConfigs",value:function(e){_I(this.configs,qD(e),(function(e,t){if(qC(e))return t}))}},{key:"updatePlayList",value:function(){var e,t=this.configs,n=t.url,i=t.playList,r=void 0===i?[]:i,o=t.urlExpireTimestamp,a=ib(e=qd(r)).call(e,(function(e){return e.url}));if(n&&!a.length){var s=dp(dp({},this.current),{},{url:n,urlExpireTimestamp:o});this.playList=[s]}else this.playList=a}},{key:"isVidPlay",value:function(){var e;return!(null===(e=this.configs)||void 0===e||null===(e=e.getVideoByToken)||void 0===e||!e.playAuthToken)}}]),e}();function zse(e,t){var n=kT(e);if(Lx){var i=Lx(e);t&&(i=ib(i).call(i,(function(t){return zP(e,t).enumerable}))),n.push.apply(n,i)}return n}function Use(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zse(Object(n),!0).forEach((function(t){Kse(e,t,n[t])})):$P?Object.defineProperties(e,$P(n)):zse(Object(n)).forEach((function(t){Object.defineProperty(e,t,zP(n,t))}))}return e}function Bse(){Bse=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},r="function"==typeof ZP?ZP:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(x){l=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof d?t:d,a=Object.create(o.prototype),s=new S(r||[]);return i(a,"_invoke",{value:b(e,n,s)}),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(x){return{type:"throw",arg:x}}}e.wrap=c;var h={};function d(){}function f(){}function p(){}var v={};l(v,o,(function(){return this}));var g=zx&&zx(zx(T([])));g&&g!==t&&n.call(g,o)&&(v=g);var y=p.prototype=d.prototype=Object.create(v);function m(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function r(i,o,a,s){var l=u(e[i],e,o);if("throw"!==l.type){var c=l.arg,h=c.value;return h&&"object"==Du(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){c.value=e,a(c)}),(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 b(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=k(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=u(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 k(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,k(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=u(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 E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function T(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var 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:C}}function C(){return{value:void 0,done:!0}}return f.prototype=p,i(y,"constructor",{value:p,configurable:!0}),i(p,"constructor",{value:f,configurable:!0}),f.displayName=l(p,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,l(e,s,"GeneratorFunction")),e.prototype=Object.create(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=rb);var a=new _(c(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)n.push(i);return LV(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=T,S.prototype={constructor:S,reset:function(e){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,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+Sx(t).call(t,1))&&(this[t]=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),w(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;w(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},e}function Fse(e,t,n,i,r,o,a){try{var s=e[o](a),l=s.value}catch(tSe){return void n(tSe)}s.done?t(l):rb.resolve(l).then(i,r)}function Hse(e){return function(){var t=this,n=arguments;return new rb((function(i,r){var o=e.apply(t,n);function a(e){Fse(o,i,r,a,s,"next",e)}function s(e){Fse(o,i,r,a,s,"throw",e)}a(void 0)}))}}function jse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gse(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),Object.defineProperty(e,Zse(i.key),i)}}function Vse(e,t,n){return t&&Gse(e.prototype,t),n&&Gse(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Kse(e,t,n){return(t=Zse(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wse(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qse(e,t)}function Yse(e){return(Yse=Object.setPrototypeOf?zx.bind():function(e){return e.__proto__||zx(e)})(e)}function qse(e,t){return(qse=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Xse(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $se(e){var t=function(){if("undefined"==typeof Reflect||!JP)return!1;if(JP.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(JP(Boolean,[],(function(){}))),!0}catch(cK){return!1}}();return function(){var n,i=Yse(e);if(t){var r=Yse(this).constructor;n=JP(i,arguments,r)}else n=i.apply(this,arguments);return function(e,t){if(t&&("object"===Du(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Xse(e)}(this,n)}}function Zse(e){var t=function(e,t){if("object"!==Du(e)||null===e)return e;var n=e[nA];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==Du(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Du(t)?t:String(t)}function Qse(e,t){var n=kT(e);if(Lx){var i=Lx(e);t&&(i=ib(i).call(i,(function(t){return zP(e,t).enumerable}))),n.push.apply(n,i)}return n}function Jse(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qse(Object(n),!0).forEach((function(t){sle(e,t,n[t])})):$P?Object.defineProperties(e,$P(n)):Qse(Object(n)).forEach((function(t){Object.defineProperty(e,t,zP(n,t))}))}return e}function ele(){ele=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},r="function"==typeof ZP?ZP:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(x){l=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof d?t:d,a=Object.create(o.prototype),s=new S(r||[]);return i(a,"_invoke",{value:b(e,n,s)}),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(x){return{type:"throw",arg:x}}}e.wrap=c;var h={};function d(){}function f(){}function p(){}var v={};l(v,o,(function(){return this}));var g=zx&&zx(zx(T([])));g&&g!==t&&n.call(g,o)&&(v=g);var y=p.prototype=d.prototype=Object.create(v);function m(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function r(i,o,a,s){var l=u(e[i],e,o);if("throw"!==l.type){var c=l.arg,h=c.value;return h&&"object"==Du(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){c.value=e,a(c)}),(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 b(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=k(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=u(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 k(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,k(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=u(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 E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function T(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var 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:C}}function C(){return{value:void 0,done:!0}}return f.prototype=p,i(y,"constructor",{value:p,configurable:!0}),i(p,"constructor",{value:f,configurable:!0}),f.displayName=l(p,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,l(e,s,"GeneratorFunction")),e.prototype=Object.create(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=rb);var a=new _(c(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)n.push(i);return LV(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=T,S.prototype={constructor:S,reset:function(e){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,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+Sx(t).call(t,1))&&(this[t]=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),w(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;w(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},e}function tle(e){return(tle="function"==typeof ZP&&"symbol"==typeof QP?function(e){return typeof e}:function(e){return e&&"function"==typeof ZP&&e.constructor===ZP&&e!==ZP.prototype?"symbol":typeof e})(e)}function nle(e,t,n,i,r,o,a){try{var s=e[o](a),l=s.value}catch(tSe){return void n(tSe)}s.done?t(l):rb.resolve(l).then(i,r)}function ile(e){return function(){var t=this,n=arguments;return new rb((function(i,r){var o=e.apply(t,n);function a(e){nle(o,i,r,a,s,"next",e)}function s(e){nle(o,i,r,a,s,"throw",e)}a(void 0)}))}}function rle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ole(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),Object.defineProperty(e,ble(i.key),i)}}function ale(e,t,n){return t&&ole(e.prototype,t),n&&ole(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function sle(e,t,n){return(t=ble(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lle(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ule(e,t)}function cle(e){return(cle=Object.setPrototypeOf?zx.bind():function(e){return e.__proto__||zx(e)})(e)}function ule(e,t){return(ule=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function hle(){if("undefined"==typeof Reflect||!JP)return!1;if(JP.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(JP(Boolean,[],(function(){}))),!0}catch(cK){return!1}}function dle(e,t,n){return(dle=hle()?JP.bind():function(e,t,n){var i=[null];i.push.apply(i,t);var r=new(Function.bind.apply(e,i));return n&&ule(r,n.prototype),r}).apply(null,arguments)}function fle(e){var t="function"==typeof hP?new hP:void 0;return fle=function(e){if(null===e||(n=e,-1===qP(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 dle(e,arguments,cle(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),ule(r,e)},fle(e)}function ple(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},o=kT(e);for(i=0;i<o.length;i++)n=o[i],qP(t).call(t,n)>=0||(r[n]=e[n]);return r}(e,t);if(Lx){var o=Lx(e);for(i=0;i<o.length;i++)n=o[i],qP(t).call(t,n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function vle(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gle(e){var t=hle();return function(){var n,i=cle(e);if(t){var r=cle(this).constructor;n=JP(i,arguments,r)}else n=i.apply(this,arguments);return function(e,t){if(t&&("object"===Du(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return vle(e)}(this,n)}}function yle(){return yle="undefined"!=typeof Reflect&&EP?EP.bind():function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=cle(e)););return e}(e,t);if(i){var r=zP(i,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},yle.apply(this,arguments)}function mle(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 _le(e,t){var n=void 0!==ZP&&eA(e)||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){var n;if(e){if("string"==typeof e)return mle(e,t);var i=Sx(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?tA(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?mle(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function ble(e){var t=function(e,t){if("object"!==Du(e)||null===e)return e;var n=e[nA];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==Du(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Du(t)?t:String(t)}var kle="network",Ele="network_timeout",wle="network_forbidden",Sle="network_notfound",Tle="network_range_not_satisfiable",Cle="demux",xle="remux",Dle="media",Ile="drm",Rle="other",Lle="runtime",Ple=(sle(Ose={},"manifest",{HLS:1100,DASH:1200}),sle(Ose,kle,2100),sle(Ose,Ele,2101),sle(Ose,wle,2103),sle(Ose,Sle,2104),sle(Ose,Tle,2116),sle(Ose,Cle,{FLV:3100,HLS:3200,MP4:3300,FMP4:3400,SIDX:3410}),sle(Ose,xle,{FMP4:4100,MP4:4200}),sle(Ose,Dle,{MEDIA_ERR_ABORTED:5101,MEDIA_ERR_NETWORK:5102,MEDIA_ERR_DECODE:5103,MEDIA_ERR_SRC_NOT_SUPPORTED:5104,MEDIA_ERR_CODEC_NOT_SUPPORTED:5105,MEDIA_ERR_URL_EMPTY:5106,MSE_ADD_SB:5200,MSE_APPEND_BUFFER:5201,MSE_OTHER:5202,MSE_FULL:5203,MSE_HIJACK:5204,EME_HIJACK:5301}),sle(Ose,Ile,{LICENSE:7100,CUSTOM_LICENSE:7200}),sle(Ose,Rle,8e3),sle(Ose,Lle,{NO_CANPLAY_ERROR:9001,BUFFERBREAK_ERROR:9002,WAITING_TIMEOUT_ERROR:9003}),Ose),Ale=function(e){lle(n,e);var t=gle(n);function n(e,i,r,o,a){var s;return rle(this,n),(s=t.call(this,a||(null==r?void 0:r.message))).errorType=e===Ele?kle:e,s.originError=r,s.ext=o,s.errorCode=Ple[e][i]||Ple[e],s.errorMessage=s.message,s.errorCode||(s.errorType=Rle,s.errorCode=Ple[s.errorType]),s}return ale(n,null,[{key:"create",value:function(e,t,i,r,o){return e instanceof n?e:(e instanceof Error&&(i=e,e=""),e||(e=Rle),new n(e,t,i,r,o))}},{key:"network",value:function(e){var t;return new n(null!=e&&e.isTimeout?Ele:kle,null,e instanceof Error?e:null,{url:null==e?void 0:e.url,response:null==e?void 0:e.response,httpCode:null==e||null===(t=e.response)||void 0===t?void 0:t.status})}}]),n}(fle(Error)),Ole=1,Mle=2,Nle=3,zle=4,Ule=["Boolean","Number","String","Undefined","Null","Date","Object"],Ble=function(){function e(t,n){rle(this,e),this.name=t||"",this._prefix="[".concat(this.name,"]"),e.disabled=(null==n?void 0:n.disabled)||!0,this.logCacheLevel=(null==n?void 0:n.logCacheLevel)||3,this.logMaxSize=(null==n?void 0:n.logMaxSize)||204800,this.logSize=0,this.logTextArray=[]}return ale(e,[{key:"debug",value:function(){for(var t,n,i,r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];this.logCache.apply(this,y_(t=[Ole]).call(t,o)),e.disabled||(i=console).debug.apply(i,y_(n=[this._prefix,Fle()]).call(n,o))}},{key:"log",value:function(){for(var t,n,i,r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];this.logCache.apply(this,y_(t=[Mle]).call(t,o)),e.disabled||(i=console).log.apply(i,y_(n=[this._prefix,Fle()]).call(n,o))}},{key:"warn",value:function(){for(var t,n,i,r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];this.logCache.apply(this,y_(t=[Nle]).call(t,o)),e.disabled||(i=console).warn.apply(i,y_(n=[this._prefix,Fle()]).call(n,o))}},{key:"error",value:function(){for(var t,n,i,r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];this.logCache.apply(this,y_(t=[zle]).call(t,o)),e.disabled||(i=console).error.apply(i,y_(n=[this._prefix,Fle()]).call(n,o))}},{key:"logCache",value:function(e){if(!(e<this.logCacheLevel)){var t="";try{for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];var o=W_(i).call(i,(function(e){return jle(e)}));t=this._prefix+Fle()+Hj(o)}catch(cK){return}if(e>=this.logCacheLevel&&(this.logSize+=t.length,this.logTextArray.push(t)),this.logSize>this.logMaxSize){var a=this.logTextArray.shift();this.logSize-=a.length}}}},{key:"getLogCache",value:function(){var e=this.logTextArray.join("\n");return this.reset(),e}},{key:"reset",value:function(){this.logTextArray=[],this.logSize=0}},{key:"table",value:function(){var t;e.disabled||(console.group(this._prefix),(t=console).table.apply(t,arguments),console.groupEnd())}},{key:"setLogLevel",value:function(e){this.logCacheLevel=e}}],[{key:"enable",value:function(){e.disabled=!1}},{key:"disable",value:function(){e.disabled=!0}}]),e}();function Fle(){return(new Date).toLocaleString()}function Hle(e){var t;if("object"!==tle(e))return e;var n=Sx(t=Object.prototype.toString.call(e)).call(t,8,-1);switch(n){case"Array":case"Uint8Array":case"ArrayBuffer":return n+"["+e.length+"]";case"Object":return"{}";default:return n}}function jle(e,t,n){var i;n||(n=1),t||(t=2);var r={};if(!e||"object"!==tle(e))return e;var o=Sx(i=Object.prototype.toString.call(e)).call(i,8,-1);if(!F_(Ule).call(Ule,o))return o;if(!(n>t)){for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(n===t?r[a]=Hle(e[a]):"object"===tle(e[a])?r[a]=jle(e[a],t,n+1):r[a]=e[a]);return r}}sle(Ble,"disabled",!0);var Gle="fetch",Vle="xhr",Kle="arraybuffer",Wle="text",Yle="json",qle=function(e){lle(n,e);var t=gle(n);function n(e,i,r,o){var a;return rle(this,n),sle(vle(a=t.call(this,o)),"retryCount",0),sle(vle(a),"isTimeout",!1),sle(vle(a),"loaderType",Gle),sle(vle(a),"startTime",0),sle(vle(a),"endTime",0),sle(vle(a),"options",{}),a.url=e,a.request=i,a.response=r,a}return ale(n)}(fle(Error)),Xle=Object.prototype.toString;function $le(e){if("[object Object]"!==Xle.call(e))return!1;var t=zx(e);return null===t||t===Object.prototype}function Zle(e){if(e&&null!==e[0]&&void 0!==e[0]&&(0!==e[0]||null!==e[1]&&void 0!==e[1])){var t="bytes="+e[0]+"-";return e[1]&&(t+=e[1]),t}}function Qle(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Jle(e,t){var n,i;if(e){if(!t)return e;var r,o=ib(n=W_(i=kT(t)).call(i,(function(e){if(null!=(r=t[e]))return Array.isArray(r)?e+="[]":r=[r],W_(r).call(r,(function(t){var n,i;return i=t,"[object Date]"===Xle.call(i)?t=t.toISOString():function(e){return null!==e&&"object"===tle(e)}(t)&&(t=Hj(t)),y_(n="".concat(Qle(e),"=")).call(n,Qle(t))})).join("&")}))).call(n,Boolean).join("&");if(o){var a=qP(e).call(e,"#");-1!==a&&(e=Sx(e).call(e,0,a)),e+=(-1===qP(e).call(e,"?")?"?":"&")+o}return e}}function ece(e,t,n,i,r,o,a,s,l,c,u){return r=null!=r?parseFloat(r):null,i=parseInt(i||"0",10),XP(i)&&(i=0),{data:e,done:t,options:{range:l,vid:c,index:s,contentLength:i,age:r,startTime:o,firstByteTime:a,endTime:Date.now(),priOptions:u},response:n}}function tce(e,t){return Math.round(8*e*1e3/t/1024)}var nce="error",ice="core.ttfb",rce="core.loadstart",oce="core.loadresponseheaders",ace="core.loadcomplete",sce="core.loadretry",lce="core.metadataparsed",cce="real_time_speed",uce=2097152,hce=function(e){lle(i,e);var t,n=gle(i);function i(){var e;return rle(this,i),sle(vle(e=n.call(this)),"_abortController",null),sle(vle(e),"_timeoutTimer",null),sle(vle(e),"_reader",null),sle(vle(e),"_response",null),sle(vle(e),"_aborted",!1),sle(vle(e),"_index",-1),sle(vle(e),"_range",null),sle(vle(e),"_receivedLength",0),sle(vle(e),"_running",!1),sle(vle(e),"_logger",null),sle(vle(e),"_vid",""),sle(vle(e),"_onProcessMinLen",0),sle(vle(e),"_onCancel",null),sle(vle(e),"_priOptions",null),e}return ale(i,[{key:"load",value:function(e){var t,n=this,i=e.url,r=e.vid,o=e.timeout,a=e.responseType,s=e.onProgress,l=e.index,c=e.onTimeout,u=e.onCancel,h=e.range,d=e.transformResponse,f=e.request,p=e.params,v=e.logger,g=e.method,y=e.headers,m=e.body,_=e.mode,b=e.credentials,k=e.cache,E=e.redirect,w=e.referrer,S=e.referrerPolicy,T=e.onProcessMinLen,C=e.priOptions;this._logger=v,this._aborted=!1,this._onProcessMinLen=T,this._onCancel=u,this._abortController="undefined"!=typeof AbortController&&new AbortController,this._running=!0,this._index=l,this._range=h||[0,0],this._vid=r||i,this._priOptions=C||{};var x={method:g,headers:y,body:m,mode:_,credentials:b,cache:k,redirect:E,referrer:w,referrerPolicy:S,signal:null===(t=this._abortController)||void 0===t?void 0:t.signal},D=!1;clearTimeout(this._timeoutTimer),i=Jle(i,p);var I=Zle(h);I&&(y=f?f.headers:x.headers=x.headers||(Headers?new Headers:{}),Headers&&y instanceof Headers?y.append("Range",I):y.Range=I),o&&(this._timeoutTimer=setTimeout((function(){if(D=!0,n.cancel(),c){var e=new qle(i,x,null,"timeout");e.isTimeout=!0,c(e,{index:n._index,range:n._range,vid:n._vid,priOptions:n._priOptions})}}),o));var R=Date.now();return this._logger.debug("[fetch load start], index,",l,",range,",h),new rb((function(e,t){fetch(f||i,f?void 0:x).then(function(){var r=ile(ele().mark((function r(o){var c,u,f,p;return ele().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(clearTimeout(n._timeoutTimer),n._response=o,!n._aborted&&n._running){r.next=4;break}return r.abrupt("return");case 4:if(d&&(o=d(o,i)||o),o.ok){r.next=7;break}throw new qle(i,x,o,"bad network response");case 7:if(c=Date.now(),a!==Wle){r.next=15;break}return r.next=11,o.text();case 11:u=r.sent,n._running=!1,r.next=37;break;case 15:if(a!==Yle){r.next=22;break}return r.next=18,o.json();case 18:u=r.sent,n._running=!1,r.next=37;break;case 22:if(!s){r.next=29;break}return n.resolve=e,n.reject=t,n._loadChunk(o,s,R,c),r.abrupt("return");case 29:return r.next=31,o.arrayBuffer();case 31:u=r.sent,u=new Uint8Array(u),n._running=!1,f=Date.now()-R,p=tce(u.byteLength,f),n.emit(cce,{speed:p,len:u.byteLength,time:f,vid:n._vid,index:n._index,range:n._range,priOptions:n._priOptions});case 37:n._logger.debug("[fetch load end], index,",l,",range,",h),e(ece(u,!0,o,o.headers.get("Content-Length"),o.headers.get("age"),R,c,l,h,n._vid,n._priOptions));case 39:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}()).catch((function(e){var r;clearTimeout(n._timeoutTimer),n._running=!1,n._aborted&&!D||((e=e instanceof qle?e:new qle(i,x,null,null===(r=e)||void 0===r?void 0:r.message)).startTime=R,e.endTime=Date.now(),e.isTimeout=D,e.options={index:n._index,range:n._range,vid:n._vid,priOptions:n._priOptions},t(e))}))}))}},{key:"cancel",value:(t=ile(ele().mark((function e(){return ele().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._aborted){e.next=2;break}return e.abrupt("return");case 2:if(this._aborted=!0,this._running=!1,!this._response){e.next=14;break}if(e.prev=5,!this._reader){e.next=9;break}return e.next=9,this._reader.cancel();case 9:e.next=13;break;case 11:e.prev=11,e.t0=e.catch(5);case 13:this._response=this._reader=null;case 14:if(this._abortController){try{this._abortController.abort()}catch(tSe){}this._abortController=null}this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions});case 16:case"end":return e.stop()}}),e,this,[[5,11]])}))),function(){return t.apply(this,arguments)})},{key:"_loadChunk",value:function(e,t,n,i){var r=this;if(!e.body||!e.body.getReader){this._running=!1;var o=new qle(e.url,"",e,"onProgress of bad response.body.getReader");return o.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},void this.reject(o)}this._onProcessMinLen>0&&(this._cache=new Uint8Array(uce),this._writeIdx=0);var a,s,l,c=this._reader=e.body.getReader(),u=function(){var o=ile(ele().mark((function o(){var h,d,f,p,v,g,y,m;return ele().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return s=Date.now(),o.prev=1,o.next=4,c.read();case 4:a=o.sent,l=Date.now(),o.next=13;break;case 8:return o.prev=8,o.t0=o.catch(1),l=Date.now(),r._aborted||(r._running=!1,o.t0.options={index:r._index,range:r._range,vid:r._vid,priOptions:r._priOptions},r.reject(o.t0)),o.abrupt("return");case 13:if(d=(null===(h=r._range)||void 0===h?void 0:h.length)>0?r._range[0]:0,f=d+r._receivedLength,!r._aborted){o.next=19;break}return r._running=!1,t(void 0,!1,{range:[f,f],vid:r._vid,index:r._index,startTime:s,endTime:l,st:n,firstByteTime:i,priOptions:r._priOptions},e),o.abrupt("return");case 19:var _;if(p=a.value?a.value.byteLength:0,r._receivedLength+=p,r._logger.debug("【fetchLoader,onProgress call】,task,",r._range,", start,",f,", end,",d+r._receivedLength,", done,",a.done),r._onProcessMinLen>0){if(r._writeIdx+p>=r._onProcessMinLen||a.done)(v=new Uint8Array(r._writeIdx+p)).set(Sx(_=r._cache).call(_,0,r._writeIdx),0),p>0&&v.set(a.value,r._writeIdx),r._writeIdx=0,r._logger.debug("【fetchLoader,onProgress enough】,done,",a.done,",len,",v.byteLength,", writeIdx,",r._writeIdx);else if(p>0&&r._writeIdx+p<uce)r._cache.set(a.value,r._writeIdx),r._writeIdx+=p,r._logger.debug("【fetchLoader,onProgress cache】,len,",p,", writeIdx,",r._writeIdx);else if(p>0){var b;g=new Uint8Array(r._writeIdx+p+2048),r._logger.debug("【fetchLoader,onProgress extra start】,size,",r._writeIdx+p+2048,", datalen,",p,", writeIdx,",r._writeIdx),g.set(Sx(b=r._cache).call(b,0,r._writeIdx),0),p>0&&g.set(a.value,r._writeIdx),r._writeIdx+=p,delete r._cache,r._cache=g,r._logger.debug("【fetchLoader,onProgress extra end】,len,",p,", writeIdx,",r._writeIdx)}}else v=a.value;(v&&v.byteLength>0||a.done)&&t(v,a.done,{range:[r._range[0]+r._receivedLength-(v?v.byteLength:0),r._range[0]+r._receivedLength],vid:r._vid,index:r._index,startTime:s,endTime:l,st:n,firstByteTime:i,priOptions:r._priOptions},e),a.done?(y=Date.now()-n,m=tce(r._receivedLength,y),r.emit(cce,{speed:m,len:r._receivedLength,time:y,vid:r._vid,index:r._index,range:r._range,priOptions:r._priOptions}),r._running=!1,r._logger.debug("[fetchLoader onProgress end],task,",r._range,",done,",a.done),r.resolve(ece(a,!0,e,e.headers.get("Content-Length"),e.headers.get("age"),n,i,r._index,r._range,r._vid,r._priOptions))):u();case 25:case"end":return o.stop()}}),o,null,[[1,8]])})));return function(){return o.apply(this,arguments)}}();u()}},{key:"receiveLen",get:function(){return this._receivedLength}},{key:"running",get:function(){return this._running},set:function(e){this._running=e}}],[{key:"isSupported",value:function(){return!("undefined"==typeof fetch)}}]),i}(EA);var dce=function(e){lle(n,e);var t=gle(n);function n(){var e;return rle(this,n),sle(vle(e=t.call(this)),"_xhr",null),sle(vle(e),"_aborted",!1),sle(vle(e),"_timeoutTimer",null),sle(vle(e),"_range",null),sle(vle(e),"_receivedLength",0),sle(vle(e),"_url",null),sle(vle(e),"_onProgress",null),sle(vle(e),"_index",-1),sle(vle(e),"_headers",null),sle(vle(e),"_currentChunkSizeKB",384),sle(vle(e),"_timeout",null),sle(vle(e),"_xhr",null),sle(vle(e),"_withCredentials",null),sle(vle(e),"_startTime",-1),sle(vle(e),"_loadCompleteResolve",null),sle(vle(e),"_loadCompleteReject",null),sle(vle(e),"_runing",!1),sle(vle(e),"_logger",!1),sle(vle(e),"_vid",""),sle(vle(e),"_responseType",void 0),sle(vle(e),"_credentials",void 0),sle(vle(e),"_method",void 0),sle(vle(e),"_transformResponse",void 0),sle(vle(e),"_firstRtt",void 0),sle(vle(e),"_onCancel",null),sle(vle(e),"_priOptions",null),e}return ale(n,[{key:"load",value:function(e){var t=this;clearTimeout(this._timeoutTimer),this._logger=e.logger,this._range=e.range,this._onProgress=e.onProgress,this._index=e.index,this._headers=e.headers,this._withCredentials="include"===e.credentials||"same-origin"===e.credentials,this._body=e.body||null,e.method&&(this._method=e.method),this._timeout=e.timeout||null,this._runing=!0,this._vid=e.vid||e.url,this._responseType=e.responseType,this._firstRtt=-1,this._onTimeout=e.onTimeout,this._onCancel=e.onCancel,this._request=e.request,this._priOptions=e.priOptions||{},this._logger.debug("【xhrLoader task】, range",this._range),this._url=Jle(e.url,e.params);var n=Date.now();return new rb((function(e,n){t._loadCompleteResolve=e,t._loadCompleteReject=n,t._startLoad()})).catch((function(e){if(clearTimeout(t._timeoutTimer),t._runing=!1,!t._aborted)throw(e=e instanceof qle?e:new qle(t._url,t._request)).startTime=n,e.endTime=Date.now(),e.options={index:t._index,vid:t._vid,priOptions:t._priOptions},e}))}},{key:"_startLoad",value:function(){var e=null;if(this._responseType===Kle&&this._range&&this._range.length>1)if(this._onProgress){this._firstRtt=-1;var t=1024*this._currentChunkSizeKB,n=this._range[0]+this._receivedLength,i=this._range[1];t<this._range[1]-n&&(i=n+t),e=[n,i],this._logger.debug("[xhr_loader->],tast :",this._range,", SubRange, ",e)}else e=this._range,this._logger.debug("[xhr_loader->],tast :",this._range,", allRange, ",e);this._internalOpen(e)}},{key:"_internalOpen",value:function(e){var t=this;try{this._startTime=Date.now();var n=this._xhr=new XMLHttpRequest;n.open(this._method||"GET",this._url,!0),n.responseType=this._responseType,this._timeout&&(n.timeout=this._timeout),n.withCredentials=this._withCredentials,n.onload=this._onLoad.bind(this),n.onreadystatechange=this._onReadyStatechange.bind(this),n.onerror=function(e){var n,i,r;t._running=!1;var o=new qle(t._url,t._request,null==e||null===(n=e.currentTarget)||void 0===n?void 0:n.response,"xhr.onerror.status:"+(null==e||null===(i=e.currentTarget)||void 0===i?void 0:i.status)+",statusText,"+(null==e||null===(r=e.currentTarget)||void 0===r?void 0:r.statusText));o.options={index:t._index,range:t._range,vid:t._vid,priOptions:t._priOptions},t._loadCompleteReject(o)},n.ontimeout=function(e){t.cancel();var n=new qle(t._url,t._request,{status:408},"timeout");t._onTimeout&&(n.isTimeout=!0,t._onTimeout(n,{index:t._index,range:t._range,vid:t._vid,priOptions:t._priOptions})),n.options={index:t._index,range:t._range,vid:t._vid,priOptions:t._priOptions},t._loadCompleteReject(n)};var i=this._headers||{},r=Zle(e);r&&(i.Range=r),i&&kT(i).forEach((function(e){n.setRequestHeader(e,i[e])})),this._logger.debug("[xhr.send->] tast,",this._range,",load sub range, ",e),n.send(this._body)}catch(cK){cK.options={index:this._index,range:e,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(cK)}}},{key:"_onReadyStatechange",value:function(e){2===e.target.readyState&&this._firstRtt<0&&(this._firstRtt=Date.now())}},{key:"_onLoad",value:function(e){var t,n=e.target.status;if(n<200||n>299){var i=new qle(this._url,null,Jse(Jse({},e.target.response),{},{status:n}),"bad response,status:"+n);return i.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(i)}var r,o=null,a=!1,s=(null===(t=this._range)||void 0===t?void 0:t.length)>0?this._range[0]:0;if(this._responseType===Kle){var l,c=new Uint8Array(e.target.response);if(r=s+this._receivedLength,c&&c.byteLength>0){this._receivedLength+=c.byteLength;var u=Date.now()-this._startTime,h=tce(this._receivedLength,u);this.emit(cce,{speed:h,len:this._receivedLength,time:u,vid:this._vid,index:this._index,range:[r,s+this._receivedLength],priOptions:this._priOptions})}o=c,a=!((null===(l=this._range)||void 0===l?void 0:l.length)>1&&this._range[1]&&this._receivedLength<this._range[1]-this._range[0]),this._logger.debug("[xhr load done->], tast :",this._range,", start",r,"end ",s+this._receivedLength,",dataLen,",c?c.byteLength:0,",receivedLength",this._receivedLength,",index,",this._index,", done,",a)}else a=!0,o=e.target.response;var d={ok:n>=200&&n<300,status:n,statusText:this._xhr.statusText,url:this._xhr.responseURL,headers:this._getHeaders(this._xhr),body:this._xhr.response};this._transformResponse&&(d=this._transformResponse(d,this._url)||d),this._onProgress&&this._onProgress(o,a,{index:this._index,vid:this._vid,range:[r,s+this._receivedLength],startTime:this._startTime,endTime:Date.now(),priOptions:this._priOptions},d),a?(this._runing=!1,this._loadCompleteResolve&&this._loadCompleteResolve(ece(this._onProgress?null:o,a,d,d.headers["content-length"],d.headers.age,this._startTime,this._firstRtt,this._index,this._range,this._vid,this._priOptions))):this._startLoad()}},{key:"cancel",value:function(){if(!this._aborted)return this._aborted=!0,this._runing=!1,yle(cle(n.prototype),"removeAllListeners",this).call(this),this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions}),this._xhr?this._xhr.abort():void 0}},{key:"receiveLen",get:function(){return this._receivedLength}},{key:"running",get:function(){return this._running},set:function(e){this._running=e}},{key:"_getHeaders",value:function(e){var t,n,i={},r=_le(nO(t=e.getAllResponseHeaders()).call(t).split("\r\n"));try{for(r.s();!(n=r.n()).done;){var o=n.value.split(": ");i[o[0].toLowerCase()]=Sx(o).call(o,1).join(": ")}}catch(a){r.e(a)}finally{r.f()}return i}}],[{key:"isSupported",value:function(){return"undefined"!=typeof XMLHttpRequest}}]),n}(EA),fce=["retry","retryDelay","onRetryError","transformError"],pce=function(){function e(t,n){var i,r,o;rle(this,e),this.promise=((o=new rb((function(e,t){i=e,r=t}))).used=!1,o.resolve=function(){return o.used=!0,i.apply(void 0,arguments)},o.reject=function(){return o.used=!0,r.apply(void 0,arguments)},o),this.alive=!!n.onProgress,!n.logger&&(n.logger=new Ble("Loader")),this._loaderType=t,this._loader=t===Gle&&window.fetch?new hce:new dce,this._config=n,this._retryCount=0,this._retryTimer=null,this._canceled=!1,this._retryCheckFunc=n.retryCheckFunc,this._logger=n.logger}var t;return ale(e,[{key:"exec",value:function(){var e=this,t=this._config,n=t.retry,i=t.retryDelay,r=t.onRetryError,o=t.transformError,a=ple(t,fce),s=function(){var t=ile(ele().mark((function t(){var l,c,u;return ele().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e._loader.load(a);case 3:l=t.sent,e.promise.resolve(l),t.next=27;break;case 7:if(t.prev=7,t.t0=t.catch(0),e._loader.running=!1,e._logger.debug("[task request catch err]",t.t0),!e._canceled){t.next=13;break}return t.abrupt("return");case 13:if(t.t0.loaderType=e._loaderType,t.t0.retryCount=e._retryCount,c=t.t0,o&&(c=o(c)||c),r&&e._retryCount>0&&r(c,e._retryCount,{index:a.index,vid:a.vid,range:a.range,priOptions:a.priOptions}),e._retryCount++,u=!0,e._retryCheckFunc&&(u=e._retryCheckFunc(t.t0)),!(u&&e._retryCount<=n)){t.next=26;break}return clearTimeout(e._retryTimer),e._logger.debug("[task request setTimeout],retry",e._retryCount,",retry range,",a.range),e._retryTimer=setTimeout(s,i),t.abrupt("return");case 26:e.promise.reject(c);case 27:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(){return t.apply(this,arguments)}}();return s(),this.promise}},{key:"cancel",value:(t=ile(ele().mark((function e(){return ele().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return clearTimeout(this._retryTimer),this._canceled=!0,this._loader.running=!1,e.abrupt("return",this._loader.cancel());case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"running",get:function(){return this._loader&&this._loader.running}},{key:"loader",get:function(){return this._loader}}]),e}();function vce(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new rb((function(t){return setTimeout(t,e)}))}var gce=function(e){lle(i,e);var t,n=gle(i);function i(e){var t;return rle(this,i),sle(vle(t=n.call(this,e)),"type",Gle),sle(vle(t),"_queue",[]),sle(vle(t),"_alive",[]),sle(vle(t),"_currentTask",null),sle(vle(t),"_config",void 0),t._config=function(e){return Jse({loaderType:Gle,retry:0,retryDelay:0,timeout:0,request:null,onTimeout:void 0,onProgress:void 0,onRetryError:void 0,transformRequest:void 0,transformResponse:void 0,transformError:void 0,responseType:Wle,range:void 0,url:"",params:void 0,method:"GET",headers:{},body:void 0,mode:void 0,credentials:void 0,cache:void 0,redirect:void 0,referrer:void 0,referrerPolicy:void 0,integrity:void 0,onProcessMinLen:0},e)}(e),t._config.loaderType!==Vle&&hce.isSupported()||(t.type=Vle),t.log=e.logger,t}return ale(i,[{key:"isFetch",value:function(){return this.type===Gle}},{key:"load",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"!=typeof e&&e?n=e:n.url=e||n.url||this._config.url,(n=VS({},this._config,n)).params&&(n.params=VS({},n.params)),n.headers&&$le(n.headers)&&(n.headers=VS({},n.headers)),n.body&&$le(n.body)&&(n.body=VS({},n.body)),n.transformRequest&&(n=n.transformRequest(n)||n),n.logger=this.log;var i=new pce(this.type,n);return i.loader.on(cce,(function(e){t.emit(cce,e)})),this._queue.push(i),1!==this._queue.length||this._currentTask&&this._currentTask.running||this._processTask(),i.promise}},{key:"cancel",value:(t=ile(ele().mark((function e(){var t;return ele().wrap((function(e){for(var n,i,r;;)switch(e.prev=e.next){case 0:return t=y_(n=W_(i=this._queue).call(i,(function(e){return e.cancel()}))).call(n,W_(r=this._alive).call(r,(function(e){return e.cancel()}))),this._currentTask&&t.push(this._currentTask.cancel()),this._queue=[],this._alive=[],e.next=6,rb.all(t);case 6:return e.next=8,vce();case 8:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"_processTask",value:function(){var e=this;if(this._currentTask=this._queue.shift(),this._currentTask){this._currentTask.alive&&this._alive.push(this._currentTask);var t=this._currentTask.exec().catch((function(e){}));t&&"function"==typeof t.finally&&t.finally((function(){var t,n,i;null!==(t=e._currentTask)&&void 0!==t&&t.alive&&(null===(n=e._alive)||void 0===n?void 0:n.length)>0&&(e._alive=ib(i=e._alive).call(i,(function(t){return t&&t!==e._currentTask})));e._processTask()}))}}}],[{key:"isFetchSupport",value:function(){return hce.isSupported()}}]),i}(EA),yce="core.rtcstatechange",mce={},_ce={},bce={exports:{}},kce=bce.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(e){return e.encoding?"rtpmap:%d %s/%s/%s":e.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(e){return null!=e.address?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%s trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(e){return null!=e.subtype?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:(\d+)(?:\/(\w+))?(?: (urn:ietf:params:rtp-hdrext:encrypt))? (\S*)(?: (\S*))?/,names:["value","direction","encrypt-uri","uri","config"],format:function(e){return"extmap:%d"+(e.direction?"/%s":"%v")+(e["encrypt-uri"]?" %s":"%v")+" %s"+(e.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(e){return null!=e.sessionConfig?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"connectionType",reg:/^connection:(new|existing)/,format:"connection:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*(?:\.\d*)*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*(?:\.\d*)*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation","network-id","network-cost"],format:function(e){var t="candidate:%s %d %s %d %s %d typ %s";return t+=null!=e.raddr?" raddr %s rport %d":"%v%v",t+=null!=e.tcptype?" tcptype %s":"%v",null!=e.generation&&(t+=" generation %d"),t+=null!=e["network-id"]?" network-id %d":"%v",t+=null!=e["network-cost"]?" network-cost %d":"%v"}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_-]*)(?::(.*))?/,names:["id","attribute","value"],format:function(e){var t="ssrc:%d";return null!=e.attribute&&(t+=" %s",null!=e.value&&(t+=":%s")),t}},{push:"ssrcGroups",reg:/^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{name:"sctpmap",reg:/^sctpmap:([\w_/]*) (\S*)(?: (\S*))?/,names:["sctpmapNumber","app","maxMessageSize"],format:function(e){return null!=e.maxMessageSize?"sctpmap:%s %s %s":"sctpmap:%s %s"}},{name:"xGoogleFlag",reg:/^x-google-flag:([^\s]*)/,format:"x-google-flag:%s"},{push:"rids",reg:/^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,names:["id","direction","params"],format:function(e){return e.params?"rid:%s %s %s":"rid:%s %s"}},{push:"imageattrs",reg:new RegExp("^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"),names:["pt","dir1","attrs1","dir2","attrs2"],format:function(e){return"imageattr:%s %s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast",reg:new RegExp("^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"),names:["dir1","list1","dir2","list2"],format:function(e){return"simulcast:%s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast_03",reg:/^simulcast:[\s\t]+([\S+\s\t]+)$/,names:["value"],format:"simulcast: %s"},{name:"framerate",reg:/^framerate:(\d+(?:$|\.\d+))/,format:"framerate:%s"},{name:"sourceFilter",reg:/^source-filter: *(excl|incl) (\S*) (IP4|IP6|\*) (\S*) (.*)/,names:["filterMode","netType","addressTypes","destAddress","srcList"],format:"source-filter: %s %s %s %s %s"},{name:"bundleOnly",reg:/^(bundle-only)/},{name:"label",reg:/^label:(.+)/,format:"label:%s"},{name:"sctpPort",reg:/^sctp-port:(\d+)$/,format:"sctp-port:%s"},{name:"maxMessageSize",reg:/^max-message-size:(\d+)$/,format:"max-message-size:%s"},{push:"tsRefClocks",reg:/^ts-refclk:([^\s=]*)(?:=(\S*))?/,names:["clksrc","clksrcExt"],format:function(e){return"ts-refclk:%s"+(null!=e.clksrcExt?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(e){var t="mediaclk:";return t+=null!=e.id?"id=%s %s":"%v%s",t+=null!=e.mediaClockValue?"=%s":"",t+=null!=e.rateNumerator?" rate=%s":"",t+=null!=e.rateDenominator?"/%s":""}},{name:"keywords",reg:/^keywds:(.+)$/,format:"keywds:%s"},{name:"content",reg:/^content:(.+)/,format:"content:%s"},{name:"bfcpFloorCtrl",reg:/^floorctrl:(c-only|s-only|c-s)/,format:"floorctrl:%s"},{name:"bfcpConfId",reg:/^confid:(\d+)/,format:"confid:%s"},{name:"bfcpUserId",reg:/^userid:(\d+)/,format:"userid:%s"},{name:"bfcpFloorId",reg:/^floorid:(.+) (?:m-stream|mstrm):(.+)/,names:["id","mStream"],format:"floorid:%s mstrm:%s"},{push:"invalid",names:["value"]}]};kT(kce).forEach((function(e){kce[e].forEach((function(e){e.reg||(e.reg=/(.*)/),e.format||(e.format="%s")}))}));var Ece=bce.exports;!function(e){var t=function(e){return String(Number(e))===e?Number(e):e},n=function(e,n,i){var r=e.name&&e.names;e.push&&!n[e.push]?n[e.push]=[]:r&&!n[e.name]&&(n[e.name]={});var o=e.push?{}:r?n[e.name]:n;!function(e,n,i,r){if(r&&!i)n[r]=t(e[1]);else for(var o=0;o<i.length;o+=1)null!=e[o+1]&&(n[i[o]]=t(e[o+1]))}(i.match(e.reg),o,e.names,e.name),e.push&&n[e.push].push(o)},i=Ece,r=RegExp.prototype.test.bind(/^([a-z])=(.*)/);e.parse=function(e){var t,o={},a=[],s=o;return ib(t=e.split(/(\r\n|\r|\n)/)).call(t,r).forEach((function(e){var t=e[0],r=Sx(e).call(e,2);"m"===t&&(a.push({rtp:[],fmtp:[]}),s=a[a.length-1]);for(var o=0;o<(i[t]||[]).length;o+=1){var l=i[t][o];if(l.reg.test(r))return n(l,s,r)}})),o.media=a,o};var o=function(e,n){var i=n.split(/=(.+)/,2);return 2===i.length?e[i[0]]=t(i[1]):1===i.length&&n.length>1&&(e[i[0]]=void 0),e};e.parseParams=function(e){var t;return AT(t=e.split(/;\s?/)).call(t,o,{})},e.parseFmtpConfig=e.parseParams,e.parsePayloads=function(e){var t;return W_(t=e.toString().split(" ")).call(t,Number)},e.parseRemoteCandidates=function(e){for(var n,i=[],r=W_(n=e.split(" ")).call(n,t),o=0;o<r.length;o+=3)i.push({component:r[o],ip:r[o+1],port:r[o+2]});return i},e.parseImageAttributes=function(e){var t;return W_(t=e.split(" ")).call(t,(function(e){var t;return AT(t=e.substring(1,e.length-1).split(",")).call(t,o,{})}))},e.parseSimulcastStreamList=function(e){var n;return W_(n=e.split(";")).call(n,(function(e){var n;return W_(n=e.split(",")).call(n,(function(e){var n,i=!1;return"~"!==e[0]?n=t(e):(n=t(e.substring(1,e.length)),i=!0),{scid:n,paused:i}}))}))}}(_ce);var wce=Ece,Sce=/%[sdv%]/g,Tce=function(e){var t=1,n=arguments,i=n.length;return e.replace(Sce,(function(e){if(t>=i)return e;var r=n[t];switch(t+=1,e){case"%%":return"%";case"%s":return String(r);case"%d":return Number(r);case"%v":return""}}))},Cce=function(e,t,n){var i=[e+"="+(t.format instanceof Function?t.format(t.push?n:n[t.name]):t.format)];if(t.names)for(var r=0;r<t.names.length;r+=1){var o=t.names[r];t.name?i.push(n[t.name][o]):i.push(n[t.names[r]])}else i.push(n[t.name]);return Tce.apply(null,i)},xce=["v","o","s","i","u","e","p","c","b","t","r","z","a"],Dce=["i","c","b","a"],Ice=_ce,Rce=function(e,t){t=t||{},null==e.version&&(e.version=0),null==e.name&&(e.name=" "),e.media.forEach((function(e){null==e.payloads&&(e.payloads="")}));var n=t.outerOrder||xce,i=t.innerOrder||Dce,r=[];return n.forEach((function(t){wce[t].forEach((function(n){n.name in e&&null!=e[n.name]?r.push(Cce(t,n,e)):n.push in e&&null!=e[n.push]&&e[n.push].forEach((function(e){r.push(Cce(t,n,e))}))}))})),e.media.forEach((function(e){r.push(Cce("m",wce.m[0],e)),i.forEach((function(t){wce[t].forEach((function(n){n.name in e&&null!=e[n.name]?r.push(Cce(t,n,e)):n.push in e&&null!=e[n.push]&&e[n.push].forEach((function(e){r.push(Cce(t,n,e))}))}))}))})),r.join("\r\n")+"\r\n"};function Lce(e){return new rb((function(t){var n;null===(n=e.getStats(null))||void 0===n||n.then((function(e){var n,i;t((i=[],(n=e).forEach((function(e){"inbound-rtp"===e.type&&i.push(e)})),W_(i).call(i,(function(e){var t=n.get(e.codecId),i=n.get(e.trackId);return{type:e.mediaType,inboundRtp:e,codec:t,track:i}}))))}))})).catch((function(){}))}mce.write=Rce,mce.parse=Ice.parse,mce.parseParams=Ice.parseParams,mce.parseFmtpConfig=Ice.parseFmtpConfig,mce.parsePayloads=Ice.parsePayloads,mce.parseRemoteCandidates=Ice.parseRemoteCandidates,mce.parseImageAttributes=Ice.parseImageAttributes,mce.parseSimulcastStreamList=Ice.parseSimulcastStreamList;var Pce=new Ble("rts"),Ace=function(e){Wse(r,e);var t,n,i=$se(r);function r(e){var t;return jse(this,r),Kse(Xse(t=i.call(this)),"_url",""),Kse(Xse(t),"_pc",null),Kse(Xse(t),"_audioTransceicer",null),Kse(Xse(t),"_videoTransceicer",null),Kse(Xse(t),"_mediaStream",null),Kse(Xse(t),"_media",null),Kse(Xse(t),"_opts",null),Kse(Xse(t),"_loader",null),Kse(Xse(t),"_retry",0),Kse(Xse(t),"_waitingTimer",0),Kse(Xse(t),"_rctConnectStartTs",0),Kse(Xse(t),"_onTrack",(function(e){if(Pce.log("addTrack: ",e.track,e.streams),t["_".concat(e.track.kind)]=e.track,!t._mediaStream){t._mediaStream=new MediaStream,t._media.srcObject=t._mediaStream;var n=t._media.play();n&&n.catch&&n.catch((function(e){}))}t._mediaStream.addTrack(e.track)})),Kse(Xse(t),"_mockWaitingByTimeupdate",(function(){var e,n;"connected"!==(null===(e=t._pc)||void 0===e?void 0:e.connectionState)&&"connected"!==(null===(n=t._pc)||void 0===n?void 0:n.iceConnectionState)||(clearTimeout(t._waitingTimer),t._waitingTimer=setTimeout((function(){var e;null!==(e=t._media)&&void 0!==e&&e.paused||t.emit("waiting")}),t._opts.stallInterval))})),Kse(Xse(t),"_onLoadedData",(function(){Pce.log("loadeddata emit"),t.getStatsSnapshoot().then((function(e){t.emit(lce,{type:"video",elapsed:Date.now()-t._rctConnectStartTs,meta:e.video}),t.emit(lce,{type:"audio",elapsed:Date.now()-t._rctConnectStartTs,meta:e.audio})}))})),Kse(Xse(t),"_onLoaderRetry",(function(e,n){t.emit(sce,{error:Ale.network(e),retryTime:n})})),t._opts=function(e){return Use({retryCount:0,retryDelay:1e3,loadTimeout:5e3,stallInterval:400,delayHint:0},e)}(e),t._media=t._opts.media,t._loader=new gce(Use(Use({},e.fetchOptions),{},{responseType:"json",method:"POST",retry:t._opts.retryCount,retryDelay:t._opts.retryDelay,timeout:t._opts.loadTimeout,onRetryError:t._onLoaderRetry,logger:Pce})),t._retry=t._opts.retryCount,t._bindMediaEvent(),t}return Vse(r,[{key:"pc",get:function(){return this._pc}},{key:"audioTrack",get:function(){return this._audio}},{key:"videoTack",get:function(){return this._video}},{key:"loader",get:function(){return this._loader}},{key:"getStats",value:function(){return Lce(this._pc)}},{key:"getStatsSnapshoot",value:function(){return this.getStats().then((function(e){return function(e){var t,n,i,r,o,a,s,l,c,u,h,d,f,p,v,g,y,m,_,b,k,E,w,S,T,C,x,D,I,R=null==e?void 0:ib(e).call(e,(function(e){return"video"===e.type}))[0],L=null==e?void 0:ib(e).call(e,(function(e){return"audio"===e.type}))[0];return{video:R?{codec:null===(t=R.codec)||void 0===t?void 0:t.mimeType,payloadType:null===(n=R.codec)||void 0===n?void 0:n.payloadType,sdpFmtpLine:null===(i=R.codec)||void 0===i?void 0:i.sdpFmtpLine,bytesReceived:null===(r=R.inboundRtp)||void 0===r?void 0:r.bytesReceived,firCount:null===(o=R.inboundRtp)||void 0===o?void 0:o.firCount,pliCount:null===(a=R.inboundRtp)||void 0===a?void 0:a.pliCount,frameHeight:null===(s=R.inboundRtp)||void 0===s?void 0:s.frameHeight,frameWidth:null===(l=R.inboundRtp)||void 0===l?void 0:l.frameWidth,framesDecoded:null===(c=R.inboundRtp)||void 0===c?void 0:c.framesDecoded,framesDropped:null===(u=R.inboundRtp)||void 0===u?void 0:u.framesDropped,framesPerSecond:null===(h=R.inboundRtp)||void 0===h?void 0:h.framesPerSecond,framesReceived:null===(d=R.inboundRtp)||void 0===d?void 0:d.framesReceived,jitter:null===(f=R.inboundRtp)||void 0===f?void 0:f.jitter,jitterBufferDelay:null===(p=R.inboundRtp)||void 0===p?void 0:p.jitterBufferDelay,keyFramesDecoded:null===(v=R.inboundRtp)||void 0===v?void 0:v.keyFramesDecoded,nackCount:null===(g=R.inboundRtp)||void 0===g?void 0:g.nackCount,packetsLost:null===(y=R.inboundRtp)||void 0===y?void 0:y.packetsLost,packetsReceived:null===(m=R.inboundRtp)||void 0===m?void 0:m.packetsReceived}:void 0,audio:L?{codec:null===(_=L.codec)||void 0===_?void 0:_.mimeType,payloadType:null===(b=L.codec)||void 0===b?void 0:b.payloadType,sdpFmtpLine:null===(k=L.codec)||void 0===k?void 0:k.sdpFmtpLine,bytesReceived:null===(E=L.inboundRtp)||void 0===E?void 0:E.bytesReceived,audioLevel:null===(w=L.inboundRtp)||void 0===w?void 0:w.audioLevel,jitter:null===(S=L.inboundRtp)||void 0===S?void 0:S.jitter,jitterBufferDelay:null===(T=L.inboundRtp)||void 0===T?void 0:T.jitterBufferDelay,packetsLost:null===(C=L.inboundRtp)||void 0===C?void 0:C.packetsLost,packetsReceived:null===(x=L.inboundRtp)||void 0===x?void 0:x.packetsReceived,totalSamplesDuration:null===(D=L.inboundRtp)||void 0===D?void 0:D.totalSamplesDuration,totalSamplesReceived:null===(I=L.inboundRtp)||void 0===I?void 0:I.totalSamplesReceived}:void 0}}(e)}))}},{key:"load",value:(n=Hse(Bse().mark((function e(t){var n,i=this;return Bse().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._disconnect(),this._url=t,this._retry=this._opts.retryCount,(n=this._pc)&&n.close(),e.prev=5,this._pc=new RTCPeerConnection,this._bindRTCEvents(),e.next=10,this._connect(t);case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(5),setTimeout((function(){return i._emitError(Ale.create(Rle,null,e.t0))}));case 15:case"end":return e.stop()}}),e,this,[[5,12]])}))),function(e){return n.apply(this,arguments)})},{key:"switchURL",value:function(e){this.load(e||this._url)}},{key:"_bindRTCEvents",value:function(){var e=this,t=this._pc;t.addEventListener("track",this._onTrack),t.addEventListener("connectionstatechange",(function(){if(Pce.warn("onconnectionstatechange:",t.connectionState),e.emit(yce,{state:t.connectionState,url:e._url}),"disconnected"!==t.connectionState&&"failed"!==t.connectionState||e.emit("waiting"),"failed"===t.connectionState){if(0===e._retry)return void e._emitError(Ale.network(new Error("rtc connect failed")));e._retry--,e.load(e._url)}"connected"===t.connectionState&&e.emit(ice,{url:e._url,responseUrl:e._url,elapsed:Date.now()-e._rctConnectStartTs})}))}},{key:"_bindMediaEvent",value:function(){this._media.addEventListener("timeupdate",this._mockWaitingByTimeupdate),this._media.addEventListener("loadeddata",this._onLoadedData)}},{key:"_connect",value:(t=Hse(Bse().mark((function e(){var t,n,i,r,o,a,s,l,c,u,h,d,f,p;return Bse().wrap((function(e){for(var v,g;;)switch(e.prev=e.next){case 0:if(!(t=this._pc).addTransceiver){e.next=11;break}return this._audioTransceicer=t.addTransceiver("audio",{direction:"recvonly"}),this._videoTransceicer=t.addTransceiver("video",{direction:"recvonly"}),(i=this._opts.delayHint)&&(this._audioTransceicer.receiver.playoutDelayHint=i,this._audioTransceicer.receiver.jitterBufferDelayHint=i,this._videoTransceicer.receiver.playoutDelayHint=i,this._videoTransceicer.receiver.jitterBufferDelayHint=i),e.next=8,t.createOffer();case 8:n=e.sent,e.next=14;break;case 11:return e.next=13,t.createOffer({iceRestart:!0,offerToReceiveAudio:!0,offerToReceiveVideo:!0});case 13:n=e.sent;case 14:return Pce.log("local offer"),Pce.log(n.sdp),r=mce.parse(n.sdp),ib(v=r.media).call(v,(function(e){return"audio"===e.type})).forEach((function(e){var t,n,i,r=null===(n=ib(t=e.rtp).call(t,(function(e){return"opus"===e.codec}))[0])||void 0===n?void 0:n.payload;r&&(e.fmtp.forEach((function(e){e.payload===r&&(e.config="minptime=10;stereo=1;useinbandfec=1")})),null===(i=e.rtcpFb)||void 0===i||i.push({payload:r,type:"nack"}))})),n.sdp=mce.write(r),Pce.log("local offer modified:\n",n.sdp),e.next=22,t.setLocalDescription(n);case 22:return o=this._url,e.prev=23,this._opts.preProcessUrl&&(o=this._opts.preProcessUrl(o).url),this._loader.finnalUrl=o,l=/_?session_id=([^&$]+)/.exec(o),c=l?l[1]:Date.now()+"666",this.emit(rce,{url:o,offersdp:n.sdp,sessionId:c}),u=Date.now(),e.next=32,this._loader.load(o,{body:Hj({sessionId:c,version:"1.0-html",localSdp:n})});case 32:if(h=e.sent,this.emit(oce,{headers:h.response.headers}),404!==(null==(d=null==h?void 0:h.data)?void 0:d.code)&&403!==(null==d?void 0:d.code)){e.next=40;break}return(f=Ale.create(404===d.code?Sle:wle,null,d)).errorType=kle,this._emitError(f),e.abrupt("return");case 40:if(200===(null==d?void 0:d.code)){e.next=42;break}throw new Error(y_(g="code: ".concat(null==d?void 0:d.code,", message:")).call(g,null==d?void 0:d.message));case 42:return Pce.log("answer:"),Pce.log(null===(a=d.remoteSdp)||void 0===a?void 0:a.sdp),this.emit(ace,{url:o,elapsed:Date.now()-u,answersdp:null===(s=d.remoteSdp)||void 0===s?void 0:s.sdp}),(p=mce.parse(d.remoteSdp.sdp)).media.forEach((function(e){e.fingerprint.hash=e.fingerprint.hash.toUpperCase()})),d.remoteSdp.sdp=mce.write(p),Pce.log("answer modified:\n",d.remoteSdp.sdp),this._rctConnectStartTs=Date.now(),e.next=52,this._pc.setRemoteDescription(d.remoteSdp);case 52:e.next=57;break;case 54:e.prev=54,e.t0=e.catch(23),this._emitError(Ale.network(e.t0));case 57:case"end":return e.stop()}}),e,this,[[23,54]])}))),function(){return t.apply(this,arguments)})},{key:"_disconnect",value:function(){var e;null===(e=this._loader)||void 0===e||e.cancel(),this._audioTransceicer=null,this._videoTransceicer=null,this._mediaStream=null}},{key:"_emitError",value:function(e){this.emit(nce,e)}},{key:"destroy",value:function(){var e;this._disconnect(),null===(e=this._media)||void 0===e||e.removeEventListener("timeupdate",this._mockWaitingByTimeupdate),this._media&&(this._media.srcObject=null),this._pc&&this._pc.close(),this._loader=null,this._media=null,this._pc=null}}],[{key:"enableLogger",value:function(){Ble.enable()}},{key:"disableLogger",value:function(){Ble.disable()}}]),r}(EA);try{localStorage.getItem("xgd")?Ace.enableLogger():Ace.disableLogger()}catch(tSe){}function Oce(){return!(!window.RTCPeerConnection||!window.RTCPeerConnection.prototype.addTransceiver)}var Mce=function(e){Wse(i,e);var t,n=$se(i);function i(){var e,t;jse(this,i);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Kse(Xse(t=n.call.apply(n,y_(e=[this]).call(e,o))),"_rts",null),Kse(Xse(t),"_rtsOpts",null),Kse(Xse(t),"_init",(function(){var e;null===(e=t._rts)||void 0===e||e.destroy();var n=t.player.config,i=n.rts||{};t._rtsOpts=i,t._rts=new Ace(Use({media:t.player.video,preProcessUrl:function(e,n){var i,r;return(null===(i=(r=t.player).preProcessUrl)||void 0===i?void 0:i.call(r,e,n))||{url:e,ext:n}}},i)),t._rts.load(n.url)})),Kse(Xse(t),"_onSwitchURL",(function(e){t._rts&&(t.player.config.url=e,t._rts.switchURL(e))})),t}return Vse(i,[{key:"pc",get:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.pc}},{key:"videoTrack",get:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.videoTack}},{key:"audioTrack",get:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.audioTrack}},{key:"core",get:function(){return this._rts}},{key:"loader",get:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.loader}},{key:"version",get:function(){return"0.2.0-alpha.6"}},{key:"beforePlayerInit",value:function(){var e,t=this;this._init(),this.player.switchURL=this._onSwitchURL,null===(e=this.player)||void 0===e||e.useHooks("replay",(function(){var e;return null===(e=t._rts)||void 0===e?void 0:e.switchURL()})),this.on(LM,this._onSwitchURL),this.on(RM,this.destroy),this._transErrorEvent(),this._transCoreEvent(rce),this._transCoreEvent(ace),this._transCoreEvent(ice),this._transCoreEvent(oce),this._transCoreEvent(sce),this._transCoreEvent(lce),this._transCoreEvent(yce);try{kN.defineGetterOrSetter(this.player,{__url:{get:function(){try{return ij.createObjectURL(new MediaSource)}catch(cK){var e,n;null!==(e=t.player)&&void 0!==e&&null!==(n=e.video)&&void 0!==n&&n.srcObject||(t.player.video.srcObject=new MediaStream)}}}})}catch(cK){}}},{key:"getStats",value:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.getStats()}},{key:"getStatsSnapshoot",value:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.getStatsSnapshoot()}},{key:"_transErrorEvent",value:function(){var e=this;this._rts.on(nce,(function(t){if(e.player){var n=new rM(e.player,t),i=e._rtsOpts,r=i.backupConstruct,o=i.backupURL;if(o){var a,s=e.player;s.emit("core_event",Use(Use({},{url:s.config.url,code:n.errorCode,message:n.message,httpCode:n.httpCode}),{},{eventName:"core.degrade"})),s.emit("degrade",{url:s.config.url,code:n.errorCode,message:n.message,httpCode:n.httpCode}),s.unRegisterPlugin("rts"),e._rts=null,s.rts=null,null!==(a=s.video)&&void 0!==a&&a.srcObject&&(s.video.srcObject=null),s.config.url=o,r?s.registerPlugin(r).beforePlayerInit():s.video.src=o}else e.player.emit(cM,n)}})),this._rts.on("waiting",(function(){var t;null===(t=e.player)||void 0===t||t.emit("waiting")}))}},{key:"_transCoreEvent",value:function(e){var t=this;this._rts.on(e,(function(n){t.player&&t.player.emit("core_event",Use(Use({},n),{},{eventName:e}))}))}},{key:"destroy",value:function(){var e;null===(e=this._rts)||void 0===e||e.destroy()}}],[{key:"pluginName",get:function(){return"rts"}},{key:"isSupported",value:function(){return Oce()}},{key:"getCapacity",value:function(){return function(){if(!Oce())return rb.reject("RTCPeerConnection no support");var e;try{(e=new RTCPeerConnection).addTransceiver("video",{direction:"recvonly"}),e.addTransceiver("audio",{direction:"recvonly"})}catch(cK){return rb.reject(null==cK?void 0:cK.message)}return e.createOffer().then((function(t){var n,i,r,o;Pce.log(t.sdp);var a=mce.parse(t.sdp),s=null===(n=a.media)||void 0===n?void 0:ib(n).call(n,(function(e){return"video"===e.type}))[0],l=null===(i=a.media)||void 0===i?void 0:ib(i).call(i,(function(e){return"audio"===e.type}))[0],c=null==s||null===(r=s.rtp)||void 0===r?void 0:ib(r).call(r,(function(e){return"VP8"===e.codec||"VP9"===e.codec||"H264"===e.codec})),u=null==l||null===(o=l.rtp)||void 0===o?void 0:ib(o).call(o,(function(e){return"opus"===e.codec})),h=null==s?void 0:s.fmtp,d=null==l?void 0:l.fmtp;return h&&W_(c).call(c,(function(e){var t;e.config=null===(t=ib(h).call(h,(function(t){return t.payload===e.payload}))[0])||void 0===t?void 0:t.config})),d&&W_(u).call(u,(function(e){var t;e.config=null===(t=ib(d).call(d,(function(t){return t.payload===e.payload}))[0])||void 0===t?void 0:t.config})),e.close(),{video:c,audio:u}}))}()}},{key:"isSupportedH264",value:(t=Hse(Bse().mark((function e(t){var n,r,o,a,s;return Bse().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i.getCapacity();case 3:if(r=e.sent,o=null===(n=r.video)||void 0===n?void 0:ib(n).call(n,(function(e){var n;return"H264"===e.codec&&(!t||-1!==qP(n=e.config).call(n,t))})).length){e.next=10;break}return e.next=8,i.getCapacity();case 8:s=e.sent,o=null===(a=s.video)||void 0===a?void 0:ib(a).call(a,(function(e){var n;return"H264"===e.codec&&(!t||-1!==qP(n=e.config).call(n,t))})).length;case 10:return e.abrupt("return",!!o);case 13:return e.prev=13,e.t0=e.catch(0),e.abrupt("return",!1);case 16:case"end":return e.stop()}}),e,null,[[0,13]])}))),function(e){return t.apply(this,arguments)})}]),i}(kN),Nce=Object.prototype.hasOwnProperty,zce=mI((function(e,t){if(vx(t)||_x(t))FC(t,bx(t),e);else for(var n in t)Nce.call(t,n)&&BC(e,n,t[n])}));var Uce=function(e){rh(n,e);var t=Ah(n);function n(){return Ou(this,n),t.apply(this,arguments)}return Au(n,[{key:"beforeCreate",value:function(e){var t,n,i=(e.player.config.rtm||{}).backupStreamType,r={flv:window.FlvPlayer,hls:window.HlsPlayer};"hls"===i&&(n=e.player.config,"mobile"!==eM.device||(null==n?void 0:n.enableHlsMSE)&&yV())&&(t=r.hls),"flv"===i&&(t=r.flv),e.player.config.rts=zce({},e.player.config.rtm,{backupConstruct:t})}},{key:"afterCreate",value:function(){var e=this.player;e.on("degrade",(function(){e.unRegisterPlugin("rtm")}))}}],[{key:"pluginName",get:function(){return"rtm"}}]),n}(Mce);function Bce(){var e;"undefined"!=typeof Reflect&&kP?Bce=nh(e=kP).call(e):Bce=function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Rh(e)););return e}(e,t);if(i){var r=mf(i,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}};return Bce.apply(this,arguments)}var Fce={READY:"ready",COMPLETE:"complete",URL_CHANGE:"urlchange",PLAYER_FOCUS:"focus",PLAYER_BLUR:"blur",FULLSCREEN_CHANGE:"fullscreen_change",CSS_FULLSCREEN_CHANGE:"cssFullscreen_change",MINI_STATE_CHANGE:"mini_state_change",DESTROY:"destroy",REPLAY:"replay",RETRY:"retry",DEFINITION_CHANGE:"definition_change",Before_DEFINITION_CHANGE:"before_definition_change",AFTER_DEFINITION_CHANGE:"after_definition_change",VIDEO_RESIZE:"video_resize",PIP_CHANGE:"pip_change",ROTATE:"rotate",SHORTCUT:"shortcut",SEI_PARSED:"SEI_PARSED",USER_ACTION:"user_action",AUTOPLAY_STARTED:"autoplay_started",AUTOPLAY_PREVENTED:"autoplay_was_prevented",PLAYER_CREATED_FINISH:"player_create_finish",PLAYER_REBUILD:"player_rebuild",NOT_SUPPORT_HARDWARE_DECODER:"not_support_hardware_decoder",NOT_SUPPORT_SOFT_DECODER:"not_support_soft_decoder",TOKEN_EXPIRED:"playAuthToken_expired",UMD_LOAD_FAIL:"umd_load_fail",PLAYNEXT:"playnext",URL_NULL:"urlNull",LEAVE_PLAYER:"leaveplayer",ENTER_PLAYER:"enterplayer",RESET:"reset",SOURCE_ERROR:"source_error",SOURCE_SUCCESS:"source_success"},Hce={DANMU_CHANGE:"danmu_change",TIME_SHIFT_CHANGE:"time_shift_change",AI_SUBTITLE_LANG_CHANGE:"ai_subtitle_lang_change",AI_SUBTITLE_MATCH:"ai_subtitle_match",CANCEL_UNMUTE:"cancel_unmute",REFRESH_CLICK:"refresh_click",PLAY_BACKUP_CHANGE:"play_backup_change",PLAY_BACKUP_CHANGE_FINISH:"play_backup_change_finish",PLAY_ERROR_BUTTON_CLICK:"play_error_button_click",PlAY_URL_CHANGE:"play_url_change",SHOW_PLAY_ERROR:"show_play_error",PLAYER_EXTEND_BUTTON:"player_extend_button",LONG_WAITING:"long_waiting",OFTEN_WAITING:"often_waiting",DEFINITION_DEMOTE:"definition_demote",LARKWINDOW_CHANGE:"larkWindow_change",PANEL_MODE_CHANGE:"panel_mode_change",INNER_DEFINITION_CHANGE:"inner_definition_change",LINE_CHANGE:"line_change",GET_PLAY_URL_ERR:"get_play_url_err",MEDIA_EXPIRED:"MEDIA_EXPIRED",MIRROR_CHANGE:"mirror_change",TIME_SCALE_CHANGE:"time_scale_change",MUSIC_MODE_CHANGE:"music_mode_change",MUSIC_CHANGE:"music_change",MUSIC_LIST_CHANGE:"music_list_change",AUTOPLAY_SUCCESS:"autoplay_success",AUTOPLAY_FAILED:"autoplay_failed",MENU_LOG:"MENU_LOG",MENU_REPORT:"MENU_REPORT",PLAY_LIST_CHANGE:"play_list_change",PLAY_LIST_ITEM_CHANGE:"play_list_item_change",PLAY_NEXT_START:"play_next_start",PLAY_NEXT_END:"play_next_end",ABR_AUTO_DESC_CHANGE:"ABR_AUTO_DESC_CHANGE"},jce=dp(dp(dp({},{ABORT:"abort",CANPLAY:"canplay",CANPLAY_THROUGH:"canplaythrough",DURATION_CHANGE:"durationchange",EMPITED:"empited",EMPTIED:"emptied",ENDED:"ended",ERROR:"error",LOADED_DATA:"loadeddata",LOADED_META_DATA:"loadedmetadata",LOAD_START:"loadstart",PAUSE:"pause",PLAY:"play",PLAYING:"playing",PROGRESS:"progress",RATE_CHANGE:"ratechange",SEEKED:"seeked",SEEKING:"seeking",STALLED:"stalled",SUSPEND:"suspend",TIME_UPDATE:"timeupdate",VOLUME_CHANGE:"volumechange",WAITING:"waiting"}),Fce),Hce),Gce={SDKEvents:Fce,PluginEvents:Hce},Vce=jce,Kce=30,Wce=30,Yce=40,qce=50,Xce=60,$ce=20,Zce=function(e){rh(n,e);var t=Ah(n);function n(e){var i;return Ou(this,n),(i=t.call(this,e)).playerData=i.playerConfig.playerData,i}return Au(n,[{key:"beforeCreate",value:function(e){var t=e.player.config.playerData,n=t.getLineList(),i=t.current.lineId;Array.isArray(n)&&n.length>0&&(e.config.list=W_(n).call(n,(function(t){return t.text=e.player.i18n[t.lineTextKey]||t.lineTextKey,t}))),e.config.defaultLine=i}},{key:"afterCreate",value:function(){Bce(Rh(n.prototype),"afterCreate",this).call(this),this.config.list.length<2?this.hide():this.renderItemList()}},{key:"afterPlayerInit",value:function(){}},{key:"renderItemList",value:function(){var e=this,t=this.config,i=t.list,r=t.defaultLine,o=0,a=W_(i).call(i,(function(t,n){var i,a={lineId:t.lineId||"",showText:e.i18n[t.lineTextKey]||t.lineTextKey,isCurrent:!1,selected:!1};return qO.isUndefined(t.lineId)||(null===(i=t.lineId)||void 0===i?void 0:i.toString())!==(null==r?void 0:r.toString())||(a.isCurrent=!0,a.selected=!0,o=n),a}));Bce(Rh(n.prototype),"renderItemList",this).call(this,a,o)}},{key:"onItemClick",value:function(e,t){this.player.emit(Hce.LINE_CHANGE,{from:this.playerData.current.lineId,to:t.to.lineId}),this.playerData.current.lineId=t.to.lineId,this.player.emit(Fce.PLAYER_REBUILD)}}],[{key:"pluginName",get:function(){return"sdkMultilinePlugin"}},{key:"defaultConfig",get:function(){return{position:ON.POSITIONS.CONTROLS_RIGHT,index:Yce,list:[],defaultLine:0,className:"xgplayer-multiline",hidePortrait:!1,isShowIcon:!0}}}]),n}(gj),Qce=function(){return GT.Date.now()},Jce=/\s/;var eue=/^\s+/;function tue(e){return e?Sx(e).call(e,0,function(e){for(var t=e.length;t--&&Jce.test(e.charAt(t)););return t}(e)+1).replace(eue,""):e}var nue=NaN,iue=/^[-+]0x[0-9a-f]+$/i,rue=/^0b[01]+$/i,oue=/^0o[0-7]+$/i,aue=parseInt;function sue(e){if("number"==typeof e)return e;if(rR(e))return nue;if(eC(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=eC(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=tue(e);var n=rue.test(e);return n||oue.test(e)?aue(Sx(e).call(e,2),n?2:8):iue.test(e)?nue:+e}var lue="Expected a function",cue=Math.max,uue=Math.min;function hue(e,t,n){var i,r,o,a,s,l,c=0,u=!1,h=!1,d=!0;if("function"!=typeof e)throw new TypeError(lue);function f(t){var n=i,o=r;return i=r=void 0,c=t,a=e.apply(o,n)}function p(e){var n=e-l;return void 0===l||n>=t||n<0||h&&e-c>=o}function v(){var e=Qce();if(p(e))return g(e);s=setTimeout(v,function(e){var n=t-(e-l);return h?uue(n,o-(e-c)):n}(e))}function g(e){return s=void 0,d&&i?f(e):(i=r=void 0,a)}function y(){var e=Qce(),n=p(e);if(i=arguments,r=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(v,t),u?f(e):a}(l);if(h)return clearTimeout(s),s=setTimeout(v,t),f(l)}return void 0===s&&(s=setTimeout(v,t)),a}return t=sue(t)||0,eC(n)&&(u=!!n.leading,o=(h="maxWait"in n)?cue(sue(n.maxWait)||0,t):o,d="trailing"in n?!!n.trailing:d),y.cancel=function(){void 0!==s&&clearTimeout(s),c=0,i=l=r=s=void 0},y.flush=function(){return void 0===s?a:g(Qce())},y}function due(e,t,n){var i=!0,r=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return eC(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),hue(e,t,{leading:i,maxWait:t,trailing:r})}var fue=function(e){return function(e){rh(n,e);var t=Ah(n);function n(e){var i;return Ou(this,n),(i=t.call(this,e))._playTimer=null,i.handleABRDescChange=function(){i._autoRealDefinition=(arguments.length<=1?void 0:arguments[1])||void 0,i.refreshDefinitionList()},i.handleResourceReady=function(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=i.getCurrentDefinitionInfo(i.player).list,a=ib(o).call(o,(function(e){var t,n=e&&fb(r).call(r,(function(t){return i.playerData.isDefinitionMatch(t.definition,e.definition)}));return n&&"dash"===(null===(t=i.playerData.getStreamType())||void 0===t?void 0:t.toLowerCase())&&(e.url=n.url),n})),s=fb(r).call(r,(function(e){return null==e?void 0:e.selected}))||i.playerData.current,l=fb(a).call(a,(function(e){return i.playerData.isDefinitionMatch(e.definition,null==s?void 0:s.definition)}));i.playerData.playList=a,null!=l&&l.definition&&(null===(e=i.playerData.current)||void 0===e?void 0:e.definition)!==l.definition&&(i.playerData.current.definition=null==l?void 0:l.definition),null===(t=(n=i).refreshDefinitionList)||void 0===t||t.call(n)},i.getAutoDefRealLevel=function(){var e;if(i.playerData.isAutoDefinition(null===(e=i.playerData.current)||void 0===e?void 0:e.definition)){var t=i.player.media,n=t.videoWidth,r=t.videoHeight;if(n&&r){var o,a=i.getCurrentDefinitionInfo(i.player).list,s=void 0===a?[]:a,l=fb(s).call(s,(function(e){var t=e.vwidth||e.width,i=e.vheight||e.height;return t&&i&&t===n&&i===r}));if(null!=l&&l.definition)if(i._autoRealDefinition!==l.definition)if(i._autoRealDefinition=l.definition,i.refreshDefinitionList(),"mobile"===eM.device)null===(o=Lh(i))||void 0===o||o.updatePanel()}}},i.clientType=e.clientType,i.playerData=e.player.config.playerData,i.toastInfo={},i.dataMonitoring(),i}return Au(n,[{key:"afterCreate",value:function(){var e,t,i,r,o,a=this;(Bce(Rh(n.prototype),"afterCreate",this).call(this),this._autoRealDefinition=void 0,null===(e=this.refreshDefinitionList)||void 0===e||e.call(this),(this.playerData.isOpenABR()||"dash"===(null===(t=this.playerData.getStreamType())||void 0===t?void 0:t.toLowerCase()))&&this.on("resourceReady",this.handleResourceReady),this.playerData.isOpenABR())&&(this.on("ABR_AUTO_DESC_CHANGE",this.handleABRDescChange),(null!==(i=this.playerData)&&void 0!==i&&null!==(i=i.adapter)&&void 0!==i&&null!==(r=i.useNativeAbr)&&void 0!==r&&r.call(i)||this.player.plugins.dashplugin||this.player.plugins.mp4encryptplayer)&&(this.autoDefDetectTimer=new sV,nb(o=this.autoDefDetectTimer).call(o,this.getAutoDefRealLevel,1e3)));this.on(Hce.PLAY_NEXT_START,(function(){a.definitionSubscribeId&&YP.unsubscribeProperty(a.playerData.current,"definition",a.definitionSubscribeId),a.playListSubscribeId&&YP.unsubscribeProperty(a.playerData,"playList",a.playListSubscribeId)})),this.on(Hce.PLAY_NEXT_END,(function(){var e,t;null===(e=a.dataMonitoring)||void 0===e||e.call(a),null===(t=a.refreshDefinitionList)||void 0===t||t.call(a)}))}},{key:"getShowText",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;if(n)return this.playerData.isOpenABR()&&this.playerData.isAutoDefinition(n.definition)?(null===(e=this.playerData.configs)||void 0===e||null===(e=e.autoBitrateOpts)||void 0===e?void 0:e.autoDefinitionText)||t[n.definitionTextKey]||n.definition:t[n.definitionTextKey]||n.definition||n.definitionTextKey||i||"HD"}},{key:"getCurrentDefinitionInfo",value:function(e){var t=this,n={list:[],defaultDefinition:""},i=e.config.playerData,r=i.current,o=r.lineId,a=r.definition,s=i.getDefinitionListByLineId(o);return Array.isArray(s)&&s.length>0&&(n.list=W_(s).call(s,(function(n){return n.text||(n.text=t.getShowText(e.i18n,n,n.definition)),n}))),n.defaultDefinition=a,n}},{key:"showToast",value:function(e,t){var n,i,r=this,o=null===(n=this.player)||void 0===n?void 0:n.getPlugin("sdkToastPlugin");if(o){var a,s=this.getShowText(this.i18n,e,t);if(this.toastInfo)clearTimeout(this.toastInfo.timer),null==o||null===(a=o.remove)||void 0===a||a.call(o,this.toastInfo.id),this.player.off(FM,this.toastInfo.remove),this.player.off(cM,this.toastInfo.remove);this.toastInfo={id:o.add(y_(i="".concat(this.langText.switching," ")).call(i,s,"..."),0,!0),showTime:Date.now(),delayClose:!1},this.toastInfo.timer=setTimeout((function(){o.remove(r.toastInfo.id),clearTimeout(r.toastInfo.timer)}),2e3),this.toastInfo.remove=function(){r.toastInfo.id&&(Date.now()-r.toastInfo.showTime>2e3?o.remove(r.toastInfo.id):r.toastInfo.delayClose=!0)},this.player.once(FM,this.toastInfo.remove),this.player.once(cM,this.toastInfo.remove)}}},{key:"selectDefinition",value:function(e){var t,n,i=this,r=null===(t=this.renderList)||void 0===t||null===(n=fb(t))||void 0===n||null===(n=n.call(t,(function(t){return i.playerData.isDefinitionMatch(t.definition,e.definition)})))||void 0===n?void 0:n.definitionTextKey;this.config.showToastOnManualClick&&this.showToast(dp(dp({},e),{},{definitionTextKey:r}),e.definition),this.playerData.current.definition=e.definition,this.playerData.isAutoDefinition(e.definition)||(this._autoRealDefinition=void 0)}},{key:"showRealDefinition",value:function(e){return e.selected&&this.playerData.isAutoDefinition(e.definition)&&this.playerData.showRealDefinition()&&this._autoRealDefinition&&!this.playerData.isAutoDefinition(this._autoRealDefinition)}},{key:"dataMonitoring",value:function(){var e=this;this.playerData&&(this.definitionSubscribeId=YP.subscribeProperty(this.playerData.current,"definition",(function(t,n){if(t&&n&&t!==n&&e.player){var i=e.getCurrentDefinitionInfo(e.player).list,r=fb(i).call(i,(function(e){return e.definition===n}));r&&r.url&&(e.player.changeDefinition(dp(dp({},r),{},{definition:n,url:r.url})),"MOBILE"===e.clientType&&e.updatePanel(),e.player.emit(Hce.INNER_DEFINITION_CHANGE,{from:t,to:n,url:r.url}),e.player.emit(Hce.PlAY_URL_CHANGE,{url:r.url,from:Hce.INNER_DEFINITION_CHANGE}),"PC"===e.clientType&&e.renderItemList(n),e.player.config.isLive&&(e._playTimer=setTimeout((function(){e.player.ended?e.player.replay():e.player.paused&&e.player.play()}),1e3)))}})),this.playListSubscribeId=YP.subscribeProperty(this.playerData,"playList",(function(){e.refreshDefinitionList()})))}},{key:"onItemClick",value:function(){for(var e,t,i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];(e=Bce(Rh(n.prototype),"onItemClick",this)).call.apply(e,y_(t=[this]).call(t,r))}},{key:"destroy",value:function(){clearTimeout(this.toastInfo.timer),clearTimeout(this._playTimer),this.autoDefDetectTimer&&(this.autoDefDetectTimer.clear(),this.autoDefDetectTimer=null,this.getAutoDefRealLevel=null),this.off("resourceReady",this.handleResourceReady),this.off("ABR_AUTO_DESC_CHANGE",this.handleABRDescChange)}}]),n}(e)},pue=function(e){rh(n,e);var t=Ah(n);function n(e){var i;Ou(this,n);var r=e.config.className;return(i=t.call(this,dp(dp({},e),{},{config:dp(dp({},e.config),r?{className:"".concat(r," xgplayer-definition-plugin-pc")}:{}),clientType:"PC"}))).onItemClick=due(i.onItemClick.bind(Lh(i)),1e3,{trailing:!0}),i}return Au(n,[{key:"registerLanguageTexts",value:function(){return{switching:{jp:"に切り替える",en:"Switching to",zh:"正在切换至","zh-hk":"正在切換至"}}}},{key:"afterCreate",value:function(){Bce(Rh(n.prototype),"afterCreate",this).call(this)}},{key:"refreshDefinitionList",value:function(){var e;null!==(e=this.player.config)&&void 0!==e&&e.alwaysShowDefinition&&(this.config.alwaysShowDefinition=!0);var t=this.getCurrentDefinitionInfo(this.player),n=t.defaultDefinition,i=t.list;this.config.defaultDefinition=n,this.config.list=W_(i).call(i,(function(e,t){return dp(dp({},e),{},{itemIndex:t})})),this.config.list&&this.config.list.length>0&&(this.config.list.length<2?this.config.alwaysShowDefinition?(this.renderItemList(),this.show()):this.hide():(this.renderItemList(),this.show()))}},{key:"show",value:function(){var e;!this.config.list||(null===(e=this.config.list)||void 0===e?void 0:e.length)<2&&!this.config.alwaysShowDefinition||qO.addClass(this.root,"show")}},{key:"afterPlayerInit",value:function(){}},{key:"renderItemList",value:function(e){var t=this;if(!Array.isArray(e)){var i=this.config,r=i.list,o=i.defaultDefinition,a=0,s=W_(r).call(r,(function(n,i){var r={url:n.url,definition:n.definition||"",definitionTextKey:n.definitionTextKey,showText:t.getShowText(t.i18n,n,n.definition),isCurrent:!1,selected:!1,isDefinitionAuto:!1},s="string"==typeof e?n.definition===e:void 0===e&&n.definition===o;if(!qO.isUndefined(n.definition)&&s&&(r.isCurrent=!0,r.selected=!0,a=i),t.showRealDefinition(r)){var l,c,u=null===(l=t.renderList)||void 0===l?void 0:fb(l).call(l,(function(e){return t.playerData.isDefinitionMatch(null==e?void 0:e.definition,t._autoRealDefinition)})),h=t.getShowText(t.i18n,u,null==u?void 0:u.definition);r.showText=h?y_(c="".concat(r.showText,"(")).call(c,h,")"):r.showText}return r.isDefinitionAuto=t.playerData.isAutoDefinition(n.definition),r}));this.renderList=s,Bce(Rh(n.prototype),"renderItemList",this).call(this,s,a)}}},{key:"onItemClick",value:function(e,t){if(t.to.definition!==this.playerData.current.definition){var n,i=null===(n=this.playerData.getCurrentStreams())||void 0===n?void 0:n[0];this.emitUserAction(e,"change_definition",{from:i,to:t.to}),this.selectDef(t.to)}}},{key:"selectDef",value:function(e){this.selectDefinition(e),"ontouchstart"in window&&this.optionsList.hide()}},{key:"changeDefinition",value:function(e){var t,n=this,i=fb(t=this.renderList).call(t,(function(t){return n.playerData.isDefinitionMatch(t.definition,e)}));i&&this.selectDef(i)}},{key:"destroy",value:function(){Bce(Rh(n.prototype),"destroy",this).call(this)}}],[{key:"pluginName",get:function(){return"sdkDefinitionPlugin"}},{key:"defaultConfig",get:function(){return{position:ON.POSITIONS.CONTROLS_RIGHT,index:Kce,list:[],defaultDefinition:"",hidePortrait:!1,disable:!1,showToastOnManualClick:!0,className:"xgplayer-definition xgplayer-definition-plugin-pc",isShowIcon:!0,isNeedAuto:!0,allowedSize:null,alwaysShowDefinition:!1}}}]),n}(fue(gj));function vue(){return(new DOMParser).parseFromString('<svg width="19" height="16" viewBox="0 0 19 15" fill="none" xmlns="http://www.w3.org/2000/svg">\n <g clip-path="url(#clip0_18_7532)" filter="url(#filter0_d_18_7532)">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M9.33333 3.19115C9.33333 2.79702 8.91856 2.54067 8.56604 2.71694L4.66668 4.66662C4.66667 4.66662 4.66667 4.66663 4.66667 4.66663C4.66667 4.66664 4.66666 4.66665 4.66665 4.66665H3.19685C2.90404 4.66665 2.66666 4.90402 2.66666 5.19684V9.4698C2.66666 9.76261 2.90404 9.99998 3.19685 9.99998H4.55791C4.62971 9.99998 4.70076 10.0146 4.76676 10.0429L8.5943 11.6832C8.94415 11.8332 9.33333 11.5765 9.33333 11.1959V3.19115Z" fill="white"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M13 6.87773L14.8934 4.7138C14.9485 4.6509 15.0377 4.6509 15.0927 4.7138L15.2921 4.94158C15.3471 5.00448 15.3471 5.10646 15.2921 5.16936L13.3986 7.33329L15.2921 9.49722C15.3471 9.56012 15.3471 9.6621 15.2921 9.725L15.0927 9.95278C15.0377 10.0157 14.9485 10.0157 14.8934 9.95278L13 7.78886L11.1066 9.95278C11.0515 10.0157 10.9623 10.0157 10.9073 9.95278L10.7079 9.725C10.6529 9.6621 10.6529 9.56012 10.7079 9.49722L12.6014 7.33329L10.7079 5.16936C10.6529 5.10646 10.6529 5.00448 10.7079 4.94158L10.9073 4.7138C10.9623 4.6509 11.0515 4.6509 11.1066 4.7138L13 6.87773Z" fill="white" stroke="white" stroke-width="0.530187"/>\n </g>\n <defs>\n <filter id="filter0_d_18_7532" x="-0.666667" y="0" width="19.3333" height="19.3333" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">\n <feFlood flood-opacity="0" result="BackgroundImageFix"/>\n <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n <feOffset dy="2.66667"/>\n <feGaussianBlur stdDeviation="1.33333"/>\n <feComposite in2="hardAlpha" operator="out"/>\n <feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>\n <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_18_7532"/>\n <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_18_7532" result="shape"/>\n </filter>\n <clipPath id="clip0_18_7532">\n <rect width="14" height="14" fill="white" transform="translate(2)"/>\n </clipPath>\n </defs>\n</svg>\n\n',"image/svg+xml").firstChild}var gue=eM.isWeixin,yue=eM.os,mue=eM.device,_ue=yue.isAndroid,bue=yue.isIos,kue="mobile"===mue,Eue=0,wue=!1,Sue=function(e){rh(n,e);var t=Ah(n);function n(e){var i;return Ou(this,n),(i=t.call(this,e)).state={mode:0,showUnmuteBt:!1},i.userClickPlay=function(){if(!wue){var e=i.player.play();e&&e.then?e.then((function(){LG.log("user action autoplay success"),wue=!0})).catch((function(e){LG.warn("user action autoplay fail:",e)})):(LG.warn("no play promise"),wue=!0)}},i}return Au(n,[{key:"afterCreate",value:function(){this.initState(),this.initEvents(),this.setWXAutoPlay()}},{key:"registerLanguageTexts",value:function(){return{unmute:{jp:"ミュートを解除する",en:"Click to unmute",zh:"点击取消静音","zh-hk":"點擊取消靜音"},muted:{jp:"ミュート",en:"muted",zh:"已静音","zh-hk":"已靜音"}}}},{key:"registerIcons",value:function(){return{muted:{icon:vue,class:"xgplayer-muted-svg"}}}},{key:"updateLang",value:function(){this.renderUnmuteBt()}},{key:"initState",value:function(){var e=this.player.config,t=e.enableDegradeMuteAutoplay,n=e.enableWxJsBridgeAutoplay,i=e.enableUserActionAutoplay;t&&(this.config.enableDegradeMuteAutoplay=!0),n&&(this.config.enableWxJsBridgeAutoplay=!0),i&&(this.config.enableUserActionAutoplay=!0),this.state.mode=this.player.muted?1:0}},{key:"initEvents",value:function(){this.player.on(xM,this.handleAutoplayPrevented.bind(this)),this.player.on(CM,this.handleAutoplayStart.bind(this)),this.player.on(gM,this.handleVolumechange.bind(this)),this.setUserActionAutoPlay()}},{key:"setWXAutoPlay",value:function(){gue&&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=setTimeout((function(){e.wxTimer&&clearTimeout(e.wxTimer);var t=e.player.play();t&&t.then?t.then((function(){LG.log("wechat autoplay success")})).catch((function(t){LG.warn("wechat autoplay fail:",t),e.state.showUnmuteBt=!1,e.renderUnmuteBt()})):LG.warn("wechat browser no play promise")}))}))}},{key:"wxPlay",value:function(){this.player.readyState>=2?this.wxCanPlayFn():_ue?this.player.once(pM,this.wxCanPlayFn.bind(this)):bue&&this.player.once(DM,this.wxCanPlayFn.bind(this))}},{key:"setUserActionAutoPlay",value:function(){var e,t=this;null!==(e=this.config)&&void 0!==e&&e.enableUserActionAutoplay&&this.player.once(Hce.AUTOPLAY_FAILED,(function(){t.hasSetUserAutoplay=!0,(t.config.userActionDom instanceof window.Node?t.config.userActionDom:window.document.body).addEventListener("click",t.userClickPlay,!1)}))}},{key:"handleAutoplayPrevented",value:function(){return 0===this.state.mode?(LG.warn("unmute autoplay fail"),this.player.emit(Hce.AUTOPLAY_FAILED,{mode:"unmute"}),_ue&&gue?void(this.state.mode=2):void(this.config.enableDegradeMuteAutoplay&&this.changeMuteMode())):1===this.state.mode?(LG.warn("mute autoplay fail"),this.player.emit(Hce.AUTOPLAY_FAILED,{mode:"mute"}),void(this.state.mode=2)):2===this.state.mode?(this.player.emit(Hce.AUTOPLAY_FAILED,{mode:"noSupport"}),void LG.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=setTimeout((function(){e.timer&&clearTimeout(e.timer);var t=e.player.play();t&&t.then?t.then((function(){LG.log("degrade mute autoplay success")})).catch((function(t){LG.warn("degrade mute autoplay fail:",t),e.player.muted=!1,e.state.showUnmuteBt=!1,e.renderUnmuteBt()})):LG.warn("no play promise")}))}},{key:"handleAutoplayStart",value:function(){if(0!==this.state.mode)return 1===this.state.mode?(this.player.emit(Hce.AUTOPLAY_SUCCESS,{mode:"mute"}),this.state.showUnmuteBt=!0,void this.renderUnmuteBt()):2===this.state.mode?(this.player.emit(Hce.AUTOPLAY_SUCCESS,{mode:"click"}),this.player.muted=!1,this.state.showUnmuteBt=!1,void this.renderUnmuteBt()):void 0;this.player.emit(Hce.AUTOPLAY_SUCCESS,{mode:"unmute"})}},{key:"handleVolumechange",value:function(e){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;if(e&&(e.innerHTML="",this.state.showUnmuteBt&&this.config.showUnmuteBtn)){var t=this.langText.unmute,n=qO.createDom("div",t,void 0,"xgplayer-unmute-bt");e.appendChild(n),this.bind(".xgplayer-unmute-bt","click",this.cancelUnmute.bind(this)),this.bind(".xgplayer-unmute-bt","touchend",this.cancelUnmute.bind(this))}}},{key:"cancelUnmute",value:function(e){var t,n,i=Date.now();i-Eue>200&&(Eue=i,this.player.muted=!1,this.state.showUnmuteBt=!1,this.renderUnmuteBt(),"mobile"===eM.device&&"string"==typeof(null===(t=this.player)||void 0===t||null===(t=t.config)||void 0===t?void 0:t.url)&&uV(null===(n=this.player)||void 0===n||null===(n=n.config)||void 0===n?void 0:n.url)&&(this.player.volume>.5?this.player.volume=this.player.volume-.1:this.player.volume=this.player.volume+.1),this.emitUserAction(e,"cancel_mute"))}},{key:"destroy",value:function(){if(this.player.off(xM,this.handleAutoplayPrevented.bind(this)),this.player.off(CM,this.handleAutoplayStart.bind(this)),this.player.off(gM,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=kue?"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="xgplayer-unmute"></div>'}}],[{key:"pluginName",get:function(){return"AutoplayPlugin"}},{key:"defaultConfig",get:function(){return{position:ON.POSITIONS.ROOT,enableDegradeMuteAutoplay:!1,enableWxJsBridgeAutoplay:!1,userActionDom:window.document.body,enableUserActionAutoplay:!1,showUnmuteBtn:!0}}}]),n}(ON);function Tue(){return(new DOMParser).parseFromString('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M10 2.488a7.48 7.48 0 00-4.154 1.253.908.908 0 101.005 1.512 5.695 5.695 0 018.844 4.746h-.908a.33.33 0 00-.264.528l1.816 2.422a.33.33 0 00.529 0l1.815-2.422A.33.33 0 0018.42 10h-.908A7.511 7.511 0 0010 2.49zM2.489 10a7.511 7.511 0 0011.665 6.26.908.908 0 00-1.005-1.513A5.695 5.695 0 014.305 10h.908a.33.33 0 00.264-.528L3.66 7.05a.33.33 0 00-.528 0L1.317 9.47a.33.33 0 00.264.53h.908z" fill="#fff"/></svg>',"image/svg+xml").firstChild}var Cue=ON.POSITIONS,xue=function(e){rh(n,e);var t=Ah(n);function n(){return Ou(this,n),t.apply(this,arguments)}return Au(n,[{key:"afterCreate",value:function(){this.appendChild(".xgplayer-icon",this.icons.refresh),this.initEvents()}},{key:"registerIcons",value:function(){return{refresh:{icon:Tue,class:"xgplayer-refresh-svg"}}}},{key:"registerLanguageTexts",value:function(){return{refresh:{jp:"リフレッシュ",en:"Refresh",zh:"刷新","zh-hk":"刷新"}}}},{key:"initEvents",value:function(){this.handleRefresh=hue(this.handleRefresh.bind(this),200);var e="mobile"===eM.device?"touchend":"click";this.bind(e,this.handleRefresh),this.show()}},{key:"handleRefresh",value:function(e){var t=this.player;t&&(e.preventDefault(),e.stopPropagation(),t.addClass("xgplayer-is-enter"),t.pause(),t.emit(Hce.REFRESH_CLICK),setTimeout((function(){t&&t.retry(),t.once("canplay",(function(){t.removeClass("xgplayer-is-enter")}))})))}},{key:"destroy",value:function(){this.unbind(["touchend","click"],this.handleRefresh)}},{key:"render",value:function(){return'\n <xg-icon class="xgplayer-refresh">\n <div class="xgplayer-icon">\n </div>\n <div class="xg-tips" lang-key="refresh">'.concat(this.langText.refresh,"</div>\n </xg-icon>\n ")}}],[{key:"pluginName",get:function(){return"refresh"}},{key:"defaultConfig",get:function(){return{position:Cue.CONTROLS_LEFT,index:1}}}]),n}(ON);function Due(){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 Iue=function(e){rh(n,e);var t=Ah(n);function n(e){var i;return Ou(this,n),(i=t.call(this,e)).panel=null,i.panelContainer=null,i}return Au(n,[{key:"beforePlayerInit",value:function(){}},{key:"afterPlayerInit",value:function(){}},{key:"afterCreate",value:function(){this.renderMoreIcon()}},{key:"updateLang",value:function(e){if(this.panelContainer){var t=this.panelContainer.querySelectorAll(".panel-icon-bt-text"),n=this.getAndSplitList().extraList;t.forEach((function(t){var i,r=Number(t.getAttribute("plugin-index"));null!==(i=n[r])&&void 0!==i&&null!==(i=i.textTips)&&void 0!==i&&i[e]&&(t.innerHTML=n[r].textTips[e])}))}}},{key:"registerIcons",value:function(){return{more:{icon:Due,class:"xgplayer-more-svg"}}}},{key:"getAndSplitList",value:function(){var e,t,n,i,r,o,a=null!==(e=this.player.config.ignores)&&void 0!==e?e:[],s=W_(a).call(a,(function(e){return e.toLowerCase()})),l=ib(t=this.config.iconPlugins).call(t,(function(e){return!F_(s).call(s,e.pluginName.toLowerCase())}));return l.length>this.config.maxShowNum+1?(r=Sx(l).call(l,0,this.config.maxShowNum),o=Sx(l).call(l,-(l.length-this.config.maxShowNum))):r=qd(l),{list:null!==(n=r)&&void 0!==n?n:[],extraList:null!==(i=o)&&void 0!==i?i:[]}}},{key:"children",value:function(){var e=this,t=this.getAndSplitList().list,n={};return t.forEach((function(t){n[t.pluginName]={plugin:t,options:{root:e.root}}})),n}},{key:"renderMoreIcon",value:function(){var e=this,t=this.getAndSplitList().extraList;if(0!==t.length){var n=this.root,i=qO.createDom("div","",{},"xgplayer-icon");i.appendChild(this.icons.more),i.addEventListener("click",(function(){e.renderPanel(t)}));var r=qO.createDom("xg-icon","",{"data-index":0},"xgplayer-more");r.appendChild(i),n.appendChild(r)}}},{key:"renderPanel",value:function(e){var t=this;this.panelContainer||(this.panelContainer=qO.createDom("div","",{},"panel-content"),e.forEach((function(e,n){var i,r,o=qO.createDom("div","",{},"panel-icon-bt"),a=qO.createDom("div","",{},"panel-icon-svg");o.appendChild(a),t.registerExtraPlugin(e,a);var s="zh-cn"===t.player.lang?"zh":t.player.lang,l=null!==(i=null===(r=e.textTips)||void 0===r?void 0:r[s])&&void 0!==i?i:e.pluginName;o.appendChild(qO.createDom("span",l,{"plugin-index":n},"panel-icon-bt-text")),t.panelContainer.appendChild(o)}))),this.player.panel.showPanel(this.panelContainer)}},{key:"registerExtraPlugin",value:function(e,t){this.player.registerPlugin({plugin:e,options:{root:t}})}},{key:"destroy",value:function(){}},{key:"render",value:function(){return'<div class="xgplayer-rightTop-iconList"></div>'}}],[{key:"pluginName",get:function(){return"MoreButtonPlugin"}},{key:"defaultConfig",get:function(){return{position:ON.POSITIONS.ROOT_TOP,iconPlugins:[],maxShowNum:2}}}]),n}(ON);function Rue(){return(new DOMParser).parseFromString('<svg width="80" height="80" viewBox="0 0 80 80" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M68 40C68 55.464 55.464 68 40 68C24.536 68 12 55.464 12 40C12 24.536 24.536 12 40 12C55.464 12 68 24.536 68 40ZM34.75 34.05C34.75 35.7897 33.5747 37.2 32.125 37.2C30.6753 37.2 29.5 35.7897 29.5 34.05C29.5 32.3103 30.6753 30.9 32.125 30.9C33.5747 30.9 34.75 32.3103 34.75 34.05ZM40.2276 43.7334C36.2145 43.7334 32.6052 45.4732 30.1709 48.2331C29.5316 48.9579 29.6009 50.0638 30.3258 50.7031C31.0506 51.3424 32.1565 51.2731 32.7958 50.5483C34.5802 48.5252 37.2407 47.2334 40.2276 47.2334C43.2213 47.2334 45.8871 48.531 47.6715 50.562C48.3094 51.288 49.4152 51.3594 50.1412 50.7215C50.8673 50.0836 50.9387 48.9778 50.3008 48.2518C47.8663 45.481 44.2498 43.7334 40.2276 43.7334ZM47.8352 37.2C49.2849 37.2 50.4602 35.7897 50.4602 34.05C50.4602 32.3103 49.2849 30.9 47.8352 30.9C46.3854 30.9 45.2102 32.3103 45.2102 34.05C45.2102 35.7897 46.3854 37.2 47.8352 37.2Z" fill="#ffffff" fill-opacity="0.15"/>\n</svg>\n',"image/svg+xml").firstChild}var Lue=function(e){return e.NETWORK="NETWORK",e.NETWORK_TIMEOUT="NETWORK_TIMEOUT",e.NETWORK_FORBIDDEN="NETWORK_FORBIDDEN",e.NETWORK_NOTFOUND="NETWORK_NOTFOUND",e.NETWORK_RANGE_NOT_SATISFIABLE="NETWORK_RANGE_NOT_SATISFIABLE",e.NETWORK_PROTOCOL="NETWORK_PROTOCOL",e.NETWORK_URL_EXPIRE="NETWORK_URL_EXPIRE",e.NETWORK_URL_SIGN="NETWORK_URL_SIGN",e.NETWORK_ENCRYPT_HLS_ERR="NETWORK_ENCRYPT_HLS_ERR",e.MEDIA_ERR="MEDIA_ERR",e.MEDIA_ERR_ABORTED="MEDIA_ERR_SRC_NOT_SUPPORTED",e.MEDIA_ERR_NETWORK="MEDIA_ERR_SRC_NOT_SUPPORTED",e.MEDIA_ERR_DECODE="MEDIA_ERR_SRC_NOT_SUPPORTED",e.MEDIA_ERR_SRC_NOT_SUPPORTED="MEDIA_ERR_SRC_NOT_SUPPORTED",e.MEDIA_ERR_NOT_SUPPORTED="MEDIA_ERR_NOT_SUPPORTED",e.MEDIA_ERR_URL_EMPTY="MEDIA_ERR_URL_EMPTY",e.MEDIA_ERR_FILE_NOT_SUPPORTED="MEDIA_ERR_FILE_NOT_SUPPORTED",e.MEDIA_ERR_PLAY_ERR="MEDIA_ERR_PLAY_ERR",e.MEDIA_SOURCE_CANNOT_PLAY_TYPE="MEDIA_SOURCE_CANNOT_PLAY_TYPE",e.BUSINESS_DRM_NOT_SUPPORT="BUSINESS_DRM_NOT_SUPPORT",e.BUSINESS_DRM_NOT_SUPPORT_UN_RECORD="BUSINESS_DRM_NOT_SUPPORT_UN_RECORD",e.BUSINESS_DRM_LACK_MEDIA_KEY="BUSINESS_DRM_LACK_MEDIA_KEY",e.BUSINESS_DRM_LACK_KEY_SESSION="BUSINESS_DRM_LACK_KEY_SESSION",e.BUSINESS_DRM_GENERATE_REQUEST_FAIL="BUSINESS_DRM_GENERATE_REQUEST_FAIL",e.BUSINESS_DRM_LACK_SERVER_CERTIFICATE_PATH="BUSINESS_DRM_LACK_SERVER_CERTIFICATE_PATH",e.BUSINESS_DRM_LACK_SERVER_PROCESSSPC_PATH="BUSINESS_DRM_LACK_SERVER_PROCESSSPC_PATH",e.BUSINESS_DRM_LICENSE_FAIL="BUSINESS_DRM_LICENSE_FAIL",e.BUSINESS_DRM_KEY_ERROR="BUSINESS_DRM_KEY_ERROR",e.BUSINESS_DRM_CERT_FAIL="BUSINESS_DRM_CERT_FAIL",e.OTHER="OTHER",e.VOD_LOG_NOT_CONFIGURED="VOD_LOG_NOT_CONFIGURED",e.PLAY_AUTH_TOKEN_EXPIRED="PLAY_AUTH_TOKEN_EXPIRED",e.HLS_KEY_TOKEN_EXPIRED="HLS_KEY_TOKEN_EXPIRED",e.THIRD_PARTY_DRM_AUTH_TOKEN_EXPIRED="THIRD_PARTY_DRM_AUTH_TOKEN_EXPIRED",e.GET_PLAY_INFO_ERR="GET_PLAY_INFO_ERR",e.GET_HLS_DECRYPTION_KEY_ERR="GET_HLS_DECRYPTION_KEY_ERR",e.LICENSE_VALIDATE_FAIL="LICENSE_VALIDATE_FAIL",e.DEFINITION_AUTO="DEFINITION_AUTO",e}(Lue||{}),Pue={NETWORK:{code:2100,message:"Network error",textKey:Lue.NETWORK},NETWORK_TIMEOUT:{code:2101,message:"Network timeout",textKey:Lue.NETWORK_TIMEOUT},NETWORK_FORBIDDEN:{code:2103,message:"Block access to this media",textKey:Lue.NETWORK_FORBIDDEN},NETWORK_NOTFOUND:{code:2104,message:"Media not found",textKey:Lue.NETWORK_NOTFOUND},NETWORK_RANGE_NOT_SATISFIABLE:{code:2116,message:"Media fetch range not satisfiable",textKey:Lue.NETWORK_RANGE_NOT_SATISFIABLE},NETWORK_PROTOCOL:{code:2190,message:"The current page protocol is https, but video url protocol is http",textKey:Lue.NETWORK_PROTOCOL},NETWORK_URL_EXPIRE:{code:2191,message:"Media url has expired",textKey:Lue.NETWORK_URL_EXPIRE},NETWORK_URL_SIGN:{code:2192,message:"Media url signature parameter error",textKey:Lue.NETWORK_URL_SIGN},NETWORK_ENCRYPT_HLS_ERR:{code:2193,message:"Get m3u8 file or encrypt key fail",textKey:Lue.NETWORK_ENCRYPT_HLS_ERR},MEDIA_ERR_ABORTED:{code:5101,message:"User or browser abort the media",textKey:Lue.NETWORK_URL_SIGN},MEDIA_ERR_NETWORK:{code:5102,message:"Network error",textKey:Lue.MEDIA_ERR_NETWORK},MEDIA_ERR_DECODE:{code:5103,message:"Media decode error",textKey:Lue.MEDIA_ERR_DECODE},MEDIA_ERR_SRC_NOT_SUPPORTED:{code:5104,message:"Media is not supported or url is not available",textKey:Lue.MEDIA_ERR_SRC_NOT_SUPPORTED},MEDIA_ERR_NOT_SUPPORTED:{code:5105,message:"Media not support play",textKey:Lue.MEDIA_ERR_NOT_SUPPORTED},MEDIA_ERR_URL_EMPTY:{code:5106,message:"Media url empty",textKey:Lue.MEDIA_ERR_URL_EMPTY},MEDIA_ERR_FILE_NOT_SUPPORTED:{code:5901,message:"Media file not supported",textKey:Lue.MEDIA_ERR_FILE_NOT_SUPPORTED},MEDIA_ERR_PLAY_ERR:{code:5902,message:"Media play error",textKey:Lue.MEDIA_ERR_PLAY_ERR},BUSINESS_DRM_NOT_SUPPORT:{code:7101,message:"DRM encrypted playback is not supported",textKey:Lue.BUSINESS_DRM_NOT_SUPPORT},BUSINESS_DRM_NOT_SUPPORT_UN_RECORD:{code:7102,message:"Anti-screen recording is not supported",textKey:Lue.BUSINESS_DRM_NOT_SUPPORT_UN_RECORD},BUSINESS_DRM_LACK_MEDIA_KEY:{code:7103,message:"The video data lacks the corresponding MediaKey",textKey:Lue.BUSINESS_DRM_LACK_MEDIA_KEY},BUSINESS_DRM_LACK_KEY_SESSION:{code:7104,message:"The browser does not support the corresponding DRM KeySession",textKey:Lue.BUSINESS_DRM_LACK_KEY_SESSION},BUSINESS_DRM_GENERATE_REQUEST_FAIL:{code:7105,message:"Decryption playback error",textKey:Lue.BUSINESS_DRM_GENERATE_REQUEST_FAIL},BUSINESS_DRM_LACK_SERVER_CERTIFICATE_PATH:{code:7106,message:"Missing DRM certificate request link",textKey:Lue.BUSINESS_DRM_LACK_SERVER_CERTIFICATE_PATH},BUSINESS_DRM_LACK_SERVER_PROCESSSPC_PATH:{code:7107,message:"Missing DRM License request link",textKey:Lue.BUSINESS_DRM_LACK_SERVER_PROCESSSPC_PATH},BUSINESS_DRM_LICENSE_FAIL:{code:7108,message:"Failed to request or update a license",textKey:Lue.BUSINESS_DRM_LICENSE_FAIL},BUSINESS_DRM_KEY_ERROR:{code:7109,message:"Decryption Error",textKey:Lue.BUSINESS_DRM_KEY_ERROR},BUSINESS_DRM_CERT_FAIL:{code:7110,message:"Failed to request DRM certificate",textKey:Lue.BUSINESS_DRM_CERT_FAIL},OTHER:{code:8e3,message:"Other error",textKey:Lue.OTHER},VOD_LOG_NOT_CONFIGURED:{code:8999,message:"Log options not configured correctly",textKey:Lue.VOD_LOG_NOT_CONFIGURED},PLAY_AUTH_TOKEN_EXPIRED:{code:10001,message:"playAuthToken has expired",textKey:Lue.PLAY_AUTH_TOKEN_EXPIRED},HLS_KEY_TOKEN_EXPIRED:{code:10003,message:"keyToken has expired",textKey:Lue.HLS_KEY_TOKEN_EXPIRED},THIRD_PARTY_DRM_AUTH_TOKEN_EXPIRED:{code:10003,message:"thirdPartyDrmAuthToken has expired",textKey:Lue.THIRD_PARTY_DRM_AUTH_TOKEN_EXPIRED},GET_PLAY_INFO_ERR:{code:11001,message:"Failed to get play info",textKey:Lue.GET_PLAY_INFO_ERR},GET_HLS_DECRYPTION_KEY_ERR:{code:11002,message:"Failed to get the HLS decryption key",textKey:Lue.GET_HLS_DECRYPTION_KEY_ERR},LICENSE_VALIDATE_FAIL:{code:12001,message:"License validate fail",textKey:Lue.LICENSE_VALIDATE_FAIL}},Aue=function(e){return e[e.manifest=1]="manifest",e[e.network=2]="network",e[e.demux=3]="demux",e[e.remux=4]="remux",e[e.media=5]="media",e[e.decoder=6]="decoder",e[e.drm=7]="drm",e[e.other=8]="other",e[e.runtime=9]="runtime",e[e.token=10]="token",e[e.serve=11]="serve",e[e.license=12]="license",e[e.ad=13]="ad",e}(Aue||{});var Oue=function(){function e(){Ou(this,e),this.actions={}}return Au(e,[{key:"addMiddleware",value:function(e,t){this.actions[e]?this.actions[e].push(t):this.actions[e]=[t]}},{key:"removeMiddleware",value:function(e,t){var n=this.actions[e]||[],i=JS(n).call(n,(function(e){return e===t}));i>-1&&(bT(n).call(n,i,1),this.actions[e]=n)}},{key:"removeAllMiddlewareByKey",value:function(e){this.actions[e]=[]}},{key:"removeAllMiddleware",value:function(){this.actions={}}},{key:"applyMiddleware",value:function(e){var t=this;return function(){var n=d_(u_().mark((function n(i,r){var o,a,s,l;return u_().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:a=i.eventName,s=t.actions[e]||[],l=[],s.forEach((function(e){try{var t=e(i);l.push(dV(t))}catch(n){throw l.push(dV(null)),n}})),rb.all(y_(o=[]).call(o,l)).then((function(e){e.every((function(e){return!e}))&&r(a,i)})).catch((function(e){LG.error(e),r(a,e)}));case 5:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}()}}]),e}(),Mue="xgplayer-error-analysing",Nue="ve_error",zue={1:5101,2:5102,3:5103,4:5104,5:5105,6:5106},Uue={1:"media",2:"media",3:"media",4:"media",5:"media",6:"media"},Bue="http:",Fue="https:",Hue=null;function jue(e){var t,n=null===(t=window)||void 0===t||null===(t=t.location)||void 0===t?void 0:t.protocol;if(yG(e).call(e,Bue)&&n===Fue&&new ij(e).protocol===Bue)return Gue.getVeErrorInfo(Pue.NETWORK_PROTOCOL)}var Gue=function(){function e(t,n){var i=this;Ou(this,e),this.oriErrCountTimer=null,this.curOriErrRetryCount=0,this._onError=function(){var e=d_(u_().mark((function e(t){var n;return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i.player.addClass(Mue),e.next=3,i.transformToVeError(t);case 3:n=e.sent,i.player.veError=n,LG.error("error: ",n),i.player.removeClass(Mue),i.player.emit(Nue,n);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.player=t,this.config={},n&&kT(e.defaultConfig).forEach((function(t){void 0===n[t]?i.config[t]=e.defaultConfig[t]:i.config[t]=n[t]})),this.init()}var t,n,i,r,o,a;return Au(e,[{key:"createVeError",value:function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.errorType,r=n.errorCode,o=void 0===r?0:r,a=n.errorMessage,s=void 0===a?"":a,l=n.originError,c=void 0===l?"":l,u=n.ext,h=void 0===u?{}:u,d=n.mediaError,f=void 0===d?null:d,p=(null===(t=this.player)||void 0===t||null===(t=t.i18n)||void 0===t?void 0:t.ERROR_TYPES)||{},v=this.player.media;if(v){var g=f||v.error||{},y=this.player,m=y.duration,_=y.currentTime,b=y.ended,k=y.src,E=y.currentSrc,w=v.readyState,S=v.networkState,T=o||g.code;zue[T]&&(T=zue[T]);var C=n.veError||{},x=C.code,D=C.message,I=C.textKey,R=s||g.message,L=x||T,P=e.getErrorType(n),A=D||R,O=I||function(e){for(var t=0,n=MT(Pue);t<n.length;t++){var i=IS(n[t],2);i[0];var r=i[1],o=r.code,a=r.textKey;if(o===e)return a}}(L),M=this.player.i18n[O]||A||this.player.i18n[Lue.MEDIA_ERR]||"unknown error";return{playerVersion:"1.10.0",currentTime:_,duration:m,ended:b,readyState:w,networkState:S,src:k||E,errorType:i,errorCode:T,httpCode:n.httpCode,message:R,mediaError:g,originError:c?c.stack:"",host:qO.getHostFromUrl(k||E),veErrorCode:L,veErrorType:P,veErrorMessage:A,displayMessage:M,videoInfo:{isMSE:iV(this.player),vtype:this.player.url?this.player.vtype:"",drmEncryptType:CV(this.player)||"",vid:this.player.config.vid},ext:h}}if(arguments.length>1){for(var N={playerVersion:"1.10.0",domain:document.domain,ex:null},z=["errorType","currentTime","duration","networkState","readyState","src","currentSrc","ended","errd","errorCode","mediaError"],U=0;U<arguments.length;U++)N[z[U]]=arguments[U];return N.ex=p?(p[arguments[0]]||{}).msg:"",N}}},{key:"init",value:function(){var e,t;Hue||(Hue=this.player.errorHandler),function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&"function"==typeof t[n]&&Object.defineProperty(e,n,{configurable:!0,value:t[n]})}(this.player,(e=this.player,t=this,{errorHandler:function(n,i){LG.log("errorHandler, err: ",i);var r=e;if(r.media&&(r.media.error||i)){var o=r.media.error||i,a=o.code?nM[o.code]:"other";o.message,r.media.currentSrc||r.media.srcObject||(o={code:6,message:"empty_src"}),r.emit(n,t.createVeError({errorType:a,errorCode:o.code,errorMessage:o.message||"",mediaError:o,veError:i.veError,originError:i}))}}})),this.setErrorEventMiddleWare(),this.player.on(cM,this._onError)}},{key:"destroy",value:function(){this.player.off(cM,this._onError),this.oriErrCountTimer&&clearTimeout(this.oriErrCountTimer)}},{key:"setErrorEventMiddleWare",value:function(){this.eventMiddleware=new Oue,this.eventMiddleware.addMiddleware(cM,this.defaultErrorMiddleWare.bind(this)),this.player.setEventsMiddleware({error:this.eventMiddleware.applyMiddleware(cM)})}},{key:"defaultErrorMiddleWare",value:(a=d_(u_().mark((function e(t){var n,i,r,o,a;return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(qO.isMSE(this.player.media)){e.next=26;break}if(i=(t||{}).error){e.next=5;break}return LG.error("invalid media error: ",t),e.abrupt("return",!1);case 5:if(2!==(r=(i||{}).code)&&4!==r||null===(n=this.player)||void 0===n||null===(n=n.config)||void 0===n||!n.url){e.next=23;break}if(!(this.curOriErrRetryCount<this.config.oriErrRetryCount)){e.next=11;break}return e.abrupt("return",this.oriVideoRetry());case 11:if(!(o=wV(xV(this.player)))){e.next=21;break}if(!(a=jue(o))){e.next=17;break}return t.error.veError=a,e.abrupt("return",!1);case 17:if(!this.config.needSyncAnalyzeError){e.next=21;break}return e.next=20,this.analyseNet(o,t.error,this.config.analyzeTimeout);case 20:t.error.veError=e.sent;case 21:e.next=26;break;case 23:if(3!==r||!this.config.needSyncAnalyzeError){e.next=26;break}return e.next=26,this.analyseStream();case 26:return e.abrupt("return",!1);case 27:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"oriVideoRetry",value:function(){var e=this;return this.curOriErrRetryCount++,LG.warn("origin video play error, retry times: ".concat(this.curOriErrRetryCount)),this.player.retry(),this.oriErrCountTimer=setTimeout((function(){e.curOriErrRetryCount=0}),this.config.oriErrRetryCycle),!0}},{key:"analyseNet",value:(o=d_(u_().mark((function t(n,i,r){var o,a,s,l,c;return u_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=i.code||i.errorCode,a=i.message||i.errorMessage||i.msg,t.prev=2,t.next=5,tV(n,{range:"0-8",timeout:r});case 5:if(s=t.sent,LG.log("xhr result",s),l=s.status,c=s.response,403!==l){t.next=19;break}if("string"!=typeof c){t.next=16;break}if(!F_(c).call(c,"expire")){t.next=14;break}return t.abrupt("return",e.getVeErrorInfo(Pue.NETWORK_URL_EXPIRE));case 14:if(!F_(c).call(c,"sign")){t.next=16;break}return t.abrupt("return",e.getVeErrorInfo(Pue.NETWORK_URL_SIGN));case 16:return t.abrupt("return",e.getVeErrorInfo(Pue.NETWORK_FORBIDDEN));case 19:if(416!==l){t.next=23;break}return t.abrupt("return",e.getVeErrorInfo(Pue.NETWORK_RANGE_NOT_SATISFIABLE));case 23:if(404!==l){t.next=27;break}return t.abrupt("return",e.getVeErrorInfo(Pue.NETWORK_NOTFOUND));case 27:if(l!==eV.TIMEOUT){t.next=31;break}return t.abrupt("return",e.getVeErrorInfo(Pue.NETWORK_TIMEOUT));case 31:if(l!==eV.ERROR){t.next=35;break}return t.abrupt("return",e.getVeErrorInfo(Pue.NETWORK,a));case 35:if(200!==l&&206!==l){t.next=58;break}if(4!==o){t.next=44;break}if(a){t.next=41;break}return t.abrupt("return",e.getVeErrorInfo(Pue.MEDIA_ERR_FILE_NOT_SUPPORTED));case 41:return t.abrupt("return",e.getVeErrorInfo(Pue.MEDIA_ERR_PLAY_ERR,a));case 42:t.next=58;break;case 44:if(3!==o){t.next=48;break}return t.abrupt("return",e.getVeErrorInfo(Pue.MEDIA_ERR_DECODE,a));case 48:if(2!==o){t.next=52;break}return t.abrupt("return",e.getVeErrorInfo(Pue.MEDIA_ERR_NETWORK,a));case 52:if(1!==o){t.next=56;break}return t.abrupt("return",e.getVeErrorInfo(Pue.MEDIA_ERR_ABORTED,a));case 56:if(-9996!==o){t.next=58;break}return t.abrupt("return",e.getVeErrorInfo(Pue.GET_HLS_DECRYPTION_KEY_ERR));case 58:return t.abrupt("return",void 0);case 61:return t.prev=61,t.t0=t.catch(2),LG.warn("Failed to analyze the network. If the domain of the video address has been configured with CORS, it means that the playback error is caused by the failure of the video request. If the domain of the video address is not configured with CORS, the real reason for the playback error cannot be determined because the video request cannot be analyzed."),t.abrupt("return",e.getVeErrorInfo(Pue.NETWORK));case 65:case"end":return t.stop()}}),t,null,[[2,61]])}))),function(e,t,n){return o.apply(this,arguments)})},{key:"analyseStream",value:(r=d_(u_().mark((function e(){return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case 1:case"end":return e.stop()}}),e)}))),function(){return r.apply(this,arguments)})},{key:"handle2100Error",value:(i=d_(u_().mark((function t(n){var i,r,o,a,s,l,c,u,h;return u_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=n.error,r=n.errorCode,o=n.httpCode,a=n.response,s=n.finalMessage,l={errorType:Aue.network,errorCode:r,httpCode:o,errorMessage:s,originError:i},!o){t.next=28;break}if(404!==o){t.next=7;break}l.veError=e.getVeErrorInfo(Pue.NETWORK_NOTFOUND),t.next=26;break;case 7:if(416!==o){t.next=11;break}l.veError=e.getVeErrorInfo(Pue.NETWORK_RANGE_NOT_SATISFIABLE),t.next=26;break;case 11:if(403!==o){t.next=26;break}return t.prev=12,t.next=15,nV(a);case 15:if("string"!=typeof(c=t.sent)){t.next=19;break}return F_(c).call(c,"expire")?l.veError=e.getVeErrorInfo(Pue.NETWORK_URL_EXPIRE):F_(c).call(c,"sign")?l.veError=e.getVeErrorInfo(Pue.NETWORK_URL_SIGN):l.veError=e.getVeErrorInfo(Pue.NETWORK_FORBIDDEN),t.abrupt("return",this.createVeError(l));case 19:t.next=24;break;case 21:t.prev=21,t.t0=t.catch(12),LG.warn("get response text error");case 24:return l.veError=e.getVeErrorInfo(Pue.NETWORK_FORBIDDEN),t.abrupt("return",this.createVeError(l));case 26:t.next=30;break;case 28:(u=wV(xV(this.player)))&&(h=jue(u))&&(l.veError=h);case 30:return t.abrupt("return",this.createVeError(l));case 31:case"end":return t.stop()}}),t,this,[[12,21]])}))),function(e){return i.apply(this,arguments)})},{key:"handle9991Error",value:function(t){var n=t.error,i=t.errorCode,r=t.httpCode,o=t.finalMessage;return this.createVeError({errorType:Aue.serve,errorCode:i||Pue.OTHER.code,httpCode:r,errorMessage:o,originError:n,veError:e.getVeErrorInfo(Pue.GET_HLS_DECRYPTION_KEY_ERR)})}},{key:"handleNetError",value:(n=d_(u_().mark((function t(n){var i,r,o,a,s,l;return u_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=n.error,r=n.errorCode,o=n.httpCode,a=n.finalMessage,t.prev=1,s=wV(xV(this.player)),t.next=5,this.analyseNet(s,i,3e3);case 5:return l=t.sent,t.abrupt("return",l?this.createVeError({errorType:Aue.network,errorCode:r||Pue.OTHER.code,httpCode:o,errorMessage:a,originError:i,veError:l}):this.createVeError({errorCode:r||Pue.NETWORK_ENCRYPT_HLS_ERR.code,httpCode:o,errorMessage:a,originError:i,veError:e.getVeErrorInfo(Pue.NETWORK_ENCRYPT_HLS_ERR)}));case 9:return t.prev=9,t.t0=t.catch(1),LG.warn("analyse fail of the net error of encrypt hls m3u8 file"),t.abrupt("return",this.createVeError({errorCode:r||Pue.NETWORK_ENCRYPT_HLS_ERR.code,httpCode:o,errorMessage:a,originError:i,veError:e.getVeErrorInfo(Pue.NETWORK_ENCRYPT_HLS_ERR)}));case 13:case"end":return t.stop()}}),t,this,[[1,9]])}))),function(e){return n.apply(this,arguments)})},{key:"handleStuckError",value:function(t){var n=t.error,i=t.errorCode,r=t.httpCode,o=t.finalMessage,a={errorType:Aue.network,errorCode:i,httpCode:r,errorMessage:o,originError:n},s=this.player,l=s.currentTime,c=s.duration,u=s.buffered,h=!u||0===u.length||!c,d=this.player.checkBuffer(l,{startDiff:0,endDiff:.1});if(h||!d)return a.veError=e.getVeErrorInfo(Pue.NETWORK),this.createVeError(a);this.createVeError(a)}},{key:"transformToVeError",value:(t=d_(u_().mark((function e(t){var n,i,r,o,a,s,l,c,u,h;return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==t||!t.veErrorCode||this.player.getPlugin("Mp4EncryptPlayer")){e.next=2;break}return e.abrupt("return",t);case 2:if(o=(r=t||{}).httpCode,a=r.errorMessage,s=r.message,l=r.msg,c=r.response,u=t.code||t.errorCode,h=a||s||("string"==typeof l?l:"other error"),2100!==u){e.next=9;break}return e.abrupt("return",this.handle2100Error({error:t,errorCode:u,httpCode:o,response:c,finalMessage:h}));case 9:if(-9991!==u){e.next=13;break}this.handle9991Error({error:t,errorCode:u,httpCode:o,finalMessage:h}),e.next=19;break;case 13:if(!(F_(n=[2103,5104,5102]).call(n,u)&&this.player.getPlugin("Mp4EncryptPlayer")||-9996===u&&this.player.getPlugin("EncryptHlsPlugin"))){e.next=17;break}return e.abrupt("return",this.handleNetError({error:t,errorCode:u,httpCode:o,finalMessage:h}));case 17:if(!F_(i=[9002,9003]).call(i,u)){e.next=19;break}return e.abrupt("return",this.handleStuckError({error:t,errorCode:u,httpCode:o,finalMessage:h}));case 19:return e.abrupt("return",this.createVeError(dp({errorCode:u||Pue.OTHER.code,httpCode:o,errorMessage:h,originError:t},t||{})));case 20:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}],[{key:"defaultConfig",get:function(){return{oriErrRetryCount:3,oriErrRetryCycle:1e4,needSyncAnalyzeError:!0,analyzeTimeout:3e3}}},{key:"getErrorType",value:function(e){var t=e||{},n=t.veError,i=t.mediaError,r=n||(null==i?void 0:i.veError);if(null!=r&&r.code){var o=r.code+"";return r.code>=1e4?Aue[Sx(o).call(o,0,2)]:Aue[Sx(o).call(o,0,1)]}if(null!=i&&i.code)return Uue[i.code]||"other"}},{key:"getVeErrorInfo",value:function(e,t){var n=e.code,i=e.message;return{code:n,message:t||i,textKey:e.textKey}}}]),e}();var Vue=function(e){rh(n,e);var t=Ah(n);function n(e){var i;return Ou(this,n),(i=t.call(this,e))._errDetailList=[],i.state={showError:!1,retryTimes:0,idx:0},i.handleError=function(){var e=d_(u_().mark((function e(t){return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i.isVodLogConError=(null==t?void 0:t.errorCode)===Pue.VOD_LOG_NOT_CONFIGURED.code,i.player&&i.player.pause(),i.config.isNeedDemoteBack?(i.state.showError=!1,i.changeMainOrBackup()):i.state.showError=!0,i.renderError(t);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),i.handleEnd=function(){i.player&&i.player.pause(),i.config.isNeedDemoteBack&&i.changeMainOrBackup()},i.handleRefreshClick=function(){var e,t;null===(e=i.player)||void 0===e||e.emit(Hce.PLAY_ERROR_BUTTON_CLICK),i.player.removeClass(UN.PAUSED),i.closeError(),null===(t=i.player)||void 0===t||t.retry()},i.closeError=function(){i.state.showError&&(i.state.showError=!1,i.renderError())},i.playerData=e.player.config.playerData,i}return Au(n,[{key:"afterCreate",value:function(){var e,t,n,i=this;this.initEvents();var r=AT(e=wb(Pue)).call(e,(function(e,t){var n=t.code,r=t.textKey;return e[n]=i.i18n[r],e}),{});this.errNoteMap=dp({other:null!==(t=null===(n=this.i18n.ERROR_TYPES)||void 0===n||null===(n=n.other)||void 0===n?void 0:n.msg)&&void 0!==t?t:"error",1:this.i18n.MEDIA_ERR_ABORTED,2:this.i18n.MEDIA_ERR_NETWORK,3:this.i18n.MEDIA_ERR_DECODE},r)}},{key:"registerLanguageTexts",value:function(){return{clickButton:{jp:"リフレッシュ",en:"Refresh",zh:"刷新","zh-hk":"刷新"},errorTips:{jp:"再生中にエラーが発生しました。[更新]をクリックして試してください",en:"An error occurred while playing, click refresh to try",zh:"播放发生错误,点击刷新试试吧","zh-hk":"播放發生錯誤,點擊刷新試試吧"},errorCode:{jp:"コード",en:"code",zh:"错误码","zh-hk":"錯誤碼"},did:{jp:"デバイスID",en:"deviceID",zh:"设备 ID","zh-hk":"設備 ID"},playTime:{jp:"遊び時間",en:"playTime",zh:"播放时间","zh-hk":"播放時間"},copyError:{jp:"コピーエラー",en:"Copy error",zh:"复制错误信息","zh-hk":"複製錯誤訊息"},copySuccess:{jp:"コピー成功",en:"Copy success",zh:"复制成功","zh-hk":"複製成功"}}}},{key:"registerIcons",value:function(){return{errorImg:{icon:Rue,class:"xgplayer-error-svg"}}}},{key:"updateLang",value:function(){if(this.$errorDom){var e=this.$errorDom.querySelector(".xgplayer-error-tips");if(e){var t,n,i=null!==(t=null===(n=this.config.errorTipsText)||void 0===n?void 0:n[this.lang])&&void 0!==t?t:this.langText.errorTips;e.innerHTML=i}var r=this.$errorDom.querySelector(".xgplayer-error-button");r&&(r.innerHTML=this.langText.clickButton)}}},{key:"initEvents",value:function(){this.player.on(Nue,this.handleError),this.player.config.isLive&&(this.player.on(sM,this.handleEnd),this.player.on(Hce.REFRESH_CLICK,this.closeError)),this.on(pM,this.closeError),this.on(aM,this.closeError)}},{key:"getRetryList",value:function(){var e,t,n=this.playerData.getCurrentStreams()[0];return y_(e=[null==n?void 0:n.url]).call(e,qd(null!==(t=null==n?void 0:n.backUrlList)&&void 0!==t?t:[]))}},{key:"changeMainOrBackup",value:function(){var e=this;this.player.addClass(UN.ENTER);var t=this.getRetryList(),n=this.config.retryLoopNum*t.length,i=(qP(t).call(t,this.player.config.url)+1)%t.length;this.state.idx=i;var r=t[i];if(!r||this.state.retryTimes===n)return this.player.removeClass(UN.ENTER),this.state.retryTimes===n&&this.player.emit(Hce.PLAY_BACKUP_CHANGE_FINISH),this.state.showError=!0,this.renderError(),void this.resetTimes();this.player.once("canplay",(function(){e.state.retryTimes=0})),LG.log("retry times: ".concat(this.state.retryTimes),r),this.player.emit(Hce.PLAY_BACKUP_CHANGE,{currentUrl:this.player.config.url,nextUrl:r,retryTimes:this.state.retryTimes}),this.changeUrl(r),this.state.retryTimes=this.state.retryTimes+1}},{key:"changeUrl",value:function(e){this.player.config.url=e,this.player.switchURL(e,!1),this.player.emit(Hce.PlAY_URL_CHANGE,{url:e,from:Hce.PLAY_BACKUP_CHANGE})}},{key:"resetTimes",value:function(){this.state.retryTimes=0,this.state.idx=0}},{key:"renderError",value:function(e){if(this.config.showError){var t=this.root;t&&(t.innerHTML="",t.style.display="none",(this.state.showError||this.isVodLogConError)&&(this.player.emit(Hce.SHOW_PLAY_ERROR),t.style.display="block",t.appendChild(this.getErrorDom(e))),this.isVodLogConError&&(this.player.blur(),this.player.pause()))}}},{key:"addErrDetail",value:function(e){var t;Array.isArray(e)?this._errDetailList=y_(t=[]).call(t,qd(this._errDetailList),qd(e)):this._errDetailList.push(e)}},{key:"getErrorInfo",value:function(e){var t,n,i,r,o=e.veErrorCode||e.errorCode,a=null===(t=this.player)||void 0===t?void 0:t.vodLogger,s=null===(n=this.player)||void 0===n?void 0:n.getPlugin("liveLogger"),l=this.player.config.isLive?null==s?void 0:s._userId:null==a||null===(i=a.tracker)||void 0===i||null===(i=i.getConfig())||void 0===i||null===(i=i.user)||void 0===i?void 0:i.user_unique_id;return{code:o,appId:this.player.config.isLive?null==s||null===(r=s.config)||void 0===r?void 0:r.appId:null==a?void 0:a.line_app_id,did:l||"unknown",playTime:MG().format("YYYY-MM-DD HH:mm:ss")}}},{key:"getErrorInfoDom",value:function(e){var t,n,i,r=this.getErrorInfo(e),o=r.code,a=r.did,s=r.playTime,l=qO.createDom("div","",void 0,"xgplayer-error-info-wrap"),c=y_(t='<p class="xgplayer-error-info-p">\n <span class="xgplayer-error-info-title">'.concat(this.langText.errorCode||"code",'</span>\n <span class="xgplayer-error-info-content">')).call(t,o,"</span>\n </p>");l.appendChild(qO.createDomFromHtml(c));var u=y_(n='<p class="xgplayer-error-info-p">\n <span class="xgplayer-error-info-title">'.concat(this.langText.did||"deviceID",'</span>\n <span class="xgplayer-error-info-content">')).call(n,a,"</span>\n </p>");l.appendChild(qO.createDomFromHtml(u));var h=y_(i='<p class="xgplayer-error-info-p">\n <span class="xgplayer-error-info-title">'.concat(this.langText.playTime||"playTime",'</span>\n <span class="xgplayer-error-info-content">')).call(i,s,"</span>\n </p>");return l.appendChild(qO.createDomFromHtml(h)),l}},{key:"handleCopyBtnClick",value:function(e){var t=this,n=this.getErrorInfo(e),i=n.did,r=n.playTime,o=n.appId;try{var a=Hj(dp(dp({},e),{},{playTime:r,deviceID:i,appId:o}));navigator.clipboard.writeText(a).then((function(){!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,n=document.createElement("div");n.className="veplayer-toast",n.textContent=e,document.body.appendChild(n),setTimeout((function(){return n.classList.add("show")}),10),setTimeout((function(){n.classList.remove("show"),setTimeout((function(){return null==n?void 0:n.remove()}),300)}),t)}(t.langText.copySuccess||"CopyError")}))}catch(s){LG.error("copy error info err ",s)}}},{key:"getActionDom",value:function(e){var t,n=e.errorType,i=qO.createDomFromHtml('<div class="xgplayer-error-action-wrap"></div>'),r=!(n&&F_(t=[Aue[10],Aue[11],Aue[12]]).call(t,n));if(this.config.isNeedRefreshButton&&r){var o=qO.createDom("div",this.langText.clickButton||"Refresh",void 0,"xgplayer-error-button refresh-button");this.bind(".refresh-button","click",this.handleRefreshClick),i.appendChild(o)}if(this.config.isNeedCopyButton){var a=qO.createDom("div",this.langText.copyError||"CopyError",void 0,"xgplayer-error-button copy-button");this.bind(".copy-button","click",this.handleCopyBtnClick.bind(this,e)),i.appendChild(a)}return i}},{key:"getErrorDom",value:function(e){var t=this,n=e.errorCode,i=e.message,r=e.displayMessage;if(!this.$errorDom){var o,a;if(this.$errorDom=qO.createDom("div","",void 0,"xgplayer-error-cover"),this.config.errorImg){var s=qO.createDom("div","",void 0,"xgplayer-error-img");s.appendChild(this.icons.errorImg),this.$errorDom.appendChild(s)}if(this.config.errorTips){var l,c,u="";if(null!==(l=this.config)&&void 0!==l&&null!==(l=l.errorTipsText)&&void 0!==l&&l[this.lang])u=null===(c=this.config.errorTipsText)||void 0===c?void 0:c[this.lang];else u=e?r||this.errNoteMap[n]||this.player.errorNote&&this.i18n[this.player.errorNote]||i||this.errNoteMap.other||"error":this.langText.errorTips;var h=qO.createDom("div",u,void 0,"xgplayer-error-tips");this.$errorDom.appendChild(h)}if(this.$errorDom.appendChild(this.getErrorInfoDom(e)),this.$errorDom.appendChild(this.getActionDom(e)),null!==(o=this._errDetailList)&&void 0!==o&&o.length)null===(a=this._errDetailList)||void 0===a||a.forEach((function(e){var n="function"==typeof e?e():e;if(n){var i,r=qO.createDom("div",y_(i="".concat(n.label,": ")).call(i,n.value),void 0,"xgplayer-error-detail-info");t.$errorDom.appendChild(r)}}));this.emit("sdkerrorplugin_render",this.$errorDom)}return this.$errorDom}},{key:"destroy",value:function(){this.player.off(cM,this.handleError),this.player.config.isLive&&this.player.off(sM,this.handleEnd)}},{key:"render",value:function(){return this.config.showError?'<xgplayer-error class="xgplayer-error"></xgplayer-error>':""}}],[{key:"pluginName",get:function(){return"sdkErrorPlugin"}},{key:"defaultConfig",get:function(){return{showError:!0,errorImg:!0,errorTips:!0,isNeedRefreshButton:!0,isNeedCopyButton:!0,isNeedDemoteBack:!1,retryLoopNum:1,errorTipsText:null,position:ON.POSITIONS.ROOT}}}]),n}(ON);function Kue(){return(new DOMParser).parseFromString('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M16.5 4.106h-13a.3.3 0 00-.3.3v11.186a.3.3 0 00.3.3h7.111v1.7H3.5a2 2 0 01-2-2V4.406a2 2 0 012-2h13a2 2 0 012 2V10h-1.7V4.406a.3.3 0 00-.3-.3zM6 7.722c0-.42.34-.76.76-.76h6.58a.76.76 0 110 1.52H6.76a.76.76 0 01-.76-.76zm0 3.037c0-.42.34-.759.76-.759h3.543a.76.76 0 110 1.519H6.76a.76.76 0 01-.76-.76z" fill="#fff"/><circle cx="15.1" cy="14.201" r="3.4" fill="#3370FF"/><path fill-rule="evenodd" clip-rule="evenodd" d="M13.185 13.756a.5.5 0 01.707 0l.866.866 1.78-1.78a.5.5 0 11.707.707l-2.133 2.134a.5.5 0 01-.707 0l-1.22-1.22a.5.5 0 010-.707z" fill="#fff"/></svg>',"image/svg+xml").firstChild}function Wue(){return(new DOMParser).parseFromString('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M16.5 4.106h-13a.3.3 0 00-.3.3v11.186a.3.3 0 00.3.3h7.111v1.7H3.5a2 2 0 01-2-2V4.406a2 2 0 012-2h13a2 2 0 012 2V10h-1.7V4.406a.3.3 0 00-.3-.3zM6 7.722c0-.42.34-.76.76-.76h6.58a.76.76 0 110 1.52H6.76a.76.76 0 01-.76-.76zm0 3.037c0-.42.34-.759.76-.759h3.543a.76.76 0 110 1.519H6.759a.76.76 0 01-.759-.76zm7.202 2.303a2.2 2.2 0 003.011 3.011l-3.011-3.01zm3.915 1.992a2.2 2.2 0 00-2.896-2.896l2.896 2.896zm1.383-.879a3.4 3.4 0 11-6.8 0 3.4 3.4 0 016.8 0z" fill="#fff"/></svg>',"image/svg+xml").firstChild}function Yue(){return(new DOMParser).parseFromString('<svg fill="none" stroke="currentColor" stroke-width="4" viewBox="0 0 48 48" width="1em" height="1em"\n class="arco-icon arco-icon-refresh">\n <path\n d="M38.837 18C36.463 12.136 30.715 8 24 8 15.163 8 8 15.163 8 24s7.163 16 16 16c7.455 0 13.72-5.1 15.496-12M40 8v10H30">\n </path>\n</svg>',"image/svg+xml").firstChild}function que(e){return e&&e.ownerDocument||document}function Xue(e,t){var n;return e.classList?!!t&&e.classList.contains(t):-1!==qP(n=" "+(e.className.baseVal||e.className)+" ").call(n," "+t+" ")}function $ue(e,t){e.classList?e.classList.add(t):Xue(e,t)||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}var Zue=!("undefined"==typeof window||!window.document||!window.document.createElement),Que=!1,Jue=!1;try{var ehe={get passive(){return Que=!0},get once(){return Jue=Que=!0}};Zue&&(window.addEventListener("test",ehe,ehe),window.removeEventListener("test",ehe,!0))}catch(cK){}function the(e,t,n,i){if(i&&"boolean"!=typeof i&&!Jue){var r=i.once,o=i.capture,a=n;!Jue&&r&&(a=n.__once||function e(i){this.removeEventListener(t,e,o),n.call(this,i)},n.__once=a),e.addEventListener(t,a,Que?i:o)}e.addEventListener(t,n,i)}function nhe(e){var t=que(e);return t&&t.defaultView||window}function ihe(e,t){return nhe(e).getComputedStyle(e,t)}var rhe=/([A-Z])/g;function ohe(e){return e.replace(rhe,"-$1").toLowerCase()}var ahe=/^ms-/;function she(e){return ohe(e).replace(ahe,"-ms-")}var lhe=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function che(e){return!(!e||!lhe.test(e))}function uhe(e,t){var n="",i="";if("string"==typeof t)return e.style.getPropertyValue(she(t))||ihe(e).getPropertyValue(she(t));kT(t).forEach((function(r){var o=t[r];o||0===o?che(r)?i+=r+"("+o+") ":n+=she(r)+": "+o+";":e.style.removeProperty(she(r))})),i&&(n+="transform: "+i+";"),e.style.cssText+=";"+n}function hhe(e,t,n,i){var r=i&&"boolean"!=typeof i?i.capture:i;e.removeEventListener(t,n,r),n.__once&&e.removeEventListener(t,n.__once,r)}function dhe(e,t,n,i){return the(e,t,n,i),function(){hhe(e,t,n,i)}}function fhe(e,t,n,i){if(void 0===n&&(n=!1),void 0===i&&(i=!0),e){var r=document.createEvent("HTMLEvents");r.initEvent(t,n,i),e.dispatchEvent(r)}}function phe(e,t,n,i){var r,o;null==n&&(r=uhe(e,"transitionDuration")||"",o=-1===qP(r).call(r,"ms")?1e3:1,n=parseFloat(r)*o||0);var a=function(e,t,n){void 0===n&&(n=5);var i=!1,r=setTimeout((function(){i||fhe(e,"transitionend",!0)}),t+n),o=dhe(e,"transitionend",(function(){i=!0}),{once:!0});return function(){clearTimeout(r),o()}}(e,n,i),s=dhe(e,"transitionend",t);return function(){a(),s()}}var vhe={transition:"","transition-duration":"","transition-delay":"","transition-timing-function":""};function ghe(e){var t=e.node,n=e.properties,i=e.duration,r=void 0===i?200:i,o=e.easing,a=e.callback,s=[],l={},c="";kT(n).forEach((function(e){var t=n[e];che(e)?c+=e+"("+t+") ":(l[e]=t,s.push(ohe(e)))})),c&&(l.transform=c,s.push("transform")),r>0&&(l.transition=s.join(", "),l["transition-duration"]=r/1e3+"s",l["transition-delay"]="0s",l["transition-timing-function"]=o||"linear");var u=phe(t,(function(e){e.target===e.currentTarget&&(uhe(t,vhe),a&&a.call(this,e))}),r);return t.clientLeft,uhe(t,l),{cancel:function(){u(),uhe(t,vhe)}}}var yhe=(new Date).getTime();var mhe="clearTimeout",_he=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-yhe)),i=setTimeout(e,n);return yhe=t,i},bhe=function(e,t){return e+(e?t[0].toUpperCase()+t.substr(1):t)+"AnimationFrame"};Zue&&["","webkit","moz","o","ms"].some((function(e){var t=bhe(e,"request");return t in window&&(mhe=bhe(e,"cancel"),_he=function(e){return window[t](e)}),!!_he}));var khe,Ehe=function(e){"function"==typeof window[mhe]&&window[mhe](e)},whe=_he;function She(e,t){if(!khe){var n=document.body,i=n.matches||n.matchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector;khe=function(e,t){return i.call(e,t)}}return khe(e,t)}function The(e,t){return e.contains?e.contains(t):e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):void 0}var Che=Function.prototype.bind.call(Function.prototype.call,Sx([]));var xhe=Function.prototype.bind.call(Function.prototype.call,Sx([]));function Dhe(e,t){return xhe(e.querySelectorAll(t))}function Ihe(e){return"nodeType"in e&&e.nodeType===document.DOCUMENT_NODE}function Rhe(e){return"window"in e&&e.window===e?e:Ihe(e)&&e.defaultView||!1}function Lhe(e){var t="pageXOffset"===e?"scrollLeft":"scrollTop";return function(n,i){var r=Rhe(n);if(void 0===i)return r?r[e]:n[t];r?r.scrollTo(r[e],i):n[t]=i}}var Phe=Lhe("pageXOffset"),Ahe=Lhe("pageYOffset");function Ohe(e){var t=que(e),n={top:0,left:0,height:0,width:0},i=t&&t.documentElement;return i&&The(i,e)?(void 0!==e.getBoundingClientRect&&(n=e.getBoundingClientRect()),n={top:n.top+Ahe(i)-(i.clientTop||0),left:n.left+Phe(i)-(i.clientLeft||0),width:n.width,height:n.height}):n}function Mhe(e,t){var n=Rhe(e);return n?n.innerHeight:t?e.clientHeight:Ohe(e).height}var Nhe=/^(?:input|select|textarea|button)$/i;function zhe(e,t,n){void 0===t&&(t=null),void 0===n&&(n=null);for(var i=[];e;e=e.nextElementSibling)if(e!==t){if(n&&She(e,n))break;i.push(e)}return i}var Uhe=function(e){return!!e&&"offsetParent"in e};function Bhe(e){for(var t=que(e),n=e&&e.offsetParent;Uhe(n)&&"HTML"!==n.nodeName&&"static"===uhe(n,"position");)n=n.offsetParent;return n||t.documentElement}function Fhe(){return Fhe=VS?VS.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Fhe.apply(null,arguments)}var Hhe;function jhe(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function Ghe(e,t){e.classList?e.classList.remove(t):"string"==typeof e.className?e.className=jhe(e.className,t):e.setAttribute("class",jhe(e.className&&e.className.baseVal||"",t))}function Vhe(e,t){var n=uhe(e,"position"),i="absolute"===n,r=e.ownerDocument;if("fixed"===n)return r||document;for(;(e=e.parentNode)&&!Ihe(e);){var o=i&&"static"===uhe(e,"position"),a=(uhe(e,"overflow")||"")+(uhe(e,"overflow-y")||"")+uhe(e,"overflow-x");if(!o&&(/(auto|scroll)/.test(a)&&(t||Mhe(e)<e.scrollHeight)))return e}return r||document}var Khe=/&nbsp;/gi,Whe=/\xA0/g,Yhe=/\s+([^\s])/gm;var qhe={addEventListener:the,removeEventListener:hhe,triggerEvent:fhe,animate:function(e,t,n,i,r){if(!("nodeType"in e))return ghe(e);if(!t)throw new Error("must include properties to animate");return"function"==typeof i&&(r=i,i=""),ghe({node:e,properties:t,duration:n,easing:i,callback:r})},filter:function(e,t){return function(n){var i=n.currentTarget,r=n.target;Dhe(i,e).some((function(e){return The(e,r)}))&&t.call(this,n)}},listen:dhe,style:uhe,getComputedStyle:ihe,attribute:function(e,t,n){if(e){if(void 0===n)return e.getAttribute(t);n||""===n?e.setAttribute(t,String(n)):e.removeAttribute(t)}},activeElement:function(e){void 0===e&&(e=que());try{var t=e.activeElement;return t&&t.nodeName?t:null}catch(cK){return e.body}},ownerDocument:que,ownerWindow:nhe,requestAnimationFrame:whe,cancelAnimationFrame:Ehe,matches:She,height:Mhe,width:function(e,t){var n=Rhe(e);return n?n.innerWidth:t?e.clientWidth:Ohe(e).width},offset:Ohe,offsetParent:Bhe,position:function(e,t){var n,i={top:0,left:0};if("fixed"===uhe(e,"position"))n=e.getBoundingClientRect();else{var r=t||Bhe(e);n=Ohe(e),"html"!==function(e){return e.nodeName&&e.nodeName.toLowerCase()}(r)&&(i=Ohe(r));var o=String(uhe(r,"borderTopWidth")||0);i.top+=parseInt(o,10)-Ahe(r)||0;var a=String(uhe(r,"borderLeftWidth")||0);i.left+=parseInt(a,10)-Phe(r)||0}var s=String(uhe(e,"marginTop")||0),l=String(uhe(e,"marginLeft")||0);return Fhe({},n,{top:n.top-i.top-(parseInt(s,10)||0),left:n.left-i.left-(parseInt(l,10)||0)})},contains:The,scrollbarSize:function(e){if((!Hhe&&0!==Hhe||e)&&Zue){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),Hhe=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Hhe},scrollLeft:Phe,scrollParent:Vhe,scrollTo:function(e,t){var n=Ohe(e),i={top:0,left:0};if(e){var r=t||Vhe(e),o=Rhe(r),a=Ahe(r),s=Mhe(r,!0);o||(i=Ohe(r));var l=(n={top:n.top-i.top,left:n.left-i.left,height:n.height,width:n.width}).height,c=n.top+(o?0:a),u=c+l;a=a>c?c:u>a+s?u-s:a;var h=whe((function(){return Ahe(r,a)}));return function(){return Ehe(h)}}},scrollTop:Ahe,querySelectorAll:Dhe,closest:function(e,t,n){e.closest&&!n&&e.closest(t);var i=e;do{if(She(i,t))return i;i=i.parentElement}while(i&&i!==n&&i.nodeType===document.ELEMENT_NODE);return null},addClass:$ue,removeClass:Ghe,hasClass:Xue,toggleClass:function(e,t){e.classList?e.classList.toggle(t):Xue(e,t)?Ghe(e,t):$ue(e,t)},transitionEnd:phe,childNodes:function(e){return e?Che(e.childNodes):[]},childElements:function(e){return e?tA(e.children):[]},nextUntil:function(e,t){return zhe(e,e,t)},parents:function(e){return function(e,t){var n=null,i=[];for(n=e?e[t]:null;n&&9!==n.nodeType;)i.push(n),n=n[t]||null;return i}(e,"parentElement")},siblings:function(e){return zhe(e&&e.parentElement?e.parentElement.firstElementChild:null,e)},clear:function(e){if(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}return null},insertAfter:function(e,t){return e&&t&&t.parentNode?(t.nextSibling?t.parentNode.insertBefore(e,t.nextSibling):t.parentNode.appendChild(e),e):null},isInput:function(e){return!!e&&Nhe.test(e.nodeName)},isVisible:function(e){return!!e&&!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},prepend:function(e,t){return e&&t?(t.firstElementChild?t.insertBefore(e,t.firstElementChild):t.appendChild(e),e):null},remove:function(e){return e&&e.parentNode?(e.parentNode.removeChild(e),e):null},text:function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n=!0);var i="";return e&&(i=(e.textContent||"").replace(Khe," ").replace(Whe," "),t&&(i=nO(i).call(i)),n&&(i=i.replace(Yhe," $1"))),i}},Xhe=function(){function e(t,n){Ou(this,e),this.ticks=[],this.range=[0,100],this.currentValue=0,this.currentTick={name:"",val:0,renderVal:0},this.buttonStatus=1,this.startClientX=0,this.wrapperWidth=1,this.wrapperLeft=0,this.handleChange=function(){},this.parent=t,this.ticks=n.ticks,this.itemProps=n,this.sliderTitle=document.createElement("div"),this.sliderTitle.innerHTML=n.name,this.sliderContent=document.createElement("div"),this.sliderValue=document.createElement("div"),this.wrapper=document.createElement("div"),this.inner=document.createElement("div"),this.button=document.createElement("div"),qhe.addClass(this.wrapper,"wrapper"),qhe.addClass(this.parent,"xg-player-slider"),qhe.addClass(this.sliderContent,"line-slider"),qhe.addClass(this.sliderTitle,"line-title"),qhe.addClass(this.sliderValue,"line-value"),this.renderTicks(),this.rendInner(),this.parent.appendChild(this.sliderTitle),this.parent.appendChild(this.sliderContent),this.parent.appendChild(this.sliderValue),this.sliderContent.appendChild(this.wrapper),this.bindEvents(),this.setValue(n.defaultValue)}return Au(e,[{key:"renderTicks",value:function(){var e=this.wrapper,t=document.createElement("div");qhe.addClass(t,"ticks");for(var n=1;n<this.ticks.length-1;n++){var i=this.ticks[n],r=document.createElement("div");qhe.addClass(r,"tick"),qhe.style(r,{left:i.val+"%"}),t.appendChild(r)}e.appendChild(t)}},{key:"rendInner",value:function(){var e=this.wrapper,t=this.inner;qhe.addClass(t,"inner");var n=this.button;qhe.addClass(n,"button"),e.appendChild(t),e.appendChild(n)}},{key:"bindEvents",value:function(){qhe.addEventListener(this.wrapper,"click",this.onClick.bind(this)),qhe.addEventListener(this.button,"touchstart",this.onTouchStart.bind(this)),qhe.addEventListener(this.button,"touchmove",due(this.onTouchmove.bind(this),30)),qhe.addEventListener(this.button,"touchend",this.onTouchend.bind(this)),qhe.addEventListener(this.button,"touchcancel",this.onTouchend.bind(this))}},{key:"setValue",value:function(e){var t=this;if(e>this.range[1]||e<this.range[0])return!1;this.currentTick=this.getCurrentTick(e),this.currentValue=this.currentTick.val;var n=this.currentValue+"%";return setTimeout((function(){qhe.style(t.inner,{width:n}),qhe.style(t.button,{left:n})})),this.sliderValue.innerHTML=this.currentTick.name,this.handleChange(this.currentValue),!0}},{key:"renderText",value:function(e){var t,n=this;this.ticks=e.ticks,this.itemProps=e,this.sliderTitle.innerHTML=e.name,this.currentTick=ib(t=this.ticks).call(t,(function(e){return e.val===n.currentValue}))[0],this.sliderValue.innerHTML=this.currentTick.name}},{key:"onChange",value:function(e){this.handleChange=e}},{key:"getCurrentTick",value:function(e){for(var t=0;t<this.ticks.length-1;t++)if(this.ticks[t].val<=e&&this.ticks[t+1].val>=e)return e-this.ticks[t].val>this.ticks[t+1].val-e?this.ticks[t+1]:this.ticks[t];return this.ticks[0]}},{key:"onMousedown",value:function(e){this.startClientX=e.clientX,this.onStart()}},{key:"onTouchStart",value:function(e){e.stopPropagation(),this.startClientX=e.touches[0].clientX,this.onStart()}},{key:"onStart",value:function(){this.buttonStatus=2;var e=qhe.offset(this.wrapper);this.wrapperWidth=e.width,this.wrapperLeft=e.left}},{key:"onMousemove",value:function(e){if(2===this.buttonStatus){var t=e.clientX-this.startClientX;this.onMove(t)}}},{key:"onTouchmove",value:function(e){e.stopPropagation();var t=e.touches[0].clientX-this.startClientX;this.onMove(t)}},{key:"onMove",value:function(e){var t=this.startClientX+e;if(!(t-this.wrapperLeft<0||t-this.wrapperLeft>this.wrapperWidth)){this.startClientX=this.startClientX+e;var n=(this.startClientX-this.wrapperLeft)*(this.range[1]-this.range[0])/this.wrapperWidth;qhe.style(this.inner,{width:n+"%"}),qhe.style(this.button,{left:n+"%"})}}},{key:"onMouseup",value:function(e){this.onEnd()}},{key:"onTouchend",value:function(){this.onEnd()}},{key:"onEnd",value:function(){this.buttonStatus=3;var e=(this.startClientX-this.wrapperLeft)*(this.range[1]-this.range[0])/this.wrapperWidth;this.setValue(e)}},{key:"onClick",value:function(e){e.stopPropagation();var t=qhe.offset(this.wrapper);this.wrapperWidth=t.width,this.wrapperLeft=t.left;var n=(e.clientX-this.wrapperLeft)*(this.range[1]-this.range[0])/this.wrapperWidth;this.setValue(n)}}]),e}(),$he={danmuSwitch:"弹幕开关",danmuSetting:"弹幕设置",openDanmu:"打开弹幕",reset:"重置",opacity:"不透明度",area:"显示区域",speed:"弹幕速度",fontSize:"字体大小",danmuMask:"智能挡板",screen0:"1/4屏",screen1:"半屏",screen2:"3/4屏",screen3:"全屏",opacity0:"0",opacity1:"1/3",opacity2:"2/3",opacity3:"1",speed0:"0.25",speed1:"0.5",speed2:"正常",speed3:"1.25",speed4:"1.5",speed5:"2",fontSize0:"极小",fontSize1:"适中",fontSize2:"极大"},Zhe={danmuSwitch:"Barrage switch",danmuSetting:"Barrage settings",openDanmu:"Open Barrage",reset:"Reset",opacity:"Opacity",area:"Display area",speed:"Barrage speed",fontSize:"Font size",danmuMask:"Intelligent blocking",screen0:"1/4 screen",screen1:"Half screen",screen2:"3/4 screen",screen3:"Full screen",opacity0:"0",opacity1:"1/3",opacity2:"2/3",opacity3:"1",speed0:"0.25",speed1:"0.5",speed2:"Normal",speed3:"1.25",speed4:"1.5",speed5:"2",fontSize0:"Minimal",fontSize1:"Moderate",fontSize2:"Great"},Qhe={zh:$he,"zh-cn":$he,en:Zhe,jp:Zhe,"zh-hk":{danmuSwitch:"彈幕開關",danmuSetting:"彈幕設置",openDanmu:"打開彈幕",reset:"重置",opacity:"不透明度",area:"顯示區域",speed:"彈幕速度",fontSize:"字體大小",danmuMask:"智能擋板",screen0:"1/4屏",screen1:"半屏",screen2:"3/4屏",screen3:"全屏",opacity0:"0",opacity1:"1/3",opacity2:"2/3",opacity3:"1",speed0:"0.25",speed1:"0.5",speed2:"正常",speed3:"1.25",speed4:"1.5",speed5:"2",fontSize0:"極小",fontSize1:"適中",fontSize2:"極大"}},Jhe=function(){function e(t){Ou(this,e),this.curLang="en",this._defaultConfig={opacity:99,area:99,fontSize:50,speed:40,active:!1,usePanel:!0,danmuItems:[],maskConfig:{maskUrl:"",maskOffset:0,interval:200},maskActive:!1,external:[]},VS(this._defaultConfig,t)}return Au(e,[{key:"updateLang",value:function(e){this.curLang=e,this.curLangMap=Qhe[e]||Qhe.en;var t=this.curLangMap;this.sliderItemsProps=[{key:"opacity",name:t.opacity,defaultValue:99,ticks:[{name:t.opacity0,val:0,renderVal:0},{name:t.opacity1,val:33,renderVal:.33},{name:t.opacity2,val:66,renderVal:.66},{name:t.opacity3,val:99,renderVal:1}]},{key:"area",name:t.area,defaultValue:99,ticks:[{name:t.screen0,val:0,renderVal:1/4},{name:t.screen1,val:33,renderVal:.5},{name:t.screen2,val:66,renderVal:3/4},{name:t.screen3,val:99,renderVal:1}]},{key:"speed",name:t.speed,defaultValue:40,ticks:[{name:t.speed0,val:0,renderVal:1/4},{name:t.speed1,val:20,renderVal:.5},{name:t.speed2,val:40,renderVal:1},{name:t.speed3,val:60,renderVal:5/4},{name:t.speed4,val:80,renderVal:1.5},{name:t.speed5,val:100,renderVal:2}]},{key:"fontSize",name:t.fontSize,defaultValue:50,ticks:[{name:t.fontSize0,val:0,renderVal:14},{name:t.fontSize1,val:50,renderVal:16},{name:t.fontSize2,val:100,renderVal:20}]}],this._defaultConfig.external.forEach((function(t){t.name=t.lang[e]||t.lang.en}))}},{key:"getConfig",value:function(){return this._defaultConfig}},{key:"updateConfig",value:function(e){VS(this._defaultConfig,e)}},{key:"updateComments",value:function(e){this._defaultConfig.danmuItems=e}},{key:"getRenderVal",value:function(e,t){var n,i,r=fb(n=this.sliderItemsProps).call(n,(function(t){return t.key===e}))||this.sliderItemsProps[0];return(fb(i=r.ticks).call(i,(function(e){return e.val===t}))||r.ticks[0]).renderVal}}]),e}(),ede=function(){function e(t,n){Ou(this,e),this.state=t,this.player=n,this.root=qO.createDom("xg-danmu"),qhe.addClass(this.root,"xgplayer-danmu-container")}var t;return Au(e,[{key:"initDanmuContainer",value:function(){var e,t=this.state.getConfig(),n=t.opacity,i=void 0===n?1:n,r=t.fontSize,o=void 0===r?16:r,a=t.area,s=void 0===a?1:a,l=t.danmuItems,c=void 0===l?[]:l,u=t.active,h=t.speed,d=void 0===h?40:h,f=W_(e=u?c:[]).call(e,(function(e){return!e.style&&(e.style={}),e})),p={container:this.root,containerStyle:{zIndex:1},player:this.player.media,comments:f,live:!1,area:{start:0,end:this.state.getRenderVal("area",s)},needResizeObserver:!0};this.danmuJs=new window["danmu.js"](p),this.setOpacity(this.state.getRenderVal("opacity",i)),this.setFontSize(this.state.getRenderVal("fontSize",o)),this.setSpeed(this.state.getRenderVal("speed",d))}},{key:"start",value:function(){this.root&&(this.root.style.display="block"),this.danmuJs.start()}},{key:"pause",value:function(){this.danmuJs.pause()}},{key:"play",value:function(){this.danmuJs.play()}},{key:"stop",value:function(){this.danmuJs.stop()}},{key:"resize",value:function(){this.danmuJs.resize()}},{key:"sendDanmu",value:function(e){this.state.getConfig().active&&this.danmuJs.sendComment(e)}},{key:"clear",value:function(){this.danmuJs.clear()}},{key:"setProperty",value:function(e,t){return"opacity"===e?this.setOpacity(this.state.getRenderVal(e,t)):"area"===e?this.setArea(this.state.getRenderVal(e,t)):"speed"===e?this.setSpeed(this.state.getRenderVal(e,t)):"fontSize"===e?this.setFontSize(this.state.getRenderVal(e,t)):void 0}},{key:"setOpacity",value:function(e){this.danmuJs.setOpacity(e)}},{key:"setFontSize",value:function(e){this.danmuJs.setFontSize(e)}},{key:"setArea",value:function(e){this.danmuJs.setArea({start:0,end:this.state.getRenderVal("area",e)})}},{key:"setSpeed",value:function(e){this.danmuJs.setAllDuration("scroll",1e4/e)}},{key:"destroy",value:(t=d_(u_().mark((function e(){return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.danmuJs){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.danmuJs.stop();case 4:return e.next=6,this.danmuJs.destroy();case 6:this.danmuJs=null,this.root.parentNode.removeChild(this.root),this.root=null;case 10:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),tde=function(){function e(t){Ou(this,e),this.state=t,this.root=document.createElement("div"),qhe.addClass(this.root,"panel-box"),qhe.addEventListener(this.root,"click",(function(e){e.stopPropagation()}))}return Au(e,[{key:"destroy",value:function(){this.root.parentNode&&this.root.parentNode.removeChild(this.root),this.root=null}}]),e}(),nde=function(){function e(t){Ou(this,e),this.callback=function(){},this.key=t.key,this.name=t.name,this.value=t.value,this.root=document.createElement("div"),qhe.addClass(this.root,"xg-player-switch-wrapper"),this.render()}return Au(e,[{key:"render",value:function(){var e=this;if(!this.root.childNodes.length){var t=document.createElement("div");this.$left=t,qhe.addClass(t,"left"),t.innerHTML=this.name;var n=document.createElement("div");this.$right=n,qhe.addClass(n,"right"),n.innerHTML='<label class="switch">\n <input type="checkbox">\n <span class="slider round"></span>\n </label>',this.root.appendChild(t),this.root.appendChild(n);var i=this.$right.querySelector("input");qhe.addEventListener(this.$right,"click",hue((function(t){t.stopPropagation(),e.value=!e.value,e.value?null==i||i.setAttribute("checked","checked"):null==i||i.removeAttribute("checked"),e.callback(e.value)}),50))}var r=this.$right.querySelector("input");this.value?null==r||r.setAttribute("checked","checked"):r.removeAttribute("checked"),r.checked=this.value}},{key:"renderName",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.$left.innerHTML=e}},{key:"onChange",value:function(e){this.callback=e}}]),e}(),ide="pc"===eM.device,rde=ON.POSITIONS,ode=function(e){rh(n,e);var t=Ah(n);function n(e){var i;return Ou(this,n),(i=t.call(this,e)).seekCost=window.performance.now(),i.eventBus=new EA,window["danmu.js"]?(i.state=new Jhe(e.config),i.state.updateLang(i.player.lang),i.iconWrap=document.createElement("div"),qhe.addClass(i.iconWrap,"icon-warp"),i.tipsWrap=document.createElement("div"),qhe.addClass(i.tipsWrap,"tips-wrap"),i.container=new ede(i.state,i.player),i.panel=new tde(i.state),i):Ph(i)}return Au(n,[{key:"afterCreate",value:function(){var e;null===(e=this.player.root)||void 0===e||e.appendChild(this.container.root),this.renderIcon(),this.renderBox(),this.root.appendChild(this.iconWrap),ide&&(this.state.getConfig().usePanel&&this.root.appendChild(this.panel.root),this.renderTips(),qhe.addClass(this.panel.root,"pc-panel"),this.root.appendChild(this.tipsWrap)),this.initEvents(),this.container.initDanmuContainer()}},{key:"afterPlayerInit",value:function(){this.initDanmuMask()}},{key:"updateLang",value:function(e){this.state.updateLang(this.player.lang),this.eventBus.emit("updateLang")}},{key:"registerIcons",value:function(){return{open:{icon:Kue,class:"xgplayer-danmu-open-svg"},close:{icon:Wue,class:"xgplayer-danmu-close-svg"},reset:{icon:Yue,class:"xgplayer-danmu-reset-svg"}}}},{key:"initEvents",value:function(){ide?this.bindPCEvent():this.bindMobileEvent(),this.bindPlayerEvent()}},{key:"start",value:function(){this.container&&(this.container.start(),this.player.paused&&this.container.pause())}},{key:"bindPlayerEvent",value:function(){var e=this;this.once(dM,(function(){e.start()})),this.on(lM,(function(){e.container.pause()})),this.on(oM,(function(){e.container.play()})),this.on(uM,(function(){e.seekCost=window.performance.now(),e.container.stop()})),this.on(hM,hue((function(){e.container.start()}),300)),this.on([NM,zM,UM],(function(){e.container.resize(),e.handleResize()})),this.on(GM,this.handlePIP.bind(this))}},{key:"bindPCEvent",value:function(){var e=this;qhe.addEventListener(this.root,"click",this.onClick.bind(this)),qhe.addEventListener(this.root,"mouseenter",(function(){var t=e.state.getConfig().active,n=e.player.controls;"rightSide"===e.config.listType?n.blur():n.focus(),t?(qhe.style(e.panel.root,{display:"block"}),qhe.style(e.tipsWrap,{display:"none"})):(qhe.style(e.panel.root,{display:"none"}),qhe.style(e.tipsWrap,{display:"block"}))})),qhe.addEventListener(this.root,"mouseleave",(function(){var t=e.player.controls;"rightSide"===e.config.listType?t.focus():t.focusAwhile(),qhe.style(e.panel.root,{display:"none"}),qhe.style(e.tipsWrap,{display:"none"})}))}},{key:"bindMobileEvent",value:function(){var e=this;qhe.addEventListener(this.root,"click",(function(){e.state.getConfig().usePanel?e.player.panel.showPanel(e.panel.root):e.onClick()}))}},{key:"onClick",value:function(){this.toggleDanmu(),this.renderIcon()}},{key:"toggleDanmu",value:function(){var e=this.state.getConfig(),t=e.active,n=e.maskActive,i=!t;i?(this.state.updateConfig({active:i}),n&&this.initMask(),null==this||this.container.start()):(null==this||this.container.stop(),this.destroyMask(),this.state.updateConfig({active:i})),this.player.emit(Hce.DANMU_CHANGE,{active:i}),this.danmuSwitchInSettingPanel&&(this.danmuSwitchInSettingPanel.value=i,this.danmuSwitchInSettingPanel.render())}},{key:"renderIcon",value:function(){this.iconWrap.innerHTML="",this.state.getConfig().active?this.iconWrap.appendChild(this.icons.open):this.iconWrap.appendChild(this.icons.close)}},{key:"renderTips",value:function(){this.tipsWrap.innerHTML=this.state.curLangMap.openDanmu}},{key:"renderBox",value:function(){var e=this;this.panel.root.innerHTML="";var t=document.createElement("div");qhe.addClass(t,"box-header"),t.innerHTML='<div class="header-setting">'+this.state.curLangMap.danmuSetting+'</div> <div class="header-reset"></div>';var n=t.querySelector(".header-reset");n.appendChild(this.icons.reset),qhe.addEventListener(n,"click",(function(t){t.stopPropagation(),e.eventBus.emit("reset")}),{capture:!0});var i=document.createElement("span");i.innerHTML=this.state.curLangMap.reset,n.appendChild(i),this.eventBus.on("updateLang",(function(){i.innerHTML=e.state.curLangMap.reset,t.querySelector(".header-setting").innerHTML=e.state.curLangMap.danmuSetting})),this.panel.root.appendChild(t),ide||this.renderTurnOff(),this.renderSliders(),this.renderSwitches()}},{key:"renderTurnOff",value:function(){var e=this,t={name:this.state.curLangMap.danmuSwitch,key:"active",value:this.state.getConfig().active||!1},n=new nde(t);this.danmuSwitchInSettingPanel=n,this.panel.root.appendChild(n.root),n.onChange((function(t){e.toggleDanmu(),e.renderIcon()})),this.eventBus.on("updateLang",(function(){n.renderName(e.state.curLangMap.danmuSwitch)}))}},{key:"renderSwitches",value:function(){var e,t=this;null===(e=this.state.getConfig().external)||void 0===e||e.forEach((function(e){var n=new nde(e);t.panel.root.appendChild(n.root),t.eventBus.on("updateLang",(function(){n.renderName(e.name)})),n.onChange((function(n){var i=t.state.getConfig().external||[];i.forEach((function(t){t.key===e.key&&(t.value=n)})),t.state.updateConfig({external:i}),t.player.emit(Hce.DANMU_CHANGE,{external:i})}))}))}},{key:"renderSliders",value:function(){var e=this;this.state.sliderItemsProps.forEach((function(t,n){var i,r,o=document.createElement("div"),a=new Xhe(o,t);null!=(null===(i=e.state.getConfig())||void 0===i?void 0:i[t.key])&&a.setValue(null===(r=e.state.getConfig())||void 0===r?void 0:r[t.key]);a.onChange((function(n){e.state.updateConfig(up({},t.key,n)),e.player.emit(Hce.DANMU_CHANGE,up({},t.key,n)),e.container.setProperty(t.key,n)})),e.eventBus.on("reset",(function(){a.setValue(t.defaultValue)})),e.eventBus.on("updateLang",(function(){a.renderText(e.state.sliderItemsProps[n])})),e.panel.root.appendChild(o)}))}},{key:"sendDanmu",value:function(e){return this.container.sendDanmu(e)}},{key:"updateConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.state.updateConfig(e)}},{key:"getConfig",value:function(){return this.state.getConfig()}},{key:"initDanmuMask",value:function(){if(this.player){var e=this.state.getConfig(),t=e.maskConfig,n=e.active,i=e.maskActive;t.maskUrl&&(this.renderDanmuMaskTurnOff(),n&&i&&this.initMask())}}},{key:"renderDanmuMaskTurnOff",value:function(){var e=this,t={name:this.state.curLangMap.danmuMask,key:"maskActive",value:this.state.getConfig().maskActive||!1},n=new nde(t);this.panel.root.appendChild(n.root),n.onChange((function(t){e.state.updateConfig({maskActive:t}),t?e.initMask():e.destroyMask(),e.renderIcon()})),this.eventBus.on("updateLang",(function(){n.renderName(e.state.curLangMap.danmuMask)}))}},{key:"initMask",value:function(){this.destroyMask();var e=this.state.getConfig(),t=e.maskConfig,n=e.maskActive,i=e.active;t.maskUrl&&n&&i&&(window.DanmuMask&&"function"==typeof window.DanmuMask&&(this.mask=new window.DanmuMask({player:this.player,url:t.maskUrl,originStart:t.maskOffset,interval:t.interval})),this.mask.init())}},{key:"destroyMask",value:function(){this.mask&&(this.mask.destroy(),this.mask=null)}},{key:"handleResize",value:function(){var e,t,n,i;if(this.mask){var r=this.player;this.mask.setContainerSize(null!==(e=null==r||null===(t=r.root)||void 0===t?void 0:t.offsetWidth)&&void 0!==e?e:0,null!==(n=null==r||null===(i=r.root)||void 0===i?void 0:i.offsetHeight)&&void 0!==n?n:0)}}},{key:"handlePIP",value:function(e){e?this.destroyMask():this.initMask()}},{key:"destroy",value:function(){this.destroyMask(),this.container.destroy(),this.panel.destroy()}},{key:"render",value:function(){return'<div class="xgplayer-danmu"></div>'}}],[{key:"pluginName",get:function(){return"DanmuPlugin"}},{key:"defaultConfig",get:function(){return{position:rde.CONTROLS_RIGHT,index:Wce}}}]),n}(ON);function ade(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sde(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),Object.defineProperty(e,pde(i.key),i)}}function lde(e,t,n){return t&&sde(e.prototype,t),n&&sde(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function cde(e,t,n){return(t=pde(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ude(e){return(ude=Object.setPrototypeOf?zx.bind():function(e){return e.__proto__||zx(e)})(e)}function hde(e,t){return(hde=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function dde(e,t){if(t&&("object"===Du(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function fde(e){var t=function(){if("undefined"==typeof Reflect||!JP)return!1;if(JP.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(JP(Boolean,[],(function(){}))),!0}catch(cK){return!1}}();return function(){var n,i=ude(e);if(t){var r=ude(this).constructor;n=JP(i,arguments,r)}else n=i.apply(this,arguments);return dde(this,n)}}function pde(e){var t=function(e,t){if("object"!==Du(e)||null===e)return e;var n=e[nA];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==Du(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Du(t)?t:String(t)}var vde=l$,gde=S$,yde=d$,mde=s$,_de=_2,bde=w0,kde=f$,Ede=BZ,wde=A$,Sde=Object.assign,Tde=Object.defineProperty,Cde=gde([].concat),xde=!Sde||mde((function(){if(vde&&1!==Sde({b:1},Sde(Tde({},"a",{enumerable:!0,get:function(){Tde(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!=Sde({},e)[n]||_de(Sde({},t)).join("")!=i}))?function(e,t){for(var n=Ede(e),i=arguments.length,r=1,o=bde.f,a=kde.f;i>r;)for(var s,l=wde(arguments[r++]),c=o?Cde(_de(l),o(l)):_de(l),u=c.length,h=0;u>h;)s=c[h++],vde&&!yde(a,l,s)||(n[s]=l[s]);return n}:Sde,Dde=xde;Z0({target:"Object",stat:!0,arity:2,forced:Object.assign!==Dde},{assign:Dde});var Ide=l$,Rde=S$,Lde=_2,Pde=F$,Ade=Rde(f$.f),Ode=Rde([].push),Mde=function(e){return function(t){for(var n,i=Pde(t),r=Lde(i),o=r.length,a=0,s=[];o>a;)n=r[a++],Ide&&!Ade(i,n)||Ode(s,e?[n,i[n]]:i[n]);return s}},Nde={entries:Mde(!0),values:Mde(!1)}.values;Z0({target:"Object",stat:!0},{values:function(e){return Nde(e)}});var zde=function(e){return e&&e.Math==Math&&e},Ude=zde("object"==typeof globalThis&&globalThis)||zde("object"==typeof window&&window)||zde("object"==typeof self&&self)||zde("object"==typeof e&&e)||function(){return this}()||e||Function("return this")(),Bde={},Fde=function(e){try{return!!e()}catch(tSe){return!0}},Hde=!Fde((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),jde=!Fde((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),Gde=jde,Vde=Function.prototype.call,Kde=Gde?Vde.bind(Vde):function(){return Vde.apply(Vde,arguments)},Wde={},Yde={}.propertyIsEnumerable,qde=Object.getOwnPropertyDescriptor,Xde=qde&&!Yde.call({1:2},1);Wde.f=Xde?function(e){var t=qde(this,e);return!!t&&t.enumerable}:Yde;var $de,Zde,Qde=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Jde=jde,efe=Function.prototype,tfe=efe.call,nfe=Jde&&efe.bind.bind(tfe,tfe),ife=Jde?nfe:function(e){return function(){return tfe.apply(e,arguments)}},rfe=ife,ofe=rfe({}.toString),afe=rfe("".slice),sfe=Fde,lfe=function(e){return afe(ofe(e),8,-1)},cfe=Object,ufe=ife("".split),hfe=sfe((function(){return!cfe("z").propertyIsEnumerable(0)}))?function(e){return"String"==lfe(e)?ufe(e,""):cfe(e)}:cfe,dfe=function(e){return null==e},ffe=dfe,pfe=TypeError,vfe=function(e){if(ffe(e))throw pfe("Can't call method on "+e);return e},gfe=hfe,yfe=vfe,mfe=function(e){return gfe(yfe(e))},_fe="object"==typeof document&&document.all,bfe={all:_fe,IS_HTMLDDA:void 0===_fe&&void 0!==_fe},kfe=bfe.all,Efe=bfe.IS_HTMLDDA?function(e){return"function"==typeof e||e===kfe}:function(e){return"function"==typeof e},wfe=Efe,Sfe=bfe.all,Tfe=bfe.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:wfe(e)||e===Sfe}:function(e){return"object"==typeof e?null!==e:wfe(e)},Cfe=Ude,xfe=Efe,Dfe=function(e,t){return arguments.length<2?(n=Cfe[e],xfe(n)?n:void 0):Cfe[e]&&Cfe[e][t];var n},Ife=ife({}.isPrototypeOf),Rfe="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Lfe=Ude,Pfe=Rfe,Afe=Lfe.process,Ofe=Lfe.Deno,Mfe=Afe&&Afe.versions||Ofe&&Ofe.version,Nfe=Mfe&&Mfe.v8;Nfe&&(Zde=($de=Nfe.split("."))[0]>0&&$de[0]<4?1:+($de[0]+$de[1])),!Zde&&Pfe&&(!($de=Pfe.match(/Edge\/(\d+)/))||$de[1]>=74)&&($de=Pfe.match(/Chrome\/(\d+)/))&&(Zde=+$de[1]);var zfe=Zde,Ufe=Fde,Bfe=Ude.String,Ffe=!!Object.getOwnPropertySymbols&&!Ufe((function(){var e=Symbol();return!Bfe(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&zfe&&zfe<41})),Hfe=Ffe&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,jfe=Dfe,Gfe=Efe,Vfe=Ife,Kfe=Object,Wfe=Hfe?function(e){return"symbol"==typeof e}:function(e){var t=jfe("Symbol");return Gfe(t)&&Vfe(t.prototype,Kfe(e))},Yfe=String,qfe=Efe,Xfe=function(e){try{return Yfe(e)}catch(tSe){return"Object"}},$fe=TypeError,Zfe=function(e){if(qfe(e))return e;throw $fe(Xfe(e)+" is not a function")},Qfe=dfe,Jfe=Kde,epe=Efe,tpe=Tfe,npe=TypeError,ipe={exports:{}},rpe=Ude,ope=Object.defineProperty,ape=function(e,t){try{ope(rpe,e,{value:t,configurable:!0,writable:!0})}catch(tSe){rpe[e]=t}return t},spe=ape,lpe="__core-js_shared__",cpe=Ude[lpe]||spe(lpe,{}),upe=cpe;(ipe.exports=function(e,t){return upe[e]||(upe[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.31.1",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.31.1/LICENSE",source:"https://github.com/zloirock/core-js"});var hpe=ipe.exports,dpe=vfe,fpe=Object,ppe=function(e){return fpe(dpe(e))},vpe=ife({}.hasOwnProperty),gpe=Object.hasOwn||function(e,t){return vpe(ppe(e),t)},ype=ife,mpe=0,_pe=Math.random(),bpe=ype(1..toString),kpe=function(e){return"Symbol("+(void 0===e?"":e)+")_"+bpe(++mpe+_pe,36)},Epe=hpe,wpe=gpe,Spe=kpe,Tpe=Ffe,Cpe=Hfe,xpe=Ude.Symbol,Dpe=Epe("wks"),Ipe=Cpe?xpe.for||xpe:xpe&&xpe.withoutSetter||Spe,Rpe=Kde,Lpe=Tfe,Ppe=Wfe,Ape=function(e,t){var n=e[t];return Qfe(n)?void 0:Zfe(n)},Ope=function(e,t){var n,i;if("string"===t&&epe(n=e.toString)&&!tpe(i=Jfe(n,e)))return i;if(epe(n=e.valueOf)&&!tpe(i=Jfe(n,e)))return i;if("string"!==t&&epe(n=e.toString)&&!tpe(i=Jfe(n,e)))return i;throw npe("Can't convert object to primitive value")},Mpe=TypeError,Npe=function(e){return wpe(Dpe,e)||(Dpe[e]=Tpe&&wpe(xpe,e)?xpe[e]:Ipe("Symbol."+e)),Dpe[e]}("toPrimitive"),zpe=function(e,t){if(!Lpe(e)||Ppe(e))return e;var n,i=Ape(e,Npe);if(i){if(void 0===t&&(t="default"),n=Rpe(i,e,t),!Lpe(n)||Ppe(n))return n;throw Mpe("Can't convert object to primitive value")}return void 0===t&&(t="number"),Ope(e,t)},Upe=Wfe,Bpe=function(e){var t=zpe(e,"string");return Upe(t)?t:t+""},Fpe=Tfe,Hpe=Ude.document,jpe=Fpe(Hpe)&&Fpe(Hpe.createElement),Gpe=function(e){return jpe?Hpe.createElement(e):{}},Vpe=!Hde&&!Fde((function(){return 7!=Object.defineProperty(Gpe("div"),"a",{get:function(){return 7}}).a})),Kpe=Hde,Wpe=Kde,Ype=Wde,qpe=Qde,Xpe=mfe,$pe=Bpe,Zpe=gpe,Qpe=Vpe,Jpe=Object.getOwnPropertyDescriptor;Bde.f=Kpe?Jpe:function(e,t){if(e=Xpe(e),t=$pe(t),Qpe)try{return Jpe(e,t)}catch(tSe){}if(Zpe(e,t))return qpe(!Wpe(Ype.f,e,t),e[t])};var eve={},tve=Hde&&Fde((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),nve=Tfe,ive=String,rve=TypeError,ove=function(e){if(nve(e))return e;throw rve(ive(e)+" is not an object")},ave=Hde,sve=Vpe,lve=tve,cve=ove,uve=Bpe,hve=TypeError,dve=Object.defineProperty,fve=Object.getOwnPropertyDescriptor,pve="enumerable",vve="configurable",gve="writable";eve.f=ave?lve?function(e,t,n){if(cve(e),t=uve(t),cve(n),"function"==typeof e&&"prototype"===t&&"value"in n&&gve in n&&!n[gve]){var i=fve(e,t);i&&i[gve]&&(e[t]=n.value,n={configurable:vve in n?n[vve]:i[vve],enumerable:pve in n?n[pve]:i[pve],writable:!1})}return dve(e,t,n)}:dve:function(e,t,n){if(cve(e),t=uve(t),cve(n),sve)try{return dve(e,t,n)}catch(tSe){}if("get"in n||"set"in n)throw hve("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var yve=eve,mve=Qde,_ve=Hde?function(e,t,n){return yve.f(e,t,mve(1,n))}:function(e,t,n){return e[t]=n,e},bve={exports:{}},kve=Hde,Eve=gpe,wve=Function.prototype,Sve=kve&&Object.getOwnPropertyDescriptor,Tve=Eve(wve,"name"),Cve={EXISTS:Tve,PROPER:Tve&&"something"===function(){}.name,CONFIGURABLE:Tve&&(!kve||kve&&Sve(wve,"name").configurable)},xve=Efe,Dve=cpe,Ive=ife(Function.toString);xve(Dve.inspectSource)||(Dve.inspectSource=function(e){return Ive(e)});var Rve,Lve,Pve,Ave=Dve.inspectSource,Ove=Efe,Mve=Ude.WeakMap,Nve=Ove(Mve)&&/native code/.test(String(Mve)),zve=kpe,Uve=hpe("keys"),Bve={},Fve=Nve,Hve=Ude,jve=Tfe,Gve=_ve,Vve=gpe,Kve=cpe,Wve=function(e){return Uve[e]||(Uve[e]=zve(e))},Yve=Bve,qve="Object already initialized",Xve=Hve.TypeError,$ve=Hve.WeakMap;if(Fve||Kve.state){var Zve=Kve.state||(Kve.state=new $ve);Zve.get=Zve.get,Zve.has=Zve.has,Zve.set=Zve.set,Rve=function(e,t){if(Zve.has(e))throw Xve(qve);return t.facade=e,Zve.set(e,t),t},Lve=function(e){return Zve.get(e)||{}},Pve=function(e){return Zve.has(e)}}else{var Qve=Wve("state");Yve[Qve]=!0,Rve=function(e,t){if(Vve(e,Qve))throw Xve(qve);return t.facade=e,Gve(e,Qve,t),t},Lve=function(e){return Vve(e,Qve)?e[Qve]:{}},Pve=function(e){return Vve(e,Qve)}}var Jve={set:Rve,get:Lve,has:Pve,enforce:function(e){return Pve(e)?Lve(e):Rve(e,{})},getterFor:function(e){return function(t){var n;if(!jve(t)||(n=Lve(t)).type!==e)throw Xve("Incompatible receiver, "+e+" required");return n}}},ege=ife,tge=Fde,nge=Efe,ige=gpe,rge=Hde,oge=Cve.CONFIGURABLE,age=Ave,sge=Jve.enforce,lge=Jve.get,cge=String,uge=Object.defineProperty,hge=ege("".slice),dge=ege("".replace),fge=ege([].join),pge=rge&&!tge((function(){return 8!==uge((function(){}),"length",{value:8}).length})),vge=String(String).split("String"),gge=bve.exports=function(e,t,n){"Symbol("===hge(cge(t),0,7)&&(t="["+dge(cge(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!ige(e,"name")||oge&&e.name!==t)&&(rge?uge(e,"name",{value:t,configurable:!0}):e.name=t),pge&&n&&ige(n,"arity")&&e.length!==n.arity&&uge(e,"length",{value:n.arity});try{n&&ige(n,"constructor")&&n.constructor?rge&&uge(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(tSe){}var i=sge(e);return ige(i,"source")||(i.source=fge(vge,"string"==typeof t?t:"")),e};Function.prototype.toString=gge((function(){return nge(this)&&lge(this).source||age(this)}),"toString");var yge=bve.exports,mge=Efe,_ge=eve,bge=yge,kge=ape,Ege={},wge=Math.ceil,Sge=Math.floor,Tge=Math.trunc||function(e){var t=+e;return(t>0?Sge:wge)(t)},Cge=function(e){var t=+e;return t!=t||0===t?0:Tge(t)},xge=Cge,Dge=Math.max,Ige=Math.min,Rge=Cge,Lge=Math.min,Pge=function(e){return e>0?Lge(Rge(e),9007199254740991):0},Age=mfe,Oge=function(e,t){var n=xge(e);return n<0?Dge(n+t,0):Ige(n,t)},Mge=function(e){return Pge(e.length)},Nge=function(e){return function(t,n,i){var r,o=Age(t),a=Mge(o),s=Oge(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}},zge={includes:Nge(!0),indexOf:Nge(!1)},Uge=gpe,Bge=mfe,Fge=zge.indexOf,Hge=Bve,jge=ife([].push),Gge=function(e,t){var n,i=Bge(e),r=0,o=[];for(n in i)!Uge(Hge,n)&&Uge(i,n)&&jge(o,n);for(;t.length>r;)Uge(i,n=t[r++])&&(~Fge(o,n)||jge(o,n));return o},Vge=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype");Ege.f=Object.getOwnPropertyNames||function(e){return Gge(e,Vge)};var Kge={};Kge.f=Object.getOwnPropertySymbols;var Wge,Yge=Dfe,qge=Ege,Xge=Kge,$ge=ove,Zge=ife([].concat),Qge=Yge("Reflect","ownKeys")||function(e){var t=qge.f($ge(e)),n=Xge.f;return n?Zge(t,n(e)):t},Jge=gpe,eye=Qge,tye=Bde,nye=eve,iye=Fde,rye=Efe,oye=/#|\.prototype\./,aye=function(e,t){var n=lye[sye(e)];return n==uye||n!=cye&&(rye(t)?iye(t):!!t)},sye=aye.normalize=function(e){return String(e).replace(oye,".").toLowerCase()},lye=aye.data={},cye=aye.NATIVE="N",uye=aye.POLYFILL="P",hye=aye,dye=Ude,fye=Bde.f,pye=_ve,vye=function(e,t,n,i){i||(i={});var r=i.enumerable,o=void 0!==i.name?i.name:t;if(mge(n)&&bge(n,o,i),i.global)r?e[t]=n:kge(t,n);else{try{i.unsafe?e[t]&&(r=!0):delete e[t]}catch(tSe){}r?e[t]=n:_ge.f(e,t,{value:n,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.nonWritable})}return e},gye=ape,yye=function(e,t,n){for(var i=eye(t),r=nye.f,o=tye.f,a=0;a<i.length;a++){var s=i[a];Jge(e,s)||n&&Jge(n,s)||r(e,s,o(t,s))}},mye=hye,_ye=function(e,t){var n,i,r,o,a,s=e.target,l=e.global,c=e.stat;if(n=l?dye:c?dye[s]||gye(s,{}):(dye[s]||{}).prototype)for(i in t){if(o=t[i],r=e.dontCallGetSet?(a=fye(n,i))&&a.value:n[i],!mye(l?i:s+(c?".":"#")+i,e.forced)&&void 0!==r){if(typeof o==typeof r)continue;yye(o,r)}(e.sham||r&&r.sham)&&pye(o,"sham",!0),vye(n,i,o,e)}},bye=jde,kye=Function.prototype,Eye=kye.apply,wye=kye.call,Sye="object"==typeof Reflect&&Reflect.apply||(bye?wye.bind(Eye):function(){return wye.apply(Eye,arguments)}),Tye="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,Cye=ife([].slice),xye=TypeError,Dye=Ude,Iye=Sye,Rye=Efe,Lye=Tye,Pye=Rfe,Aye=Cye,Oye=function(e,t){if(e<t)throw xye("Not enough arguments");return e},Mye=Dye.Function,Nye=/MSIE .\./.test(Pye)||Lye&&((Wge=Dye.Bun.version.split(".")).length<3||0==Wge[0]&&(Wge[1]<3||3==Wge[1]&&0==Wge[2])),zye=function(e,t){var n=t?2:1;return Nye?function(i,r){var o=Oye(arguments.length,1)>n,a=Rye(i)?i:Mye(i),s=o?Aye(arguments,n):[],l=o?function(){Iye(a,this,s)}:a;return t?e(l,r):e(l)}:e},Uye=_ye,Bye=Ude,Fye=zye(Bye.setInterval,!0);Uye({global:!0,bind:!0,forced:Bye.setInterval!==Fye},{setInterval:Fye});var Hye=_ye,jye=Ude,Gye=zye(jye.setTimeout,!0);Hye({global:!0,bind:!0,forced:jye.setTimeout!==Gye},{setTimeout:Gye});var Vye,Kye,Wye={MENU_REPORT:"MENU_REPORT",MENU_LOG:"MENU_LOG"},Yye={VID:5,TYPE:10,CODECS:20,SPEED:30,BUFFER:40,PLAY_QUALITY:50,SCHEME:60,RESOLUTION:70,VIEWPORT:80,VOLUME:90,CDN:100,P2P:110,PLAYER_VERSION:120},qye={MENU:0,INTERACT:1,CONTEXTMENU:2},Xye={STATS:0,REPORT:1},$ye={CLOSE:0,COPY:1},Zye={SHOW:0,HIDE:1},Qye={STATS:"STATS",REPORT:"REPORT",CLOSE:"CLOSE",COPY:"COPY",CONTEXTMENU_SHOW:"CONTEXTMENU_SHOW",CONTEXTMENU_HIDE:"CONTEXTMENU_HIDE"},Jye=Object.freeze({__proto__:null,CONTEXTMENU_TYPES:Zye,EVENTS:Wye,INFO_TYPES:Yye,INTERACT_TYPES:$ye,LOG_EVENTS:Qye,LOG_TYPES:qye,MENU_TYPES:Xye}),eme={cn:(Vye={},cde(Vye,Yye.VID,"VID"),cde(Vye,Yye.TYPE,"类型"),cde(Vye,Yye.CODECS,"编码"),cde(Vye,Yye.SPEED,"加载速度"),cde(Vye,Yye.BUFFER,"缓冲时长"),cde(Vye,Yye.PLAY_QUALITY,"丢帧率"),cde(Vye,Yye.SCHEME,"视频协议"),cde(Vye,Yye.RESOLUTION,"分辨率"),cde(Vye,Yye.VIEWPORT,"视图尺寸"),cde(Vye,Yye.VOLUME,"音量大小"),cde(Vye,Yye.CDN,"CDN"),cde(Vye,Yye.P2P,"P2P"),cde(Vye,Yye.PLAYER_VERSION,"播放器版本"),Vye),en:(Kye={},cde(Kye,Yye.VID,"Video ID"),cde(Kye,Yye.TYPE,"Video Type"),cde(Kye,Yye.CODECS,"Codecs"),cde(Kye,Yye.SPEED,"Connection Speed"),cde(Kye,Yye.BUFFER,"Buffer Health"),cde(Kye,Yye.PLAY_QUALITY,"Dropped Frames"),cde(Kye,Yye.SCHEME,"Protocol"),cde(Kye,Yye.RESOLUTION,"Res"),cde(Kye,Yye.VIEWPORT,"Viewport"),cde(Kye,Yye.VOLUME,"Volume"),cde(Kye,Yye.CDN,"CDN"),cde(Kye,Yye.P2P,"P2P"),cde(Kye,Yye.PLAYER_VERSION,"Player Version"),Kye)},tme=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hde(e,t)}(n,e);var t=fde(n);function n(){return ade(this,n),t.apply(this,arguments)}return lde(n,[{key:"afterCreate",value:function(){}},{key:"onPluginsReady",value:function(){var e=this.player.plugins.stats;this.menuInst=new nme(this.player,this.config||{},e)}}],[{key:"pluginName",get:function(){return"MenuPlugin"}},{key:"defaultConfig",get:function(){return{enableDebug:!0}}}]),n}(kN),nme=function(){function e(t,n,i){var r=this;ade(this,e),cde(this,"_cdnUpdate",(function(e){var t=r.infoItems[Yye.CDN],n=e||r.player.domain;n&&(t.value=n),r._cacheUpdate(Yye.CDN,n)||n&&r.updateInfoItem(t)})),this.player=t,this.options=n||{},this.statsPlugin=i;var o=VS({},{report:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M5.71429 5C5.3198 5 5 5.3198 5 5.71429V14.2857C5 14.6802 5.3198 15 5.71429 15H14.2857C14.6802 15 15 14.6802 15 14.2857V10C15 9.44772 15.4477 9 16 9C16.5523 9 17 9.44772 17 10V14.2857C17 15.7848 15.7848 17 14.2857 17H5.71429C4.21523 17 3 15.7848 3 14.2857V5.71429C3 4.21523 4.21523 3 5.71429 3H10C10.5523 3 11 3.44772 11 4C11 4.55228 10.5523 5 10 5H5.71429Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M16.7071 3.29289C17.0976 3.68342 17.0976 4.31658 16.7071 4.70711L10.7071 10.7071C10.3166 11.0976 9.68342 11.0976 9.29289 10.7071C8.90237 10.3166 8.90237 9.68342 9.29289 9.29289L15.2929 3.29289C15.6834 2.90237 16.3166 2.90237 16.7071 3.29289Z" fill="currentColor"/></svg>',stats:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9 10C9 9.44771 9.44771 9 10 9C10.5523 9 11 9.44772 11 10V13C11 13.5523 10.5523 14 10 14C9.44771 14 9 13.5523 9 13V10Z" fill="currentColor"/><path d="M10 6C9.44771 6 9 6.44772 9 7C9 7.55228 9.44771 8 10 8C10.5523 8 11 7.55228 11 7C11 6.44772 10.5523 6 10 6Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M18 10C18 14.4183 14.4183 18 10 18C5.58172 18 2 14.4183 2 10C2 5.58172 5.58172 2 10 2C14.4183 2 18 5.58172 18 10ZM10 16C13.3137 16 16 13.3137 16 10C16 6.68629 13.3137 4 10 4C6.68629 4 4 6.68629 4 10C4 13.3137 6.68629 16 10 16Z" fill="currentColor"/></svg>',close:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M16.1231 4.08053C16.5136 4.47105 16.5136 5.10422 16.1231 5.49474L11.453 10.1648L16.1231 14.8349C16.5136 15.2254 16.5136 15.8586 16.1231 16.2491C15.7326 16.6397 15.0994 16.6397 14.7089 16.2491L10.0388 11.579L5.36873 16.2491C4.9782 16.6397 4.34504 16.6397 3.95451 16.2491C3.56399 15.8586 3.56399 15.2254 3.95451 14.8349L8.6246 10.1648L3.95451 5.49474C3.56399 5.10422 3.56399 4.47105 3.95451 4.08053C4.34504 3.69001 4.9782 3.69001 5.36873 4.08053L10.0388 8.75061L14.7089 4.08053C15.0994 3.69 15.7326 3.69 16.1231 4.08053Z" fill="currentColor"/></svg>',copy:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M6 3C5.44772 3 5 3.44772 5 4C5 4.55228 5.44772 5 6 5H13.5C14.3284 5 15 5.67157 15 6.5V14C15 14.5523 15.4477 15 16 15C16.5523 15 17 14.5523 17 14V6.5C17 4.567 15.433 3 13.5 3H6ZM4 8H12V16H4L4 8ZM2 8C2 6.89543 2.89543 6 4 6H12C13.1046 6 14 6.89543 14 8V16C14 17.1046 13.1046 18 12 18H4C2.89543 18 2 17.1046 2 16V8ZM5.75 9.5C5.33579 9.5 5 9.83579 5 10.25C5 10.6642 5.33579 11 5.75 11H10.25C10.6642 11 11 10.6642 11 10.25C11 9.83579 10.6642 9.5 10.25 9.5H5.75ZM5 13.75C5 13.3358 5.33579 13 5.75 13H10.25C10.6642 13 11 13.3358 11 13.75C11 14.1642 10.6642 14.5 10.25 14.5H5.75C5.33579 14.5 5 14.1642 5 13.75Z" fill="currentColor"/></g></svg>'},this.options.icons);this.options.icons=o,this.playerInstance="dash_".concat((new Date).getTime()),window[this.playerInstance]=this.player,this.menuItems=[{name:"视频统计信息",handler:this.showPanelInfo.bind(this),type:Xye.STATS,icon:o.stats,eventName:Qye.STATS},{name:"播放问题反馈",handler:this._handleReport.bind(this),type:Xye.REPORT,icon:o.report,eventName:Qye.REPORT}],this.playerHandler=[{evt:"RESOLUTION_UPDATE",handler:this._resolutionUpdate.bind(this)},{evt:"menusegment",handler:this._recordLastSegment.bind(this)},{evt:"resourceReady",handler:this._startup.bind(this)},{evt:"canplay",handler:this._startup.bind(this)},{evt:"ended",handler:this.destroyDOM.bind(this)},{evt:"destroy",handler:this.destroy.bind(this)},{evt:"playertypechange",handler:this.destroyDOM.bind(this)},{evt:"codecsupdate",handler:this._codecsUpdate.bind(this)},{evt:"playing",handler:this._startup.bind(this)},{evt:"changeHost",handler:this._cdnUpdate}];for(var a=0;a<this.playerHandler.length;a++){var s=this.playerHandler[a],l=s.evt,c=s.handler;this.player.on(l,c)}this.debugInfo={ua:navigator.userAgent,version:this.player.playerVersion},this._pollTimer=null,this.hasInitDOM=!1,this._cacheMap={},this.menuHandler=this._menuHandler.bind(this),this.munuHideHandler=this._munuHideHandler.bind(this),this.rootClickHandler=this._rootClickHandler.bind(this),this._initDatas()}return lde(e,[{key:"_reset",value:function(){this.hasInitDOM=!1,this._cacheMap={},this._lastSegment=null}},{key:"_noop",value:function(){}},{key:"_recordLastSegment",value:function(e){this._lastSegment=e}},{key:"_resolutionUpdate",value:function(e){var t=this.infoItems[Yye.RESOLUTION];t.value=e,this._cacheUpdate(Yye.RESOLUTION,e)||(e?(t.value=e,this.updateInfoItem(t)):(t.hide=!0,this.createPanelInfo()))}},{key:"_codecsUpdate",value:function(e){var t=this.infoItems[Yye.CODECS];t.value=e,this._cacheUpdate(Yye.CODECS,e)||this.updateInfoItem(t)}},{key:"_cacheUpdate",value:function(e,t){return!this.hasInitDOM&&(this._cacheMap[e]=t,!0)}},{key:"_handleReport",value:function(){for(var e=this.player.video.readyState,t=this.player.video.buffered,n=[],i=0;i<t.length;i++){var r=t.start(i),o=t.end(i);n.push({start:r,end:o})}var a={readyState:e,curTime:this.player.video.currentTime,err:this.player.video.error||-1,buffer:n},s=VS({debug_date:new Date,type:this.type},this.debugInfo,{videoInfo:a});this._lastSegment&&(s.segment=this._lastSegment),this.options.enableDebug&&this.statsPlugin&&(s.stats=this.statsPlugin.getStats()),this.player.ext&&(s.ext=this.player.ext),this.player.emit(Wye.MENU_REPORT,s)}},{key:"_startup",value:function(){if(!this.hasInitDOM){this.type=this.player.currentFormat,this._initDatas(),this._initDOM();for(var e=kT(this._cacheMap),t=0;t<e.length;t++){var n=e[t],i=this.infoItems[n];i.value=this._cacheMap[n],this.updateInfoItem(i,!0)}}}},{key:"_initDatas",value:function(){var e;this.parentNode=this.player.root,this._isPlayQualitySupported=this.player.video&&"function"==typeof this.player.video.getVideoPlaybackQuality;var t=this.player.playerType,n=eme.cn,i=this.options.lang||"cn";this.langConfig=this.options.langConfig||eme[i]||n,this.infoItems=(cde(e={},Yye.VID,{name:"VID",value:this.player.config.vid,render:ime,hide:!this.player.config.vid,key:"vid"}),cde(e,Yye.TYPE,{name:"类型",value:t,render:ime,key:"player_type"}),cde(e,Yye.CODECS,{name:"编码",value:this.player.menuCodeType,render:ime,key:"menuCodeType",hide:!this.player.menuCodeType}),cde(e,Yye.SPEED,{name:"加载速度",value:0,render:ime,posfix:" KB/s",hide:!this._isMenusHide("speed"),key:"speed"}),cde(e,Yye.BUFFER,{name:"缓冲时长",value:0,render:ime,posfix:"s",key:"buffer"}),cde(e,Yye.PLAY_QUALITY,{name:"丢帧率",value:{droppedVideoFrames:0,totalVideoFrames:0},render:rme,hide:null===this.player.video.getVideoPlaybackQuality,key:"frames_info"}),cde(e,Yye.SCHEME,{name:"视频协议",value:"HTTPS",render:ime,key:"scheme"}),cde(e,Yye.CDN,{name:"CDN",value:this.player.domain?this.player.domain:"false",render:ime,hide:!this._isMenusHide("cdn"),key:"CDN"}),cde(e,Yye.P2P,{name:"P2P",value:"false",render:ime,hide:!0,key:"p2p"}),cde(e,Yye.RESOLUTION,{name:"分辨率",value:{width:0,height:0,fps:void 0},render:ome,hide:!this._isMenusHide("resolution"),key:"resolution"}),cde(e,Yye.VIEWPORT,{name:"视图尺寸",value:{width:0,height:0},render:ome,key:"viewport"}),cde(e,Yye.VOLUME,{name:"音量大小",value:"".concat((100*this.player.volume).toFixed(0),"%"),render:ime,key:"volume"}),cde(e,Yye.PLAYER_VERSION,{name:"播放器版本",value:this.player.playerVersion,render:ime,key:"player_version"}),e);for(var r=kT(this.infoItems),o=0;o<r.length;o++){var a=r[o];this.infoItems[a].type=a}for(var s=this.options.infoItems||[],l=0;l<s.length;l++){var c=s[l];c.name&&c.type&&c.key?(c.render&&sme(c.render)||(c.render=ime),this.infoItems[c.type]=c):ame("".concat(c.name))}}},{key:"_isMenusHide",value:function(e){return!0===(this.player.supportMenus||{})[e]}},{key:"renderItemByType",value:function(e,t){var n=this.infoItems[e];n?(n.value=t,this._cacheUpdate(e,t)||this.updateInfoItem(n)):ame("".concat(e," item null"))}},{key:"_initDOM",value:function(){var e;if(this.parentNode&&qO){this.hasInitDOM=!0;var t=document.createDocumentFragment(),n=document.createElement("xg-menu");qO.addClass(n,"xg-menu"),this.rightMenu=n;for(var i=ib(e=this.menuItems).call(e,(function(e){return!e.hide})),r=0;r<i.length;r++)t.appendChild(this.createMenuItem(i[r]));n.appendChild(t),this.toggle(this.rightMenu,!1),this.parentNode.appendChild(n),this.parentNode.addEventListener("contextmenu",this.menuHandler,!1),document.addEventListener("click",this.munuHideHandler,!1),this.parentNode.addEventListener("click",this.rootClickHandler,!0),this.createPanelInfo(),this.bindEvents(),this.tick()}}},{key:"_menuHandler",value:function(e){if(e.preventDefault(),e.stopPropagation(),this.isPIPMode())return!1;var t=this.getOffset(),n=e.clientX-t.x+document.body.scrollLeft+document.documentElement.scrollLeft,i=e.clientY-t.y+document.body.scrollTop+document.documentElement.scrollTop,r=this.parentNode.clientWidth,o=this.parentNode.clientHeight;this.toggle(this.rightMenu,!0);var a=this.rightMenu.offsetWidth,s=this.rightMenu.offsetHeight,l=n+a>r?r-a:n,c=i+s>o?o-s:i;this.rightMenu.style.left="".concat(l,"px"),this.rightMenu.style.top="".concat(c,"px"),this.emitLog(qye.CONTEXTMENU,Zye.SHOW,Qye.CONTEXTMENU_SHOW)}},{key:"getOffset",value:function(){for(var e=this.parentNode,t=0,n=0;e&&!XP(e.offsetLeft)&&!XP(e.offsetTop);)t+=e.offsetLeft-e.scrollLeft,n+=e.offsetTop-e.scrollTop,e=e.offsetParent;return{x:t,y:n}}},{key:"_munuHideHandler",value:function(){this.rightMenu&&"block"===this.rightMenu.style.display&&this.emitLog(qye.CONTEXTMENU,Zye.HIDE,Qye.CONTEXTMENU_HIDE),this.toggle(this.rightMenu,!1)}},{key:"_rootClickHandler",value:function(e){"block"===this.rightMenu.style.display&&e.target===this.player.video&&(e.stopPropagation(),e.preventDefault(),this._munuHideHandler())}},{key:"tick",value:function(){var e=this;this._pollTimer=setTimeout((function(){clearTimeout(e._pollTimer),e._poll(),e.tick(),e.isPIPMode()&&(e.toggle(e.rightMenu,!1),e.toggle(e.panelInfo,!1))}),500)}},{key:"_poll",value:function(){var e=this.bufferLength,t=this.infoItems[Yye.BUFFER];if(t.value=e,this.updateInfoItem(t),this.player.video.getVideoPlaybackQuality){var n=this.player.video.getVideoPlaybackQuality(),i=this.infoItems[Yye.PLAY_QUALITY];i.value={totalVideoFrames:n.totalVideoFrames,droppedVideoFrames:n.droppedVideoFrames},this.updateInfoItem(i)}var r=this.infoItems[Yye.SPEED];if(!r.hide){var o=Math.floor(this.player.downloadSpeed);r.value=o,this.updateInfoItem(r)}}},{key:"bindEvents",value:function(){var e=this,t=this.player.video;this.handleVolumeChange=this._handleVolumeChange.bind(this),t.addEventListener("volumechange",this.handleVolumeChange);t.addEventListener("DOMNodeInserted",(function n(){t.removeEventListener("DOMNodeInserted",n),e._onWinElemSizeChange()})),this.onWinSizeChange=function(e,t,n){var i;return function(){var r=this,o=arguments,a=n&&!i;clearTimeout(i),i=setTimeout((function(){i=null,n||e.apply(r,o)}),t),a&&e.apply(r,o)}}(this._onWinElemSizeChange.bind(this),1e3,!1),window.addEventListener("resize",this.onWinSizeChange),e._onWinElemSizeChange()}},{key:"_onWinElemSizeChange",value:function(){if(this.player&&this.player.video){var e=this.player.video.getBoundingClientRect(),t=this.infoItems[Yye.VIEWPORT],n={width:Math.floor(e.width),height:Math.floor(e.height)};if(t.value=n,this._cacheUpdate(Yye.VIEWPORT,n))return;this.updateInfoItem(t)}}},{key:"_handleVolumeChange",value:function(){var e=this.infoItems[Yye.VOLUME];e.value="".concat((100*this.player.video.volume).toFixed(0),"%"),this._cacheUpdate(Yye.VOLUME)||this.updateInfoItem(e)}},{key:"createMenuItem",value:function(e){var t=this,n=document.createElement("div");if(n.classList.add("v-menu-item"),e.clsName&&n.classList.add(e.clsName),e.icon){var i=document.createElement("div");qO.addClass(i,"menu-item-icon"),i.innerHTML=e.icon,n.appendChild(i)}var r=document.createElement("div");return qO.addClass(r,"menu-item-content"),r.textContent=e.name,n.appendChild(r),!1!==n.clickable&&n.addEventListener("click",(function(n){n.stopPropagation(),n.preventDefault(),t.toggle(t.rightMenu,!1),e.handler(),t.emitLog(qye.MENU,e.type,e.eventName)})),n}},{key:"createIconBtn",value:function(e,t,n,i){var r,o=document.createElement("div");return qO.addClass(o,e),o.innerHTML=y_(r="".concat(t,"<div class='svg-hover'>")).call(r,n,"</div>"),i.appendChild(o),o}},{key:"createPanelInfo",value:function(){var e,t=this,n=document.createElement("xg-panel-info");qO.addClass(n,"xg-panel-info"),this.createIconBtn("xg-info-close xg-interact-icon",this.options.icons.close,"关闭",n).addEventListener("click",(function(){t.toggle(n,!1),t.panelVisible=!1,t.emitLog(qye.INTERACT,$ye.CLOSE,Qye.CLOSE)})),this.createIconBtn("xg-info-copy xg-interact-icon",this.options.icons.copy,"复制",n).addEventListener("click",(function(){for(var e,n=ib(e=wb(t.infoItems)).call(e,(function(e){return!e.hide})),i={},r=0;r<n.length;r++){var o,a=n[r],s=a.key,l=void 0;if(t.options.connectPrefix&&a.posfix)l=y_(o="".concat(a.value)).call(o,a.posfix);else l=a.value;i[s]=l}t.options.enableDebug&&t.statsPlugin&&VS(i,{stats:t.statsPlugin.getStats()}),t.copyToClipboard(Hj(i)),t.emitLog(qye.INTERACT,$ye.COPY,Qye.COPY)}));var i=document.createElement("ul");qO.addClass(i,"xg-panel-detail");for(var r=ib(e=wb(this.infoItems)).call(e,(function(e){return!e.hide})),o=document.createDocumentFragment(),a=0;a<r.length;a++){var s=this.createInfoItem(r[a]);o.appendChild(s)}i.appendChild(o),n.appendChild(i),this.panelInfo=n,this.player.root.appendChild(n)}},{key:"createInfoItem",value:function(e){var t=document.createElement("li");return e.elem=t,this.updateInfoItem(e),t}},{key:"showPanelInfo",value:function(){var e;this.toggle(this.panelInfo,!0),this.panelVisible=!0;for(var t=ib(e=wb(this.infoItems)).call(e,(function(e){return!e.hide})),n=0;n<t.length;n++)this.updateInfoItem(t[n])}},{key:"copyToClipboard",value:function(e){var t=document.createElement("textarea");t.style.height="0px",t.style.width="1px",document.body.appendChild(t),t.value=e,t.select(),document.execCommand("copy"),document.body.removeChild(t)}},{key:"updateInfoItem",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.panelVisible||t){var n=e.elem;if(n){!function(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}(n);var i=document.createElement("label"),r=this.langConfig[e.type]||e.name;i.textContent="".concat(r),qO.addClass(i,"xg-item-label"),n.appendChild(i);var o,a=document.createElement("span"),s=e.ctx||null,l=e.render.call(s,e.value);if(l instanceof Element)a.appendChild(l);else a.textContent=y_(o="".concat(l)).call(o,e.posfix?e.posfix:"");n.appendChild(a)}}}},{key:"toggle",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e&&(e.style.display=t?"block":"none")}},{key:"bufferLength",get:function(){var e=this.player.getBufferedRange(),t=this.player.video.currentTime,n=e[1]-Math.max(e[0],t);return n=Math.max(0,n).toFixed(2),parseFloat(n)}},{key:"destroyDOM",value:function(){this.parentNode.removeEventListener("contextmenu",this.menuHandler),document.removeEventListener("click",this.munuHideHandler,!1),this.parentNode.removeEventListener("click",this.rootClickHandler,!0),this._reset(),this.removeElement(this.rightMenu),this.removeElement(this.panelInfo),this.rightMenu=null,this.panelInfo=null,this._pollTimer&&clearTimeout(this._pollTimer)}},{key:"destroy",value:function(){this.destroyDOM(),this.destroyEvents()}},{key:"destroyEvents",value:function(){for(var e=0;e<this.playerHandler.length;e++){var t=this.playerHandler[e],n=t.evt,i=t.handler;this.player.off(n,i)}window.removeEventListener("resize",this.onWinSizeChange)}},{key:"removeElement",value:function(e){e&&e.parentNode&&e.parentNode.removeChild(e)}},{key:"isPIPMode",value:function(){return qO.hasClass(this.parentNode,"xgplayer-pip-active")}},{key:"emitLog",value:function(e,t,n){this.player.emit(Wye.MENU_LOG,{logType:e,code:t,event:n})}}]),e}();function ime(e){return e}function rme(e){var t,n=e.droppedVideoFrames,i=e.totalVideoFrames,r=0;r=0===i?0:n/i*100;var o=document.createElement("span"),a=document.createElement("span");a.textContent=n,o.appendChild(a);var s=document.createElement("span");return s.textContent=y_(t="/".concat(i,", ")).call(t,r.toFixed(2),"%"),o.appendChild(s),o}function ome(e){var t,n,i=e.width,r=e.height,o=e.fps;return y_(t=y_(n="".concat(i," * ")).call(n,r)).call(t,void 0!==o?" / ".concat(o,"fps"):"")}function ame(e){console&&console.warn&&console.warn(e)}function sme(e){return"[object Function]"===Object.prototype.toString.call(e)}tme.MenuEvents=Jye,tme.Menu=nme;function lme(e,t){var n=kT(e);if(Lx){var i=Lx(e);t&&(i=ib(i).call(i,(function(t){return zP(e,t).enumerable}))),n.push.apply(n,i)}return n}function cme(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lme(Object(n),!0).forEach((function(t){pme(e,t,n[t])})):$P?Object.defineProperties(e,$P(n)):lme(Object(n)).forEach((function(t){Object.defineProperty(e,t,zP(n,t))}))}return e}function ume(e){return(ume="function"==typeof ZP&&"symbol"==typeof QP?function(e){return typeof e}:function(e){return e&&"function"==typeof ZP&&e.constructor===ZP&&e!==ZP.prototype?"symbol":typeof e})(e)}function hme(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dme(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),Object.defineProperty(e,kme(i.key),i)}}function fme(e,t,n){return t&&dme(e.prototype,t),n&&dme(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function pme(e,t,n){return(t=kme(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vme(e){return(vme=Object.setPrototypeOf?zx.bind():function(e){return e.__proto__||zx(e)})(e)}function gme(e,t){return(gme=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function yme(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mme(e,t){if(t&&("object"===Du(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return yme(e)}function _me(e){var t=function(){if("undefined"==typeof Reflect||!JP)return!1;if(JP.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(JP(Boolean,[],(function(){}))),!0}catch(cK){return!1}}();return function(){var n,i=vme(e);if(t){var r=vme(this).constructor;n=JP(i,arguments,r)}else n=i.apply(this,arguments);return mme(this,n)}}function bme(){return bme="undefined"!=typeof Reflect&&EP?EP.bind():function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=vme(e)););return e}(e,t);if(i){var r=zP(i,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},bme.apply(this,arguments)}function kme(e){var t=function(e,t){if("object"!==Du(e)||null===e)return e;var n=e[nA];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==Du(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Du(t)?t:String(t)}var Eme=/^WEBVTT/,wme=/^STYLE+$/,Sme=/^\:\:cue/,Tme=/^}+$/,Cme=/^\[Script Info\].*/,xme=[/[0-9]{1,3}:[0-9]{2}:[0-9]{2}\.[0-9]{1,3}-->[0-9]{1,3}:[0-9]{2}:[0-9]{2}\.[0-9]{1,3}/,/[0-9]{1,2}:[0-9]{2}\.[0-9]{1,3}-->[0-9]{1,2}:[0-9]{2}\.[0-9]{1,3}/,/[0-9]{1,2}\.[0-9]{1,3}-->[0-9]{1,2}\.[0-9]{1,3}/],Dme=/^Format:\s/,Ime=/^Style:\s/,Rme=/^Dialogue:\s/;function Lme(e){var t=e.length;return 3===t?(60*(60*Number(e[0])+Number(e[1]))*1e3+1e3*Number(e[2]))/1e3:2===t?(60*Number(e[0])*1e3+1e3*Number(e[1]))/1e3:Number(e[0])}function Pme(e){return/^(\-|\+)?\d+(\.\d+)?$/.test(e)}function Ame(e,t){return e>=0&&e<t.length?t[e]:""}var Ome=function(){function e(){hme(this,e)}return fme(e,null,[{key:"parseJson",value:function(e){for(var t=[],n=0,i=0;i<e.length;i++){if(n>=50&&(n=0),0===n){var r={start:e[i].start,list:[e[i]],end:e[i].end};t.push(r)}else t[t.length-1].list.push(e[i]),t[t.length-1].end=e[i].end;n++}return t}},{key:"parse",value:function(t,n){var i=e.checkFormat(t);i||n({format:i});try{var r=[];"ass"===i?r=e.parseASS(t):"vtt"===i&&(r=e.parseVTT(t)),n({format:i,list:r.list,styles:r.styles})}catch(tSe){console.error(tSe),n({format:i},tSe)}}},{key:"parseASSItem",value:function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(","),n={},i="";try{var r=t.length-e.length;return i=(i=r>0?bT(t).call(t,e.length-1,r+1).join(",")+"":t[t.length-1]+"").replace(/\\n+/g,""),t[e.length-1]=i,W_(e).call(e,(function(e,i){"end"===e||"start"===e?n[e]=Lme(t[i].split(":")):"text"===e?n[e]=[t[i]]:"layer"===e?(n[e]=[t[i]],n.textTag=[t[i]]):n[e]="style"===e?[t[i]]:Number(t[i])?Number(t[i]):t[i]})),n}catch(tSe){return console.error(tSe),{}}}},{key:"parseASS",value:function(t){for(var n=t.split("\n"),i=[],r=0,o=0,a=[],s=[],l=null;r<n.length;){if(Dme.test(n[r]))s=n[r].replace(Dme,"").replace(/\s+/g,"").split(","),s=W_(s).call(s,(function(e){return e.toLocaleLowerCase()}));else if(Ime.test(n[r]))a.push(n[r].replace(Ime,"").replace(/\s+/g,""));else if(Rme.test(n[r])){var c=e.parseASSItem(n[r].replace(Rme,""),s);if(l&&c.start===l.start&&c.end===l.end)try{var u=l,h=u.text,d=u.textTag,f=u.style;h.push(c.text[0]),d.push(c.textTag[0]),f.push(c.style[0])}catch(tSe){console.error(tSe)}else{l=c;var p=null;o%50==0?((p={start:l.start,end:l.end,list:[]}).list.push(l),i.push(p)):((p=i[i.length-1]).end=l.end,p.list.push(l)),o++}}r++}return{list:i,style:{}}}},{key:"parseVTTStyle",value:function(e,t){var n=e.split(":");if(n.length>1){var i,r,o=nO(i=n[0]).call(i).split("-"),a="";o.length>1?W_(o).call(o,(function(e,t){a+=0===t?e:e.charAt(0).toUpperCase()+Sx(e).call(e,1)})):a=o[0],t[a]=nO(r=n[1]).call(r).replace(/;$/,"")}return t}},{key:"parseVTT",value:function(e){for(var t=(e=e.replace(Eme,"")).split("\n"),n=[],i=0,r=0,o=null,a=!1,s=!1,l=null,c=null,u=[];i<t.length;){var h,d,f=nO(h=Ame(i,t)).call(h);if(!f||a&&Pme(f))a=!f;else if(Sme.test(f)&&wme.test(nO(d=Ame(i-1,t)).call(d))){s=!0;var p=/\((.+?)\)/g.exec(f);c=p?p[1]:"",l=""}else if(s)Tme.test(f)?(u.push({key:c,style:l}),l=null,c=null,s=!1):l+=f;else if(f){a=!1;var v=this.checkIsTime(t[i]);if(v){var g=this.parseVttTime(v);if(!o||g.start!==o.start||g.end!==o.end){(o=g).text=[],o.textTag=[];var y=null;r%50==0?((y={start:o.start,end:o.end,list:[]}).list.push(o),n.push(y)):((y=n[n.length-1]).end=o.end,y.list.push(o)),r++}}else if(o){var m=o,_=m.text,b=m.textTag,k=this.parseVttText(t[i]);_.push(k.text),b.push(k.tag)}a=!1}i++}return{list:n,styles:u}}},{key:"checkIsTime",value:function(e){e=e.replace(/\s+/g,"");for(var t=0,n=null;t<xme.length&&!(n=xme[t].exec(e));)t++;return n?n[0]:null}},{key:"parseVttText",value:function(e){var t=/^(<?.+?>)/g.exec(e),n="",i="default";if(t){var r;i=t[0].replace(/\<|\>|\&/g,"");var o=RegExp(y_(r="^<".concat(i,">(([\\s\\S])*?)</")).call(r,i,">$")).exec(e);o?n=o[1]:(n=e,i="")}else n=e;for(var a=/<(\w+).(\w+)>/g,s=a.exec(n);s&&s.length>2;){var l;n=n.replace(s[0],y_(l="<".concat(s[1],' class="')).call(l,s[2],'">')),s=a.exec(n)}return{tag:i,text:n.replace(/\\n+/g,"<br/>")}}},{key:"parseVttTime",value:function(e){var t,n=e.split("--\x3e"),i=0;if(2===n.length){var r=n[0].split(":"),o=n[1].split(":");t=Lme(r),i=Lme(o)}return{start:t,end:i,time:e}}},{key:"isVTT",value:function(e){return Eme.test(e)}},{key:"isASS",value:function(e){return Cme.test(e)}},{key:"checkFormat",value:function(e){return e?Eme.test(e)?"vtt":Cme.test(e)?"ass":null:null}}]),e}(),Mme=[{code:0,msg:"SUCCESS"},{code:1,msg:"LOAD_ERROR"},{code:2,msg:"PARSER_ERROR"},{code:3,msg:"FORMAT_NOT_SUPPORTED"},{code:4,msg:"ID_OR_LANGUAGE_NOT_EXIST"},{code:5,msg:"PARAMETERS_ERROR"},{code:6,msg:"ABORT"},{code:7,msg:"UNKNOWN"},{code:8,msg:"DATA_ERROR:subtitle.url is null"},{code:9,msg:"DATA_ERROR:subtitle.url length is 0"}];function Nme(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i={code:Mme[e].code,msg:Mme[e].msg};return W_(t=kT(n)).call(t,(function(e){i[e]=n[e]})),i}var zme=fme((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.url,i=t.method,r=void 0===i?"GET":i,o=t.type,a=void 0===o?"arraybuffer":o,s=t.timeout,l=void 0===s?1e4:s,c=t.data,u=void 0===c?{}:c,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return hme(this,e),new rb((function(e,t){var i=new window.XMLHttpRequest,o=r.toUpperCase(),s=[];if(a&&(i.responseType=a),l&&(i.timeout=l),kT(u).forEach((function(e){s.push("k=".concat(u[e]))})),i.onload=function(){200===i.status||206===i.status?e({context:h,res:i}):t(new Error({context:h,res:i,type:"error"}))},i.onerror=function(e){t(new Error({context:h,res:i,type:"error"}))},i.ontimeout=function(e){t(new Error({context:h,res:i,type:"error"}))},i.onabort=function(){t(new Error({context:h,res:i,type:"error"}))},"GET"===o)i.open(o,"".concat(n)),i.send();else{if("post"!==o)throw new Error("xhr ".concat(o," is not supported"));i.open(o,n),i.setRequestHeader("Content-type","application/x-www-form-urlencoded"),i.send(s.join("&"))}}))})),Ume=function(){function e(){var t,n;hme(this,e);var i=new rb((function(e,i){t=e,n=i}));return i.resolve=function(e){t(e),i.state="fulfilled"},i.reject=function(e){n(e),i.state="rejected",i.isBreak="DESTROYED"===e},i.state="pending",i}return fme(e,[{key:"resolve",value:function(e){}},{key:"reject",value:function(e){}}]),e}();function Bme(e,t){if(!e)return!1;if(e.classList)return Array.prototype.some.call(e.classList,(function(e){return e===t}));var n=e.className&&"object"===ume(e.className)?e.getAttribute("class"):e.className;return n&&!!n.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}function Fme(e,t){e&&(e.classList?t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach((function(t){t&&e.classList.add(t)})):Bme(e,t)||(e.className&&"object"===ume(e.className)?e.setAttribute("class",e.getAttribute("class")+" "+t):e.className+=" "+t))}function Hme(e,t,n){var i=t.length;if(i<1)return-1;if(t[n=n<0?0:n>=i?i-1:n].start<=e&&e<t[n].end)return n;for(var r=t[n].end<=e?n+1:0;r<i;r++){if(t[r].start<=e&&e<t[r].end)return r;if(e>t[r].end&&r+1<i&&e<t[r+1].start)return-1;if(e>t[r].end&&r+1>=i)return-1}return-1}function jme(e,t,n){var i=t.length;if(i<1)return[];var r=[];if((n=n<0?0:n>=i?i-1:n)<i)for(var o=t[n].end<=e?n:0;o<i&&(t[o].start<=e&&e<t[o].end&&r.push(o),!(e<t[o].start));o++);return r}function Gme(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]}function Vme(){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,kT(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}function Kme(e,t,n){if(n||(n=new Ume),"json"===t){var i=Ome.parseJson(e);n.resolve({list:i,format:"json"})}else"string"===t&&Ome.parse(e,(function(e,t){if(t){var i=Nme(2,t);n.reject(i,{format:e.format})}else if(e.format)n.resolve({styles:e.styles,list:e.list,format:e.format});else{var r=Nme(3);n.reject(r)}}));return n}function Wme(e,t){return t||(t=new Ume),new zme({url:e.url,type:"text"}).then((function(n){Kme(n.res.response,"string").then((function(n){t.resolve(cme(cme({},n),e))})).catch((function(e){t.reject(e)}))})).catch((function(n){var i=Nme(1,cme({statusText:n.statusText,status:n.status,type:n.type,message:"http load error",url:e.src},e));t.reject(i)})),t}function Yme(e,t){return!!(e.id&&t.id&&e.id===t.id||e.language&&t.language&&e.language===t.language)}function qme(e){return null!==e&&""!==nO(e).call(e)&&/^[a-zA-Z]+$/.test(e)}function Xme(e){return!!/[\x21-\x2f\x3a-\x40\x5b-\x60\x7B-\x7F]/.test(e)}var $me=function(){function e(){var t=this;hme(this,e),this.__handlers=[],window.ResizeObserver&&(this.observer=new window.ResizeObserver((function(e){t.__trigger(e)})))}return fme(e,[{key:"addObserver",value:function(e,t){if(this.observer){this.observer&&this.observer.observe(e);for(var n=this.__handlers,i=-1,r=0;r<n.length;r++)n[r]&&e===n[r].target&&(i=r);i>-1?this.__handlers[i].handler.push(t):this.__handlers.push({target:e,handler:[t]})}}},{key:"unObserver",value:function(e){var t,n,i=-1;W_(t=this.__handlers).call(t,(function(t,n){e===t.target&&(i=n)})),this.observer&&this.observer.unobserve(e),i>-1&&bT(n=this.__handlers).call(n,i,1)}},{key:"destroyObserver",value:function(){this.observer&&this.observer.disconnect(),this.observer=null,this.__handlers=null}},{key:"__runHandler",value:function(e,t){for(var n=this.__handlers,i=0;i<n.length;i++)if(n[i]&&e===n[i].target){n[i].handler&&n[i].handler.forEach((function(n){try{n(e,t)}catch(tSe){console.error(tSe)}}));break}}},{key:"__trigger",value:function(e){var t=this;W_(e).call(e,(function(e){var n=e.contentRect;t.__runHandler(e.target,n)}))}}]),e}(),Zme=null;var Qme="resize",Jme="change",e_e="off";function t_e(e){var t=[];return e&&"String"===Gme(e)?t.push({url:e,index:0,start:-1,end:-1}):"Array"===Gme(e)&&e.forEach((function(e,n){t.push({url:e.url||e.src,index:n,start:e.start||-1,end:e.end||-1})})),t}var n_e=!1,i_e=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gme(e,t)}(n,e);var t=_me(n);function n(e){var i,r,o,a,s,l,c,u;return hme(this,n),pme(yme(r=t.call(this)),"_onPause",(function(){r.stopRender()})),pme(yme(r),"_onPlay",(function(){r._curRenderTask.length>0&&r.startRender(-1)})),pme(yme(r),"_onTimeupdate",(function(){if(r._isOpen){var e=r.player.video,t=e.videoWidth,n=e.videoHeight;!r._videoMeta.scale&&t&&n&&r._onResize(r.player.root);var i=r._getPlayerCurrentTime();Math.round(Math.abs(1e3*i-r._ctime))<200||(r._ctime=1e3*i,r.currentText&&r.currentText.list&&("live"===r.config.updateMode?r._liveUpdate(i):r._update(i)))}})),pme(yme(r),"_onResize",(function(e){var t=yme(r),n=t._videoMeta;if(t.config.domRender){if(e&&e instanceof window.Element||(e=r.player.root),r._iId&&(clearTimeout(r._iId),r._iId=null),!n.scale){if(!r.player.video)return;var i=r.player.video,o=i.videoWidth,a=i.videoHeight;if(!o||!a)return;n.videoWidth=o,n.videoHeight=a,n.scale=parseInt(a/o*100,10)}r.__startResize(e)}})),pme(yme(r),"_onCoreEvents",(function(e){try{switch(e.eventName){case"core.subtitlesegments":r._onSubtitleSegment(e.list||[]);break;case"core.subtitleplaylist":r._onSubtitlePlaylist(e.list||[]);break;case"core.seipayloadtime":r._onCoreSeiintime(e)}}catch(t){console.error(t)}})),pme(yme(r),"startRender",(function(e){if(e>0&&r._renderIntervalId&&(window.cancelAnimationFrame(r._renderIntervalId),r._renderIntervalId=-1),r.textTrack){var t=yme(r)._curRenderTask;r._lastTimeStamp=(new Date).getTime();var n=[];t.forEach((function(t,i){var o=t.lastTime,a=t.wordList,s=t.interval,l=t.dom,c=t.ids;if(e<0||r._lastTimeStamp<0||r._lastTimeStamp-o>=s){var u=a.shift();u&&l.appendData(u),t.lastTime=r._lastTimeStamp}a.length<1&&n.push({index:i,ids:c})})),r._log(">>>>_renderByWords emptyArr",n.length,t.length),n.forEach((function(e){bT(t).call(t,e.index,1),r._log(">>>_renderByWords remove emptyArr",e.index,t.length)})),t.length>0&&(r._renderIntervalId=window.requestAnimationFrame(r.startRender))}})),pme(yme(r),"destroy",(function(){r.detachPlayer(),r.removeAllListeners(),r.player=null,r.textTrack=null,r._curRenderTask=[],r.stopRender()})),o=navigator.userAgent,a=/(?:Windows Phone)/.test(o),s=/(?:SymbianOS)/.test(o)||a,l=/(?:Android)/.test(o),c=/(?:Firefox)/.test(o),u=/(?:iPad|PlayBook)/.test(o)||l&&!/(?:Mobile)/.test(o)||c&&/(?:Tablet)/.test(o),n_e=/(?:iPhone)/.test(o)&&!u||l||s||u,r.currentText=null,r.currentExtText=null,r.textTrack=[],r._cid=-1,r._gid=-1,r._cids=[],r._iId=null,r._iC=0,r.player=null,r.root=null,r.config={line:"double",bottom:0,mode:"stroke",defaultOpen:!1,baseSizeX:49,baseSizeY:28,minSize:16,minMobileSize:13,fitVideo:!0,offsetBottom:2,fontColor:"#fff",domRender:!0,updateMode:"vod",renderMode:"",debugger:!1},r._ctime=0,r._loadingTrack={},W_(i=kT(r.config)).call(i,(function(t){void 0!==e[t]&&null!==e[t]&&(r.config[t]=e[t])})),r._isOpen=r.config.defaultOpen||!1,r._videoMeta={scale:0,videoHeight:0,videoWidth:0,lwidth:0,lheight:0,vWidth:0,vHeight:0,vBottom:0,vLeft:0,marginBottom:0},e.subTitles&&"Array"===Gme(e.subTitles)?(e.player&&r.attachPlayer(e.player),r.seiTime=0,r.lastSeiTime=0,r._curTexts=[],r._curRenderTask=[],r._renderIntervalId=-1,r._lastTimeStamp=-1,r.setSubTitles(e.subTitles,r.config.defaultOpen),r):mme(r)}return fme(n,[{key:"version",get:function(){return"3.0.10-alpha.4"}},{key:"setSubTitles",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this._isOpen||n;i&&this.innerRoot&&this.switchOff(),this.currentText=null,this.textTrack=[],t.forEach((function(t){var n,i={};W_(n=kT(t)).call(n,(function(e){i[e]=t[e]})),i.url=t_e(i.url),i.isDefault&&(e.currentText=i),e.textTrack.push(i)})),this._log("setSubTitles",r),r&&this.switch().catch((function(t){e._log("[switch]",t)})),this.currentText&&this._loadTrack(this.currentText).then((function(t){e.addStyles(t)})),this.emit("reset",{list:this.textTrack,isOpen:r})}},{key:"updateSubTitle",value:function(e){for(var t=this,n=-1,i=0;i<this.textTrack.length;i++)if(Yme(e,this.textTrack[i])){n=i;break}if(this._log("updateSubTitle",n,e),n>-1){var r=Yme(this.currentText,this.textTrack[n]);if(this._log("updateSubTitle","_isCurrent",r,"this.isOpen",this.isOpen,this.currentText),!r)return;var o=t_e(e.url);this.isOpen?(o.forEach((function(e){t.textTrack[n].url.push(e)})),this._log("updateSubTitle _loadTrackUrls",this.textTrack[n]),this._loadTrackUrls(this.currentText,2)):this.textTrack[n].url=o}}},{key:"addStyles",value:function(e){var t=e.styles,n=e.format;t&&"vtt"===n&&(W_(t).call(t,(function(e){e.key||(e.key="xg-text-track-span")})),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n="";W_(e).call(e,(function(e){var i,r;n+=y_(i=y_(r=" ".concat(t," ")).call(r,e.key," {")).call(i,e.style,"}")}));var i=document.createElement("style"),r=document.head||document.getElementsByTagName("head")[0];if(i.type="text/css",i.id="ssss",i.styleSheet){var o=function(){try{i.styleSheet.cssText=n}catch(cK){}};i.styleSheet.disabled?setTimeout(o,10):o()}else{var a=document.createTextNode(n);i.appendChild(a)}r.appendChild(i)}(t,"xg-text-track"))}},{key:"attachPlayer",value:function(e){var t=this;if(this._log("attachPlayer"),e){this.player&&this.detachPlayer();var n,i,r=this.config,o=r.fontColor,a=r.mode,s=r.fitVideo,l=r.domRender;if(this.player=e,l){var c;if(this.root=document.createElement("xg-text-track"),this.root.className="xg-text-track",!this._isOpen&&Fme(this.root,"text-track-hide"),!s&&Fme(this.root,"text-track-no-fitvideo"),a&&Fme(this.root,"text-track-".concat(a)),this.innerRoot=document.createElement("xg-text-track-inner"),this.root.appendChild(this.innerRoot),o&&(this.root.style.color=o),this.currentText)W_(c=["language","id","label"]).call(c,(function(e){t.root.setAttribute("data-".concat(e),t.currentText[e]||"")}));this.player.root.appendChild(this.root),n=e.root,i=this._onResize,Zme||(Zme=new $me),Zme.addObserver(n,i)}this.player.on("destroy",this.destroy),this.player.on("timeupdate",this._onTimeupdate),this.player.on("pause",this._onPause),this.player.on("play",this._onPlay),this.player.on("core_event",this._onCoreEvents),this._isOpen&&this.switch().catch((function(e){t._log("[switch]",e)}))}}},{key:"detachPlayer",value:function(){var e,t,n=this.player,i=this.config;n&&(n.off("destroy",this.destroy),n.off("timeupdate",this._onTimeupdate),n.off("pause",this._onPause),n.off("play",this._onPlay),n.off("core_event",this._onCoreEvents),i.domRender&&(n.root&&(e=n.root,t=this._onResize,Zme&&Zme.unObserver(e,t),n.root.removeChild(this.root)),this.innerRoot=null,this.root=null),this.player=null)}},{key:"switch",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:"",language:""};return this._log("switch",t),this._loadingTrack=t,new rb((function(n,i){if(t.id||t.language)if(e.currentText&&Yme(t,e.currentText))e._loadingTrack={},e._updateCurrent(e.currentText),e.switchOn(),n(Nme(0));else{var r=null;e.__removeByTime(e._curTexts,0);for(var o=0;o<e.textTrack.length;o++)if(Yme(t,e.textTrack[o])){r=e.textTrack[o];break}if(e._log("nextSubtitle",r),r)e._emitPlayerSwitch(e.currentText,r),r.list?(e._loadingTrack={},e._updateCurrent(r),e.switchOn(),n(Nme(0))):(e._log("this._loadTrack",r),e._updateCurrent(r),e._loadTrack(r).then((function(t){if(e.addStyles(t),e._loadingTrack.id===r.id||e._loadingTrack.language===t.language)e._loadingTrack={},e._updateCurrent(t),e.switchOn(),n(Nme(0));else{var o,a=Nme(6,{message:y_(o="check _loadingTrack fail id: ".concat(e._loadingTrack.id," nextSubtitle:")).call(o,t.id)});i(a)}})).catch((function(e){i(e)})));else{var a,s=Nme(4,new Error(y_(a="The is no subtitle with id:[{".concat(t.id,"}] or language:[")).call(a,t.language,"]")));i(s)}}else{if(e.currentText){e._loadingTrack={},e._updateCurrent(e.currentText),e.switchOn();var l=Nme(0,{message:"switch default subtitle success"});return void n(l)}var c=Nme(5,{message:"no default subtitle"});i(c)}}))}},{key:"switchExt",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:"",language:""};return new rb((function(n,i){if(t.id||t.language){for(var r=null,o=0;o<e.textTrack.length;o++)if(Yme(t,e.textTrack[o])){r=e.textTrack[o];break}r&&!Yme(r,e.currentText)&&e._loadTrack(r).then((function(t){e.currentExtText=t,n(Nme(0))}))}else e.currentExtText=null,n(Nme(0))}))}},{key:"switchOn",value:function(){this._log("switchOn"),this._isOpen=!0,this.show(),this.emit(Jme,this.currentText)}},{key:"switchOff",value:function(){this._isOpen=!1,this.hide(),this.emit(e_e)}},{key:"isOpen",get:function(){return this._isOpen}},{key:"_log",value:function(){if(this.config.debugger){for(var e,t,n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];(t=console).log.apply(t,y_(e=["[xgSubtitle]"]).call(e,i))}}},{key:"_loadTrack",value:function(e){var t=this;this._log("_loadTrack",e.language,e);var n=new Ume,i="",r="";if(e.json?(i="json",r=e.json):e.stringContent&&!e.url&&(i="string",r=e.stringContent),r)return Kme(r,i).then((function(t){e.format=t.format,e.styles=t.styles,e.list=t.list,n.resolve(e)})).catch((function(e){n.reject(e)})),n;var o=e.url;return 0===o.length?(n.resolve(e),n):(Wme(bT(o).call(o,0,1)[0]).then((function(i){e.format=i.format,e.styles=i.styles,e.list||(e.list=[]),t._pushList(e.list,i.list),o.length>1&&t._loadTrackUrls(e,2),n.resolve(e)})).catch((function(e){n.reject(e)})),n)}},{key:"_emitPlayerSwitch",value:function(e,t){e&&"live"===this.config.updateMode&&(e.list=[],e.url=[]);var n=cme({lang:t.language},t);this._log("emit subtile_switch ",t,n),this.player&&this.player.emit("switch_subtitle",n)}},{key:"_loadTrackUrls",value:function(e,t,n){var i,r,o=this,a=e.url.length,s=a>t?bT(i=e.url).call(i,0,t):bT(r=e.url).call(r,0,a),l=s.length;this._log("_loadTrackUrls",e.language,a,s.length,l),s.forEach((function(t,i){Wme(cme(cme({},t),{},{index:i})).then((function(t){e.format=t.format,e.styles=t.format,e.list||(e.list=[]),o._pushList(e.list,t.list),l--})).catch((function(e){l--})).finally((function(t){0===l&&(n&&n.resolve(e),o._loadTrackUrls(e,2))}))}))}},{key:"_freshUrl",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{url:""},i=-1;(e.url.forEach((function(e,t){e.url===n.url&&(i=t)})),i>-1)&&bT(t=e.url).call(t,i,1)}},{key:"_pushList",value:function(e,t){var n=t[0].start,i=t[t.length-1].end;if(0===e.length||n>=e[e.length-1].end)t.forEach((function(t){e.push(t)}));else{for(var r=-1,o=0;o<e.length;o++)if(e[o].start>i){r=o;break}r>-1&&t.forEach((function(t,n){bT(e).call(e,r+n,0,t)}))}return e}},{key:"_updateCurrent",value:function(e){var t,n=this;(this.currentText=e,this.config.domRender&&this.root)&&(W_(t=["language","id","label"]).call(t,(function(e){n.root.setAttribute("data-".concat(e),n.currentText[e]||"")})),this.__remove(this._cids));this._cids=[],this._gid=-1,this._cid=-1,this._curTexts=[];var i=this._getPlayerCurrentTime();i&&("live"===this.config.updateMode?this._liveUpdate(i):this._update(i))}},{key:"__loadAll",value:function(){var e=this;this.textTrack.forEach((function(t){e._loadTrack(t)}))}},{key:"getDelCid",value:function(e,t){for(var n=[],i=0;i<e.length;i++)F_(t).call(t,e[i])||n.push(e[i]);return n}},{key:"getNewCid",value:function(e,t){for(var n=[],i=0;i<t.length;i++)F_(e).call(e,t[i])||n.push(t[i]);return n}},{key:"_liveUpdate",value:function(e){var t=this;if(this.currentText&&this.currentText.list&&this.currentText.list.length){var n=[],i=Hme(e,this.currentText.list,this._gid);if(i>-1&&(n=jme(e,this.currentText.list[i].list,this._cid)),this.__removeByTime(this._curTexts,e),this._log("_liveUpdate",e,i,n,this.currentText.list[0].list[0].start,this.currentText.list[0].list[0].end),n.length>0){var r=function(e,t,n){if(0===e.length||t<0||t>e.length-1)return[];var i=e[t].list;if(0===n.length)return[];var r=bT(i).call(i,n[0],n.length);return t>0&&bT(e).call(e,0,t),0===i.length&&bT(e).call(e,0,1),r}(this.currentText.list,i,n),o=this._curTexts.length,a=o>0?this._curTexts[o-1].index:0;r.forEach((function(e,n){e.index=n+a,t._curTexts.push(e)})),this.__render(r)}this.emit("update",this._curTexts)}}},{key:"_update",value:function(e){var t=this;if(this.currentText&&this.currentText.list&&this.currentText.list.length){var n=Hme(e,this.currentText.list,this._gid),i=[];if(n>-1&&(i=jme(e,this.currentText.list[n].list,this._cid)),i.length<1)return this._cids.length>0&&this.config.domRender&&this.__remove(this._cids),void(this._cids=[]);if(this._cids!==i||n!==this._gid){this._gid=n,this._cid=i[0];var r=this.getDelCid(this._cids,i),o=this.getNewCid(this._cids,i);this._cids=i,this.config.domRender&&this.__remove(r);var a=[];W_(o).call(o,(function(e){var i=t.currentText.list[n].list[e];i.index=e,a.push(i)})),this.currentExtText&&W_(o).call(o,(function(e){var i=t.currentText.list[n].list[e];i.index=e,a.push(i)})),this._log("update",a,e),this.emit("update",a),this.__render(a,e)}}}},{key:"_getPlayerCurrentTime",value:function(){if(!this.player)return 0;var e=this.player.currentTime;return parseInt(1e3*e+1e3*this.seiTime-1e3*this.lastSeiTime,10)/1e3}},{key:"_onSubtitlePlaylist",value:function(e){this._log("_onSubtitlePlaylist",e);var t=W_(e).call(e,(function(e){return{label:e.name,language:e.lang,id:e.id,isDefault:e.default,url:[],mUrl:e.url}}));this.setSubTitles(t)}},{key:"_onSubtitleSegment",value:function(e){if(this._log("_onSubtitleSegment",e.length,e[0].lang,e[0].sn,e[e.length-1].sn,e[0].start,e[e.length-1].end),e&&0!==e.length){var t={language:e[0].lang,url:W_(e).call(e,(function(e){return{id:e.sn,url:e.url,duration:e.duration,start:e.start,end:e.end}}))};Yme(t,this.currentText)&&this.updateSubTitle(t)}}},{key:"_onCoreSeiintime",value:function(e){try{var t=e.time/1e3;this._log("_onCoreSeiintime sei",t,this.seiTime,this.lastSeiTime),this.seiTime=t,this.lastSeiTime=this.player?this.player.currentTime:0}catch(n){}}},{key:"resize",value:function(e,t){var n,i,r=this,o=this.config,a=o.baseSizeX,s=o.baseSizeY,l=o.minMobileSize,c=o.minSize,u=o.fitVideo,h=o.offsetBottom,d=this._videoMeta.scale;this._videoMeta.lwidth=e,this._videoMeta.lheight=t;var f=0;t/e*100>=d?(f=parseInt(d*e,10)/100,i=e):(f=t,i=parseInt(t/d*100,10)),this._videoMeta.vWidth=i,this._videoMeta.vHeight=f;var p=0,v=0;d>120?(p=s,v=parseInt(p*f/1080,10)):(p=a,v=parseInt(p*i/1920,10));var g=n_e?l:c,y={fontSize:v=v<g?g:v>p?p:v},m=parseInt((t-f)/2,10),_=parseInt((e-i)/2,10),b=parseInt(f*h,10)/100;this._videoMeta.vBottom=m,this._videoMeta.vLeft=_,this._videoMeta.marginBottom=b,u&&(y.bottom=m+b,y.left=y.right=_),W_(n=kT(y)).call(n,(function(e){r.root.style[e]="".concat(y[e],"px")})),this.emit(Qme,{vLeft:_,vBottom:m,marginBottom:b,vWidth:i,vHeight:f,fontSize:v,scale:d})}},{key:"__startResize",value:function(e){var t=this,n=e.getBoundingClientRect(),i=this._videoMeta,r=n.width,o=n.height;if(this._iId&&(clearTimeout(this._iId),this._iId=null),r>0&&o>0&&(r!==i.lwidth||o!==i.lheight))this._iC=0,this.resize(r,o);else{if(this._iC>=5)return void(this._iC=0);this._iC++,this._iId=setTimeout((function(){t.__startResize(e)}),50)}}},{key:"__removeByTime",value:function(e,t){for(var n=[],i=0;i<e.length;i++)(!t||e[i].end<t)&&n.push(i);0!==n.length&&(bT(e).call(e,n[0],n.length),this.config.domRender&&this.__remove(n))}},{key:"__remove",value:function(e){var t=this;if(e&&!(e.length<1)){this._log(">>>>_renderByWords__remove",e);for(var n=this.innerRoot.children,i=[],r=0;r<n.length;r++){var o=Number(n[r].getAttribute("data-index"));F_(e).call(e,o)&&i.push(n[r])}W_(i).call(i,(function(e){t.innerRoot.removeChild(e)}))}}},{key:"__render",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this._log("__render",t.length,this.config.domRender);var n=this.config,i=n.renderMode,r=n.domRender;t.length>0&&r&&t.forEach((function(t){var n="text-track-".concat(e.config.line);t.text.forEach((function(r,o){o>0&&(n+=" text-track-deputy");var a={"data-start":t.start,"data-end":t.end,"data-index":t.index},s=Vme("xg-text-track-span","",a,n);if(e.innerRoot.appendChild(s),"step"===i){var l=Vme("xg-text-track-span","",a,"".concat(n," text-track-space"));e.innerRoot.appendChild(l),l.innerHTML=r,e._renderByWords(s,o,t.start,t.end,r)}else s.innerHTML=r}))}))}},{key:"_renderByWords",value:function(e,t,n,i,r){var o=document.createTextNode("");e.appendChild(o);var a=function(e){for(var t=e.split(""),n=[],i=!1,r=0;r<t.length;r++){var o=t[r];if(qme(o))if(i){var a,s=n.length-1;n[s]=y_(a="".concat(n[s])).call(a,o)}else n.push(o),i=!0;else if(o.match(/^[ ]*$/)||Xme(o)||/[\u3002|\uff1f|\uff01|\uff0c|\u3001|\uff1b|\uff1a|\u201c|\u201d|\u2018|\u2019|\uff08|\uff09|\u300a|\u300b|\u3008|\u3009|\u3010|\u3011|\u300e|\u300f|\u300c|\u300d|\ufe43|\ufe44|\u3014|\u3015|\u2026|\u2014|\uff5e|\ufe4f|\uffe5]/.test(o)){var l;i=!1;var c=n.length-1;n[c]=y_(l="".concat(n[c])).call(l,o)}else i=!1,n.push(o)}return n}(r),s=parseInt(1e3*(i-n),10);s>300&&(s-=100);var l={dom:o,ids:t,wordList:a,interval:s/a.length,start:n,end:i,duration:s,lastTime:0};this._log(">>>>_renderByWords",s,l);for(var c=this._curRenderTask,u=-1,h=0;h<c.length;h++)if(c[h].ids===t){u=h;break}u>-1&&Sx(c).call(c,u,1),c.push(l),this.startRender(-1)}},{key:"stopRender",value:function(){this._renderIntervalId&&window.cancelAnimationFrame(this._renderIntervalId)}},{key:"show",value:function(){var e,t;this.config.domRender&&(e=this.root,t="text-track-hide",e&&(e.classList?t.split(/\s+/g).forEach((function(t){e.classList.remove(t)})):Bme(e,t)&&t.split(/\s+/g).forEach((function(t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className&&"object"===ume(e.className)?e.setAttribute("class",e.getAttribute("class").replace(n," ")):e.className=e.className.replace(n," ")}))))}},{key:"hide",value:function(){this.config.domRender&&(Fme(this.root,"text-track-hide"),this.innerRoot.innerHTML="")}},{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=bme(vme(n.prototype),"emit",this)).call.apply(r,y_(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=bme(vme(n.prototype),"on",this)).call.apply(r,y_(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=bme(vme(n.prototype),"once",this)).call.apply(r,y_(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=bme(vme(n.prototype),"off",this)).call.apply(r,y_(i=[this,e,t]).call(i,a))}},{key:"offAll",value:function(){bme(vme(n.prototype),"removeAllListeners",this).call(this)}},{key:"marginBottom",get:function(){var e=this._videoMeta,t=e.bottom,n=e.marginBottom;return this.config.fitVideo?t+n:n}}]),n}(EA),r_e=function(e){rh(n,e);var t=Ah(n);function n(e){var i;return Ou(this,n),(i=t.call(this))._onChange=function(e){var t=i._media.textTracks;if(t&&0!==t.length){for(var n=[],r=[],o=-1,a=0;a<t.length;a++){var s=t[a];"subtitles"===s.kind&&(n.push({id:s.id||s.language,language:s.language,text:s.label,isDefault:"showing"===s.mode}),-1===o&&"showing"===s.mode&&(o=a),r.push(s.language))}r.join("|")!==i._languages?(i._languages=r.join("|"),i.emit("reset",{list:n,isOpen:o>-1})):-1===o?i.emit("off"):i.curIndex!==o&&i.emit("change",n[o]),i.curIndex=o}},i._media=e,i._list=[],i._languages="",i.curIndex=-1,i._init(),i}return Au(n,[{key:"_init",value:function(){var e=this._media.textTracks;e?(e.addEventListener("change",this._onChange),e.addEventListener("addtrack",this._onChange)):LG.warn("current browser not support native subtitle")}},{key:"switch",value:function(e){var t=this;return new rb((function(n,i){if(!e)return i({code:1,message:"no subtitle data"});for(var r=t._media.textTracks,o=0;o<r.length;o++){var a=r[o];a.language===e.language?a.mode="showing":"showing"===a.mode&&(a.mode="disabled")}return n({code:0})}))}},{key:"switchOff",value:function(){for(var e=this._media.textTracks,t=0;t<e.length;t++)e[t].mode="disabled";this.curIndex=-1}},{key:"destroy",value:function(){this._media.textTracks.removeEventListener("change",this._onChange),this._media=null,this._list=[],this._languages="",this.curIndex=-1}}]),n}(EA);function o_e(){return(new DOMParser).parseFromString('<svg width="18" height="16" viewBox="0 0 18 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2 0.5C0.895431 0.5 0 1.39543 0 2.5V13.5C0 14.6046 0.89543 15.5 2 15.5H16C17.1046 15.5 18 14.6046 18 13.5V2.5C18 1.39543 17.1046 0.5 16 0.5H2ZM7.49634 11.0454C8.00741 10.606 8.29061 10.0037 8.34595 9.23877H6.8811C6.84855 9.67171 6.71997 9.99235 6.49536 10.2007C6.27401 10.4058 5.93709 10.5083 5.48462 10.5083C4.98332 10.5083 4.61548 10.3309 4.3811 9.97607C4.14998 9.62126 4.03442 9.05973 4.03442 8.2915V7.75439C4.04093 7.01872 4.16463 6.47673 4.40552 6.12842C4.64966 5.77686 5.01587 5.60107 5.50415 5.60107C5.95337 5.60107 6.28703 5.70524 6.50513 5.91357C6.72648 6.11865 6.85506 6.45068 6.89087 6.90967H8.35571C8.27759 6.1154 7.98787 5.49854 7.48657 5.05908C6.98527 4.61963 6.32446 4.3999 5.50415 4.3999C4.9117 4.3999 4.39087 4.53988 3.94165 4.81982C3.49569 5.09652 3.15226 5.49528 2.91138 6.01611C2.67049 6.53695 2.55005 7.13916 2.55005 7.82275V8.25732C2.55005 9.32829 2.81047 10.1714 3.3313 10.7866C3.85539 11.3986 4.57316 11.7046 5.48462 11.7046C6.31795 11.7046 6.98853 11.4849 7.49634 11.0454ZM14.5393 11.0454C15.0504 10.606 15.3336 10.0037 15.3889 9.23877H13.9241C13.8915 9.67171 13.7629 9.99235 13.5383 10.2007C13.317 10.4058 12.9801 10.5083 12.5276 10.5083C12.0263 10.5083 11.6584 10.3309 11.4241 9.97607C11.193 9.62126 11.0774 9.05973 11.0774 8.2915V7.75439C11.0839 7.01872 11.2076 6.47673 11.4485 6.12842C11.6926 5.77686 12.0588 5.60107 12.5471 5.60107C12.9963 5.60107 13.33 5.70524 13.5481 5.91357C13.7695 6.11865 13.898 6.45068 13.9338 6.90967H15.3987C15.3206 6.1154 15.0308 5.49854 14.5295 5.05908C14.0282 4.61963 13.3674 4.3999 12.5471 4.3999C11.9547 4.3999 11.4338 4.53988 10.9846 4.81982C10.5387 5.09652 10.1952 5.49528 9.95435 6.01611C9.71346 6.53695 9.59302 7.13916 9.59302 7.82275V8.25732C9.59302 9.32829 9.85343 10.1714 10.3743 10.7866C10.8984 11.3986 11.6161 11.7046 12.5276 11.7046C13.3609 11.7046 14.0315 11.4849 14.5393 11.0454Z" fill="white"/>\n</svg>',"image/svg+xml").firstChild}function a_e(){return(new DOMParser).parseFromString('<svg width="18" height="16" viewBox="0 0 18 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.49609 11.0454C8.00716 10.606 8.29037 10.0037 8.3457 9.23877H6.88086C6.84831 9.67171 6.71973 9.99235 6.49512 10.2007C6.27376 10.4058 5.93685 10.5083 5.48438 10.5083C4.98307 10.5083 4.61523 10.3309 4.38086 9.97607C4.14974 9.62126 4.03418 9.05973 4.03418 8.2915V7.75439C4.04069 7.01872 4.16439 6.47673 4.40527 6.12842C4.64941 5.77686 5.01562 5.60107 5.50391 5.60107C5.95312 5.60107 6.28678 5.70524 6.50488 5.91357C6.72624 6.11865 6.85482 6.45068 6.89062 6.90967H8.35547C8.27734 6.1154 7.98763 5.49854 7.48633 5.05908C6.98503 4.61963 6.32422 4.3999 5.50391 4.3999C4.91146 4.3999 4.39062 4.53988 3.94141 4.81982C3.49544 5.09652 3.15202 5.49528 2.91113 6.01611C2.67025 6.53695 2.5498 7.13916 2.5498 7.82275V8.25732C2.5498 9.32829 2.81022 10.1714 3.33105 10.7866C3.85514 11.3986 4.57292 11.7046 5.48438 11.7046C6.31771 11.7046 6.98828 11.4849 7.49609 11.0454Z" fill="white"/>\n<path d="M14.5391 11.0454C15.0501 10.606 15.3333 10.0037 15.3887 9.23877H13.9238C13.8913 9.67171 13.7627 9.99235 13.5381 10.2007C13.3167 10.4058 12.9798 10.5083 12.5273 10.5083C12.026 10.5083 11.6582 10.3309 11.4238 9.97607C11.1927 9.62126 11.0771 9.05973 11.0771 8.2915V7.75439C11.0837 7.01872 11.2074 6.47673 11.4482 6.12842C11.6924 5.77686 12.0586 5.60107 12.5469 5.60107C12.9961 5.60107 13.3298 5.70524 13.5479 5.91357C13.7692 6.11865 13.8978 6.45068 13.9336 6.90967H15.3984C15.3203 6.1154 15.0306 5.49854 14.5293 5.05908C14.028 4.61963 13.3672 4.3999 12.5469 4.3999C11.9544 4.3999 11.4336 4.53988 10.9844 4.81982C10.5384 5.09652 10.195 5.49528 9.9541 6.01611C9.71322 6.53695 9.59277 7.13916 9.59277 7.82275V8.25732C9.59277 9.32829 9.85319 10.1714 10.374 10.7866C10.8981 11.3986 11.6159 11.7046 12.5273 11.7046C13.3607 11.7046 14.0312 11.4849 14.5391 11.0454Z" fill="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M0 2.5C0 1.39543 0.895431 0.5 2 0.5H16C17.1046 0.5 18 1.39543 18 2.5V13.5C18 14.6046 17.1046 15.5 16 15.5H2C0.89543 15.5 0 14.6046 0 13.5V2.5ZM2 2.3H16C16.1105 2.3 16.2 2.38954 16.2 2.5V13.5C16.2 13.6105 16.1105 13.7 16 13.7H2C1.88954 13.7 1.8 13.6105 1.8 13.5V2.5C1.8 2.38954 1.88954 2.3 2 2.3Z" fill="white"/>\n</svg>\n',"image/svg+xml").firstChild}var s_e=ON.POSITIONS,l_e="mobile"===eM.device,c_e="text-close";function u_e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=-1;return W_(e).call(e,(function(e,n){e.id||e.language||(e.id=""+n),!e.url&&(e.url=e.src),!e.text&&(e.text=e.label),!e.language&&(e.language=e.srclang),void 0===e.isDefault&&(e.isDefault=e.default),(e.isDefault||e.default)&&(t<0?t=n:e.isDefault=e.default=!1)})),t}var h_e=function(e){rh(n,e);var t=Ah(n);function n(e){var i;Ou(this,n),(i=t.call(this,e)).isOpenState=!0,i.optionList=null,i.currentLang="",i.handlerClickSwitch=function(e,t){e.stopPropagation(),e.preventDefault(),i.subTitles&&(t.type===c_e?i.switchOffSubtitle():i.switchSubTitle({language:t.language,id:t.id}))},i.onPlayerFocus=function(e){i.subTitles&&i.config.style.follow&&i.rePosition()},i.onPlayerBlur=function(e){i.subTitles&&i.config.style.follow&&!i.playerConfig.marginControls&&i.subTitles.root&&(i.subTitles.root.style.transform="translate(0, 0)")};var r=e.player;return e.config,r.config.isLive&&(e.config.updateMode="live",eM.os.isIos&&(e.config.mode="native")),i}return Au(n,[{key:"afterCreate",value:function(){var e=this.config.list,t=void 0===e?[]:e;this.curIndex=-1,this.curItem=null;var i=u_e(t);Bce(Rh(n.prototype),"afterCreate",this).call(this),"native"===this.config.mode?this._initNativeSubtitle(i):this._initExtSubTitle(i)}},{key:"_initNativeSubtitle",value:function(e){var t=this.player;t._subTitles||(t._subTitles=new r_e(t.video)),this.subTitles=t._subTitles,this.subTitles.on("off",this._onOff.bind(this)),this.subTitles.on("change",this._onChange.bind(this)),this.subTitles.on("reset",this._onListReset.bind(this)),this._renderList(e)}},{key:"_initExtSubTitle",value:function(e){var t,n=this.config,i=n.list,r=void 0===i?[]:i,o=n.style,a=n.isDefaultOpen,s=n.updateMode,l={subTitles:r,defaultOpen:a,debugger:!1,renderMode:n.renderMode,updateMode:s};this.isOpenState=a,W_(t=kT(o)).call(t,(function(e){l[e]=o[e]})),!this.playerConfig.marginControls&&this.player.controls.root&&(this.on(EM,this.onPlayerFocus),this.on(wM,this.onPlayerBlur));var c=this.player;c._subTitles?c._subTitles._isOpen&&(e=this.getSubTitleIndex(this.config.list,c._subTitles.currentText)):(c._subTitles=new i_e(l),c._subTitles.attachPlayer(this.player),this.changeTipText()),this.subTitles=c._subTitles,this.subTitles.on("off",this._onOff.bind(this)),this.subTitles.on("change",this._onChange.bind(this)),this.subTitles.on("reset",this._onListReset.bind(this)),o.follow&&this.subTitles.root&&qO.addClass(this.subTitles.root,"follow-control"),this._renderList(e)}},{key:"_renderList",value:function(e){var t=this.config,n=t.list,i=void 0===n?[]:n,r=t.isDefaultOpen;i.length&&(r&&e<0?(i[0].isDefault=!0,this.curIndex=0,this.curItem=i[0]):(this.curIndex=e,this.curItem=i[e])),this.appendChild(".xgplayer-icon",this.icons.vttSubOpen),this.appendChild(".xgplayer-icon",this.icons.vttSubClose),this.creatOptionList(),this.initEvents(),this.isOpenState?qO.addClass(this.root,"isOpen"):qO.addClass(this.root,"isClose")}},{key:"_onOff",value:function(){this.noShowSubtitle()}},{key:"_onChange",value:function(e){var t=this.getSubTitleIndex(this.config.list,e);t<0||this.updateCurItem(t,e)}},{key:"_onListReset",value:function(e){this.updateList(e)}},{key:"updateCurItem",value:function(e,t){this.curIndex=e,this.curItem=this.config.list[e-1],this.renderItemList(),this.emit("subtitle_change",dp({off:!1,isListUpdate:!1,list:[]},t))}},{key:"initEvents",value:function(){this.bind(["click"],this.handleButtonChange.bind(this)),this.bind(["mouseenter"],this.showList.bind(this)),this.bind(["mouseleave"],this.hideList.bind(this)),this._delegates=[]}},{key:"handleButtonChange",value:function(e){e.preventDefault(),e.stopPropagation(),e.delegateTarget||(l_e?this.showMobilePanel():this.isOpenState?this.switchOffSubtitle():this.openSubtitle())}},{key:"showList",value:function(){var e;!l_e&&this.isOpenState&&(null===(e=this.optionList)||void 0===e||e.show())}},{key:"hideList",value:function(){var e;!l_e&&this.isOpenState&&(null===(e=this.optionList)||void 0===e||e.hide())}},{key:"openSubtitle",value:function(){this.curIndex>-1&&this.curItem&&this.switchSubTitle(this.curItem)}},{key:"getSubTitleIndex",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{id:"",language:""},n=-1;return t&&(t.id||t.language)?(e.forEach((function(e,i){e.id!==t.id&&e.language!==t.language||(n=i)})),n):n}},{key:"registerIcons",value:function(){return{vttSubOpen:{icon:o_e,class:"xgplayer-vttsub-open-svg"},vttSubClose:{icon:a_e,class:"xgplayer-vttsub-close-svg"}}}},{key:"registerLanguageTexts",value:function(){return{sub:{jp:"字幕",en:"Subtitles",zh:"字幕","zh-hk":"字幕"},subOpen:{jp:"字幕をオンにする",en:"Show subtitles",zh:"开启字幕","zh-hk":"開啟字幕"},subClose:{jp:"クローズドキャプション",en:"Hide subtitles",zh:"关闭字幕","zh-hk":"關閉字幕"}}}},{key:"creatOptionList",value:function(){var e=this;if(!l_e){var t={config:{data:this.getList(),className:"",onItemClick:function(t,n){e.handlerClickSwitch(t,null==n?void 0:n.to)}},root:this.root};this.optionList=new cj(t)}}},{key:"getList",value:function(){var e,t=this;return W_(e=this.config.list).call(e,(function(e,n){return n===t.curIndex&&t.isOpenState?(e.isCurrent=!0,e.selected=!0):(e.isCurrent=!1,e.selected=!1),e.showText=t.getTextByLang(e),e}))}},{key:"renderOptionList",value:function(){this.optionList.renderItemList(this.getList())}},{key:"switchSubTitle",value:function(){var e,t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:"",language:""},i=-1;if(n&&(n.id||n.language)&&(W_(e=this.config.list).call(e,(function(e,t){e.id+""==n.id+""&&e.language+""==n.language+""&&(i=t)})),!(i<0||this.isOpenState&&i===this.curIndex)))return this.subTitles.switch(n).then((function(e){0===e.code&&(n.off=!1,n.isListUpdate=!1,n.list=[],t.curIndex=i,t.curItem=t.config.list[i],t.isOpenState=!0,qO.removeClass(t.root,"isClose"),qO.addClass(t.root,"isOpen"),t.renderItemList(),t.changeTipText(),t.emit("subtitle_change",n))})).catch((function(e){return LG.error("switch subtitle err: ",e)}))}},{key:"switchOffSubtitle",value:function(){this.subTitles.switchOff(),this.noShowSubtitle()}},{key:"noShowSubtitle",value:function(){var e;this.emit("subtitle_change",{off:!0,isListUpdate:!1,list:[]}),this.isOpenState=!1,qO.addClass(this.root,"isClose"),qO.removeClass(this.root,"isOpen"),this.renderItemList(),this.changeTipText(),null===(e=this.optionList)||void 0===e||e.hide()}},{key:"renderItemList",value:function(){l_e?this.updatePanel():this.renderOptionList()}},{key:"updateSubtitles",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(this.updateList({list:e}),this.subTitles&&this.subTitles.setSubTitles(this.config.list,this.curIndex>-1,t))}},{key:"updateList",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.list){var n=[];W_(e=t.list).call(e,(function(e){n.push(e)}));var i,r=u_e(n);if(t.isOpen)this.isOpenState=!0,this.curIndex=r,this.curItem=r>-1?n[r]:null,qO.removeClass(this.root,"isClose"),qO.addClass(this.root,"isOpen");else this.isOpenState=!1,this.curIndex=-1,this.curItem=null,qO.removeClass(this.root,"isOpen"),qO.addClass(this.root,"isClose"),this.changeTipText(),null===(i=this.optionList)||void 0===i||i.hide();if(this.config.list=n,n.length>0){var o;if(!l_e)null===(o=this.optionList)||void 0===o||o.hide()}else{var a,s;if(this.switchOffSubtitle(),l_e?this.showMobilePanel():null===(a=this.optionList)||void 0===a||a.show(),!l_e)null===(s=this.optionList)||void 0===s||s.hide();this.hide()}this.renderItemList()}}},{key:"changeTipText",value:function(){this.isOpenState?fb(this).call(this,".xg-tips").innerHTML=this.langText.subClose:fb(this).call(this,".xg-tips").innerHTML=this.langText.subOpen}},{key:"showMobilePanel",value:function(){var e,t=this.renderPanel();null===(e=this.player.panel)||void 0===e||e.showPanel(t,this.langText.sub,!0)}},{key:"updatePanel",value:function(){var e,t=this.renderPanel();null===(e=this.player.panel)||void 0===e||e.updatePanel(t)}},{key:"renderPanel",value:function(){var e=this,t=qd(this.config.list),n=qO.createDom("div","",{},"ai-panel-content");W_(t).call(t,(function(t,i){var r=dp({language:t.language||t.srclang,"data-id":t.id,selected:e.isOpenState&&e.curIndex===i,showText:e.getTextByLang(t)},t),o=e.renderPanelItem(r);n.appendChild(o)}));var i={showText:this.langText.subClose,"data-type":c_e,selected:!this.isOpenState};return n.appendChild(this.renderPanelItem(i)),n}},{key:"renderPanelItem",value:function(e){var t=this,n=e.showText,i=e.selected,r=qO.createDom("div","",{language:e.language,"data-id":e["data-id"],"data-type":e["data-type"]},"panel-Item ".concat(i?"select-in":""));r.innerHTML=n;var o=l_e?"touchend":"click",a=ON.delegate(r,".panel-Item",o,(function(n){e["data-type"]===c_e?(n.stopPropagation(),n.preventDefault(),t.switchOffSubtitle()):t.handlerClickSwitch(n,e)}));return this._delegates.push(a),r}},{key:"getTextByLang",value:function(e,t,n){if(void 0===e)return"";var i=this.config.list;return!n&&(n=this.player.lang),t=!t||qO.isUndefined(e[t])?"text":t,"number"==typeof e&&(e=i[e]),"object"===Du(e[t])?e[t][n]||e[t].zh:e[t]||""}},{key:"rePosition",value:function(){var e=this.config.style.fitVideo,t=0-this.player.controls.root.getBoundingClientRect().height;if(e){var n=this.player,i=n.video,r=n.root.getBoundingClientRect(),o=r.height,a=r.width,s=i.videoHeight,l=i.videoWidth,c=parseInt(s/l*100,10)*a/100;c>o&&(c=o);var u=(o-c)/2-t;u<0&&(this.subTitles.root.style.transform="translate(0, ".concat(u,"px)"))}else this.subTitles.root.style.transform="translate(0, ".concat(t,"px)")}},{key:"destroy",value:function(){var e,t;(this.subTitles&&(this.subTitles.destroy(),this.subTitles=null),this.unbind(["click"],this.handleButtonChange.bind(this)),this.unbind(["mouseenter"],this.showList.bind(this)),this.unbind(["mouseleave"],this.hideList.bind(this)),null===(e=this.optionList)||void 0===e||e.destroy(),this._delegates&&this._delegates.length>0)&&(W_(t=this._delegates).call(t,(function(e){Array.isArray(e)&&W_(e).call(e,(function(e){e.destroy&&e.destroy()})),e.destroy&&e.destroy()})),this._delegates=null);Bce(Rh(n.prototype),"destroy",this).call(this)}},{key:"render",value:function(){return'\n <xg-icon class="xgplayer-vttsub">\n <div class="xgplayer-icon">\n </div>\n <div class="xg-tips" lang-key="vttSubOpen">'.concat(this.langText.subOpen,"</div>\n </xg-icon>\n ")}}],[{key:"pluginName",get:function(){return"Subtitle"}},{key:"defaultConfig",get:function(){return{position:s_e.CONTROLS_RIGHT,index:Xce,list:[],isDefaultOpen:!0,style:{follow:!0,mode:"stroke",followBottom:50,fitVideo:!0,offsetBottom:4,baseSizeX:49,baseSizeY:28,minSize:16,minMobileSize:13,line:"double",fontColor:"#fff"},isShowIcon:!0,mode:"external",updateMode:"vod"}}}]),n}(ON),d_e=function(e){rh(n,e);var t=Ah(n);function n(e){var i;return Ou(this,n),(i=t.call(this,e)).toastNumber=0,i.toastMaps={},i}return Au(n,[{key:"beforePlayerInit",value:function(){}},{key:"afterPlayerInit",value:function(){}},{key:"afterCreate",value:function(){}},{key:"destroy",value:function(){}},{key:"add",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.toastNumber+1;this.toastNumber=r;var o=this.renderToast(e,i,r);return this.root.appendChild(o),this.toastMaps[r]=o,n&&setTimeout((function(){t.remove(r)}),n),r}},{key:"remove",value:function(e){var t=this.toastMaps[e];t&&(this.root.contains(t)&&this.root.removeChild(t),delete this.toastMaps[e])}},{key:"renderToast",value:function(e,t,n){var i=this,r=qO.createDom("div","",void 0,"toast-container"),o=qO.checkIsObject(e)?e:qO.createDom("div",e,void 0,"toast-txt");if(r.appendChild(o),t){var a=qO.createDom("span","×",void 0,"toast-close-bt");a.addEventListener("click",(function(){i.remove(n)})),r.appendChild(a)}return r}},{key:"render",value:function(){return'<xg-sdk-toast class="xgplayer-sdk-toast"></xg-sdk-toast>'}}],[{key:"pluginName",get:function(){return"sdkToastPlugin"}},{key:"defaultConfig",get:function(){return{index:5}}}]),n}(ON),f_e=t(te.URLSearchParams),p_e=r,v_e=o,g_e=g,y_e=Ji,m_e=YA.trim,b_e=BA,k_e=p_e.parseInt,E_e=p_e.Symbol,w_e=E_e&&E_e.iterator,S_e=/^[+-]?0x/i,T_e=g_e(S_e.exec),C_e=8!==k_e(b_e+"08")||22!==k_e(b_e+"0x16")||w_e&&!v_e((function(){k_e(Object(w_e))}))?function(e,t){var n=m_e(y_e(e));return k_e(n,t>>>0||(T_e(S_e,n)?16:10))}:k_e;In({target:"Number",stat:!0,forced:Number.parseInt!=C_e},{parseInt:C_e});var x_e=t(te.Number.parseInt),D_e=h,I_e=Z,R_e=Hn,L_e=Wn,P_e=Of,A_e=Math.min,O_e=[].lastIndexOf,M_e=!!O_e&&1/[1].lastIndexOf(1,-0)<0,N_e=P_e("lastIndexOf"),z_e=M_e||!N_e?function(e){if(M_e)return D_e(O_e,this,arguments)||0;var t=I_e(this),n=L_e(t),i=n-1;for(arguments.length>1&&(i=A_e(i,R_e(arguments[1]))),i<0&&(i=n+i);i>=0;i--)if(i in t&&t[i]===e)return i||0;return-1}:O_e;In({target:"Array",proto:!0,forced:z_e!==[].lastIndexOf},{lastIndexOf:z_e});var U_e=Zu("Array").lastIndexOf,B_e=se,F_e=U_e,H_e=Array.prototype,j_e=t((function(e){var t=e.lastIndexOf;return e===H_e||B_e(H_e,e)&&t===H_e.lastIndexOf?F_e:t})),G_e=r,V_e=o,K_e=Ji,W_e=YA.trim,Y_e=BA,q_e=g("".charAt),X_e=G_e.parseFloat,$_e=G_e.Symbol,Z_e=$_e&&$_e.iterator,Q_e=1/X_e(Y_e+"-0")!=-1/0||Z_e&&!V_e((function(){X_e(Object(Z_e))}))?function(e){var t=W_e(K_e(e)),n=X_e(t);return 0===n&&"-"==q_e(t,0)?-0:n}:X_e;In({target:"Number",stat:!0,forced:Number.parseFloat!=Q_e},{parseFloat:Q_e});var J_e=t(te.Number.parseFloat);function ebe(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),Object.defineProperty(e,i.key,i)}}function tbe(e,t,n){return t&&ebe(e.prototype,t),n&&ebe(e,n),e}function nbe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ibe(e,t){var n=kT(e);if(Lx){var i=Lx(e);t&&(i=ib(i).call(i,(function(t){return zP(e,t).enumerable}))),n.push.apply(n,i)}return n}function rbe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ibe(Object(n),!0).forEach((function(t){nbe(e,t,n[t])})):$P?Object.defineProperties(e,$P(n)):ibe(Object(n)).forEach((function(t){Object.defineProperty(e,t,zP(n,t))}))}return e}var obe="xgplayer_device_id",abe="xgplayer_user_id",sbe=function(e){if(!document.cookie)return null;for(var t=document.cookie.split(";"),n=0,i=t.length;n<i;n++){var r,o=t[n];if(qP(r=t[n]).call(r,e)>=0)return o.split("=")[1]||null}},lbe=function(e){return String(Math.floor(Math.random()*Math.pow(10,e)))},cbe=function(){var e=sbe(obe);if(e)return e;var t=lbe(11);return document.cookie=obe+"="+t+";max-age=31536000;path=/",t},ube=function(){var e=sbe(abe);if(e)return e;var t=lbe(12);return document.cookie=abe+"="+t+";max-age=31536000;path=/",t};var hbe={get device(){return hbe.os.isPc?"pc":"mobile"},get browser(){var e=function(){var e=navigator.userAgent.toLowerCase(),t={},n={IE:window.ActiveXObject||"ActiveXObject"in window,Chrome:qP(e).call(e,"chrome")>-1&&qP(e).call(e,"safari")>-1,Firefox:qP(e).call(e,"firefox")>-1,Opera:qP(e).call(e,"opera")>-1,Safari:qP(e).call(e,"safari")>-1&&-1==qP(e).call(e,"chrome"),Edge:qP(e).call(e,"edge")>-1,QQBrowser:/qqbrowser/.test(e),WeixinBrowser:/MicroMessenger/i.test(e)};for(var i in n)if(n[i]){var r="";if("IE"===i)r=e.match(/(msie\s|trident.*rv:)([\w.]+)/)[2];else if("Chrome"===i){for(var o in navigator.mimeTypes)"application/360softmgrplugin"===navigator.mimeTypes[o].type&&(i="360");var a=e.match(/chrome\/([\d.]+)/);r=a?a[1]:"-1"}else if("Firefox"===i){var s=e.match(/firefox\/([\d.]+)/);r=s?s[1]:"-1"}else if("Opera"===i){var l=e.match(/opera\/([\d.]+)/);r=l?l[1]:"-1"}else if("Safari"===i){var c=e.match(/version\/([\d.]+)/);r=c?c[1]:"-1"}else if("Edge"===i){var u=e.match(/edge\/([\d.]+)/);r=u?u[1]:"-1"}else if("QQBrowser"===i){var h=e.match(/qqbrowser\/([\d.]+)/);r=h?h[1]:"-1"}t.type=i,t.versions=parseInt(r)}return t}();return e.type+"_"+e.versions},get os(){var e=navigator.userAgent;navigator.platform.toLowerCase();var t=/(?:Windows Phone)/.test(e),n=/(?:SymbianOS)/.test(e)||t,i=/(?:Android)/.test(e),r=/(?:Firefox)/.test(e),o=/(?:iPad|PlayBook)/.test(e)||i&&!/(?:Mobile)/.test(e)||r&&/(?:Tablet)/.test(e),a=/(?:iPhone)/.test(e)&&!o;return{isTablet:o,isPhone:a,isAndroid:i,isPc:!(a||i||n||o),isSymbian:n,isWindowsPhone:t,isFireFox:r}},get operation_os(){for(var e=navigator.userAgent,t=[{s:"windows",r:/(Windows 10.0|Windows NT 10.0|Windows NT 10.1|Windows 8.1|Windows NT 6.3|Windows 8|Windows NT 6.2|Windows 7|Windows NT 6.1)/},{s:"android",r:/Android/},{s:"linux",r:/(Linux|X11)/},{s:"ios",r:/(iPhone|iPad|iPod)/},{s:"mac",r:/Mac OS X/},{s:"mac",r:/(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/}],n=0;n<t.length;n++){var i=t[n];if(i.r.test(e))return i.s}return"unknown"}};function dbe(){return Date.now()}function fbe(e){var t="unknown";return"string"!=typeof e?t:qP(e).call(e,".flv")>-1?"flv":qP(e).call(e,".m3u8")>-1?"m3u8":qP(e).call(e,".mp4")>-1?"mp4":qP(e).call(e,".sdp")>-1?"rts":t}function pbe(e){if(e.plugins){if(e.plugins.flv)return e.plugins.flv;if(e.plugins.hls)return e.plugins.hls;if(e.plugins.rts)return e.plugins.rts;if(e.plugins.rtm)return e.plugins.rtm}return null}var vbe={1:"MEDIA_ERR_ABORTED",2:"MEDIA_ERR_NETWORK",3:"MEDIA_ERR_DECODE",4:"MEDIA_ERR_SRC_NOT_SUPPORTED"},gbe=function(){function e(e){var t=e.Tea;if(!t)throw new Error("lack Tea option");t.event?this.Tea=t.event.bind(t):this.Tea=t,this.logOptions=e,this._player=e.player}tbe(e,[{key:"videoSize",get:function(){return this._player&&this._player.video?{width:this._player.video.videoWidth,height:this._player.video.videoHeight}:{width:0,height:0}}}]);var t=e.prototype;return t.push=function(e){var t=this._player.config.url;this._player.video&&(e.play_current_time=this._player.currentTime),this.core&&this.core.loader&&this.core.loader.finnalUrl?e.cdn_play_url=this.core.loader.finnalUrl:e.cdn_play_url=t&&yG(t).call(t,"//")?window.location.protocol+t:t,e.live_stream_session_id=function(e,t,n){var i=new f_e(e.split("?")[1]);return i.get(t)||i.get(n)}(e.cdn_play_url,"_session_id","session_id"),e.play_format=fbe(e.cdn_play_url),e.timestamp=dbe();var n=function(){var e={cpu_core_number:-1,memory_usage:-1,network_downlink:-1};try{e.cpu_core_number=navigator.hardwareConcurrency||-1,e.memory_usage=navigator.deviceMemory||-1,e.network_downlink=navigator.connection&&navigator.connection.downlink,null==e.network_downlink&&(e.network_downlink=-1)}catch(tSe){}return e}(),i=n.cpu_core_number,r=n.memory_usage,o=n.network_downlink;e.cpu_core_number=i,e.memory_usage=r,e.network_downlink=o,VS(e,rbe({},this.videoSize)),this.send(e)},t.send=function(e){e.event_key&&(this.logOptions.onReport&&this.logOptions.onReport(e.event_key,e),this.Tea(e.event_key,rbe({},e)))},e}(),ybe=function(){return void 0!==navigator.onLine?navigator.onLine?(e=navigator.connection)&&(e.effectiveType||e.type)||hbe.device:"none":"unknown";var e},mbe=["play","playing","pause","ended","error","seeking","seeked","timeupdate","waiting","canplay","canplaythrough","durationchange","ratechange","volumechange","loadeddata"],_be=function(){function e(e){var t;this.options=e,this.logger=new bbe(e),this.restart=this.restart.bind(this),this.bindUrlChange(),F_(t=hbe.browser).call(t,"Chrome")}var t=e.prototype;return t.restart=function(e){this.destroy("string"!=typeof e&&Boolean(e)),this.logger=new bbe(this.options),this.bindUrlChange(),this.logger.reportStartPlay(),this.logger.handlePlayerComlete()},t.bindUrlChange=function(){this.options&&this.options.player&&!this.options.manual_restart&&this.options.player.on("urlchange",this.restart)},t.setNTP=function(e){this.logger.setNTP(e)},t.updateExt=function(e){this.options.ext=VS(this.options.ext||{},e),this.logger&&this.logger.updateExt(e)},t.destroy=function(e){this.logger.destroy(e),this.logger=null,this.options&&this.options.player&&!this.options.manual_restart&&this.options.player.off("urlchange",this.restart)},e}(),bbe=function(){function e(e){if(!e.player)throw new Error("option player is necessary");this.options=VS({},e,function(e){return{device_id:e.device_id||cbe(),user_id:e.user_id||ube(),error_report_stop:!!e.error_report_stop,project_key:e.project_key||"live",product_line:e.product_line||"live",onReport:e.onReport||function(){}}}(e)),this._player=this.options.player,this._url=this._player.config.url,this.project_key=e.project_key||"live",this.product_line=e.product_line||"live",this.ntpDelta=this.options.ntp?Date.now()-this.options.ntp:0,this.inWaitingStart=0,this.errorNumber=0,this.tempDroppedFrameCount=0,this.tempTotalFrameCount=0,this._logmanager=new gbe(this.options),this.init(),this.started=!1,this.destroyed=!1,this.completed=!1,this.firstFrameViewed=!1,this.cacheRtcStats={}}tbe(e,[{key:"videoSize",get:function(){return this.player?{width:this.player.video.videoWidth,height:this.player.video.videoHeight}:{width:0,height:0}}},{key:"player",get:function(){return this._player}},{key:"logmanager",get:function(){return this._logmanager}},{key:"ntpTime",get:function(){return Date.now()-this.ntpDelta}}]);var t=e.prototype;return t.setNTP=function(e){this.options&&(this.options.ntp=e,this.ntpDelta=Date.now()-this.options.ntp)},t.init=function(){this.bindCtx(),this.initLog(),this.initEvt()},t.bindCtx=function(){this.handlePlayerComlete=this.handlePlayerComlete.bind(this),this.handlePlayerPlaying=this.handlePlayerPlaying.bind(this),this.destroyFunc=this.destroyFunc.bind(this),this.handleUserLeave=this.handleUserLeave.bind(this),this.handlePlayerError=this.handlePlayerError.bind(this),this.handlePlayerReady=this.handlePlayerReady.bind(this),this.handlePlayerWaiting=this.handlePlayerWaiting.bind(this),this.handleAVUnsync=this.handleAVUnsync.bind(this),this.handlePlayerPause=this.handlePlayerPause.bind(this),this.handleTTFB=this.handleTTFB.bind(this),this.handleUrlChange=this.handleUrlChange.bind(this),this.handleKeyframe=this.handleKeyframe.bind(this),this.handleSourceOpen=this.handleSourceOpen.bind(this),this.handleBufferAppend=this.handleBufferAppend.bind(this),this.handleCoreEvent=this.handleCoreEvent.bind(this),this.handleDegrade=this.handleDegrade.bind(this)},t.initLog=function(){var e=this,t=this.options,n=t.player,i=void 0!==n.hlsOps;this.commonParams=rbe({os:hbe.operation_os},function(e){var t,n=e.player,i=n.config.mediaType;return rbe({project_key:e.project_key,live_sdk_version:pbe(n)||n.hlsOps?"2":"-1",player_sdk_version:n.version,logger_version:"1.1.0-alpha.8",report_version:"5",product_line:e.product_line,user_id:e.user_id,device_id:e.device_id,logger_id:lbe(12),app_name:e.app_name,cdn_ip:e.cdn_ip,is_wasm:+(!!i&&"video"!==i),review_is_live:n.config.isLive?2:1,aid:e.aid,live_id:e.live_id||e.aid+"-"+e.user_id+"-"+Date.now(),is_preview:e.is_preview?1:0,codec_type:e.codec_type||"h264",width:Math.floor(n.config.width),height:Math.floor(n.config.height),browser:hbe.browser,ua:navigator.userAgent,href:window.location.href,timestamp:0,fps:-1,logger_init_time:Date.now(),play_current_time:0,cdn_play_url:n.config.url&&yG(t=n.config.url).call(t,"//")?window.location.protocol+n.config.url:n.config.url,play_format:fbe(n.config.url),codec_support:-1},e.ext)}(t)),this.log=VS({},{start_play:{start_play_time:0,event_key:"start_play"},first_frame:{start:0,first_frame_view:0,event_key:"first_frame",first_sei_delay:0,ntp_sync:0,ntp_delta:0,ttfb:-1,ttdb:-1,ttfb_end:0},first_frame_failed:{code:void 0,msg:"",event_key:"first_frame_failed"},stall_start:{ready_state:-1,stall_start_time:0,event_key:"stall_start"},stalling:{event_key:"stalling"},stall:{reason:0,stall_start:0,stall_end:0,ready_state:0,event_key:"stall"},play_stop:{code:0,stop_time:0,drop_percent:0,is_stream_received:0,stall_count:0,stall_time:0,retry_count:0,duration:0,stall_count_per_100sec:0,stall_time_per_100sec:0,event_key:"play_stop",dns_parse_time:-1,redirect:-1,ttfb:-1,buffered:[],is_firstframe_received:0,meta:null},playing:{index:0,stall_count:0,stall_time:0,play_time:1e4,retry_count:0,is_last:0,video_buffer_time:0,audio_buffer_time:0,speed_switch_count:0,speed_switch_info:"none",download_speed:0,decode_fps:0,render_fps:0,drop_count:0,drop_percent:0,sei_source:"",sei_delay:0,ntp_sync:0,ntp_delta:0,event_key:"playing",stop_time:0,duration:0,stall_count_per_100sec:0,stall_time_per_100sec:0},play_error:{code:void 0,info:"",event_key:"play_error"},play_low_decode:{fps:-1,decode_fps:-1,bitrate:-1,url:-1,msg:"",event_key:"play_low_decode"},play_av_unsync:{aDts:-1,vDts:-1,frameLength:-1,currentTime:-1,duration:0,event_key:"play_av_unsync"},play_loadstream:{loadstream_url:"",event_key:"play_loadstream"},play_stream_loaded:{event_key:"play_stream_loaded"},play_metadata_loaded:{metadata_type:"",event_key:"play_metadata_loaded"},stream_exception:{event_key:"stream_exception"},pause:{event_key:"pause"},play_url_change:{event_key:"play_url_change"},source_opened:{event_key:"source_opened"},source_updateend:{event_key:"source_updateend"},play_result:{event_key:"play_result",result:0,threshold:15e3,is_threshold:0},degrade:{event_key:"degrade",payload:{}},rtcstatechange:{event_key:"rtcstatechange"}});var r=this;for(var o in this.log){var a=function(t){Object.defineProperty(e.log[o],t,{get:function(){return null==this["_"+t]?r.commonParams[t]:this["_"+t]},set:function(e){this["_"+t]=e},enumerable:!0})};for(var s in this.commonParams)a(s);i&&Object.defineProperty(this.log[o],"m3u8",{get:function(){if(n.__core__){var e=n.__core__.m3u8Text;return e?Sx(e).call(e,0,25e4):""}return""},enumerable:!0}),Object.defineProperty(this.log[o],"volume",{get:function(){if(n&&n.video)return n.volume||0},enumerable:!0}),Object.defineProperty(this.log[o],"access",{get:function(){return ybe()},enumerable:!0})}},t.updateExt=function(e){for(var t in this.log)for(var n in e)this.log[t][n]=e[n]},t.reportStartPlay=function(){this.started||(this.core=pbe(this.player),this.core&&(this.commonParams.live_sdk_version="2",this.logmanager.core=this.core),this.started=!0,this.log.start_play.start_play_time=this.log.start_play.timestamp=dbe(),this.logmanager.push(this.log.start_play,!0))},t.initWindowListener=function(){"pc"===hbe.device?window.addEventListener("beforeunload",this.handleUserLeave):"mobile"===hbe.device&&(window.addEventListener("beforeunload",this.handleUserLeave),window.addEventListener("pagehide",this.handleUserLeave))},t.removeWindowListener=function(){"pc"===hbe.device?window.removeEventListener("beforeunload",this.handleUserLeave):"mobile"===hbe.device&&(window.removeEventListener("beforeunload",this.handleUserLeave),window.removeEventListener("pagehide",this.handleUserLeave))},t.initEvt=function(){var e=this,t=this.player;mbe.forEach((function(t){e["handleVideo"+t+"Evt"]=function(){e["handleVideo"+t]&&e["handleVideo"+t]()},e.initWindowListener(),e.bindVideoEvt(t,e["handleVideo"+t+"Evt"])})),t.once("error",this.handlePlayerError),t.once("complete",this.handlePlayerComlete),t.once("playing",this.handlePlayerPlaying),t.once("timeupdate",this.handlePlayerPlaying),t.once("destroy",this.destroyFunc),t.on("ready",this.handlePlayerReady),t.on("waiting",this.handlePlayerWaiting),t.on("pause",this.handlePlayerPause),t.on("urlchange",this.handleUrlChange),t.once("sourceopen",this.handleSourceOpen),t.once("bufferappend",this.handleBufferAppend),t.on("core_event",this.handleCoreEvent),t.on("degrade",this.handleDegrade),this.hiJackPlayerStart()},t.handleCoreEvent=function(e){var t=e.eventName,n=e.headers,i=e.pts,r=e.type,o=e.meta,a=e.sei,s=e.decodeFps,l=e.url,c=e.state;switch(t){case"core.ttfb":this.handleTTFB(e);break;case"core.loadresponseheaders":var u=n.get("X-Server-Ip");void 0!==this.player.hlsOps&&(this.log.play_stop.review_ts_count+=1),u&&(this.commonParams.cdn_ip=u);break;case"core.loadretry":this.log.play_stop.retry_count++;break;case"core.keyframe":this.handleKeyframe(i);break;case"core.metadataparsed":this.handleMetaDataLoaded(r,o);break;case"core.sei":this.handleSEIParsed(a);break;case"core.lowdecode":this.commonParams.is_wasm&&(VS(this.log.play_low_decode,e||{}),this.log.play_low_decode.decode_fps=s,this.log.play_low_decode.timestamp=dbe(),this.logmanager.push(this.log.play_low_decode,!0),this.commonParams.is_wasm=0);break;case"core.largeavgap":this.handleAVUnsync(e);break;case"core.loadstart":this.handlePlayerLoadStream(e),this.reportStartPlay();break;case"core.loadcomplete":this.handlePlayerLoadedStream(e);break;case"core.streamexception":this.handleStreamException(e);break;case"core.rtcstatechange":this.logmanager.push(VS({url:l,state:c},this.log.rtcstatechange))}},t.handleDegrade=function(e){this.log.degrade.payload=e,this.logmanager.push(this.log.degrade,!0)},t.hiJackPlayerStart=function(){var e=arguments,t=this;this.player._start=this.player.start;var n=this.player;n.start=function(){try{if(n._start)return n._start.apply(n,Sx(Array.prototype).call(e,0))}catch(cK){}t.destroyed||t.handlePlayerComlete()}},t.handleTTFB=function(e){var t=e||{},n=t.end,i=t.elapsed;this.log.first_frame.ttfb=i||-1,this.log.first_frame.ttfb_end=n||0},t.handleUrlChange=function(e){this.logmanager.push(VS(this.log.play_url_change,{url:e,timestamp:dbe()}))},t.handleKeyframe=function(e){this.log.play_stop.is_firstframe_received=1,this.log.play_stop.firstframe_pts=e},t.handleSourceOpen=function(){this.log.source_opened.timestamp=dbe(),this.logmanager.push(this.log.source_opened)},t.handleBufferAppend=function(){this.log.source_updateend.timestamp=dbe(),this.logmanager.push(this.log.source_updateend)},t.handlePlayerPause=function(){this.log.pause.timestamp=dbe(),this.logmanager.push(this.log.pause,!0),this.stallEnd()},t.handlePlayerError=function(e){this.errorNumber=1;var t=e.errorType,n=e.errorCode;VS(this.log.play_error,rbe({timestamp:dbe(),code:e.httpCode||n||("parse"===t?31:21),info:e.message,detail:Hj(e)},this.videoSize)),this.logmanager.push(this.log.play_error,!0),this.destroyed||(0===this.log.first_frame.first_frame_view&&(VS(this.log.first_frame_failed,{code:n||("parse"===t?31:21),msg:e.message}),void 0!==this.log.first_frame_failed.timestamp&&(this.log.first_frame_failed.timestamp=dbe()),this.logmanager.push(this.log.first_frame_failed,!0),this.log.play_result.is_threshold||(this.clearPlayResultTimer(),this.log.play_result.reason=e.message||"first frame failed",this.log.play_result.code=this.log.play_error.code,this.logmanager.push(this.log.play_result,!0))),this.options.error_report_stop?this.handleUserLeave():this.updatePlayStopParams())},t.handlePlayerLoadStream=function(e){var t=e.url,n=e.offersdp,i=e.sessionId;if("string"==typeof t){var r=this.log.play_loadstream;r.timestamp=dbe(),r.loadstream_url=t,r.offersdp=n,r.sessionId=i,this.logmanager.push(r)}},t.handlePlayerLoadedStream=function(e){var t=this.log.play_stream_loaded;t.timestamp=dbe(),VS(t,e),this.logmanager.push(t)},t.handleSEIParsed=function(e){var t=this.log,n=t.playing,i=t.first_frame;if(100===e.code){var r=function(e){var t,n,i,r,o,a;for(t="",i=e.length,n=0;n<i;)switch((r=e[n++])>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:t+=String.fromCharCode(r);break;case 12:case 13:o=e[n++],t+=String.fromCharCode((31&r)<<6|63&o);break;case 14:o=e[n++],a=e[n++],t+=String.fromCharCode((15&r)<<12|(63&o)<<6|(63&a)<<0)}return t}(e.content);r=Sx(r).call(r,qP(r).call(r,"{"),j_e(r).call(r,"}")+1);try{var o=JSON.parse(r),a=this.getPlayerBuffer()+this.ntpTime-o.ts;n.sei_delay=a,n.sei_source=o.source,n.ntp_sync=this.options.ntp?1:0,n.ntp_delta=this.ntp_delta,i.first_sei_delay=a,i.ntp_sync=this.options.ntp?1:0,i.ntp_delta=this.ntp_delta}catch(cK){}}},t.handleMetaDataLoaded=function(e,t){var n;this.log.play_stop.meta=this.log.play_stop.meta||{},e&&(this.log.play_stop.meta[e]=t),this.log.play_metadata_loaded.timestamp=dbe(),this.log.play_metadata_loaded.metadata_type=e,t&&(this.log.play_metadata_loaded.meta=t,this.log.play_metadata_loaded.codec=t.codec,"video"===e&&(this.commonParams.codec_type=t.codec,this.commonParams.codec_support=(n=t.codec,"undefined"!=typeof MediaSource?+MediaSource.isTypeSupported("video/mp4; codecs="+n):0))),t||(this.log.play_metadata_loaded.meta=void 0,this.log.play_metadata_loaded.codec=void 0,"video"===e&&(this.commonParams.codec_type="unknown")),this.logmanager.push(this.log.play_metadata_loaded)},t.handleAVUnsync=function(e){VS(this.log.play_av_unsync,e||{}),this.log.play_av_unsync.timestamp=dbe(),this.logmanager.push(this.log.play_av_unsync,!1)},t.handleStreamException=function(e){this.logmanager.push(VS({},this.log.stream_exception,e))},t.handlePlayerComlete=function(){this.completed||(this.completed=!0,this.core=pbe(this.player),this.core&&(this.commonParams.live_sdk_version="2",this.logmanager.core=this.core),(this.player.config.autoplay||this.player.config.videoInit)&&this.reportStartPlay())},t.getPlayerBuffer=function(){var e=this.player.video.buffered;if(e){var t=Math.max(0,e.length-1);try{var n=x_e(1e3*(e.end(t)-this.player.video.currentTime));return this.log.playing.audio_buffer_time=this.log.playing.video_buffer_time=n,n}catch(cK){return 0}}},t.getPlayerDownloadSpeed=function(){if(this.core&&this.core.core&&"function"==typeof this.core.core.speedInfo)return this.core.core.speedInfo().speed},t.getPlayerQuality=function(){var e=this.player.video;if(e.getVideoPlaybackQuality){var t=e.getVideoPlaybackQuality();this.log.playing.drop_count=t.droppedVideoFrames-this.tempDroppedFrameCount,this.log.playing.drop_percent=J_e(this.tempTotalFrameCount/t.totalVideoFrames).toFixed(1),this.log.play_stop.drop_percent=J_e(t.droppedVideoFrames/t.totalVideoFrames).toFixed(1),this.tempDroppedFrameCount=t.droppedVideoFrames,this.tempTotalFrameCount=t.totalVideoFrames}},t.getRtcStats=function(e,t){try{var n=this,i=n.player.plugins.rts||n.player.plugins.rtm,r=i&&i.pc,o={};return r?rb.resolve(r.getStats()).then((function(t){return t.forEach((function(t){var i=t.type,r=t.mediaType,a=t.bytesReceived,s=t.packetsReceived,l=t.audioLevel,c=t.concealmentEvents,u=t.remoteTimestamp,h=t.timestamp,d=t.framesDropped,f=t.keyFramesDecoded,p=t.totalDecodeTime,v=t.framesDecoded,g=t.frameHeight,y=t.frameWidth,m=t.framesReceived,_=t.jitterBufferDelay,b=t.jitterBufferEmittedCount,k=t.jitter,E=t.nackCount,w=t.packetsLost,S=t.pliCount,T=t.totalSamplesReceived,C=t.concealedSamples,x=t.currentRoundTripTime,D=t.decoderImplementation,I=t.mimeType,R=t.freezeCount,L=t.totalFreezesDuration,P=t.totalPausesDuration;switch(i){case"inbound-rtp":"audio"===r?(o.audio_bytes_received=a-(n.cacheRtcStats.audioBytesReceived||0),n.cacheRtcStats.audioBytesReceived=a,o.audio_packets_lost=w-(n.cacheRtcStats.audioPacketsLost||0),o.audio_packets_received=s-(n.cacheRtcStats.audioPacketsReceived||0),n.cacheRtcStats.audioPacketsLost=w,n.cacheRtcStats.audioPacketsReceived=s,o.audio_level=l,o.concealment_event=c,o.audio_fraction_lost=o.audio_packets_lost/o.audio_packets_received,void 0!==n.cacheRtcStats.totalSamplesReceived&&(o.audio_rec_sample_rate=(T-n.cacheRtcStats.totalSamplesReceived)/e),n.cacheRtcStats.totalSamplesReceived=T,o.concealed_samples=C,o.total_samples_received=T):(o.frames_dropped=d,o.iframes_decoded=f,o.video_bytes_received=a-(n.cacheRtcStats.videoBytesReceived||0),n.cacheRtcStats.videoBytesReceived=a,o.video_dec_time=p,o.video_decoded_delay_ms=o.video_dec_elapse/v,o.video_frame_height=g,o.video_frame_width=y,void 0!==n.cacheRtcStats.framesDecoded&&(o.video_decode_framerate=(v-n.cacheRtcStats.framesDecoded)/e),n.cacheRtcStats.framesDecoded=v,void 0!==n.cacheRtcStats.framesReceived&&(o.video_recv_framerate=(m-n.cacheRtcStats.framesReceived)/e),void 0!==n.cacheRtcStats.freezeCount&&(o.freeze_count=R-n.cacheRtcStats.freezeCount,o.freeze_duration=L-n.cacheRtcStats.totalFreezesDuration),n.cacheRtcStats.freezeCount=R,n.cacheRtcStats.totalFreezesDuration=L,n.cacheRtcStats.framesReceived=m,o.total_pauses_duration=P,o.video_jb_delay=_/b*1e3,o.video_jitter=1e3*k,o.video_nack_count=E,o.video_packets_lost=w-(n.cacheRtcStats.videoPacketsLost||0),o.video_packets_received=s-(n.cacheRtcStats.videoPacketsReceived||0),o.video_fraction_lost=o.video_packets_lost/o.video_packets_received,n.cacheRtcStats.videoPacketsLost=w,n.cacheRtcStats.videoPacketsReceived=s,o.video_pli_count=S,o.decoder_name=D);break;case"remote-outbound-rtp":o.e2e_delay_ms=h-u;break;case"track":void 0!==y&&(o.video_frame_width=y,o.video_frame_height=g);break;case"candidate-pair":o.rtt=1e3*x;break;case"codec":F_(I).call(I,"video")?o.video_codec=I:o.audio_codec=r}o.total_delay=o.e2e_delay_ms+(o.video_decoded_delay_ms||0)+(o.video_jb_delay||0)})),VS(n.log.playing,{video_download_size:o.video_bytes_received,decode_fps:o.video_decode_framerate,sei_delay:o.total_delay,sei_network_delay:o.e2e_delay_ms,width:o.video_frame_width,height:o.video_frame_height,current_speed:(o.audio_bytes_received+o.video_bytes_received)/e}),o})):rb.resolve(o)}catch(cK){return rb.reject(cK)}},t.reportPlaying=function(e){try{var t=this;t.commonParams.is_wasm&&(t.commonParams.fps=t.player.video.fps,t.log.playing.render_fps=t.player.video.fps,t.log.playing.decode_fps=t.player.video.decodeFps),t.log.playing.index++;var n,i=t.log.playing.timestamp;t.inWaitingStart&&t.inWaitingStart<dbe()&&(n=Math.min(t.options.playingInterval||t.log.playing.play_time,dbe()-Math.max(t.inWaitingStart,i))),t.getPlayerQuality(),t.getPlayerBuffer(),t.options.downloadSpeedInterval||(t.log.playing.current_speed=t.getPlayerDownloadSpeed());var r=dbe(),o=r-i,a=(n>200?n:0)+t.log.playing.stall_time,s=(n>200?1:0)+t.log.playing.stall_count;return t.options.aggregationDowngradeStallTime&&(t.log.playing.aggregation_downgrade_stall=(n>t.options.aggregationDowngradeStallTime?n:0)+(t.log.playing.aggregation_downgrade_stall||0)),VS(t.log.playing,rbe({timestamp:r,stop_time:r,duration:e?0:o/1e3,stall_time_per_100sec:a/o*100,stall_count_per_100sec:1e3*s/o*100,stall_count:s,stall_time:a,play_current_time:t.player.currentTime},t.videoSize)),rb.resolve(t.getRtcStats(o,e)).then((function(n){t.logmanager.push(VS({},t.log.playing,rbe({play_time:e?0:o},n)),!0),t.log.playing.download_speed_array=[],t.log.playing.stall_time=0,t.log.playing.stall_count=0,t.options.aggregationDowngradeStallTime&&(t.log.playing.aggregation_downgrade_stall=0)}))}catch(cK){return rb.reject(cK)}},t.handlePlayerPlaying=function(){try{var e=this;if(e.player&&e.player.video.readyState<3)return rb.resolve();if(e.player.off("playing",e.handlePlayerPlaying),e.player.off("timeupdate",e.handlePlayerPlaying),e.core){var t=(e.core.getStats()||{}).fps;e.commonParams.fps=t}return rb.resolve(e.reportPlaying(!0)).then((function(){e.clearPlayingInterval();var t=e.options.playingInterval||e.log.playing.play_time;e.intervalId=setInterval((function(){try{var n=function(){if(Math.abs(Date.now()-e.log.playing.timestamp-t)<100||Date.now()-e.log.playing.timestamp>=t){var n=function(){if(e.player&&e.player.video){var t=function(){if(!e.player.paused)return rb.resolve(e.reportPlaying()).then((function(){}));e.handleVideopause()}();if(t&&t.then)return t.then((function(){}))}else e.destroyFunc()}();if(n&&n.then)return n.then((function(){}))}}();return rb.resolve(n&&n.then?n.then((function(){})):void 0)}catch(cK){return rb.reject(cK)}}),1e3),e.clearStallTimer(),e.handleVideoplaying(),e.started||e.reportStartPlay(),e.saveBuffered()}))}catch(cK){return rb.reject(cK)}},t.handlePlayerReady=function(){var e=this;this.log.start_play.start_play_time=dbe(),this.player.config.autoplay&&this.reportStartPlay(),this.options.playResultThreshold&&(this.log.play_result.threshold=this.options.playResultThreshold),this.clearPlayResultTimer(),this.log.play_result.start=dbe(),this.playResultTimer=setTimeout((function(){e.log.play_result.timestamp>=e.log.play_result.start||(e.log.play_result.is_threshold=1,e.logmanager.push(e.log.play_result,!0))}),this.log.play_result.threshold)},t.handlePlayerWaiting=function(){var e=this;!this.inWaitingStart&&this.log.first_frame.timestamp&&(this.log.stall.timestamp=this.inWaitingStart=this.log.stall.stall_start=dbe(),this.log.stall_start.ready_state=this.log.stall.ready_state=this.player.video.readyState,this.log.stall_start.timestamp=dbe(),this.log.stall_start.stall_start_time=dbe(),this.log.stall_start.video_buffer_time=this.player.video.readyState,this.log.stall_start.play_current_time=this.player.currentTime,this.log.stall.play_current_time=this.player.currentTime,this.log.stall_start.buffered=this.getBuffered(),this.log.stall.buffered=this.log.stall_start.buffered,this.log.stall.current_speed=this.getPlayerDownloadSpeed(),VS(this.log.stall_start,this.videoSize),this.clearStallTimer(),this.stallStartTimer=setTimeout((function(){e.logmanager.push(e.log.stall_start,!0)}),205))},t.handleVideoseeking=function(){this.player&&this.player.video&&this.inWaitingStart&&this.player.video.duration<1/0&&(this.inWaitingStart=0,this.clearStallTimer())},t.handleVideoseeked=function(){this.player&&this.player.video&&this.inWaitingStart&&this.player.video.duration<1/0&&(this.inWaitingStart=0,this.log.play_stop.stall_count>0&&this.log.play_stop.stall_count--)},t.handleVideoplay=function(){this.reportStartPlay(),this.removeVideoEvt("play",this.handleVideoplay)},t.handleVideotimeupdate=function(){Math.abs(this.player.currentTime-this.log.stall_start.play_current_time)>.2&&this.stallEnd(),this.saveBuffered()},t.handleVideocanplay=function(){this.stallEnd(),this.reportFirstframe()},t.handleVideoplaying=function(){this.stallEnd(),this.log.play_stop.is_stream_received=1;var e=dbe();this.reportStartPlay(),this.log.first_frame.start=e},t.stallEnd=function(){this.clearStallTimer();var e=dbe();if(this.inWaitingStart){var t=e-this.inWaitingStart;t>200&&(this.log.play_stop.stall_count++,this.log.play_stop.stall_time+=e-this.inWaitingStart,this.log.playing.stall_time+=e-Math.max(this.inWaitingStart,this.log.playing.timestamp),this.log.stall.stall_end=e,this.log.stall.timestamp=dbe(),this.log.playing.stall_count++,VS(this.log.stall,rbe({},this.videoSize)),this.logmanager.push(this.log.stall,!0)),this.options.aggregationDowngradeStallTime&&t>this.options.aggregationDowngradeStallTime&&(this.log.playing.aggregation_downgrade_stall=(this.log.playing.aggregation_downgrade_stall||0)+(e-Math.max(this.inWaitingStart,this.log.playing.timestamp)))}this.inWaitingStart=0},t.handleVideoloadeddata=function(){this.reportFirstframe()},t.handleVideoratechange=function(){this.log.playing.speed_switch_count++,this.log.playing.speed_switch_info=this.player.video.playbackRate},t.handleVideoended=function(){this.clearPlayingInterval(),this.clearStallTimer(),VS(this.log.playing,rbe({timestamp:dbe(),is_last:1},this.videoSize)),this.logmanager.push(this.log.playing)},t.handleVideoerror=function(){var e=this;this.errorNumber=1;var t=this.player.video.error;VS(this.log.play_error,rbe(rbe({timestamp:dbe()},this.videoSize),t&&{code:t.code,info:t.message})),this.logmanager.push(this.log.play_error,!0),0!==e.log.first_frame.first_frame_view||e.log.first_frame_failed.code||t&&(e.log.first_frame_failed.code=t.code,e.log.first_frame_failed.msg=vbe[t.code],void 0!==e.log.first_frame_failed.timestamp&&(e.log.first_frame_failed.timestamp=dbe()),e.logmanager.push(e.log.first_frame_failed,!0),e.log.play_result.is_threshold||(e.log.play_result.reason=vbe[t.code]||"first frame failed",e.log.play_result.code=t.code,e.clearPlayResultTimer(),e.logmanager.push(e.log.play_result,!0))),e.options.error_report_stop?e.handleUserLeave():e.updatePlayStopParams()},t.handleVideopause=function(){this.stallEnd(),this.clearPlayingInterval(),this.clearStallTimer(),clearTimeout(this.collectDownloadSpeedTimer),this.player.once("playing",this.handlePlayerPlaying),this.player.once("timeupdate",this.handlePlayerPlaying)},t.destroyFunc=function(e){var t=this;this.destroyed||(e||this.handleUserLeave(),this.destroyed=!0,"pc"===hbe.device?window.removeEventListener("beforeunload",this.handleUserLeave):"mobile"===hbe.device&&window.removeEventListener("pagehide",this.handleUserLeave),mbe.forEach((function(e){t.removeVideoEvt(e,t["handleVideo"+e+"Evt"])})),this.player&&(this.player._start&&(this.player.start=this.player._start,delete this.player._start),this.player.off("destroy",this.destroyFunc),this.player.off("complete",this.handlePlayerComlete),this.player.off("playing",this.handlePlayerPlaying),this.player.off("timeupdate",this.handlePlayerPlaying),this.player.off("ready",this.handlePlayerReady),this.player.off("waiting",this.handlePlayerWaiting),this.player.off("largeavgap",this.handleAVUnsync),this.player.off("error",this.handlePlayerError),this.player.off("SEI_PARSED",this.handleSEIParsed),this.player.off("pause",this.handlePlayerPause),this.player.off("ttfb",this.handleTTFB),this.player.off("urlchange",this.handleUrlChange),this.player.off("isKeyframe",this.handleKeyframe),this.player.off("sourceopen",this.handleSourceOpen),this.player.off("bufferappend",this.handleBufferAppend),this.player.off("core_event",this.handleCoreEvent),this.player.off("degrade",this.handleDegrade),this._player=null),this.clearPlayingInterval(),this.clearStallTimer(),this.clearPlayResultTimer(),clearTimeout(this.collectDownloadSpeedTimer))},t.handleUserLeave=function(){!this.destroyed&&this.started&&(this.destroyed=!0,this.updatePlayStopParams(),this.reportPlayStop(),this.clearPlayingInterval(),this.clearStallTimer(),clearTimeout(this.collectDownloadSpeedTimer),this.removeWindowListener())},t.saveBuffered=function(){try{var e=this.getBuffered();e&&e.length&&(this.log.play_stop.buffered=e)}catch(tSe){}},t.getBuffered=function(){try{for(var e=[],t=this.player.video,n=0;n<t.buffered.length;n++)e.push([t.buffered.start(n),t.buffered.end(n)]);return e}catch(tSe){}},t.reportPlayStop=function(){this.player&&(this.log.play_stop.play_current_time=this.player.currentTime||this.log.playing.play_current_time,this.saveBuffered()),this.logmanager.push(this.log.play_stop,!0)},t.reportFirstframe=function(){if(!this.firstFrameViewed){if(this.core){var e=(this.core.getStats()||{}).fps;this.commonParams.fps=e}this.firstFrameViewed=!0;var t=dbe();VS(this.log.first_frame,rbe({first_frame_view:t-this.log.start_play.start_play_time||t,timestamp:t},this.videoSize)),this.log.first_frame.ttfb_end&&(this.log.first_frame.ttdb=t-this.log.first_frame.ttfb_end),this.logmanager.push(this.log.first_frame,!0),this.clearPlayResultTimer(),this.log.play_result.result=1,this.logmanager.push(this.log.play_result,!0),this.log.play_stop.is_stream_received=1}},t.updatePlayStopParams=function(){var e=function(e){var t,n=ib(t=performance.getEntriesByType("resource")).call(t,(function(t){return t.name===e}));if(n.length){var i=n[0],r=n[n.length-1];return{dns_parse_time:x_e(i.domainLookupEnd-i.domainLookupStart),redirect:x_e(i.redirectEnd-i.redirectStart),ttfb:x_e(r.responseStart-r.requestStart)}}return{dns_parse_time:-1,redirect:-1,ttfb:-1}}(this._url),t=dbe();this.playedTime=t-this.log.start_play.start_play_time;var n=this.log.play_stop;VS(n,rbe({},0===n.stall_count&&{stall_time:0})),this.inWaitingStart&&t-this.inWaitingStart>200&&(n.stall_time+=t-this.inWaitingStart),this.inWaitingStart=0,VS(n,rbe({stall_time_per_100sec:n.stall_time/this.playedTime*100,stall_count_per_100sec:1e3*n.stall_count/this.playedTime*100},e)),0===this.log.play_stop.stall_count_per_100sec&&(this.log.play_stop.stall_time_per_100sec=0),this.log.play_stop.stall_time_per_100sec>100||this.log.play_stop.stall_time_per_100sec<0||(this.log.playing.index?(VS(this.log.playing,rbe({timestamp:dbe(),is_last:1},this.videoSize)),this.logmanager.push(this.log.playing,!0)):(this.log.play_stop.error_code=this.log.play_error.code,this.log.play_stop.error_info=this.log.play_error.info),t=dbe(),VS(n,rbe({timestamp:t,stop_time:t,duration:this.playedTime/1e3,play_time:this.playedTime/1e3},this.videoSize)),0===this.errorNumber&&(n.play_time_on_no_frame=n.stop_time-this.log.start_play.start_play_time))},t.clearPlayingInterval=function(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)},t.clearStallTimer=function(){clearTimeout(this.stallStartTimer)},t.clearPlayResultTimer=function(){clearTimeout(this.playResultTimer)},t.destroy=function(e){this.destroyFunc(!e)},t.bindVideoEvt=function(e,t){this.player&&this.player.video.addEventListener(e,t,!1)},t.removeVideoEvt=function(e,t){this.player&&this.player.video&&this.player.video.removeEventListener(e,t,!1)},t.send=function(e,t){this.logmanager.send(e,t)},e}(),kbe=In,Ebe=Pb,wbe=o,Sbe=ee,Tbe=qb.onFreeze,Cbe=Object.freeze;kbe({target:"Object",stat:!0,forced:wbe((function(){Cbe(1)})),sham:!Ebe},{freeze:function(e){return Cbe&&Sbe(e)?Cbe(Tbe(e)):e}});var xbe,Dbe=t(te.Object.freeze),Ibe=function(){return Ibe=VS||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},Ibe.apply(this,arguments)};function Rbe(e,t){var n="function"==typeof ZP&&eA(e);if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(s){r={error:s}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function Lbe(){for(var e=[],t=0;t<arguments.length;t++)e=y_(e).call(e,Rbe(arguments[t]));return e}var Pbe,Abe,Obe,Mbe,Nbe=function(){function e(){this._hooks={},this._cache=[],this._hooksCache={}}return e.prototype.on=function(e,t){e&&t&&"function"==typeof t&&(this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(t))},e.prototype.once=function(e,t){var n=this;e&&t&&"function"==typeof t&&this.on(e,(function i(r){t(r),n.off(e,i)}))},e.prototype.off=function(e,t){if(e&&this._hooks[e]&&this._hooks[e].length)if(t){var n,i,r=qP(n=this._hooks[e]).call(n,t);-1!==r&&bT(i=this._hooks[e]).call(i,r,1)}else this._hooks[e]=[]},e.prototype.emit=function(e,t,n){if(n){var i;if(!e)return;-1!==qP(i=this._cache).call(i,n)?this._emit(e,t):(this._hooksCache.hasOwnProperty(n)||(this._hooksCache[n]={}),this._hooksCache[n].hasOwnProperty(e)||(this._hooksCache[n][e]=[]),this._hooksCache[n][e].push(t))}else this._emit(e,t)},e.prototype._emit=function(e,t){e&&this._hooks[e]&&this._hooks[e].length&&Lbe(this._hooks[e]).forEach((function(e){try{e(t)}catch(n){}}))},e.prototype.set=function(e){var t;e&&-1===qP(t=this._cache).call(t,e)&&this._cache.push(e)},e}(),zbe=function(e){return null!=e&&"[object Object]"==Object.prototype.toString.call(e)},Ube=(Pbe=+Date.now()+Number(Sx(xbe=""+Math.random()).call(xbe,2,8)),function(){return Pbe+=1}),Bbe=function(e){var t=document.createElement("a");return t.href=e,t},Fbe=function(){function e(e){this.appid=e,this.userAgent=window.navigator.userAgent,this.appVersion=window.navigator.appVersion}return e.prototype.init=function(){var e=window.navigator.userAgent,t=window.navigator.language,n=document.referrer,i=n?Bbe(n).hostname:"";!function(e){var t={};try{var n=Bbe(e).search;(n=Sx(n).call(n,1)).split("&").forEach((function(e){var n,i,r=e.split("=");r.length&&(n=r[0],i=r[1]);try{t[n]=decodeURIComponent(void 0===i?"":i)}catch(o){t[n]=i}}))}catch(i){}}(window.location.href);var r=/Mobile|htc|mini|Android|iP(ad|od|hone)/.test(this.appVersion)?"wap":"web",o=this.browser(),a=this.os();return{browser:o.browser,browser_version:o.browser_version,platform:r,os_name:a.os_name,os_version:a.os_version,userAgent:e,screen_width:window.screen&&window.screen.width,screen_height:window.screen&&window.screen.height,device_model:this.getDeviceModel(a.os_name),language:t,referrer:n,referrer_host:i}},e.prototype.browser=function(){var e,t,n="",i=""+parseFloat(this.appVersion),r=this.userAgent;return-1!==qP(r).call(r,"Edge")||-1!==qP(r).call(r,"Edg")?(n="Microsoft Edge",-1!==qP(r).call(r,"Edge")?(e=qP(r).call(r,"Edge"),i=r.substring(e+5)):(e=qP(r).call(r,"Edg"),i=r.substring(e+4))):-1!==(e=qP(r).call(r,"MSIE"))?(n="Microsoft Internet Explorer",i=r.substring(e+5)):-1!==(e=qP(r).call(r,"Lark"))?(n="Lark",i=r.substring(e+5,e+11)):-1!==(e=qP(r).call(r,"MetaSr"))?(n="sougoubrowser",i=r.substring(e+7,e+10)):-1!==qP(r).call(r,"MQQBrowser")||-1!==qP(r).call(r,"QQBrowser")?(n="qqbrowser",-1!==qP(r).call(r,"MQQBrowser")?(e=qP(r).call(r,"MQQBrowser"),i=r.substring(e+11,e+15)):-1!==qP(r).call(r,"QQBrowser")&&(e=qP(r).call(r,"QQBrowser"),i=r.substring(e+10,e+17))):-1!==qP(r).call(r,"Chrome")?-1!==(e=qP(r).call(r,"MicroMessenger"))?(n="weixin",i=r.substring(e+15,e+20)):-1!==(e=qP(r).call(r,"360"))?(n="360browser",i=r.substring(qP(r).call(r,"Chrome")+7)):-1!==qP(r).call(r,"baidubrowser")||-1!==qP(r).call(r,"BIDUBrowser")?(-1!==qP(r).call(r,"baidubrowser")?(e=qP(r).call(r,"baidubrowser"),i=r.substring(e+13,e+16)):-1!==qP(r).call(r,"BIDUBrowser")&&(e=qP(r).call(r,"BIDUBrowser"),i=r.substring(e+12,e+15)),n="baidubrowser"):-1!==(e=qP(r).call(r,"xiaomi"))?-1!==qP(r).call(r,"openlanguagexiaomi")?(n="openlanguage xiaomi",i=r.substring(e+7,e+13)):(n="xiaomi",i=r.substring(e-7,e-1)):-1!==(e=qP(r).call(r,"TTWebView"))?(n="TTWebView",i=r.substring(e+10,e+23)):(-1!==(e=qP(r).call(r,"Chrome"))||-1!==(e=qP(r).call(r,"Chrome")))&&(n="Chrome",i=r.substring(e+7)):-1!==qP(r).call(r,"Safari")?-1!==(e=qP(r).call(r,"QQ"))?(n="qqbrowser",i=r.substring(e+10,e+16)):-1!==(e=qP(r).call(r,"Safari"))&&(n="Safari",i=r.substring(e+7),-1!==(e=qP(r).call(r,"Version"))&&(i=r.substring(e+8))):-1!==(e=qP(r).call(r,"Firefox"))?(n="Firefox",i=r.substring(e+8)):-1!==(e=qP(r).call(r,"MicroMessenger"))?(n="weixin",i=r.substring(e+15,e+20)):-1!==(e=qP(r).call(r,"QQ"))?(n="qqbrowser",i=r.substring(e+3,e+8)):-1!==(e=qP(r).call(r,"Opera"))&&(n="Opera",i=r.substring(e+6),-1!==(e=qP(r).call(r,"Version"))&&(i=r.substring(e+8))),-1!==(t=qP(i).call(i,";"))&&(i=i.substring(0,t)),-1!==(t=qP(i).call(i," "))&&(i=i.substring(0,t)),-1!==(t=qP(i).call(i,")"))&&(i=i.substring(0,t)),{browser:n,browser_version:i}},e.prototype.os=function(){for(var e="",t="",n=[{s:"Windows 10",r:/(Windows 10.0|Windows NT 10.0|Windows NT 10.1)/},{s:"Windows 8.1",r:/(Windows 8.1|Windows NT 6.3)/},{s:"Windows 8",r:/(Windows 8|Windows NT 6.2)/},{s:"Windows 7",r:/(Windows 7|Windows NT 6.1)/},{s:"Android",r:/Android/},{s:"Sun OS",r:/SunOS/},{s:"Linux",r:/(Linux|X11)/},{s:"iOS",r:/(iPhone|iPad|iPod)/},{s:"Mac OS X",r:/Mac OS X/},{s:"Mac OS",r:/(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/}],i=0;i<n.length;i++){var r=n[i];if(r.r.test(this.userAgent)){"Mac OS X"===(e=r.s)&&this.isNewIpad()&&(e="iOS");break}}var o,a,s=function(e,t){var n=e.exec(t);return n&&n[1]?n[1]:""},l=function(e,t){var n=RegExp("(?:^|[^A-Z0-9-_]|[^A-Z0-9-]_|sprd-)(?:"+e+")","i").exec(t);return n?Sx(n).call(n,1)[0]:""};switch(/Windows/.test(e)&&(t=s(/Windows (.*)/,e),e="windows"),e){case"Mac OS X":t=l("Mac[ +]OS[ +]X(?:[ /](?:Version )?(\\d+(?:[_\\.]\\d+)+))?",this.userAgent),e="mac";break;case"Android":(a=s(/Android ([\.\_\d]+)/,o=this.userAgent))||(a=s(/Android\/([\.\_\d]+)/,o)),t=a,e="android";break;case"iOS":t=this.isNewIpad()?l("Mac[ +]OS[ +]X(?:[ /](?:Version )?(\\d+(?:[_\\.]\\d+)+))?",this.userAgent):(t=/OS (\d+)_(\d+)_?(\d+)?/.exec(this.appVersion))?t[1]+"."+t[2]+"."+(0|t[3]):"",e="ios"}return{os_name:e,os_version:t}},e.prototype.getDeviceModel=function(e){var t="";try{if("android"===e)navigator.userAgent.split(";").forEach((function(e){qP(e).call(e,"Build/")>-1&&(t=Sx(e).call(e,0,qP(e).call(e,"Build/")))}));else if("ios"===e||"mac"===e||"windows"===e)if(this.isNewIpad())t="iPad";else{var n=navigator.userAgent.replace("Mozilla/5.0 (",""),i=qP(n).call(n,";");t=Sx(n).call(n,0,i)}}catch(r){return nO(t).call(t)}return nO(t).call(t)},e.prototype.isNewIpad=function(){return void 0!==this.userAgent&&"MacIntel"===navigator.platform&&"number"==typeof navigator.maxTouchPoints&&navigator.maxTouchPoints>1},e}(),Hbe=(Abe=function(e,t){e.exports=function(){function e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)e[i]=n[i]}return e}return function t(n,i){function r(t,r,o){if("undefined"!=typeof document){"number"==typeof(o=e({},i,o)).expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var s in o)o[s]&&(a+="; "+s,!0!==o[s]&&(a+="="+o[s].split(";")[0]));return document.cookie=t+"="+n.write(r,t)+a}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],i={},r=0;r<t.length;r++){var o=t[r].split("="),a=Sx(o).call(o,1).join("=");try{var s=decodeURIComponent(o[0]);if(i[s]=n.read(a,s),e===s)break}catch(l){}}return e?i[e]:i}},remove:function(t,n){r(t,"",e({},n,{expires:-1}))},withAttributes:function(n){return t(this.converter,e({},this.attributes,n))},withConverter:function(n){return t(e({},this.converter,n),this.attributes)}},{attributes:{value:Dbe(i)},converter:{value:Dbe(n)}})}({read:function(e){return'"'===e[0]&&(e=Sx(e).call(e,1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})}()},Abe(Obe={exports:{}}),Obe.exports),jbe=Hbe,Gbe=function(){function e(){this.cache={}}return e.prototype.setItem=function(e,t){this.cache[e]=t},e.prototype.getItem=function(e){return this.cache[e]},e.prototype.removeItem=function(e){this.cache[e]=void 0},e.prototype.getCookie=function(e){this.getItem(e)},e.prototype.setCookie=function(e,t){this.setItem(e,t)},e}(),Vbe={getItem:function(e){try{var t=localStorage.getItem(e),n=t;try{t&&"string"==typeof t&&(n=JSON.parse(t))}catch(i){}return n||{}}catch(i){}return{}},setItem:function(e,t){try{var n="string"==typeof t?t:Hj(t);localStorage.setItem(e,n)}catch(i){}},removeItem:function(e){try{localStorage.removeItem(e)}catch(t){}},getCookie:function(e,t){try{return jbe.get(e,{domain:t||document.domain})}catch(n){return""}},setCookie:function(e,t,n,i){try{var r=i||document.domain,o=+new Date+n;jbe.set(e,t,{expires:new Date(o),path:"/",domain:r})}catch(a){}},isSupportLS:function(){try{return localStorage.setItem("_ranger-test-key","hi"),localStorage.getItem("_ranger-test-key"),localStorage.removeItem("_ranger-test-key"),!0}catch(cK){return!1}}()},Kbe={getItem:function(e){try{var t=sessionStorage.getItem(e),n=t;try{t&&"string"==typeof t&&(n=JSON.parse(t))}catch(i){}return n||{}}catch(i){}return{}},setItem:function(e,t){try{var n="string"==typeof t?t:Hj(t);sessionStorage.setItem(e,n)}catch(i){}},removeItem:function(e){try{sessionStorage.removeItem(e)}catch(t){}},getCookie:function(e){this.getItem(e)},setCookie:function(e,t){this.setItem(e,t)},isSupportSession:function(){try{return sessionStorage.setItem("_ranger-test-key","hi"),sessionStorage.getItem("_ranger-test-key"),sessionStorage.removeItem("_ranger-test-key"),!0}catch(cK){return!1}}()},Wbe=function(){function e(e,t){this._storage=t&&"session"===t?Kbe:!e&&Vbe.isSupportLS?Vbe:new Gbe}return e.prototype.getItem=function(e){return this._storage.getItem(e)},e.prototype.setItem=function(e,t){this._storage.setItem(e,t)},e.prototype.getCookie=function(e,t){return this._storage.getCookie(e,t)},e.prototype.setCookie=function(e,t,n,i){this._storage.setCookie(e,t,n,i)},e.prototype.removeItem=function(e){this._storage.removeItem(e)},e}(),Ybe={cn:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az24z1mz1jz1az1cz18z1nz1nz1jz1mz1ez4az1az1mz1k",va:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az1gz22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",sg:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k"},qbe=void 0,Xbe=(new Date).getTimezoneOffset(),$be=parseInt(""+-Xbe/60,10),Zbe=60*Xbe,Qbe=function(){function e(e,t){this.is_first_time=!0,this.initConfig=t,this.collect=e;var n=new Fbe(t.app_id).init(),i="__tea_cache_first_"+t.app_id;this.configKey="__tea_cache_config_"+t.app_id,this.sessionStorage=new Wbe(!1,"session"),this.localStorage=new Wbe(!1,"local");var r=this.localStorage.getItem(i);r&&1==r?this.is_first_time=!1:(this.is_first_time=!0,this.localStorage.setItem(i,"1")),this.envInfo={user:{user_unique_id:qbe,user_type:qbe,user_id:qbe,user_is_auth:qbe,user_is_login:qbe,device_id:qbe,web_id:qbe,user_unique_id_type:qbe},header:{app_id:qbe,app_name:qbe,app_install_id:qbe,install_id:qbe,app_package:qbe,app_channel:qbe,app_version:qbe,ab_version:qbe,os_name:n.os_name,os_version:n.os_version,device_model:n.device_model,ab_client:qbe,traffic_type:qbe,client_ip:qbe,device_brand:qbe,os_api:qbe,access:qbe,language:n.language,region:qbe,app_language:qbe,app_region:qbe,creative_id:qbe,ad_id:qbe,campaign_id:qbe,log_type:qbe,rnd:qbe,platform:n.platform,sdk_version:"0.0.3-lite",sdk_lib:"js",province:qbe,city:qbe,timezone:$be,tz_offset:Zbe,tz_name:qbe,sim_region:qbe,carrier:qbe,resolution:n.screen_width+"x"+n.screen_height,browser:n.browser,browser_version:n.browser_version,referrer:n.referrer,referrer_host:n.referrer_host,width:n.screen_width,height:n.screen_height,screen_width:n.screen_width,screen_height:n.screen_height,utm_term:qbe,utm_content:qbe,utm_source:qbe,utm_medium:qbe,utm_campaign:qbe,custom:{},wechat_unionid:qbe,wechat_openid:qbe}},this.evtParams={},this.reportErrorCallback=function(){},this.initDomain()}return e.prototype.initDomain=function(){var e=this.initConfig.channel_domain;if(e)this.domain=e;else{var t=this.initConfig.channel;this.domain=function(e){return function(e,t,n){if("string"==typeof e&&"number"==typeof n){var i,r=[];n=n<=25?n:n%25;var o=String.fromCharCode(n+97);i=e.split(o);for(var a=0;a<i.length;a++){var s=parseInt(i[a],n);s=1*s^64;var l=String.fromCharCode(s);r.push(l)}return r.join("")}}(e,0,25)}(Ybe[t])}},e.prototype.setDomain=function(e){this.domain=e},e.prototype.getDomain=function(){return this.domain},e.prototype.getUrl=function(e){var t="";switch(e){case"event":t=this.initConfig.report_url||"/list";break;case"webid":t="/webid"}return""+this.getDomain()+t},e.prototype.set=function(e){var t=this;kT(e).forEach((function(n){var i;"evtParams"===n?t.evtParams=Ibe({},t.evtParams||{},e.evtParams||{}):"_staging_flag"===n?t.evtParams=Ibe({},t.evtParams||{},{_staging_flag:e._staging_flag}):"reportErrorCallback"===n&&"function"==typeof e[n]?t.reportErrorCallback=e[n]:Object.hasOwnProperty.call(t.envInfo.user,n)?qP(i=["user_id","web_id","user_unique_id"]).call(i,n)>-1&&(t.envInfo.user[n]=e[n]?String(e[n]):e[n]):Object.hasOwnProperty.call(t.envInfo.header,n)?t.envInfo.header[n]=e[n]:t.envInfo.header.custom[n]=e[n]}))},e.prototype.get=function(e){try{return e?"evtParams"===e?this.evtParams:"reportErrorCallback"===e?this[e]:Object.hasOwnProperty.call(this.envInfo.user,e)?this.envInfo.user[e]:Object.hasOwnProperty.call(this.envInfo.header,e)?this.envInfo.header[e]:JSON.parse(Hj(this.envInfo[e])):JSON.parse(Hj(this.envInfo))}catch(t){console.log("get config stringify error ")}},e}();!function(e){e.Init="init",e.Config="config",e.Start="start",e.Ready="ready",e.TokenComplete="token-complete",e.TokenStorage="token-storage",e.TokenFetch="token-fetch",e.TokenError="token-error",e.ConfigUuid="config-uuid",e.TokenChange="token-change",e.TokenReset="token-reset",e.SessionReset="session-reset",e.SessionResetTime="session-reset-time",e.Event="event",e.Events="events",e.EventNow="event-now",e.CleanEvents="clean-events",e.BeconEvent="becon-event"}(Mbe||(Mbe={}));var Jbe=Mbe;function eke(e,t,n,i,r,o,a,s,l){try{var c=new XMLHttpRequest,u=s||"POST";c.open(u,""+e,!0),c.setRequestHeader("Content-Type","application/json; charset=utf-8"),n&&(c.timeout=n,c.ontimeout=function(){o&&o(t,5005)}),c.onload=function(){if(r){var e=null;if(c.responseText){try{e=JSON.parse(c.responseText)}catch(n){e={}}r(e,t)}}},c.onerror=function(){c.abort(),o&&o(t,500)},l?c.send(t):c.send(Hj(t))}catch(h){}}var tke=function(){function e(){this.eventLimit=50,this.eventCache=[],this.beconEventCache=[]}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.config=t,this.configManager=e.configManager,this.cacheStorgae=new Wbe(!0),this.localStorage=new Wbe(!1),this.maxReport=t.max_report||20,this.reportTime=t.reportTime||30,this.timeout=t.timeout||1e5,this.reportUrl=this.configManager.getUrl("event"),this.eventKey="__tea_cache_events_"+this.configManager.get("app_id"),this.beconKey="__tea_cache_events_becon_"+this.configManager.get("app_id"),this.collect.on(Jbe.Ready,(function(){n.reportAll(!1)})),this.collect.on(Jbe.Event,(function(e){n.event(e)})),this.collect.on(Jbe.BeconEvent,(function(e){n.beconEvent(e)})),this.linster()},e.prototype.linster=function(){var e,t=this;window.addEventListener("unload",(function(){t.reportAll(!0)}),!1),e=function(){t.reportAll(!0)},navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)?window.addEventListener("pagehide",e,!1):window.addEventListener("beforeunload",e,!1),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&t.reportAll(!0)}),!1)},e.prototype.reportAll=function(e){this.report(e),this.reportBecon()},e.prototype.event=function(e){var t=this;try{var n=Lbe(e,this.cacheStorgae.getItem(this.eventKey)||[]);if(this.cacheStorgae.setItem(this.eventKey,n),this.reportTimeout&&clearTimeout(this.reportTimeout),n.length>=this.maxReport)this.report(!1);else{var i=this.reportTime;this.reportTimeout=setTimeout((function(){t.report(!1),t.reportTimeout=null}),i)}}catch(r){}},e.prototype.beconEvent=function(e){var t=Lbe(e,this.cacheStorgae.getItem(this.beconKey)||[]);this.cacheStorgae.setItem(this.beconKey,t),this.collect.destroyInstance||this.collect.tokenManager.getReady()&&this.collect.sdkReady&&(this.cacheStorgae.removeItem(this.beconKey),this.send(this.split(this.merge(t)),!0))},e.prototype.reportBecon=function(){var e=this.cacheStorgae.getItem(this.beconKey)||[];e&&e.length&&(this.cacheStorgae.removeItem(this.beconKey),this.send(this.split(this.merge(e)),!0))},e.prototype.report=function(e){if(!this.collect.destroyInstance&&this.collect.tokenManager.getReady()&&this.collect.sdkReady){var t=this.cacheStorgae.getItem(this.eventKey)||[];t.length&&(this.cacheStorgae.removeItem(this.eventKey),this.sliceEvent(t,e))}},e.prototype.sliceEvent=function(e,t){if(e.length>this.eventLimit)for(var n=0;n<e.length;n+=this.eventLimit){var i;i=Sx(e).call(e,n,n+this.eventLimit);var r=this.split(this.merge(i));this.send(r,t)}else r=this.split(this.merge(e)),this.send(r,t)},e.prototype.merge=function(e){var t=this,n=this.configManager.get(),i=n.header,r=n.user;i.custom=Hj(i.custom);var o=this.configManager.get("evtParams"),a=W_(e).call(e,(function(e){try{return kT(o).length&&(e.params=Ibe({},o,e.params)),e.session_id=t.collect.sessionManager.getSessionId(),e.params=Hj(e.params),e}catch(cK){return e}})),s=[];if(!kT(r).length)return console.warn("user info error,cant report"),s;var l=JSON.parse(Hj({events:a,user:r,header:i}));return l.local_time=Math.floor(Date.now()/1e3),l.verbose=1,s.push(l),s},e.prototype.split=function(e){return W_(e).call(e,(function(e){var t=[];return t.push(e),t}))},e.prototype.send=function(e,t){var n=this;e.length&&e.forEach((function(e){try{if(!e.length)return;i=n.reportUrl,r=e,o=n.timeout,a=function(e,t){},s=function(e,t){n.configManager.get("reportErrorCallback")(e,t)},!1,t&&window.navigator&&window.navigator.sendBeacon?window.navigator.sendBeacon(i,Hj(r))||s(i,r):eke(i,r,o,0,a,s,0,"",false)}catch(l){console.warn("something error, "+Hj(l.stack))}var i,r,o,a,s}))},e}(),nke=function e(t){return t?(t^16*Math.random()>>t/4).toString(10):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e)},ike=function(){var e;return Sx(e=nke().replace(/-/g,"")).call(e,0,19)},rke=function(){function e(){this.cacheToken={}}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.config=t,this.configManager=this.collect.configManager,this.storage=new Wbe(!1),this.tokenKey="__tea_cache_tokens_"+t.app_id,this.collect.on(Jbe.ConfigUuid,(function(e){n.setUuid(e)})),this.checkStorage()},e.prototype.checkStorage=function(){this.cacheToken=this.storage.getItem(this.tokenKey)||{},this.check()},e.prototype.check=function(){this.cacheToken&&this.cacheToken.web_id?this.complete(this.cacheToken):this.remoteWebid()},e.prototype.remoteWebid=function(){var e=this,t=this.configManager.getUrl("webid"),n={app_key:this.config.app_key,app_id:this.config.app_id,url:location.href,user_agent:window.navigator.userAgent,referer:document.referrer,user_unique_id:""},i=ike();eke(t,n,3e5,0,(function(t){var n;t&&0===t.e?n=t.web_id:(n=i,e.collect.configManager.set({localWebId:i}),e.collect.logger.warn("appid: "+e.config.app_id+" get webid error, use local webid~")),e.complete({web_id:e.configManager.get("web_id")||n,user_unique_id:e.configManager.get("user_unique_id")||n})}),(function(){e.complete({web_id:e.configManager.get("web_id")||i,user_unique_id:e.configManager.get("user_unique_id")||i}),e.collect.configManager.set({localWebId:i}),e.collect.logger.warn("appid: "+e.config.app_id+", get webid error, use local webid~")}))},e.prototype.complete=function(e){var t=e.web_id,n=e.user_unique_id;t||n?(e.timestamp=Date.now(),this.collect.configManager.set({web_id:t,user_unique_id:n}),this.setStorage(e),this.tokenReady=!0,this.collect.emit(Jbe.TokenComplete)):console.warn("token error")},e.prototype.setUuid=function(e){var t;if(e&&-1===qP(t=["null","undefined","Null","None"]).call(t,e)){var n=String(e),i=this.configManager.get("user_unique_id"),r=this.cacheToken&&this.cacheToken.user_unique_id;if(n===i&&n===r)return;this.configManager.set({user_unique_id:n}),this.cacheToken||(this.cacheToken={}),this.cacheToken.user_unique_id=n,this.cacheToken.timestamp=Date.now(),this.setStorage(this.cacheToken)}else this.clearUuid()},e.prototype.clearUuid=function(){this.config.enable_ttwebid||this.configManager.get("web_id")&&(this.configManager.set({user_unique_id:this.configManager.get("web_id")}),this.cacheToken&&this.cacheToken.web_id&&(this.cacheToken.user_unique_id=this.cacheToken.web_id,this.cacheToken.timestamp=Date.now(),this.setStorage(this.cacheToken)),this.collect.emit(Jbe.TokenReset))},e.prototype.setStorage=function(e){e._type_="default",this.storage.setItem(this.tokenKey,e),this.cacheToken=e},e.prototype.getReady=function(){return this.tokenReady},e}(),oke=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))},ake=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.storage=new Wbe(!1,"session"),this.sessionKey="__tea_session_id_"+t.app_id,this.expireTime=t.expireTime||18e5,this.disableSession=t.disable_session,this.disableSession||(this.setSessionId(),this.collect.on(Jbe.SessionReset,(function(){n.resetSessionId()})),this.collect.on(Jbe.SessionResetTime,(function(){n.updateSessionIdTime()})))},e.prototype.updateSessionIdTime=function(){var e=this.storage.getItem(this.sessionKey);if(e&&e.sessionId){var t=e.timestamp;Date.now()-t>this.expireTime?e={sessionId:oke(),timestamp:Date.now()}:e.timestamp=Date.now(),this.storage.setItem(this.sessionKey,e),this.resetExpTime()}},e.prototype.setSessionId=function(){var e=this,t=this.storage.getItem(this.sessionKey);t&&t.sessionId?t.timestamp=Date.now():t={sessionId:oke(),timestamp:Date.now()},this.storage.setItem(this.sessionKey,t),this.sessionExp=setInterval((function(){e.checkEXp()}),this.expireTime)},e.prototype.getSessionId=function(){var e=this.storage.getItem(this.sessionKey);return this.disableSession?"":e&&e.sessionId?e.sessionId:""},e.prototype.resetExpTime=function(){var e=this;this.sessionExp&&(clearInterval(this.sessionExp),this.sessionExp=setInterval((function(){e.checkEXp()}),this.expireTime))},e.prototype.resetSessionId=function(){var e={sessionId:oke(),timestamp:Date.now()};this.storage.setItem(this.sessionKey,e)},e.prototype.checkEXp=function(){var e=this.storage.getItem(this.sessionKey);e&&e.sessionId&&Date.now()-e.timestamp+30>=this.expireTime&&(e={sessionId:oke(),timestamp:Date.now()},this.storage.setItem(this.sessionKey,e))},e}(),ske=function(){function e(e){this.disableAutoPageView=!1,this.staging=!1,this.sended=!1,this.started=!1,this.adapters={},this.sdkReady=!1,this.name=e,this.hook=new Nbe,this.Types=Jbe,this.adapters.fetch=eke,this.adapters.storage=Wbe}return e.prototype.init=function(e){var t,n,i=this;this.inited?console.log("init can be call only one time"):e&&zbe(e)?e.app_id&&"number"==typeof(n=e.app_id)&&!isNaN(n)?e.app_key&&"string"!=typeof e.app_key?console.warn("app_key param is error, must be string, please check!"):(e.channel_domain||-1!==qP(t=["cn","sg","va"]).call(t,e.channel)||(console.warn("channel must be `cn`, `sg`,`va` !!!"),e.channel="cn"),this.inited=!0,this.configManager=new Qbe(this,e),this.initConfig=e,e.disable_auto_pv&&(this.disableAutoPageView=!0),this.configManager.set({app_id:e.app_id}),this.eventManager=new tke,this.tokenManager=new rke,this.sessionManager=new ake,rb.all([new rb((function(e){i.once(Jbe.TokenComplete,(function(){e(!0)}))})),new rb((function(e){i.once(Jbe.Start,(function(){e(!0)}))}))]).then((function(){i.sdkReady=!0,i.emit(Jbe.Ready),console.info("appid: "+e.app_id+", userInfo:"+Hj(i.configManager.get("user"))),console.info("appid: "+e.app_id+", sdk is ready, version is 0.0.3-lite, you can report now !!!"),i.pageView()})),this.tokenManager.apply(this,e),this.eventManager.apply(this,e),this.sessionManager.apply(this,e),this.emit(Jbe.Init)):console.warn("app_id param is error, must be number, please check!"):console.warn("init params error,please check")},e.prototype.config=function(e){if(this.inited)if(e&&zbe(e)){e._staging_flag&&1===e._staging_flag&&(this.staging=!0),e.disable_auto_pv&&(this.disableAutoPageView=!0,delete e.disable_auto_pv);var t=Ibe({},e);t.user_unique_id;var n=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&qP(t).call(t,i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Lx){var r=0;for(i=Lx(e);r<i.length;r++)qP(t).call(t,i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}(t,["user_unique_id"]);t.hasOwnProperty("user_unique_id")&&this.emit(Jbe.ConfigUuid,t.user_unique_id),this.configManager.set(n)}else console.warn("config params is error, please check");else console.warn("config must be use after function init")},e.prototype.getConfig=function(e){return this.configManager.get(e)},e.prototype.start=function(){this.inited&&!this.sended&&(this.sended=!0,this.emit(Jbe.Start))},e.prototype.event=function(e,t){var n=this;try{var i=[];Array.isArray(e)?e.forEach((function(e){i.push(n.processEvent(e[0],e[1]||{}))})):i.push(this.processEvent(e,t)),i.length&&(this.emit(Jbe.Event,i),this.emit(Jbe.SessionResetTime))}catch(r){console.warn("something error, please check")}},e.prototype.beconEvent=function(e,t){if(Array.isArray(e))console.warn("beconEvent not support batch report, please check");else{var n=[];n.push(this.processEvent(e,t||{})),n.length&&(this.emit(Jbe.BeconEvent,n),this.emit(Jbe.SessionResetTime))}},e.prototype.processEvent=function(e,t){void 0===t&&(t={});try{var n=e;/^event\./.test(e)&&(n=Sx(e).call(e,6));var i=t;"object"!=Du(i)&&(i={}),i.event_index=Ube();var r=void 0;return i.local_ms?(r=i.local_ms,delete i.local_ms):r=+new Date,{event:n,params:i,local_time_ms:r}}catch(o){return{event:e,params:t}}},e.prototype.on=function(e,t){this.hook.on(e,t)},e.prototype.once=function(e,t){this.hook.once(e,t)},e.prototype.off=function(e,t){this.hook.off(e,t)},e.prototype.emit=function(e,t,n){this.hook.emit(e,t,n)},e.prototype.set=function(e){this.hook.set(e)},e.prototype.pageView=function(){this.disableAutoPageView||this.predefinePageView()},e.prototype.predefinePageView=function(e){void 0===e&&(e={});var t={title:document.title||location.pathname,url:location.href,url_path:location.pathname,time:Date.now(),referrer:window.document.referrer,$is_first_time:""+(this.configManager&&this.configManager.is_first_time)},n=Ibe({},t,e);this.event("predefine_pageview",n)},e}(),lke=new ske("default"),cke=wse.dependencies||{},uke="veplayer_live_device_id",hke="veplayer_live_user_id",dke=function(e){return Math.floor((9*Math.random()+1)*Math.pow(10,e-1)).toString()},fke=function(e){rh(n,e);var t=Ah(n);function n(){return Ou(this,n),t.apply(this,arguments)}return Au(n,[{key:"afterCreate",value:function(){var e,t,n,i,r,o=this;this.config.enable&&(this.config.appId?(this._userId=(null===(e=this.config)||void 0===e?void 0:e.userId)||((i=localStorage.getItem(hke))||(i=dke(12),localStorage.setItem(hke,i),i)),this._deviceId=(null===(t=this.config)||void 0===t?void 0:t.deviceId)||((r=localStorage.getItem(uke))||(r=dke(11),localStorage.setItem(uke,r),r)),this.openLog(this.config),null===(n=this.player.plugins)||void 0===n||null===(n=n.sdkerrorplugin)||void 0===n||n.addErrDetail((function(){var e;if(o._liveLogger)return{label:"userId",value:null===(e=o._liveLogger)||void 0===e||null===(e=e.logger)||void 0===e||null===(e=e.options)||void 0===e?void 0:e.user_id}}))):LG.warn("not found appid, logger is closed"))}},{key:"_createTea",value:function(e){lke.init({app_id:507365,channel:"sg"}),lke.start(),lke.config({user_unique_id:this._userId,device_id:this._deviceId})}},{key:"startLog",value:function(e){this._createTea(e),this._liveLogger=new _be({Tea:lke,player:this.player,aid:e.appId,project_key:e.appId,app_name:e.appId,user_id:this._userId,device_id:this._deviceId,ext:{veplayer_version:"1.10.0",flv_version:cke["xgplayer-flv"],hls_version:cke["xgplayer-hls"],rts_version:cke["@byted/xgplayer-rts"]}})}},{key:"closeLog",value:function(){this._liveLogger.destroy(),this._liveLogger=null}},{key:"openLog",value:function(e){!this._liveLogger&&this.startLog(dp(dp({},this.config),e))}}],[{key:"pluginName",get:function(){return"liveLogger"}},{key:"defaultConfig",get:function(){return{appId:"",enable:!0}}}]),n}(ON),pke=function(e){return e.widevine="com.widevine.alpha",e.fairplay="com.apple.fps.1_0",e.playready="com.microsoft.playready",e}(pke||{}),vke=function(e){return e[e.UNSUPPORTED=7101]="UNSUPPORTED",e[e.RECORD=7102]="RECORD",e[e.NOMEDIAKEY=7103]="NOMEDIAKEY",e[e.NOKEYSESSION=7104]="NOKEYSESSION",e[e.GENERATEREQUESTFAIL=7105]="GENERATEREQUESTFAIL",e[e.LACKSERVERCERTIFICATEPATH=7106]="LACKSERVERCERTIFICATEPATH",e[e.LACKSERVERPROCESSSPCPATH=7107]="LACKSERVERPROCESSSPCPATH",e[e.LICENSEFAIL=7108]="LICENSEFAIL",e[e.KEYERROR=7109]="KEYERROR",e[e.CERTFAIL=7110]="CERTFAIL",e}(vke||{});function gke(e){var t=[{initDataTypes:["keyids","webm"],audioCapabilities:[{contentType:'audio/mp4; codecs="mp4a.40.2"'}],videoCapabilities:e?[{contentType:e}]:[{contentType:'video/mp4; codecs="avc1.42c01e"'},{contentType:'video/mp4; codecs="hev1.1.6.L120.90"'},{contentType:'video/webm; codecs="vp8"'}]}];return new rb((function(e,n){navigator.requestMediaKeySystemAccess(pke.fairplay,t).then((function(t){e({access:t,system:pke.fairplay,systemName:"fairplay"})})).catch((function(){AG.WebKitMediaKeys&&AG.WebKitMediaKeys.isTypeSupported(pke.fairplay,"video/mp4")?e({access:null,system:pke.fairplay,systemName:"fairplay"}):navigator.requestMediaKeySystemAccess(pke.widevine,t).then((function(t){e({access:t,system:pke.widevine,systemName:"widevine"})})).catch((function(){navigator.requestMediaKeySystemAccess(pke.playready,t).then((function(t){e({access:t,system:pke.playready,systemName:"playready"})})).catch((function(t){AG.MSMediaKeys&&AG.MSMediaKeys.isTypeSupported(pke.playready,"video/mp4")?e({access:null,system:pke.playready,systemName:"playready"}):n(t)}))}))}))}))}var yke=function(e){rh(r,e);var t,n,i=Ah(r);function r(e){var t;Ou(this,r),(t=i.call(this,e)).unsupported=!1,t.unRecord=!0,t.needKeyed=!1,t.onNeedKey=function(e){if(!t.needKeyed&&!t.unsupported){t.needKeyed=!0,e.target;var n,i=e.initData,r=e.initDataType;if(t.keySystem===pke.fairplay&&(n=t.extractContentId(i),!t.certificate))return t.suspend=function(){t.afterInitDate(i,n,r)};t.afterInitDate(i,n,r)}},t.licenseRequestReady=function(e){if(t.serverProcessSPCPath){var n=e.message,i=new XMLHttpRequest;i.responseType="arraybuffer",i.addEventListener("load",t.licenseRequestLoaded,!1),i.addEventListener("error",t.licenseRequestFailed(e),!1);var r=new Uint8Array(n);i.open("POST",t.serverProcessSPCPath,!0),t.config.ignoreLicenseHeader||(t.keySystem===pke.playready?i.setRequestHeader("Content-type","text/xml; charset=utf-8"):i.setRequestHeader("Content-type","application/octet-stream")),i.send(r)}else t.emitError(vke.LACKSERVERPROCESSSPCPATH,"lack serverProcessSPCPath")},t.licenseRequestLoaded=function(e){var n,i=e.target.response;(n=new Uint8Array(i))?t.keySession.update(n):t.emitError(vke.LICENSEFAIL,"The license response no array buffer, license: ".concat(n))},t.licenseRequestFailed=function(e){return function(n){if(t.licenseRetryTime>0)t.licenseRequestReady(e),t.licenseRetryTime--;else{var i,r=n.target;t.emitError(vke.LICENSEFAIL,y_(i="The license request fail, status: ".concat(r.status,", statusText: ")).call(i,r.statusText))}}},t.onKeyError=function(){t.emitError(vke.KEYERROR,"A decryption key error was encountered")},t.loadCertificate=function(){if(t.serverCertificatePath){var e=new XMLHttpRequest;e.responseType="arraybuffer",e.addEventListener("load",t.onCertificateLoaded,!1),e.addEventListener("error",t.onCertificateError,!1),e.open("GET",t.serverCertificatePath,!0),e.send()}else t.emitError(vke.LACKSERVERCERTIFICATEPATH,"lack serverCertificatePath")},t.emitError=function(e,n){t.emit("error",{errorCode:e,message:n,drm_sdk_version:"0.0.0-alpha.12"})},t.onCertificateLoaded=function(e){var n=e.target;t.certificate=new Uint8Array(n.response),t.suspend&&t.suspend()},t.onCertificateError=function(e){if(t.certRetryTime>0)t.loadCertificate(),t.certRetryTime--;else{var n,i=e.target;t.emitError(vke.CERTFAIL,y_(n="get cert fail, status: ".concat(i.status,", statusText: ")).call(n,i.statusText))}},t.restart=function(){t.reset()},t.reset();var n=e.config||{};return t.config=n,t.contentType=t.config.contentType,"boolean"==typeof n.unRecord&&(t.unRecord=n.unRecord),t.checkUnrecord(),t}return Au(r,[{key:"serverCertificatePath",get:function(){return this._serverCertificatePath},set:function(e){e&&this._serverCertificatePath!==e&&(this._serverCertificatePath=e,this.keySystem===pke.fairplay&&(this.certificate=void 0,this.suspend=function(){},this.loadCertificate()))}},{key:"afterCreate",value:function(){this.media=this.player.video,this.media.addEventListener("webkitneedkey",this.onNeedKey,!1),this.media.addEventListener("msneedkey",this.onNeedKey,!1),this.media.addEventListener("needkey",this.onNeedKey,!1),this.media.addEventListener("encrypted",this.onNeedKey),this.player.on("urlchange",this.restart),this.player.on("reset",this.restart)}},{key:"checkUnrecord",value:(n=d_(u_().mark((function e(){var t,n,i=this;return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.unRecord){e.next=13;break}return e.prev=1,e.next=4,navigator.mediaCapabilities.decodingInfo({type:"file",video:{contentType:'video/mp4; codecs="avc1.42c01e"',width:426,height:238,bitrate:1e3,framerate:30}});case 4:t=e.sent,n=t.powerEfficient,this.unsupported=!n,e.next=13;break;case 9:e.prev=9,e.t0=e.catch(1),this.emitError(vke.RECORD,"check powerEfficient failed, ".concat(e.t0.message)),this.unsupported=!0;case 13:if(!this.unsupported){e.next=15;break}return e.abrupt("return");case 15:gke(this.contentType).then((function(e){var t=e.access,n=e.system,r=e.systemName;i.keySystem=n,i.systemName=r,i.setRequestUrl(r),n===pke.fairplay&&i.loadCertificate(),t&&(i.keySystemAccess=t)})).catch((function(e){i.emitError(vke.UNSUPPORTED,e.message),i.unsupported=!0}));case 16:case"end":return e.stop()}}),e,this,[[1,9]])}))),function(){return n.apply(this,arguments)})},{key:"setRequestUrl",value:function(e){var t=this.config[e]||this.config;this.serverCertificatePath=t.serverCertificatePath,this.serverProcessSPCPath=t.serverProcessSPCPath}},{key:"updateConfig",value:(t=d_(u_().mark((function e(t){return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(VS(this.config,t),!this.config.unRecord||this.contentType===this.config.contentType){e.next=5;break}return this.contentType=this.config.contentType,e.next=5,this.checkUnrecord();case 5:this.setRequestUrl(this.systemName);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"afterInitDate",value:function(e,t,n){var i=this;if(this.keySystemAccess)this.keySystemAccess.createMediaKeys().then((function(t){if(i.media.setMediaKeys(t),i.media.mediaKeys)i.emitError(vke.NOMEDIAKEY,"Could not create MediaKeys");else{var r=t.createSession();i.keySession=r,r?(r.addEventListener("message",i.licenseRequestReady),r.generateRequest(n||i.config.initDataType,e).catch((function(e){var t;i.emitError(vke.GENERATEREQUESTFAIL,y_(t="generateRequest failed, code: ".concat(e.errorCode,", message: ")).call(t,e.message))}))):i.emitError(vke.NOKEYSESSION,"Could not create key session")}})).catch((function(){throw"Could not create MediaKeys"}));else if(this.keySystem===pke.fairplay){var r=new AG.WebKitMediaKeys(this.keySystem);if(this.media.webkitSetMediaKeys(r),!this.media.webkitKeys)return void this.emitError(vke.NOMEDIAKEY,"Could not create MediaKeys");var o=r.createSession("video/mp4",this.concatInitDataIdAndCertificate(e,t));if(this.keySession=o,!o)return void this.emitError(vke.NOKEYSESSION,"Could not create key session");o.addEventListener("webkitkeymessage",this.licenseRequestReady),o.addEventListener("webkitkeyerror",this.onKeyError)}else if(this.keySystem===pke.playready){var a=new AG.MSMediaKeys(this.keySystem);this.media.msSetMediaKeys(a);var s=a.createSession("video/mp4",new Uint8Array(e),null);if(this.keySession=s,!s)return void this.emitError(vke.NOKEYSESSION,"Could not create key session");s.addEventListener("mskeymessage",this.licenseRequestReady),s.addEventListener("mskeyerror",this.onKeyError)}}},{key:"parseServerResponse",value:function(e){var t="http://schemas.xmlsoap.org/soap/envelope/";if(DOMParser){var n=this.uintToString(e),i=(new DOMParser).parseFromString(n,"text/xml"),r=i?i.getElementsByTagNameNS(t,"Envelope")[0]:null,o=r?r.getElementsByTagNameNS(t,"Body")[0]:null;if(o?o.getElementsByTagNameNS(t,"Fault")[0]:null)return null}return e}},{key:"uintToString",value:function(e){var t=String.fromCharCode.apply(null,new Uint8Array(e));return decodeURIComponent(escape(t))}},{key:"extractContentId",value:function(e){var t,n=(t=new Uint16Array(e.buffer),String.fromCharCode.apply(null,t)),i=document.createElement("a");return i.href=n,i.hostname}},{key:"concatInitDataIdAndCertificate",value:function(e,t){"string"==typeof t&&(t=function(e){for(var t=new ArrayBuffer(2*e.length),n=new Uint16Array(t),i=0,r=e.length;i<r;i++)n[i]=e.charCodeAt(i);return n}(t));var n,i=0,r=this.certificate;n=r?new ArrayBuffer(e.byteLength+4+t.byteLength+4+r.byteLength):new ArrayBuffer(e.byteLength+4+t.byteLength);var o=new DataView(n);new Uint8Array(n,i,e.byteLength).set(e),i+=e.byteLength,o.setUint32(i,t.byteLength,!0),i+=4;var a=new Uint16Array(n,i,t.length);(a.set(t),i+=a.byteLength,r)&&(o.setUint32(i,r.byteLength,!0),i+=4,new Uint8Array(n,i,r.byteLength).set(r));return new Uint8Array(n,0,n.byteLength)}},{key:"reset",value:function(){if(this.certRetryTime=2,this.licenseRetryTime=2,this.suspend=void 0,this.keySession=void 0,this.needKeyed=!1,this.media)try{this.media.src="",this.keySystem===pke.fairplay?this.media.webkitSetMediaKeys(null):this.keySystem===pke.playready?this.media.msSetMediaKeys(null):this.media.setMediaKeys(null)}catch(tSe){}}},{key:"destroy",value:function(){this.player.off("urlchange",this.restart),this.player.off("reset",this.restart),this.media.removeEventListener("webkitneedkey",this.onNeedKey,!1),this.media.removeEventListener("msneedkey",this.onNeedKey,!1),this.media.removeEventListener("needkey",this.onNeedKey,!1),this.media.removeEventListener("encrypted",this.onNeedKey)}}],[{key:"pluginName",get:function(){return"drm"}}]),r}(kN),mke=function(e){rh(n,e);var t=Ah(n);function n(){return Ou(this,n),t.apply(this,arguments)}return Au(n,[{key:"isEndedShow",get:function(){return this.config.isEndedShow},set:function(e){this.config.isEndedShow=e}},{key:"hide",value:function(){qO.addClass(this.root,"hide")}},{key:"show",value:function(){return qO.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(sM,(function(){e.isEndedShow&&qO.removeClass(e.root,"hide")})),this.config.hideCanplay?(this.once(dM,(function(){e.onTimeUpdate()})),this.on(LM,(function(){qO.removeClass(e.root,"hide"),qO.addClass(e.root,"xg-showplay"),e.once(dM,(function(){e.onTimeUpdate()}))}))):this.on(oM,(function(){qO.addClass(e.root,"hide")}))}},{key:"onTimeUpdate",value:function(){var e=this;this.player.currentTime?qO.removeClass(this.root,"xg-showplay"):this.once(dM,(function(){e.onTimeUpdate()}))}},{key:"update",value:function(e){e&&(this.config.poster=e,this.root.style.backgroundImage="url(".concat(e,")"))}},{key:"setConfig",value:function(e){var t=this;"string"==typeof e?this.config.poster=e:"object"===Du(e)&&kT(this.config).forEach((function(n){var i;F_(i=kT(e)).call(i,n)&&(t.config[n]=e[n])})),this.update(this.config.poster)}},{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;case"fixWidth":t="100% auto";break;default:t=""}return t?"background-size: ".concat(t,";"):""}},{key:"render",value:function(){var e,t,n,i=this.config,r=i.poster,o=i.hideCanplay,a=i.fillMode,s=i.notHidden,l=this.getBgSize(a),c=r?y_(e="background-image:url(".concat(r,");")).call(e,l):l;return y_(t=y_(n='<xg-poster class="xgplayer-poster '.concat(s?"xg-not-hidden":o?"xg-showplay":""," ")).call(n,r?"active":"",'" style="')).call(t,c,'">\n </xg-poster>')}}],[{key:"pluginName",get:function(){return"poster"}},{key:"defaultConfig",get:function(){return{isEndedShow:!0,hideCanplay:!1,notHidden:!1,poster:"",fillMode:"fixWidth"}}}]),n}(ON);KN.use(zj);var _ke=Au((function e(t,n){var i,r,o,a,s;Ou(this,e);var l=n&&"mobile"===n.isMobileSimulateMode,c=n.isLive?[]:[vU,aU,Lj,Dj,pU],u=y_(i=[]).call(i,c,[lU,fU,kU,IU,yj,mj,sj,lj,_U,xU]),h=[dz,mke,mz,nU,_z,Ej,wj,Ij,Pz];this.plugins=y_(r=[Vj,uz]).call(r,qd(u),h,[Kj,Wj]);var d=l?"mobile":eM.device;switch(d){case"pc":(o=this.plugins).push.apply(o,[eU,Mz,kj,Xj,$j]);break;case"mobile":(a=this.plugins).push.apply(a,[Qz]);break;default:(s=this.plugins).push.apply(s,[eU,Mz,kj])}(eM.os.isIpad||"pc"===d)&&this.plugins.push(Nj),this.ignores=[],this.i18n=[]}));function bke(e,t){return kke.apply(this,arguments)}function kke(){return(kke=d_(u_().mark((function e(t,n){var i,r,o,a,s,l,c,u,h,d,f,p,v,g,y,m,_,b,k;return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=t.isLive,s=void 0!==a&&a,l=t.streamType,c=t.isMobile,u=void 0!==c&&c,h=t.getSoftOptionTask,d=t.playerData,f=[_ke,Eke(s)],p=d.openSoftDecoding,v=d.isMusic,g=[],y=[],u?f.push(wke({isLive:s,playerData:n.playerData})):f.push(Ske({isLive:s,playerData:n.playerData})),e.t0=l,e.next="flv"===e.t0?9:"rtm"===e.t0?11:13;break;case 9:return y.push(d_(u_().mark((function e(){var t,i;return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!u){e.next=8;break}if(!yV()&&!p){e.next=6;break}return e.next=4,n.sdkUmdLoader.loadPlugins(Sse.FLV);case 4:t=e.sent,g.push(t);case 6:e.next=12;break;case 8:return e.next=10,n.sdkUmdLoader.loadPlugins(Sse.FLV);case 10:i=e.sent,g.push(i);case 12:case"end":return e.stop()}}),e)})))()),e.abrupt("break",14);case 11:return y.push(d_(u_().mark((function e(){return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,rb.all([n.sdkUmdLoader.loadPlugins(Sse.HLS),n.sdkUmdLoader.loadPlugins(Sse.FLV)]);case 2:g.push(Uce);case 3:case"end":return e.stop()}}),e)})))()),e.abrupt("break",14);case 13:return e.abrupt("break",14);case 14:return!v&&fV(n.playerData.options,"DanmuPlugin")&&y.push(d_(u_().mark((function e(){var t;return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,rb.all([n.sdkUmdLoader.loadPlugins(Sse.DanmuJS),n.sdkUmdLoader.loadPlugins(Sse.DanmuMask)]);case 2:(t=e.sent)[0]&&t[1]&&g.push(ode);case 4:case"end":return e.stop()}}),e)})))()),fV(n.playerData.options,"Subtitle")&&n.playerData.plugins.every((function(e){return"subtitle"!==e.pluginName.toLowerCase()}))&&g.push(h_e),e.next=18,rb.all(y_(i=[h(),Tke({isMobile:u,isLive:s,openSoftDecoding:p,streamType:l,playerData:n.playerData,plugins:g},n)]).call(i,y));case 18:return m=e.sent,_=IS(m,2),b=_[0],k=_[1],e.abrupt("return",{presets:f,softDecodingOption:b,plugins:ib(r=y_(o=[]).call(o,g,qd(k))).call(r,Boolean)});case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Eke(e){var t=[Vue,d_e,Sue];return e&&t.push(xue,fke),Au((function e(){Ou(this,e),this.plugins=t,this.ignores=["error"]}))}function wke(e){var t=e.isLive,n=e.playerData,i=["error","playbackRate"],r=n.configs,o=fV(r,"EncryptHlsPlugin");null!=o&&o.playAuthToken||i.push("definition");var a=["time","playnext","progress","progresspreview","replay","playbackRate","discontinue","PlaybackRateMobilePlugin"],s=[Iue];return Au((function e(){var n,r;Ou(this,e),this.plugins=s,this.ignores=t?y_(n=[]).call(n,a,i):y_(r=[]).call(r,i)}))}function Ske(e){var t=e.isLive,n=e.playerData,i=["cssfullscreen"],r=["time","playnext","progress","progresspreview","replay","playbackRate","discontinue"],o=t?[Zce]:[],a=n.configs,s=fV(a,"EncryptHlsPlugin");return null!=s&&s.playAuthToken||(i.push("definition"),o.push(pue)),Au((function e(){var n,a;Ou(this,e),this.plugins=o,this.ignores=t?y_(n=[]).call(n,r,i):y_(a=[]).call(a,i)}))}function Tke(e,t){return Cke.apply(this,arguments)}function Cke(){return(Cke=d_(u_().mark((function e(t,n){var i,r,o,a,s,l,c,u,h,d,f,p,v,g,y,m,_,b,k,E,w,S,T,C,x,D,I,R,L,P,A,O;return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.isMobile,a=t.isLive,s=t.openSoftDecoding,l=t.streamType,c=t.playerData,u=t.plugins,h=[],d=c.configs,f=c.options,p=c.useHlsPluginForSafari,v=c.isBusinessDrm,g=c.isEncrypt,"hls"!==l){e.next=28;break}if(_=fV(c.configs,"EncryptHlsPlugin"),b="hls"===l&&!(null==_||!_.keyToken),k="hls"===l&&g&&!v,!(b||k)&&(!c.isOpenABR()||null!=c&&null!==(y=c.adapter)&&void 0!==y&&null!==(m=y.useNativeAbr)&&void 0!==m&&m.call(y))){e.next=15;break}return e.next=11,n.sdkUmdLoader.loadPlugins(Sse.HLSEncrypt);case 11:E=e.sent,h.push(E),e.next=28;break;case 15:if(w=fV(f,"Subtitle"),S=a&&w,T=(yV()||window.WebAssembly)&&s,C=d.enableHlsMSE,x=v&&eM.os.isAndroid,D=v&&bV,I=!(o||bV&&!p||D),!(o&&(T||S||C||x))&&!I){e.next=28;break}return e.next=26,n.sdkUmdLoader.loadPlugins(Sse.HLS);case 26:R=e.sent,h.push(R);case 28:if(("dash"!==l||d.url)&&!fV(f,"DASHPlugin")){e.next=33;break}return e.next=31,n.sdkUmdLoader.loadPlugins(Sse.DASH);case 31:null!=(A=e.sent)&&null!==(L=A.encryptUtils)&&void 0!==L&&null!==(P=L.isSupported)&&void 0!==P&&P.call(L)&&u.push(A);case 33:if(fV(f,"vodLogOpts")&&h.push(_se),c.enableMenu&&h.push(tme),!(d.enableMp4MSE||F_(i=["mp4","m4a"]).call(i,l)&&(g||null!=d&&null!==(r=d.autoBitrateOpts)&&void 0!==r&&r.enable||c.openSoftDecoding))){e.next=40;break}return e.next=38,n.sdkUmdLoader.loadPlugins(Sse.MP4Encrypt);case 38:O=e.sent,h.push(O);case 40:return v&&h.push(yke),e.abrupt("return",ib(h).call(h,(function(e){var t,n,i,r,o;return"encrypthlsplugin"===(null==e||null===(t=e.pluginName)||void 0===t?void 0:t.toLowerCase())?!(null==e||null===(i=e.isSupported)||void 0===i||!i.call(e))||(LG.warn("当前浏览器环境不支持HLS格式视频的加密播放"),!1):"dashplugin"!==(null==e||null===(n=e.pluginName)||void 0===n?void 0:n.toLowerCase())||(!(null==e||null===(r=e.encryptUtils)||void 0===r||null===(o=r.isSupported)||void 0===o||!o.call(r))||(LG.warn("当前浏览器环境不支持DASH格式视频播放"),!1))})));case 42:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function xke(){return(new DOMParser).parseFromString('<svg width="72" height="72" viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg"><g fill="#FFF" fill-rule="evenodd"><circle fill-opacity=".3" cx="36" cy="36" r="36"/><path d="M40.167 32.667a.833.833 0 01-.834-.834v-1.666c0-.46.373-.834.834-.834h5.409a11.653 11.653 0 00-9.576-5c-6.443 0-11.667 5.224-11.667 11.667S29.557 47.667 36 47.667c5.285 0 9.749-3.514 11.183-8.333h3.445C49.112 46.014 43.138 51 36 51c-8.284 0-15-6.716-15-15 0-8.284 6.716-15 15-15 4.713 0 8.918 2.173 11.668 5.572l-.001-4.739c0-.46.373-.833.833-.833h1.667c.46 0 .833.373.833.833V31c0 .879-.68 1.598-1.542 1.662l-.125.005h-9.166z"/></g></svg>',"image/svg+xml").firstChild}function Dke(){return(new DOMParser).parseFromString('<svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="60" height="60" rx="30" fill="#000" fill-opacity=".4"/><path d="M40.243 28.3a2 2 0 010 3.401L24.06 41.712c-1.332.825-3.052-.134-3.052-1.7V19.988c0-1.566 1.72-2.525 3.052-1.7l16.184 10.01z" fill="#fff"/></svg>',"image/svg+xml").firstChild}function Ike(){return(new DOMParser).parseFromString('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.867 2.5h.55c.44 0 .799.34.83.771l.003.062v13.334c0 .44-.34.799-.771.83l-.062.003h-.55a.833.833 0 01-.444-.128l-.064-.045-4.867-3.744a.831.831 0 01-.322-.59l-.003-.07V7.077c0-.235.099-.458.271-.615l.054-.045L9.36 2.673a.832.832 0 01.43-.17l.078-.003h.55-.55zm6.767 2.278A7.474 7.474 0 0118.75 10a7.477 7.477 0 01-2.128 5.234.4.4 0 01-.57-.004l-.587-.586a.442.442 0 01.005-.617A5.812 5.812 0 0017.083 10c0-1.557-.61-2.97-1.603-4.017a.442.442 0 01-.003-.615l.586-.586a.4.4 0 01.57-.004zM2.5 6.667c.23 0 .417.186.417.416v5.834c0 .23-.187.416-.417.416h-.833a.417.417 0 01-.417-.416V7.083c0-.23.187-.416.417-.416H2.5zm11.768.46A4.153 4.153 0 0115.417 10c0 1.12-.442 2.137-1.162 2.886a.388.388 0 01-.555-.007l-.577-.578c-.176-.176-.156-.467.009-.655A2.49 2.49 0 0013.75 10a2.49 2.49 0 00-.61-1.636c-.163-.188-.182-.477-.006-.653l.578-.578a.388.388 0 01.556-.006z" fill="#fff"/></svg>',"image/svg+xml").firstChild}function Rke(){return(new DOMParser).parseFromString('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.045 2.5h.55c.44 0 .8.34.831.771l.003.062v13.334c0 .44-.34.799-.771.83l-.063.003h-.55a.833.833 0 01-.443-.128l-.065-.045-4.866-3.744a.831.831 0 01-.323-.59l-.003-.07V7.077c0-.235.1-.458.272-.615l.054-.045 4.866-3.744a.832.832 0 01.43-.17l.078-.003h.55-.55zM2.68 6.667c.23 0 .416.186.416.416v5.834c0 .23-.186.416-.416.416h-.834a.417.417 0 01-.416-.416V7.083c0-.23.186-.416.416-.416h.834zm10.467.294a.417.417 0 01.59 0l1.767 1.768L17.27 6.96a.417.417 0 01.589 0l.59.59a.417.417 0 010 .589L16.68 9.908l1.768 1.767c.15.15.162.387.035.55l-.035.04-.589.589a.417.417 0 01-.59 0l-1.767-1.768-1.768 1.768a.417.417 0 01-.59 0l-.588-.59a.417.417 0 010-.589l1.767-1.768-1.767-1.767a.417.417 0 01-.035-.55l.035-.04.589-.589z" fill="#fff"/></svg>',"image/svg+xml").firstChild}function Lke(){return(new DOMParser).parseFromString('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.867 2.5h.55c.44 0 .799.34.83.771l.003.062v13.334c0 .44-.34.799-.771.83l-.062.003h-.55a.833.833 0 01-.444-.128l-.064-.045-4.867-3.744a.831.831 0 01-.322-.59l-.003-.07V7.077c0-.235.099-.458.271-.615l.054-.045L9.36 2.673a.832.832 0 01.43-.17l.078-.003h.55-.55zM2.5 6.667c.23 0 .417.186.417.416v5.834c0 .23-.187.416-.417.416h-.833a.417.417 0 01-.417-.416V7.083c0-.23.187-.416.417-.416H2.5zm11.768.46A4.153 4.153 0 0115.417 10c0 1.12-.442 2.137-1.162 2.886a.388.388 0 01-.555-.007l-.577-.578c-.176-.176-.156-.467.009-.655A2.49 2.49 0 0013.75 10a2.49 2.49 0 00-.61-1.636c-.163-.188-.182-.477-.006-.653l.578-.578a.388.388 0 01.556-.006z" fill="#fff"/></svg>',"image/svg+xml").firstChild}var Pke={startPlay:Dke,play:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" viewBox="0 0 20 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" viewBox="0 0 20 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:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" viewBox="0 0 20 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},exitFullscreen:function(){return(new DOMParser).parseFromString('<svg width="21" height="20" viewBox="0 0 20 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},playNext:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.03 8.312a2 2 0 010 3.376l-7.642 4.858c-1.332.847-3.073-.11-3.073-1.687V5.14c0-1.577 1.741-2.534 3.073-1.687l7.642 4.858z" fill="#fff"/><path d="M13 3.5a.5.5 0 01.5-.5h1a.5.5 0 01.5.5v13a.5.5 0 01-.5.5h-1a.5.5 0 01-.5-.5v-13z" fill="#fff"/></svg>',"image/svg+xml").firstChild},replay:xke,refresh:Tue,danmuSetting:function(){return(new DOMParser).parseFromString('<svg width="22" height="19" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd" opacity=".6"><path d="M-4-4h28v28H-4z"/><path d="M1 19a1 1 0 01-1-1V1a1 1 0 011-1h17.2a1 1 0 011 1v3.75h-.001l.001 1.475a.9.9 0 11-1.8 0V1.8H1.8v15.4h8.442l-.029.019h.296a.89.89 0 01.017 1.78h7.691L18.2 19H1z" fill="#FFF" fill-rule="nonzero"/><path d="M5.507 7.698L5.33 9.279h2.511c0 2.015-.075 3.362-.2 4.042-.151.68-.792 1.054-1.934 1.124-.327 0-.653-.023-1.005-.047l-.339-1.136c.327.035.678.059 1.03.059.628 0 .98-.188 1.067-.563.088-.374.138-1.183.138-2.424H4l.352-3.679h2.122V5.132H4.113V4.09h3.654v3.608h-2.26zm3.089-2.214h1.507A8.91 8.91 0 009.16 4.03l1.193-.375c.351.469.665.96.93 1.5l-.792.328h1.733a14.68 14.68 0 00.93-1.921l1.242.41a8.956 8.956 0 01-.854 1.51H15v4.933h-2.587v.902h2.446l-1.014 1.148h-1.432v2.097h-1.28v-2.097h-2.99v-1.148h2.99v-.902H8.595V5.484zm5.249 3.912v-.913h-1.432v.913h1.432zm-2.713 0v-.913H9.764v.913h1.368zm-1.368-1.92h1.368v-.961H9.764v.96zm2.65-.961v.96h1.43v-.96h-1.43z" fill="#FFF" fill-rule="nonzero"/><path d="M17.595 9.84l2.957 1.69a1.2 1.2 0 01.605 1.041v3.358c0 .43-.23.828-.605 1.041l-2.957 1.69a1.2 1.2 0 01-1.19 0l-2.957-1.69a1.2 1.2 0 01-.605-1.041V12.57c0-.43.23-.828.605-1.041l2.957-1.69a1.2 1.2 0 011.19 0zM17 12.47c-.994 0-1.8.797-1.8 1.781a1.79 1.79 0 001.8 1.781c.994 0 1.8-.797 1.8-1.781a1.79 1.79 0 00-1.8-1.781z" fill="#FFF"/></g></svg>',"image/svg+xml").firstChild},openDanmu:Wue,closeDanmu:Kue,volumeLarge:Ike,volumeMuted:Rke,volumeSmall:Lke},Ake={whitelist:[""],widescreen:!0,width:"100%",height:"100%",lang:pV(),fitVideoSize:!1,inactive:2e3,playsinline:!0,keyShortcut:"off",closeVideoClick:!0,closeVideoDblclick:!0,closePlayerBlur:!1,closeControlsBlur:!1,closePlayVideoFocus:!0,leavePlayerTime:0,mini:!1,pip:{position:"controlsRight",index:2.5,showIcon:!0},volume:{index:2.6},miniscreen:{left:window.innerWidth-360,top:window.innerHeight-450},time:{index:3},icons:dp({},Pke),flv:{retryCount:0},hls:{retryCount:3},Mp4EncryptPlayer:{retryCount:3},DASHPlugin:{disableBufferBreakCheck:!1},gapJump:{smallGapLimit:1}},Oke={isLive:!0,closeVideoClick:!0,autoplay:!0,autoplayMuted:!0,preloadTime:8,start:{isShowPause:!1,isShowEnd:!1,mode:"hide",disableAnimate:!0},retry:{count:0}},Mke={isLive:!1,closeVideoClick:!1,defaultPlaybackRate:1,closeVideoStopPropagation:!0,autoplay:!1,autoplayMuted:!1,playbackRate:[2,1.5,1.25,{rate:1,iconText:{zh:"倍速",en:"Speed",jp:"Speed"}},.75,.5],start:{isShowPause:!0,isShowEnd:!1,mode:"hide",disableAnimate:!0},progresspreview:{isShowCoverPreview:!0},progress:{isPauseMoving:!0}};function Nke(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=dp({},Ake),n=dp({},e?Oke:Mke);return dp(dp({},t),n)}var zke={startPlay:Dke,play:function(){return(new DOMParser).parseFromString('<svg style="\n height: 18px;\n width: 18px;\n" width="28" height="28" fill="none" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg"><path d="M19.77 11.619c1.768 1.094 1.768 3.668 0 4.762L8.653 23.257c-1.865 1.154-4.273-.188-4.273-2.381V7.125c0-2.194 2.408-3.536 4.273-2.382L19.77 11.62z" fill="#fff"/></svg>',"image/svg+xml").firstChild},pause:function(){return(new DOMParser).parseFromString('<svg style="\n height: 18px;\n width: 18px;\n" width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="7.438" y="5.25" width="4.375" height="17.5" rx=".875" fill="#fff"/><rect x="16.188" y="5.25" width="4.375" height="17.5" rx=".875" fill="#fff"/></svg>',"image/svg+xml").firstChild},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},playNext:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M4.77 4.124l8.358 5.07c.38.23.486.704.238 1.056a.807.807 0 01-.238.22L4.77 15.543c-.38.231-.889.132-1.137-.221a.723.723 0 01-.134-.417V4.762c0-.421.368-.762.822-.762.159 0 .316.042.449.124z" stroke="#fff" stroke-width="1.5"/><path d="M15.5 4.5A.5.5 0 0116 4h.5a.5.5 0 01.5.5v11a.5.5 0 01-.5.5H16a.5.5 0 01-.5-.5v-11z" fill="#fff"/></svg>',"image/svg+xml").firstChild},replay:xke,refresh:function(){return(new DOMParser).parseFromString('<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="M0 0h18v18H0z"/><path d="M10.875 7.5a.375.375 0 01-.375-.375v-.75c0-.207.168-.375.375-.375h2.434a5.25 5.25 0 10.723 4.5h1.55a6.75 6.75 0 11-1.332-5.743V2.626c0-.207.168-.375.375-.375h.75c.207 0 .375.168.375.375V6.75a.75.75 0 01-.694.748L15 7.5h-4.125z" fill="#FFF"/></g></svg>',"image/svg+xml").firstChild},danmuSetting:function(){return(new DOMParser).parseFromString('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.746 12.444a1 1 0 00-.62.216L1.75 13.75V2.166c0-.23.187-.417.417-.417h11.666c.23 0 .417.187.417.417v6.687c.44.044.86.156 1.25.326V2.167c0-.92-.746-1.667-1.667-1.667H2.167C1.247.5.5 1.246.5 2.167V14.61a.833.833 0 001.35.653l1.71-1.354a1 1 0 01.621-.216h5.543a4.195 4.195 0 01-.02-1.25H3.745z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M4.5 4a.5.5 0 00-.5.5V5a.5.5 0 00.5.5h5A.5.5 0 0010 5v-.5a.5.5 0 00-.5-.5h-5zm2.333 4.167a.5.5 0 00-.5.5v.666a.5.5 0 00.5.5h4.292c.311-.266.662-.487 1.042-.653v-.513a.5.5 0 00-.5-.5H6.834zm-3 .5a.5.5 0 01.5-.5H5a.5.5 0 01.5.5v.666a.5.5 0 01-.5.5h-.667a.5.5 0 01-.5-.5v-.666z" fill="#fff"/><path d="M11 4.5a.5.5 0 01.5-.5h.5a.5.5 0 01.5.5V5a.5.5 0 01-.5.5h-.5A.5.5 0 0111 5v-.5z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M14.387 10.134a1 1 0 00-1 0l-1.887 1.09a1 1 0 00-.5.865v2.179a1 1 0 00.5.866l1.887 1.09a1 1 0 001 0l1.886-1.09a1 1 0 00.5-.866v-2.179a1 1 0 00-.5-.866l-1.886-1.089zm-.5 4.711a1.667 1.667 0 100-3.333 1.667 1.667 0 000 3.333z" fill="#fff"/></svg>',"image/svg+xml").firstChild},openDanmu:function(){return(new DOMParser).parseFromString('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.746 12.444a1 1 0 00-.62.216L1.75 13.75V2.166c0-.23.187-.417.417-.417h11.666c.23 0 .417.187.417.417v6.687c.44.044.86.156 1.25.326V2.167c0-.92-.746-1.667-1.667-1.667H2.167C1.247.5.5 1.246.5 2.167V14.61a.833.833 0 001.35.653l1.71-1.354a1 1 0 01.621-.216h5.543a4.195 4.195 0 01-.02-1.25H3.745z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M4.5 4a.5.5 0 00-.5.5V5a.5.5 0 00.5.5h5A.5.5 0 0010 5v-.5a.5.5 0 00-.5-.5h-5zm2.333 4.167a.5.5 0 00-.5.5v.666a.5.5 0 00.5.5h4.292c.311-.266.662-.487 1.042-.653v-.513a.5.5 0 00-.5-.5H6.834zm-3 .5a.5.5 0 01.5-.5H5a.5.5 0 01.5.5v.666a.5.5 0 01-.5.5h-.667a.5.5 0 01-.5-.5v-.666z" fill="#fff"/><path d="M11 4.5a.5.5 0 01.5-.5h.5a.5.5 0 01.5.5V5a.5.5 0 01-.5.5h-.5A.5.5 0 0111 5v-.5z" fill="#fff"/><circle cx="13.833" cy="13" r="3.333" fill="#3370FF"/><path d="M15.591 12.011l-2.133 2.134-1.22-1.22" stroke="#fff" stroke-linecap="round" stroke-linejoin="round"/></svg>',"image/svg+xml").firstChild},closeDanmu:function(){return(new DOMParser).parseFromString('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.746 12.444a1 1 0 00-.62.216L1.75 13.75V2.166c0-.23.187-.417.417-.417h11.666c.23 0 .417.187.417.417v6.687c.44.044.86.156 1.25.326V2.167c0-.92-.746-1.667-1.667-1.667H2.167C1.247.5.5 1.246.5 2.167V14.61a.833.833 0 001.35.653l1.71-1.354a1 1 0 01.621-.216h5.543a4.195 4.195 0 01-.02-1.25H3.745z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M4.5 4a.5.5 0 00-.5.5V5a.5.5 0 00.5.5h5A.5.5 0 0010 5v-.5a.5.5 0 00-.5-.5h-5zm2.333 4.167a.5.5 0 00-.5.5v.666a.5.5 0 00.5.5h4.292c.311-.266.662-.487 1.042-.653v-.513a.5.5 0 00-.5-.5H6.834zm-3 .5a.5.5 0 01.5-.5H5a.5.5 0 01.5.5v.666a.5.5 0 01-.5.5h-.667a.5.5 0 01-.5-.5v-.666z" fill="#fff"/><path d="M11 4.5a.5.5 0 01.5-.5h.5a.5.5 0 01.5.5V5a.5.5 0 01-.5.5h-.5A.5.5 0 0111 5v-.5z" fill="#fff"/><circle cx="13.833" cy="13" r="2.733" stroke="#fff" stroke-width="1.2"/><path fill="#fff" d="M12.833 10.77l3.473 3.472-1.063 1.064-3.474-3.473z"/></svg>',"image/svg+xml").firstChild},volumeLarge:Ike,volumeMuted:Rke,volumeSmall:Lke},Uke={width:"100%",height:"100%",lang:pV(),playsinline:!0,closeVideoClick:!0,closeVideoTouch:!0,whitelist:[""],"x5-video-player-type":"h5-page","x5-video-player-fullscreen":!1,"x5-video-orientation":"landscape|portrait",enterTips:{background:"linear-gradient(90deg,#000,#49e6d3,#49e6d3,#138afc,#000)"},retainPlay:!0,start:{isShowPause:!0,isShowEnd:!0,disableAnimate:!1},fullscreen:{useCssFullscreen:!1},plugins:[],time:{mode:"pc",index:2.5},controls:{mode:"flex"},danmusettings:{index:"2"},danmuicon:{index:"3"},cusPlaybackRatePlugin:{needCheck:!0,needPanel:!1},icons:dp({},zke),flv:{innerDegrade:1,retryCount:0},hls:{innerDegrade:1,retryCount:3},Mp4EncryptPlayer:{retryCount:3},DASHPlugin:{disableBufferBreakCheck:!1},gapJump:{smallGapLimit:1}},Bke={isLive:!0,closeVideoClick:!0,autoplay:!0,autoplayMuted:!0,start:{isShowPause:!1,isShowEnd:!1,disableAnimate:!1,mode:"hide"},retry:{count:0},longwaiting:{duration:3e4},mobile:{gestureY:!1,gestureX:!1,disableActive:!0}},Fke={isLive:!1,closeVideoClick:!1,autoplay:!1,autoplayMuted:!1,playbackRate:[2,1.5,1.25,{rate:1,iconText:"倍速",en:"speed",jp:"speed"},.75,.5],defaultPlaybackRate:1,closeVideoStopPropagation:!0,mobile:{gestureY:!1},start:{isShowPause:!0,isShowEnd:!1,disableAnimate:!1,mode:"hide"}};function Hke(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=dp({},Uke),n=dp({},e?Bke:Fke);return dp(dp({},t),n)}var jke=ON.POSITIONS,Gke=function(e){var t,n="mobile"===eM.device,i=e.pluginName,r=void 0===i?"ExtendPlugin".concat(Sx(t=Math.random().toString()).call(t,-5)):i,o=e.type,a=void 0===o?n?"inner":"normal":o,s=e.position,l=void 0===s?jke.CONTROLS_LEFT:s,c=e.icon,u=void 0===c?Wue:c,h=e.index,d=void 0===h?1:h,f=e.hideAtFullScreen,p=void 0===f||f,v=e.tips,g=void 0===v?{jp:"custom",en:"custom",zh:"自定义","zh-hk":"自定义"}:v;return function(e){rh(n,e);var t=Ah(n);function n(){return Ou(this,n),t.apply(this,arguments)}return Au(n,[{key:"afterCreate",value:function(){var e;this.appendChild(".xgplayer-icon",this.icons[r]),this.initEvents(),p&&null!==(e=this.player)&&void 0!==e&&e.fullscreen&&this.handleFullScreenChange()}},{key:"registerIcons",value:function(){return up({},r,{icon:u,class:"xgplayer-extendicon-svg"})}},{key:"updateIcons",value:function(e){var t=fb(this).call(this,".xgplayer-icon");t&&(t.innerHTML=e)}},{key:"registerLanguageTexts",value:function(){return up({},r,g)}},{key:"initEvents",value:function(){this.handleCallback=hue(this.handleCallback.bind(this),200);var e,t="mobile"===eM.device?"touchend":"click";(this.bind(t,this.handleCallback),this.show(),p)&&(null===(e=this.player)||void 0===e||e.on(NM,this.handleFullScreenChange.bind(this)))}},{key:"handleFullScreenChange",value:function(){var e,t=this.player;null===(e=this.player)||void 0===e||e.changePluginsIcon(r,!(null!=t&&t.fullscreen))}},{key:"handleCallback",value:function(e){var t=this.player;t&&(e.preventDefault(),e.stopPropagation(),t.emit(Hce.PLAYER_EXTEND_BUTTON,r))}},{key:"destroy",value:function(){var e;(this.unbind(["touchend","click"],this.handleCallback),p)&&(null===(e=this.player)||void 0===e||e.off(NM,this.handleFullScreenChange.bind(this)))}},{key:"render",value:function(){var e;return y_(e='\n <xg-icon class="xgplayer-extend-icon">\n <div class="xgplayer-icon">\n </div>\n <div class="xg-tips" lang-key="'.concat(r,'">')).call(e,this.langText[r],"</div>\n </xg-icon>\n ")}}],[{key:"isExtendPlugin",get:function(){return!0}},{key:"type",get:function(){return a}},{key:"textTips",get:function(){return g}},{key:"pluginName",get:function(){return r}},{key:"defaultConfig",get:function(){return{position:l,index:d}}}]),n}(ON)},Vke=function(){function e(t){var n,i,r,o;Ou(this,e);var a=t.config,s=t.root,l=t.player;this.config=a,this.parent=s,this.player=l;var c=null!==(n=null==a?void 0:a.mode)&&void 0!==n?n:bG.INNER;F_(i=wb(bG)).call(i,c)||(c=bG.INNER),this.mode=c,this.isAutoChange=null!==(r=null==a?void 0:a.isAutoChange)&&void 0!==r&&r,this.isShow=!1,this.showCancelBtn=null!==(o=null==a?void 0:a.showCancelBtn)&&void 0!==o&&o,this.initEvents(),this.renderPanel()}var t;return Au(e,[{key:"initEvents",value:function(){var e;this.isAutoChange&&(window.addEventListener("orientationchange",this.handleOrientationChange.bind(this)),null===(e=this.player)||void 0===e||e.on(NM,this.handleOrientationChange.bind(this)))}},{key:"handleOrientationChange",value:function(){var e,t,n,i,r=F_(e=[90,-90,"90","-90"]).call(e,window.orientation);null!==(t=this.player)&&void 0!==t&&t.fullscreen&&r?this.changeMode(bG.FULLSCREEN):this.changeMode(null!==(n=null===(i=this.config)||void 0===i?void 0:i.mode)&&void 0!==n?n:bG.INNER)}},{key:"changeConfig",value:function(e){this.config=e}},{key:"changeMode",value:function(e){this.mode=e,this.player.emit(Hce.PANEL_MODE_CHANGE,{mode:e}),this.destroy(),this.renderPanel()}},{key:"renderPanel",value:function(){var e="xg-mobile-panel panel-".concat(["normal","inner","fullscreen"][this.mode]);switch(this.root=qO.createDom("div","",{},e),this.parent&&(this.parent.appendChild(this.root),this.hide()),this.bind("click",this.handleHide.bind(this)),this.mode){case bG.NORMAL:var t=qO.createDom("div","",{},"xg-mobile-panel-content ".concat(this.showCancelBtn?"xg-mobile-panel-cancel-mode":""));if(this.root.appendChild(t),this.showCancelBtn){var n="zh-cn"===this.player.lang?"zh":this.player.lang,i=qO.createDom("div",wG[n],{},"xg-mobile-panel-cancel");this.root.appendChild(i)}this.container=t,t.addEventListener("click",(function(e){e.stopPropagation(),e.preventDefault()}));break;case bG.INNER:this.container=this.root;break;case bG.FULLSCREEN:var r=qO.createDom("div","",{},"xg-mobile-panel-content");this.root.appendChild(r),this.container=r,r.addEventListener("click",(function(e){e.stopPropagation(),e.preventDefault()}))}}},{key:"showPanel",value:(t=d_(u_().mark((function e(t){var n,i=this,r=arguments;return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.length>1&&void 0!==r[1]?r[1]:"",r.length>2&&void 0!==r[2]&&r[2]&&qO.addClass(t,"item-list-panel-content"),this.setTitle(n),!this.children){e.next=9;break}return e.next=7,this.hide();case 7:return setTimeout((function(){i.children=t,i.container&&(i.title&&i.container.appendChild(i.title),i.container.appendChild(t)),i.show()})),e.abrupt("return");case 9:this.children=t,this.container&&(this.title&&this.container.appendChild(this.title),this.container.appendChild(t)),this.show();case 12:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"updatePanel",value:function(e){this.children&&qO.hasClass(this.children,"item-list-panel-content")&&qO.addClass(e,"item-list-panel-content"),this.children=e,this.container&&(this.container.innerHTML="",this.title&&this.container.appendChild(this.title),this.container.appendChild(e))}},{key:"setTitle",value:function(e){e&&this.mode!==bG.INNER?this.title?this.title.innerHTML=e:this.title=this.renderTitle(e):this.title=void 0}},{key:"renderTitle",value:function(e){return qO.createDom("div",e,{},"xg-mobile-panel-title")}},{key:"show",value:function(){this.isShow=!0,qO.removeClass(this.root,"hide"),qO.addClass(this.root,"active")}},{key:"hide",value:function(){this.isShow=!1,qO.removeClass(this.root,"active"),qO.addClass(this.root,"hide"),this.container&&(this.container.innerHTML="")}},{key:"handleHide",value:function(e){e.stopPropagation(),e.preventDefault(),this.hide()}},{key:"bind",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:"destroy",value:function(){var e;this.parent&&this.root&&this.parent.contains(this.root)&&(this.parent.removeChild(this.root),this.root=null),window.removeEventListener("orientationchange",this.handleOrientationChange.bind(this)),null===(e=this.player)||void 0===e||e.off(NM,this.handleOrientationChange.bind(this))}}]),e}();function Kke(){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 Wke=ON.POSITIONS,Yke=function(e){rh(n,e);var t=Ah(n);function n(e){var i;return Ou(this,n),(i=t.call(this,dp(dp({},e),{},{clientType:"MOBILE"}))).handleButtonChange=function(){var e=i.renderItemList();i.renderPanel(e)},i}return Au(n,[{key:"afterCreate",value:function(){Bce(Rh(n.prototype),"afterCreate",this).call(this)}},{key:"refreshDefinitionList",value:function(){var e,t=this.playerData.current.lineId,n=this.playerData.getDefinitionListByLineId(t);null!==(e=this.player.config)&&void 0!==e&&e.alwaysShowDefinition&&(this.config.alwaysShowDefinition=!0),(n.length>1||this.config.alwaysShowDefinition)&&(this.appendChild(".xgplayer-icon",this.icons.definition),this.initEvents()),this.renderItemList()}},{key:"registerIcons",value:function(){return{definition:{icon:Kke,class:"xgplayer-definition-svg"}}}},{key:"registerLanguageTexts",value:function(){return{definition:{jp:"明快さ",en:"Definition",zh:"清晰度","zh-hk":"清晰度"},definitionSelect:{jp:"クラリティセレクション",en:"Definition Choose",zh:"清晰度选择","zh-hk":"清晰度選擇"},switching:{jp:"に切り替える",en:"Switching to",zh:"正在切换至","zh-hk":"正在切換至"}}}},{key:"afterPlayerInit",value:function(){}},{key:"initEvents",value:function(){this.unbind(["click"],this.handleButtonChange),this.bind(["click"],this.handleButtonChange)}},{key:"renderItemList",value:function(){var e=this,t=this.getCurrentDefinitionInfo(this.player),n=t.defaultDefinition,i=t.list,r=qO.createDom("div","",{},"definition-panel-content");return i.forEach((function(t){t.selected=n===t.definition,t.isDefinitionAuto=e.playerData.isAutoDefinition(t.definition);var i=e.renderItem(t);r.appendChild(i)})),this.renderList=i,r}},{key:"renderItem",value:function(e){var t=this,n=this.playerData.current.definition,i=qO.createDom("div","",{},"panel-Item ".concat(n===e.definition?"select-in":"")),r=this.getShowText(this.i18n,e,n);if(this.showRealDefinition(e)){var o,a,s=null===(o=this.renderList)||void 0===o?void 0:fb(o).call(o,(function(e){return t.playerData.isDefinitionMatch(null==e?void 0:e.definition,t._autoRealDefinition)})),l=this.getShowText(this.i18n,s,null==s?void 0:s.definition);r=l?y_(a="".concat(r,"(")).call(a,l,")"):r}return i.innerHTML=r,i.addEventListener("click",(function(i){if(i.stopPropagation(),i.preventDefault(),e.definition!==t.playerData.current.definition){var r,o=null===(r=t.playerData.getCurrentStreams())||void 0===r?void 0:r[0];t.emitUserAction(i,"change_definition",{from:o,to:e}),t.config.showToastOnManualClick&&t.showToast(e,n),t.playerData.current.definition=e.definition}})),i}},{key:"selectDef",value:function(e){this.selectDefinition(e)}},{key:"changeDefinition",value:function(e){var t,n=this,i=fb(t=this.renderList).call(t,(function(t){return n.playerData.isDefinitionMatch(t.definition,e)}));i&&this.selectDef(i)}},{key:"renderPanel",value:function(e){var t;null===(t=this.player)||void 0===t||null===(t=t.panel)||void 0===t||t.showPanel(e,this.langText.definitionSelect,!0)}},{key:"updatePanel",value:function(){var e,t,n;if(null===(e=this.player)||void 0===e||null===(e=e.panel)||void 0===e||!e.isShow||(null===(t=this.player)||void 0===t||null===(t=t.panel)||void 0===t||null===(t=t.title)||void 0===t?void 0:t.innerHTML)===this.langText.definitionSelect){var i=this.renderItemList();null===(n=this.player)||void 0===n||null===(n=n.panel)||void 0===n||n.updatePanel(i)}}},{key:"destroy",value:function(){Bce(Rh(n.prototype),"destroy",this).call(this),this.unbind(["click"],this.handleButtonChange)}},{key:"render",value:function(){return'\n <xg-icon class="xgplayer-mobile-definition">\n <div class="xgplayer-icon">\n </div>\n </xg-icon>\n '}}],[{key:"pluginName",get:function(){return"DefinitionMobilePlugin"}},{key:"textTips",get:function(){return{jp:"明快さ",en:"Definition",zh:"清晰度","zh-hk":"清晰度"}}},{key:"defaultConfig",get:function(){return{position:Wke.CONTROLS_RIGHT,index:2.7,showToastOnManualClick:!0,alwaysShowDefinition:!1}}}]),n}(fue(ON));function qke(){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 Xke=ON.POSITIONS,$ke=function(e){rh(n,e);var t=Ah(n);function n(e){var i;return Ou(this,n),(i=t.call(this,e)).playerData=e.player.config.playerData,i.dataMonitoring(),i}return Au(n,[{key:"dataMonitoring",value:function(){var e=this;this.playerData&&YP.subscribeProperty(this.playerData.current,"definition",(function(t,n){if(t!==n&&e.player){var i=e.playerData.getCurrentUrl();e.player.changeDefinition({definition:n,url:i}),e.updatePanel(),setTimeout((function(){e.player.paused&&e.player.play()}),1e3)}}))}},{key:"registerIcons",value:function(){return{line:{icon:qke,class:"xgplayer-line-svg"}}}},{key:"registerLanguageTexts",value:function(){return{line:{jp:"ライン",en:"Line",zh:"线路","zh-hk":"線路"},lineSelect:{jp:"ライン選ぶ",en:"Line Choose",zh:"线路选择","zh-hk":"線路選擇"}}}},{key:"afterCreate",value:function(){this.appendChild(".xgplayer-icon",this.icons.line),this.initEvents()}},{key:"afterPlayerInit",value:function(){}},{key:"initEvents",value:function(){this.bind(["click"],this.handleButtonChange.bind(this))}},{key:"handleButtonChange",value:function(){var e=this.renderItemList();this.renderPanel(e)}},{key:"renderItemList",value:function(){var e=this,t=this.playerData.getLineList(),n=qO.createDom("div","",{},"line-panel-content");return t.forEach((function(t){var i=e.renderItem(t);n.appendChild(i)})),n}},{key:"renderItem",value:function(e){var t=this,n=this.playerData.current.lineId,i=qO.createDom("div","",{},"panel-Item ".concat(n===e.lineId?"select-in":""));return i.innerHTML=this.i18n[e.lineTextKey]||e.lineTextKey,i.addEventListener("click",(function(n){n.stopPropagation(),n.preventDefault(),t.player.emit(Hce.LINE_CHANGE,{from:t.playerData.current.lineId,to:e.lineId}),t.playerData.current.lineId=e.lineId,t.player.emit(Fce.PLAYER_REBUILD)})),i}},{key:"renderPanel",value:function(e){var t;null===(t=this.player)||void 0===t||null===(t=t.panel)||void 0===t||t.showPanel(e,this.langText.lineSelect,!0)}},{key:"updatePanel",value:function(){var e,t=this.renderItemList();null===(e=this.player)||void 0===e||e.panel.updatePanel(t)}},{key:"destroy",value:function(){this.unbind(["click"],this.handleButtonChange.bind(this))}},{key:"render",value:function(){return'\n <xg-icon class="xgplayer-mobile-line">\n <div class="xgplayer-icon">\n </div>\n </xg-icon>\n '}}],[{key:"pluginName",get:function(){return"LineMobilePlugin"}},{key:"textTips",get:function(){return{jp:"ライン",en:"Line",zh:"线路","zh-hk":"線路"}}},{key:"defaultConfig",get:function(){return{position:Xke.CONTROLS_RIGHT,index:2.8}}}]),n}(ON);function Zke(){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="M14.6879 3.64579C14.7387 3.60575 14.7387 3.52868 14.6879 3.48864L13.3089 2.40296C13.2433 2.35132 13.147 2.39805 13.147 2.48153V4.6529C13.147 4.73639 13.2433 4.78312 13.3089 4.73147L14.6879 3.64579ZM4 2.61914H11.3001V3.91914H4C3.6134 3.91914 3.3 4.23254 3.3 4.61914V15.6191C3.3 16.0057 3.6134 16.3191 4 16.3191H16C16.3866 16.3191 16.7 16.0057 16.7 15.6191V6.75253H18V15.6191C18 16.7237 17.1046 17.6191 16 17.6191H4C2.89543 17.6191 2 16.7237 2 15.6191V4.61914C2 3.51457 2.89543 2.61914 4 2.61914ZM17.7879 3.48864C17.8388 3.52868 17.8388 3.60575 17.7879 3.64579L16.4089 4.73147C16.3433 4.78312 16.2471 4.73639 16.2471 4.6529V2.48153C16.2471 2.39805 16.3433 2.35132 16.4089 2.40296L17.7879 3.48864Z" fill="white"/>\n</svg>\n',"image/svg+xml").firstChild}var Qke,Jke=ON.POSITIONS,eEe=function(e){rh(n,e);var t=Ah(n);function n(e){var i;return Ou(this,n),(i=t.call(this,e)).state={currentRate:1,isSupport:!0},i.playerData=e.player.config.playerData,i}return Au(n,[{key:"registerIcons",value:function(){return{playbackRate:{icon:Zke,class:"xgplayer-rate-svg"}}}},{key:"registerLanguageTexts",value:function(){return{rate:{jp:"倍速",en:"PlaybackRate",zh:"倍速","zh-hk":"倍速"},rateSelect:{jp:"倍速選ぶ",en:"PlaybackRate",zh:"倍速选择","zh-hk":"倍速選擇"}}}},{key:"afterCreate",value:function(){this.appendChild(".xgplayer-icon",this.icons.playbackRate),this.initEvents(),this.state.currentRate=this.player.playbackRate||1,this.changeIconText()}},{key:"afterPlayerInit",value:function(){}},{key:"initEvents",value:function(){var e=this;this.bind(["click"],this.renderList.bind(this)),this.on(mM,(function(){var t;e.state.currentRate!==e.player.playbackRate&&(e.state.currentRate=e.player.playbackRate,null!==(t=e.player)&&void 0!==t&&null!==(t=t.panel)&&void 0!==t&&t.isShow&&e.updatePanel(),e.changeIconText())}))}},{key:"renderList",value:function(){var e=this.renderItemList();this.renderPanel(e)}},{key:"renderItemList",value:function(){var e=this,t=qO.createDom("div","",{},"playbackRate-panel-content");return this.config.list.forEach((function(n){var i=e.renderItem(n);t.appendChild(i)})),t}},{key:"renderItem",value:function(e){var t=this,n=eC(e)?e:{textKey:e+"X",value:e},i=qO.createDom("div","",{},"panel-Item ".concat(this.state.currentRate===n.value?"select-in":""));return i.innerHTML=this.i18n[n.textKey]||n.textKey,i.addEventListener("click",(function(e){e.stopPropagation(),e.preventDefault();var i={playbackRate:{from:t.player.playbackRate,to:n.value}};t.emitUserAction(e,"change_rate",{props:i}),t.state.currentRate=n.value,t.player.playbackRate=n.value,t.updatePanel(),t.changeIconText()})),i}},{key:"renderPanel",value:function(e){var t;null===(t=this.player)||void 0===t||null===(t=t.panel)||void 0===t||t.showPanel(e,this.langText.rateSelect,!0)}},{key:"updatePanel",value:function(){var e,t=this.renderItemList();null===(e=this.player)||void 0===e||e.panel.updatePanel(t)}},{key:"changeIconText",value:function(){var e,t=this.state.currentRate,n=t%1==0?t.toFixed(1):t+"";switch(n.length){case 1:case 2:case 3:default:e=.7;break;case 4:e=.5}var i=fb(this).call(this,".icon-text");i.style.transform="scale(".concat(e,")"),i.innerHTML=n}},{key:"destroy",value:function(){this.unbind(["click"],this.renderList.bind(this))}},{key:"render",value:function(){return'\n <xg-icon class="xgplayer-mobile-playBackRate">\n <div class="xgplayer-icon">\n <div class="icon-text"></div>\n </div>\n </xg-icon>\n '}}],[{key:"pluginName",get:function(){return"PlaybackRateMobilePlugin"}},{key:"textTips",get:function(){return{jp:"倍速",en:"PlaybackRate",zh:"倍速","zh-hk":"倍速"}}},{key:"defaultConfig",get:function(){return{position:Jke.CONTROLS_RIGHT,index:2.9,list:[2,1.5,1.25,1,.75,.5],default:1}}}]),n}(ON),tEe=function(){function e(t){Ou(this,e),this.__args=null,this.sdk=null,this.playerData=null,this.player=null,this._emitter=null,this.beforeCreate&&"function"==typeof this.beforeCreate&&this.beforeCreate(),this.__args=t,this.pluginName="",this.__init(t)}return Au(e,[{key:"beforeCreate",value:function(){}},{key:"afterCreate",value:function(){}},{key:"beforePlayerCreate",value:function(){}},{key:"afterPlayerCreate",value:function(){}},{key:"destroy",value:function(){}},{key:"__init",value:function(t){var n=this;e.defineGetterOrSetter(this,{sdk:{get:function(){return t.sdk},configurable:!0},player:{get:function(){return t.sdk.getPlayerInstance()},configurable:!0},playerData:{get:function(){return t.sdk.playerData},configurable:!0},pluginName:{get:function(){return t.pluginName?t.pluginName.toLowerCase():n.constructor.pluginName.toLowerCase()},configurable:!0},_emitter:{get:function(){return t.sdk._emitter},configurable:!0}})}},{key:"__destroy",value:function(){var e,t,n=this,i=this.sdk,r=this.pluginName;this.destroy&&"function"==typeof this.destroy&&this.destroy(),W_(e=["sdk","player","playerData","pluginName","_emitter"]).call(e,(function(e){Object.defineProperty(n,e,{writable:!0})})),W_(t=kT(this)).call(t,(function(e){n[e]=null,delete n[e]})),Object.setPrototypeOf&&Object.setPrototypeOf(this,null),delete i._sdkPlugins[r]}}],[{key:"defineGetterOrSetter",value:function(e,t){for(var n in t)Object.defineProperty(e,n,t[n])}},{key:"pluginName",get:function(){return"pluginName"}}]),e}(),nEe=Gue.getVeErrorInfo,iEe={playAuthToken:"",needDefinitionList:!0},rEe=function(e){rh(s,e);var t,n,i,r,o,a=Ah(s);function s(e){var t;return Ou(this,s),(t=a.call(this,e)).isPlayByToken=!1,t.isEncrypt=!1,t.config=null,t.useUnionInfoDRM=!0,t.retryCount=1,t.init(),t}return Au(s,[{key:"beforePlayerCreate",value:(o=d_(u_().mark((function e(){var t;return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isPlayByToken){e.next=5;break}return e.next=3,this.getVideoInfo();case 3:(t=e.sent)&&this.playerData.initPlayData(t);case 5:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"getVideoInfo",value:(r=d_(u_().mark((function e(){var t,n,i,r,o,a,s,l,c,u,h,d,f,p,v,g,y,m,_,b,k,E,w;return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.checkPlayAuthTokenValid()){e.next=3;break}return e.abrupt("return");case 3:if(!this.keyTokenInfo||!this.checkKeyTokenValid()){e.next=5;break}return e.abrupt("return");case 5:if(!this.thirdPartyDrmAuthTokenInfo||!this.checkDrmAuthTokenValid()){e.next=7;break}return e.abrupt("return");case 7:return e.next=9,this.getVideos();case 9:if(e.t0=e.sent,e.t0){e.next=12;break}e.t0={};case 12:return t=e.t0,this.playInfo=t,i=(n=t||{}).type,r=n.poster,o=n.vid,a=n.dashOpts,s=n.thumbs,l=n.barrageMaskUrl,c=t.playList||[],u=i||KG(this.config),this.playerData.isBusinessDrm=c.some((function(e){return e.DrmType===NR.DRM_ENCRYPT})),e.next=20,this.getPrivateDrmInfo(c,o,u);case 20:if(this.playerData.options.vid=o,this.config.needPoster&&r&&("string"==typeof this.playerData.options.poster?this.playerData.options.poster=r:"object"===Du(this.playerData.options.poster)?this.playerData.options.poster.poster=r:this.playerData.options.poster=r),this.config.needThumbs&&s.length>0&&this.getThumbnailConfig(s),this.config.needBarrageMask&&l&&this.getBarrageMaskUrl(l),!(c.length>0)){e.next=40;break}return p=(null===(h=this.playerData)||void 0===h||null===(h=h.adapter)||void 0===h?void 0:h.generatePlaylistFromServer(t))||qd(c),v=this.config.defaultDefinition||this.playerData.configs.defaultDefinition,g=p[0],v&&(y=fb(p).call(p,(function(e){return(e.mapDefinition||e.definition||e.Definition).toLocaleLowerCase()===v.toLocaleLowerCase()})))&&(g=y),m=this.config.needDefinitionList?p:[g],this.isEncrypt=!(null==m||!m[0].kid),_={vid:o,playList:m},"hls"===u&&this.isEncrypt&&!this.playerData.isBusinessDrm&&this.getEncryptHlsConfig(_),("dash"===u||this.playerData.configs.DASHPlugin)&&this.getDashPluginConfig(dp(dp({},_),{},{dashOpts:a}),v),b=this.playerData.configs,k=b.autoBitrateOpts,E=b.Mp4EncryptPlayer,w=b.enableMp4MSE,(F_(d=["mp4","m4a"]).call(d,u)&&this.isEncrypt||"mp4"===u&&null!=k&&k.enable||E||w)&&this.getMp4EncryptConfig(_),this.getDrmConfig(_),e.abrupt("return",{playList:m,codec:(null===(f=this.tokenInfo)||void 0===f||null===(f=f.Codec)||void 0===f?void 0:f.toLowerCase())||zR.H264,defaultDefinition:g.definition});case 40:LG.error("get no video by playAuthToken");case 41:e.next=46;break;case 43:e.prev=43,e.t1=e.catch(0),LG.error(e.t1);case 46:case"end":return e.stop()}}),e,this,[[0,43]])}))),function(){return r.apply(this,arguments)})},{key:"getVideos",value:(i=d_(u_().mark((function e(){var t,n,i=this;return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=function(e){var t,n;try{if(100006===ER(JSON.parse(e.response),"ResponseMetadata.Error.CodeN")){var r;LG.error("playAuthToken is invalid or expired, please check or update your playAuthToken");var o={errorType:"token",errorCode:9101,veError:nEe(Pue.PLAY_AUTH_TOKEN_EXPIRED),errorMessage:"playAuthToken has expired",ext:{serveResponse:"string"==typeof(null==e?void 0:e.response)?null==e?void 0:e.response:"",serveStatus:null==e?void 0:e.status,playAuthToken:i.config.playAuthToken,config:i.config},originError:e};return null===(r=i.sdk)||void 0===r?void 0:r.delayError.push(o)}}catch(s){LG.log(s)}null===(t=i._emitter)||void 0===t||t.emit(Hce.GET_PLAY_URL_ERR,e);var a={errorType:"token",errorCode:9100,errorMessage:"get play url error by playAuthToken, please check the playAuthToken",veError:nEe(Pue.GET_PLAY_INFO_ERR),ext:{serveResponse:"string"==typeof(null==e?void 0:e.response)?null==e?void 0:e.response:"",serveStatus:null==e?void 0:e.status,playAuthToken:i.config.playAuthToken},originError:e};null===(n=i.sdk)||void 0===n||n.delayError.push(a)},n=function(){var e=d_(u_().mark((function e(n){return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.config.playDomain||502!==(null==n?void 0:n.status)||!i.playerData.apiMap.backupPlayDomain){e.next=7;break}return i.playerData.playDomainDegrade=!0,e.next=4,XG((function(){return qG(dp({playDomain:i.playerData.playDomain},i.config))}),i.retryCount,(function(e){return 502===e.status}),t);case 4:return e.abrupt("return",e.sent);case 7:t(n);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.next=4,XG((function(){return qG(dp({playDomain:i.config.playDomain||i.playerData.playDomain},i.config))}),this.retryCount,(function(e){return 502===e.status}),n);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"getPrivateDrmInfo",value:(n=d_(u_().mark((function e(t,n,i){var r,o,a,s,l,c,u,h,d,f,p,v=this;return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.config.getDrmAuthToken||"function"!=typeof this.config.getDrmAuthToken||!this.playerData.unionId){e.next=35;break}if(this.sessionId=(new Date).getTime().toString(),"hls"!==i){e.next=9;break}return e.next=5,this.sdk.sdkUmdLoader.loadPlugins(Sse.HLSEncrypt);case 5:s=e.sent,o=null==s||null===(a=s.updateUnionInfo)||void 0===a?void 0:a.call(s,this.playerData.unionId,this.sessionId),e.next=21;break;case 9:if("dash"!==i){e.next=16;break}return e.next=12,this.sdk.sdkUmdLoader.loadPlugins(Sse.DASH);case 12:c=e.sent,o=null==c||null===(l=c.updateUnionInfo)||void 0===l?void 0:l.call(c,this.playerData.unionId,this.sessionId),e.next=21;break;case 16:if(!F_(r=["mp4","m4a"]).call(r,i)){e.next=21;break}return e.next=19,this.sdk.sdkUmdLoader.loadPlugins(Sse.MP4Encrypt);case 19:h=e.sent,o=null==h||null===(u=h.updateUnionInfo)||void 0===u?void 0:u.call(h,this.playerData.unionId,this.sessionId);case 21:if(o){e.next=24;break}return LG.error("updateUnionInfo fail"),e.abrupt("return");case 24:return d=qd(new DS(W_(t).call(t,(function(e){return e.kid})))).join(","),e.prev=25,e.next=28,vV(dV(this.config.getDrmAuthToken(d,n,o)),200,"The execution time of obtaining privateDrmAuthToken by getDrmAuthToken function of options has exceeded more than 200ms");case 28:(f=e.sent)&&"string"==typeof f&&(this.privateDrmAuthToken=f,null!=(p=GG(f))&&p.DrmType&&(this.useUnionInfoDRM="webdevice"===(null==p?void 0:p.DrmType)),t.forEach((function(e){e.drmKeyToken=v.privateDrmAuthToken}))),e.next=35;break;case 32:e.prev=32,e.t0=e.catch(25),LG.error("get privaterDrmToken fail");case 35:case"end":return e.stop()}}),e,this,[[25,32]])}))),function(e,t,i){return n.apply(this,arguments)})},{key:"getEncryptHlsConfig",value:function(e){var t,n,i=e||{},r=i.playList,o=i.vid,a=this.config,s=a.playDomain,l=a.keyToken,c=a.getKeyType,u=null===(t=this.playerData.configs)||void 0===t?void 0:t.EncryptHlsPlugin,h="object"===Du(u)?u:{},d=null==r||null===(n=r[0])||void 0===n?void 0:n.kid;if(l)this.playerData.options.EncryptHlsPlugin=dp({keyToken:l,playDomain:s||this.playerData.playDomain,getKeyType:c||"TOP",preferMMS:!0,preferMMSStreaming:!0},h);else if(this.privateDrmAuthToken&&this.sessionId){var f=GG(this.privateDrmAuthToken),p=parseInt(""+f["X-Expires"]),v=isNaN(p)?30:p;this.playerData.options.EncryptHlsPlugin=dp({vid:o,kid:d,keyTokenExpiredDuration:v,drmKeyToken:this.privateDrmAuthToken,useUnionInfoDRM:this.useUnionInfoDRM,sessionId:this.sessionId,playDomain:s||this.playerData.playDomain,preferMMS:!0,preferMMSStreaming:!0},h)}}},{key:"getThumbnailConfig",value:function(e){var t=e[0],n=dp({},this.playerData.configs.thumbnail||{});this.playerData.options.thumbnail=dp({pic_num:t.CaptureNum,urls:t.StoreUrls,width:t.CellWidth,height:t.CellHeight,col:t.ImgXLen,row:t.ImgYLen},n)}},{key:"getBarrageMaskUrl",value:function(e){var t,n=null===(t=this.playerData.configs)||void 0===t?void 0:t.DanmuPlugin,i="object"===Du(n)?n:{},r=dp({},(null==i?void 0:i.maskConfig)||{});this.playerData.configs.DanmuPlugin?(this.playerData.options.DanmuPlugin.active=!0,this.playerData.options.DanmuPlugin.maskActive=!0,this.playerData.options.DanmuPlugin.maskConfig=dp({maskUrl:e},r)):this.playerData.options.DanmuPlugin={active:!0,maskActive:!0,maskConfig:dp({maskUrl:e},r)}}},{key:"getDashPluginConfig",value:function(e,t){var n,i,r,o=e||{},a=o.vid,s=o.playList,l=void 0===s?[]:s,c=o.dashOpts,u=this.config.playDomain,h=dp({},(null===(n=this.playerData.configs)||void 0===n?void 0:n.DASHPlugin)||{}),d=null==l||null===(i=l[0])||void 0===i?void 0:i.kid,f=AT(r=c.Data.PlayInfoList).call(r,(function(e,t){var n=t.Definition||t.Quality,i="",r=fb(l).call(l,(function(e){return e.Definition===n||e.Quality===n}));return r&&(i=r.definition),e[n]=i,e}),{});if(this.playerData.dashOpts=c,this.privateDrmAuthToken&&this.sessionId&&!this.playerData.isBusinessDrm){var p=GG(this.privateDrmAuthToken),v=parseInt(""+p["X-Expires"]),g=isNaN(v)?30:v;this.playerData.options.DASHPlugin=dp({playInfoType:"TOP",vid:a,dashOpts:c,defaultFormat:"dash",definitionText:f,defaultDefinition:t,useUnionInfoDRM:this.useUnionInfoDRM,kid:d,keyTokenExpiredDuration:g,sessionId:this.sessionId,drmKeyToken:this.privateDrmAuthToken,playDomain:u||this.playerData.playDomain,replayReset:!1,disableBufferBreakCheck:!1,waitingTimeOut:5e3},h)}else this.playerData.options.DASHPlugin=dp({vid:a,dashOpts:c,playInfoType:"TOP",defaultFormat:"dash",definitionText:f,defaultDefinition:t,replayReset:!1,disableBufferBreakCheck:!1,waitingTimeOut:5e3},h)}},{key:"getMp4EncryptConfig",value:function(e){var t,n,i=e.playList,r=e.vid,o=this.config.playDomain,a=null==i||null===(t=i[0])||void 0===t?void 0:t.kid,s=null===(n=this.playerData.configs)||void 0===n?void 0:n.Mp4EncryptPlayer,l="object"===Du(s)?s:{};if(this.isEncrypt){if(this.privateDrmAuthToken&&this.sessionId){var c=GG(this.privateDrmAuthToken),u=parseInt(""+c["X-Expires"]),h=isNaN(u)?30:u;this.playerData.options.Mp4EncryptPlayer=dp({vid:r,isEncrypt:!0,rangeMaxDuration:10,kid:a,drmKeyToken:this.privateDrmAuthToken,useUnionInfoDRM:this.useUnionInfoDRM,keyTokenExpiredDuration:h,sessionId:this.sessionId,playDomain:o||this.playerData.playDomain,retryCount:3},l)}}else this.playerData.options.Mp4EncryptPlayer=dp({vid:r,retryCount:3},l)}},{key:"getDrmConfig",value:function(e){var t=this.config,n=t.thirdPartyDrmAuthToken,i=t.serverCertificatePath;if(n)try{var r,o,a,s,l=e.vid,c=e.playList,u=null==c?void 0:c[0],h=u.kid,d=u.codec;if(!h||!l)return void LG.warn("get kid or vid fail");var f,p=null===(r=this.playerData.configs)||void 0===r?void 0:r.drm,v="object"===Du(p)?p:{},g=this.config.playDomain||this.playerData.playDomain,y=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GetPlayInfoToken",n=HG(window.atob(e));return n?n[t]:""}(this.config.thirdPartyDrmAuthToken,"GetThirdPartyDrmAuthToken"),m=dp((up(a={ignoreLicenseHeader:!1,unRecord:null!==(o=this.config.unRecord)&&void 0!==o&&o,contentType:UR[d],initDataType:"cenc"},SG.FAIRPLAY,{serverProcessSPCPath:ZG(SG.FAIRPLAY,h,g,y),serverCertificatePath:i}),up(a,SG.WIDEVINE,{serverProcessSPCPath:ZG(SG.WIDEVINE,h,g,y)}),up(a,SG.PLAYREADY,{serverProcessSPCPath:ZG(SG.PLAYREADY,h,g,y)}),a),v);if(null!==(s=this.sdk)&&void 0!==s&&null!==(s=s.player)&&void 0!==s&&null!==(s=s.plugins)&&void 0!==s&&s.drm)null===(f=this.sdk)||void 0===f||null===(f=f.player)||void 0===f||null===(f=f.plugins)||void 0===f||f.drm.updateConfig(m);this.playerData.options.drm=m}catch(_){LG.error("generate drm config error:",_)}else this.playerData.options.drm={initDataType:"cenc"}}},{key:"init",value:function(){var e=this.playerData.configs.getVideoByToken,t=void 0===e?{}:e;this.initConfig(t)}},{key:"initConfig",value:function(e){if(this.isPlayByToken=!!e.playAuthToken,this.isPlayByToken){if(this.config=VS({},iEe,e),this.tokenInfo=jG(e.playAuthToken),e.keyToken){var t=(n=e.keyToken,/^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)$/.test(n)?window.atob(e.keyToken):e.keyToken);this.keyTokenInfo=GG(t)}e.thirdPartyDrmAuthToken&&(this.thirdPartyDrmAuthTokenInfo=jG(e.thirdPartyDrmAuthToken,"GetThirdPartyDrmAuthToken")),e.retryCount&&(this.retryCount=e.retryCount)}var n}},{key:"updateAuthToken",value:(t=d_(u_().mark((function e(t,n){var i,r;return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=VS({},this.config,t),this.initConfig(i),e.next=4,this.getVideoInfo();case 4:(r=e.sent)&&(n?this.playerData.initPlayData(r):(this.playerData.updateConfigs(dp(dp({},r),{},{defaultDefinition:this.playerData.current.definition})),this.playerData.updatePlayList(),this.playerData.updateCheckExpireData()));case 6:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})},{key:"checkPlayAuthTokenValid",value:function(){if(WG(this.tokenInfo)){var e,t;LG.error("playAuthToken is expired, please check or update your playAuthToken"),null===(e=this.sdk)||void 0===e||e.delayEvents.push({name:Fce.TOKEN_EXPIRED,payload:{type:"playAuthToken",token:this.tokenInfo}});var n={errorType:"token",errorCode:9101,veError:nEe(Pue.PLAY_AUTH_TOKEN_EXPIRED),errorMessage:"playAuthToken has expired",ext:{playAuthToken:this.config.playAuthToken,config:this.config},originError:void 0};return null===(t=this.sdk)||void 0===t||t.delayError.push(n),!0}return!1}},{key:"checkKeyTokenValid",value:function(){if(WG(this.keyTokenInfo)){var e,t;LG.error("keyToken is expired, please check or update your keyToken"),null===(e=this.sdk)||void 0===e||e.delayEvents.push({name:Fce.TOKEN_EXPIRED,payload:{type:"keyToken",token:this.keyTokenInfo}});var n={errorType:"token",errorCode:9102,veError:nEe(Pue.HLS_KEY_TOKEN_EXPIRED),errorMessage:"keyToken for hls encrypt play has expired",ext:{keyToken:this.config.keyToken,config:this.config},originError:void 0};return null===(t=this.sdk)||void 0===t||t.delayError.push(n),!0}return!1}},{key:"checkDrmAuthTokenValid",value:function(){if(WG(this.thirdPartyDrmAuthTokenInfo)){var e,t;LG.error("thirdPartyDrmAuthToken is expired, please check or update your thirdPartyDrmAuthToken"),null===(e=this.sdk)||void 0===e||e.delayEvents.push({name:Fce.TOKEN_EXPIRED,payload:{type:"thirdPartyDrmAuthToken",token:this.thirdPartyDrmAuthTokenInfo}});var n={errorType:"token",errorCode:9103,errorMessage:"thirdPartyDrmAuthToken for DRM has expired",veError:nEe(Pue.THIRD_PARTY_DRM_AUTH_TOKEN_EXPIRED),ext:{thirdPartyDrmAuthToken:this.config.thirdPartyDrmAuthToken,config:this.config},originError:void 0};return null===(t=this.sdk)||void 0===t||t.delayError.push(n),!0}return!1}}],[{key:"pluginName",get:function(){return"AuthToken"}}]),s}(tEe),oEe=function(e){rh(r,e);var t,n,i=Ah(r);function r(e){return Ou(this,r),i.call(this,e)}return Au(r,[{key:"beforePlayerCreate",value:(n=d_(u_().mark((function e(){return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.prepareAbrModule();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"prepareAbrModule",value:(t=d_(u_().mark((function e(){var t;return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",null===(t=this.sdk.playerData)||void 0===t||null===(t=t.adapter)||void 0===t?void 0:t.prepareAbrModule(this.playerData,this.sdk.sdkUmdLoader));case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"adaptAbrOptions",value:function(){var e,t=null===(e=this.playerData.configs)||void 0===e?void 0:e.autoBitrateOpts;if(t){var n=this.playerData.defaultDefinition;return dp(dp(dp({},r.defaultConfig),t),{},{autoDefiText:t.autoDefinitionText||"",isOpenAutoDefi:this.playerData.isOpenABR(),isPlayAutoDefi:this.playerData.isPlayAutoDefinition(n)})}}},{key:"applyAbrConfig",value:function(e){var t,n=this.adaptAbrOptions();n&&(null===(t=this.sdk.playerData)||void 0===t||null===(t=t.adapter)||void 0===t||t.applyAbrPluginConfig(e,n))}}],[{key:"pluginName",get:function(){return"Abr"}},{key:"defaultConfig",get:function(){return{autoDefiText:"",isOpenAutoDefi:!1,interval:1e3,hurryThreshold:.25,lowThreshold:.4,highThreshold:.7,noStallCheckTime:5,isOpenHint:!1,method:31}}}]),r}(tEe),aEe=function(e){rh(n,e);var t=Ah(n);function n(e){return Ou(this,n),t.call(this,e)}return Au(n,[{key:"adaptRangeOptions",value:function(){var e,t,n,i,r,o,a,s,l=null!==(e=null===(t=this.playerData.configs)||void 0===t?void 0:t.adaptRange)&&void 0!==e?e:void 0;if(null!=l&&l.enable&&null!==(n=this.playerData.adapter)&&void 0!==n&&null!==(i=n.canAdaptRangeEnable)&&void 0!==i&&i.call(n)){var c=this.playerData.adapter.adaptRangeDefaultOptions();return dp(dp(dp({},null!=c?c:{}),l),{},{minTargetCacheDur:null!==(r=l.minCacheDuration)&&void 0!==r?r:null==c?void 0:c.minTargetCacheDur,maxTargetCacheDur:null!==(o=l.maxCacheDuration)&&void 0!==o?o:null==c?void 0:c.maxTargetCacheDur,rangeMinDuration:null!==(a=l.minRangeDuration)&&void 0!==a?a:null==c?void 0:c.rangeMinDuration,rangeMaxDuration:null!==(s=l.maxRangeDuration)&&void 0!==s?s:null==c?void 0:c.rangeMaxDuration})}}},{key:"applyRangeConfig",value:function(e){var t=this.adaptRangeOptions();t&&e&&this.playerData.adapter.applyAdaptRangePluginConfig(e,t)}}],[{key:"pluginName",get:function(){return"AdaptRange"}}]),n}(tEe),sEe=function(){function e(){Ou(this,e),this.umdMap=Cse,this.backupUmdUrlMap={},this.region="sg",this.customPluginPublicPath=""}return Au(e,[{key:"pluginPublicPath",get:function(){var e;return this.customPluginPublicPath||(null===(e=kV(this.region))||void 0===e?void 0:e.__UMD_PRE_PATH__)}},{key:"updateBackupMap",value:function(e){this.backupUmdUrlMap=e}},{key:"loadExtraCdn",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return new rb((function(n,i){var r=t?document.createElement("script"):document.createElement("link");t?r.src=e:(r.rel="stylesheet",r.type="text/css",r.href=e),r.onerror=function(){i("url: ".concat(e))},r.onload=r.onreadystatechange=function(){null!=this&&this.readyState&&"loaded"!==(null==this?void 0:this.readyState)&&"complete"!==(null==this?void 0:this.readyState)||(r.onload=r.onreadystatechange=null,n())},document.body.appendChild(r)}))}},{key:"loadPlugins",value:function(t,n){var i=this;return new rb((function(r){var o,a=y_(o="".concat(i.pluginPublicPath,"_")).call(o,t,"_load");if(EP(e.jsLoadMap,a))r(e.jsLoadMap[a]);else{var s,l,c=i.umdMap[t];if((null===(s=i.importedPlugins)||void 0===s?void 0:s.length)>0&&c.pluginName){var u,h=fb(u=i.importedPlugins).call(u,(function(e){return e.pluginName===c.pluginName}));if(h)return r(h)}var d=function(e){i.failCallback&&"function"==typeof i.failCallback&&i.failCallback&&i.failCallback(t,e),r(null)};if(!c)return LG.error("".concat(t," umd info not exit")),d(void 0);var f=c.name;if(c.devPath,f&&window[f])return e.jsLoadMap[a]=window[f],n&&n(),r(e.jsLoadMap[a]);var p=i.pluginPublicPath+"/"+t+".js",v=e.jsLoadPromiseMap[a];LG.log(y_(l="umdLoader cache hit ".concat(a,"=")).call(l,!!v)),v||(v=gV((function(){return i.loadExtraCdn(p,!0)}),2),e.jsLoadPromiseMap[a]=v),v.then((function(){f?(e.jsLoadMap[a]=window[f],n&&n(),r(window[f])):(e.jsLoadMap[a]=!0,n&&n(),r(null))})).catch((function(o){var s,l,c=i.backupUmdUrlMap[t];return c?(l=c)&&qP(l)&&/^(?:http|data:|\/)/.test(l)?void i.loadExtraCdn(i.backupUmdUrlMap[t]).then((function(){e.jsLoadMap[a]=window[f],n&&n(),r(e.jsLoadMap[a])})).catch((function(e){var n;LG.error(y_(n="load ".concat(t," error, ")).call(n,e)),d(void 0)})):(LG.error("umdMap.".concat(t," isn't a valid url")),d(void 0)):(LG.error(y_(s="load ".concat(t," error, ")).call(s,o)),d(o))}))}}))}}]),e}(),lEe=sEe;lEe.jsLoadMap={},lEe.jsLoadPromiseMap={};var cEe=function(e){return e.H265="h265",e.PRELOAD="preload",e.ADAPT_RANGE="adaptRange",e}(cEe||{}),uEe=function(){function e(){Ou(this,e),this.preloaderStatus=1,this.status=0,this.preloadCacheConfig={},this.preloadCacheList=[],this.initUmdLoader()}var t,n,i,r,o,a,s,l;return Au(e,[{key:"initUmdLoader",value:function(){this.sdkUmdLoader=new lEe}},{key:"fetchWebId",value:(l=d_(u_().mark((function e(){var t,n,i=this;return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(t=this.config)||void 0===t||!t.deviceId){e.next=2;break}return e.abrupt("return",rb.resolve(null===(n=this.config)||void 0===n?void 0:n.deviceId));case 2:return e.abrupt("return",new rb((function(e){var t;return null!==(t=i.tea)&&void 0!==t&&t.getToken?i.tea.getToken((function(t){return e(null==t?void 0:t.web_id)})):e("default_web_id")})).then((function(e){return i.config=dp(dp({},i.config),{},{deviceId:e}),i.webId})));case 3:case"end":return e.stop()}}),e,this)}))),function(){return l.apply(this,arguments)})},{key:"initTea",value:function(){this.tea=new AX("".concat(e.TEA_ID,"_vestrategy_tracker")),this.tea.init({app_id:e.TEA_ID,channel:"sg"}),this.tea.start()}},{key:"fetchVeStrategy",value:(s=d_(u_().mark((function e(){var t=this;return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.config.Module){e.next=2;break}return e.abrupt("return");case 2:return e.abrupt("return",this.sdkUmdLoader.loadPlugins(Sse.VeStrategy).then((function(e){e&&(t.config=dp(dp({},t.config),{},{Module:e}))})));case 3:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"fetchStrategies",value:(a=d_(u_().mark((function t(){var n,i,r=this;return u_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i={},t.next=3,rb.all(W_(n=kT(this.config.strategies)).call(n,function(){var t=d_(u_().mark((function t(n){var o;return u_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.config.strategies[n]){t.next=2;break}return t.abrupt("return");case 2:if(!0===r.config.strategies[n]&&(r.config.strategies[n]={}),!r.config.strategies[n].Strategy){t.next=8;break}i[n]=r.config.strategies[n],t.next=12;break;case 8:return t.next=10,r.sdkUmdLoader.loadPlugins(e.mapStrategyNameToUmdKey(n));case 10:(o=t.sent)&&(i[n]=dp(dp({},r.config.strategies[n]),{},{Strategy:o}));case 12:i[n]=TV(i[n]);case 13:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 3:return this.config.strategies=i,t.abrupt("return",i);case 5:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"initOnce",value:(o=d_(u_().mark((function e(t){var n,i,r,o;return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&t.appId){e.next=2;break}return e.abrupt("return");case 2:return this.initTea(),this.status=1,this.config=t,e.prev=5,e.next=8,rb.all([this.fetchWebId(),this.fetchVeStrategy()]);case 8:return e.next=10,this.fetchStrategies();case 10:e.next=14;break;case 12:e.prev=12,e.t0=e.catch(5);case 14:if(n=this.config,i=n.appId,r=n.deviceId,o=n.Module,!(i&&r&&o)){e.next=21;break}return e.next=18,o.bootstrap(dp(dp({},this.config),{},{strategies:this.config.strategies,tracker:{Collector:AX,enableABVersion:!1},log:{logger:LG}}));case 18:this.status=2,e.next=22;break;case 21:this.status=3;case 22:return e.abrupt("return",this.isReady());case 23:case"end":return e.stop()}}),e,this,[[5,12]])}))),function(e){return o.apply(this,arguments)})},{key:"init",value:(r=d_(u_().mark((function e(t){var n;return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.initPromise||(null!=t&&null!==(n=t.plugins)&&void 0!==n&&n.length&&(this.sdkUmdLoader.importedPlugins=null==t?void 0:t.plugins),this.initPromise=this.initOnce(t)),e.abrupt("return",this.initPromise);case 2:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"initPreloadService",value:(i=d_(u_().mark((function e(t){var n,i,r,o,a,s,l,c,u,h,d,f,p=this;return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l=null==t||null===(n=t.strategies)||void 0===n?void 0:n.preload,c="boolean"==typeof l,l&&(c||null==l||!l.disabled)){e.next=5;break}return this.preloaderStatus=0,e.abrupt("return",!1);case 5:if(u=null===(i=TV(l))||void 0===i?void 0:i.config,null!=(h=null===(r=this.config)||void 0===r||null===(r=r.strategies)||void 0===r||null===(r=r.preload)||void 0===r||null===(r=r.Strategy)||void 0===r?void 0:r.preloader)&&h.register){e.next=10;break}return this.preloaderStatus=3,e.abrupt("return",!1);case 10:return e.next=12,this.getStrategyRecommendationsAsync();case 12:if(null!=(d=e.sent)&&null!==(o=d.result)&&void 0!==o&&null!==(o=o.preload)&&void 0!==o&&o.enable){e.next=16;break}return this.preloaderStatus=0,e.abrupt("return");case 16:return h.init(d_(u_().mark((function e(){var t,n,i,r,o;return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return LG.log("preloader init"),e.next=3,rb.all([p.sdkUmdLoader.loadPlugins(Sse.Preloader),p.sdkUmdLoader.loadPlugins(Sse.MP4Encrypt)]);case 3:if(n=e.sent,i=IS(n,2),r=i[0],o=i[1],null!=r&&r.PreloaderManager&&o){e.next=11;break}return p.preloaderStatus=3,LG.error("preloader init error"),e.abrupt("return");case 11:return e.abrupt("return",dp(dp({},u),{},{PreloaderModule:r.PreloaderManager,loaders:ib(t=[null==o?void 0:o.Mp4Preloader]).call(t,(function(e){return!!e})),playPlugins:[o]}));case 12:case"end":return e.stop()}}),e)})))),e.next=19,h.prepare();case 19:if(f=e.sent){e.next=24;break}return this.preloaderStatus=3,LG.log("preloader prepare fail",f),e.abrupt("return");case 24:this.preloaderStatus=2,null===(a=h.inst)||void 0===a||null===(a=a.call(h))||void 0===a||null===(s=a.on)||void 0===s||s.call(a,"prf_data_size",(function(e){var t,n;null===(t=p.tea)||void 0===t||null===(n=t.event)||void 0===n||n.call(t,"veplayer_preload_prf_data_size",dp({},e))})),this.preloader=h,this.initPreloaderConfig();case 28:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"addPreloadList",value:function(e){var t;if(1===this.preloaderStatus)return this.preloadCacheList=y_(t=this.preloadCacheList).call(t,null!=e?e:[]),void LG.log("preloader add preload cache list",e);2!==this.preloaderStatus?this.preloadCacheList=[]:this.preloader.addPreloadList(e)}},{key:"setPreloadList",value:(n=d_(u_().mark((function e(t){return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(1!==this.preloaderStatus){e.next=4;break}return this.preloadCacheList=null!=t?t:[],LG.log("preloader set preload cache list",t),e.abrupt("return");case 4:if(2!==this.preloaderStatus){e.next=7;break}return this.preloader.setPreloadList(null!=t?t:[]),e.abrupt("return");case 7:this.preloadCacheList=[];case 8:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"setPreloadScene",value:function(e,t){var n;if(F_(n=[1,0]).call(n,e))return 1===this.preloaderStatus?(this.preloadCacheScene!==e&&(this.preloadCacheList=[],LG.log("preloader reset preload cache list")),this.preloadCacheScene=e,this.preloadCacheConfig=dp(dp({},this.preloadCacheConfig),null!=t?t:{}),void LG.log("preloader set preload cache config",this.preloadCacheScene,this.preloadCacheConfig)):void(2!==this.preloaderStatus||this.preloader.setPreloadScene(e,t))}},{key:"prepare",value:function(){return this.initPromise||rb.resolve(this.isReady())}},{key:"getDeviceId",value:function(){var e;return null===(e=this.config)||void 0===e?void 0:e.deviceId}},{key:"isReady",value:function(){return 2===this.status}},{key:"getStrategyRecommendations",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(!this.isReady())return{plugins:[],pluginConfiguration:{}};var n=this.config.Module.rec(e,t)||{};return LG.log("strategy recommendations:",n),n}},{key:"getStrategyRecommendationsAsync",value:(t=d_(u_().mark((function e(){var t,n,i,r=arguments;return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=r.length>0&&void 0!==r[0]?r[0]:void 0,n=r.length>1&&void 0!==r[1]?r[1]:void 0,this.isReady()){e.next=4;break}return e.abrupt("return",{plugins:[],pluginConfiguration:{}});case 4:return e.next=6,this.config.Module.recAsync(t,n);case 6:return i=e.sent,LG.log("strategy recommendations:",i),e.abrupt("return",i);case 9:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"isHevcRecommended",value:function(){var e;return!(null===(e=this.getStrategyRecommendations().result)||void 0===e||null===(e=e.h265)||void 0===e||!e.enableH265Hardware)}},{key:"initPreloaderConfig",value:function(){var e,t,n,i;"undefined"!==this.preloadCacheScene&&this.preloader.setPreloadScene(this.preloadCacheScene,null!==(t=this.preloadCacheConfig)&&void 0!==t?t:{});null!==(e=this.preloadCacheList)&&void 0!==e&&e.length&&(this.preloader.setPreloadList(this.preloadCacheList),null===(n=(i=this.preloader).checkPreloadData)||void 0===n||n.call(i),this.preloadCacheList=[])}}],[{key:"mapStrategyNameToUmdKey",value:function(e){switch(e){case"h265":return Sse.VeStrategyH265;case"preload":return Sse.VeStrategyPreload;case"adaptRange":return Sse.VeStrategyAdaptRange;default:return null}}}]),e}(),hEe=uEe;hEe.TEA_ID=null===(Qke=kV())||void 0===Qke?void 0:Qke.__LOG_TEA_ID__;var dEe,fEe,pEe,vEe,gEe=new hEe,yEe=function(e){rh(n,e);var t=Ah(n);function n(){return Ou(this,n),t.apply(this,arguments)}return Au(n,[{key:"applyFinalStrategy",value:function(e){if(gEe.isReady()){var t,n,i=this.playerData.configs.duration||(null===(t=this.playerData.playList)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.duration)||-1,r=i>0&&i<=180?"svideo":i>180&&i<=1800?"mvideo":"lvideo",o={vtype:null===(n=this.playerData.adapter)||void 0===n?void 0:n.streamType,duration:i,videoLabel:r},a=gEe.getStrategyRecommendations(void 0,o).result;LG.log("VodLogCommon Final StrategyConfig:",a);var s,l=null==a?void 0:a[cEe.ADAPT_RANGE];if(null!=l&&l.enable&&null!=l&&l.options)null===(s=this.playerData.adapter)||void 0===s||s.applyAdaptRangeStrategy(e,l.options)}}}],[{key:"pluginName",get:function(){return"Strategy"}}]),n}(tEe),mEe={init:function(e){var t;if(e){var n,i=e.playerData.sdkPlugins;if(null!==(t=e.playerData)&&void 0!==t&&t.isLive)e.sdkPlugins=qd(i);else e.sdkPlugins=y_(n=[rEe,oEe,aEe,yEe]).call(n,qd(i));e._sdkPlugins={}}},registerPlugin:function(e,t){if(e&&t){var n=null,i=null;e.plugin&&"function"==typeof e.plugin?(n=e.plugin,i=e.options):(n=e,i={}),i.sdk=t;var r=i.pluginName||n.pluginName;if(!r)throw new Error("The property pluginName is necessary");var o=t._sdkPlugins;try{o[r.toLowerCase()]&&this.unRegister(r);var a=new n(i);return o[r.toLowerCase()]=a,o[r.toLowerCase()].func=n,a&&"function"==typeof a.afterCreate&&a.afterCreate(),a}catch(s){LG.error(s)}}},unRegister:function(e,t){if(e&&t){e=e.toLowerCase();try{var n=t._sdkPlugins[e];n&&(n.pluginName&&n.__destroy(),delete t._sdkPlugins[e])}catch(i){LG.error(i)}}},beforePlayerCreate:function(e){if(e){e._sdkPlugins||this.init(e);for(var t=e._sdkPlugins,n=[],i=0,r=kT(t);i<r.length;i++){var o=r[i];if(t[o]&&t[o].beforePlayerCreate)try{var a=t[o].beforePlayerCreate();n.push(dV(a))}catch(cK){throw n.push(dV(null)),cK}}return new rb((function(e){var t;rb.all(y_(t=[]).call(t,n)).then((function(){e(null)})).catch((function(t){LG.error(t),e(null)}))}))}},afterPlayerCreate:function(e){if(e)for(var t=e._sdkPlugins,n=0,i=kT(t);n<i.length;n++){var r=i[n];if(t[r]&&t[r].beforePlayerCreate)try{t[r].afterPlayerCreate()}catch(cK){throw cK}}},destroy:function(e){if(e){for(var t=e._sdkPlugins,n=0,i=kT(t);n<i.length;n++){var r=i[n];this.unRegister(r,e)}delete e._sdkPlugins}}},_Ee=mEe,bEe=(up(dEe={},Lue.NETWORK,"Network error"),up(dEe,Lue.NETWORK_TIMEOUT,"Network timeout"),up(dEe,Lue.NETWORK_FORBIDDEN,"The video URL is prohibited from access. Please check the domain name access control"),up(dEe,Lue.NETWORK_NOTFOUND,"The video not found, please check whether the URL is correct"),up(dEe,Lue.NETWORK_RANGE_NOT_SATISFIABLE,"The request range is incorrect, please try again later"),up(dEe,Lue.NETWORK_PROTOCOL,"The request protocol is incorrect, please use the https URL to access"),up(dEe,Lue.NETWORK_URL_EXPIRE,"The video URL has expired"),up(dEe,Lue.NETWORK_URL_SIGN,"The video URL signature is incorrect, please check whether the URL is correct"),up(dEe,Lue.NETWORK_ENCRYPT_HLS_ERR,"Get the m3u8 file or encrypt key fail"),up(dEe,Lue.MEDIA_ERR,"Media error"),up(dEe,Lue.MEDIA_ERR_ABORTED,"Playback was canceled by the user or browser"),up(dEe,Lue.MEDIA_ERR_NETWORK,"Network error"),up(dEe,Lue.MEDIA_ERR_DECODE,"Decoding error"),up(dEe,Lue.MEDIA_ERR_SRC_NOT_SUPPORTED,"Audio/Video format not supported or URL unavailable"),up(dEe,Lue.MEDIA_ERR_NOT_SUPPORTED,"Unsupported video format"),up(dEe,Lue.MEDIA_ERR_URL_EMPTY,"Video URL is empty"),up(dEe,Lue.MEDIA_ERR_FILE_NOT_SUPPORTED,"Video file is not supported in the current browser environment"),up(dEe,Lue.MEDIA_ERR_PLAY_ERR,"Video playback error"),up(dEe,Lue.MEDIA_SOURCE_CANNOT_PLAY_TYPE,"Unsupported video type"),up(dEe,Lue.BUSINESS_DRM_NOT_SUPPORT,"DRM encrypted playback is not supported"),up(dEe,Lue.BUSINESS_DRM_NOT_SUPPORT_UN_RECORD,"Screen recording protection is not supported"),up(dEe,Lue.BUSINESS_DRM_LACK_MEDIA_KEY,"Video data lacks the corresponding MediaKey"),up(dEe,Lue.BUSINESS_DRM_LACK_KEY_SESSION,"Browser does not support the corresponding DRM KeySession"),up(dEe,Lue.BUSINESS_DRM_GENERATE_REQUEST_FAIL,"Decryption playback error"),up(dEe,Lue.BUSINESS_DRM_LACK_SERVER_CERTIFICATE_PATH,"Missing DRM certificate request link"),up(dEe,Lue.BUSINESS_DRM_LACK_SERVER_PROCESSSPC_PATH,"Missing DRM License request link"),up(dEe,Lue.BUSINESS_DRM_LICENSE_FAIL,"Request or update License failed"),up(dEe,Lue.BUSINESS_DRM_KEY_ERROR,"Decryption error"),up(dEe,Lue.BUSINESS_DRM_CERT_FAIL,"Request for DRM certificate failed"),up(dEe,Lue.OTHER,"Other error"),up(dEe,Lue.VOD_LOG_NOT_CONFIGURED,"Log options not configured correctly"),up(dEe,Lue.PLAY_AUTH_TOKEN_EXPIRED,"playAuthToken has expired"),up(dEe,Lue.HLS_KEY_TOKEN_EXPIRED,"keyToken has expired"),up(dEe,Lue.THIRD_PARTY_DRM_AUTH_TOKEN_EXPIRED,"thirdPartyDrmAuthToken has expired"),up(dEe,Lue.GET_PLAY_INFO_ERR,"Failed to get video information"),up(dEe,Lue.GET_HLS_DECRYPTION_KEY_ERR,"Failed to get HLS key"),up(dEe,Lue.LICENSE_VALIDATE_FAIL,"License validation failed"),up(dEe,Lue.DEFINITION_AUTO,"Auto"),dEe),kEe=(up(fEe={},Lue.NETWORK,"网络错误"),up(fEe,Lue.NETWORK_TIMEOUT,"网络超时"),up(fEe,Lue.NETWORK_FORBIDDEN,"视频地址禁止访问,请检查域名访问控制"),up(fEe,Lue.NETWORK_NOTFOUND,"视频不存在,请检查视频地址是否正确"),up(fEe,Lue.NETWORK_RANGE_NOT_SATISFIABLE,"请求 range 不正确,请稍后再试"),up(fEe,Lue.NETWORK_PROTOCOL,"请求协议错误,请使用 https 地址访问"),up(fEe,Lue.NETWORK_URL_EXPIRE,"视频地址已过期"),up(fEe,Lue.NETWORK_URL_SIGN,"视频地址签名错误,请检查地址是否正确"),up(fEe,Lue.NETWORK_ENCRYPT_HLS_ERR,"m3u8 文件或密钥获取失败"),up(fEe,Lue.MEDIA_ERR,"播放错误"),up(fEe,Lue.MEDIA_ERR_ABORTED,"播放被用户或浏览器取消"),up(fEe,Lue.MEDIA_ERR_NETWORK,"网络错误"),up(fEe,Lue.MEDIA_ERR_DECODE,"解码错误"),up(fEe,Lue.MEDIA_ERR_SRC_NOT_SUPPORTED,"音/视频格式不支持或地址不可用"),up(fEe,Lue.MEDIA_ERR_NOT_SUPPORTED,"不支持的视频格式"),up(fEe,Lue.MEDIA_ERR_URL_EMPTY,"视频地址为空"),up(fEe,Lue.MEDIA_ERR_FILE_NOT_SUPPORTED,"视频文件当前浏览器环境下不支持"),up(fEe,Lue.MEDIA_ERR_PLAY_ERR,"视频播放错误"),up(fEe,Lue.MEDIA_SOURCE_CANNOT_PLAY_TYPE,"不支持的视频类型"),up(fEe,Lue.BUSINESS_DRM_NOT_SUPPORT,"DRM加密播放不支持"),up(fEe,Lue.BUSINESS_DRM_NOT_SUPPORT_UN_RECORD,"不支持防录屏"),up(fEe,Lue.BUSINESS_DRM_LACK_MEDIA_KEY,"视频数据缺少相应 MediaKey"),up(fEe,Lue.BUSINESS_DRM_LACK_KEY_SESSION,"浏览器不支持相应 DRM KeySession"),up(fEe,Lue.BUSINESS_DRM_GENERATE_REQUEST_FAIL,"解密播放错误"),up(fEe,Lue.BUSINESS_DRM_LACK_SERVER_CERTIFICATE_PATH,"缺少 DRM 证书请求链接"),up(fEe,Lue.BUSINESS_DRM_LACK_SERVER_PROCESSSPC_PATH,"缺少 DRM License 请求链接"),up(fEe,Lue.BUSINESS_DRM_LICENSE_FAIL,"请求或更新 License 失败"),up(fEe,Lue.BUSINESS_DRM_KEY_ERROR,"解密错误"),up(fEe,Lue.BUSINESS_DRM_CERT_FAIL,"请求DRM证书失败"),up(fEe,Lue.OTHER,"其他错误"),up(fEe,Lue.VOD_LOG_NOT_CONFIGURED,"未正确配置质量日志参数"),up(fEe,Lue.OTHER,"其他错误"),up(fEe,Lue.PLAY_AUTH_TOKEN_EXPIRED,"playAuthToken 已过期"),up(fEe,Lue.HLS_KEY_TOKEN_EXPIRED,"keyToken 已过期"),up(fEe,Lue.THIRD_PARTY_DRM_AUTH_TOKEN_EXPIRED,"thirdPartyDrmAuthToken 已过期"),up(fEe,Lue.GET_PLAY_INFO_ERR,"获取视频信息失败"),up(fEe,Lue.GET_HLS_DECRYPTION_KEY_ERR,"获取 HLS 密钥失败"),up(fEe,Lue.LICENSE_VALIDATE_FAIL,"license 校验失败"),up(fEe,Lue.DEFINITION_AUTO,"自动"),fEe),EEe=(up(pEe={},Lue.NETWORK,"ネットワークエラー"),up(pEe,Lue.NETWORK_TIMEOUT,"ネットワークタイムアウト"),up(pEe,Lue.NETWORK_FORBIDDEN,"動画のURLへのアクセスが禁止されています。ドメインアクセス制御を確認してください"),up(pEe,Lue.NETWORK_NOTFOUND,"動画が存在しません。動画アドレスが正しいか確認してください"),up(pEe,Lue.NETWORK_RANGE_NOT_SATISFIABLE,"リクエスト範囲が正しくありません。後でもう一度お試しください"),up(pEe,Lue.NETWORK_PROTOCOL,"リクエストプロトコルエラー。httpsアドレスを使用してアクセスしてください"),up(pEe,Lue.NETWORK_URL_EXPIRE,"動画のURLは期限切れです"),up(pEe,Lue.NETWORK_URL_SIGN,"動画のURL署名エラー。アドレスが正しいか確認してください"),up(pEe,Lue.NETWORK_ENCRYPT_HLS_ERR,"m3u8 ファイルまたはキーの取得に失敗しました"),up(pEe,Lue.MEDIA_ERR,"再生エラー"),up(pEe,Lue.MEDIA_ERR_ABORTED,"再生がユーザーまたはブラウザによってキャンセルされました"),up(pEe,Lue.MEDIA_ERR_NETWORK,"ネットワークエラー"),up(pEe,Lue.MEDIA_ERR_DECODE,"デコードエラー"),up(pEe,Lue.MEDIA_ERR_SRC_NOT_SUPPORTED,"音声/動画フォーマットがサポートされていないか、アドレスが利用できません"),up(pEe,Lue.MEDIA_ERR_NOT_SUPPORTED,"サポートされていない動画フォーマット"),up(pEe,Lue.MEDIA_ERR_URL_EMPTY,"動画のURLが空です"),up(pEe,Lue.MEDIA_ERR_FILE_NOT_SUPPORTED,"動画ファイルは現在のブラウザ環境でサポートされていません"),up(pEe,Lue.MEDIA_ERR_PLAY_ERR,"動画再生エラー"),up(pEe,Lue.MEDIA_SOURCE_CANNOT_PLAY_TYPE,"サポートされていない動画の種類"),up(pEe,Lue.BUSINESS_DRM_NOT_SUPPORT,"DRM暗号化再生はサポートされていません"),up(pEe,Lue.BUSINESS_DRM_NOT_SUPPORT_UN_RECORD,"録画防止はサポートされていません"),up(pEe,Lue.BUSINESS_DRM_LACK_MEDIA_KEY,"動画データに対応するMediaKeyが不足しています"),up(pEe,Lue.BUSINESS_DRM_LACK_KEY_SESSION,"ブラウザが対応するDRM KeySessionをサポートしていません"),up(pEe,Lue.BUSINESS_DRM_GENERATE_REQUEST_FAIL,"復号再生エラー"),up(pEe,Lue.BUSINESS_DRM_LACK_SERVER_CERTIFICATE_PATH,"DRM証明書リクエストリンクが不足しています"),up(pEe,Lue.BUSINESS_DRM_LACK_SERVER_PROCESSSPC_PATH,"DRMライセンスリクエストリンクが不足しています"),up(pEe,Lue.BUSINESS_DRM_LICENSE_FAIL,"ライセンスのリクエストまたは更新に失敗しました"),up(pEe,Lue.BUSINESS_DRM_KEY_ERROR,"復号エラー"),up(pEe,Lue.BUSINESS_DRM_CERT_FAIL,"DRM証明書のリクエストに失敗しました"),up(pEe,Lue.OTHER,"その他のエラー"),up(pEe,Lue.VOD_LOG_NOT_CONFIGURED,"品質ログパラメータが正しく設定されていません"),up(pEe,Lue.PLAY_AUTH_TOKEN_EXPIRED,"playAuthTokenが期限切れです"),up(pEe,Lue.HLS_KEY_TOKEN_EXPIRED,"keyTokenが期限切れです"),up(pEe,Lue.THIRD_PARTY_DRM_AUTH_TOKEN_EXPIRED,"thirdPartyDrmAuthTokenが期限切れです"),up(pEe,Lue.GET_PLAY_INFO_ERR,"動画情報の取得に失敗しました"),up(pEe,Lue.GET_HLS_DECRYPTION_KEY_ERR,"HLSキーの取得に失敗しました"),up(pEe,Lue.LICENSE_VALIDATE_FAIL,"ライセンスの検証に失敗しました"),up(pEe,Lue.DEFINITION_AUTO,"自動"),pEe),wEe=[{LANG:"en",TEXT:bEe},{LANG:"zh",TEXT:kEe},{LANG:"zh-hk",TEXT:(up(vEe={},Lue.NETWORK,"網路錯誤"),up(vEe,Lue.NETWORK_TIMEOUT,"網路逾時"),up(vEe,Lue.NETWORK_FORBIDDEN,"視頻地址禁止訪問,請檢查域名訪問控制"),up(vEe,Lue.NETWORK_NOTFOUND,"視頻不存在,請檢查視訊地址是否正確"),up(vEe,Lue.NETWORK_RANGE_NOT_SATISFIABLE,"請求範圍不正確,請稍後再試"),up(vEe,Lue.NETWORK_PROTOCOL,"請求協議錯誤,請使用 https 地址訪問"),up(vEe,Lue.NETWORK_URL_EXPIRE,"視頻地址已過期"),up(vEe,Lue.NETWORK_URL_SIGN,"視頻地址簽名錯誤,請檢查地址是否正確"),up(vEe,Lue.NETWORK_ENCRYPT_HLS_ERR,"m3u8 檔案或金鑰取得失敗"),up(vEe,Lue.MEDIA_ERR,"播放錯誤"),up(vEe,Lue.MEDIA_ERR_ABORTED,"播放被用戶或瀏覽器取消"),up(vEe,Lue.MEDIA_ERR_NETWORK,"網路錯誤"),up(vEe,Lue.MEDIA_ERR_DECODE,"解碼錯誤"),up(vEe,Lue.MEDIA_ERR_SRC_NOT_SUPPORTED,"音/視頻格式不支援或地址不可用"),up(vEe,Lue.MEDIA_ERR_NOT_SUPPORTED,"不支援的視頻格式"),up(vEe,Lue.MEDIA_ERR_URL_EMPTY,"視頻地址為空"),up(vEe,Lue.MEDIA_ERR_FILE_NOT_SUPPORTED,"視頻文件在當前瀏覽器環境下不支援"),up(vEe,Lue.MEDIA_ERR_PLAY_ERR,"視頻播放錯誤"),up(vEe,Lue.MEDIA_SOURCE_CANNOT_PLAY_TYPE,"不支援的視頻類型"),up(vEe,Lue.BUSINESS_DRM_NOT_SUPPORT,"不支援 DRM 加密播放"),up(vEe,Lue.BUSINESS_DRM_NOT_SUPPORT_UN_RECORD,"不支援防錄屏"),up(vEe,Lue.BUSINESS_DRM_LACK_MEDIA_KEY,"視頻數據缺少相應 MediaKey"),up(vEe,Lue.BUSINESS_DRM_LACK_KEY_SESSION,"瀏覽器不支援相應 DRM KeySession"),up(vEe,Lue.BUSINESS_DRM_GENERATE_REQUEST_FAIL,"解密播放錯誤"),up(vEe,Lue.BUSINESS_DRM_LACK_SERVER_CERTIFICATE_PATH,"缺少 DRM 證書請求鏈接"),up(vEe,Lue.BUSINESS_DRM_LACK_SERVER_PROCESSSPC_PATH,"缺少 DRM License 請求鏈接"),up(vEe,Lue.BUSINESS_DRM_LICENSE_FAIL,"請求或更新 License 失敗"),up(vEe,Lue.BUSINESS_DRM_KEY_ERROR,"解密錯誤"),up(vEe,Lue.BUSINESS_DRM_CERT_FAIL,"請求 DRM 證書失敗"),up(vEe,Lue.OTHER,"其他錯誤"),up(vEe,Lue.VOD_LOG_NOT_CONFIGURED,"未正確配置質量日誌參數"),up(vEe,Lue.PLAY_AUTH_TOKEN_EXPIRED,"playAuthToken 已過期"),up(vEe,Lue.HLS_KEY_TOKEN_EXPIRED,"keyToken 已過期"),up(vEe,Lue.THIRD_PARTY_DRM_AUTH_TOKEN_EXPIRED,"thirdPartyDrmAuthToken 已過期"),up(vEe,Lue.GET_PLAY_INFO_ERR,"獲取視頻信息失敗"),up(vEe,Lue.GET_HLS_DECRYPTION_KEY_ERR,"獲取 HLS 密鑰失敗"),up(vEe,Lue.LICENSE_VALIDATE_FAIL,"license 校驗失敗"),up(vEe,Lue.DEFINITION_AUTO,"自動"),vEe)},{LANG:"jp",TEXT:EEe}],SEe=function(){function e(t,n){Ou(this,e),this.url=t;var i=new window.XMLHttpRequest;i.target=this,i.responseType="arraybuffer",i.open("get",t),i.onload=function(){200!==i.status&&206!==i.status||n&&n instanceof Function&&n(i.response)},i.onerror=function(e){},this.xhr=i,this.run()}return Au(e,[{key:"cancel",value:function(){this.xhr.abort()}},{key:"run",value:function(){1===this.xhr.readyState&&this.xhr.send()}}]),e}(),TEe={ORDER:"order",SLOOP:"sloop",LOOP:"loop",RANDOM:"random"},CEe="xgplayer-music";function xEe(e,t,n){var i=Math.floor(Math.random()*(t-e)+e);return i===n?(i>t/2?t/=2:e=t/2,t-e>2?xEe(e,t,n):i):i}var DEe=function(e){rh(n,e);var t=Ah(n);function n(){var e;return Ou(this,n),(e=t.apply(this,arguments))._onEnded=function(){if("order"===e.mode&&e.index+1>=e.list.length)return e.player.pause(),void(e.player.currentTime=0);if(e.mode===TEe.SLOOP)e.change();else e.next()},e._onDurationChange=function(){var t=e.config.abCycle;e._initABCycle(t,e.player)},e._onTimeUpdate=function(){var t=Lh(e),n=t.config,i=t.player;if(!e.halfPass&&i.currentTime>i.duration/2&&e.confirmOrder(),n.abCycle){var r=n.abCycle,o=r.end>i.duration?i.duration:r.end;i.currentTime>=o?(r.loop||(i.pause(),e.emit("abCycle_ended")),i.currentTime=r.start||0):i.currentTime<r.start&&(i.currentTime=r.start||0)}},e}return Au(n,[{key:"afterCreate",value:function(){var e,t,n,i,r,o,a=this.player,s=this.playerConfig;(qO.addClass(a.root,CEe),this.halfPass=!1,this.list=this.config.list||[],this.emit(Hce.MUSIC_LIST_CHANGE,this.list),this.nextIndex=-1,this.prevIndex=-1,this.history=[],this.disable=!(this.list.length>0),!s.url&&this.list.length>0)&&(s.url=null===(e=this.list)||void 0===e||null===(e=e[0])||void 0===e?void 0:e.src);s.poster||(s.poster=null===(t=this.list)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.poster);s.title||(s.title=null!==(n=null===(i=this.list)||void 0===i||null===(i=i[0])||void 0===i?void 0:i.title)&&void 0!==n?n:"");s.vid||(s.vid=null!==(r=null===(o=this.list)||void 0===o||null===(o=o[0])||void 0===o?void 0:o.vid)&&void 0!==r?r:"");this._curInfo={src:s.url,poster:s.poster,title:s.title,vid:s.vid},this.index=0,this.on(dM,this._onTimeUpdate),this.on(sM,this._onEnded),this.on(vM,this._onDurationChange),this.config.offline&&this.checkOffline(this._curInfo.src,this._curInfo.vid).then((function(e){0===e.code&&(s.url=e.url,a.state>=4&&(a.src=e.url))})).catch((function(e){LG.error(e)}))}},{key:"destroy",value:function(){qO.removeClass(this.player.root,CEe)}},{key:"_nextCompute",value:function(){if(!this.disable)switch(this.mode){case TEe.SLOOP:this.nextIndex=this.index;break;case TEe.ORDER:case TEe.LOOP:this.index+1<this.list.length?this.nextIndex=this.index+1:this.nextIndex=0;break;default:this.nextIndex=xEe(0,this.list.length,this.index)}}},{key:"_prevCompute",value:function(){if(!this.disable)switch(this.mode){case TEe.SLOOP:this.nextIndex=this.index;break;case TEe.ORDER:case TEe.LOOP:this.index-1>=0?this.prevIndex=this.index-1:this.prevIndex=this.list.length-1;break;default:this.prevIndex=xEe(0,this.list.length,this.index)}}},{key:"_emitChange",value:function(){this.emit(Hce.MUSIC_CHANGE,this._curInfo)}},{key:"_initABCycle",value:function(e,t){var n=t.plugins.progresspreview;if(e&&t){var i=e.end>this.player.duration?this.player.duration:e.end,r=e.start>this.player.duration?0:e.start,o={id:t.playerId,time:e.start,duration:i-r,text:e.text,color:e.color};n.findDot(o.id)?n.updateDot(o):n.createDot(o)}else n.findDot(t.playerId)&&n.deleteDot(t.playerId)}},{key:"random",value:function(){if(this.list.length<0)return null;var e=xEe(0,this.list.length,this.index);return this.list[e]}},{key:"next",value:function(){this.disable||(this.halfPass||(this.halfPass=!0,this._nextCompute()),this.index=this.nextIndex,this.change())}},{key:"prev",value:function(){this.disable||(this.halfPass||(this.halfPass=!0,this._prevCompute()),this.index=this.prevIndex,this.change())}},{key:"forward",value:function(){var e=this.player,t=this.config.timeScale;e.currentTime=e.currentTime+t<e.duration?e.currentTime+t:e.duration-.1}},{key:"backward",value:function(){var e=this.player,t=this.config.timeScale;e.currentTime=e.currentTime-t>0?e.currentTime-t:0}},{key:"add",value:function(e){this.list.push({src:e.src,title:e.title,vid:e.vid,poster:e.poster}),this.disable=!(this.list.length>0),this.emit(Hce.MUSIC_LIST_CHANGE,this.list)}},{key:"remove",value:function(e){var t,n=-1;(this.list.every((function(t,i){return t.vid!==e||(n=i,!1)})),n>-1)&&(bT(t=this.list).call(t,n,1),this.emit(Hce.MUSIC_LIST_CHANGE,this.list));this.disable=!(this.list.length>0)}},{key:"setAbCycle",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};e&&"Object"===qO.typeOf(e)?this.config.abCycle=dp({},e):this.config.abCycle=dp({start:e||0,end:t||this.player.duration,loop:n},i),this._initABCycle(this.config.abCycle,this.player)}},{key:"removeAbCycle",value:function(){this.config.abCycle=null,this._initABCycle(null,this.player)}},{key:"updateList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.removeAbCycle(),this.player.pause(),this.player.currentTime=0,this.list=e,this.nextIndex=0,this.index=0,this.change(),this.disable=!(this.list.length>0),this.emit(Hce.MUSIC_LIST_CHANGE,this.list)}},{key:"setIndex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;e<0||e>=this.list.length||(this.nextIndex=e,this.index=e,this.change())}},{key:"change",value:function(){var e=this;if(!this.disable){var t=this.player,n=this.list,i=this.index,r=n[i].vid;this.halfPass=!1,this.checkOffline(n[i].src,r).then((function(n){e._curInfo={title:e.list[e.index].title||"",vid:e.list[e.index].vid,poster:e.list[e.index].poster||"",src:n.url},t.playNext({url:n.url,vid:e.list[e.index].vid||0,poster:e.list[e.index].poster||"",autoplay:!0}),t.off("timeupdate",e._emitChange.bind(e)),t.once("timeupdate",e._emitChange.bind(e)),t.play()}))}}},{key:"checkOffline",value:function(e,t){var n=this;return new rb((function(i,r){if(!n.config.offline||n.disable)return i({url:e,code:-1,vid:t});var o=n.player.database;o.openDB((function(){o.getDataByKey(o.myDB.ojstore.name,t,(function(n){setTimeout((function(){o.closeDB()}),5e3),i(n?{url:ij.createObjectURL(n.blob),code:0,vid:n.vid}:{url:e,code:-2,vid:t})}))}))}))}},{key:"confirmOrder",value:function(){this.halfPass=!0,this._nextCompute(),this._prevCompute(),this.config.preloadNext&&this.preload(this.nextIndex)}},{key:"preload",value:function(e){if(!(e<0||e>=this.list.length)){var t=this.list[e],n=this.player;this.checkOffline(t.src,t.vid).then((function(e){if(-2===e.code){var i=t.vid;new SEe(t.src,(function(e){n.database.openDB((function(){n.database.addData(n.database.myDB.ojstore.name,[{vid:i,blob:new Blob([e],{type:'audio/mp4; codecs="mp4a.40.5"'})}]),setTimeout((function(){n.database.closeDB()}),5e3)}))}))}}))}}},{key:"timeScale",get:function(){return this.config.timeScale||15},set:function(e){this.config.timeScale=e,this.emit(Hce.TIME_SCALE_CHANGE,e)}},{key:"mode",get:function(){return this.config.mode||TEe.RANDOM},set:function(e){var t;F_(t=wb(TEe)).call(t,e)&&(this.config.mode=e,this.emit(Hce.MUSIC_MODE_CHANGE,e))}}],[{key:"pluginName",get:function(){return"music"}},{key:"defaultConfig",get:function(){return{offline:!1,preloadNext:!0,abCycle:null,timeScale:15,mode:TEe.ORDER,list:[]}}},{key:"ModeType",get:function(){var e;return W_(e=kT(TEe)).call(e,(function(e){return TEe[e]}))}}]),n}(kN),IEe=function(e){rh(n,e);var t=Ah(n);function n(){return Ou(this,n),t.apply(this,arguments)}return Au(n,[{key:"afterCreate",value:function(){var e=this;this.on(Hce.MUSIC_CHANGE,(function(t){if(t&&t.poster){var n=fb(e).call(e,"img");n?n.src=t.poster:e.root.innerHTML="<img src=".concat(t.poster,' alt=""/>'),e.show()}else e.hide()}))}},{key:"render",value:function(){var e,t,n=this.playerConfig;return n.poster||null!=n&&null!==(e=n.url)&&void 0!==e&&e[0].poster?'<xg-icon class="xgplayer-cover">\n <img src="'.concat(n.poster||(null==n||null===(t=n.url)||void 0===t?void 0:t[0].poster),'" alt="">\n </xg-icon>'):'<xg-icon class="xgplayer-cover"></xg-icon>'}}],[{key:"pluginName",get:function(){return"musiccover"}},{key:"defaultConfig",get:function(){return{index:0,position:ON.POSITIONS.CONTROLS_LEFT}}}]),n}(ON);function REe(){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="M10.2478 0C6.32662 0 2.94593 2.3143 1.39715 5.65152L0.558008 5.42701C0.321533 5.36365 0.0784664 5.50398 0.0151043 5.74046C-0.00971985 5.8331 -0.00382614 5.9313 0.0319023 6.02031L1.13271 8.76283C1.22391 8.99003 1.48202 9.10028 1.70921 9.00908C1.74819 8.99344 1.78475 8.97233 1.81779 8.94639L4.14238 7.12171C4.33496 6.97055 4.36853 6.69189 4.21737 6.49932C4.15815 6.42387 4.07605 6.36967 3.98341 6.34485L3.14176 6.1196C4.46348 3.53919 7.14942 1.77312 10.2478 1.77312C14.6545 1.77312 18.2269 5.34545 18.2269 9.75215C18.2269 14.1589 14.6545 17.7312 10.2478 17.7312C6.45067 17.7312 3.273 15.0787 2.4666 11.5256L0.656528 11.5254C1.49041 16.0647 5.46745 19.5043 10.2478 19.5043C15.6338 19.5043 20 15.1381 20 9.75215C20 4.36619 15.6338 0 10.2478 0Z" fill="white"/>\n</svg>\n',"image/svg+xml").firstChild}var LEe=function(e){rh(n,e);var t=Ah(n);function n(){var e;return Ou(this,n),(e=t.apply(this,arguments)).onClick=function(t){var n=Lh(e).player;t.preventDefault(),t.stopPropagation(),n.plugins.music.backward()},e}return Au(n,[{key:"afterCreate",value:function(){var e=this;this.initIcons();["click","touchstart"].forEach((function(t){e.bind(t,e.onClick)})),this.timeScaleDom=fb(this).call(this,".xgplayer-timescale"),this.on(Hce.TIME_SCALE_CHANGE,(function(t){e.timeScaleDom.innerHTML=t}))}},{key:"registerIcons",value:function(){return{musicBackward:{icon:REe,class:"xg-icon-mbackward"}}}},{key:"registerLanguageTexts",value:function(){return{backward:{jp:"あとずさりする",en:"MusicBackward",zh:"后退","zh-hk":"後退"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.musicBackward)}},{key:"destroy",value:function(){var e=this;["click","touchstart"].forEach((function(t){e.unbind(t,e.onClick)}))}},{key:"render",value:function(){var e,t=this.player.plugins.music.config.timeScale||15;return y_(e='<xg-icon class="xgplayer-backward">\n <div class="xgplayer-icon">\n <span class="xgplayer-timescale">'.concat(t,'</span>\n </div>\n <div class="xg-tips" lang-key="backward">')).call(e,this.langText.backward,"</div>\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"musicbackword"}},{key:"defaultConfig",get:function(){return{index:1,position:ON.POSITIONS.CONTROLS_LEFT}}}]),n}(ON),PEe=function(e){rh(n,e);var t=Ah(n);function n(){var e;return Ou(this,n),(e=t.apply(this,arguments)).onClick=function(t){var n=Lh(e).player;t.preventDefault(),t.stopPropagation(),n.plugins.music.prev()},e}return Au(n,[{key:"afterCreate",value:function(){var e=this;this.initIcons();["click","touchstart"].forEach((function(t){e.bind(t,e.onClick)})),this.updateVisible(),this.on(Hce.MUSIC_LIST_CHANGE,this.updateVisible.bind(this))}},{key:"updateVisible",value:function(){var e;(null===(e=this.player.plugins)||void 0===e||null===(e=e.music)||void 0===e||null===(e=e.list)||void 0===e?void 0:e.length)>1?this.show():this.hide()}},{key:"registerIcons",value:function(){return{musicPrev:{icon:' <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <g clip-path="url(#clip0_20323_25783)">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M21.2 1.20196V22.798C21.2 23.7867 20.0711 24.3511 19.28 23.7579L4.88002 12.9598C4.24002 12.4799 4.24002 11.5201 4.88002 11.0402L19.28 0.242135C20.0711 -0.35107 21.2 0.213286 21.2 1.20196Z" fill="white"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M3.8 0.00219727C4.13137 0.00219727 4.4 0.270826 4.4 0.602197V23.3978C4.4 23.7292 4.13137 23.9978 3.8 23.9978H2.6C2.26863 23.9978 2 23.7292 2 23.3978V0.602197C2 0.270826 2.26863 0.00219727 2.6 0.00219727H3.8Z" fill="white"/>\n </g>\n <defs>\n <clipPath id="clip0_20323_25783">\n <rect width="24" height="24" fill="white"/>\n </clipPath>\n </defs>\n </svg>\n ',class:"xg-icon-mprev"}}}},{key:"registerLanguageTexts",value:function(){return{musicPrev:{jp:"前の曲",en:"MusicPrev",zh:"上一首","zh-hk":"上一首"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.musicPrev)}},{key:"destroy",value:function(){var e=this;["click","touchstart"].forEach((function(t){e.unbind(t,e.onClick)}))}},{key:"render",value:function(){return'<xg-icon class="xgplayer-next">\n <div class="xgplayer-icon">\n </div>\n <div class="xg-tips" lang-key="musicPrev">'.concat(this.langText.musicPrev,"</div>\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"musicprev"}},{key:"defaultConfig",get:function(){return{index:2,position:ON.POSITIONS.CONTROLS_LEFT}}}]),n}(ON);function AEe(){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="M9.75215 0C13.6734 0 17.0541 2.3143 18.6029 5.65152L19.442 5.42701C19.6785 5.36365 19.9215 5.50398 19.9849 5.74046C20.0097 5.8331 20.0038 5.9313 19.9681 6.02031L18.8673 8.76283C18.7761 8.99003 18.518 9.10028 18.2908 9.00908C18.2518 8.99344 18.2152 8.97233 18.1822 8.94639L15.8576 7.12171C15.665 6.97055 15.6315 6.69189 15.7826 6.49932C15.8419 6.42387 15.9239 6.36967 16.0166 6.34485L16.8582 6.1196C15.5365 3.53919 12.8506 1.77312 9.75215 1.77312C5.34545 1.77312 1.77312 5.34545 1.77312 9.75215C1.77312 14.1589 5.34545 17.7312 9.75215 17.7312C13.5493 17.7312 16.727 15.0787 17.5334 11.5256L19.3435 11.5254C18.5096 16.0647 14.5325 19.5043 9.75215 19.5043C4.36619 19.5043 0 15.1381 0 9.75215C0 4.36619 4.36619 0 9.75215 0Z" fill="white"/>\n</svg>\n',"image/svg+xml").firstChild}var OEe=function(e){rh(n,e);var t=Ah(n);function n(){var e;return Ou(this,n),(e=t.apply(this,arguments)).onClick=function(t){var n=Lh(e).player;t.preventDefault(),t.stopPropagation(),n.plugins.music.forward()},e}return Au(n,[{key:"afterCreate",value:function(){var e=this;this.initIcons();["click","touchstart"].forEach((function(t){e.bind(t,e.onClick)})),this.timeScaleDom=fb(this).call(this,".xgplayer-timescale"),this.on(Hce.TIME_SCALE_CHANGE,(function(t){e.timeScaleDom.innerHTML=t}))}},{key:"registerIcons",value:function(){return{musicForward:{icon:AEe,class:"xg-icon-mforward"}}}},{key:"registerLanguageTexts",value:function(){return{forward:{jp:"早送り",en:"MusicForward",zh:"快进","zh-hk":"快進"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.musicForward)}},{key:"destroy",value:function(){var e=this;["click","touchstart"].forEach((function(t){e.unbind(t,e.onClick)}))}},{key:"render",value:function(){var e,t=this.player.plugins.music.config.timeScale||15;return y_(e='<xg-icon class="xgplayer-forward">\n <div class="xgplayer-icon">\n <span class="xgplayer-timescale">'.concat(t,'</span>\n </div>\n <div class="xg-tips" lang-key="forward">')).call(e,this.langText.forward,"</div>\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"musicforward"}},{key:"defaultConfig",get:function(){return{index:5,position:ON.POSITIONS.CONTROLS_LEFT}}}]),n}(ON),MEe=function(e){rh(n,e);var t=Ah(n);function n(){var e;return Ou(this,n),(e=t.apply(this,arguments)).onClick=function(t){var n=Lh(e).player;t.preventDefault(),t.stopPropagation(),n.plugins.music.next()},e}return Au(n,[{key:"afterCreate",value:function(){var e=this;this.initIcons();["click","touchstart"].forEach((function(t){e.bind(t,e.onClick)})),this.updateVisible(),this.on(Hce.MUSIC_LIST_CHANGE,this.updateVisible.bind(this))}},{key:"updateVisible",value:function(){var e;(null===(e=this.player.plugins)||void 0===e||null===(e=e.music)||void 0===e||null===(e=e.list)||void 0===e?void 0:e.length)>1?this.show():this.hide()}},{key:"registerIcons",value:function(){return{musicNext:{icon:' <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <g clip-path="url(#clip0_20323_25776)">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M3.92 0.242135L18.32 11.0402C18.96 11.5201 18.96 12.4799 18.32 12.9598L3.92 23.7579C3.12892 24.3511 2 23.7867 2 22.798V1.20196C2 0.213286 3.12892 -0.35107 3.92 0.242135Z" fill="white"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M20.6 0.00219727C20.9314 0.00219727 21.2 0.270826 21.2 0.602197V23.3978C21.2 23.7292 20.9314 23.9978 20.6 23.9978H19.4C19.0687 23.9978 18.8 23.7292 18.8 23.3978V0.602197C18.8 0.270826 19.0687 0.00219727 19.4 0.00219727H20.6Z" fill="white"/>\n </g>\n <defs>\n <clipPath id="clip0_20323_25776">\n <rect width="24" height="24" fill="white"/>\n </clipPath>\n </defs>\n </svg>\n ',class:"xg-icon-mnext"}}}},{key:"registerLanguageTexts",value:function(){return{musicNext:{jp:"次の曲",en:"MusicNext",zh:"下一首","zh-hk":"下一首"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.musicNext)}},{key:"destroy",value:function(){var e=this;["click","touchstart"].forEach((function(t){e.unbind(t,e.onClick)}))}},{key:"render",value:function(){return'<xg-icon class="xgplayer-next">\n <div class="xgplayer-icon"></div>\n <div class="xg-tips" lang-key="musicNext">'.concat(this.langText.musicNext,"</div>\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"musicnext"}},{key:"defaultConfig",get:function(){return{index:4,position:ON.POSITIONS.CONTROLS_LEFT}}}]),n}(ON),NEe=function(e){rh(n,e);var t=Ah(n);function n(){return Ou(this,n),t.apply(this,arguments)}return Au(n,[{key:"afterCreate",value:function(){var e=this;this.on(Hce.MUSIC_CHANGE,(function(t){t&&t.title?e.root.innerHTML="".concat(t.title):e.root.innerHTML=""}))}},{key:"render",value:function(){var e=this.playerConfig;return'<xg-title class="xgplayer-name">\n '.concat(e.title||"","\n </xg-title>")}}],[{key:"pluginName",get:function(){return"musicmeta"}},{key:"defaultConfig",get:function(){return{index:0,position:ON.POSITIONS.CONTROLS_LEFT}}}]),n}(ON);function zEe(){return(new DOMParser).parseFromString('<svg width="20" height="20" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">\n<g clip-path="url(#clip0_20779_14791)">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M39 8C39.5523 8 40 8.44772 40 9V11C40 11.5523 39.5523 12 39 12H7C6.44772 12 6 11.5523 6 11V9C6 8.44772 6.44772 8 7 8H39ZM30 23C30 22.4477 29.5523 22 29 22H7C6.44772 22 6 22.4477 6 23V25C6 25.5523 6.44772 26 7 26H29C29.5523 26 30 25.5523 30 25V23ZM46.0725 31C46.0725 31.2113 46.0056 31.4173 45.8812 31.5882L39.845 39.888C39.5202 40.3346 38.8948 40.4334 38.4481 40.1086C38.3635 40.047 38.2891 39.9726 38.2275 39.888L32.1913 31.5882C31.8665 31.1415 31.9652 30.5161 32.4119 30.1913C32.5828 30.067 32.7887 30 33 30H37V19.5C37 19.2239 37.2239 19 37.5 19H40.5C40.7761 19 41 19.2239 41 19.5V30H45.0725C45.6248 30 46.0725 30.4477 46.0725 31ZM29 36C29.5523 36 30 36.4477 30 37V39C30 39.5523 29.5523 40 29 40H7C6.44772 40 6 39.5523 6 39V37C6 36.4477 6.44772 36 7 36H29Z" fill="white"/>\n</g>\n<defs>\n<clipPath id="clip0_20779_14791">\n<rect width="48" height="48" fill="white"/>\n</clipPath>\n</defs>\n</svg>\n',"image/svg+xml").firstChild}function UEe(){return(new DOMParser).parseFromString('<svg width="20" height="20" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">\n<g clip-path="url(#clip0_20731_14771)">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M42.0018 23V29.024C42.0018 34.569 37.5247 39.064 32.0018 39.064H17.9999V42.6585C17.9999 43.2108 17.5522 43.6585 16.9999 43.6585C16.7991 43.6585 16.603 43.598 16.437 43.485L8.20729 37.8803C7.75081 37.5694 7.63278 36.9473 7.94366 36.4908C8.01331 36.3886 8.10134 36.3001 8.20327 36.23L16.433 30.5662C16.888 30.2531 17.5106 30.3681 17.8237 30.8231C17.9385 30.9899 17.9999 31.1875 17.9999 31.39V35.048H32.0018C35.3155 35.048 38.0018 32.351 38.0018 29.024V23H42.0018ZM31.0019 5.89087C31.2027 5.89087 31.3988 5.95132 31.5648 6.06434L39.7945 11.6691C40.251 11.98 40.369 12.602 40.0582 13.0585C39.9885 13.1608 39.9005 13.2492 39.7986 13.3194L31.5688 18.9831C31.1139 19.2962 30.4912 19.1812 30.1781 18.7263C30.0633 18.5595 30.0019 18.3618 30.0019 18.1593V14.5013H16C12.6863 14.5013 10 17.1984 10 20.5254V26.5494H6V20.5254C6 14.9804 10.4772 10.4853 16 10.4853H30.0019V6.89087C30.0019 6.33858 30.4496 5.89087 31.0019 5.89087Z" fill="white"/>\n</g>\n<defs>\n<clipPath id="clip0_20731_14771">\n<rect width="48" height="48" fill="white"/>\n</clipPath>\n</defs>\n</svg>\n',"image/svg+xml").firstChild}function BEe(){return(new DOMParser).parseFromString('<svg width="20" height="20" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">\n<g clip-path="url(#clip0_20731_14777)">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M35.0194 27.9598C35.2314 27.9598 35.4379 28.0272 35.6091 28.1522L41.8863 32.736C42.3323 33.0617 42.4298 33.6873 42.1041 34.1333C42.0419 34.2186 41.9665 34.2934 41.8809 34.3551L35.6037 38.875C35.1556 39.1977 34.5306 39.096 34.2079 38.6478C34.0853 38.4776 34.0194 38.2732 34.0194 38.0635V35.5556C30.1354 35.5195 27.7656 34.3892 25.642 31.7548C26.4304 30.621 27.1705 29.3627 27.8834 27.9788C29.5719 30.6143 31.112 31.5275 34.0194 31.5546V28.9598C34.0194 28.4075 34.4671 27.9598 35.0194 27.9598ZM35.0112 7.94434C35.2205 7.94434 35.4246 8.01001 35.5946 8.13211L41.8792 12.6458C42.3278 12.968 42.4303 13.5928 42.1081 14.0414C42.0464 14.1273 41.9715 14.2028 41.8861 14.2652L35.6015 18.8607C35.1557 19.1867 34.53 19.0895 34.204 18.6437C34.0787 18.4724 34.0112 18.2657 34.0112 18.0535V15.4606C29.9521 15.4984 28.443 17.234 25.7897 23.0253C25.4916 23.6778 25.333 24.0244 25.1845 24.3452C21.6243 32.0396 17.983 35.4364 10.0186 35.5591H6V31.5394L9.98762 31.5397C16.0421 31.4462 18.5555 29.1016 21.5376 22.6568C21.6818 22.3451 21.8361 22.0079 22.1364 21.3507C25.3774 14.2767 27.8951 11.4978 34.0112 11.4409V8.94434C34.0112 8.39205 34.4589 7.94434 35.0112 7.94434ZM10.0186 11.4409C14.8213 11.5149 18.0519 12.7794 20.6407 15.459C19.9655 16.6111 19.3108 17.8933 18.6522 19.3098C16.5567 16.6161 14.0817 15.5236 9.98762 15.4604L6 15.4606V11.4409H10.0186Z" fill="white"/>\n</g>\n<defs>\n<clipPath id="clip0_20731_14777">\n<rect width="48" height="48" fill="white"/>\n</clipPath>\n</defs>\n</svg>\n',"image/svg+xml").firstChild}function FEe(){return(new DOMParser).parseFromString('<svg width="20" height="20" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">\n<g clip-path="url(#clip0_20731_14784)">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M42.0018 22.1091V28.1331C42.0018 33.6781 37.5247 38.1732 32.0018 38.1732H17.9999V41.7676C17.9999 42.3199 17.5522 42.7676 16.9999 42.7676C16.7991 42.7676 16.603 42.7072 16.437 42.5941L8.20729 36.9894C7.75081 36.6785 7.63278 36.0564 7.94366 35.6C8.01331 35.4977 8.10134 35.4092 8.20327 35.3391L16.433 29.6754C16.888 29.3623 17.5106 29.4773 17.8237 29.9322C17.9385 30.099 17.9999 30.2967 17.9999 30.4991V34.1572H32.0018C35.3155 34.1572 38.0018 31.4601 38.0018 28.1331V22.1091H42.0018ZM26.05 18V29.664H23.19V21.08L21 22.852V19.772L23.19 18H26.05ZM31.0019 5C31.2027 5 31.3988 5.06045 31.5648 5.17347L39.7945 10.7782C40.251 11.0891 40.369 11.7112 40.0582 12.1677C39.9885 12.2699 39.9005 12.3584 39.7986 12.4285L31.5688 18.0922C31.1139 18.4054 30.4912 18.2904 30.1781 17.8354C30.0633 17.6686 30.0019 17.4709 30.0019 17.2685V13.6105H16C12.6863 13.6105 10 16.3075 10 19.6345V25.6585H6V19.6345C6 14.0895 10.4772 9.59443 16 9.59443H30.0019V6C30.0019 5.44772 30.4496 5 31.0019 5Z" fill="white"/>\n</g>\n<defs>\n<clipPath id="clip0_20731_14784">\n<rect width="48" height="48" fill="white"/>\n</clipPath>\n</defs>\n</svg>\n',"image/svg+xml").firstChild}var HEe=function(e){rh(n,e);var t=Ah(n);function n(){return Ou(this,n),t.apply(this,arguments)}return Au(n,[{key:"afterCreate",value:function(){var e,t=this;if(Bce(Rh(n.prototype),"afterCreate",this).call(this),this.player.plugins.music&&!this.config.disable){this.initIcons(),this.btnClick=this.btnClick.bind(this),this.bind(["touchend","click"],this.btnClick),this.on(Hce.MUSIC_MODE_CHANGE,(function(e){t.animate(e)}));var i=null===(e=this.player.plugins)||void 0===e||null===(e=e.music)||void 0===e||null===(e=e.config)||void 0===e?void 0:e.mode;this.animate(i),this.updateVisible(),this.on(Hce.MUSIC_LIST_CHANGE,this.updateVisible.bind(this))}}},{key:"updateVisible",value:function(){var e;(null===(e=this.player.plugins)||void 0===e||null===(e=e.music)||void 0===e||null===(e=e.list)||void 0===e?void 0:e.length)>1?this.show():this.hide()}},{key:"registerIcons",value:function(){return{order:{icon:zEe,class:"xg-icon-order"},loop:{icon:UEe,class:"xg-icon-loop"},sloop:{icon:FEe,class:"xg-icon-sloop"},random:{icon:BEe,class:"xg-icon-random"}}}},{key:"registerLanguageTexts",value:function(){return{order:{jp:"順番に遊ぶ",en:"Play in order",zh:"顺序播放","zh-hk":"順序播放"},loop:{jp:"リストループ",en:"List loop",zh:"列表循环","zh-hk":"列表循環"},sloop:{jp:"シングルサイクル",en:"Single loop",zh:"单曲循环","zh-hk":"單曲循環"},random:{jp:"シャッフル再生",en:"Play in shuffle",zh:"随机播放","zh-hk":"隨機播放"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.order),this.appendChild(".xgplayer-icon",e.sloop),this.appendChild(".xgplayer-icon",e.loop),this.appendChild(".xgplayer-icon",e.random)}},{key:"btnClick",value:function(e){var t,n;e.preventDefault(),e.stopPropagation();var i=null===(t=this.player.plugins)||void 0===t||null===(t=t.music)||void 0===t||null===(t=t.config)||void 0===t?void 0:t.mode,r=JS(n=DEe.ModeType).call(n,(function(e){return e===i})),o=0;r+1<DEe.ModeType.length&&(o=r+1),this.player.plugins.music.mode=DEe.ModeType[o]}},{key:"animate",value:function(e){switch(e){case TEe.ORDER:this.setAttr("data-state","order"),this.changeLangTextKey(fb(this).call(this,".xg-tips"),"order");break;case TEe.LOOP:this.setAttr("data-state","loop"),this.changeLangTextKey(fb(this).call(this,".xg-tips"),"loop");break;case TEe.SLOOP:this.setAttr("data-state","sloop"),this.changeLangTextKey(fb(this).call(this,".xg-tips"),"sloop");break;case TEe.RANDOM:this.setAttr("data-state","random"),this.changeLangTextKey(fb(this).call(this,".xg-tips"),"random");break;default:this.setAttr("data-state","order"),this.changeLangTextKey(fb(this).call(this,".xg-tips"),"order")}}},{key:"destroy",value:function(){this.unbind(["touchend","click"],this.btnClick)}},{key:"render",value:function(){return'\n <xg-icon class="xgplayer-music-mode">\n <div class="xgplayer-icon"></div>\n <div class="xg-tips" lang-key="musicMode">'.concat(this.langText.order,"</div>\n </xg-icon>\n ")}}],[{key:"pluginName",get:function(){return"MusicMode"}},{key:"defaultConfig",get:function(){return{position:ON.POSITIONS.CONTROLS_RIGHT,index:9,disable:!1}}}]),n}(ON);function jEe(){return(new DOMParser).parseFromString('<svg width="30" height="30" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg">\n<g clip-path="url(#clip0_20323_25753)">\n<g filter="url(#filter0_d_20323_25753)">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M25 0C38.8071 0 50 11.1929 50 25C50 38.8071 38.8071 50 25 50C11.1929 50 0 38.8071 0 25C0 11.1929 11.1929 0 25 0Z" fill="#1664FF"/>\n</g>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M19.3863 11.7091L37.5681 23.0728C38.9924 23.9629 38.9924 26.0372 37.5681 26.9273L19.3863 38.2909C17.8726 39.237 15.9091 38.1488 15.9091 36.3637V13.6364C15.9091 11.8513 17.8726 10.763 19.3863 11.7091Z" fill="white"/>\n</g>\n<defs>\n<filter id="filter0_d_20323_25753" x="-8" y="-6" width="66" height="66" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">\n<feFlood flood-opacity="0" result="BackgroundImageFix"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dy="2"/>\n<feGaussianBlur stdDeviation="4"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/>\n<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_20323_25753"/>\n<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_20323_25753" result="shape"/>\n</filter>\n<clipPath id="clip0_20323_25753">\n<rect width="50" height="50" fill="white"/>\n</clipPath>\n</defs>\n</svg>\n',"image/svg+xml").firstChild}function GEe(){return(new DOMParser).parseFromString('<svg width="30" height="30" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg">\n<g clip-path="url(#clip0_20330_26170)">\n<g filter="url(#filter0_d_20330_26170)">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M25 0C38.8071 0 50 11.1929 50 25C50 38.8071 38.8071 50 25 50C11.1929 50 0 38.8071 0 25C0 11.1929 11.1929 0 25 0Z" fill="#1664FF"/>\n</g>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M20.75 11C21.4404 11 22 11.6044 22 12.35V36.65C22 37.3956 21.4404 38 20.75 38H18.25C17.5596 38 17 37.3956 17 36.65V12.35C17 11.6044 17.5596 11 18.25 11H20.75Z" fill="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M31.75 11C32.4404 11 33 11.6044 33 12.35V36.65C33 37.3956 32.4404 38 31.75 38H29.25C28.5596 38 28 37.3956 28 36.65V12.35C28 11.6044 28.5596 11 29.25 11H31.75Z" fill="white"/>\n</g>\n<defs>\n<filter id="filter0_d_20330_26170" x="-8" y="-6" width="66" height="66" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">\n<feFlood flood-opacity="0" result="BackgroundImageFix"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dy="2"/>\n<feGaussianBlur stdDeviation="4"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/>\n<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_20330_26170"/>\n<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_20330_26170" result="shape"/>\n</filter>\n<clipPath id="clip0_20330_26170">\n<rect width="50" height="50" fill="white"/>\n</clipPath>\n</defs>\n</svg>\n',"image/svg+xml").firstChild}var VEe=Au((function e(t,n){var i;Ou(this,e),function(e){if("Object"!==qO.typeOf(e.controls))e.controls={mode:"flex",initShow:!0};else{var t=e.controls;e.controls=dp({mode:"flex",initShow:!0},t)}var n=e.play||{};e.play=dp({index:3},n),e.marginControls=!0,e.icons=dp({play:jEe,pause:GEe},e.icons||{})}(n);var r="mobile"===eM.device;this.plugins=y_(i=[DEe,NEe,IEe]).call(i,qd(r?[]:[LEe,PEe,OEe,MEe,HEe])),this.ignores=["start","cssFullScreen","fullscreen","pip","enter","replay","pc","loading","poster","error","playbackrate","mobile"]})),KEe=["plugins"];window&&!window.Player&&(window.Player=Qj);var WEe=function(){function e(t){var n=this;Ou(this,e),this.player=null,this.mountingDom=null,this.playerContainer=null,this.mobilePanel=null,this._isFirstCreated=!0,this.sdkPlugins=[],this._sdkPlugins={},this.delayError=[],this.vodLogCommon={},this.delayEvents=[],this.createPlayer=d_(u_().mark((function e(){var t,i,r,o,a,s,l,c,u,h,d,f,p,v,g,y,m,_,b,k,E,w,S,T,C,x,D,I,R,L,P,A,O,M,N,z,U,B,F,H,j,G,V,K;return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n._destroyPlayer();case 2:return e.next=4,n.beforePlayerCreate();case 4:return u=n.playerData,h=u.isLive,d=u.options,f=u.plugins,p=u.isMobile,v=u.openSoftDecoding,g=u.configs,y=u.isMusic,m=u.strategiesPlugins,_=u.strategiesPluginConfigs,b=n.playerData.isOpenABR()?void 0:n.playerData.getCurrentUrl(),k=n.playerData.getCurrentStreamType()||KG(null==g?void 0:g.getVideoByToken),fV(g,"EncryptHlsPlugin")||b&&k||y||n.playerData.isOpenABR()||(LG.warn(y_(E="url is empty or streamType is empty (url:".concat(b,", streamType: ")).call(E,k,")")),n.renderPoster()),w=function(){var e=d_(u_().mark((function e(){var t;return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=wV(b),e.next=3,n.getSoftDecodingOption(v,t,k);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e.next=12,bke({isLive:h,isMobile:p,streamType:k,playerData:n.playerData,getSoftOptionTask:w},n);case 12:return S=e.sent,T=S.presets,C=S.softDecodingOption,x=S.plugins,D=p?Hke(h):Nke(h),I=n._analyzeExtendPlugins(),R=I.basicPlugins,L=void 0===R?[]:R,P=I.iconPlugins,A=void 0===P?[]:P,M=(O=C||{}).plugins,N=void 0===M?[]:M,z=Sp(O,KEe),U=n.getDefinitionConfig(),B=dp(dp(dp(dp(dp(dp({},h?{}:{errorKey:Nue}),D),d),z||{}),{},{definition:U,icons:dp(dp(dp({},D.icons),y?{play:jEe,pause:GEe}:{}),null!==(t=null==d?void 0:d.icons)&&void 0!==t?t:{}),MoreButtonPlugin:{iconPlugins:y_(i=[]).call(i,qd(null!==(r=null===(o=d.MoreButtonPlugin)||void 0===o?void 0:o.iconPlugins)&&void 0!==r?r:[]),qd(A),[eEe,Yke])}},_),{},{playerData:n.playerData}),n.playerData.getLineList().length>1&&B.MoreButtonPlugin.iconPlugins.push($ke),n.setDefaultConfigOptions(B),F=EV(y_(a=[]).call(a,qd(L),qd(f),qd(x),qd(N),qd(m))),H=(null!==(s=null==B?void 0:B.ignores)&&void 0!==s?s:[]).some((function(e){return"sdkunmuteplugin"===(e+"").toLowerCase()})),B.ignores=y_(l=[]).call(l,qd(null!==(c=null==B?void 0:B.ignores)&&void 0!==c?c:[]),qd(H?["AutoplayPlugin"]:[]),qd(y?["sdkErrorPlugin","sdkToastPlugin","MoreButtonPlugin","DanmuPlugin","AutoplayPlugin"]:[])),n._isFirstCreated?n._isFirstCreated=!1:(B.autoplayMuted=!1,B.ignores=y_(j=[]).call(j,qd(null!==(G=null==B?void 0:B.ignores)&&void 0!==G?G:[]),["sdkUnmutePlugin"])),n.setPluginConfig(B),n.player=new Qj(dp(dp(y?{el:n.playerContainer,controls:{mode:"flex",initShow:!0},marginControls:!0,presets:y_(V=[]).call(V,qd(T),[VEe]),mediaType:F_(K=["mp4","m4a","hls"]).call(K,k)?"video":"audio",url:b}:{el:n.playerContainer,presets:T,url:b,isLive:h},B),{},{plugins:qd(F)})),n.player.playerData=n.playerData,n.player.sdk=n,n._emitter.emit(Fce.PLAYER_CREATED_FINISH),n.afterPlayerCreate(),e.abrupt("return",n.player);case 35:case"end":return e.stop()}}),e)}))),this._proxyError=function(e){return n.emit(Vce.ERROR,e)},this._onError=function(e){var t,i=e.errorCode,r=e.httpCode,o=e.mediaError;if(qO.isMSE(null===(t=n.player)||void 0===t?void 0:t.media))r+""!="403"&&i+""!="9203"||n._emitExpireEvent("error",e);else if(4===(null==o?void 0:o.code)||2===(null==o?void 0:o.code)){var a=wV(n.playerData.getCurrentUrl());a&&tV(a,{range:"0-8",timeout:2e3}).then((function(t){LG.log("xhr result",t);var i=t.status,r=t.response;403===i&&"string"==typeof r&&F_(r).call(r,"expire")&&n._emitExpireEvent("error",e)}))}},this._init(t)}var t,n,i,r,o,a,s;return Au(e,[{key:"_init",value:function(e){this.playerData=YP.observe(new Nse(e,this)),this.adapter=this.playerData.adapter,this.initUmdLoader(e),this._emitter=new EA,this.on(Fce.TOKEN_EXPIRED,this.onTokenExpiredAction.bind(this)),this.checkVodLogOptions(),this._initSdkPlugins(),this.renderDom(),this.createPlayer(),this._initI18N(this.playerData.languageData)}},{key:"_initSdkPlugins",value:function(){var e=this;_Ee.init(this);var t=qd(this.sdkPlugins);W_(t).call(t,(function(t){return _Ee.registerPlugin(t,e)}))}},{key:"_initCheckExpire",value:function(){this.checkExpireTimer&&(this.checkExpireTimer.clear(),this.checkExpireTimer=null);var e,t=this.playerData.urlCheckData,n=t.enableUrlExpireCheck,i=t.urlCheckExpireInterval;n&&(this.checkExpireTimer=new sV,nb(e=this.checkExpireTimer).call(e,this._onRepeat.bind(this),i));this.on(Hce.MEDIA_EXPIRED,this._onMediaExpiredAction.bind(this))}},{key:"initUmdLoader",value:function(e){var t=this;this.sdkUmdLoader=new lEe,this.sdkUmdLoader.failCallback=function(e,n){return t.umdLoadErr(e,n)},e.umdUrlMap&&"object"===Du(e.umdUrlMap)&&this.sdkUmdLoader.updateBackupMap(e.umdUrlMap),this.sdkUmdLoader.region=this.playerData.region,e.pluginPublicPath&&"string"==typeof e.pluginPublicPath&&(this.sdkUmdLoader.customPluginPublicPath=e.pluginPublicPath),this.sdkUmdLoader.importedPlugins=e.plugins}},{key:"checkVodLogOptions",value:function(){var e=this.playerData,t=e.isLive,n=e.configs,i=fV(n,"vodLogOpts");if(!(t||n.disableVodLogOptsCheck||null!=i&&i.line_app_id)){var r={errorType:"log",errorCode:Pue.VOD_LOG_NOT_CONFIGURED.code,errorMessage:"vod log options not configured or configured correctly",ext:{},originError:void 0};this.delayError.push(r)}}},{key:"umdLoadErr",value:function(e,t){this.emit(Fce.UMD_LOAD_FAIL,{name:e,error:t})}},{key:"_onRepeat",value:function(){var e=this.playerData.urlCheckData,t=e.urlExpireTimestamp,n=e.urlExpireDiff,i=void 0===n?60:n;Math.round((new Date).getTime()/1e3)>=t-i&&(this.playerData.urlCheckData.urlExpireTimestamp=EG,this._emitExpireEvent("time"))}},{key:"_emitExpireEvent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"error",t=arguments.length>1?arguments[1]:void 0,n=Math.round((new Date).getTime()/1e3),i={errorCode:-499897,errorType:"network",errorMessage:"url expire",url:this.playerData.getCurrentUrl(),httpCode:403,version:"1.10.0",ext:this,detectType:e,urlCheckData:this.playerData.urlCheckData,originError:t,from:"veplayer"};this.emitExpireTimestamp?n-this.emitExpireTimestamp>300&&(this.emitExpireTimestamp=n,LG.warn("media is expired, ",i),this.emit(Vce.MEDIA_EXPIRED,i)):(this.emitExpireTimestamp=n,LG.warn("media is expired, ",i),this.emit(Vce.MEDIA_EXPIRED,i))}},{key:"on",value:function(e,t){this._emitter.on(e,t)}},{key:"emit",value:function(e,t){this._emitter.emit(e,t)}},{key:"once",value:function(e,t){this._emitter.once(e,t)}},{key:"off",value:function(e,t){this._emitter.off(e,t)}},{key:"renderDom",value:function(){var e=this.playerData,t=e.id,n=e.root,i=document.createElement("div");this.playerContainer=i;var r=n||document.querySelector("#".concat(t));r&&(r.appendChild(i),this.mountingDom=r)}},{key:"renderPoster",value:function(){var e,t;if(this.playerContainer){var n=this.playerData.options,i=n.poster,r=void 0===i?"":i,o=n.width,a=n.height;("string"==typeof r?r:null==r?void 0:r.poster)&&(this.playerContainer.style.cssText=y_(e=y_(t='background: url("'.concat(r,'");\n background-size: cover;\n width:')).call(t,o?o+"px":"100%",";\n height:")).call(e,a?a+"px":"100%",";\n "))}}},{key:"getDefinitionConfig",value:function(){var e,t=this,n=this.playerData.current.lineId,i=this.playerData.getDefinitionListByLineId(n),r=this.playerData.current.definition;this.playerData.isOpenABR()&&(r=this.playerData.defaultDefinition,i=null!==(e=i)&&void 0!==e&&e.length&&!this.adapter.needAbrAutoDefinition()?ib(i).call(i,(function(e){return!t.playerData.isAutoDefinition(e.definition)})):i);return{defaultDefinition:r,list:i}}},{key:"setPluginConfig",value:function(e){var t,n,i,r,o=this.playerData,a=o.apiMap,s=o.configs,l=o.unionInfo,c=o.playList,u=o.useHlsPluginForSafari,h=o.isMobile,d=this.playerData.getCurrentStreamType()||KG(null==s?void 0:s.getVideoByToken),f=fV(s,"EncryptHlsPlugin"),p=fV(s,"Mp4EncryptPlayer"),v=fV(s,"DASHPlugin"),g=fV(s,"vodLogOpts"),y=!(null==c||null===(t=c[0])||void 0===t||!t.kid)||!!f;if(f&&(e.EncryptHlsPlugin=dp(dp({playDomain:a.playDomain,getKeyType:"TOP",preferMMS:!0,preferMMSStreaming:!0},h||!bV||u?{}:{useHls:!1}),f)),p&&(e.Mp4EncryptPlayer=dp({playDomain:a.playDomain,getKeyType:"TOP"},p)),v&&(e.DASHPlugin=dp({playDomain:a.playDomain,getKeyType:"TOP"},v)),s.privateDrmAuthToken&&s.kid&&l&&("hls"===d?e.EncryptHlsPlugin=dp({kid:s.kid,drmKeyToken:s.privateDrmAuthToken,playDomain:a.playDomain,preferMMS:!0,preferMMSStreaming:!0},f||{}):"dash"===d?e.DASHPlugin=dp({kid:s.kid,drmKeyToken:s.privateDrmAuthToken,playDomain:a.playDomain},v||{}):"mp4"===d&&(e.Mp4EncryptPlayer=dp({kid:s.kid,drmKeyToken:s.privateDrmAuthToken,playDomain:a.playDomain},p||{}))),g){LG.log("codec",this.playerData.codec);var m=kV(this.region),_=null==m?void 0:m.__LOG_CUSTOM_REGION__;e.vodLogOpts=dp(dp({vtype:(d||"mp4").toUpperCase(),codec_type:this.playerData.codec,drm_type:y?1:0,playerVersion:"1.10.0",channel:null==m?void 0:m.__LOG_CHANNEL__,needXhrCheck:!0,enableTeaWebId:!0},_?{trackerConfig:{log_from_region:null==m?void 0:m.__LOG_CUSTOM_REGION__}}:{}),{},{ext:this.vodLogCommon},g)}null===(n=this.getSdkPlugin("Abr"))||void 0===n||n.applyAbrConfig(e),null===(i=this.getSdkPlugin("AdaptRange"))||void 0===i||i.applyRangeConfig(e),null===(r=this.getSdkPlugin("Strategy"))||void 0===r||r.applyFinalStrategy(e)}},{key:"detectCodec",value:(s=d_(u_().mark((function e(t){var n,i,r,o,a;return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.sdkUmdLoader.loadPlugins(Sse.StreamProbe);case 3:if(e.t0=e.sent,e.t0){e.next=6;break}e.t0={};case 6:if(n=e.t0,!(i=n.LoadProbe)){e.next=14;break}return e.next=11,null===(r=new i)||void 0===r?void 0:r.parseUrl(t);case 11:o=e.sent,"bytevc1"===(a=(o||{}).codec)?this.playerData.codec=zR.H265:"avc"===a&&(this.playerData.codec=zR.H264);case 14:e.next=19;break;case 16:e.prev=16,e.t1=e.catch(0),LG.warn("detect codec error: ",e.t1);case 19:case"end":return e.stop()}}),e,this,[[0,16]])}))),function(e){return s.apply(this,arguments)})},{key:"setDefaultConfigOptions",value:function(e){if(this._isFirstCreated){var t=this.playerData,n=t.defaultConfig,i=t.isHitDefault;if(n){var r=null!=n?n:{},o=r.volume,a=r.startTime,s=r.DanmuPlugin,l=r.LiveSubtitlesIconPlugin;if(o&&(e.volume=e.volume?dp(dp({},e.volume),{},{default:o}):o),i){var c,u;if(a&&(e.startTime=a),s)e.DanmuPlugin=dp(dp({},null!==(c=e.DanmuPlugin)&&void 0!==c?c:{}),s);if(l)e.LiveSubtitlesIconPlugin=dp(dp({},null!==(u=e.LiveSubtitlesIconPlugin)&&void 0!==u?u:{}),l)}}}}},{key:"getCurrentPlayerConfig",value:function(){var e,t,n=this.playerData,i=n.isLive,r=n.current,o=r.lineId,a={type:i?"live":"vod",isLive:i,definition:r.definition,lineId:o,volume:null!==(e=this.player.volume)&&void 0!==e?e:.6};i||(a.startTime=null!==(t=this.player.currentTime)&&void 0!==t?t:0);return dp({},a)}},{key:"getStreamType",value:function(){var e;return this.playerData.getCurrentStreamType()||KG(null===(e=this.playerData)||void 0===e||null===(e=e.configs)||void 0===e?void 0:e.getVideoByToken)}},{key:"_analyzeExtendPlugins",value:function(){var e,t=this.playerData.options,n=t.extendPlugin||[],i=null!==(e=null==t?void 0:t.ignore)&&void 0!==e?e:[],r=[],o=[];return n.forEach((function(e){var t=Gke(e);"inner"!==t.type||i[e.pluginName]?r.push(t):o.push(t)})),{basicPlugins:r,iconPlugins:o}}},{key:"beforePlayerCreate",value:(a=d_(u_().mark((function e(){return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,rb.all([_Ee.beforePlayerCreate(this),this.prepareStrategies()]);case 2:this.updateConfigByStrategy();case 3:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"prepareStrategies",value:(o=d_(u_().mark((function e(){var t,n,i;return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,gEe.prepare();case 2:e.sent?(t=gEe.getStrategyRecommendations(),n=t.plugins,i=t.pluginConfiguration,this.playerData.strategiesPlugins=n,this.playerData.strategiesPluginConfigs=i):(this.playerData.strategiesPlugins=[],this.playerData.strategiesPluginConfigs={});case 4:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"updateConfigByStrategy",value:function(){if(gEe.isReady()){var e=gEe.getStrategyRecommendations().result;if(LG.log("vodLogCommon strategyConfig:",e),this.vodLogCommon={strategyResult:e},null!=e&&e[cEe.H265]){var t,n,i=this.playerData.configs;if(!i)return;var r=i.url,o=i.codec,a=i.playList,s=void 0===a?[]:a,l=ib(s).call(s,(function(e){return!e.codec||e.codec===zR.UNKNOWN})),c=ib(s).call(s,(function(e){return e.codec===zR.H264})),u=ib(s).call(s,(function(e){return e.codec===zR.H265})),h=e[cEe.H265].enableH265Hardware,d=OR(h?y_(t=y_(u).call(u,c)).call(t,l):y_(n=y_(c).call(c,l)).call(n,u),"definition"),f=!h&&!!r&&o===zR.H265&&d.length>0;this.playerData.initPlayData(dp(dp({},this.playerData.configs),{},{url:f?null:r,codec:f?zR.UNKNOWN:o,playList:d})),LG.log("hit h265strategy, current playList: ",this.playerData.playList)}}}},{key:"afterPlayerCreate",value:function(){var e=this.playerData.isMobile;this._setVeError(),this._mountingPlayerPanel(e),this._mountingExtendMethods(),this._bindSdkEvents(),this._bindPlayerEvents(),this._setPlayerInfo(),this._initCheckExpire(),_Ee.afterPlayerCreate(this)}},{key:"_setVeError",value:function(){var e=this.playerData.configs,t={oriErrRetryCount:e.oriErrRetryCount,oriErrRetryCycle:e.oriErrRetryCycle,needSyncAnalyzeError:e.needSyncAnalyzeError,analyzeTimeout:e.analyzeTimeout};this.veErrorIns=new Gue(this.player,t)}},{key:"_emitDelayError",value:function(){var e=this;this.player&&this.delayError.forEach((function(t){e.player.emit(Vce.ERROR,t)})),this.delayError=[]}},{key:"_emitDelayEvent",value:function(){var e=this;this.player&&this.delayEvents.forEach((function(t){var n=t||{},i=n.name,r=n.payload;i&&e.emit(i,r)})),this.delayEvents=[]}},{key:"_setPlayerInfo",value:function(){this.player&&(this.player.playerVersion="1.10.0",this.player.vtype=this.getVtype())}},{key:"getVtype",value:function(){var e,t,n=this.getStreamType()||KG(null===(e=this.playerData)||void 0===e||null===(e=e.configs)||void 0===e?void 0:e.getVideoByToken),i=qO.isMSE(this.player.media);if(!this.player.playerType&&(this.player.playerType=n,"hls"===(null==n?void 0:n.toLowerCase())&&null!==(t=this.player)&&void 0!==t&&t.vodLogger))return i?"HLS_MSE":"HLS";return n.toUpperCase()}},{key:"_mountingPlayerPanel",value:function(e){var t,n=this.playerData,i=n.options,r=n.isLive;this.player&&e&&(this.mobilePanel=new Vke({config:null!==(t=i.panel)&&void 0!==t?t:{mode:r?bG.INNER:bG.NORMAL,isAutoChange:!0},root:this.player.root,player:this.player}),this.player.panel=this.mobilePanel)}},{key:"_bindPlayerEvents",value:function(){this.player&&(this.player.on(Fce.PLAYER_REBUILD,this.createPlayer),this.player.once(Vce.READY,this._emitDelayError.bind(this)),this.player.once(Vce.READY,this._emitDelayEvent.bind(this)),this.player.on(Vce.ERROR,this._onError),this.player.on(Nue,this._proxyError))}},{key:"_onMediaExpiredAction",value:function(){var e,t,n=this;if(this.emitExpireTimestamp=Math.round((new Date).getTime()/1e3),null!==(e=this.playerData)&&void 0!==e&&e.onMediaExpired&&"function"==typeof(null===(t=this.playerData)||void 0===t?void 0:t.onMediaExpired)){var i=dV(this.playerData.onMediaExpired());null!=i&&i.then&&i.then((function(e){return n.updateMediaSource(e)}))}}},{key:"updateMediaSource",value:function(e){var t=this,n=e||{},i=n.url,r=n.playList,o=n.getVideoByToken;return i||null!=r&&r.length?new rb((function(n,i){t.playerData.updateConfigs(e),t.playerData.updatePlayList(),t.playerData.updateCheckExpireData();var o=t.playerData.getCurrentUrl();if(t.player.isError||t.player.state<6&&eM.isWeixin&&eM.os.isIos){if(null==r||!r.length)return t.playNext(dp({},e),!1);var a=t.playerData.current.definition,s=fb(r).call(r,(function(e){return e.definition===a}));if(s&&s.url)return t.playNext(dp(dp({},e),{},{url:s.url}),!1)}else{t.player.setConfig(dp(dp({},e),{},{url:o,definition:t.getDefinitionConfig()}));var l=t.player.switchURL(o,{seamless:!0});l&&l.then?(l.then((function(){return n(void 0)})),l.catch((function(){return i()}))):n(void 0)}})):null!=o&&o.playAuthToken?this.updateAuthToken(o):void 0}},{key:"onTokenExpiredAction",value:function(){var e,t,n=this;if(null!==(e=this.playerData)&&void 0!==e&&e.onTokenExpired&&"function"==typeof(null===(t=this.playerData)||void 0===t?void 0:t.onTokenExpired)){var i=dV(this.playerData.onTokenExpired());null!=i&&i.then&&i.then((function(e){return n.updateAuthToken(e)}))}}},{key:"_bindSdkEvents",value:function(){var e,t,n=this,i=ib(e=wb(nN)).call(e,(function(e){return e!==cM})),r=y_(t=[]).call(t,qd(wb(Hce)),qd(wb(Fce)),qd(i));qd(new DS(ib(r).call(r,(function(e){return"string"==typeof e})))).forEach((function(e){"string"==typeof e&&n.player.on(e,(function(){for(var t,i,r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];(t=n._emitter).emit.apply(t,y_(i=[e]).call(i,o))}))}))}},{key:"_mountingExtendMethods",value:function(){this.player&&(this.player.changePluginsIcon=this.changePluginsIcon.bind(this))}},{key:"_offPlayerEvents",value:function(){this.player&&(this.player.off(Fce.PLAYER_REBUILD,this.createPlayer),this.player.off(Vce.ERROR,this._onError),this.player.off(Nue,this._proxyError))}},{key:"changePluginsIcon",value:function(e,t){var n;if(this.player){var i=this.player.getPlugin(e);if(i&&null!=i&&i.root){var r=qO.hasClass(null==i?void 0:i.parent,"panel-icon-svg")?null==i||null===(n=i.parent)||void 0===n?void 0:n.parentNode:null==i?void 0:i.root;r&&(t?qO.show(r,"block"):qO.hide(r))}}}},{key:"getSdkPlugin",value:function(e){var t=this._sdkPlugins[e.toLowerCase()];return t&&t.pluginName?t:null}},{key:"switchAuthToken",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=n?0:this.player.currentTime,r=this.getSdkPlugin("AuthToken");return new rb((function(o,a){r&&t.player?r.updateAuthToken(e,n).then((function(){t._playerPlayNext(i).then((function(){return o()}))})):(LG.error("current is not playAuthToken play or player not created"),a())}))}},{key:"updateAuthToken",value:function(e){var t=this,n=this.getSdkPlugin("AuthToken");return new rb((function(i,r){n&&t.player?n.updateAuthToken(e,!1).then((function(){if(t.player.isError)t._playerPlayNext(t.player.currentTime).then((function(){return i()})).catch((function(){return r()}));else{var e=t.playerData.getCurrentUrl();t.player.setConfig({url:e,definition:t.getDefinitionConfig()});var n=t.player.switchURL(e,{seamless:!0});n&&n.then?(n.then((function(){return i()})),n.catch((function(){return r()}))):i()}})).catch((function(){return r()})):(LG.error("current is not playAuthToken play or player not created"),r())}))}},{key:"_playerPlayNext",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new rb((function(n,i){var r=e.player.paused&&!e.player.isError;e.player.addClass(UN.ENTER);var o=e.playerData.isOpenABR()?void 0:e.playerData.getCurrentUrl(),a=dp(dp({},e.playerData.options),{},{definition:e.getDefinitionConfig(),startTime:t,autoplay:!0,url:o});if(a.poster&&e.player.plugins.poster&&e.player.plugins.poster.update(a.poster),e.setPluginConfig(a),e.player.plugins.dashplugin){var s,l,c=dp(dp({},fV(e.player.config,"DASHPlugin")),e.playerData.options.DASHPlugin||{});if(c.dashOpts=e.playerData.dashOpts,c.vid=null===(s=e.playerData.dashOpts)||void 0===s||null===(s=s.Data)||void 0===s?void 0:s.Vid,e.player.plugins.drm)null===(l=e.player.plugins.drm)||void 0===l||l.restart();e.player.setConfig(a),e.player.plugins.dashplugin.next(e.player.currentTime,"NEXT",c)}else e.player.playNext(a);var u=function(t){e.player.off(Vce.TIME_UPDATE,h),e.player.off(Vce.CANPLAY,h),i(t)},h=function(){r&&e.player.pause(),e.player.off(Vce.ERROR,u),n(!0)};e.player.once(Vce.ERROR,u),e.player.once(Vce.CANPLAY,h)}))}},{key:"src",get:function(){var e,t;return(null===(e=this.player)||void 0===e?void 0:e.currentSrc)||(null===(t=this.player)||void 0===t?void 0:t.src)},set:function(e){this.player&&(this.player.src=e)}},{key:"switchURL",value:function(e){var t=this,n=this.player.switchURL(e,!1),i=this.player.currentTime;return n&&n.then?n:new rb((function(e){var n=t.player.paused&&!t.player.isError,r=function(){t.player.currentTime=i,n&&t.player.once(Vce.CANPLAY,(function(){t.player.pause()})),e()};eM.os.isAndroid?t.once(Vce.TIME_UPDATE,(function(){r()})):t.once(Vce.CANPLAY,(function(){r()})),t.player.play()}))}},{key:"next",value:function(e){var t,n=this,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?0:this.player.currentTime,r=dp(dp({},this.playerData.configs),{},{startTime:i,autoplay:!0},e);return null!=e&&null!==(t=e.getVideoByToken)&&void 0!==t&&t.playAuthToken&&(r.streamType=KG(null==e?void 0:e.getVideoByToken)||FR.MP4),this.destroy().then((function(){return n._init(r)})).catch((function(e){LG.error("next_error",e)}))}},{key:"playNext",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.player.emit(Hce.PLAY_NEXT_START);var i=this._playNext(e,n);return i.finally((function(){t.player.emit(Hce.PLAY_NEXT_END)})),i}},{key:"_playNext",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)return rb.reject();var i,r=e.url,o=e.playList,a=e.getVideoByToken,s=this.player.paused&&!this.player.isError,l=n?0:this.player.currentTime;if(r||null!=o&&o.length){this.playerData.updateConfigs(e),this.playerData.initPlayData(e);var c=this.adapter.canOpenAbr()&&this.playerData.isOpenABR()?void 0:this.playerData.getCurrentUrl(),u=this.player.state,h=this.getDefinitionConfig(),d=dp(dp({startTime:l},e),{},{url:c,definition:h});return this.setPluginConfig(d),this.player.playNext(d),new rb((function(e,n){if(t.player.once(Vce.ERROR,(function(e){n(e)})),6===u)t.player.once(Vce.EMPTIED,(function(){t.player.once(Vce.CANPLAY,(function(){s&&t.player.pause(),e(void 0)}))}));else{var i=t.player.config.autoplay;t.player.once(Vce.EMPTIED,(function(){t.player.once(Vce.CANPLAY,(function(){i&&t.player.play(),e(void 0)}))}))}}))}return null!=a&&a.playAuthToken?(this.playerData.getCurrentStreamType()||KG(null===(i=this.playerData.configs)||void 0===i?void 0:i.getVideoByToken))!==(e.streamType||KG(null==e?void 0:e.getVideoByToken)||"mp4")?this.next(e,n):this.switchAuthToken(a,n):this.next(e,n)}},{key:"_destroyPlayer",value:(r=d_(u_().mark((function e(){var t,n,i;return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._offPlayerEvents(),null===(t=this.veErrorIns)||void 0===t||t.destroy(),this.veErrorIns=null,e.next=5,null===(n=this.mobilePanel)||void 0===n?void 0:n.destroy();case 5:return e.next=7,null===(i=this.player)||void 0===i?void 0:i.destroy();case 7:this.player=null;case 8:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"getPlayerInstance",value:function(){return this.player}},{key:"getSoftDecodingOption",value:(i=d_(u_().mark((function e(t,n,i){var r,o,a,s,l,c,u,h,d,f,p,v,g,y;return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=this.playerData,a=o.enableH265Degrade,s=o.codec,l=o.configs,c=VG(null==l?void 0:l.getVideoByToken),u=!!(l.enableMp4MSE||fV(this.playerData.options,"Mp4EncryptPlayer")||"mp4"===i&&(s===zR.H265||c||null!=l&&null!==(r=l.autoBitrateOpts)&&void 0!==r&&r.enable)),!t){e.next=27;break}return e.next=6,this.sdkUmdLoader.loadPlugins(Sse.XGVideo);case 6:if(!(null==(h=e.sent)?void 0:h.isSupported())){e.next=21;break}if(s&&h.setDecodeCapacity({preloadDecoder:this.playerData.codec,wasmFallbackToAsm:!1,reuseWasmDecoder:!1,disabledWhenErrorOccur:!1}),this.setH265SoftPlayList(),!u){e.next=18;break}return e.next=14,this.sdkUmdLoader.loadPlugins(Sse.MP4Encrypt);case 14:return d=e.sent,e.abrupt("return",{mediaType:this.playerData.isCurrentH265()?"xg-video":"video",innerDegrade:1,codecType:null!=s?s:zR.H264,plugins:[d]});case 18:return e.abrupt("return",{mediaType:"xg-video",innerDegrade:1,codecType:null!=s?s:zR.H264});case 19:e.next=25;break;case 21:this.emit(Fce.NOT_SUPPORT_SOFT_DECODER),f={errorType:"decoder",errorCode:3,errorMessage:"soft decode is not support by current browser",ext:{},originError:void 0},this.delayError.push(f),LG.error("soft decode is not support by current browser");case 25:e.next=60;break;case 27:if(!a||s||!n){e.next=30;break}return e.next=30,this.detectCodec(n);case 30:if(!this.playerData.isCurrentH265()||(m=void 0,_=void 0,b=void 0,m=window.navigator.userAgent.toLocaleLowerCase(),_=/(iphone)/.test(m)||/(ipad)/.test(m),b=/(quark)/.test(m),_&&!b||window.MediaSource&&window.MediaSource.isTypeSupported&&(window.MediaSource.isTypeSupported('video/mp4;codecs="hev1.1.6.L120.90"')||window.MediaSource.isTypeSupported('video/mp4;codecs="hev1.2.4.L120.90"')||window.MediaSource.isTypeSupported('video/mp4;codecs="hev1.3.E.L120.90"')||window.MediaSource.isTypeSupported('video/mp4;codecs="hev1.4.10.L120.90"')))){e.next=60;break}if(!a){e.next=56;break}return e.next=34,this.sdkUmdLoader.loadPlugins(Sse.XGVideo);case 34:if(!(null==(p=e.sent)?void 0:p.isSupported())){e.next=50;break}if(null==p||p.setDecodeCapacity({preloadDecoder:this.playerData.codec,wasmFallbackToAsm:!1,reuseWasmDecoder:!1,disabledWhenErrorOccur:!1}),this.setH265SoftPlayList(),this.playerData.openSoftDecoding=!0,!u){e.next=47;break}return e.next=43,this.sdkUmdLoader.loadPlugins(Sse.MP4Encrypt);case 43:return v=e.sent,e.abrupt("return",{mediaType:this.playerData.isCurrentH265()?"xg-video":"video",innerDegrade:1,codecType:null!=s?s:zR.H264,plugins:[v]});case 47:return e.abrupt("return",{mediaType:"xg-video",innerDegrade:1,codecType:null!=s?s:zR.H264});case 48:e.next=54;break;case 50:this.emit(Fce.NOT_SUPPORT_SOFT_DECODER),g={errorType:"decoder",errorCode:3,errorMessage:"soft decode is not support by current browser",ext:{},originError:void 0},this.delayError.push(g),LG.error("soft decode is not support by current browser");case 54:e.next=60;break;case 56:this.emit(Fce.NOT_SUPPORT_HARDWARE_DECODER),y={ext:{},originError:void 0,errorType:"decoder",errorCode:3,errorMessage:"h265 hardware decode is not supported by this browser"},this.delayError.push(y),LG.error("h265 hardware decode is not supported by this browser");case 60:return e.abrupt("return",{});case 61:case"end":return e.stop()}var m,_,b}),e,this)}))),function(e,t,n){return i.apply(this,arguments)})},{key:"setH265SoftPlayList",value:function(){if(this.playerData.isCurrentH265()){var e=this.playerData.playList;e.length>1&&(this.playerData.playList=ib(e).call(e,(function(e){var t;return(null==e||null===(t=e.codec)||void 0===t?void 0:t.toLowerCase())===zR.H265}))),this.playerData.initCurrent(this.playerData.playList[0])}}},{key:"changeDefinition",value:function(e){var t,n;if(!((null===(t=this.getDefinitionList())||void 0===t?void 0:t.length)<=1)){var i=(null===(n=this.player)||void 0===n?void 0:n.plugins)||{},r=i.sdkdefinitionplugin,o=i.definitionmobileplugin;if(r||o)e!==this.playerData.current.definition&&(r?null==r||r.changeDefinition(e):o&&(null==o||o.changeDefinition(e)));else{var a,s,l=this.playerData.current.lineId,c=this.playerData.getDefinitionListByLineId(l);if(!(a=fb(c).call(c,(function(t){return t.definition===e}))))a=null===(s=this.player)||void 0===s||null===(s=s.config)||void 0===s||null===(s=s.definition)||void 0===s||null===(s=s.list)||void 0===s?void 0:fb(s).call(s,(function(t){return(null==t?void 0:t.definition)===e}));a&&(this.player.changeDefinition(a),a.definition!==this.playerData.current.definition&&(this.playerData.current.definition=a.definition))}}}},{key:"getDefinitionList",value:function(){var e,t,n=this,i=(null===(e=this.player)||void 0===e?void 0:e.plugins)||{},r=i.sdkdefinitionplugin,o=i.definitionmobileplugin;return r||o?(null==r?void 0:r.renderList)||(null==o?void 0:o.renderList):W_(t=this.player.definitionList).call(t,(function(e){var t,i=n.playerData.isDefinitionMatch(e.definition,null===(t=n.player.curDefinition)||void 0===t?void 0:t.definition),r=e.url===n.player.url,o=e.url===n.player.src;return dp(dp({},e),{},{isDefinitionAuto:n.playerData.isAutoDefinition(e.definition),selected:i||(n.playerData.isOpenABR()&&eM.os.isIos?o:r)})}))}},{key:"_initI18N",value:function(e){var t=e.extraLangList,n=e.extendLangList;null==t||t.forEach((function(e){KN.use(e)})),KN.extend(wEe),n&&KN.extend(n)}},{key:"musicMode",get:function(){var e;return null===(e=this.player.plugins)||void 0===e||null===(e=e.music)||void 0===e?void 0:e.mode},set:function(e){var t;null!==(t=this.player.plugins)&&void 0!==t&&t.music&&(this.player.plugins.music.mode=e)}},{key:"musicTimeScale",get:function(){var e;return null===(e=this.player.plugins)||void 0===e||null===(e=e.music)||void 0===e?void 0:e.timeScale},set:function(e){var t;null!==(t=this.player.plugins)&&void 0!==t&&t.music&&(this.player.plugins.music.timeScale=e)}},{key:"musicList",get:function(){var e;return null===(e=this.player.plugins)||void 0===e||null===(e=e.music)||void 0===e?void 0:e.list},set:function(e){var t;null===(t=this.player.plugins)||void 0===t||null===(t=t.music)||void 0===t||t.updateList(e)}},{key:"musicAdd",value:function(e){var t,n;null===(t=this.player.plugins)||void 0===t||null===(t=t.music)||void 0===t||null===(n=t.add)||void 0===n||n.call(t,e)}},{key:"musicRandom",value:function(){var e,t;return null===(e=this.player.plugins)||void 0===e||null===(e=e.music)||void 0===e||null===(t=e.random)||void 0===t?void 0:t.call(e)}},{key:"musicNext",value:function(){var e,t;null===(e=this.player.plugins)||void 0===e||null===(e=e.music)||void 0===e||null===(t=e.next)||void 0===t||t.call(e)}},{key:"musicPrev",value:function(){var e,t;null===(e=this.player.plugins)||void 0===e||null===(e=e.music)||void 0===e||null===(t=e.prev)||void 0===t||t.call(e)}},{key:"musicSetIndex",value:function(e){var t,n;null===(t=this.player.plugins)||void 0===t||null===(t=t.music)||void 0===t||null===(n=t.setIndex)||void 0===n||n.call(t,e)}},{key:"musicForward",value:function(){var e,t;null===(e=this.player.plugins)||void 0===e||null===(e=e.music)||void 0===e||null===(t=e.forward)||void 0===t||t.call(e)}},{key:"musicBackward",value:function(){var e,t;null===(e=this.player.plugins)||void 0===e||null===(e=e.music)||void 0===e||null===(t=e.backward)||void 0===t||t.call(e)}},{key:"musicRemove",value:function(e){var t,n;null===(t=this.player.plugins)||void 0===t||null===(t=t.music)||void 0===t||null===(n=t.remove)||void 0===n||n.call(t,e)}},{key:"musicSetAbCycle",value:function(e,t,n,i){var r,o;null===(r=this.player.plugins)||void 0===r||null===(r=r.music)||void 0===r||null===(o=r.setAbCycle)||void 0===o||o.call(r,e,t,n,i)}},{key:"musicRemoveAbCycle",value:function(){var e,t;null===(e=this.player.plugins)||void 0===e||null===(e=e.music)||void 0===e||null===(t=e.removeAbCycle)||void 0===t||t.call(e)}},{key:"getLogUserId",value:function(){var e,t=null===(e=this.player)||void 0===e?void 0:e.vodLogger;if(t){var n,i,r=(null==t||null===(n=t.tracker)||void 0===n?void 0:n.getConfig())||{};return null==r||null===(i=r.user)||void 0===i?void 0:i.user_unique_id}}},{key:"region",get:function(){return this.playerData.region}},{key:"getPlugin",value:function(e){var t;return null===(t=this.player)||void 0===t?void 0:t.getPlugin(e)}},{key:"destroy",value:(n=d_(u_().mark((function e(){var t;return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._destroyPlayer();case 2:this.checkExpireTimer&&(this.checkExpireTimer.clear(),this.checkExpireTimer=null,this._onRepeat=null),this.mountingDom&&this.mountingDom.contains(this.playerContainer)&&this.mountingDom.removeChild(this.playerContainer),null===(t=this._emitter)||void 0===t||t.removeAllListeners(),this._emitter=null,_Ee.destroy(this);case 7:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})}],[{key:"prepare",value:(t=d_(u_().mark((function e(t){return u_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,gEe.init(t);case 2:return e.next=4,gEe.initPreloadService(t);case 4:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"setPreloadScene",value:function(e,t){return gEe.setPreloadScene(e,t)}},{key:"preloader",get:function(){return gEe.preloader}},{key:"preloaderStatus",get:function(){return gEe.preloaderStatus}},{key:"addPreloadList",value:function(e){return gEe.addPreloadList(e)}},{key:"setPreloadList",value:function(e){return gEe.setPreloadList(e)}}]),e}();WEe.isMSESupported=yV,WEe.isRTMSupported=Uce.isSupported,WEe.veStrategy=gEe,WEe.sdkVersion="1.10.0",WEe.isRTMSupportCodec=function(e,t){if(e===BR.H264)return Uce.isSupportedH264(null==t?void 0:t.targetProfileLevel)};var YEe,qEe=function(e){rh(n,e);var t=Ah(n);function n(e){var i;return Ou(this,n),(i=t.call(this,e)).state={showLang:"",subTitleList:[],rtmpDtsGap:0,dtsBase:0,showingSubtitle:"",currentSub:null},i.clearLineTimer=null,i.showTimer=null,i.state.showLang=e.showLang,i}return Au(n,[{key:"beforePlayerInit",value:function(){var e=this;this.on(dM,this.handleVideoTimeupdate.bind(this)),this.on(lM,this.onPause.bind(this)),this.on(oM,this.onPlay.bind(this)),this.on(RM,this.destroy.bind(this)),this.on(LM,this.clearRtmpDtsGap.bind(this)),this.on(HM,this.handleSEIParsed.bind(this)),this.on("core_event",(function(t){"core.sei"===t.eventName&&e.handleSEIParsed(t.sei,t.originPts)}))}},{key:"onPause",value:function(){this.clearSubTitle(!1)}},{key:"onPlay",value:function(){this.clearSubTitle(!0)}},{key:"destroy",value:function(){this.clearSubTitle(!0),this.off(dM,this.handleVideoTimeupdate.bind(this)),this.off(HM,this.handleSEIParsed.bind(this)),this.off(lM,this.onPause.bind(this)),this.off(oM,this.onPlay.bind(this)),this.off(RM,this.destroy.bind(this)),this.off(LM,this.clearRtmpDtsGap.bind(this))}},{key:"clearRtmpDtsGap",value:function(){this.state.rtmpDtsGap=0,this.state.dtsBase=0,this.clearSubTitle(!0)}},{key:"clearSubTitle",value:function(e){if(this.state.subTitleList=[],this.state.showingSubtitle="",this.state.currentSub=null,clearTimeout(this.showTimer),clearTimeout(this.clearLineTimer),e){var t=fb(this).call(this,".xgplayer-subtitles-inner");t&&this.resetDom(t)}}},{key:"getIsSoft",value:function(){var e;return"LIVE-VIDEO"===(null!==(e=this.player.video)&&void 0!==e?e:{}).tagName}},{key:"handleVideoTimeupdate",value:function(e){var t,n,i=this.player.video.currentTime,r=this.getIsSoft(),o=(null==e||null===(t=e.detail)||void 0===t?void 0:t.pts)/1e3,a=r?o:i;if(this.state.showLang&&a&&this.player.isPlaying){var s,l=this.findSubTitleByTime(a);if(l)if(l.text!==this.state.showingSubtitle)if(null!==(n=l.wordpiece)&&void 0!==n&&n.length)if(this.renderSubtitle(l),this.player.emit(Hce.AI_SUBTITLE_MATCH,{subTitle:l,lang:this.state.showLang}),this.state.subTitleList.length>1e3)this.state.subTitleList=ib(s=this.state.subTitleList).call(s,(function(e){return e.timestamp+e.duration/1e3>=a}))}}},{key:"renderSubtitle",value:function(e){var t=this,n=this.root,i=fb(this).call(this,".xgplayer-subtitles-inner"),r=fb(this).call(this,".xgplayer-subtitles-helper");if(i){this.clearLineTimer&&clearTimeout(this.clearLineTimer),this.showTimer&&(clearTimeout(this.showTimer),this.showSurplus());var o=this.createNewDom(i);this.state.showingSubtitle=e.text,this.state.currentSub={subObj:e,dom:o,index:0};var a=Date.now(),s="",l=0;!function c(){var u,h=e.wordpiece,d=void 0===h?[]:h,f=e.delimiter;if(l===d.length)return s="",t.showTimer=null,void(t.clearLineTimer=setTimeout((function(){t.resetDom(i),t.clearLineTimer=null}),1e3));var p=d[l].duration-(Date.now()-a-d[l].OffsetMs);if(p<0)for(;p<0&&l<d.length-1;)s=s+f+d[l+=1].text,p=d[l].duration-(Date.now()-a-d[l].OffsetMs);else s=s+f+d[l].text;r.textContent=s;var v=null!==(u=null==n?void 0:n.offsetWidth)&&void 0!==u?u:300;r.offsetWidth>v&&(o=t.createNewDom(i),t.state.currentSub.dom=o,s=d[l].text),o.textContent=s,t.showTimer=setTimeout(c,p),l+=1,t.state.currentSub.index=l}()}}},{key:"handleSEIParsed",value:function(e,t){var n,i,r=e.dts;if(5===e.code)try{var o="string"==typeof e.content?e.content:(n=e.content,i=String.fromCharCode.apply(null,n),Sx(i).call(i,qP(i).call(i,"{"),j_e(i).call(i,"}")+1)),a=JSON.parse(o).rtmp_dts;if(a&&r){var s=t||r;this.state.rtmpDtsGap=a-s}}catch(cK){}}},{key:"insertSubTitle",value:function(){for(var e,t=this,n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];i.forEach((function(e){e.timestamp=t.adjustSubTitleTime(e.timestamp)})),(e=this.state.subTitleList).push.apply(e,i)}},{key:"setCurrentLang",value:function(e){this.state.showLang=e,this.player.emit(Hce.AI_SUBTITLE_LANG_CHANGE,e)}},{key:"adjustSubTitleTime",value:function(e){var t,n,i,r;if(this.getIsSoft())return(e-this.state.rtmpDtsGap)/1e3;var o=(null===(t=this.player)||void 0===t||null===(t=t.plugins)||void 0===t?void 0:t.flvlive)||(null===(n=this.player)||void 0===n||null===(n=n.plugins)||void 0===n?void 0:n.hlslive);if(o){var a,s,l,c,u,h,d=null!==(a=null==o||null===(s=o._context)||void 0===s||null===(s=s.getInstance("COMPATIBILITY"))||void 0===s?void 0:s._videoLargeGap)&&void 0!==a?a:0,f=null==o||null===(l=o._context)||void 0===l?void 0:l.getInstance("MP4_REMUXER"),p=null!==(c=null!==(u=null===(h=f.remuxer)||void 0===h?void 0:h.videoDtsBase)&&void 0!==u?u:null==f?void 0:f.videoDtsBase)&&void 0!==c?c:0;return this.state.dtsBase=p-d,(e+d-p-this.state.rtmpDtsGap)/1e3}var v=(null===(i=this.player)||void 0===i||null===(i=i.plugins)||void 0===i?void 0:i.flv)||(null===(r=this.player)||void 0===r||null===(r=r.plugins)||void 0===r?void 0:r.hls);if(v){var g,y=null===(g=v.core._bufferService)||void 0===g||null===(g=g._demuxer)||void 0===g||null===(g=g._fixer)||void 0===g?void 0:g._baseDts;return this.state.dtsBase=y,(e-y-this.state.rtmpDtsGap)/1e3}return(e-this.state.rtmpDtsGap)/1e3}},{key:"findSubTitleByTime",value:function(e){var t=this,n=this.state.subTitleList,i=JS(n).call(n,(function(n){var i=t.player,r=n.lang===t.state.showLang,o=((null==i?void 0:i.__curUrl)||i.config.url)===n.url,a=n.timestamp;return a+n.duration/1e3>=e&&a<=e&&o&&r}));if(!(i<0)){var r=bT(n).call(n,0,i+1),o=r[r.length-1];return this.splitSubTitle(o)}}},{key:"splitSubTitle",value:function(e){var t="en"===e.lang?" ":"",n=e.text.split(t);if(!e.wordpiece){var i=e.duration/n.length,r=W_(n).call(n,(function(e,t){return{text:e,OffsetMs:i*t,duration:i}}));return dp(dp({},e),{},{delimiter:t,textArr:n,wordpiece:r})}return dp(dp({},e),{},{delimiter:t,textArr:n})}},{key:"showSurplus",value:function(){var e,t=this;if(this.state.currentSub){var n=this.state.currentSub,i=n.index,r=n.subObj,o=n.dom,a=null!=r?r:{},s=a.wordpiece,l=a.delimiter;if(!(i>=s.length)){var c=fb(this).call(this,".xgplayer-subtitles-helper"),u=fb(this).call(this,".xgplayer-subtitles-inner"),h=this.root,d=null!==(e=null==h?void 0:h.offsetWidth)&&void 0!==e?e:300,f=s.length,p=o.textContent;Sx(s).call(s,i,f).forEach((function(e){p=p+l+e.text,c.textContent=p,c.offsetWidth>d&&(t.state.currentSub.dom=t.createNewDom(u),p=e.text),t.state.currentSub.dom.textContent=p}))}}}},{key:"createNewDom",value:function(e){if(e){e.children.length>2&&e.firstElementChild&&e.removeChild(e.firstElementChild);var t=document.createElement("span");if(e.appendChild(t),e.children.length>2){var n=e.classList.contains("scroll-1"),i=e.classList.contains("scroll-2");n&&e.classList.replace("scroll-1","scroll-2"),i&&e.classList.replace("scroll-2","scroll-1"),n||i||e.classList.add("scroll-1")}return t}}},{key:"test",value:function(){var e=this,t=this.splitSubTitle({duration:1e4,lang:"zh",text:"你呼吸 已改变 停滞于某段流年 离别的你我 才明白挥霍有期限,逝去的人不曾走远 像 突如其来温暖我的晴天 像 倾盆大雨我躲避的屋檐",timestamp:0,url:"xxx"});this.renderSubtitle(t),setTimeout((function(){e.test()}),1e4)}},{key:"getPlayTime",value:function(){var e=this,t=this.getIsSoft();this.on(dM,(function(n){if(t){var i,r={pts:null==n||null===(i=n.detail)||void 0===i?void 0:i.pts,rtmpDtsGap:e.state.rtmpDtsGap};r.timestamp=r.pts+r.rtmpDtsGap,LG.log("直播当前时间戳:",r.timestamp,r)}else{var o={currentTime:1e3*e.player.video.currentTime,dtsBase:e.state.dtsBase,rtmpDtsGap:e.state.rtmpDtsGap};o.timestamp=o.currentTime+o.dtsBase+o.rtmpDtsGap,LG.log("直播当前时间戳:",o.timestamp,o)}}))}},{key:"resetDom",value:function(e){e&&(this.state.currentSub=null,e&&(e.innerHTML="",e.classList.remove("scroll-1","scroll-2")))}},{key:"render",value:function(){return'<xg-subtitles class="xgplayer-subtitles"><xg-subtitles-inner class="xgplayer-subtitles-inner"></xg-subtitles-inner><xg-subtitles-helper class="xgplayer-subtitles-helper"></xg-helper></xg-subtitles>'}}],[{key:"pluginName",get:function(){return"LiveSubtitlesPlugin"}},{key:"defaultConfig",get:function(){return{position:ON.POSITIONS.ROOT,showLang:""}}}]),n}(ON),XEe=qEe,$Ee=ON.POSITIONS,ZEe=function(e){rh(n,e);var t=Ah(n);function n(e){var i;return Ou(this,n),(i=t.call(this,e)).isMobile="mobile"===eM.device,i.isOpenState=!0,i.optionList=null,i.currentLang="",i}return Au(n,[{key:"afterCreate",value:function(){this.appendChild(".xgplayer-icon",this.icons.aiSubOpen),this.appendChild(".xgplayer-icon",this.icons.aiSubClose),this.renderOptionList(),this.initEvents(),this.currentLang=this.config.default,this.config.defaultOpen?this.open(!0):this.close()}},{key:"afterPlayerInit",value:function(){this.config.defaultOpen&&this.changeSubTitleLang(this.config.default,!0)}},{key:"registerIcons",value:function(){return{aiSubOpen:{icon:o_e,class:"xgplayer-aisub-open-svg"},aiSubClose:{icon:a_e,class:"xgplayer-aisub-close-svg"}}}},{key:"registerLanguageTexts",value:function(){return{sub:{jp:"AI 字幕",en:"AI Subtitles",zh:"AI 字幕","zh-hk":"AI 字幕"},subOpen:{jp:"字幕をオンにする",en:"Show subtitles",zh:"开启字幕","zh-hk":"開啟字幕"},subClose:{jp:"クローズドキャプション",en:"Hide subtitles",zh:"关闭字幕","zh-hk":"關閉字幕"}}}},{key:"children",value:function(){return{LiveSubTitlesPlugin:{plugin:XEe,options:{root:this.player.root,showLang:this.currentLang}}}}},{key:"initEvents",value:function(){this.bind(["click"],this.handleButtonChange.bind(this)),this.bind(["mouseenter"],this.showPanel.bind(this)),this.bind(["mouseleave"],this.hidePanel.bind(this))}},{key:"handleButtonChange",value:function(){(this.close=this.close.bind(this),this.open=this.open.bind(this),this.isMobile)?this.showMobilePanel():(this.isOpenState?this.close:this.open)()}},{key:"showMobilePanel",value:function(){var e,t=this.renderItemList();null===(e=this.player.panel)||void 0===e||e.showPanel(t,this.langText.sub,!0)}},{key:"renderItemList",value:function(){var e=this,t=qd(this.config.list),n=qO.createDom("div","",{},"ai-panel-content");return t.push({key:"",showText:this.langText.subClose}),t.forEach((function(t){var i=e.renderItem(t);n.appendChild(i)})),n}},{key:"renderItem",value:function(e){var t=this,n=""===e.key&&!this.isOpenState||this.currentLang===e.key&&this.isOpenState,i=qO.createDom("div","",{},"panel-Item ".concat(n?"select-in":""));return i.innerHTML=e.showText,i.addEventListener("click",(function(n){n.stopPropagation(),n.preventDefault(),t.changeSubTitleLang(e.key),t.updatePanel()})),i}},{key:"updatePanel",value:function(){var e,t=this.renderItemList();null===(e=this.player.panel)||void 0===e||e.updatePanel(t)}},{key:"showPanel",value:function(){var e;!this.isMobile&&this.isOpenState&&(null===(e=this.optionList)||void 0===e||e.show())}},{key:"hidePanel",value:function(){var e;!this.isMobile&&this.isOpenState&&(null===(e=this.optionList)||void 0===e||e.hide())}},{key:"open",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isOpenState=!0,qO.removeClass(this.root,"isClose"),qO.addClass(this.root,"isOpen"),!e&&this.showPanel(),this.toggleSubTitle()}},{key:"close",value:function(){var e;this.isOpenState=!1,qO.removeClass(this.root,"isOpen"),qO.addClass(this.root,"isClose"),null===(e=this.optionList)||void 0===e||e.hide(),this.toggleSubTitle()}},{key:"renderOptionList",value:function(){var e,t,n=this;if(!((null===(e=this.config.list)||void 0===e?void 0:e.length)<2||this.isMobile)){var i={config:{data:W_(t=this.config.list).call(t,(function(e){return e.key===n.config.default&&(e.isCurrent=!0,e.selected=!0),e})),className:"",onItemClick:function(e,t){var i;e.stopPropagation(),e.preventDefault(),n.changeSubTitleLang(null===(i=t.to)||void 0===i?void 0:i.key)}},root:this.root};this.optionList=new cj(i)}}},{key:"changeSubTitleLang",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.currentLang=e,e?this.open(t):this.close()}},{key:"toggleSubTitle",value:function(){var e;null===(e=this.player.getPlugin("LiveSubtitlesPlugin"))||void 0===e||e.setCurrentLang(this.isOpenState?this.currentLang:"")}},{key:"destroy",value:function(){var e;this.unbind(["click"],this.handleButtonChange.bind(this)),this.unbind(["mouseenter"],this.showPanel.bind(this)),this.unbind(["mouseleave"],this.hidePanel.bind(this)),null===(e=this.optionList)||void 0===e||e.destroy()}},{key:"render",value:function(){return'\n <xg-icon class="xgplayer-aisub">\n <div class="xgplayer-icon">\n </div>\n <div class="xg-tips" lang-key="subOpen">'.concat(this.langText.subOpen,"</div>\n </xg-icon>\n ")}}],[{key:"pluginName",get:function(){return"LiveSubtitlesIconPlugin"}},{key:"defaultConfig",get:function(){return{position:$Ee.CONTROLS_RIGHT,index:2.7,defaultOpen:!0,default:"en",list:[{key:"zh",showText:"中文"},{key:"en",showText:"En"}]}}}]),n}(ON),QEe="function"==typeof Buffer,JEe=("function"==typeof TextDecoder&&new TextDecoder,"function"==typeof TextEncoder?new TextEncoder:void 0),ewe=Sx(Array.prototype).call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),twe=(YEe={},ewe.forEach((function(e,t){return YEe[e]=t})),YEe),nwe=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,iwe=String.fromCharCode.bind(String),rwe=("function"==typeof Uint8Array.from&&Uint8Array.from.bind(Uint8Array),function(e){return e.replace(/=/g,"").replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"}))}),owe=function(e){return e.replace(/[^A-Za-z0-9\+\/]/g,"")},awe=function(e){for(var t,n,i,r,o="",a=e.length%3,s=0;s<e.length;){if((n=e.charCodeAt(s++))>255||(i=e.charCodeAt(s++))>255||(r=e.charCodeAt(s++))>255)throw new TypeError("invalid character found");o+=ewe[(t=n<<16|i<<8|r)>>18&63]+ewe[t>>12&63]+ewe[t>>6&63]+ewe[63&t]}return a?Sx(o).call(o,0,a-3)+"===".substring(a):o},swe="function"==typeof btoa?function(e){return btoa(e)}:QEe?function(e){return Buffer.from(e,"binary").toString("base64")}:awe,lwe=QEe?function(e){return Buffer.from(e).toString("base64")}:function(e){for(var t=[],n=0,i=e.length;n<i;n+=4096)t.push(iwe.apply(null,e.subarray(n,n+4096)));return swe(t.join(""))},cwe=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?iwe(192|t>>>6)+iwe(128|63&t):iwe(224|t>>>12&15)+iwe(128|t>>>6&63)+iwe(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return iwe(240|t>>>18&7)+iwe(128|t>>>12&63)+iwe(128|t>>>6&63)+iwe(128|63&t)},uwe=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,hwe=function(e){return e.replace(uwe,cwe)},dwe=QEe?function(e){return Buffer.from(e,"utf8").toString("base64")}:JEe?function(e){return lwe(JEe.encode(e))}:function(e){return swe(hwe(e))},fwe=function(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?rwe(dwe(e)):dwe(e)},pwe=function(e){if(e=e.replace(/\s+/g,""),!nwe.test(e))throw new TypeError("malformed base64.");e+=Sx("==").call("==",2-(3&e.length));for(var t,n,i,r="",o=0;o<e.length;)t=twe[e.charAt(o++)]<<18|twe[e.charAt(o++)]<<12|(n=twe[e.charAt(o++)])<<6|(i=twe[e.charAt(o++)]),r+=64===n?iwe(t>>16&255):64===i?iwe(t>>16&255,t>>8&255):iwe(t>>16&255,t>>8&255,255&t);return r},vwe=fwe,gwe=In,ywe=g,mwe=rr,_we=RangeError,bwe=String.fromCharCode,kwe=String.fromCodePoint,Ewe=ywe([].join);gwe({target:"String",stat:!0,arity:1,forced:!!kwe&&1!=kwe.length},{fromCodePoint:function(e){for(var t,n=[],i=arguments.length,r=0;i>r;){if(t=+arguments[r++],mwe(t,1114111)!==t)throw _we(t+" is not a valid code point");n[r]=t<65536?bwe(t):bwe(55296+((t-=65536)>>10),t%1024+56320)}return Ewe(n,"")}});var wwe=t(te.String.fromCodePoint),Swe={};!function(e){e._getPrivFilters=function(){var e,t=/</g,n=/"/g,i=/'/g,r=/&/g,o=/\x00/g,a=/(?:^$|[\x00\x09-\x0D "'`=<>])/g,s=/[&<>"'`]/g,l=/(?:\x00|^-*!?>|--!?>|--?!?$|\]>|\]$)/g,c=/&(?:#([xX][0-9A-Fa-f]+|\d+);?|(Tab|NewLine|colon|semi|lpar|rpar|apos|sol|comma|excl|ast|midast|ensp|emsp|thinsp);|(nbsp|amp|AMP|lt|LT|gt|GT|quot|QUOT);?)/g,u={Tab:"\t",NewLine:"\n",colon:":",semi:";",lpar:"(",rpar:")",apos:"'",sol:"/",comma:",",excl:"!",ast:"*",midast:"*",ensp:" ",emsp:" ",thinsp:" ",nbsp:" ",amp:"&",lt:"<",gt:">",quot:'"',QUOT:'"'},h=/^(?:(?!-*expression)#?[-\w]+|[+-]?(?:\d+|\d*\.\d+)(?:r?em|ex|ch|cm|mm|in|px|pt|pc|%|vh|vw|vmin|vmax)?|!important|)$/i,d=/[\x00-\x1F\x7F\[\]{}\\"]/g,f=/[\x00-\x1F\x7F\[\]{}\\']/g,p=/url[\(\u207D\u208D]+/g,v=/['\(\)]/g,g=/\/\/%5[Bb]([A-Fa-f0-9:]+)%5[Dd]/,y={javascript:1,data:1,vbscript:1,mhtml:1,"x-schema":1},m=/(?::|&#[xX]0*3[aA];?|&#0*58;?|&colon;)/,_=/(?:^[\x00-\x20]+|[\t\n\r\x00]+)/g,b={Tab:"\t",NewLine:"\n"},k=function(e,t,n){return void 0===e?"undefined":null===e?"null":e.toString().replace(t,n)},E=wwe||function(e){return 0===arguments.length?"":e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),e%1024+56320))};function w(e){var t=e.split(m,2);return!t[0]||2!==t.length&&e.length===t[0].length?null:t[0]}function S(t,n,i,r){return n=n||u,i=i||c,void 0===t?"undefined":null===t?"null":t.toString().replace(o,"�").replace(i,(function(t,i,o,a){return i?(i=Number(i[0]<="9"?i:"0"+i),r?E(i):128===i?"€":130===i?"‚":131===i?"ƒ":132===i?"„":133===i?"…":134===i?"†":135===i?"‡":136===i?"ˆ":137===i?"‰":138===i?"Š":139===i?"‹":140===i?"Œ":142===i?"Ž":145===i?"‘":146===i?"’":147===i?"“":148===i?"”":149===i?"•":150===i?"–":151===i?"—":152===i?"˜":153===i?"™":154===i?"š":155===i?"›":156===i?"œ":158===i?"ž":159===i?"Ÿ":i>=55296&&i<=57343||13===i?"�":e.frCoPt(i)):n[o||a]||t}))}function T(e){return"\\"+e.charCodeAt(0).toString(16).toLowerCase()+" "}function C(e){return e.replace(p,(function(e){return"-x-"+e}))}function x(t){var n=w(t=e.yufull(S(t)));return n&&y[n.toLowerCase()]?"##"+t:t}return e={frCoPt:function(e){return null==e?"":!isFinite(e=Number(e))||e<=0||e>1114111||e>=1&&e<=8||e>=14&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||11===e||65535==(65535&e)||65534==(65535&e)?"�":E(e)},d:S,yup:function(e){return(e=w(e.replace(o,"")))?S(e,b,null,!0).replace(_,"").toLowerCase():null},y:function(e){return k(e,s,(function(e){return"&"===e?"&amp;":"<"===e?"&lt;":">"===e?"&gt;":'"'===e?"&quot;":"'"===e?"&#39;":"&#96;"}))},ya:function(e){return k(e,r,"&amp;")},yd:function(e){return k(e,t,"&lt;")},yc:function(e){return k(e,l,(function(e){return"\0"===e?"�":"--!"===e||"--"===e||"-"===e||"]"===e?e+" ":Sx(e).call(e,0,-1)+" >"}))},yavd:function(e){return k(e,n,"&quot;")},yavs:function(e){return k(e,i,"&#39;")},yavu:function(e){return k(e,a,(function(e){return"\t"===e?"&#9;":"\n"===e?"&#10;":"\v"===e?"&#11;":"\f"===e?"&#12;":"\r"===e?"&#13;":" "===e?"&#32;":"="===e?"&#61;":"<"===e?"&lt;":">"===e?"&gt;":'"'===e?"&quot;":"'"===e?"&#39;":"`"===e?"&#96;":"�"}))},yu:encodeURI,yuc:encodeURIComponent,yubl:function(t){return y[e.yup(t)]?"x-"+t:t},yufull:function(t){return e.yu(t).replace(g,(function(e,t){return"//["+t+"]"}))},yublf:function(t){return e.yubl(e.yufull(t))},yceu:function(e){return e=S(e),h.test(e)?e:";-x:'"+C(e.replace(f,T))+"';-v:"},yced:function(e){return C(S(e).replace(d,T))},yces:function(e){return C(S(e).replace(f,T))},yceuu:function(e){return x(e).replace(v,(function(e){return"'"===e?"\\27 ":"("===e?"%28":"%29"}))},yceud:function(e){return x(e)},yceus:function(e){return x(e).replace(i,"\\27 ")}}};var t=e._privFilters=e._getPrivFilters();function n(e,n,i){return t.yubl(n((i||t.yufull)(e)))}e.inHTMLData=t.yd,e.inHTMLComment=t.yc,e.inSingleQuotedAttr=t.yavs,e.inDoubleQuotedAttr=t.yavd,e.inUnQuotedAttr=t.yavu,e.uriInSingleQuotedAttr=function(e){return n(e,t.yavs)},e.uriInDoubleQuotedAttr=function(e){return n(e,t.yavd)},e.uriInUnQuotedAttr=function(e){return n(e,t.yavu)},e.uriInHTMLData=t.yufull,e.uriInHTMLComment=function(e){return t.yc(t.yufull(e))},e.uriPathInSingleQuotedAttr=function(e){return n(e,t.yavs,t.yu)},e.uriPathInDoubleQuotedAttr=function(e){return n(e,t.yavd,t.yu)},e.uriPathInUnQuotedAttr=function(e){return n(e,t.yavu,t.yu)},e.uriPathInHTMLData=t.yu,e.uriPathInHTMLComment=function(e){return t.yc(t.yu(e))},e.uriQueryInSingleQuotedAttr=e.uriPathInSingleQuotedAttr,e.uriQueryInDoubleQuotedAttr=e.uriPathInDoubleQuotedAttr,e.uriQueryInUnQuotedAttr=e.uriPathInUnQuotedAttr,e.uriQueryInHTMLData=e.uriPathInHTMLData,e.uriQueryInHTMLComment=e.uriPathInHTMLComment,e.uriComponentInSingleQuotedAttr=function(e){return t.yavs(t.yuc(e))},e.uriComponentInDoubleQuotedAttr=function(e){return t.yavd(t.yuc(e))},e.uriComponentInUnQuotedAttr=function(e){return t.yavu(t.yuc(e))},e.uriComponentInHTMLData=t.yuc,e.uriComponentInHTMLComment=function(e){return t.yc(t.yuc(e))},e.uriFragmentInSingleQuotedAttr=function(e){return t.yubl(t.yavs(t.yuc(e)))},e.uriFragmentInDoubleQuotedAttr=function(e){return t.yubl(t.yavd(t.yuc(e)))},e.uriFragmentInUnQuotedAttr=function(e){return t.yubl(t.yavu(t.yuc(e)))},e.uriFragmentInHTMLData=e.uriComponentInHTMLData,e.uriFragmentInHTMLComment=e.uriComponentInHTMLComment}(Swe);var Twe="position: absolute; width: 100%; height: 100%; left: 0px; top: 0px; pointer-events: none; z-index: 9999; font-size: 14px; display: block;",Cwe={SLOW:.5,MODERATE:1,FAST:2},xwe={SLOW:5,MODERATE:3.5,FAST:2},Dwe={style:{node:Twe,wrap:"",img:""},class:{node:"",wrap:"xg-dynamic-watermark",img:""}};function Iwe(e,t){var n=document.createElementNS("http://www.w3.org/2000/svg",e);return kT(t).forEach((function(e){n.setAttribute(e,t[e])})),n}var Rwe=function(){function e(t){Ou(this,e),this.root=t.root,this.config=t,this.wrap=document.createElement("div"),this.img=document.createElement("img"),this.imgSrc="",this.root&&this.root.appendChild(this.wrap),this.moveTimer=null,this.blinkTimer=null,this.pauseAnimation=!1,this.observer=[]}return Au(e,[{key:"_getWatermarkDom",value:function(){var e,t,n=this.config,i=n.content,r=void 0===i?"":i,o=n.fontFamily,a=r,s="string"==typeof this.config.fontSize?"".concat(this.config.fontSize):"".concat(this.config.fontSize,"px"),l=document.createElement("text");l.style.fontSize=s,l.style.whiteSpace="nowrap",o&&(l.style.fontFamily=o),l.innerHTML=Swe.inHTMLData(a),document.body.appendChild(l);var c=Iwe("svg",{xmlns:"http://www.w3.org/2000/svg",width:l.offsetWidth+2,height:l.offsetHeight}),u=Iwe("text",dp({x:l.offsetWidth/2,y:l.offsetHeight/2,style:y_(e=y_(t="\n fill:".concat(this.config.fontColor,";\n text-anchor: middle;\n alignment-baseline:middle;\n opacity: ")).call(t,this.config.opacity,";\n font-size: ")).call(e,s,";\n ")},o?{"font-family":o}:{}));return u.innerHTML=Swe.inHTMLData(a),document.body.removeChild(l),c.appendChild(u),"data:image/svg+xml;base64, "+vwe((new XMLSerializer).serializeToString(c))}},{key:"_startRender",value:function(){switch(this.pauseAnimation=!1,this.config.displayType){case 0:this._fixedRender();break;case 1:this._startMove();break;case 2:this._startBlink()}this.observer[0]=this._attrObserver(this.img,["src","class"],"img"),this.observer[1]=this._attrObserver(this.wrap,["class","style","id"],"node"),this.observer[2]=this._attrObserver(this.root,["class","style"],"wrap"),this.observer[3]=this._domObserver(this.wrap),this.observer[4]=this._domObserver(this.root),this.observer[5]=this._domObserver(this.root.parentElement,!0)}},{key:"_startMove",value:function(){var e,t=this;if(this.img&&null!==(e=this.wrap)&&void 0!==e&&e.clientWidth){var n=this._getOffset(),i=n.offsetX,r=n.offsetY,o=Cwe[this.config.tickerSpeed]||Cwe.MODERATE,a=i,s=o,l=r,c=o;clearInterval(this.moveTimer),this.moveTimer=setInterval((function(){var e;if(!t.pauseAnimation){var n=t._getOffsetThreshold();a+=s,l+=c,t.wrap.offsetWidth>t.img.offsetWidth&&a>t.wrap.offsetWidth&&(a=t.wrap.offsetWidth-t.img.offsetWidth),t.wrap.offsetHeight>t.img.offsetHeight&&l>t.wrap.offsetHeight&&(l=t.wrap.offsetHeight-t.img.offsetHeight),t.img.setAttribute("style",y_(e="position: relative;left:".concat(a,"px; top:")).call(e,l,"px")),a>=n.hRight&&(s=-o),a<=n.hLeft&&(s=o),l>=n.vBottom&&(c=-o),l<=n.vTop&&(c=o)}}),30)}}},{key:"_startBlink",value:function(){var e=this,t=xwe[this.config.tickerSpeed]||xwe.MODERATE;clearInterval(this.blinkTimer),this._blinkRender(t,!0),this.blinkTimer=setInterval((function(){e.pauseAnimation||e._blinkRender(t)}),1e3*t)}},{key:"_randomBetween",value:function(e,t){var n=t-e+1;return Math.floor(Math.random()*n)+e}},{key:"_fixedRender",value:function(){var e,t;if(this.img&&null!==(e=this.wrap)&&void 0!==e&&e.clientWidth){this.img.setAttribute("style","");var n,i,r=this._getOffset(),o=r.offsetX,a=r.offsetY,s=xwe[this.config.tickerSpeed];return s?this.img.setAttribute("style",y_(n=y_(i="opacity: 0.1;transform: translate(".concat(o,"px, ")).call(i,a,"px);animation: _xg_animation_blink ")).call(n,s,"s linear infinite;")):this.img.setAttribute("style",y_(t="opacity: 1;transform: translate(".concat(o,"px, ")).call(t,a,"px);"))}}},{key:"_getOffset",value:function(){var e=this.config,t=e.left,n=e.top,i=e.right,r=e.bottom,o=this.wrap,a=o.clientWidth,s=o.clientHeight,l=this.img,c=l.clientWidth,u=l.clientHeight,h=0,d=0;return void 0!==i&&a&&(h=a-c-i),void 0!==t&&a&&(h=t),void 0!==r&&s&&(d=s-u-r),void 0!==n&&s&&(d=n),{offsetX:h,offsetY:d}}},{key:"_getOffsetThreshold",value:function(){var e=this.wrap,t=e.clientWidth,n=e.clientHeight,i=this.img,r=i.clientWidth,o=i.clientHeight;return{hLeft:t-r>=0?0:t-r,hRight:t-r>=0?t-r:0,vTop:n-o>=0?0:n-o,vBottom:n-o>=0?n-o:0}}},{key:"_blinkRender",value:function(e,t){var n,i=this;if(this.img&&null!==(n=this.wrap)&&void 0!==n&&n.clientWidth){if(this.img.setAttribute("style","opacity: 0.1;"),t){var r,o,a=this._getOffset(),s=a.offsetX,l=a.offsetY;return this.img.setAttribute("style",y_(r=y_(o="opacity: 0.1;transform: translate(".concat(s,"px, ")).call(o,l,"px);animation: _xg_animation_blink ")).call(r,e,"s linear 1;"))}var c=this._getOffsetThreshold(),u=this.wrap,h=u.clientWidth,d=u.clientHeight,f=h?this._randomBetween(c.hLeft,c.hRight):0,p=d?this._randomBetween(c.vTop,c.vBottom):0;setTimeout((function(){var t,n;i.img.setAttribute("style",y_(t=y_(n="opacity: 0.1;transform: translate(".concat(f,"px, ")).call(n,p,"px);animation: _xg_animation_blink ")).call(t,e,"s linear 1;"))}),10)}}},{key:"_attrObserver",value:function(e,t,n){var i=this;if(e&&this.wrap&&window.MutationObserver){var r=new window.MutationObserver((function(t){e&&i.wrap&&t.forEach((function(t){if(("class"===t.attributeName&&e.getAttribute("class")!=Dwe.class[n]&&e.setAttribute("class",Dwe.class[n]),"style"===t.attributeName&&e.getAttribute("style")!=Dwe.style[n]&&e.setAttribute("style",Dwe.style[n]),"img"===n&&"src"===t.attributeName)&&((null==e?void 0:e.getAttribute("src"))||"")!==i.imgSrc){var r=i._getWatermarkDom();i.wrap&&r&&(i.imgSrc=r,e.setAttribute("src",r))}}))}));return r.observe(e,{attributes:!0,attributeOldValue:!0,attributeFilter:t}),r}}},{key:"_domObserver",value:function(e,t){var n=this;if(e&&this.wrap){var i=new window.MutationObserver((function(i){e&&n.wrap&&i.forEach((function(i){i.removedNodes.forEach((function(i){if(!t)return e.appendChild(i);!e.getElementsByClassName(n.config.rootClassName).length&&e.appendChild(i)}))}))}));return i.observe(e,{childList:!0}),i}}},{key:"update",value:function(){var e=this._getWatermarkDom();this.wrap&&this.img&&e&&(this.imgSrc=e,this.img.setAttribute("src",e))}},{key:"start",value:function(){var e=this;if(this.root&&this.wrap&&this.img){clearInterval(this.moveTimer),clearInterval(this.blinkTimer),this.observer.forEach((function(e){var t;null==e||null===(t=e.disconnect)||void 0===t||t.call(e)})),this.wrap.innerHTML="",this.wrap.setAttribute("style",Twe);var t=this._getWatermarkDom();t&&(this.img.src=t,this.img.style.opacity="0",this.img.alt="",this.imgSrc=t,this.wrap.appendChild(this.img),setTimeout((function(){return e._startRender()})))}}},{key:"pause",value:function(){this.pauseAnimation=!0}},{key:"resume",value:function(){this.pauseAnimation=!1}},{key:"resize",value:function(){}},{key:"destroy",value:function(){clearInterval(this.moveTimer),clearInterval(this.blinkTimer),this.observer.forEach((function(e){var t;null==e||null===(t=e.disconnect)||void 0===t||t.call(e)})),this.img=null,this.wrap.innerHTML="",this.wrap=null}}]),e}(),Lwe="xg-dynamic-watermark",Pwe=function(e){rh(n,e);var t=Ah(n);function n(e){var i;return Ou(this,n),(i=t.call(this,e)).wm=null,i}return Au(n,[{key:"afterCreate",value:function(){var e=this;this.config.enable&&(this._initWatermark(),this.once(dM,(function(){e.start()})),this.on(jM,(function(){e.resize()})))}},{key:"start",value:function(){var e,t;null===(e=this.wm)||void 0===e||null===(t=e.start)||void 0===t||t.call(e)}},{key:"pause",value:function(){var e,t;null===(e=this.wm)||void 0===e||null===(t=e.pause)||void 0===t||t.call(e)}},{key:"resume",value:function(){var e,t;null===(e=this.wm)||void 0===e||null===(t=e.resume)||void 0===t||t.call(e)}},{key:"resize",value:function(){var e,t;null===(e=this.wm)||void 0===e||null===(t=e.resize)||void 0===t||t.call(e)}},{key:"_initWatermark",value:function(){this.wm=new Rwe(dp(dp({},this.config),{},{root:this.root,rootClassName:Lwe}))}},{key:"destroy",value:function(){var e,t;null===(e=this.wm)||void 0===e||null===(t=e.destroy)||void 0===t||t.call(e),this.offAll()}},{key:"render",value:function(){return"\n <xg-dynamic-watermark class=".concat(Lwe," />\n ")}}],[{key:"pluginName",get:function(){return"DynamicWatermark"}},{key:"defaultConfig",get:function(){return{position:ON.POSITIONS.ROOT,displayType:1,tickerSpeed:void 0,fontSize:12,fontColor:"#ffffff",opacity:.3,enable:!1,top:void 0,left:void 0,right:void 0,bottom:void 0,content:""}}}]),n}(ON),Awe=function(e){rh(n,e);var t=Ah(n);function n(e){var i;return Ou(this,n),(i=t.call(this,e)).waitings=[],i.longWaitingEmitTime=0,i.waitingStartTime=0,i.playerData=null,i.playerData=i.playerConfig.playerData,i}return Au(n,[{key:"registerLanguageTexts",value:function(){return{definition_demote_txt:{jp:"現在のネットワークは不安定です。に切り替えることをお勧めします",en:"The current network is unstable, it is recommended to switch to ",zh:"当前网络不稳定,建议切换到","zh-hk":"當前網絡不穩定,建議切換到"}}}},{key:"afterCreate",value:function(){this.bindCtx(),this.bindEvents()}},{key:"bindCtx",value:function(){this._count=this._count.bind(this),this._time=this._time.bind(this),this._waiting=this._waiting.bind(this),this._clearTime=this._clearTime.bind(this),this.demote=this.demote.bind(this)}},{key:"bindEvents",value:function(){this.on(fM,this._waiting),this.on(lM,this._clearTime),this.on(oM,this._clearTime),this.on(BM,this._clearTime),this.on(Hce.PlAY_URL_CHANGE,this._clearTime),this.config.isNeedAutoDemote&&this.player.on(Hce.LONG_WAITING,this.demote)}},{key:"_waiting",value:function(){this._count(),this._time()}},{key:"_count",value:function(){var e=Date.now();this.waitings.push(e);var t=this.config,n=t.oftenWaitingCount,i=t.oftenWaitingTime;if(this.waitings.length>=n){var r,o=this.waitings.shift();if(o&&e-o<=i)LG.warn(y_(r="stuttering occurred at least ".concat(n," times within ")).call(r,i,"ms")),this.player.emit(Hce.OFTEN_WAITING);this.clearState()}}},{key:"_time",value:function(){var e=this;if(this.timer)LG.log("The stuttering was triggered continuously, and the interval since the last stuttering was ","".concat(Date.now()-this.waitingStartTime,"ms"));else{this.waitingStartTime=Date.now();var t=this.player.currentTime;this.timer=setTimeout((function(){e.player&&e.player.currentTime<=t+.1&&(LG.warn("stuttering last more than ".concat(e.config.longWaitingTime,"ms")),e.player.emit(Hce.LONG_WAITING),e.timer&&(clearTimeout(e.timer),e.timer=null),e.waitingStartTime&&(e.waitingStartTime=0))}),this.config.longWaitingTime)}}},{key:"_clearTime",value:function(){this.waitingStartTime&&LG.log("stuttering last for ","".concat(Date.now()-this.waitingStartTime,"ms")),this.clearState()}},{key:"clearState",value:function(){this.timer&&(clearTimeout(this.timer),this.timer=null),this.waitings.length>0&&(this.waitings=[]),this.waitingStartTime&&(this.waitingStartTime=0)}},{key:"demote",value:function(){if(!this.player.checkBuffer(this.player.currentTime,{endDiff:.5,startDiff:.5})&&!this.player.isSeeking&&this.player.state===WN.RUNNING&&this.player.currentTime>1){if(!this.playerData)return;var e=this.playerData.getNextDefinition(!0,this.config.demotePriority),t=null==e?void 0:e[0];if(!t||!t.url)return;var n=t.definition;if(!n)return;var i=this.playerData.current.definition;if(this.player.emit(Hce.DEFINITION_DEMOTE,{currentDef:i,willChangeDef:n,next:t}),"auto"===i){var r=t.url;LG.log("auto demote definition to ".concat(t.definition)),this.changeUrl(r)}else n!==i&&this.showToast(t)}else LG.log("stuttering but not need demote definition")}},{key:"changeUrl",value:function(e){this.player&&e&&(this.player.config.url=e,this.player.switchURL(e,{seamless:!this.player.config.isLive}).then((function(){LG.log("auto demote definition switch url(".concat(e,") success"))})),this.player.emit(Hce.PlAY_URL_CHANGE,{url:e,from:"definition_demote"}))}},{key:"showToast",value:function(e){var t,n=this,i=null===(t=this.player)||void 0===t?void 0:t.getPlugin("sdkToastPlugin");if(i&&(this.toastId&&(i.remove(this.toastId),this.toastId=null),this.config.isNeedShowTips)){var r=this.i18n[e.definitionTextKey]||e.definitionTextKey||e.definition,o=qO.createDom("div",this.langText.definition_demote_txt,void 0,"toast-txt"),a=qO.createDom("span",r,void 0,"toast-txt-bt");o.appendChild(a),this.toastId=i.add(o,this.config.toastShowTime,!0),a.addEventListener("click",(function(){n.playerData&&(n.playerData.current.definition=e.definition,i.remove(n.toastId),n.toastId=null,LG.log("user handle demote definition to ".concat(e.definition)))}))}}},{key:"destroy",value:function(){this.clearState()}}],[{key:"pluginName",get:function(){return"DefinitionDemotePlugin"}},{key:"defaultConfig",get:function(){return{isNeedAutoDemote:!0,toastShowTime:3e3,demotePriority:[],isNeedShowTips:!0,oftenWaitingCount:3,oftenWaitingTime:5e3,longWaitingTime:5e3}}}]),n}(ON),Owe=ON.POSITIONS,Mwe=604800,Nwe=function(e){rh(n,e);var t=Ah(n);function n(){var e;return Ou(this,n),(e=t.apply(this,arguments)).isMobile="mobile"===eM.device,e.playedBar=null,e.cachedBar=null,e.innerBar=null,e.progressBtn=null,e.progressPoint=null,e.backLiveBt=null,e.cardDomList=[],e.initTime=0,e.liveGap=0,e.shiftTimeGap=0,e.isProgressMoving=!1,e.isPlayTimeShift=!1,e.liveUrl="",e.onBodyClick=function(e){e.preventDefault(),e.stopPropagation(),qO.event(e)},e}return Au(n,[{key:"duration",get:function(){var e,t=this.liveGap+Math.floor(Date.now()/1e3-this.initTime),n=(null!==(e=this.config)&&void 0!==e?e:{}).maxMoveTime;return n&&t>n?n:t>Mwe?Mwe:t}},{key:"registerLanguageTexts",value:function(){return{BACKLIVE:{jp:"ライブに戻る",en:"Back to live",zh:"返回直播","zh-hk":"返回直播"}}}},{key:"updateLang",value:function(){this.backLiveBt&&(this.backLiveBt.innerHTML=this.langText.BACKLIVE)}},{key:"afterCreate",value:function(){this.liveUrl=this.player.config.url,this.playedBar=fb(this).call(this,".xgplayer-progress-played"),this.cachedBar=fb(this).call(this,".xgplayer-progress-cache"),this.progressBtn=fb(this).call(this,".xgplayer-progress-btn"),this.progressPoint=fb(this).call(this,".xgplayer-shift-progress-point"),this.innerBar=fb(this).call(this,".xgplayer-progress-inner"),this.createBackLiveBtDom(),this.clacTime(),this.initEvents(),this.bindDomEvents(),this.isMobile||this.createTimeShiftCard()}},{key:"clacTime",value:function(){var e,t=null!==(e=this.config)&&void 0!==e?e:{},n=t.livingStartTime,i=t.currentTime;this.initTime=Math.floor(Date.now()/1e3),this.liveGap=Math.floor(i-n)}},{key:"initEvents",value:function(){this.on(dM,this.handleTimeUpdate.bind(this))}},{key:"bindDomEvents",value:function(){if(this.handleMouseDown=this.handleMouseDown.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseEnter=this.handleMouseEnter.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this),this.tipsUpdate=this.tipsUpdate.bind(this),this.isMobile){this.bind("touchstart",this.handleMouseDown);var e=this.player.controls;e&&(e.root&&e.root.addEventListener("touchmove",qO.stopPropagation),e.center&&e.center.addEventListener("touchend",qO.stopPropagation))}else this.bind("mousedown",this.handleMouseDown),this.bind("mouseenter",this.handleMouseEnter)}},{key:"handleTimeUpdate",value:function(){this.isProgressMoving||this.progressUpdate()}},{key:"handleMouseDown",value:function(e){if(e.target!==this.backLiveBt){this.onBodyClick(e),this.focus(),qO.addClass(this.progressBtn,"active");var t=this.computeTime(e);this.updateShiftTime(t.percent),this.isProgressMoving=!0,this.isMobile?(this.bind("touchmove",this.handleMouseMove),this.bind("touchend",this.handleMouseUp)):(document.addEventListener("mousemove",this.handleMouseMove,!1),document.addEventListener("mouseup",this.handleMouseUp,!1))}}},{key:"handleMouseMove",value:function(e){this.onBodyClick(e);var t=this.computeTime(e);this.updateShiftTime(t.percent)}},{key:"handleMouseUp",value:function(e){this.onBodyClick(e),this.isProgressMoving=!1,qO.removeClass(this.progressBtn,"active"),this.changeTimeUrl(),this.isMobile?(this.unbind("touchmove",this.handleMouseMove),this.unbind("touchend",this.handleMouseUp)):(document.removeEventListener("mousemove",this.handleMouseMove,!1),document.removeEventListener("mouseup",this.handleMouseUp,!1))}},{key:"handleMouseEnter",value:function(e){this.bind("mouseleave",this.handleMouseLeave),this.bind("mousemove",this.tipsUpdate),this.tipsUpdate(e),this.focus()}},{key:"handleMouseLeave",value:function(){this.unbind("mouseleave",this.handleMouseLeave),this.unbind("mousemove",this.tipsUpdate),this.blur()}},{key:"focus",value:function(){this.player.controls.pauseAutoHide(),qO.addClass(this.root,"active")}},{key:"blur",value:function(){this.player.controls.recoverAutoHide(),qO.removeClass(this.root,"active")}},{key:"computeTime",value:function(e){var t,n,i,r=this.player,o=this.root.getBoundingClientRect(),a=o.width,s=o.height,l=o.top,c=o.left,u=qO.getEventPos(e,r.zoom);90===r.rotateDeg?(t=s,n=l,i=u.clientY):(t=a,n=c,i=u.clientX);var h=i-n,d=(h=h>t?t:h<0?0:h)/t;return{percent:d=d<0?0:d>1?1:d,offset:h,width:t,left:n,e:e}}},{key:"tipsUpdate",value:function(e){var t,n,i,r,o,a,s,l,c=this.computeTime(e),u=Math.floor(this.duration*(1-c.percent));this.progressPoint.style.left="".concat(100*c.percent,"%"),this.progressPoint.innerHTML="-".concat((t=u,o=Math.floor(t/3600),a=t%3600,s=Math.floor(a/60),l=Math.round(a%60),o>0?(s<10&&(s="0"+s),l<10&&(l="0"+l),y_(i=y_(r="".concat(o,":")).call(r,s,":")).call(i,l)):(l<10&&(l="0"+l),y_(n="".concat(s,":")).call(n,l))))}},{key:"updateShiftTime",value:function(e){this.shiftTimeGap=Math.floor(this.duration*(1-e)),this.progressUpdate()}},{key:"getCurrentProgress",value:function(){return Math.floor(this.duration-this.shiftTimeGap)}},{key:"progressUpdate",value:function(){var e=this.getCurrentProgress()/this.duration;this.progressBtn.style.left="".concat(100*e,"%"),this.playedBar.style.width="".concat(100*e,"%"),this.cardProcessUpdate()}},{key:"changeTimeShift",value:function(e){var t=this.calcCardProcess(e);t<0||(this.updateShiftTime(t),this.changeTimeUrl())}},{key:"changeTimeUrl",value:function(){var e=this.config.timeShiftUrl,t="";this.isPlayTimeShift=!0,this.toggleBackButton();var n=this.shiftTimeGap<6?6:this.shiftTimeGap;t=e?e.replace("{}",n):function(e,t){var n;if(!t)return e;var i=W_(n=MT(t)).call(n,(function(e){var t,n=IS(e,2),i=n[0],r=n[1];return y_(t="".concat(i,"=")).call(t,null!=r?r:"")})).join("&");return e+(-1===qP(e).call(e,"?")?"?":"&")+i}(this.liveUrl,{timeshift:n}),this.player.src=t,this.player.config.url=t,this.player.emit(Hce.TIME_SHIFT_CHANGE,!0),this.player.emit(Hce.PlAY_URL_CHANGE,{shiftUrl:t,from:Hce.TIME_SHIFT_CHANGE})}},{key:"createBackLiveBtDom",value:function(){var e,t=this;if(this.backLiveBt)return this.backLiveBt;this.backLiveBt=qO.createDom("xg-back-live-bt",this.langText.BACKLIVE,void 0,"xgplayer-back-live-bt"),this.backLiveBt.addEventListener("click",(function(e){t.onBodyClick(e),t.backLive()})),null===(e=this.player.root)||void 0===e||e.appendChild(this.backLiveBt)}},{key:"backLive",value:function(){this.liveUrl&&(this.player.src=this.liveUrl,this.player.config.url=this.liveUrl,this.shiftTimeGap=0,this.isPlayTimeShift=!1,this.toggleBackButton(),this.player.emit(Hce.TIME_SHIFT_CHANGE,!1),this.player.emit(Hce.PlAY_URL_CHANGE,{url:this.liveUrl,from:Hce.TIME_SHIFT_CHANGE}))}},{key:"toggleBackButton",value:function(){this.backLiveBt&&(this.backLiveBt.style.display=this.isPlayTimeShift?"flex":"none")}},{key:"updateCardList",value:function(e){this.config.cardList=qd(e),this.clearCardDom(),this.createTimeShiftCard()}},{key:"clearCardDom",value:function(){var e=this;this.cardDomList.forEach((function(t){t.dom&&e.innerBar.contains(t.dom)&&e.innerBar.removeChild(t.dom)})),this.cardDomList=[]}},{key:"createTimeShiftCard",value:function(){var e,t=this;(null===(e=this.config.cardList)||void 0===e?void 0:e.length)<=0||this.config.cardList.forEach((function(e){t.renderCard(e)}))}},{key:"renderCard",value:function(e){if(e.img){var t=qO.createDom("xg-card","",void 0,"xgplayer-shift-progress-card"),n=qO.createDom("img","",{src:e.img},"xgplayer-shift-progress-card-img"),i=qO.createDom("div","",void 0,"xgplayer-shift-progress-card-point");t.appendChild(n),t.appendChild(i),this.cardDomList.push(dp(dp({},e),{},{dom:t}))}}},{key:"cardProcessUpdate",value:function(){var e=this;0!==this.cardDomList.length&&this.cardDomList.forEach((function(t){if(t.dom){var n=e.calcCardProcess(t.timestamp);if(!(n>1)){var i=e.innerBar.contains(t.dom);n<0?i&&e.innerBar.removeChild(t.dom):(i||e.innerBar.appendChild(t.dom),t.dom.style.left="".concat(100*n,"%"))}}}))}},{key:"calcCardProcess",value:function(e){var t,n=null!==(t=this.config)&&void 0!==t?t:{},i=n.maxMoveTime,r=n.livingStartTime,o=this.liveGap+Math.floor(Date.now()/1e3-this.initTime);return i&&o>i&&(r=o-i),e<r?-1:(e-r)/this.duration}},{key:"destroy",value:function(){if(this.off(dM,this.handleTimeUpdate.bind(this)),this.isMobile){this.unbind("touchstart",this.handleMouseDown);var e=this.player.controls;e&&(e.root&&e.root.removeEventListener("touchmove",qO.stopPropagation),e.center&&e.center.removeEventListener("touchend",qO.stopPropagation))}else this.unbind("mousedown",this.handleMouseDown),this.unbind("mouseenter",this.handleMouseEnter);var t;this.backLiveBt&&(null===(t=this.player.root)||void 0===t||t.removeChild(this.backLiveBt),this.backLiveBt=null)}},{key:"render",value:function(){if(this.config.disable)return"";var e=this.player.controls?this.player.controls.config.mode:"";return'\n <xg-progress class="xgplayer-progress '.concat("bottom"===e?"xgplayer-progress-bottom":"",' xgplayer-shift">\n <xg-outer class="xgplayer-progress-outer">\n <xg-inners class="progress-list">\n <xg-inner class="xgplayer-progress-inner" style="flex: 1">\n <xg-cache class="xgplayer-progress-cache" style="width: 100%;"></xg-cache>\n <xg-played class="xgplayer-progress-played" style="width: 100%;"></xg-played>\n </xg-inner>\n </xg-inners>\n <xg-progress-btn class="xgplayer-progress-btn"></xg-progress-btn>\n <xg-point class="xgplayer-shift-progress-point">00:00</xg-point>\n </xg-outer>\n </xg-progress>\n ')}}],[{key:"pluginName",get:function(){return"TimeShiftPlugin"}},{key:"defaultConfig",get:function(){return{position:Owe.CONTROLS_CENTER,livingStartTime:Date.now()/1e3,maxMoveTime:0,currentTime:Date.now()/1e3,timeShiftUrl:"",cardList:[]}}}]),n}(ON);function zwe(){return(new DOMParser).parseFromString('<svg width="20" height="20" viewBox="0 0 18 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M8.5 0.199997C8.5 0.0895386 8.5896 0 8.69995 0H9.30005C9.4104 0 9.5 0.0895386 9.5 0.199997V1.8C9.5 1.91046 9.4104 2 9.30005 2H8.69995C8.5896 2 8.5 1.91046 8.5 1.8V0.199997Z" fill="white"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0 1.95424C0 1.85173 0.0773926 1.76582 0.179443 1.75529L7.27954 1.02277C7.34546 1.01596 7.40649 1.04182 7.44751 1.08664C7.47998 1.12207 7.5 1.16936 7.5 1.22171V14.7783C7.5 14.8969 7.39746 14.9894 7.27954 14.9773L0.179443 14.2447C0.0773926 14.2342 0 14.1483 0 14.0458V1.95424ZM1.5 12.873V3.12701L6 2.66273V13.3373L1.5 12.873Z" fill="white"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M18 1.95424C18 1.85173 17.9226 1.76582 17.8206 1.75529L10.7205 1.02277C10.6025 1.01059 10.5 1.10313 10.5 1.22171V14.7783C10.5 14.8969 10.6025 14.9894 10.7205 14.9773L17.8206 14.2447C17.9226 14.2342 18 14.1483 18 14.0458V1.95424ZM16.5 3.12701L12 2.66273V13.3373L16.5 12.873V3.12701Z" fill="white"/>\n <path d="M8.69995 3C8.5896 3 8.5 3.08954 8.5 3.2V4.8C8.5 4.91046 8.5896 5 8.69995 5H9.30005C9.32642 5 9.35156 4.9949 9.37451 4.98564C9.39111 4.97896 9.40674 4.97011 9.4209 4.95944C9.46899 4.92293 9.5 4.8651 9.5 4.8V3.2C9.5 3.14664 9.47925 3.09818 9.44507 3.06232C9.40869 3.02393 9.35718 3 9.30005 3H8.69995Z" fill="white"/>\n <path d="M8.5 6.2C8.5 6.08954 8.5896 6 8.69995 6H9.30005C9.34277 6 9.38232 6.01344 9.41479 6.03635C9.46631 6.07254 9.5 6.13234 9.5 6.2V7.8C9.5 7.85072 9.48096 7.89703 9.44995 7.9323C9.41821 7.96826 9.37354 7.99272 9.32373 7.99861C9.31592 7.99953 9.30811 8 9.30005 8H8.69995C8.5896 8 8.5 7.91046 8.5 7.8V6.2Z" fill="white"/>\n <path d="M8.53711 9.08395C8.51367 9.11667 8.5 9.15674 8.5 9.20001V10.8C8.5 10.9105 8.5896 11 8.69995 11H9.30005C9.4104 11 9.5 10.9105 9.5 10.8V9.20001C9.5 9.08954 9.4104 9 9.30005 9H8.69995C8.68384 9 8.66821 9.00189 8.65332 9.00546C8.60571 9.01688 8.5647 9.04529 8.53711 9.08395Z" fill="white"/>\n <path d="M8.5 12.2C8.5 12.1371 8.52905 12.081 8.57446 12.0443C8.60864 12.0166 8.65234 12 8.69995 12H9.30005C9.4104 12 9.5 12.0895 9.5 12.2V13.8C9.5 13.8664 9.46753 13.9253 9.41772 13.9616C9.38477 13.9857 9.34399 14 9.30005 14H8.69995C8.5896 14 8.5 13.9105 8.5 13.8V12.2Z" fill="white"/>\n <path d="M8.69995 15C8.5896 15 8.5 15.0895 8.5 15.2V15.8C8.5 15.9105 8.5896 16 8.69995 16H9.30005C9.4104 16 9.5 15.9105 9.5 15.8V15.2C9.5 15.0895 9.4104 15 9.30005 15H8.69995Z" fill="white"/>\n</svg>\n',"image/svg+xml").firstChild}function Uwe(){return(new DOMParser).parseFromString('<svg width="20" height="20" viewBox="0 0 18 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M8.5 0.2C8.5 0.0895431 8.58954 0 8.7 0H9.3C9.41046 0 9.5 0.0895431 9.5 0.2V1.8C9.5 1.91046 9.41046 2 9.3 2H8.7C8.58954 2 8.5 1.91046 8.5 1.8V0.2Z" fill="white"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0 1.95424C0 1.85173 0.0775055 1.76582 0.179474 1.7553L7.27947 1.02276C7.39742 1.01059 7.5 1.10313 7.5 1.2217V14.7783C7.5 14.8969 7.39742 14.9894 7.27947 14.9773L0.179474 14.2447C0.0775053 14.2342 0 14.1483 0 14.0458V1.95424ZM1.5 12.873V3.12702L6 2.66273V13.3373L1.5 12.873Z" fill="white"/>\n <path d="M17.8205 1.7553C17.9225 1.76582 18 1.85173 18 1.95424V14.0458C18 14.1483 17.9225 14.2342 17.8205 14.2447L10.7205 14.9773C10.6026 14.9894 10.5 14.8969 10.5 14.7783V1.2217C10.5 1.10313 10.6026 1.01059 10.7205 1.02276L17.8205 1.7553Z" fill="white"/>\n <path d="M8.7 3C8.58954 3 8.5 3.08954 8.5 3.2V4.8C8.5 4.91046 8.58954 5 8.7 5H9.3C9.41046 5 9.5 4.91046 9.5 4.8V3.2C9.5 3.08954 9.41046 3 9.3 3H8.7Z" fill="white"/>\n <path d="M8.5 6.2C8.5 6.08954 8.58954 6 8.7 6H9.3C9.41046 6 9.5 6.08954 9.5 6.2V7.8C9.5 7.91046 9.41046 8 9.3 8H8.7C8.58954 8 8.5 7.91046 8.5 7.8V6.2Z" fill="white"/>\n <path d="M8.7 9C8.58954 9 8.5 9.08954 8.5 9.2V10.8C8.5 10.9105 8.58954 11 8.7 11H9.3C9.41046 11 9.5 10.9105 9.5 10.8V9.2C9.5 9.08954 9.41046 9 9.3 9H8.7Z" fill="white"/>\n <path d="M8.5 12.2C8.5 12.0895 8.58954 12 8.7 12H9.3C9.41046 12 9.5 12.0895 9.5 12.2V13.8C9.5 13.9105 9.41046 14 9.3 14H8.7C8.58954 14 8.5 13.9105 8.5 13.8V12.2Z" fill="white"/>\n <path d="M8.7 15C8.58954 15 8.5 15.0895 8.5 15.2V15.8C8.5 15.9105 8.58954 16 8.7 16H9.3C9.41046 16 9.5 15.9105 9.5 15.8V15.2C9.5 15.0895 9.41046 15 9.3 15H8.7Z" fill="white"/>\n</svg>\n',"image/svg+xml").firstChild}var Bwe=ON.POSITIONS,Fwe="getMirror",Hwe="exitMirror",jwe=function(e){rh(n,e);var t=Ah(n);function n(e){var i;return Ou(this,n),(i=t.call(this,e)).isEnableMirror=!0,i.isEnableMirror=i.config.defaultEnable,i}return Au(n,[{key:"afterCreate",value:function(){this.config.disable||(this.initIcons(),this.btnClick=this.btnClick.bind(this),this.bind(["touchend","click"],this.btnClick),this.updateMirrorState(this.isEnableMirror))}},{key:"registerIcons",value:function(){var e;return up(e={},Fwe,{icon:zwe,class:"xg-get-mirror"}),up(e,Hwe,{icon:Uwe,class:"xg-exit-mirror"}),e}},{key:"initIcons",value:function(){var e=this.icons,t=fb(this).call(this,".xgplayer-icon");t.appendChild(e[Fwe]),t.appendChild(e[Hwe])}},{key:"registerLanguageTexts",value:function(){return{getMirror:{jp:"ミラーを開く",en:"Turn on mirroring",zh:"开启镜像","zh-hk":"開啟鏡像"},exitMirror:{jp:"ミラーを閉じる",en:"Turn off mirroring",zh:"关闭镜像","zh-hk":"關閉鏡像"}}}},{key:"btnClick",value:function(e){e.preventDefault(),e.stopPropagation(),this.isEnableMirror?this.action(!1):this.action(!0)}},{key:"action",value:function(e){this.isEnableMirror=e,this.updateMirrorState(this.isEnableMirror),this.player.emit(Hce.MIRROR_CHANGE,this.isEnableMirror)}},{key:"updateMirrorState",value:function(e){var t=this.player;e?t.addClass("xgplayer-mirror"):t.removeClass("xgplayer-mirror"),this.animate(e)}},{key:"animate",value:function(e){this.root&&(e?this.setAttr("data-state","enable"):this.setAttr("data-state","normal"),this.switchTips(e))}},{key:"switchTips",value:function(e){this.changeLangTextKey(fb(this).call(this,".xg-tips"),e?Hwe:Fwe)}},{key:"destroy",value:function(){this.unbind(["click","touchend"],this.btnClick)}},{key:"render",value:function(){if(!this.config.disable)return'<xg-icon class=\'xgplayer-mirror-icon\'>\n <div class="xgplayer-icon">\n </div>\n <div class="xg-tips" lang-key="mirror">'.concat(this.langText[Fwe],"</div>\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"mirrorPlugin"}},{key:"defaultConfig",get:function(){return{position:Bwe.CONTROLS_RIGHT,index:qce,disable:!1,defaultEnable:!1}}}]),n}(ON);var Gwe=function(e){rh(n,e);var t=Ah(n);function n(e){var i;return Ou(this,n),(i=t.call(this,e)).memoryId="",i.shouldShowToast=!1,i.saveTimeFun=qO.checkIsFunction(i.config.saveTime)?i.config.saveTime:i.saveTimeByStorage,i.getTimeFun=qO.checkIsFunction(i.config.getTime)?i.config.getTime:i.getTimeByStorage,i.startTime=0,i.memoryId=i.config.memoryId,i.showToast=i.showToast.bind(Lh(i)),i.saveTime=i.saveTime.bind(Lh(i)),i.visibilitychangeCallback=i.visibilitychangeCallback.bind(Lh(i)),i}return Au(n,[{key:"registerLanguageTexts",value:function(){return{preText:{jp:"に位置付けられました",en:"Has located for you to ",zh:"已为您定位至","zh-hk":"已為您定位至"}}}},{key:"children",value:function(){return{toast:d_e}}},{key:"afterCreate",value:function(){var e=this;this.once(hM,this.showToast),this.on(dM,(function(){e.curTime=e.player.currentTime}))}},{key:"beforePlayerInit",value:function(){return this.memoryId||(this.playerConfig.vid?this.memoryId=this.playerConfig.vid:this.player.url&&(this.memoryId=this.player.url.replace(/\?.*$/,""))),this.setSave(),this.getTime()}},{key:"getTime",value:function(){var e=this;return new rb((function(t){var n,i=(n=e.getTimeFun(e.memoryId))&&n.then?n:new rb((function(e){e(n)}));i.then((function(n){var i,r,o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=parseFloat(e);return XP(n)?t:n}(n);!isNaN(o)&&o>0?(e.startTime=o,e.shouldShowToast=!0,e.playerConfig.startTime=e.startTime,null!==(i=e.player.plugins)&&void 0!==i&&null!==(i=i.hls)&&void 0!==i&&null!==(i=i.hls)&&void 0!==i&&i.config&&(e.player.plugins.hls.hls.config.startTime=e.startTime),null!==(r=e.player.plugins)&&void 0!==r&&null!==(r=r.encrypthlsplugin)&&void 0!==r&&null!==(r=r.hls)&&void 0!==r&&r.config&&(e.player.plugins.encrypthlsplugin.hls.config.startTime=e.startTime)):LG.warn("the time got is invalid",n);t()})).catch((function(e){LG.error("getTime function occur error",e),t()}))}))}},{key:"saveTime",value:function(){var e;if(this.player){var t=this.config,n=t.minStartTime,i=void 0===n?1:n,r=t.minEndTime,o=void 0===r?1:r,a=this.player,s=a.currentTime,l=a.duration,c=null!==(e=null!=s?s:this.curTime)&&void 0!==e?e:0;l&&(c<i||Math.abs(l-c)<o?this.saveTimeFun(this.memoryId,0):this.saveTimeFun(this.memoryId,c))}}},{key:"visibilitychangeCallback",value:function(){"hidden"===document.visibilityState&&this.saveTime()}},{key:"setSave",value:function(){this.on(sM,this.saveTime.bind(this)),this.on(cM,this.saveTime.bind(this)),document.addEventListener("visibilitychange",this.visibilitychangeCallback.bind(this)),document.addEventListener("pagehide",this.saveTime.bind(this)),window.addEventListener("beforeunload",this.saveTime.bind(this))}},{key:"showToast",value:function(){if(this.shouldShowToast){var e;this.shouldShowToast=!1;var t=null===(e=this.player)||void 0===e?void 0:e.getPlugin("sdkToastPlugin");if(!t)return;if(this.startTime>0){var n,i=qO.format(this.startTime);t.add(y_(n="".concat(this.langText.preText)).call(n,i),4e3,!0)}}}},{key:"saveTimeByStorage",value:function(e,t){!function(e){var t=arguments.length>2?arguments[2]:void 0;if(e){var n=QG+(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"")+"_"+e;localStorage.setItem(n,t+"")}}(e,n.pluginName,t+"")}},{key:"getTimeByStorage",value:function(e){return function(e){if(e){var t=QG+(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"")+"_"+e;return localStorage.getItem(t)}}(e,n.pluginName)||0}},{key:"destroy",value:function(){this.saveTime(),document.removeEventListener("visibilitychange",this.visibilitychangeCallback),document.removeEventListener("pagehide",this.saveTime),window.removeEventListener("beforeunload",this.saveTime)}}],[{key:"pluginName",get:function(){return"memoryPlay"}},{key:"defaultConfig",get:function(){return{getTime:null,saveTime:null,memoryId:"",minStartTime:1,minEndTime:1}}}]),n}(ON);var Vwe=function(){function e(t){var n;Ou(this,e),this.config=t.config,this.parent=t.root,this.root=qO.createDom("ul","",{},"xg-play-list xg-list-slide-scroll ".concat(this.config.className));var i="mobile"===eM.device?"touchend":"click";this.modal=qO.createDom("div","",{},"xg-play-list-modal"),this.modal.appendChild(this.root),t.root.appendChild(this.modal),this._delegates=ON.delegate.call(this,this.modal,".xg-play-list-modal",i,this.modalClick.bind(this));var r=this.config.maxHeight;r&&this.setStyle({maxHeight:r}),this.onItemClick=this.onItemClick.bind(this),this.renderItemList(),y_(n=this._delegates).call(n,ON.delegate.call(this,this.root,"li",i,this.onItemClick))}return Au(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)&&W_(t=kT(i.style)).call(t,(function(e){r.style[e]=i[e]}));e.length>0&&(this.attrKeys=kT(e[0])),this.root.innerHTML="",W_(e).call(e,(function(e,t){var i,r,o,a,s=e.selected?"xg-play-list-item selected":"xg-play-list-item";e["data-index"]=t;var l=e.duration?qO.format(e.duration):"",c=e.poster?"background-image: url('".concat(e.poster,"')"):"",u=(new DOMParser).parseFromString('<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">\n<g filter="url(#filter0_dii_340_912)">\n<path d="M4.00011 7.66678C4.00005 5.82578 5.49245 4.33333 7.33344 4.33333H23.3742H32.6657C34.5066 4.33333 35.999 5.82572 35.999 7.66667V13.5764L35.9998 32.3332C35.9999 34.1742 34.5075 35.6667 32.6665 35.6667H7.33423C5.49332 35.6667 4.00096 34.1743 4.0009 32.3334L4.00011 7.66678Z" fill="url(#paint0_linear_340_912)"/>\n<path d="M4.10011 7.66677C4.10005 5.88101 5.54768 4.43333 7.33344 4.43333H23.3742H32.6657C34.4514 4.43333 35.899 5.88095 35.899 7.66667V13.5764L35.8998 32.3332C35.8999 34.119 34.4523 35.5667 32.6665 35.5667H7.33423C5.54855 35.5667 4.10095 34.1191 4.1009 32.3334L4.10011 7.66677Z" stroke="url(#paint1_linear_340_912)" stroke-width="0.2"/>\n</g>\n<path d="M6.76669 9.66667C6.76669 8.24914 7.91582 7.1 9.33335 7.1H30.6667C32.0842 7.1 33.2334 8.24914 33.2334 9.66667V30.3333C33.2334 31.7509 32.0842 32.9 30.6667 32.9H9.33335C7.91582 32.9 6.76669 31.7509 6.76669 30.3333V9.66667Z" fill="url(#paint2_linear_340_912)" stroke="url(#paint3_linear_340_912)" stroke-width="0.2"/>\n<g filter="url(#filter1_dii_340_912)">\n<path d="M15.4689 18.4428L10.9398 27.4593C10.6614 28.0134 11.0643 28.6667 11.6845 28.6667H27.8647C28.5118 28.6667 28.912 27.9614 28.5801 27.4059L25.3326 21.9703C25.0217 21.4499 24.2769 21.425 23.932 21.9235L21.1839 25.8946C21.1128 25.9973 20.9581 25.9882 20.8996 25.8778L16.9499 18.4266C16.6329 17.8285 15.7728 17.8379 15.4689 18.4428Z" fill="url(#paint4_linear_340_912)"/>\n<path d="M15.4689 18.4428L10.9398 27.4593C10.6614 28.0134 11.0643 28.6667 11.6845 28.6667H27.8647C28.5118 28.6667 28.912 27.9614 28.5801 27.4059L25.3326 21.9703C25.0217 21.4499 24.2769 21.425 23.932 21.9235L21.1839 25.8946C21.1128 25.9973 20.9581 25.9882 20.8996 25.8778L16.9499 18.4266C16.6329 17.8285 15.7728 17.8379 15.4689 18.4428Z" stroke="url(#paint5_linear_340_912)" stroke-width="0.166667"/>\n</g>\n<g filter="url(#filter2_dii_340_912)">\n<circle cx="23.6667" cy="14.6667" r="2" fill="url(#paint6_linear_340_912)"/>\n<circle cx="23.6667" cy="14.6667" r="2" stroke="url(#paint7_linear_340_912)" stroke-width="0.166667"/>\n</g>\n<defs>\n<filter id="filter0_dii_340_912" x="3.8431" y="4.17631" width="32.6278" height="32.1184" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">\n<feFlood flood-opacity="0" result="BackgroundImageFix"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dx="0.157018" dy="0.314036"/>\n<feGaussianBlur stdDeviation="0.157018"/>\n<feComposite in2="hardAlpha" operator="out"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0.0684375 0 0 0 0 0.0704062 0 0 0 0 0.075 0 0 0 0.5 0"/>\n<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_340_912"/>\n<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_340_912" result="shape"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dx="0.471054" dy="0.471054"/>\n<feGaussianBlur stdDeviation="0.157018"/>\n<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0.355764 0 0 0 0 0.368819 0 0 0 0 0.391667 0 0 0 1 0"/>\n<feBlend mode="normal" in2="shape" result="effect2_innerShadow_340_912"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dx="-0.471054" dy="-0.471054"/>\n<feGaussianBlur stdDeviation="0.0785089"/>\n<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0.191389 0 0 0 0 0.197708 0 0 0 0 0.216667 0 0 0 1 0"/>\n<feBlend mode="normal" in2="effect2_innerShadow_340_912" result="effect3_innerShadow_340_912"/>\n</filter>\n<filter id="filter1_dii_340_912" x="10.4333" y="17.5669" width="18.6828" height="11.6831" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">\n<feFlood flood-opacity="0" result="BackgroundImageFix"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dy="0.166667"/>\n<feGaussianBlur stdDeviation="0.166667"/>\n<feComposite in2="hardAlpha" operator="out"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0.0823529 0 0 0 0 0.0901961 0 0 0 0 0.105882 0 0 0 1 0"/>\n<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_340_912"/>\n<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_340_912" result="shape"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dx="0.166667"/>\n<feGaussianBlur stdDeviation="0.166667"/>\n<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0.930313 0 0 0 0 0.935083 0 0 0 0 0.954167 0 0 0 1 0"/>\n<feBlend mode="normal" in2="shape" result="effect2_innerShadow_340_912"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dx="-0.166667" dy="-0.333333"/>\n<feGaussianBlur stdDeviation="0.166667"/>\n<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0.409097 0 0 0 0 0.443509 0 0 0 0 0.570833 0 0 0 1 0"/>\n<feBlend mode="normal" in2="effect2_innerShadow_340_912" result="effect3_innerShadow_340_912"/>\n</filter>\n<filter id="filter2_dii_340_912" x="21.25" y="12.25" width="4.83329" height="5.00001" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">\n<feFlood flood-opacity="0" result="BackgroundImageFix"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dy="0.166667"/>\n<feGaussianBlur stdDeviation="0.166667"/>\n<feComposite in2="hardAlpha" operator="out"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0.0823529 0 0 0 0 0.0901961 0 0 0 0 0.105882 0 0 0 1 0"/>\n<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_340_912"/>\n<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_340_912" result="shape"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dx="0.166667"/>\n<feGaussianBlur stdDeviation="0.166667"/>\n<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0.930313 0 0 0 0 0.935083 0 0 0 0 0.954167 0 0 0 1 0"/>\n<feBlend mode="normal" in2="shape" result="effect2_innerShadow_340_912"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dx="-0.166667" dy="-0.333333"/>\n<feGaussianBlur stdDeviation="0.166667"/>\n<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0.364583 0 0 0 0 0.397828 0 0 0 0 0.520833 0 0 0 1 0"/>\n<feBlend mode="normal" in2="effect2_innerShadow_340_912" result="effect3_innerShadow_340_912"/>\n</filter>\n<linearGradient id="paint0_linear_340_912" x1="30.2254" y1="8.17498" x2="11.4982" y2="41.5657" gradientUnits="userSpaceOnUse">\n<stop stop-color="#434548"/>\n<stop offset="0.855332" stop-color="#3E3F42"/>\n</linearGradient>\n<linearGradient id="paint1_linear_340_912" x1="7.52649" y1="1.8673" x2="25.0283" y2="33.3887" gradientUnits="userSpaceOnUse">\n<stop stop-color="#383838"/>\n<stop offset="0.192009" stop-color="#45484D"/>\n<stop offset="0.703503" stop-color="#37393D"/>\n<stop offset="0.962692" stop-color="#1B1C1E"/>\n</linearGradient>\n<linearGradient id="paint2_linear_340_912" x1="28.5212" y1="10.1877" x2="13.0162" y2="37.9513" gradientUnits="userSpaceOnUse">\n<stop stop-color="#2E2F32"/>\n<stop offset="0.855332" stop-color="#242528"/>\n</linearGradient>\n<linearGradient id="paint3_linear_340_912" x1="9.60543" y1="4.95372" x2="24.0954" y2="31.1622" gradientUnits="userSpaceOnUse">\n<stop stop-color="#1F2124"/>\n<stop offset="0.192009" stop-color="#282B30"/>\n<stop offset="0.703503" stop-color="#27292F"/>\n<stop offset="0.962692" stop-color="#1D1F23"/>\n</linearGradient>\n<linearGradient id="paint4_linear_340_912" x1="16.969" y1="16.5412" x2="22.5457" y2="28.6249" gradientUnits="userSpaceOnUse">\n<stop stop-color="#C7CCE2"/>\n<stop offset="1" stop-color="#8B95BC"/>\n</linearGradient>\n<linearGradient id="paint5_linear_340_912" x1="17.5125" y1="20.3581" x2="20.121" y2="28.4669" gradientUnits="userSpaceOnUse">\n<stop offset="0.181113" stop-color="#B1B7D3"/>\n<stop offset="1" stop-color="#535C80"/>\n</linearGradient>\n<linearGradient id="paint6_linear_340_912" x1="23.0637" y1="12.5093" x2="25.4773" y2="15.7207" gradientUnits="userSpaceOnUse">\n<stop stop-color="#B8BED6"/>\n<stop offset="1" stop-color="#7E88AD"/>\n</linearGradient>\n<linearGradient id="paint7_linear_340_912" x1="23.1781" y1="13.818" x2="24.4392" y2="16.2252" gradientUnits="userSpaceOnUse">\n<stop offset="0.181113" stop-color="#B1B7D3"/>\n<stop offset="1" stop-color="#495274"/>\n</linearGradient>\n</defs>\n</svg>\n',"image/svg+xml").firstChild,h=y_(i=y_(r=y_(o=y_(a='\n <div style="'.concat(c,'" class="xg-play-list-poster ')).call(a,e.selected?"is-active":""," ")).call(o,e.poster?"":"no-poster",'" >\n <div class="bg"></div>\n <div class="icon"></div>\n <div class="duration">')).call(r,l,'</div>\n <duv class="playing">\n <div class="icon-wrap">\n <div class="icon-line"></div>\n <div class="icon-line"></div>\n <div class="icon-line"></div>\n <div class="icon-line"></div>\n </div>\n </duv>\n </div>\n <div class="xg-play-list-title">\n <div class="xg-play-list-title-text">')).call(i,e.title,"</div>\n </div>\n "),d=qO.createDom("li",h,e,s),f=qO.findDom(d,".bg");!e.poster&&f.appendChild(u),n.root.appendChild(d)}));var o=JS(e).call(e,(function(e){return e.selected}));if(o>=0){var a=qO.findDom(this.root,".xg-play-list-item.selected");if(!a)return;var s=a.getBoundingClientRect().height,l=this.root.getBoundingClientRect().height,c=(e.length-o)*s,u=s*e.length;this.root.scrollTop=c<l?u-l:o*s}}},{key:"onItemClick",value:function(e){e.delegateTarget||(e.delegateTarget=e.target);var t=e.delegateTarget;if(t&&qO.hasClass(t,"selected"))return!1;var n="function"==typeof this.config.onItemClick?this.config.onItemClick:null,i=this.root.querySelector(".selected");qO.addClass(t,"selected"),i&&qO.removeClass(i,"selected"),n&&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={};W_(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(){qO.removeClass(this.modal,"hide"),qO.addClass(this.modal,"active"),qO.removeClass(this.root,"hide"),qO.addClass(this.root,"active")}},{key:"hide",value:function(){qO.removeClass(this.modal,"active"),qO.addClass(this.modal,"hide"),qO.removeClass(this.root,"active"),qO.addClass(this.root,"hide")}},{key:"modalClick",value:function(e){e.stopPropagation(),this.hide();var t="function"==typeof this.config.onModalClick?this.config.onModalClick:null;t&&t(e)}},{key:"setStyle",value:function(e){var t=this;kT(e).forEach((function(n){t.root.style[n]=e[n]}))}},{key:"destroy",value:function(){var e;this._delegates&&(W_(e=this._delegates).call(e,(function(e){e.destroy&&e.destroy()})),this._delegates=null);this.root.parentNode.removeChild(this.root),this.root.innerHTML=null,this.root=null}}]),e}();function Kwe(){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 d="M12.8499 8.49494C13.7054 8.98885 14.1331 9.23581 14.2767 9.55822C14.4019 9.83944 14.4019 10.1606 14.2767 10.4418C14.1331 10.7642 13.7054 11.0112 12.8499 11.5051L6.65863 15.0796C5.80315 15.5735 5.37542 15.8205 5.02442 15.7836C4.71827 15.7514 4.44016 15.5909 4.25921 15.3418C4.05177 15.0563 4.05177 14.5624 4.05177 13.5746V6.42547C4.05177 5.43765 4.05177 4.94374 4.25921 4.65822C4.44016 4.40917 4.71827 4.2486 5.02442 4.21642C5.37542 4.17953 5.80315 4.42649 6.65863 4.92039L12.8499 8.49494Z" fill="white"/>\n<rect x="13.8274" y="4.02594" width="2.17238" height="11.9481" rx="0.814644" fill="white"/>\n</svg>\n',"image/svg+xml").firstChild}function Wwe(){return(new DOMParser).parseFromString('<svg width="21" height="22" viewBox="0 0 21 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n<g filter="url(#filter0_d_126_721)">\n<path d="M8.18979 6.3414C8.60304 6.57999 8.80967 6.69928 8.87901 6.85503C8.93949 6.99088 8.93949 7.14601 8.87901 7.28186C8.80967 7.4376 8.60304 7.5569 8.18979 7.79549L5.59253 9.29502C5.17928 9.53361 4.97266 9.6529 4.80311 9.63508C4.65522 9.61954 4.52087 9.54197 4.43346 9.42167C4.33325 9.28374 4.33325 9.04515 4.33325 8.56797V5.56891C4.33325 5.09173 4.33325 4.85314 4.43346 4.71522C4.52087 4.59491 4.65522 4.51735 4.80311 4.5018C4.97266 4.48398 5.17928 4.60328 5.59253 4.84187L8.18979 6.3414Z" fill="white"/>\n</g>\n<path d="M11.5264 7.19745H18" stroke="white" stroke-width="1.61843" stroke-linecap="round"/>\n<path d="M5.05273 12.5922L18.0001 12.5922" stroke="white" stroke-width="1.61843" stroke-linecap="round"/>\n<path d="M5.05273 17.9869L18.0001 17.9869" stroke="white" stroke-width="1.61843" stroke-linecap="round"/>\n<defs>\n<filter id="filter0_d_126_721" x="0.736733" y="0.903543" width="11.7841" height="12.3298" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">\n<feFlood flood-opacity="0" result="BackgroundImageFix"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset/>\n<feGaussianBlur stdDeviation="1.79826"/>\n<feComposite in2="hardAlpha" operator="out"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"/>\n<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_126_721"/>\n<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_126_721" result="shape"/>\n</filter>\n</defs>\n</svg>\n',"image/svg+xml").firstChild}var Ywe="playListNext",qwe="playListToggle",Xwe="mobile"===eM.device;function $we(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!Array.isArray(e))return[];var t=ib(e).call(e,(function(e){return e.url||e.playAuthToken}));return W_(t).call(t,(function(e,t){var n=dp({},e||{});return n.vid||(n.vid=""+t),n}))}function Zwe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=Number(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),n=XP(t)?0:t,i=0;return(i=n<=0?0:n<e.length?n:0)<0?0:i}Nse.prototype.setVodPlayListConfig=function(e){var t;if(fb(t=e.plugins||[]).call(t,(function(e){return e.pluginName===Qwe.pluginName}))){var n=fV(e,"playListPlugin");if(n&&function(e){var t=Du(e);return null!==e&&("object"===t||"function"===t)}(n)){var i=n.list,r=void 0===i?[]:i,o=n.defaultIndex,a=void 0===o?0:o,s=$we(r),l=Zwe(s,a),c=null==s?void 0:s[l];if(c){var u=c.url,h=c.poster,d=c.playAuthToken;d?e.getVideoByToken=dp(dp({},e.getVideoByToken||{}),{},{playAuthToken:d}):u&&(e.url=u),h&&(e.poster=h)}}}};var Qwe=function(e){rh(n,e);var t=Ah(n);function n(){var e;return Ou(this,n),(e=t.apply(this,arguments)).onEnter=function(t){t.stopPropagation(),e.emit("icon_mouseenter",{pluginName:e.pluginName}),e.switchActiveState(t)},e.switchActiveState=function(t){t.stopPropagation(),"click"===e.config.toggleMode?e.toggle(!e.isActive):e.toggle(!0)},e.handleNext=function(t){t.stopPropagation(),e.next()},e._onTimeUpdate=function(){var t=Lh(e).player;!e.halfPass&&t.currentTime>t.duration/2&&e.confirmOrder()},e._onEnded=function(){if("order"===e.mode&&e.curIndex+1>=e.list.length)return e.player.pause(),void(e.player.currentTime=0);e.next()},e.onLeave=function(t){t.stopPropagation(),e.emit("icon_mouseleave",{pluginName:e.pluginName}),e.isActive&&e.toggle(!1)},e}return Au(n,[{key:"beforeCreate",value:function(e){var t;F_(t=wb(ON.POSITIONS)).call(t,e.position)||(e.root=e.player.controls.left,e.config.position=ON.POSITIONS.CONTROLS_LEFT,e.position=ON.POSITIONS.CONTROLS_LEFT)}},{key:"afterCreate",value:function(){var e=this,t=this.config,n=t||{},i=n.list,r=void 0===i?[]:i,o=n.mode,a=n.defaultIndex;this.initIcons(),this.halfPass=!1,this.list=$we(r),this.timer=setTimeout((function(){e.emit(Hce.PLAY_LIST_CHANGE,e.list)})),this.disable=!(r.length>0),this.mode=o,this.curIndex=Zwe(this.list,a),this.curIndex>0?(this.nextIndex=this.curIndex+1<this.list.length?this.curIndex+1:0,this.prevIndex=this.curIndex-1):(this.nextIndex=1,this.prevIndex=this.list.length-1),this.on(dM,this._onTimeUpdate),this.on(sM,this._onEnded),this.on([jM,NM],(function(){e._resizeList()})),this.once(pM,(function(){e.list&&e.list.length>0&&(e.renderItemList(),e.show())})),Xwe&&this.on(EM,(function(){e.isActive&&(e.optionsList&&e.optionsList.hide(),e.isActive=!1)})),Xwe?(t.toggleMode="click",this.activeEvent="touchend"):this.activeEvent="click"===t.toggleMode?"click":"mouseenter",this.bind(".xg-play-next-btn","click",this.handleNext),"click"===t.toggleMode?this.bind(".xg-play-list-btn",this.activeEvent,this.switchActiveState):(this.bind(".xg-play-list-btn",this.activeEvent,this.onEnter),this.bind(".xg-play-list-btn","mouseleave",this.onLeave))}},{key:"registerLanguageTexts",value:function(){return{playNext:{jp:"次に遊ぶ",en:"play next",zh:"播放下一个","zh-hk":"播放下一個"},playList:{jp:"プレイリスト",en:"playList",zh:"播放列表","zh-hk":"播放清單"}}}},{key:"registerIcons",value:function(){var e;return up(e={},Ywe,{icon:Kwe,class:"xg-play-next-btn"}),up(e,qwe,{icon:Wwe,class:"xg-play-list-btn"}),e}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xg-play-next-btn",e[Ywe]),this.appendChild(".xg-play-list-btn",e[qwe])}},{key:"show",value:function(){!this.list||this.list.length<1||qO.addClass(this.root,"show")}},{key:"hide",value:function(){qO.removeClass(this.root,"show")}},{key:"prev",value:function(){this.disable||(this.halfPass||(this.halfPass=!0,this._prevCompute()),this.curIndex=this.prevIndex,this.change())}},{key:"next",value:function(){this.disable||(this.halfPass||(this.halfPass=!0,this._nextCompute()),this.curIndex=this.nextIndex,this.change())}},{key:"changeList",value:function(e){this.player.currentTime=0,this.list=$we(e),this.nextIndex=0,this.curIndex=0,this.change(),this.disable=!(this.list.length>0),this.emit(Hce.PLAY_LIST_CHANGE,this.list)}},{key:"setIndex",value:function(e){e<0||e>=this.list.length||(this.nextIndex=e+1<this.list.length?e+1:0,this.prevIndex=e-1<0?this.list.length-1:e-1,this.curIndex=e,this.change())}},{key:"change",value:function(){if(!this.disable){var e=this.player,t=this.list,n=this.curIndex;this.halfPass=!1;var i=t[n],r=i.url,o=i.playAuthToken,a=i.title,s=void 0===a?"":a,l=i.vid,c=void 0===l?"":l,u=i.poster,h=void 0===u?"":u;this.curInfo={url:r,playAuthToken:o,title:s,vid:c,poster:h};var d=e.sdk||e;o?d.playNext({vid:c,poster:h,autoplay:!0,getVideoByToken:{playAuthToken:o}}):d.playNext({vid:c,poster:h,autoplay:!0,url:r}),this.renderItemList(),e.off("timeupdate",this._emitChange.bind(this)),e.once("timeupdate",this._emitChange.bind(this))}}},{key:"confirmOrder",value:function(){this.halfPass=!0,this._nextCompute(),this._prevCompute()}},{key:"_nextCompute",value:function(){this.disable||(this.curIndex+1<this.list.length?this.nextIndex=this.curIndex+1:this.nextIndex=0)}},{key:"_prevCompute",value:function(){this.disable||(this.curIndex-1>=0?this.prevIndex=this.curIndex-1:this.prevIndex=this.list.length-1)}},{key:"_emitChange",value:function(){this.emit(Hce.PLAY_LIST_ITEM_CHANGE,this.curInfo)}},{key:"toggle",value:function(e){if(e!==this.isActive){var t=this.player.controls;e?(t.blur(),this.optionsList&&this.optionsList.show()):(t.focus(),this.optionsList&&this.optionsList.hide()),this.isActive=e}}},{key:"onItemClick",value:function(e,t){e.stopPropagation(),this.curIndex=t.to.index,this.change(),this.toggle(!1)}},{key:"renderItemList",value:function(e){var t=this,n=this.list,i=this.config,r=this.optionsList,o=this.player;"number"==typeof e&&(this.curIndex=e,this.curInfo=n[e]);var a=W_(n).call(n,(function(n,i){var r=dp(dp({},n),{},{selected:!1});return i===t.curIndex&&(r.selected=!0,e=i),r}));if(r)r.renderItemList(a);else{var s={config:{data:a,className:"xg-side-play-list",onItemClick:function(e,n){t.onItemClick(e,n)},onModalClick:function(){t.toggle(!1)}},root:o.innerContainer||o.root},l=this.player.root.getBoundingClientRect().height;l&&i.heightLimit&&(s.config.maxHeight="".concat(l,"px")),this.optionsList=new Vwe(s),this.show(),this._resizeList()}}},{key:"_resizeList",value:function(){if(this.config.heightLimit){var e=this.player.root.getBoundingClientRect().height;this.optionsList&&this.optionsList.setStyle({maxHeight:"".concat(e,"px")})}}},{key:"destroy",value:function(){"click"===this.config.toggleMode?this.unbind(this.activeEvent,this.switchActiveState):(this.unbind(this.activeEvent,this.onEnter),this.unbind("mouseleave",this.onLeave)),this.optionsList&&(this.optionsList.destroy(),this.optionsList=null),this.timer&&(clearTimeout(this.timer),this.timer=null)}},{key:"disable",get:function(){return this._disable},set:function(e){this._disable=e,e?(this.hide(),this.optionsList&&this.optionsList.hide()):this.show()}},{key:"render",value:function(){var e,t;if(!this.disable)return y_(e=y_(t='<xg-icon class="xg-options-icon xg-play-list-btn-container '.concat(this.config.className||"",'">\n <div class="xgplayer-icon xg-play-next-btn">\n <div class="xg-tips" lang-key="playNext">')).call(t,this.langText.playNext,'</div>\n </div>\n <div class="xgplayer-icon xg-play-list-btn">\n <div class="xg-tips" lang-key="playList">')).call(e,this.langText.playList,"</div>\n </div>\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"playListPlugin"}},{key:"defaultConfig",get:function(){return{position:ON.POSITIONS.CONTROLS_LEFT,index:$ce,list:[],mode:"order",defaultIndex:0,isItemClickHide:!0,toggleMode:"click"}}}]),n}(ON),Jwe=function(e){rh(n,e);var t=Ah(n);function n(){var e;return Ou(this,n),(e=t.apply(this,arguments))._infoItems=[],e}return Au(n,[{key:"streamType",get:function(){return this.playerConfig.playerData.getCurrentStreamType()}},{key:"afterCreate",value:function(){var e,t=this;F_(e=["flv","hls"]).call(e,this.streamType)?(this.player.on("error",(function(){return t._handleError()})),this.player.on("loadeddata",(function(){return t._handleLoadedData()}))):this.close()}},{key:"registerLanguageTexts",value:function(){return{DECODEFPS:{en:"decodeFps",zh:"解码效率"},DECODECOST:{en:"decodeCost",zh:"解码消耗"},FORMAT:{en:"format",zh:"格式"},FPS:{en:"fps",zh:"帧率"},BITRATE:{en:"birate",zh:"码率"},GOP:{en:"GOP",zh:"GOP"},RESOLUTION:{en:"resolution",zh:"分辨率"},ENCODETYPE:{en:"encodeType",zh:"编码方式"},BUFFEREND:{en:"bufferEnd",zh:"buffer水位"},CURRENTTIME:{en:"currentTime",zh:"播放进度"}}}},{key:"_getDefaultInfo",value:function(e){var t={h265Title:{key:"h265Title",label:"H265解码",type:"title"},decodeEfficiency:{key:"decodeEfficiency",label:"解码效率",labelTextKey:"DECODEFPS",value:e.decodeFps,render:function(e){return e+"frames/s"}},decodeCost:{key:"decodeCost",label:"解码消耗",labelTextKey:"DECODECOST",value:e.decodeFps,render:function(e){return e?(1e3/e).toFixed()+"ms":""}}};return dp({format:{key:"format",label:"格式",labelTextKey:"FORMAT",value:e.format},framerate:{key:"framerate",label:"帧率",labelTextKey:"FPS",value:e.fps,render:function(e){return"".concat(e," fps")}},bitrate:{key:"bitrate",label:"码率",labelTextKey:"BITRATE",value:e.bitrate,render:function(e){return"".concat(e/1e3," kbps")}},gop:{key:"gop",label:"GOP",labelTextKey:"GOP",value:e.gop,render:function(e){return"".concat(e," frames")}},resolution:{key:"resolution",label:"视频分辨率",labelTextKey:"RESOLUTION",value:{width:e.width,height:e.height},render:function(e){var t;return y_(t="".concat(e.width," * ")).call(t,e.height)}},encodeType:{key:"encodeType",label:"编码方式",labelTextKey:"ENCODETYPE",value:e.encodeType},bufferEnd:{key:"bufferEnd",label:"buffer水位",labelTextKey:"BUFFEREND",value:e.bufferEnd},currentTime:{key:"currentTime",label:"播放进度",labelTextKey:"CURRENTTIME",value:e.currentTime,render:function(e){return e?e.toFixed(6)+"s":""}}},e.isOpenSoftDecoding&&this.config.showH265Info?t:{})}},{key:"_init",value:function(){var e=this,t=this._initDom(this._getInfoListData());this._infoItems=new Proxy(t,{set:function(t,n,i){return e._updateDom(t[n].dom,i),LP(t,n,i)}}),this._tick()}},{key:"_getStats",value:function(){var e,t;return"flv"===this.streamType?null===(e=this.player.plugins.flv)||void 0===e?void 0:e.getStats():"hls"===this.streamType?null===(t=this.player.plugins.hls)||void 0===t?void 0:t.getStats():{}}},{key:"_getInfoListData",value:function(){var e=this._getStats()||{};return this._getDefaultInfo(VS(e,{format:"".concat(this.streamType,"_live"),isOpenSoftDecoding:"live-video"==this.playerConfig.mediaType}))}},{key:"_initDom",value:function(e){var t=this,n=fb(this).call(this,".veplayer-livepanel-container");return n.innerHTML="",wb(e).forEach((function(e){var i=qO.createDom("veplayer-livepanel-div","",void 0,"veplayer-livepanel-container-row");"title"===e.type?t._updateTitle(i,e):t._updateDom(i,e),n.appendChild(i),e.dom=i})),e}},{key:"_updateTitle",value:function(e,t){e.innerHTML="";var n=qO.createDom("veplayer-livepanel-span",t.label,void 0,"veplayer-livepanel-container-row-title");e.appendChild(n)}},{key:"_updateDom",value:function(e,t){e.innerHTML="";var n=qO.createDom("veplayer-livepanel-span",this._renderLabel(t),void 0,"veplayer-livepanel-container-row-label");if(e.appendChild(n),"title"!==t.type){var i=qO.createDom("veplayer-livepanel-span",this._renderValue(t));e.appendChild(i)}}},{key:"_renderLabel",value:function(e){return e.labelTextKey&&this.langText[e.labelTextKey]}},{key:"_renderValue",value:function(e){return e.render?e.render(e.value):e.value}},{key:"_handleDataChange",value:function(){var e=this,t=this._getInfoListData();wb(this._infoItems).forEach((function(n){"title"!==n.type&&e._renderValue(n)!==e._renderValue(t[n.key])&&(e._infoItems[n.key]=dp(dp({},n),t[n.key]))}))}},{key:"_tick",value:function(){var e=this;this._pollTimer=setTimeout((function(){clearTimeout(e._pollTimer),e._poll(),e._tick()}),500)}},{key:"_poll",value:function(){this._handleDataChange()}},{key:"destroy",value:function(){clearTimeout(this._pollTimer)}},{key:"_handleError",value:function(){this._close()}},{key:"_handleLoadedData",value:function(){this.config.visible&&this._open()}},{key:"_open",value:function(){var e=fb(this).call(this,".veplayer-livepanel-container");qO.removeClass(e,"veplayer-livepanel-hidden"),this._init()}},{key:"_close",value:function(){var e=fb(this).call(this,".veplayer-livepanel-container");qO.addClass(e,"veplayer-livepanel-hidden"),clearTimeout(this._pollTimer)}},{key:"open",value:function(){this._open(),this.config.visible=!0}},{key:"close",value:function(){this._close(),this.config.visible=!1}},{key:"render",value:function(){return'\n <xg-livepanel class="xgplayer-livepanel">\n <xg-livepanel-container class="veplayer-livepanel-container '.concat(!this.config.visible&&"veplayer-livepanel-hidden",'">\n </xg-livepanel-container></xg-livepanel>\n ')}}],[{key:"pluginName",get:function(){return"LiveInfoPanel"}},{key:"defaultConfig",get:function(){return{visible:!0,showH265Info:!1}}}]),n}(ON),eSe=function(e){rh(n,e);var t=Ah(n);function n(){return Ou(this,n),t.apply(this,arguments)}return Au(n)}(WEe);return eSe.Music=VEe,eSe.LiveSubtitlesIconPlugin=ZEe,eSe.LiveSubtitlesPlugin=XEe,eSe.DefinitionDemotePlugin=Awe,eSe.TimeShiftPlugin=Nwe,eSe.MirrorPlugin=jwe,eSe.MemoryPlay=Gwe,eSe.Subtitle=h_e,eSe.DynamicWatermarkPlugin=Pwe,eSe.PlayListPlugin=Qwe,eSe.Service=BG,eSe.LiveInfoPanel=Jwe,eSe.Events=Vce,eSe.Event=Gce,eSe.getI18N=function(){return KN},eSe.BasePlugin=kN,eSe.Plugin=ON,eSe.Sniffer=eM,eSe.Util=qO,eSe.STATE_CLASS=UN,eSe.I18N=KN,eSe.STATES=WN,eSe.SdkPlugin=tEe,eSe}));